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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
37441789871 | import unittest
import pickle
from array import array
from floodberry.floodberry_ed25519 import GE25519
from ddh_tdf import TDFError, TDFVector, KG, DDH_TDF_IndexKey, DDH_TDF_TrapdoorKey, DDH_TDF_CipherText as CipherText
from utils import deserialize, serialize
TEST_DIR = "tests/"
PACK_TEST_IK_FILE = TEST_DIR + "tdf... | solar464/TDF_deterministic_encryption | tests/test_ddh_tdf.py | test_ddh_tdf.py | py | 1,844 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "utils.deserialize",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "utils.deserialize",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "utils.deserialize",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "utils.deseriali... |
69991925758 |
import json
from User import *
class UserList:
class UserExists(Exception):
def __init__(self): return ;
class UserNotExists(Exception):
def __init__(self): return;
userList:[User] = []
def add(self,chat_id:int , token:str ):
for user in self.userList:
if user.c... | kirill-kovalev/VK-feed-bot | bot/UserList.py | UserList.py | py | 2,035 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "json.dumps",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 46,
"usage_type": "call"
}
] |
24896253867 | # Import Dependencies
# YOUR CODE HERE
import numpy as np
import datetime as dt
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func, inspect
import dateutil.parser
##Database Setup##
engine = create_engine("sqlite:///hawaii.sql... | yperez0914/sqlalchemy-challenge | app.py | app.py | py | 5,457 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sqlalchemy.create_engine",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.ext.automap.automap_base",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 24,
"usage_type": "call"
},
{
"api_name... |
30083071518 | # We import the necessary packages
from functions_global import *
import numpy as np
import pandas as pd
from scipy.optimize import differential_evolution
# Do we carry out the parameter fiting in log scale?
logscale = False
if logscale:
costfn = rmse_log
costfn_adj = rmse_adj_log
else:
costfn = rmse
c... | cparrarojas/adjuvanted-vaccine | code/model-A/bootstrap_adj.py | bootstrap_adj.py | py | 4,164 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.column_stack",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "numpy.column_stack",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "numpy.column_st... |
37432832170 | from flask import Flask, render_template, url_for, request, redirect
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import update
from datetime import datetime
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db'
db = SQLAlchemy(app)
# il
class Post(db.Model):
id = db.Colum... | ashanpw/Study-Bubble | r.py | r.py | py | 3,246 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "datetime.... |
22408579528 | #!/usr/bin/env python
# ---------------------------------------------------------------
# Imports
# ---------------------------------------------------------------
# General Imports
from re import sub
from datetime import date
from os.path import splitext
from typeguard import check_argumen... | islam-thea/thea-manager-backend | src/backend/server/main/services/document_manager.py | document_manager.py | py | 15,686 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "models.s3.S3",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "models.dynamodb.Dynamo",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "typeguard.check... |
74825275840 | import numpy, statistics,time, config,math
from datetime import datetime
import pandas as pd
import pandas_ta as ta
def CalcoloSMA(df,period):
try:
sma = list(df.rolling(period).mean())
#print("SMA: {}".format(sma[-15:]))
return sma[-15:]
except Exception as e:
... | jakydibe/accrocchio | indicatori_func.py | indicatori_func.py | py | 15,886 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas_ta.supertrend",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pandas_ta.atr",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "pandas_ta.rsi",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "config.I_SMOOTHING",... |
40861853177 | import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Flatten
from tensorflow.keras.optimizers import SGD
from tensorflow.keras.losses import CategoricalCrossentropy
import matplotlib.pyplot as plt
import numpy as np
from tensorflow.keras.regul... | wuyiqiang915/Deep-Learning-notes | Dropout和正则化.py | Dropout和正则化.py | py | 2,173 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "tensorflow.keras",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras.utils.to_categorical",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras",
"line_number": 13,
"usage_type": "attribute"
},
{
... |
18374192847 | import random
from typing import Callable, Optional
from functools import partial
import telebot
from telebot.types import (
Message, CallbackQuery
)
from settings import BOT_TOKEN
from keyboards import * # Import everything
bot = telebot.TeleBot(BOT_TOKEN)
data = {}
def get_user_int_input(message: Message,... | KeSHaMI/telegram_number_guesser | bot.py | bot.py | py | 3,172 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "telebot.TeleBot",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "settings.BOT_TOKEN",
"line_number": 15,
"usage_type": "argument"
},
{
"api_name": "telebot.types.Message",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "typing.C... |
35625722371 | import os
import datetime
print(datetime.datetime.now())
print("train, test, layers, units, rounds, accuracy")
training_file = ["pendigits_training.txt","satellite_training.txt","yeast_training.txt"]
test_file = ["pendigits_test.txt","satellite_test.txt","yeast_test.txt"]
layers = 0
units_per_layer = 0
rounds = 0
count... | jaksiks/cse-4309-machine-learning | hw/hw4/wrapper.py | wrapper.py | py | 719 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.datetime.now",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "os.system",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "datetime.datetim... |
5989898266 | import requests
from datetime import datetime
from requests.exceptions import HTTPError
ID = input("Введите ID:")
token = 'e6c870a0e6c870a0e6c870a0e6e6a15244ee6c8e6c870a0ba496cb35b9f3a17905352b0'
API_VK = '5.71'
sleep = (3, 5)
URL_users = 'https://api.vk.com/method/users.get'
URL_friends = 'https://api.vk.com/method/... | RamilRamizugly/Coursera | req/friends.py | friends.py | py | 2,065 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "requests.exceptions.HTTPError",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "datetime.date... |
3617719113 | from os.path import join as pjoin
import matplotlib.pyplot as plt
import numpy as np
import obspy
from matplotlib.patches import Rectangle
from obspy import UTCDateTime as utct
from tqdm import tqdm
from mqs_reports.catalog import Catalog
from mqs_reports.event import EVENT_TYPES_PRINT
from mqs_reports.utils import c... | sstaehler/mqs_reports | mqs_reports/noise.py | noise.py | py | 38,511 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "obspy.UTCDateTime",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "obspy.UTCDateTime",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "obspy.Inventory",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "nu... |
74580936317 | from django.conf.urls import url,include
from blog.admin_views import PostView, DeletePost, NewPost, UpdatePostIndexView, AddPost, \
UpdateDraft, UpdatePost, UpdateEditor, LogoutView, CarouselIndexView, CarouselEditView, \
AddCarousel, DeleteCarousel, CarouselUpdateView, UpdateCarousel, markdown_image_upload_h... | zer0Black/zer0Blog | blog/admin_urls.py | admin_urls.py | py | 1,825 | python | en | code | 81 | github-code | 97 | [
{
"api_name": "django.conf.urls.url",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.include",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "blog... |
30493339562 | import sys, os
import pickle as pkl
import numpy as np
import matplotlib.pyplot as plt
from skimage.io import imread, imsave
import torch
import torch.nn as nn
import torchvision.transforms as transform
from torchvision.models import vgg16, vgg19, resnet50, resnet101, densenet121, densenet169
if __name__ == "__main... | jimpei8989/ML2019SPRING | hw5/Report/Prob4.py | Prob4.py | py | 2,338 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "numpy.random.seed",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot... |
73337462719 | '''
Adapted from: https://medium.com/@andrewdoesdata/deep-learning-with-15-lines-of-python-397e43bcf843
'''
# conda install -c conda-forge tensorflow
from sklearn import datasets
from tensorflow import keras
from tensorflow.keras.layers import Dense
# 1) import data
iris = datasets.load_iris()
# 2) prepare inputs
i... | garretaserra/smartCitiesScript | scripts/07_01_keras_iris.py | 07_01_keras_iris.py | py | 875 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sklearn.datasets.load_iris",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sklearn.datasets",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "tensorflow.keras.utils.to_categorical",
"line_number": 18,
"usage_type": "call"
},
{
... |
16322118328 | import nltk
from nltk.corpus import stopwords
from nltk.stem import WordNetLemmatizer
# Baixe os recursos necessários
nltk.download('stopwords')
nltk.download('wordnet')
# Exemplo de texto
text = "Os gatos estão pulando sobre as cercas e correndo nos jardins"
# Tokenização
tokens = nltk.word_tokenize(tex... | stefaniojr/musicalgraphcliquesnippet | nltk_examples.py | nltk_examples.py | py | 764 | python | pt | code | 0 | github-code | 97 | [
{
"api_name": "nltk.download",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "nltk.download",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "nltk.word_tokenize",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords.wo... |
21180094236 | import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score, classification_report
# Load the dataset
data_url = "https://example.com/diabetes_dataset.csv"
df = pd.read_csv(data_url)
# Data preprocessi... | renanrcrr/patients-diabetes | machineDiabetes.py | machineDiabetes.py | py | 980 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sklearn.ensemble.RandomForestClassifier",
"line_number": 18,
"usage_type": "call"... |
26872405882 | # @ clean-up pycwt vs wavelet calls
import pycwt
import numpy as np
import scipy
from scipy.ndimage.filters import gaussian_filter
import pycwt as wavelet
from pycwt.helpers import find
from tqdm import tqdm
import pandas as pd
import copy
from scipy.signal import butter, filtfilt, freqz
def standardize(
s,
s... | klapo/wavelet-recipes | helper_functions/pycwt_stat_helpers.py | pycwt_stat_helpers.py | py | 27,658 | python | en | code | 8 | github-code | 97 | [
{
"api_name": "scipy.signal.butter",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "scipy.signal.filtfilt",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 79,
"usage_type": "call"
},
{
"api_name": "numpy.polyfit"... |
29865598468 | from typing import Any
import pytest
from app.handlers import get_handler_from_string, get_handler_from_url
from app.handlers.base import ServiceHandler
from app.handlers.exceptions import HandlerNotFoundError
from app.services.ytdlp import AwaitingTranscodingError, FormatNotFoundError
def test_get_handler_from_url... | martokk/tubecast | tests/handlers/test_handlers.py | test_handlers.py | py | 2,859 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "app.handlers.get_handler_from_url",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "app.handlers.get_handler_from_url",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pytest.raises",
"line_number": 24,
"usage_type": "call"
},
{
... |
12449459820 | import cv2
import numpy as np
cap = cv2.VideoCapture('คงจะดีนะ.mp4')
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
vdo_writer = cv2.VideoWriter('out.mp4', fourcc, 30, (426, 240))
n_buffer = 10
buffer = None
iframe = 0
while True:
ret, frame = cap.read()
if not ret:
break
gray = cv2.cvtColor(frame, cv2.C... | Mongkol39541/Python | Computer Vision/Background_Subtraction2.py | Background_Subtraction2.py | py | 852 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.VideoWriter_fourcc",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.VideoWriter",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
... |
40909261661 | # importing the requests library
import requests
def testget(geturl,val):
# defining a params dict for the parameters to be sent to the API
PARAMS = {'ID':val}
# sending get request and saving the response as response object
r = requests.get(url = geturl, params = PARAMS)
# extract... | UCSB-CS-RACELab/jetty-examples | python_client/client.py | client.py | py | 1,091 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 22,
"usage_type": "call"
}
] |
22100235672 | import builtins
from collections import namedtuple
import inspect
from .. import context
AllVars = namedtuple('AllVars', 'nonlocals globals builtins')
def getallvars(obj):
"""
Get the mapping of *all* variables to their current values.
Returns a named tuple of dicts mapping the current nonlocal, global... | bytedance/matxscript | python/matx/script/analysis/module_analysis.py | module_analysis.py | py | 3,945 | python | en | code | 363 | github-code | 97 | [
{
"api_name": "collections.namedtuple",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "inspect.currentframe",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "inspect.isfunction",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "builtin... |
38464611180 | import shortest_path_switch
import simple_switch
from ryu.controller.handler import MAIN_DISPATCHER, set_ev_cls
from ryu.controller import ofp_event
import os
import socket
import json
from ryu.lib import hub
SOCKFILE = '/tmp/hello_sock'
class ShortestRestSwitch(simple_switch.SimpleSwitch13):
def __init__(self, *a... | ray6/sdn | simple_django_switch.py | simple_django_switch.py | py | 1,137 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "simple_switch.SimpleSwitch13",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "os.path",... |
18389899836 | from django.urls import path
from . import views
app_name = 'app'
urlpatterns = [
path('', views.index, name='index'),
path('contacts/', views.contacts, name='contacts'),
path('register/', views.register, name='register'),
path('logout/', views.logout_request, name='logout'),
path('login/', views... | Vir2S/good-news | djangosite/app/urls.py | urls.py | py | 352 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
43346191833 | import argparse
import sys
import warnings
from train_acc import *
from train_auc import *
from train_binary import *
from train_noContent import *
from train_noContentGRL2Spoof import *
from train_auc_no_depth import *
from train_auc_triplet_ours import *
from train_auc_triplet_ssdg import *
from train_au... | homerun-beauty/FaceAntiSpoofing-ICME | main.py | main.py | py | 3,628 | python | en | code | 6 | github-code | 97 | [
{
"api_name": "warnings.warn",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 79,
"usage_type": "call"
}
] |
7961052211 | #!/opt/python/bin/python
#
# Wrapper around mediainfo that enables comparing two files side-by-side
#
# Known issues:
# - It only compares the first video and audio stream it finds, 2nd+ are ignored,
# - It outputs to three columns to provide a side-by-side view, but column widths aren't pretty
# - Column wid... | christoftaylor/mediacompare | mediacompare.py | mediacompare.py | py | 5,677 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "subprocess.Popen",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "subprocess.PIPE",
"line_number": 44,
"usage_type": "attribute"
},
{
"api_name": "subproc... |
7991785539 | import torch
import sys
sys.path.append("..")
import utils
"""
梯度下降的问题
对于多维梯度下降, 可能在某个方向下降较快, 另一个方向下降较慢.
"""
def f_2d(x1, x2):
return 0.1 * x1 ** 2 + 2 * x2 **2
"""
动量法
VdW = βVdW + (1-β)dW # 指数加权平均
Vdb = βVdb + (1-β)db
W := W - αVdW, b := b - αVdb
"""
def momentum_2d(x1, x2, v1, v2):
v1 = gamma * v1 + eta * ... | ygtxr1997/DiveIntoPytorch | Chapter07/7.4-Momentum.py | 7.4-Momentum.py | py | 1,481 | python | zh | code | 0 | github-code | 97 | [
{
"api_name": "sys.path.append",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "utils.show_trace_2d",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "utils.train_2d",
... |
20588337272 | __author__ = 'Robbert Harms'
__date__ = '2023-02-18'
__maintainer__ = 'Robbert Harms'
__email__ = 'robbert@xkls.nl'
__licence__ = 'LGPL v3'
import os
import re
import warnings
from abc import ABCMeta, abstractmethod
from io import BytesIO, IOBase
from itertools import chain
from pathlib import Path
from pprint import ... | robbert-harms/pyschematron | pyschematron/direct_mode/processor/parser.py | parser.py | py | 5,855 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "elementpath.tdop.Parser",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "os.getcwd",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "lxml.etree._Element",
... |
38954597414 | """
Scrapper celery tasks
"""
import requests
from celery import Celery
import config
from libs import advert, page
from logmodule import get_logger
LOGGER = get_logger(__name__)
APP = Celery('tasks', broker=config.RABBIT_URL)
def put_ids_to_queue(ids_list):
"""
Pushes list of advert ids to celery queue
... | dwabece/roksa_scrapper | tasks.py | tasks.py | py | 1,715 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "logmodule.get_logger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "celery.Celery",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "config.RABBIT_URL",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "libs.advert... |
42560539760 | import os
import tensorflow as tf
from BaseModel import BaseModel
from MyVocab import MyVocab
import utils
tf.app.flags.DEFINE_string("model", "idcnn", "model: idcnn")
tf.app.flags.DEFINE_string("mode", "train", "mode: train | eval | infer")
FLAGS = tf.app.flags.FLAGS
vocab = MyVocab.load("myvocab.pkl")
def creat... | TVect/VectorLab | dl/cws/startup.py | startup.py | py | 2,967 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "tensorflow.app.flags.DEFINE_string",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "tensorflow.app",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.app.flags.DEFINE_string",
"line_number": 9,
"usage_type": "call"
},
{... |
42097862365 | import numpy as np
import os
import gzip
import json
import copy
import argparse
import itertools
# For headless
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import seaborn as sns
import sis
import sis_visualizations as visualizations
import lime_helper
from sis import eval_bin_class_model
... | b-carter/SufficientInputSubsets | tf_binding.py | tf_binding.py | py | 66,489 | python | en | code | 14 | github-code | 97 | [
{
"api_name": "matplotlib.use",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number... |
2355979950 | from django.shortcuts import render, redirect
from .forms import ServeursForms
from . import models
from django.http import HttpResponseRedirect
from fpdf import FPDF
from django.http import FileResponse
def ajout(request):
form = ServeursForms
return render(request, "adminsite/serveurs/ajout.html", {... | julesgtz/SAE23_push | adminsite/serveurs_views.py | serveurs_views.py | py | 6,445 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "forms.ServeursForms",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.render",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "forms.ServeursForms",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django... |
5074596126 | import re
import cv2
import configparser
import json
import numpy as np
import threading
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk, GdkPixbuf, Gio
class SettingsWindow(Gtk.Application):
def __init__(self):
super(SettingsWindow, self).__init__(application_id=None, flag... | yvrqqd/phys1_v2 | phys/settings_window.py | settings_window.py | py | 7,559 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "gi.require_version",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "gi.repository.Gtk.Application",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "gi.repository.Gtk",
"line_number": 14,
"usage_type": "name"
},
{
"api_name"... |
12080173966 | import sys
import cv2
from scipy.misc import imread
import matplotlib
matplotlib.use("TkAgg")
from matplotlib import pyplot as plt
class Formatter(object):
def __init__(self, im):
self.im = im
def __call__(self, x, y):
z = self.im.get_array()[int(y), int(x)]
return 'x={:.01f}, y={:.01f... | annahessler/mlthesis | view.py | view.py | py | 786 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "matplotlib.use",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "tkinter.Tk",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "tkinter.filedialog.askopenfilename",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sys.argv"... |
26863052790 | import PySimpleGUI as sg
import sys, yt_dlp, music_tag
errors = 0
currently_downloading = False
def what_is(url):
# Work around to printing errors to the console
global errors
errors = ""
class ignoreErrors:
@staticmethod
def error(msg):
global errors
errors +... | Anonymouseyy/youtubedownloader | main.py | main.py | py | 6,534 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "yt_dlp.YoutubeDL",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "music_tag.load_file",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "music_tag.load_file",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "yt_dlp.Youtu... |
33584765613 | from pyts import datasets
import numpy as np
from sklearn.utils import Bunch
# there are two ways to handle the dataset,the first way is to fetch it from the internet
# the second way is to
def fetch_all_dataset():
dataset_list = datasets.ucr_dataset_list()
for dataset in dataset_list:
datasets.fetch_u... | fengsxy/CNN_Timeseries_Image | dataset_hanle.py | dataset_hanle.py | py | 2,772 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "pyts.datasets.ucr_dataset_list",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pyts.datasets",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "pyts.datasets.fetch_ucr_dataset",
"line_number": 10,
"usage_type": "call"
},
{
"api_na... |
40727272443 | #!/usr/bin/env python3
# coding: utf-8
import os
from lxml import etree
from selenium import webdriver
from LTAF_nightly_2_release import Case
import time
import argparse
from datetime import datetime, timedelta
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from se... | muye0503/Nightly | Flask/iPerf/iPerf_result_filter.py | iPerf_result_filter.py | py | 4,450 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "LTAF_nightly_2_release.Case",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "lxml.etree.HTML",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
"line_number": 55,
"usage_type": "name"
},
{
"api_name": "selenium.webdr... |
29011752120 | from django.conf.urls import patterns,url
from qtl import views
urlpatterns = patterns('',
url(r'^trait/$', views.SearchTraitView, name = 'search_individual_trait'),
url(r'^check/$', views.MultipleTraitView, name = 'search_multiple_trait'),
url(r'^graph/$', views.Graphview, name='display_graph'),
url(r'^godag/$',... | schoothubber/qtl_project | qtl/urls.py | urls.py | py | 493 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "qtl.views.SearchTraitView",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_na... |
26070333954 | # -*- coding: utf-8 -*-
__author__ = "苦叶子"
from selenium import webdriver
from selenium.webdriver import ActionChains
if __name__ == "__main__":
driver = webdriver.Chrome()
action_chains = ActionChains(driver)
driver.get("http://www.python.org")
# 获取About链接元素,并加入动作链
About = driver.find_element... | small99/DevAuto | selenium_python/4/4.2.5_mouse_hold_on.py | 4.2.5_mouse_hold_on.py | py | 597 | python | en | code | 13 | github-code | 97 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.ActionChains",
"line_number": 12,
"usage_type": "call"
}
] |
43346942392 | '''
ECE419/CS460 Security Lab Project
Rishov Dutta (rsdutta2), Daniel Zhang (dzhang54)
This is proof-of-concept code to exploit the TP-Link HS110 Smart plug
by sending arbitrary commands to the plug without authentication nor
through the given app. This code can only be used locally, and can be
used on one or more p... | Rsdutta/TP_Link_Exploit | plug_attacks.py | plug_attacks.py | py | 6,646 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "socket.setdefaulttimeout",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "socket.socket",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "socket.SOC... |
6999428397 | import myLibrary as Lib
import matplotlib.pyplot as plt
def f(x): return 4/(1+x**2)
a = 0
b = 1
Res = Lib.integ_MonteCarlo(f, a, b, 500, 10, 10)
# For plotting:
x = Res[1]
y = Res[2]
plt.plot(x, y)
plt.title("\u03C0 vs Monte Carlo Integration result")
plt.xlabel("Sample size -->")
plt.ylabel("Integration value... | AjaykrishnaA/P346-Computational-Physics-Laboratory | AS6/AS6Q3.py | AS6Q3.py | py | 339 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "myLibrary.integ_MonteCarlo",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "m... |
35971317510 | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 30 23:00:33 2018
@author: taishi-o
"""
import sys
import numpy as np
import cv2
#------------------
# Load images
#------------------
file = "./picture/asobi_asobase11/"
sketchnum = np.arange(678,694,1)
infnum = np.arange(0, 16, 1)
#------------------
# Define function... | ReiiSky/anime_DNN | spreadColor.py | spreadColor.py | py | 2,760 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.arange",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number"... |
74298931839 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from retry import retry
@retry(ZeroDivisionError, tries=3, delay=1, max_delay=5, backoff=2, jitter=(0, 3))
def bar():
"""如果抛了ZeroDivisionError, 重试3次,每次延迟2秒,最大延迟5秒,每次异常,延迟时间乘以2,每次延迟加上0到3中间的随机秒
如果还是抛错,将异常抛出"""
res = 2 / 0
return res
if __name__ == '__m... | danerlt/memo | python/retry/t_retry.py | t_retry.py | py | 486 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "retry.retry",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 20,
"usage_type": "call"
}
] |
22268172372 | #!/usr/bin/python
import time
from datetime import datetime
import argparse
import CHIP_IO.GPIO as GPIO
import socket
def doLog(log_msg):
print("%s: %s" % (datetime.now().strftime("%Y_%d_%m (%a) - %H:%M:%S.%f")[:-3], log_msg))
if __name__ == "__main__":
'''
pd_socketServer.py -p port
'''
parser =... | trafferty/utils | python/pd_socketServer.py | pd_socketServer.py | py | 1,218 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.datetime.now",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "CHIP_... |
35469581366 | """myproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... | anildalar/DjangoTutorialsinHindi | myproject/urls.py | urls.py | py | 1,509 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "... |
17239125907 | from collections import deque
class Graph:
matrix = []
def __init__(self, goalx, goaly):
with open('input.txt') as file:
self.matrix = [[int(digit) for digit in line.split()] for line in file]
self.goalx = goalx
self.goaly = goaly
self.path = False
def ... | MubashirMalik/Maze-Search-Python | main.py | main.py | py | 2,980 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "collections.deque",
"line_number": 60,
"usage_type": "call"
}
] |
69970840960 | from functools import wraps
def cache(func):
@wraps(func)
def wrapper(n):
log_key = n
if log_key not in wrapper.log:
wrapper.log[log_key] = func(n)
return wrapper.log[log_key]
wrapper.log = {}
return wrapper
@cache
def fibonacci(n):
if n < 2:
return n... | ivan-yosifov88/python_oop_june_2021 | decorators/cache.py | cache.py | py | 452 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "functools.wraps",
"line_number": 5,
"usage_type": "call"
}
] |
1593547875 | import asyncio
import httpx
async def log_request(request):
print(f"Request: {request.method} {request.url}")
async def log_response(respose):
request = respose.request
print(f"Response: {request.method} {request.url} - Status {respose.status_code}")
async def get_episode(ep_id: int):
... | diagomike/Yts_main | Movies/test.py | test.py | py | 764 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "httpx.AsyncClient",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "asyncio.gather",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "asyncio.run",
"line_number": 25,
"usage_type": "call"
}
] |
853383651 | from datetime import date
import datetime
def dia_da_semana(date = date.today()):
dias = {0:'segunda', 1:'terça', 2:'quarta', 3:'quinta', 4:'sexta', 5:'sábado', 6:'domingo'}
return (dias[date.weekday()])
def aniverssauro(anos, niver):
today = datetime.datetime.today()
diferenca = today - nive... | emanueljuliano/notas_do_livro_think_python | Capítulo 16 Classes e funções/16.2.py | 16.2.py | py | 1,080 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "datetime.date.today",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "datetime.date.weekday",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "datetime.date",
... |
39209647025 | import wx
import common
import compat
import config
import misc
from edit_windows import ManagedBase, EditStylesMixin
from tree import Tree
from widget_properties import *
from ChoicesProperty import *
class EditComboBox(ManagedBase, EditStylesMixin):
"""\
Class to handle wxComboBox objects
"""
upda... | fengmm521/wxGlade | widgets/combo_box/combo_box.py | combo_box.py | py | 5,606 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "edit_windows.ManagedBase",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "edit_windows.EditStylesMixin",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "edit_windows.ManagedBase.__init__",
"line_number": 24,
"usage_type": "call"
},
... |
70119518720 | from pyrogram import Client, filters, errors
from time import sleep
import re
app = Client("my_account")
def dynamic_data_filter(data):
return filters.create(
lambda flt, _, query: flt.data == query.data,
data=data # "data" kwarg is accessed with "flt.data" above
)
@app.on_message(filters.... | alex-kolokolov/bot | main.py | main.py | py | 2,851 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pyrogram.Client",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pyrogram.filters.create",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pyrogram.filters",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "time.sleep",
... |
1875677761 | import pandas as pd
import matplotlib.pyplot as plt
import tensorflow as tf
from tensorflow import keras
# load data files
UFO_complete_df = pd.read_csv('./data/ufo/complete.csv',
on_bad_lines='skip',
dtype={
'datetime': st... | sangjun-Park1208/USC-DS-Project | stock.py | stock.py | py | 4,255 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
... |
2813530158 | from django.conf import settings
from telegram import ParseMode
from telegram.ext import Updater, Defaults
from tcrb.apps.app_handlers import apps
defaults = Defaults(parse_mode=ParseMode.HTML, )
def start_polling():
updater = Updater(token=settings.BOT_SECRET_KEY, defaults=defaults)
dispatcher = updater.di... | alejandrodp/TECcrBOT | tcrb/network/polling.py | polling.py | py | 571 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "telegram.ext.Defaults",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "telegram.ParseMode.HTML",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "telegram.ParseMode",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "te... |
26785112732 | import numpy as np
from sklearn.externals import joblib
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from util import io
def baseline_crf(train_percentage, sft, future, embed='none'):
"""
news day n results in day n+1 price, shift index by 1 ... | minhtriet/gas_market | util/data_generator.py | data_generator.py | py | 3,679 | python | en | code | 11 | github-code | 97 | [
{
"api_name": "util.io.read_future_market_v2",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "util.io",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "util.io.read_spot_market_v2",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "uti... |
20847160960 | from typing import Any, Callable
class BinaryNode:
value: Any
left_child: 'BinaryNode'
right_child: 'BinaryNode'
def __init__(self, value: Any) -> None:
self.value = value
self.left_child = None
self.right_child = None
def min(self) -> 'BinaryNode':
temp = self
... | nolmo12/algorytmy_i_struktury_danych | lab6/binarynode.py | binarynode.py | py | 813 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.Any",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "typing.Callable",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 1... |
73866565120 | from collections import deque
import sys
input = sys.stdin.readline
def solution() :
n = int(input())
cards = deque([i for i in range(1, n+1)])
while len(cards) != 1 :
cards.popleft()
cards.append(cards.popleft())
print(cards[0])
solution() | tldjfj123/Algorithm_Study | tldjfj123/Week04/BOJ_2164.py | BOJ_2164.py | py | 280 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "sys.stdin",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 7,
"usage_type": "call"
}
] |
34728276543 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
An incomplete sample script.
This is a bot to create list of articles about women from pagegenerator
Use global -simulate option for test purposes. No changes to live wiki
will be done.
The following parameters are supported:
-always The bot won't ask for con... | masti01/pcms | ms-womenarticles.py | ms-womenarticles.py | py | 8,827 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "pywikibot.tools.PYTHON_VERSION",
"line_number": 56,
"usage_type": "name"
},
{
"api_name": "pywikibot.pagegenerators.parameterHelp",
"line_number": 64,
"usage_type": "attribute"
},
{
"api_name": "pywikibot.pagegenerators",
"line_number": 64,
"usage_type": "n... |
36571308477 | """
MIT License
Copyright (c) 2021 armaanbadhan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, p... | Rijul24/StressMeOut | __main__.py | __main__.py | py | 2,739 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "discord.Intents.all",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "discord.Intents",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands.Bot",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "dis... |
24788091706 | from TestDLL import getBitsCount, getPower, numSplit
from random import randint
from time import perf_counter
from Engine import GameState, Move, bbOfRows, bbOfColumns, bbOfCorrections, bbOfCenter, COLORS, CASTLE_SIDES, pieceScores
from multiprocessing import Queue
CHECKMATE = 100000
STALEMATE = 0
DEPTH = 4
R... | Nitroxt5/Chess | AI.py | AI.py | py | 19,580 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "random.randint",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "Engine.Move",
"line_number": 71,
"usage_type": "name"
},
{
"api_name": "Engine.GameState",
"line_number": 75,
"usage_type": "name"
},
{
"api_name": "multiprocessing.Queue",
... |
40146730046 | from bs4 import BeautifulSoup
import requests
with open('simple.html') as html_file:
soup = BeautifulSoup(html_file, 'lxml')
'''Prints html file in proper indentation'''
# print(soup.prettify())
'''Gets Title with header'''
# match = soup.title
'''Prints only text of the title'''
# match = soup.title.text
'''Ge... | manojrout/PythonPractice | webscrapping/scrap_simple_html.py | scrap_simple_html.py | py | 786 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 5,
"usage_type": "call"
}
] |
4356202120 | import os
import networkx as nx
if __name__ == "__main__":
path_to_data = os.path.join("data", "email-Eu-core.txt")
graph = nx.read_edgelist(path_to_data, create_using=nx.DiGraph)
graph.remove_edges_from(list(nx.selfloop_edges(graph)))
conn_comp = list(map(lambda x: (x, len(x)), nx.algorithms.strong... | KernelA/made-hpc-hw4 | generate_graph.py | generate_graph.py | py | 571 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "networkx.read_edgelist",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "networkx.DiGraph",
... |
40518638686 | from selenium import webdriver
# from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.common... | wagolemusa/web_scrapping | selenium/extract.py | extract.py | py | 2,469 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.support.ui.WebDriverWait",
"line_number": 25,
"usage_type": "call"
},
... |
38703684973 | from setuptools import setup, find_packages
import codecs
import os
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
long_description = "\n" + fh.read()
VERSION = '0.0.2'
DESCRIPTION = 'Solver para sistema linear de equações algébricas'
... | rogpaz/Solveq | setup.py | setup.py | py | 1,120 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.abspath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "codecs.open",
"line_num... |
1489759602 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import re
from setuptools import setup, find_packages
if sys.argv[-1] == 'publish':
os.system('python3 setup.py sdist')
os.system('twine upload dist/*')
sys.exit()
def readme():
with open('README.rst') as readme_file:
retur... | MoseleyBioinformaticsLab/ctfile | setup.py | setup.py | py | 2,061 | python | en | code | 7 | github-code | 97 | [
{
"api_name": "sys.argv",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.system",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 13,
... |
36228376563 | from PIL.Image import NONE
import cv2
import os
from sklearn.neighbors import KNeighborsClassifier
import numpy as np
from imutils import contours
import random
listOfCharaters = []
# The following function reads the folder with images.
def load_images_from_folder(folder):
images = []
for filename in os.listd... | PostmaPeterSimon/CaptchaBreaking_DataMining | preprocessing.py | preprocessing.py | py | 4,057 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.listdir",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
... |
5514997546 | import torch
from torch.autograd import Variable
from torch.nn.parameter import Parameter
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.nn.init as init
from DiscriminatorSIMP import DiscriminatorNet
from torch.utils.data import DataLoader
from GeneratorSIMP import Genera... | MJordahn/MNISTGANs | simpleGAN.py | simpleGAN.py | py | 3,907 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "torch.autograd.Variable",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "torch.from_numpy",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.random.normal",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.ra... |
1474493852 | import tensorflow as tf
import numpy as np
import time
import yaml
from tqdm import tqdm
from src.model import VAE, train_step, eval_step, preprocess_images
if __name__ == "__main__":
tf.executing_eagerly()
# load config file for training
config = yaml.safe_load(open('config.yml'))
# training pa... | moseskimc/vae | src/train.py | train.py | py | 4,223 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tensorflow.executing_eagerly",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "yaml.safe_load",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "src.model.VAE",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "tensorflow.... |
23675198387 | from django.db import connection
from django import forms
from django.contrib.auth.views import login_required
from django.shortcuts import redirect, render
from django.urls import reverse_lazy
from django.views.generic import CreateView, DetailView
from django.views.generic.list import ListView
from blog.models impor... | GaboSO21/TechConnect | tech_connect/rooms/views.py | views.py | py | 4,407 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "models.Room.objects.filter",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "models.Room.objects",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "models.Room",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "model... |
17988869260 | import re
import tornado.web
import sqlalchemy
import os
import json
import tensorflow as tf
from .query_handlers import QueryHandler, TokenizeHandler
from .learn_handler import LearnHandler
from .admin_handlers import ReloadHandler, ExactMatcherReload
from .exact import ExactMatcher
from .tokenizer import Tokenizer
... | stanford-oval/genie-parser | genieparser/server/application.py | application.py | py | 5,187 | python | en | code | 16 | github-code | 97 | [
{
"api_name": "tornado.web.web",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "tornado.web",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "query_handlers.QueryHandler",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "learn_ha... |
1350864183 |
import datetime
import sys
import os
import psutil
current = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.abspath(os.path.join(current, "../../../../pylibs/snake")))
from snake import SnakeGame
class Statistics:
def __init__(self, game:SnakeGame):
self.process = psutil.Process()
... | mtricolici/ai-study-2023 | ReinforcementLearning/deep-q-learning/python_sample/ai/stats.py | stats.py | py | 2,435 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"lin... |
23933890306 | # ClimbingAnalysis application
# Written by Andrew Watkins
# watkins(dot)andrewb(at)gmail(dot)com
#
# This dash application gives a basic exploration
# of USA Climbings initial results for regional qualification
# for Virtual Qualifiers in the bouldering season of 2020
import dash
import dash_core_components as dcc
im... | ABWatkins/USACVirtualQEClimbingAnalysis | app.py | app.py | py | 9,596 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "dash.Dash",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "plotly.express.scatter",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "plotly.express",
... |
536369760 | from collections import defaultdict
import json
import numpy as np
try:
from tqdm import tqdm
except ImportError:
tqdm = lambda x, *args, **kwargs: x
from utils import check_dir_or_create, word_clean, get_clean_words
class ErrorModel:
def __init__(self):
self.stat = defaultdict(lambda: ... | maximus3/msu_ir_spring_2021 | hw_03/v2/error_model.py | error_model.py | py | 4,718 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tqdm.tqdm",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "collections.defaultdict",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.vstack",
"line... |
4811081037 | from ursina.prefabs.trail_renderer import TrailRenderer
from .class_.player import *
class ROOM(Entity):
def __init__(self,ch=None,room=None,server = None):
super().__init__(
enabled=False
)
self.change = ch
self.pool_obj = server
self.room = room
self.... | Nadzyoki/3D_network_sim | client/Window_/InRoom_/ROOM.py | ROOM.py | py | 1,221 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "ursina.prefabs.trail_renderer.TrailRenderer",
"line_number": 21,
"usage_type": "call"
}
] |
23027766420 | import cv2
import numpy as np
from utils import get_four_points
image = cv2.imread('data/images/book1.jpg')
# cv2.imshow('Original', image)
# image 좌표 4곳
# 시계방향으로 찍을 것
# 좌표만 알아내고 주석처리함
# 주석처리 안하고는 좌표찍으면 결과 이미지 나옴
point_src = get_four_points(image)
print(point_src)
# image의 4개의 점은 마우스 클릭으로 해결완료
# point_original = ... | jisu0427/opencv_yh | 15_perspectiveCorrection.py | 15_perspectiveCorrection.py | py | 941 | python | ko | code | 0 | github-code | 97 | [
{
"api_name": "cv2.imread",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "utils.get_four_points",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "cv2.findHomography",
... |
8228131592 | import math
import time
import sys
import mimetypes
import numpy as np
import cv2
class Converter:
CHARACTERS = (" ", ".", "-", "+", "*", "&", "#", "@")
MIN_ASPECT_CHARS = 50
FONT = cv2.FONT_HERSHEY_PLAIN
COLOR_RGB = (0, 255, 0)
def __init__(self, filename) -> None:
type = self.getMediaT... | Rhys-Alexander/ASCII-Images-and-Videos | converter.py | converter.py | py | 4,857 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "cv2.FONT_HERSHEY_PLAIN",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_PROP_FPS",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "cv... |
8011129297 | from flask import Blueprint, flash, g, redirect, render_template, request, session, url_for, current_app
from src.db import get_db
from src.auth import login_required
bp = Blueprint('page', __name__, url_prefix='/')
@bp.route('/movie', methods=('GET', 'POST'))
@login_required
def movie_handler():
mid = request.args... | SukritTM/MovieMatch | src/page.py | page.py | py | 1,882 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "flask.Blueprint",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "flask.r... |
31272038112 | from bs4 import BeautifulSoup
import requests
class Community(object):
def __init__(self, url):
self.url = url
@classmethod
def get_soup(cls, url):
r = requests.get(url)
url_contents = r.text
url_soup = BeautifulSoup(url_contents, 'html.parser')
return... | thereselxx/thereselxx.github.io | Community.py | Community.py | py | 13,258 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 136,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
... |
34865563388 | from pyspark.sql import SparkSession
import pandas as pd
from pyspark.ml.feature import VectorAssembler
from pyspark.ml.feature import StringIndexer
from pyspark.ml.classification import RandomForestClassifier
from pyspark.ml.evaluation import MulticlassClassificationEvaluator
import time
start1 = time.process_t... | mcabre-mc/AI_models-in-frameworks- | Spark/rf.py | rf.py | py | 1,963 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "time.process_time",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.SparkSession.builder.appName",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.SparkSession.builder",
"line_number": 9,
"usage_type": "attribute"
... |
13916443256 | import numpy as np
import datetime as dt
class Sjf:
# initialize some needed variable
delivered_processes = []
ended_processes = []
current_process = []
processes = []
finished_processes = 0
# init object, copy the table, estimate needed time to run
def __init__(self, table_of_processes):
... | somesoo/algorythms | sjf.py | sjf.py | py | 2,607 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.datetime.now",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 51,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.now",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "da... |
27612769240 | ######################################################################
# Verification of UAV track planning model based on DQN
#---------------------------------------------------------------
# author by younghow
# email: younghowkg@gmail.com
# --------------------------------------------------------------
#将训练好的... | young-how/DQN-based-UAV-3D_path_planer | watch_uav.py | watch_uav.py | py | 2,970 | python | en | code | 178 | github-code | 97 | [
{
"api_name": "torch.load",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "torch.load",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "env.q_target.load_state_dict",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "env.q_target",
... |
18368253410 | import cv2
img = cv2.imread("lena.jpg",-1) #flag: 1-color image;0-gray image;-1-image as such including alpha channel
# print(img) #pixels of the image
cv2.imshow('image',img) #flash the image
k = cv2.waitKey(0)&0xFF #cv2.waitKey(0) to wait for a key event
# 5000: 5 seconds, 0:forever stays
... | jingnanzh/youtubeChannels | getting_started_with_images.py | getting_started_with_images.py | py | 522 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "cv2.imread",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.waitKey",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.destroyAllWindows",
"line_numb... |
33458160767 | # stdlib Imports
import datetime
import math
import time
# Twisted Imports
from twisted.internet import defer
# PythonCollector Imports
from ZenPacks.zenoss.PythonCollector.datasources.PythonDataSource import PythonDataSourcePlugin
class FakeData(PythonDataSourcePlugin):
@classmethod
def config_key(cls, dat... | cluther/ZenPacks.test.MetricPrefix | ZenPacks/test/MetricPrefix/plugins.py | plugins.py | py | 1,636 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "ZenPacks.zenoss.PythonCollector.datasources.PythonDataSource.PythonDataSourcePlugin",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "time.time",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "twisted.internet.defer.succeed",
"line_number":... |
25663501131 | import sys
import json
from kapacitor.udf.agent import Agent, Handler, Server
from kapacitor.udf import udf_pb2
import signal
import logging
import re
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s:%(name)s: %(message)s')
logger = logging.getLogger()
# Mirrors all points it receives back t... | Ekateriner/Distributed-informer | kapacitor/udf-kapacitor/alert/server/script.py | script.py | py | 5,238 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "re.split",
... |
42709955807 | import sys
import json
# Simple WSGI application.
# Derived from https://peps.python.org/pep-3333/#error-handling
def simple_app(environ, start_response):
try:
path_info = environ.get("PATH_INFO", "")
if path_info == "/error":
# When "/error" is requested, force an exception to be throw... | dbkegley/rsc-sample-content | custom-images/python-api/app.py | app.py | py | 1,130 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "json.dumps",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sys.exc_info",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 26,
"usage_type": "call"
}
] |
14849655317 | import nntplib
from modules import *
import torch.nn.functional as F
class ST_encoder(nn.Module):
def __init__(self, n_features, d_model, window):
super(ST_encoder, self).__init__()
self.linear = nn.Linear(n_features, d_model)
self.tcna = TemporalConvNet(num_inputs=d_model, num_channels=[... | SiwGuan/VSAD | STAD.py | STAD.py | py | 2,854 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "torch.nn.functional.relu",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "torch.nn.functional",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "torch.nn.functional.tanh",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": ... |
42531447378 | from MeDIT.ImageProcess import ResizeNiiFile, ResizeROINiiFile
import SimpleITK as sitk
import os
import numpy as np
from tkinter import _flatten
import shutil
def PathAcquire(path):
pathlist = list(_flatten([[os.path.join(root, file) for file in files] for root, dirs, files in os.walk(path)
... | amberjiest/my_practice | assignment/createfiles.py | createfiles.py | py | 3,472 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tkinter._flatten",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.walk",
"line_number": ... |
7121508667 | #!/usr/bin/env python
import sys
import tempfile
import subprocess
def execute_shell(command):
'''Execute shell line and return output'''
splitted_command = command.split(' ')
if sys.version_info[0] == 2:
# two opens are required otherwise the read get an error
fd_tmp_out, tmp_output = tem... | Supermanuu/gitflow4pipelines | execute_shell.py | execute_shell.py | py | 829 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.version_info",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "tempfile.mkstemp",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "subprocess.call",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "subprocess.STD... |
19121092865 | #!/usr/bin/env python
import time
import json
import serial
import sqlite3
import requests
import subprocess
import adafruit_gps
import Adafruit_DHT
#initial data
kilometraje = 0
latitud = 0.0
longitud = 0.0
altitud = 0.0
velocidad = 0
tanqueConductor = 0.0
tanquePasajero = 0.0
fecha = ""
hora = ""
enviado = 0
timePo... | polaniavera/tracker | itemstart.py | itemstart.py | py | 6,460 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "Adafruit_DHT.DHT11",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "time.sleep",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"li... |
32849639728 | # -*- coding: utf-8 -*-
from odoo import api
from odoo import fields
from odoo import models
from copy import deepcopy
import collections
class BaseSublist(models.Model):
_name = 'base.sublist'
_description = 'Base Sublist Model'
_ps_sublist_field = ''
_ps_sublist_model = ''
@api.model
def f... | niulinlnc/odooExtModel | odoo_performance_manage/models/base_sublist.py | base_sublist.py | py | 4,700 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "odoo.models.Model",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "odoo.api.model",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "odoo.api",
... |
38211358485 | import re
import requests as rq
import pprint as pp
def getJSON(address):
YandexApi = rq.get("http://geocode-maps.yandex.ru/1.x/"+"?format=json&geocode=%s" % (address))
if YandexApi.status_code == 200:
return YandexApi.json()
else:
print('Error: {} from server'.format(result.status_code))
... | Peshehod87/FlatPriceForecast | Loaders/yandexapi.py | yandexapi.py | py | 1,011 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
}
] |
30276111341 | # coding : utf-8
import re
import os
import sys
import getpass
import urllib3
import requests
from mutagen.easyid3 import EasyID3
from mutagen.mp3 import MP3
from mutagen.id3 import ID3, APIC, TIT2, TPE1, TALB, USLT
# ID3 info:
tagMap = {'cover': APIC, 'title': TIT2,
'artist': TPE1, 'album': TALB, 'lyric': ... | heqin-zhu/music-recover | decrypt.py | decrypt.py | py | 6,166 | python | en | code | 408 | github-code | 97 | [
{
"api_name": "mutagen.id3.APIC",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "mutagen.id3.TIT2",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "mutagen.id3.TPE1",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "mutagen.id3.TALB",... |
70753774400 |
#%%
from config import *
import torch
from torch.utils.data import (DataLoader, RandomSampler, SequentialSampler,
TensorDataset)
from torch.nn import CrossEntropyLoss, MSELoss
from tqdm import tqdm, trange
import os
from pytorch_transformers import BertTokenizer, BertModel, BertForMasked... | xiaaoo-zz/medical_test_base | eval.py | eval.py | py | 8,315 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "logging.basicConfig",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "classifiers.CLASSIFIER_CLASSES",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "... |
73759782398 | # -*- coding: utf-8 -*-
import pytest
from intertwine.geos.models import Geo, GeoData, GeoID, GeoLevel
from intertwine.utils.space import GeoLocation
@pytest.mark.unit
@pytest.mark.parametrize("parent_name, parent_abbrev, child_name", [
('Parent Test Republic', 'PTR', 'Child Test Geo'),
])
def test_geo_model_cre... | IntertwineIO/platform | tests/geos/test_geo_models.py | test_geo_models.py | py | 11,304 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "intertwine.geos.models.Geo",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "intertwine.geos.models.Geo",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "intertwine.geos.models.Geo",
"line_number": 21,
"usage_type": "name"
},
{
"... |
7178845983 | import numpy as np
import cv2 as cv
import torch
from models.experimental import attempt_load
from utils.general import non_max_suppression
import visualize
from multiprocessing import Process
import rclpy
from cv_bridge import CvBridge
class ObjectDetection:
model = attempt_load("yolov7.pt", map_location="cpu") ... | gouthamanstark/Software-Platform-for-autonomous-vehicle | Object Detection/objectDetection.py | objectDetection.py | py | 1,627 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "models.experimental.attempt_load",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.random.randint",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name"... |
34064642737 | # -*- coding: utf-8 -*-
"""
Created on Sat Dec 3 22:34:00 2016
@author: iralp
"""
import pandas as pd
from copy import deepcopy
from sklearn import preprocessing
import warnings
from scipy import spatial
import numpy as np
import operator
from sklearn import decomposition
warnings.filterwarnings("ig... | matrix-revolution/Trade-Value-Analysis-in-Baseball | GetComparablePlayers_WAR_Ind_Years.py | GetComparablePlayers_WAR_Ind_Years.py | py | 17,756 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "scipy.spatial.distance.cosine",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "scipy.spatial.distance",
"line_number": 72,
"usage_type": "attribute"
},
{
... |
43027009968 | from django.contrib import admin
from django.urls import path
from dashboard.views import *
urlpatterns = [
path('',index,name="index" ),
path('details/',details,name="details" ),
path('services/',myservices,name="details" ),
path('contact/',contactus,name="contactus" ),
path('login/',loginUser,name... | Balajibedre/practice | home/dashboard/urls.py | urls.py | py | 392 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"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",
... |
13771237051 | from flask import (
Blueprint, flash, g, redirect, render_template, request, session, url_for
)
from db import database, PROVIDERS
bp_provider = Blueprint('provider', __name__, url_prefix='/provider')
@bp_provider.route('/providers', methods=['POST','GET'])
def provider():
if request.method == 'POST':
... | braiicano/gestion-ventas | gesven/provider.py | provider.py | py | 2,506 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "flask.Blueprint",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "flask.request.... |
36302612526 | # -*- coding: utf-8 -*-
# Learn more: https://github.com/kennethreitz/setup.py
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
setup(
name='keras_bc6_track1',
version='0.1.0',
description='BioCreative 6 t... | ningshixian/keras_bc6_track1 | setup.py | setup.py | py | 578 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "setuptools.setup",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 23,
"usage_type": "call"
}
] |
15316628638 | from django.db import models
from rest_framework import status
from oarndb.models.base_model import BaseModel
from oarndb.models import Organization, OrganizationPersonRole
class Person(BaseModel):
"""
The most important table of the whole system.
All children, adults, and staff have a person record.
... | wire-rabbit/oarn-database | oarn/oarndb/models/family_models.py | family_models.py | py | 17,296 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "oarndb.models.base_model.BaseModel",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.models.AutoField",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.db.models",
"line_number": 14,
"usage_type": "name"
},
{
"api... |
7994440486 | import sys
import threading
import time
import math
import cv2
import pyzbar.pyzbar as pyzbar
from PyQt5.uic.uiparser import QtCore
from matplotlib.backends.backend_qt5 import NavigationToolbar2QT
from matplotlib.figure import Figure
import numpy as np
import matplotlib.pyplot as plt
from PyQt5.QtWidgets import *
from ... | narrowgate73/company-project | qrCode.py | qrCode.py | py | 2,687 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "PyQt5.uic.loadUiType",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "PyQt5.uic",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_DSHOW",
"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.