seq_id string | text string | repo_name string | sub_path string | file_name string | file_ext string | file_size_in_byte int64 | program_lang string | lang string | doc_type string | stars int64 | dataset string | pt string | api list |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
40373241994 | import math
from datetime import datetime
from dateutil.parser import parse
from pytz import UTC
EPOCH = UTC.localize(datetime.utcfromtimestamp(0))
escape_measurement = str.maketrans({
',': r'\,',
' ': r'\ ',
'\n': r'\n',
'\t': r'\t',
'\r': r'\r',
})
escape_field_value = str.maketrans({
'"':... | openGemini/opengemini-client-python | point.py | point.py | py | 4,146 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pytz.UTC.localize",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pytz.UTC",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.utcfromtimestamp",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetime.d... |
24913459609 | import clr
clr.AddReference('System.Drawing')
clr.AddReference('System.Windows.Forms')
clr.AddReference('Ezlib')
from EZLib import *
from System.Drawing import *
from System.Windows.Forms import *
class MyForm(Form):
def __init__(self):
# Create child controls and initialize form
pass
Applicati... | zarlo/Ezlib-IronPython | src/EzLib-IronPython/EzLib_IronPython.py | EzLib_IronPython.py | py | 694 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "clr.AddReference",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "clr.AddReference",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "clr.AddReference",
"line_number": 4,
"usage_type": "call"
}
] |
70551984694 | # -*- coding: utf-8 -*-
from openerp.osv import osv, fields
from openerp.tools.translate import _
import openerp.addons.decimal_precision as dp
import time
import logging
_logger = logging.getLogger(__name__)
#----------------------------------------------------------
# 852 Recon
#------------------------------------... | jma134/descapple | sam_modules/vmi/models/vmi.py | vmi.py | py | 10,588 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "openerp.osv.osv.osv",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "openerp.osv.osv",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "openerp.osv... |
11615070696 | from typing import Mapping, Sequence
from json_stream.select_tokenizer import default_tokenizer
from json_stream.tests import JSONLoadTestCase
class TestCollectionABCs(JSONLoadTestCase):
def test_isinstance_sequence(self):
for persistent in (True, False):
with self.subTest(persistent=persist... | daggaz/json-stream | src/json_stream/tests/test_collection_abcs.py | test_collection_abcs.py | py | 672 | python | en | code | 95 | github-code | 21 | [
{
"api_name": "json_stream.tests.JSONLoadTestCase",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "typing.Sequence",
"line_number": 12,
"usage_type": "argument"
},
{
"api_name": "json_stream.select_tokenizer.default_tokenizer",
"line_number": 12,
"usage_type": "... |
18170587330 | from django.contrib import admin
from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name = 'home'),
path('signIn/', views.signIn, name = 'signIn'),
path('postSignIn/', views.postSignIn, name = 'postSignIn'),
path('logout/', views.logout, name = 'logout'),
path('si... | JosephCottingham/MP3Wizard-Webapp | mp3wizard/mp3wizard_app/urls.py | urls.py | py | 900 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
74006264051 | import numpy as np
#from numpy.linalg import det,inv
import sympy as sp
a, b, c, d = sp.symbols("a, b, c, d")
x, y, w, z = sp.symbols('x, y, w, z')
d1 = sp.Matrix([[a,b],[c,d]])
d2 = sp.Matrix([[x,y],[w,z]])
print(sp.Matrix.det(d1))
print(d1)
# print(help(np.dot))
| Maciel-Ifac/linear_algebra | aula1/ajuda.py | ajuda.py | py | 271 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sympy.symbols",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sympy.symbols",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sympy.Matrix",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sympy.Matrix",
"line_numbe... |
73817627571 | import psycopg2
from psycopg2 import Error
from config import *
import sys
try:
# Подключиться к существующей базе данных
connection = psycopg2.connect(user=user,
password=password,
host=host,
database=db_nam... | askerbkvv/Tz | python_postgresql_conection/main.py | main.py | py | 4,819 | python | ru | code | 0 | github-code | 21 | [
{
"api_name": "psycopg2.connect",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 67,
"usage_type": "attribute"
},
{
"api_name": "psycopg2.Error",
"line_num... |
72765568052 | from flask import Flask, render_template, request, session, redirect, url_for
from flask_sqlalchemy import SQLAlchemy
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from flask_table import Table, Col
from flask_login import LoginManager
from flask_mail import Mail, Message
import os
... | cvonplessing/plataformashm | app.py | app.py | py | 5,362 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "flask_mail.Mail",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "models.db.init_app",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "models.db",
"line_... |
8179305773 | from utils.nlp_utils import ValueMatch, is_adjective
import torch
import nltk
from collections import OrderedDict, defaultdict
from typing import Any, List, Dict, Tuple
from dataclasses import dataclass
from utils.data_types import *
from utils.data_iter import MetaIndex
from utils.schema_linker import *
from fuzzywuzz... | microsoft/ContextualSP | awakening_latent_grounding/utils/evaluator.py | evaluator.py | py | 34,561 | python | en | code | 348 | github-code | 21 | [
{
"api_name": "torch.Tensor",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "typing.List",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "torch.zeros",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.Tensor",
"line_nu... |
11400521588 | import cv2
# Load the video to process each frame.
video = cv2.VideoCapture('../videos/video1.mp4')
prev_frame = None
while video.isOpened():
success, cur_frame = video.read()
# Break if the video has ended.
if not success:
break
# Keep the previous frame except on first iteration.
if p... | ioannidis/multimedia-systems | exercise-8.17/error_frames.py | error_frames.py | py | 689 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.absdiff",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "cv2.waitKey",
"line_number... |
6095171953 | import pygame,sys
from numpy.lib.type_check import imag
from pygame.locals import *
import numpy as np
from numpy import testing
from pygame import image
from keras.models import load_model
import cv2
from tensorflow.python.keras.backend import constant
WINDOWSIZEX = 640
WINDOWSIZEY = 480
WHITE = (255,255,255)
BLACK =... | yul1492101/digit-recognition-lenet | GUI_lenet.py | GUI_lenet.py | py | 2,442 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "keras.models.load_model",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pygame.init",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pygame.font.SysFont",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pygame.font",... |
21264151720 | import requests
import json
import openpyxl as op
import pandas as pd
from matplotlib import pyplot as plt
import configparser
import os
iii = 1
print(iii)
# ------------------------------窗口输出信息------------------------------
def configprint(vae, did, point):
# 计数循环,窗口递增输出数据流信息
count = 1
pri... | DafuWang/Pyson-program-used-to-obtain-datas-Onenet | main.py | main.py | py | 6,579 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": ... |
16656773697 |
import asyncio
from dataclasses import dataclass
from pathlib import Path
from lib.option import Option
from lib.trigger import Trigger
@dataclass
class PreData:
"""事前データモジュール
"""
loop: asyncio.AbstractEventLoop = asyncio.new_event_loop()
option: Option = Option()
deliverable: asyncio.Event = a... | todo-tamagawa/asyncer | lib/predata.py | predata.py | py | 972 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "asyncio.AbstractEventLoop",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "asyncio.new_event_loop",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "lib.option.Option",
"line_number": 16,
"usage_type": "name"
},
{
"api_name"... |
3828946312 | import numpy as np
import cv2
import imutils
from imutils.video import FPS
# this allows for the video feature to start
cap = cv2.VideoCapture(0)
fps = FPS().start()
while True:
# capture frame by frame
ret, frame = cap.read()
# flipping the frame for mirror effect
frame = cv2.flip(frame, 1)
# operation on th... | daVincere/cv_green_screen_effect | basics/open_camera_with_fps.py | open_camera_with_fps.py | py | 706 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "imutils.video.FPS",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.flip",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_numb... |
16766391020 | from dotenv import load_dotenv
from pathlib import Path
# Load environment variables from .env file in root of project
env_path = Path('.') / '../.env'
load_dotenv(dotenv_path=env_path)
import os
from jsonapi_client import Session, Filter, ResourceTuple, Modifier, Inclusion
import requests
from requests.auth import H... | logcheck/logcheck-api-samples | python/example.py | example.py | py | 1,508 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pathlib.Path",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "dotenv.load_dotenv",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number"... |
265304426 | import logCheck
import importlib
importlib.reload(logCheck)
def event(filename, service):
is_found = logCheck._logs(filename, service)
found = []
for eachFound in is_found:
sp_results = eachFound.split(" ")
found.append(sp_results[6] + " " + sp_results[8] + " " + sp_results[9])
... | Michael-Pinelli/SYS-320 | Week04/homework/events.py | events.py | py | 431 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "importlib.reload",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "logCheck._logs",
"line_number": 7,
"usage_type": "call"
}
] |
32456238523 | """This module provides simple visualization of voice activity detection process using matplotlib"""
import librosa
import matplotlib.pyplot as plt
import numpy as np
from utils.audio_operations import normalize
COLORS = ['#42f5cb',
'#51c9fc',
'#bd7aff',
'#F7728A',
'#59ff6a']
... | MinaevIB/Voice-Activity-Detector | utils/visualize.py | visualize.py | py | 5,435 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "librosa.get_duration",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.rcParams.update",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 43,
"usage_type": "attribute"
},
{... |
71099280692 | """del user public_id
Revision ID: a0c3031a94c7
Revises: 7f069b7d2f1e
Create Date: 2019-06-25 13:41:40.223020
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a0c3031a94c7'
down_revision = '7f069b7d2f1e'
branch_labels = None
depends_on = None
def upgrade():
... | vrcompugo/EV-Manager-Data-API | migrations/versions/a0c3031a94c7_del_user_public_id.py | a0c3031a94c7_del_user_public_id.py | py | 1,002 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "alembic.op.drop_constraint",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "alembic.op.drop_column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "alembic.... |
8606547882 | from bs4 import BeautifulSoup as bsoup
from urllib.error import HTTPError
from urllib.request import Request, urlopen
from urllib.parse import quote
import pandas as pd
from flask import (
Blueprint, g, render_template, request, url_for, Response
)
from werkzeug.exceptions import abort
bp = Blueprint('screen',__na... | arko-chatterjee/CSE-330S-Rapid-Prototype-Dev-and-Creative-Programming | creativeproject/stockWebsite/screen.py | screen.py | py | 6,362 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Blueprint",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "flask.request... |
22970776579 | from odoo import models, _
from datetime import datetime
import time
import pytz
import logging
import xlsxwriter
_logger = logging.getLogger(__name__)
class ReportContractListXlsx(models.AbstractModel):
_name = 'report.vnitpro_contract.report_gen_contract_list_xlsx'
_inherit = 'report.vnitpro_contract.repor... | tu2305/VNITPro_erp | vnitpro_contract/reports/report_contract_list_xlsx.py | report_contract_list_xlsx.py | py | 2,399 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "odoo.models.AbstractModel",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "odoo._",
... |
6116586871 | import FaultyMemory as FyM
import pytest
import torch
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
torch.manual_seed(0)
@pytest.fixture
def simple_handler() -> FyM.Handler:
net = torch.nn.Linear(10, 1)
handler = FyM.Handler(net)
handler(torch.ones((10)))
return handler
def ... | VictorGeebs/FaultyMemory | tests/test_handler.py | test_handler.py | py | 499 | python | en | code | 6 | github-code | 21 | [
{
"api_name": "torch.device",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.manual_seed",... |
38529012881 | from django.urls import path
from RefugiowebApp import views
urlpatterns = [
path('', views.home, name="Home"),
path('servicios/', views.servicios, name="Servicios"),
path('Albergue/', views.albergue, name="Albergue"),
path('contacto/', views.contacto, name="contacto"),
path('Form_Reg/', views.fo... | gersoncux/Proyecto_Refugio | Refugio/RefugiowebApp/urls.py | urls.py | py | 430 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "RefugiowebApp.views.home",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "RefugiowebApp.views",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "djang... |
35286104986 | from sqlalchemy import (
Column, DateTime, ForeignKey, Integer,
String, func, Table
)
from sqlalchemy.orm import (
backref, relationship, declarative_mixin,
declared_attr
)
from datetime import datetime
from book_store import db
@declarative_mixin
class StandartModelMixin:
id = Column(Integer, pri... | evergreenacorn/flask_rest-api_test_task | app/book_store/models.py | models.py | py | 1,586 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sqlalchemy.Column",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integer",
"line_number": 15,
"usage_type": "argument"
},
{
"api_name": "sqlalchemy.orm.declared_attr",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": ... |
18028668225 | import io
import json
import re
from typing import List, Sequence, Tuple, Union, cast
from zipfile import ZipFile, is_zipfile
import requests
from PIL.Image import Image
from pydantic import BaseModel
def pil_image_to_bytes(image: Image) -> bytes:
"""Convert PIL Image into bytes.
Get from https://stackoverf... | letxbe/letxbe | letxbe/utils.py | utils.py | py | 4,111 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "PIL.Image.Image",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "io.BytesIO",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "typing.cast",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "requests.Response",
"line_... |
73583723251 | """
shared memory
"""
from time import sleep
from rllite import SAC
from multiprocessing import Process, Value, Lock
def run(lock, shared_eps_num, shared_eps_reward):
model = SAC(
env_name = 'Pendulum-v0',
load_dir = './ckpt',
log_dir = "./log",
buffer_size = 1e6,
seed = 1,
max_episode_... | IamWangYunKai/ATR | test/SharedMemory.py | SharedMemory.py | py | 2,081 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "rllite.SAC",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Lock",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Value",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "multiprocessing.... |
71553145973 | import pandas as pd
import nltk #natural language
from PIL import Image
from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator
import matplotlib.pyplot as plt
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import TfidfVectorizer
from sklear... | ddanielkwan/classify-app | emailClassifer.py | emailClassifer.py | py | 4,767 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "utils.get_polly_client",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pygame.mixer.init",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pygame.mixer",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "pygame.mixer.mu... |
35033053905 | import pandas as pd
import re
import string
import nltk
from nltk.corpus import stopwords
from nltk.stem import WordNetLemmatizer
from sklearn.model_selection import train_test_split
nltk.download('punkt')
nltk.download('stopwords')
nltk.download('wordnet')
nltk.download('omw-1.4')
lemmatizer = WordNetLemmatizer()
... | ViraMeliana/popularity-prediction-mlp | engine/utils/utilities.py | utilities.py | py | 1,647 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "nltk.download",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "nltk.download",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "nltk.download",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "nltk.download",
"line_n... |
72278995252 | import torch
import numpy as np
import scipy as sp
import scipy.signal
from dynonet.filtering import lfilter_mimo_components
class MimoLinearDynamicalOperatorFun(torch.autograd.Function):
r"""Applies a multi-input-multi-output linear dynamical filtering operation: :math:`y = G(u)`.
Examples::
>>> G ... | forgi86/dynonet | src/dynonet/functional.py | functional.py | py | 7,822 | python | en | code | 33 | github-code | 21 | [
{
"api_name": "torch.autograd",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "numpy.empty_like",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "dynonet.filtering.lfi... |
3606553333 | import os
# make sure the file can be run from every location
filepath = os.path.split(os.path.abspath(__file__))[0]
if filepath != os.getcwd():
os.chdir(filepath)
import time
import logging
import logging.config
import tools
import apilogin
import listinghandler
from bot import UrbanDictBot
def registering(us... | bramappelt/UrbanDict-bot | Scripts/main.py | main.py | py | 3,623 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "os.path.split",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number"... |
18751140268 | #!/usr/bin/env python3
# https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/
import unittest
from typing import List
class Solution:
def findMin(self, nums: List[int]) -> int:
a = 0
z = len(nums) - 1
while a != z:
# For sorted array return the smallest
... | altermarkive/training | algorithms/code/leetcode/lc153_find_minimum_in_rotated_sorted_array/lc153_find_minimum_in_rotated_sorted_array.py | lc153_find_minimum_in_rotated_sorted_array.py | py | 1,299 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "unittest.TestCase",
"line_number": 28,
"usage_type": "attribute"
}
] |
17804147371 | """
Module with auxillary
jit-compiled functions
for lungs' segmentation
from DICOM-scans
"""
import numpy as np
from numba import jit
from skimage import measure, morphology
@jit(nogil=True)
def largest_label_volume(image, background=-1):
""" Determine most frequent color that occupies the largest v... | analysiscenter/radio | radio/preprocessing/segment.py | segment.py | py | 4,006 | python | en | code | 215 | github-code | 21 | [
{
"api_name": "numpy.unique",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.argmax",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "numba.jit",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": ... |
6885055390 | from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
from lxml import html
import csv
import requests
import os
import concurrent.futures
class Crawler:
def __init__(s... | vainikshiv/Assignment | main.py | main.py | py | 2,449 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.dirname",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrom... |
6605615506 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import os
import re
import math
import ctypes
import torch
import torch.nn as nn
from tqdm import tqdm
from torch.nn.utils.rnn import pad_sequence
from torch.utils.data import TensorDataset,DataLoader
from torchtext.datasets import WikiText2
from torchtext.data.utils impo... | WhymustIhaveaname/libtglang | detect_pytorch.py | detect_pytorch.py | py | 5,106 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.manual_seed",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number"... |
72133024694 | """Visualization Functions"""
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import datetime
import matplotlib.dates as mdates
sns.set()
def scenario_temperatures(multi_air_water):
"""Scenario temperatures plot
Parameters
----------
multi_air_water : dict
Dictionar... | kravitsjacob/mocot | preprocessing/src/premocot/viz.py | viz.py | py | 9,118 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "seaborn.set",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "pandas.melt",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "seaborn.FacetGrid",
"line_nu... |
30638328450 | """
Solution for 694. Number of Distinct Islands
https://leetcode.com/problems/number-of-distinct-islands/
"""
from collections import deque
from typing import List
class Solution:
"""
Runtime: 256 ms, faster than 31.91% of Python3 online submissions for Number of Distinct Islands.
Memory Usage: 13.4 MB, less th... | KKosukeee/CodingQuestions | LeetCode/694_number_of_distinct_islands.py | 694_number_of_distinct_islands.py | py | 2,336 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 49,
"usage_type": "name"
},
{
"api_name": "collections.deque",
"line_number": 63,
"usage_type": "call"
}
] |
28857333161 | from BasePlanner import *
from rospy import loginfo
from math import pi as M_PI
import tf
from jutils.jmath import *
def wait_for_sec(tick, last_tick, hz, sec):
if (tick-last_tick)/hz > sec:
return True
return False
class WaypointsPlanner(BasePlanner):
"""
This class implements the traject... | fjctp/crazyflie_mrac_ros | crazyflie_mrac_waypoint_generator/scripts/WaypointsPlanner.py | WaypointsPlanner.py | py | 3,091 | python | en | code | 8 | github-code | 21 | [
{
"api_name": "rospy.loginfo",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "tf.transformations.euler_from_quaternion",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "tf.transformations",
"line_number": 77,
"usage_type": "attribute"
}
] |
20439863174 | import matplotlib.pyplot as plt
def visualise(grid, district):
"""_summary_
Args:
grid (_type_): _description_
district (_type_): _description_
"""
x_house = []
y_house = []
x_battery = []
y_battery = []
cables = []
for battery in grid.batteries:
x_battery.a... | JDeutr/SmartGrid-Team-11 | code/visualisation/visualise.py | visualise.py | py | 1,413 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "mat... |
1118416227 | #!/root/miniconda3/envs/asr/bin/python
import argparse as ap
parser = ap.ArgumentParser()
parser.add_argument("input_path", type=str)
parser.add_argument("output_path", type=str)
args = parser.parse_args()
with open(args.input_path, 'r') as f_in, open(args.output_path, 'w') as f_out:
for line in f_in.readlines(... | minhduc0711/kaldi-exps | vietnamese/local/extract_transcripts.py | extract_transcripts.py | py | 394 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 5,
"usage_type": "call"
}
] |
10599151934 | # -*- coding: utf-8 -*-
"""
Created on Sat Oct 15 17:28:01 2016
@author: Sebasijan Mrak, Greg Starr
smrak@bu.edu
"""
import numpy as np
import math, time, datetime
from gsit import pyRinex
from scipy import signal, interpolate
from pandas import DataFrame
from pymap3d.coordconv3d import ecef2geodetic,ecef2aer,aer2ge... | aldebaran1/gsit | gsit/pyGps.py | pyGps.py | py | 21,378 | python | en | code | 6 | github-code | 21 | [
{
"api_name": "numpy.pi",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "numpy.pi",
"line_number": 65,
"usage_type": "attribute"
},
{
"api_name": "numpy.nan",
"line_number": 88,
"usage_type": "attribute"
},
{
"api_name": "numpy.zeros",
"line_nu... |
29722765260 | # standard library
from datetime import datetime, timedelta
from typing import List, Optional, TypeVar
# pypi/conda library
from boto3 import client
Response = TypeVar("Response")
cw = client("cloudwatch", region_name="eu-west-1")
class CloudWatchMetricsFilter:
cw = client("cloudwatch", region_name="eu-west-1... | benbenbang/cloudwatch-sagemaker-demo | cwatch.py | cwatch.py | py | 6,846 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.TypeVar",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "boto3.client",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "boto3.client",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "typing.Optional",
"line_n... |
17346667063 | import chess
import pwd
import os
from chs.client.ending import GameOver
from chs.utils.core import Colors, Styles
def disjoin(a, b):
result = [a.lower() for a in list(a)]
for c in b:
try:
result.remove(c.lower())
except ValueError:
pass
return ''.join(result)
def flatten(l):
return [ite... | nickzuber/chs | chs/ui/board.py | board.py | py | 14,983 | python | en | code | 179 | github-code | 21 | [
{
"api_name": "chs.utils.core.Styles.PADDING_SMALL",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "chs.utils.core.Styles",
"line_number": 45,
"usage_type": "name"
},
{
"api_name": "chs.utils.core.Colors.WHITE",
"line_number": 45,
"usage_type": "attribute"... |
36676259416 | import uuid
from PySide6 import QtWidgets, QtGui
from PySide6.QtCore import Qt
from randovania.games.game import RandovaniaGame
from randovania.gui.lib.window_manager import WindowManager
from randovania.interface_common.options import Options
from randovania.layout.versioned_preset import VersionedPreset
class Pre... | HighC914/randovania | randovania/gui/lib/preset_tree_widget.py | preset_tree_widget.py | py | 4,763 | python | en | code | null | github-code | 21 | [
{
"api_name": "PySide6.QtWidgets.QTreeWidget",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "PySide6.QtWidgets",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "randovania.games.game.RandovaniaGame",
"line_number": 13,
"usage_type": "name"
},
... |
25790273173 | import os
import logging
import numpy as np
import pandas as pd
import tensorflow as tf
tf.get_logger().setLevel(logging.ERROR)
from pyts.image import GramianAngularField
input_shape_global = None
def set_input_shape_global(input_shape):
global input_shape_global
input_shape_global = input_shape
def pack_... | tritter1612/CycleSense | data_loader.py | data_loader.py | py | 7,531 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "tensorflow.get_logger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "logging.ERROR",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.stack",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "tensorflow.re... |
24796215952 | from lib2to3.fixes.fix_input import context
import logging
#from fnmatch import filter
from django.core.exceptions import ValidationError
from .forms import FolderForm, AntragsForm
from .models import Bankaccoount, Transaktion
from django.contrib.auth.decorators import login_required, user_passes_test
from django.contr... | etiiiR/Project_M183 | Moneyshare/bankaccount/views.py | views.py | py | 4,701 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "django.views.generic.list.ListView",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "models.Bankaccoount",
"line_number": 26,
"usage_type": "name"
},
{
"api_name... |
6873846251 | #!/usr/bin/env python
import rospy
import math
import json
from pyproj import Proj
from R3_functions import quat_rot, fit_in_rad, debug_info
# TF libraries
import tf
import tf2_ros
import tf2_msgs.msg
# ROS messages
from nav_msgs.msg import Odometry
from std_msgs.msg import String
from geometry_msgs.msg import Transf... | DTU-R3/DTU-R3-ROS | waypoint_nav/src/fiducial_waypoint_localization.py | fiducial_waypoint_localization.py | py | 8,146 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "rospy.init_node",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pyproj.Proj",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "tf2_ros.Buffer",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "tf2_ros.TransformListener"... |
27840954235 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#This module contains statistical procedures
from .. import random_effects
from . import stat_dist
from .. import functions as fu
import mpmath as mp
import numpy as np
def var_decomposition(XXNorm=None,X=None):
"""Variance decomposition. Returns the matrix of condit... | espensirnes/paneltime | paneltime/output/stat_functions.py | stat_functions.py | py | 12,376 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.linalg.eig",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "numpy.any",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.round",
"line_... |
840197599 | import time
import pickle
import logging
import angr
import os
import re
from important_global_data import *
def is_bad_name(name):
badwords = ['sub_', 'asan', 'amd', 'ptrace']
goodwords = ['usb', 'deref', 'attach', 'detach', 'urb', 'dev', 'port', 'core', 'interface', 'drive', 'bulk', 'hcd',
... | zenhumany/MODFuzz | static_vulnerability_analysis/gadgets.py | gadgets.py | py | 9,143 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.walk",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "os.walk",
"line_number": 52,
... |
10757641182 | import logging
import settings
import liboidcagent as agent
import requests
logger = logging.getLogger(settings.logName)
def get_token_from_oidc_agent(oidc_agent_account):
"""
Get access token from oidc-agent
:param oidc_agent_account: account name in oidc-agent
:return: access token, or None on erro... | IISAS/ai4eosc_client | auth.py | auth.py | py | 2,553 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "settings.logName",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "liboidcagent.get_access_token",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "s... |
71259970933 | import asyncio
from pyppeteer import launch
width, height = 1366, 768
async def main():
browser = await launch(headless=False,
args=[f'--window-size={width},{height}', ],
ignoreHTTPSErrors=True)
page = await browser.newPage()
# await page.evaluateOnNe... | Bruceey/Spider_Learning | 08、pyppeteer/Demo02_反爬.py | Demo02_反爬.py | py | 573 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pyppeteer.launch",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "asyncio.run",
"line_number": 18,
"usage_type": "call"
}
] |
2370161999 | import pymongo
from pymongo import MongoClient
import datetime
client = MongoClient('localhost', 27017)
db = client.test_database
# a collection is roughly like a Table in relational databese
collection = db.test_collection
post = {"author": "Jaafar", "text": "This is my text", "tags": ["mongodb","test"], "date... | heekof/Forecasting-ANN | mangoDB_test.py | mangoDB_test.py | py | 475 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.utcnow",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 16,
"usage_type": "attribute"
}
] |
23110508621 | from argparse import ArgumentParser
from common.util import load_hyperparams, merge_dict
import numpy as np
import os
import pandas as pd
from text_classification_benchmarks.data_loader import clean_data, load_data, remove_classes_with_too_few_examples
from text_classification_benchmarks.metrics import perf_by_label, p... | markmo/dltemplate | src/text_classification_benchmarks/multinomial_naive_bayes/__init__.py | __init__.py | py | 2,791 | python | en | code | 57 | github-code | 21 | [
{
"api_name": "text_classification_benchmarks.data_loader.load_data",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "text_classification_benchmarks.data_loader.remove_classes_with_too_few_examples",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "text_classif... |
14913430338 | from asyncio.windows_events import NULL
from sqlalchemy.exc import IntegrityError
from fastapi import APIRouter
from repository.componen_user.role_repo import *
from schemas.role import Role, Update_role
role = APIRouter()
@role.get("/all_role", tags=["Role_detail"])
async def getRole():
data = all_role()
if... | argyarijal19/HelpdeskApp | routes/user_detail/role.py | role.py | py | 1,646 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "asyncio.windows_events.NULL",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "asyncio.windows_events.NULL",
"line_number": 30,
"usage_type": "name"
},
{
"api_name... |
23318276245 | from django.core.paginator import Paginator
from banners.view_functions import get_banners
from sliders.view_functions import get_slider
def get_banners_and_slider(context, page_type=None):
get_banners(context, page_type)
get_slider(context, page_type)
def get_extend_paginator(context, obj_list, page_number... | ri-gilfanov/pharmacosphere-site | CMS/core/view_functions.py | view_functions.py | py | 1,294 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "banners.view_functions.get_banners",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sliders.view_functions.get_slider",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.core.paginator.Paginator",
"line_number": 14,
"usage_type": "ca... |
24756888158 | # Filtering non-words and proper nouns from the word list using the PyDictionary library
import json
from PyDictionary import PyDictionary
pyDict = PyDictionary()
fiveLetterWords = []
with open('wordListFiveLetter.json', 'r') as fiveJSON:
fiveLetterWords = json.load(fiveJSON)
fiveLetterWordsFiltered = []
co... | nickmurph/Mordle | generators/generatorPYDICTfiltered.py | generatorPYDICTfiltered.py | py | 934 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "PyDictionary.PyDictionary",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 41,
"usage_type": "call"
}
] |
24202505966 | import sys
import sqlite3
DEFAULT_DB_PATH = 'data/mnemonica.db'
def memdb(func):
def inner(*args, **kwargs):
conn = kwargs.get('conn')
if not conn:
conn = sqlite3.connect(DEFAULT_DB_PATH)
kwargs.update(conn=conn)
ret = func(*args, **kwargs)
conn.comm... | smershon/mnemonica | mnemonica/load_data.py | load_data.py | py | 2,962 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sqlite3.connect",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 108,
"usage_type": "attribute"
}
] |
30391921674 | # -*- coding: utf-8 -*-
import os
from os import listdir
from os.path import isfile
from config import PROJECTS_PATH
from app import app, db
from models import Project
from flask import render_template, redirect, request, Markup
from .forms import NewProjectForm
@app.route('/')
@app.route('/index')
def index():
p... | ClaudioCheli/portfolio | app/views.py | views.py | py | 3,563 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "models.Project.query.all",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "models.Project.query",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "models.Project",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "fla... |
37807406926 | from copy import deepcopy
from re import split, compile
from itertools import zip_longest
command_splitter = compile(f" from | to ")
def parse_input(raw_input: list[str]):
blocks_complete = {}
blocks_intermediate = []
commands = []
parsing_commands = False
for line in raw_input:
if lin... | SanctusAnimus/aoc_2022 | day_5.py | day_5.py | py | 2,467 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "re.compile",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "itertools.zip_longest",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "re.split",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_nu... |
70358116852 | import math
import fileinput
from collections import deque, defaultdict
from pprint import pprint
import sys
def dist(x, y):
return (((x[0] - y[0]) ** 2) + ((x[1] - y[1]) ** 2)) ** 0.5
def angle(a, b):
return math.atan2(a[1] - b[1], a[0] - b[0])
# Read problem input
asteroids = set()
for y, line in enume... | LubosKolouch/adventofcode_2019 | 10/t10.py | t10.py | py | 1,941 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "math.atan2",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "fileinput.input",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pprint.pprint",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "pprint.pprint",
"line_nu... |
2857170448 | #Import libraries
import requests
from bs4 import BeautifulSoup
import pandas
from collections import OrderedDict
"""
This file scraps each players basic info like age, height and nationality
"""
#Fetch Player ID's
player_ids = pandas.read_csv("player_ids.csv")
ids = player_ids["Ids"]
#Base url
base_url = "https://... | pmhalvor/Hello_World_II | Python/FIFA/player_info.py | player_info.py | py | 1,918 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSou... |
28552427044 | import pytest
import numpy as np
import os, sys
import logging
sys.path.append(os.path.join("..","src"))
from imagestack.image1d import Image1D, BasisDecomposition1D
from imagestack.basis_functions import BasisFunctions
from imagestack.statistics import InformationCriteria
from imagestack.mask import Mask1D
def test_i... | Gjjring/image_stack | tests/test_line.py | test_line.py | py | 3,904 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.path.append",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": ... |
28299644973 | import boto3
from typing import List, Optional
from dynamodb_encryption.utils import Parser
from dynamodb_encryption_sdk.encrypted import CryptoConfig
from dynamodb_encryption_sdk.identifiers import CryptoAction
from dynamodb_encryption_sdk.delegated_keys.jce import JceNameLocalDelegatedKey
from dynamodb_encryption_sdk... | GoPreki/DynamoDBEncryption | dynamodb_encryption/__init__.py | __init__.py | py | 4,394 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "boto3.client",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "boto3.resource",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "dynamodb_encryption_sdk.structures.TableInfo",
"line_number": 19,
"usage_type": "call"
},
{
"api_name... |
37245116313 | from tkinter import *
from tkinter import filedialog
import pandas as pd
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
import urllib
from tkinter import messagebox
def envia_mensagem(diretorio,texto_inserido):
... | Lucas56lima/automa-whats | automacao_interface.py | automacao_interface.py | py | 2,393 | python | pt | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_excel",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "seleni... |
27928061997 | import os
import re
import sys
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
plt.style.use("ggplot")
plt.rcParams['text.latex.preamble'] = [r"\usepackage{amsmath}"]
datasets = ["amazon-photo", "pubmed",
"amazon-computers", "coauthor-physics", "flickr"]
modes = ["cluster", "graphsa... | AugF/pyg-gnns | paper_exp6_sampling_acc/handle_sampling_relative_size_acc.py | handle_sampling_relative_size_acc.py | py | 4,000 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 8,
"usage_type": "name"
},
{
"api_name"... |
72278977652 | import torch
import pandas as pd
import numpy as np
import os
from dynonet.lti import MimoLinearDynamicalOperator
from dynonet.static import MimoChannelWiseNonLinearity
import matplotlib.pyplot as plt
import time
import torch.nn as nn
if __name__ == '__main__':
# Set seed for reproducibility
np.random.seed(0... | forgi86/dynonet | examples/RLC/RLC_SIMO_WH.py | RLC_SIMO_WH.py | py | 3,248 | python | en | code | 33 | github-code | 21 | [
{
"api_name": "numpy.random.seed",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "torch.manual_seed",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv... |
6037479523 | from selenium import webdriver
from selenium.webdriver.chrome.options import Options
class AutomateCourse:
def __init__(self):
chrome_options = Options()
chrome_options.add_argument('--lang=pt-BR')
self.driver = webdriver.Chrome(executable_path="chromedriver.exe", options=chrome_op... | franssa01/Courses | DevAprender/Mestre da Automação/02 Mestre da Web/Exercise/base code.py | base code.py | py | 425 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 9,
"usage_type": "name"
}
] |
16291081551 | import sys
"""
Aqui deve conter a parte envolvida com o usuário de python, Provavelmente é bom criar um servidor de distribuição das falas (API)
Flask - API rest
ou
Servidor Websocket -- Vou implementar esse <-
"""
"""
Funcionamento:
- O funcionamento vai ser dado de acordo com que os us... | wesbdss/AIDA-Core-Main | database/states/1/server.py | server.py | py | 1,432 | python | pt | code | 0 | github-code | 21 | [
{
"api_name": "libs.componenteServer.ComponenteServer",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "websockets.serve",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "asyncio.get_event_loop",
"line_number": 46,
"usage_type": "call"
},
{
"ap... |
74319871094 | from sklearn.linear_model import LinearRegression
BASE = '-1'
def linear_regression(stats, bm, comparison_stats=None):
x = [[s['mean']] for s in stats[BASE]]
print('Linear regression results for %s' % bm)
for k in stats.keys():
if k == BASE:
continue
y = []
for idx, du... | bogdanp05/Benchmark | viewer/statistics.py | statistics.py | py | 1,079 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "sklearn.linear_model.LinearRegression",
"line_number": 15,
"usage_type": "call"
}
] |
18345687416 | import os
import math
import pandas as pd
import numpy as np
import sympy as sp
from geopy.distance import geodesic
from settings import *
# 基準点の角度とΔdの関係を求める
# 基準ポイントA(N37.5.0 E125)の角度データ作成 => E127.5 -> E125 に変更(2022/06/16)
# 距離10 右側(-90°~+90°)
def makeAngleFileA() :
# 平均距離の設定
r = 10
ang = 0
# 右側180°... | il-piccola/Technopro | Technopro/angle.py | angle.py | py | 8,100 | python | ja | code | 0 | github-code | 21 | [
{
"api_name": "pandas.DataFrame",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "math.sin",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "math.radians",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "math.cos",
"line_number": ... |
13078584025 | from nose.tools import assert_equals
from .. import pages
from crawler import subs_filename
class Test_subs_filename:
def test_should_be_the_filename_with_extension_changed(self):
assert_equals('foo.srt', subs_filename('foo.avi'))
def test_should_not_be_confused(self):
assert_equals('i.miei.avi... | andreafrancia/subs-crawler | tests/unit/test_functions.py | test_functions.py | py | 1,520 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "nose.tools.assert_equals",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "crawler.subs_filename",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "nose.tools.assert_equals",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "... |
70537491253 | import torch
import torch.nn as nn
from collections.abc import Callable
from typing import Optional
class Inspector:
"""Inspector class for capturing modules' parameters, gradients, activations and activation gradients."""
def __init__(self, model: nn.Module, modules_to_track: Optional[list[nn.Module]] = ... | chcomin/torchtrainer | torchtrainer/inspector.py | inspector.py | py | 13,896 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "torch.nn.Module",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "collections.abc.Callable",... |
31136858084 | # !/usr/bin/python
# -*- coding: UTF-8 -*-
"""
print tmake verson
"""
import json
import shutil
import core
from core.utils.tmake_cmake import *
class CommandBuild(core.Command):
"""
help command
"""
def help(self):
"""tmake build help"""
return "<usage>: tmake build [[no-test|nt] | ... | tomken/tmake | core/cmd/tmake_build.py | tmake_build.py | py | 8,889 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "core.Command",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "core.get_archs",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "core.SkipException",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "core.v",
... |
26588705521 | from django.forms import (
ModelForm,
inlineformset_factory,
modelform_factory,
)
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render
from django.urls import reverse, reverse_lazy
from django.views.generic.edit import CreateView, DeleteView, UpdateView
from django.... | phhai-hcmut/database-lab | edit/views.py | views.py | py | 3,736 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "django.contrib.auth.mixins.LoginRequiredMixin",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "django.views.generic.edit.CreateView",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "music.models.Recording",
"line_number": 18,
"usage_typ... |
26319398868 | """
Pygame base template for opening a window
Sample Python/Pygame Programs
Simpson College Computer Science
http://programarcadegames.com/
http://simpson.edu/computer-science/
Explanation video: http://youtu.be/vRB_983kUMc
"""
import pygame
import numpy as np
# Define some colors
BLACK = (0, 0, 0)
WHITE = (25... | elisgitpage/ConwaysGameOfLife | Basic_Game.py | Basic_Game.py | py | 6,789 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pygame.init",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.random.rand",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.set_mo... |
71235134133 | from azure.iot.device.iothub.aio.async_clients import IoTHubDeviceClient
from azure.iot.percept import AudioDevice, VisionDevice, InferenceResult
import time
import os
import sys
import asyncio
from six.moves import input
import json
import threading
from azure.storage.blob import BlobClient, BlobServiceClient
from azu... | christian-vorhemus/azure-percept-iot-edge | modules/audioclassifier/main.py | main.py | py | 9,364 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "azure.iot.percept.AudioDevice",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "azure.iot.percept.VisionDevice",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line_number": 30,
"usage_type": "call"
},
{
"api_name":... |
42364912611 | import os
import subprocess
from flask import render_template,Blueprint, send_file
from flask_login import login_required, current_user
ui = Blueprint('ui',__name__)
@ui.route('/', defaults={'base_path': ''})
@ui.route('/<path:base_path>')
@login_required
def browse(base_path):
# Set Home Directory
HOME_DIR ... | sachin646/Flask-App-1 | project/ui/views.py | views.py | py | 1,447 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "flask.Blueprint",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_n... |
24454812007 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | source-foundry/code-corpora | python/ansible/block.py | block.py | py | 13,215 | python | en | code | 30 | github-code | 21 | [
{
"api_name": "ansible.playbook.base.Base",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "ansible.playbook.become.Become",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "ansible.playbook.conditional.Conditional",
"line_number": 31,
"usage_type": "na... |
41934854162 | # Adapted and extended from https://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html
from __future__ import print_function
#%matplotlib inline
import click
from numpy.random.mtrand import beta
import wandb
import argparse
import os
import random
from PIL import Image
import torch
import torch.nn as nn
import ... | taptoi/mini-gans | dcgan.py | dcgan.py | py | 13,633 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.nn.init.normal_",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "torch.nn.init",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "torch.nn.init.norma... |
38180972605 | from copy import deepcopy
import traceback
from multiprocessing_utils import *
# Do not import DGL and SAR - these modules should be
# independently loaded inside each process
@pytest.mark.parametrize("backend", ["ccl", "gloo"])
@pytest.mark.parametrize('world_size', [2, 4, 8])
@sar_test
def test_sync_params(world_si... | IntelLabs/SAR | tests/test_comm.py | test_comm.py | py | 5,903 | python | en | code | 26 | github-code | 21 | [
{
"api_name": "tests.base_utils.initialize_worker",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "models.GNNModel",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "sar.... |
4340119114 | import pandas as pd
import torch
import torch.nn
import torch.optim
from debug import ptf_tensor
url = 'C:/Users/HUAWEI/Desktop/深度学习/Blog附带代码/FB.csv'
df = pd.read_csv(url, index_col=0)
#数据集的处理
'''
因为数据是日期新的占index靠前
'''
train_start, train_end=sum(df.index>='2017'),sum(df.index>='2013')
test_start, test_end=sum(df.i... | bi-xw/Blog- | Demo_StockData_predition.py | Demo_StockData_predition.py | py | 2,127 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torch.nn.Linear",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.BCEWithLogitsL... |
19294036243 | #-*- coding: utf-8 -*-
import posixpath
import tornado.web
from my_project.config import global_config
from my_project.controller import PortalController, ErrorController
# 静态文件对应各自的网络访问路径
statics_urls = []
statics_urls.append(
(r'/static/(.*)', tornado.web.StaticFileHandler, {
'path': posixpath.join(glo... | leafcoder/tornado-mvc | my_project/urls.py | urls.py | py | 853 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "tornado.web.web",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "tornado.web",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "posixpath.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "my_project.config.glo... |
2701037557 | #!/usr/bin/env python
import numpy
import scipy.linalg
from pyscf import gto
from pyscf import scf
from pyscf import ao2mo
from pyscf import cc
# 1D anti-PBC Hubbard model at half filling
mol = gto.M(verbose=4)
mol.nelectron = 6
n = 12
h1 = numpy.zeros((n,n))
for i in range(n-1):
h1[i,i+1] = h1[i+1,i] = -1.0
h1[... | sunchong137/pyscf_2017 | examples/cc/40-ccsd_with_given_hamiltonian.py | 40-ccsd_with_given_hamiltonian.py | py | 614 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pyscf.gto.M",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pyscf.gto",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "numpy.zeros",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 19... |
6533203395 | # -*- coding: utf-8 -*-
"""
Created on Sun Jun 12 19:12:29 2022
@author: mcxru
"""
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 12 18:33:52 2022
@author: mcxru
"""
import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QVBoxLayout
from matplotlib.backends.backend_qt5agg import Fi... | Peach0720/E.T | 그래프/widget.py | widget.py | py | 1,612 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "PyQt5.QtWidgets.QMainWindow",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "matplotlib.backends.backend_qt5agg.FigureCanvas",
"line_number": 31,
"usage_type": "c... |
10498962708 | from tkinter import *
from PIL import ImageTk,Image
import random
# main
window = Tk()
window.geometry("400x360")
#window.configure(bg = "#F0F8FF")
window.title("Guess Game")
my_list = ["__","__","__"]
values = [".", "X", "."]
num = [1, 2, 3]
def myClick():
global myLabel
random.shuffle(values)
dic_list = d... | busecalisir/Tkinter_Guess_Game | main.py | main.py | py | 2,980 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "random.shuffle",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 76,
"usage_type": "name"
},
{
"api_name": "PIL.ImageTk.PhotoImage",
... |
31230367772 | from multiprocessing import Pool
from multiprocessing_logging import install_mp_handler
import MySQLdb
import json
from kafka import KafkaConsumer
from persistence import Persistence
import logging
class HackathonPersistence(Persistence):
'''Hackathon data persistence'''
def __init__(self, consumer_id):
'''Initi... | lindayi/hack-the-hack | hackathon_persistence.py | hackathon_persistence.py | py | 1,671 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "persistence.Persistence",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "persistence.Persistence.__init__",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "persistence.Persistence",
"line_number": 15,
"usage_type": "name"
},
{
"a... |
70349905653 | from flask import Flask, request, Response, render_template, session, jsonify
from flask_pymongo import PyMongo #mongodb implementation for flask
from bson import json_util
from bson.objectid import ObjectId
from datetime import timedelta
import bcrypt
from User import User
app = Flask(__name__)
app.config["MONGO_URI"... | asugar13/Real-Estate-API | server.py | server.py | py | 12,799 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask_pymongo.PyMongo",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask.request.met... |
9096289191 | from concurrent.futures import ThreadPoolExecutor
import time
import socket
from importlib import import_module
import sys
sys.path.append('.')
from models.bert import Config
import numpy as np
import json
import torch
from hashlib import sha256
import random
import math
OP = "OP"
DATA = "data"
UTF = "UTF-8"
config ... | primihub/hackathon | winning-project/PPT/src/mpct/mpct.py | mpct.py | py | 16,243 | python | en | code | 18 | github-code | 21 | [
{
"api_name": "sys.path.append",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "models.bert.Config",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_... |
38418709602 | import tweepy
import math
import datetime
from datetime import datetime
import pymongo
import requests
my_client = pymongo.MongoClient("mongodb://127.0.0.1:27017/")
my_data_base = my_client["test"]
my_collection = my_data_base["twitterdata"]
consumer_key="iFYKkZ1aUiKdF3oC1YltJQe0j"
consumer_secret="CFUErvTP8GMoABu0a... | phani8179/Most_popular_sports | twitter_data.py | twitter_data.py | py | 1,029 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "tweepy.Stream",
"line_number": 18,
"usage_type": "attribute"
}
] |
1008005351 | from magic import Spell
from common import *
import libsigma
import random
from durations import Cooldown
class Heal(Spell):
def cast(self,speaker,target):
target= speaker if not target else target
intel=speaker.effective_stat("intelligence",self.applicable_bonuses())
disc=int(speaker.effe... | festivecasual/sigma-mud | spells/heal.py | heal.py | py | 901 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "magic.Spell",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "random.randint",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "libsigma.report",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "libsigma.SELF",
"line_n... |
36954510145 | import functools
import operator
from collections import defaultdict
from dataclasses import dataclass
from typing import cast, Union
from funcparserlib.lexer import make_tokenizer, Token
from funcparserlib.parser import (
tok,
oneplus,
forward_decl,
finished,
many,
Parser,
NoParseError,
)
... | vlasovskikh/advent-of-code-2020 | aoc20/p19.py | p19.py | py | 4,175 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "dataclasses.dataclass",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "funcparserli... |
38356274526 | from functools import cache
from itertools import product
@cache
def play(state=((5, 0), (10, 0), 0)):
all_wins = (0, 0)
for (a,b,c) in product(range(1,4), range(1,4), range(1,4)):
sum = a + b + c
turn = state[2]
pos, score = state[turn]
new_pos = (pos - 1 + sum) % 10 + 1
... | deepakjois/advent-of-code-2021 | day21/day21_2.py | day21_2.py | py | 876 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "itertools.product",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "functools.cache",
"line_number": 4,
"usage_type": "name"
}
] |
40134692796 | import tkinter as tk
from itertools import chain
from .kinds import Kinds
from .item import AutoCompleteItem
from ...utils import Toplevel
class AutoComplete(Toplevel):
def __init__(self, master, items=None, active=False, *args, **kwargs):
super().__init__(master, *args, **kwargs)
self.autocompl... | billyeatcookies/cupcake | cupcake/texteditor/autocomplete/__init__.py | __init__.py | py | 4,574 | python | en | code | 27 | github-code | 21 | [
{
"api_name": "utils.Toplevel",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "kinds.Kinds",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "itertools.chain",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "item.AutoCompleteItem",
... |
23647564349 | import os
import sys
from torch.utils.data import Dataset, DataLoader
import numpy as np
from torchvision import transforms
import torch
import torch
import numpy
import os
import pickle
import numpy as np
from torch.utils.data import Dataset,DataLoader
import argparse
import time
import torch.nn as nn
i... | harrywuhust2022/Reg_IBP_ICCV2021 | tiny.py | tiny.py | py | 21,881 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "torch.device",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "torch.cu... |
32684640956 | ########################################################################
# File name: get_vcard.py
# This file is part of: aioxmpp
#
# LICENSE
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Founda... | horazont/aioxmpp | examples/get_vcard.py | get_vcard.py | py | 2,428 | python | en | code | 215 | github-code | 21 | [
{
"api_name": "framework.Example",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "aioxmpp.JID.fromstr",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "aioxmpp.JID",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "aioxmpp.JID.fr... |
5425800247 | import tensorflow as tf
import eagerpy as ep
import numpy as np
import cv2
from foolbox import TensorFlowModel, utils
from PIL import Image
from tensorflow.keras.preprocessing import image
from os import path
import sys
import config
def main() -> None:
# Same as preprocessing input of VGG16... If switching model... | StefanoSamele-PoliMi/Trust-No-Pixel | 1_foolbox_attack.py | 1_foolbox_attack.py | py | 4,670 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "config.FOOLBOX_PREP",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "config.FOOLBOX_BOUNDS",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "config.MODEL",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "fool... |
70243955893 | # encoding:utf-8
import csv
import numpy as np
import matplotlib.pyplot as plt
from scipy.spatial import ConvexHull
from scipy.interpolate import interp1d
from sklearn.cluster import DBSCAN
from sklearn import metrics
from matplotlib.patches import Polygon
def chaikins_corner_cutting(coords, refinements=5):
coor... | Flowerowl/boundary | boundary.py | boundary.py | py | 1,964 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.array",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.empty_like",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "scipy.spatial.ConvexHull",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "matplotlib.pypl... |
10105916048 | import itertools
from collections import defaultdict
temporals = {}
def is_temporal(entity):
if entity not in temporals:
temporals[entity.__class__] = hasattr(entity, 'Temporal')
return temporals[entity.__class__]
def temporals_from(collection):
yield from [item for item in collection if is_te... | fernandocandrade/Plataforma-Domain | Platform.App/python-template/core/temporal/listeners.py | listeners.py | py | 1,465 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "itertools.chain",
"line_number": 32,
"usage_type": "call"
}
] |
11990559810 | import json
import random
import os
from pprint import pprint
from tatk.nlg import NLG
def read_json(filename):
with open(filename, 'r') as f:
return json.load(f)
# supported slot
slot2word = {
'Fee': 'fee',
'Addr': 'address',
'Area': 'area',
'Stars': 'stars',
'Internet': 'Internet',... | thu-coai/tatk | tatk/nlg/template/multiwoz/nlg.py | nlg.py | py | 8,234 | python | en | code | 83 | github-code | 21 | [
{
"api_name": "json.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tatk.nlg.NLG",
"line_number": 46,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6... |
2920232030 | import time
from telegram import Update
from telegram.ext import ContextTypes
from telegram_bot.responders.main_responder import Responder
async def start_callback(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
user_id = update.message.from_user.id
if context.user_data:
if len(c... | chemradio/cta-gfx-helper | bot_engine/telegram_bot/callbacks/commands/start_callback.py | start_callback.py | py | 673 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "telegram.Update",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "telegram.ext.ContextTypes.DEFAULT_TYPE",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "telegram.ext.ContextTypes",
"line_number": 7,
"usage_type": "name"
},
{
... |
28618232607 | # -*- coding: utf-8 -*-
import rospy
import casadi as ca
import casadi.tools as ca_tools
import numpy as np
import time
from geometry_msgs.msg import Twist
import math
from sensor_msgs.msg import PointCloud
from geometry_msgs.msg import Point32
from geometry_msgs.msg import PoseWithCovarianceStamped
from geometry_msgs... | Shenyii/my_navigation | scripts/generate_path_in_gallerys.py | generate_path_in_gallerys.py | py | 9,610 | python | en | code | 10 | github-code | 21 | [
{
"api_name": "numpy.array",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "casadi.SX.sym",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "casadi.SX",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "casadi.SX.sym",
"line_nu... |
71419220852 | """
https://flask.palletsprojects.com/en/1.1.x/api/?highlight=route#flask.views.MethodView
https://flask.palletsprojects.com/en/1.1.x/api/#flask.request
https://werkzeug.palletsprojects.com/en/0.16.x/datastructures/#werkzeug.datastructures.FileStorage
https://api.mongodb.com/python/current/api/pymongo/collection.html#p... | asyncins/sailboat | handler/timers.py | timers.py | py | 11,666 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "components.storage.FileStorages",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "flask.views.MethodView",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "components.enums.Role.Developer",
"line_number": 28,
"usage_type": "attribute"
}... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.