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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
22246047451 | import requests, os
from dotenv import dotenv_values
from graphene import ObjectType, List, String, Schema, Field, Mutation, Int, Float, List, Boolean
from starlette.graphql import GraphQLApp
from schemas import MovieType, GenreType, GenreInputType, CompanyType, CompanyInputType
from .elasticsearch import es
if os.env... | thephilippbusch/DataWarehouse_MovieStars | fastapi-graphql/app/movies.py | movies.py | py | 4,702 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "os.environ.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_num... |
28022214506 | """
Provides the ``Config`` object, with each arc.conf option as an attribute.
"""
import sys, os
import arc
from log import debug
class _object(object): pass # Pickle can't serialize inline classes
Config = _object()
def is_conf_setter(f):
"""
Decorator for functions that set :py:data:`~lrms.common.Confi... | kjempelodott/arc_backup | src/services/a-rex/lrms/python/common/config.py | config.py | py | 7,194 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "log.debug",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "pickle.loads",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "ConfigParser.ConfigParser",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "pickle.dumps",
"... |
27812927125 | import sys
import os
import pickle
import argparse
import scipy.io as sio
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
import torchvision.transforms as transforms
import numpy as np
import cv2
from torch.autograd import Variable
from data import FACEroot, BaseTransform, FACE
import torch.uti... | LeileiCao/SFD_Pytorch | eval_wider_face.py | eval_wider_face.py | py | 4,758 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "os.mkdir",
"l... |
73889326454 | __version__ = '1.0.0'
from gunicorn import util
from gunicorn.app.base import BaseApplication
from example_api import logging
logger = logging.getLogger()
def start(config):
logger.info('Initializing api')
Server(config).run()
class Server(BaseApplication):
def __init__(self, app_config):
s... | dustinc555/example-api | example_api/server/__init__.py | __init__.py | py | 1,248 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "example_api.logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "example_api.logging",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "gunicorn.app.base.BaseApplication",
"line_number": 18,
"usage_type": "name"
},
{
... |
38494758505 | import subprocess
import sys
import time
import cv2
import cvzone
import keyboard
import numpy as np
from cvzone import ColorFinder
import detection
from ball import Ball
from detection import *
from frameProvider import FrameTransformer
from goalClass import Goal
from remoteControl import Remote
# This is the main ... | Stonebank/CDIO-3 | src/main.py | main.py | py | 25,338 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "remoteControl.Remote",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_DSHOW",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "frameProvide... |
42837758036 | import numpy as np
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
from utils.data_operations import recreate_image
from sklearn.utils import shuffle
import cv2
import k_medoids
n_colors = 3
image = cv2.imread("pictures/dataset/1.jpg")
image = cv2.cvtColor(image, cv2.COLOR_BGR2Lab)
image = np.arr... | ipospelov/color-constancy | Color_clustering.py | Color_clustering.py | py | 1,880 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cv2.imread",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2Lab",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"lin... |
21906085334 | import sys
import time
from selenium import webdriver
from common import operate_html as op
from common import save_dict as sd
def note_degree_id(tag_list):
degree_id = {}
for tag in tag_list:
t = tag.get_text()
if t == "学部":
degree_id["Bachelor"] = tag["id"]
elif t == "大学院"... | takitaki7474/syllabus-scraping | scraping.py | scraping.py | py | 3,482 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "common.operate_html.click_elem_by_id",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "common.operate_html",
"line_number": 49,
"usage_type": "name"
},
{
"api_name": "common.operate_html.switch_to_frame",
"line_number": 50,
"usage_type": "call"
... |
15293105001 |
import serial
from serial.tools import list_ports
import time
import matplotlib.pyplot as plt
devices = list(list_ports.comports())
print('select device:')
counter = 0
for d in devices:
print(str(counter) + ': ' + d.name)
counter += 1
try:
selected_dev = int(input('Input:'))
except ValueError:
print... | mofed8461/ArduinoOscilloscope | PythonCode/main.py | main.py | py | 1,026 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "serial.tools.list_ports.comports",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "serial.tools.list_ports",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "serial.Serial",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "... |
7114009451 | import shimoku_api_python as Shimoku
from dotenv import load_dotenv
from os import getenv
import pandas as pd
from prueba_acceso import generar_datos_ventas
from utils import (
calculate_sales_percentage_by_region,
calculate_sales_per_month,
calculate_sales_by_month,
calculate_data_indicators,
cal... | rotorrest/plots | test_1/main.py | main.py | py | 5,430 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "prueba_acceso.generar_datos_ventas",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.ge... |
22787668185 | import tensorflow as tf
from model import GPT2Model
from utils import default_hparams, top_k_logits
from parseTestFiles import parse_test_file
import sys
import numpy as np
def test_model(dataset_input_path,
weights_input_path, results_output_path,
results_output_mode, mode = "LAMBADA",
... | stanwys/GPT2 | test_model.py | test_model.py | py | 3,789 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "parseTestFiles.parse_test_file",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "utils.default_hparams",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "model.GPT2Model",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "... |
32505920136 | import os
import re
import langdetect
import pandas as pd
import requests
from time import time
from langdetect import DetectorFactory
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
... | eujin-eujin/pycharmprojects | previous_youtube/helper.py | helper.py | py | 11,836 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.exists",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "pandas.DataFrame",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"l... |
14292341615 |
# coding: utf-8
# Yihao Lin, Qiang Fei, Audrey Lee
# 2017-12-21
# FM library
import pywFM
# XGBoost library
import xgboost as xgb
import numpy as np
import pandas as pd
import ml_metrics as metrics
from sklearn.decomposition import PCA
from sklearn import cross_valiadation
from sklearn.ensemble import RandomForestCla... | Sapphirine/Hotel-Recommendation-Systems | project.py | project.py | py | 10,453 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.matrix",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pywFM.FM",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "pandas.to_datetime",
"line_... |
38509147404 | import curses
from curses import wrapper
from engine import *
class debugInterpreter(Interpreter):
def __init__(self, fileName, waitTime=0.25):
super().__init__(fileName)
self._output = []
self._stdscr = None
self._waitTime = waitTime
self._stdscrDimentions = None
... | 789tyre/Befish | debug.py | debug.py | py | 3,447 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "curses.echo",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "curses.curs_set",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "curses.noecho",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "curses.curs_set",
"line... |
32489858142 | import requests
import pandas as pd
# Set the URL of the Australian house price open data API.
url = "https://api.data.gov.au/data/dataset/1015085/resource/5d873904-50e5-489b-841b-46986382813b"
# Make a request to the API.
response = requests.get(url)
# Check the response status code.
if response.status_code == 200:... | ramseykhalaf/au-property | download_data_gov_au.py | download_data_gov_au.py | py | 662 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 16,
"usage_type": "call"
}
] |
17329343635 | import json
from collections import OrderedDict
import requests
class Response(requests.Response):
def __repr__(self):
def _log_body(headers, body):
r = ""
request_content_type = headers.get("content-type", "text/plain").lower()
if request_content_type.startswith("tex... | tsv1/hiphip | hiphip/http/response.py | response.py | py | 1,229 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "requests.Response",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",... |
42826473578 | from django.contrib.auth import get_user_model
from rest_framework.authentication import BasicAuthentication
User = get_user_model()
class DevAuthentication(BasicAuthentication):
def authenticate(self, request):
user = User.objects.get(username='testuser')
return (user, None)
| Prashant-Sethi/tweetme-dj-react | tweetme/rest_api/dev.py | dev.py | py | 300 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "rest_framework.authentication.BasicAuthentication",
"line_number": 7,
"usage_type": "name"
}
] |
11310231741 | import os
import torch
from training.runners import run_new_model_training
from models.neural_networks import MLPWrapper
from training.loss_functions import WMSELoss
N_JOBS = 2 # number of jobs to run in parallel
N_SPLITS = 5 # number of splits (k) to be made within the k fold cv
N_ITER = 500 # number of parameter... | dcuoliveira/nn-var-cov-pred | src/debug_run_models.py | debug_run_models.py | py | 1,755 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number":... |
74392591731 | import requests
def lat_long_lookup(location):
"""takes in the location/zip from /weather and outputs the latitude and longitude in a tuple"""
variables = {'address': location, 'sensor': 'false'}
payload = requests.get('https://maps.googleapis.com/maps/api/geocode/json', params=variables)
payload = pa... | ambitioninc/ambition-slack | ambition_slack/weather/lat_long_lookup.py | lat_long_lookup.py | py | 501 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
}
] |
22733297996 | import sympy
def permutations(n1, n2, n3):
digits = dict()
for char in str(n1):
if char not in digits:
digits[char] = 1
else:
digits[char] += 1
for char in str(n2):
if char not in digits:
return False
else:
digits[char] += 1
for char in str(n3):
if char not in digits:
return False
else:
... | DanielMcCrystal/ProjectEuler | py/40-49/Problem49.py | Problem49.py | py | 858 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sympy.isprime",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "sympy.isprime",
"line_number": 36,
"usage_type": "call"
}
] |
15333573364 | import logging
from grimoirelab_toolkit.datetime import unixtime_to_datetime
from .enrich import Enrich, metadata
from ..elastic_mapping import Mapping as BaseMapping
logger = logging.getLogger(__name__)
class Mapping(BaseMapping):
@staticmethod
def get_elastic_mappings(es_major):
"""Get Elastics... | chaoss/grimoirelab-elk | grimoire_elk/enriched/stackexchange.py | stackexchange.py | py | 9,247 | python | en | code | 58 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "elastic_mapping.Mapping",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "enrich.Enrich",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "grimoirelab_to... |
40806288865 | """
Visualization for point cloud using matploblib.
"""
import random
import sys
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
sys.path.append(".")
from datasets.shapenet import ShapeNetPartDataset
def show_point_cloud_part(point_cloud, seg, axis=False):
"""show dif... | qinglew/PointCloudUtils | visualization/visualization.py | visualization.py | py | 1,809 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.path.append",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "numpy.unique",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",... |
70355950452 | import argparse
class Parser:
def __init__(self):
self.parser = argparse.ArgumentParser()
self.subparsers = self.parser.add_subparsers()
self.train = self.subparsers.add_parser("train")
self.test = self.subparsers.add_parser("test")
self.init_train_subparser()
sel... | lubosmj/I2I-GANs | i2i_gans/common/parsers.py | parsers.py | py | 2,332 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 6,
"usage_type": "call"
}
] |
74174689972 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#import time
#time.sleep(60)
"""
This is a detailed example using almost every command of the API
"""
import telebot
from telebot import types
import time
import os
import mariadb
mydb = mariadb.connect(
host='localhost',
user='myuser',
password='admin',
... | dahermar/MaquinaExpendedora | Raspberry/telegrambot.py | telegrambot.py | py | 7,180 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "mariadb.connect",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "telebot.types.ReplyKeyboardRemove",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "telebot.types",
"line_number": 45,
"usage_type": "name"
},
{
"api_name": "teleb... |
38303330032 | # -*- coding: utf-8 -*-
__author__ = 'joko'
"""
@author:joko
@time: 16/11/16 下午2:05
"""
import os
import sys
main_view = os.path.split(os.path.realpath(sys.argv[0]))[0]
main_view = main_view.replace('\\', '/')
sys.path.append(main_view)
import lib.Utils as U
import public.CheckEnvironment
def initialization_arrange... | ztwo/Auto_Analysis | demo_run.py | demo_run.py | py | 1,341 | python | en | code | 178 | github-code | 21 | [
{
"api_name": "os.path.split",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_numb... |
30352491573 | from bs4 import BeautifulSoup
import sys
from typing import Dict, Iterator, Tuple
from ptls.address import Address
from ptls.clinic import Clinic
from ptls.requester import Requester
class Fyzical:
base_url: str = 'https://www.fyzical.com'
company_name = 'Fyzical'
company_name_upper = company_name.upper... | roshangiyanani/pt_location_scraper | ptls/scrapers/_Fyzical.py | _Fyzical.py | py | 1,998 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.Dict",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "ptls.requester.Requester",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "sys.stdout.write",
... |
8090576292 | #!/usr/bin/python3
import argparse
import csv
import json
import logging
import os
import socket
import time
import sys
import traceback
import paramiko
import requests
retry = 3
delay = 1
timeout = 2
def send_telegram_message(token, chatid, message):
send_text = 'https://api.telegram.org/bot{}/sendMessage?chat... | afischer81/watchdog-docker-pi | watchdog.py | watchdog.py | py | 5,619 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "socket.socket",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_nu... |
74450945331 | import yaml
def get_department_data():
with open("/Users/yeahmobi/Desktop/work/python/wechart/wechart/data/Address_management_data/department_management.yaml",'r') as f:
datas = yaml.safe_load(f)
data_creat = datas['creat_department']
ids_creat = datas['idscreat']
updata_departme... | Allison001/wechart_api | wechart/read_data/read_address_management/read_department_management.py | read_department_management.py | py | 595 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "yaml.safe_load",
"line_number": 6,
"usage_type": "call"
}
] |
20581107095 | import os
import re
import random
import shutil
import tempfile
import supybot.conf as conf
import supybot.ircdb as ircdb
import supybot.utils as utils
import supybot.world as world
from supybot.commands import *
import supybot.ircmsgs as ircmsgs
import supybot.plugins as plugins
import supybot.ircutils as ircutils
im... | progval/Limnoria | plugins/Topic/plugin.py | plugin.py | py | 23,520 | python | en | code | 605 | github-code | 21 | [
{
"api_name": "supybot.i18n.PluginInternationalization",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "supybot.utils.minisix.pickle",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "supybot.utils.minisix",
"line_number": 22,
"usage_type": "name"... |
13226964426 | from random import randint
from datetime import datetime
from time import time
from copy import copy
def timer(func):
def wrapper(*args, **kwargs):
start = datetime.now()
start1 = time()
res = func(*args, **kwargs)
duration = datetime.now() - start
duration2 = time() - star... | pymentor/learning-streams | bubble_selection_insert_sorting.py | bubble_selection_insert_sorting.py | py | 1,537 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "datetime.datetime.now",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "time.time",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now... |
43495562741 | from torch.utils.tensorboard import SummaryWriter
import numpy as np
from PIL import Image
# help(SummaryWriter.add_scalar)
# help(SummaryWriter)
writer = SummaryWriter("./logs/logs_tensorboard")# writer.add_image()
image_path = "F:/hymenoptera_data/train/bees_image/1092977343_cb42b38d62.jpg"
img_PIL = Image.open(ima... | liangkousansan/FasterNet-master6 | draw_train_result.py | draw_train_result.py | py | 813 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.utils.tensorboard.SummaryWriter",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "numpy.arr... |
13829325361 | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 5 22:03:22 2021
@author: raha_
"""
import flask
from flask import request, jsonify
import main as m
app = flask.Flask(__name__)
app.config["DEBUG"] = True
@app.route('/', methods=['GET'])
def home():
demoText = open("Data/data.txt", "rb").read().decode(encoding="... | zhp27/QA | api.py | api.py | py | 1,333 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask.request.form.get",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "flask.request.form",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "flask.requ... |
13682499700 | from django.shortcuts import render
from django.http import HttpResponse
from django.template import loader
from .models import *
def index(request):
projectList = Project.objects.all()
jobList = Job.objects.all()
testimonyList = Testimony.objects.all()
template = 'index.html'
context = {'projectLi... | databytes-deakin/website | databytes/DBweb/views.py | views.py | py | 1,900 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "django.shortcuts.render",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 30,
"usage_type": "call"
},
{
"api_name"... |
7996297002 | from django.core.management.base import BaseCommand, CommandError
from Papers.services import PaperInfoService, SpecificationService
from ...services import (
TestSourceService,
PrenameSettingService,
PQVMappingService,
TestPreparedSetting,
)
class Command(BaseCommand):
help = "Get the status of ... | plomgrading/plom | plom_server/Preparation/management/commands/plom_preparation_status.py | plom_preparation_status.py | py | 2,844 | python | en | code | 10 | github-code | 21 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "Papers.services.SpecificationService.is_there_a_spec",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "Papers.services.SpecificationService",
"line_num... |
1985465099 | import click
import os
import pandas as pd
import pdf
import requests
import sys
import util
from lgr import logger
@click.group()
def cli():
pass
@cli.command()
@click.argument('fscs_id')
def delete(fscs_id):
"""Deletes a library from the DB with the given FSCS id."""
logger.info("DELETE {}".format(fscs... | GSA-TTS/command-line-scripts-in-python | libadmin.py | libadmin.py | py | 4,630 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "click.group",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "lgr.logger.info",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "lgr.logger",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "util.construct_postgrest_url",... |
73153757173 | import unittest
from selenium import webdriver
from base.data import Data
from pages.home_page import HomePage
from pages.product_page import ProductPage
from base.locators import Locators
# Base Class for the tests
class TestCheckSearchApiBase(unittest.TestCase):
""" Test case is:
1. Open the browser, na... | gulcinkulunk/test-sample | test/test_check_search_api_case.py | test_check_search_api_case.py | py | 1,934 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "unittest.TestCase",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 24,
"usage_type": "name"
},
{
"api_na... |
30185044621 | import tkinter as tk
from tkinter import *
import tkinter.font as font
from PIL import ImageTk, Image
import GUI.sign_in as sign_in
import GUI.user_catalog as uc
import GUI.full_catalog as fc
import GUI.view_requests as vr
import GUI.dashboard as dash
import src.GUI.profile as pf
import GUI.global_variables as gbl_var
... | rafid-khan/Tool-Share | src/GUI/Nav.py | Nav.py | py | 4,715 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "GUI.global_variables.set_username",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "GUI.global_variables",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "tkinter.Tk",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PIL... |
24638576667 | # """Various analysis functions for the records page"""
import datetime
import numpy as np
import matplotlib.pyplot as plt
import sql
import pandas as pd
import requests
def stats(records_data):
"""Given records data, return the number of misses and frequency of drugs that were missed,
also return number of dr... | vsahni3/EasyMed | report.py | report.py | py | 3,968 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "datetime.date.today",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "dat... |
6815231065 | import numpy as np
import os
import cv2
import copy
import glob
import matplotlib.pyplot as plt
# img:input 1-, 3-, or 4-channel image; when ksize is 3 or 5, the image depth should be CV_8U, CV_16U, or CV_32F, for larger aperture sizes, it can only be CV_8U.
# kernel:aperture linear size; it must be odd and greater th... | bbying81/MedianBlur | median-blur.py | median-blur.py | py | 4,791 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.zeros",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "cv2.merge",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 48,... |
19306415451 | """
Find all the isomorphics graphs in the input file. And output the with no duplicates
"""
import json
import networkx as nx
import argparse
from collections import defaultdict
from tqdm import tqdm
def create_graph_from_dict(graph_dict):
G = nx.DiGraph() if graph_dict['directed'] else nx.Graph()
for node i... | RIKEN-DKO/BEHF | bef/data/duplicate_networks.py | duplicate_networks.py | py | 2,487 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "networkx.DiGraph",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "networkx.Graph",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "networkx.is_isomorphic",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "json.load",
... |
10892959116 | import os
import re
import sys
from contextlib import suppress
from typing import (
TYPE_CHECKING, Callable, Dict, Iterator, List, NamedTuple, Optional, Tuple
)
from kitty.cli import parse_args
from kitty.cli_stub import AskCLIOptions
from kitty.constants import cache_dir
from kitty.fast_data_types import truncate... | dominikb1888/.dotfiles | Applications/Home Manager Apps/kitty.app/Contents/Resources/kitty/kittens/ask/main.py | main.py | py | 17,752 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "tui.loop.debug",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "readline.get_history_item",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "re... |
38779180272 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | waltBB/neutron_read | neutron/tests/unit/ml2/test_extension_driver_api.py | test_extension_driver_api.py | py | 10,638 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "neutron.tests.unit.ml2.test_ml2_plugin.Ml2PluginV2TestCase",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "neutron.tests.unit.ml2.test_ml2_plugin",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "neutron.plugins.ml2.config.cfg.CONF.set_ov... |
73309650934 | import pyglet
from pytmx.util_pyglet import load_pyglet
from player import Player
from monster import Monster
from npc import Npc
from container import Container
class Game:
def __init__(self):
self.player_name = None
self.zone = None
self.players = {}
self.monsters = {}
self.player_target ... | dslice25/test-game | client/client/game/game.py | game.py | py | 4,053 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pytmx.util_pyglet.load_pyglet",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "pyglet.graphics.Batch",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "pyglet.graphics",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name... |
11446246384 | from tensorflow.keras.models import load_model
import numpy as np
from sklearn.model_selection import train_test_split
model_name = 'cnn_codon1'
dir = 'cv\\'+model_name
model = load_model(dir+'\\model'+model_name+'.hdf5', compile=False)
model.compile(optimizer='sgd', loss='binary_crossentropy', metrics=['accuracy'])
... | rachel-tzy/Gene-Resistance-Classification | test_cnn.py | test_cnn.py | py | 614 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "tensorflow.keras.models.load_model",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sklearn.model... |
13609221499 | from cgitb import enable
import time
import gym
from gym import spaces
from pygments import highlight
from gym_envs.envs import robot_env
import numpy as np
class RobotEraseBoardEnv(robot_env.RobotEnv):
def __init__(self, height=84, width=84, step_size=10, enable_arm=True, enable_gripper=True, enable_camera=True, ca... | siddhanthaldar/ROT | gym-envs/gym_envs/envs/robot/eraseboard.py | eraseboard.py | py | 3,565 | python | en | code | 52 | github-code | 21 | [
{
"api_name": "gym_envs.envs.robot_env.RobotEnv",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "gym_envs.envs.robot_env",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "gym_envs.envs.robot_env.RobotEnv.__init__",
"line_number": 13,
"usage_type"... |
40875247106 | from collections import deque
def dfs(i, j, n, m, graph):
queue = deque()
if i <= -1 or i >= n or j <= -1 or j >= m:
return False
if graph[i][j] == 0:
graph[i][j] = 1
dfs(i + 1, j, n, m, graph)
dfs(i - 1, j, n, m, graph)
dfs(i, j + 1, n, m, graph)
dfs(i, j -... | superchd/python | backtracking/icecream/icecream_dfs.py | icecream_dfs.py | py | 844 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.deque",
"line_number": 4,
"usage_type": "call"
}
] |
1985483929 | import os
import pandas as pd
import re
import requests
from lgr import logger
from pathlib import Path
from xkcdpass import xkcd_password as xp
from lgr import logger
EXPECTED_HEADERS = ['fscs_id', 'name', 'address', 'tag']
# Generates an XKCD-style passphrase
def generate_api_key():
wordlist = xp.generate_wor... | GSA-TTS/command-line-scripts-in-python | util.py | util.py | py | 9,071 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "xkcdpass.xkcd_password.generate_wordlist",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "xkcdpass.xkcd_password",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "xkcdpass.xkcd_password.locate_wordfile",
"line_number": 16,
"usage_type":... |
37037590802 | import math
import json
#VSOP87-Multilang https://www.celestialprogramming.com/vsop87-multilang/index.html
#Greg Miller (gmiller@gregmiller.net) 2021. Released as Public Domain
class jsongen:
version=-1
versionString=""
varsOsculating=['a','l','k','h','q','p']
varsRectangular=['x','y','... | gmiller123456/vsop87-multilang | Languages/JSON/generatejson.py | generatejson.py | py | 4,041 | python | en | code | 35 | github-code | 21 | [
{
"api_name": "math.cos",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "math.sin",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "math.pow",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "math.cos",
"line_number": 61,
"usa... |
40816815016 | from flask import Flask, render_template
from stt import listen
import logging
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
app = Flask(__name__)
global count
count = 0
@app.route("/audio")
def audio():
sentence = 'listening'
sentence = listen()
print(sentence, count)
return {"aud... | amirul-dev/hospitalbot-GUI | server/server.py | server.py | py | 568 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "logging.ERROR",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "stt.listen",
"line_... |
22167701284 | """
"""
import os
import torch
import torch.nn as nn
from torchvision.models import segmentation
from torchvision.models import detection
from kernelphysiology.dl.pytorch.models import model_utils
from kernelphysiology.dl.pytorch.models import resnet_simclr
from kernelphysiology.dl.experiments.contrast.models.tran... | ArashAkbarinia/kernelphysiology | python/src/kernelphysiology/dl/experiments/contrast/pretrained_models.py | pretrained_models.py | py | 14,927 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "torch.nn.Module",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "torch.nn.Sequential",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"lin... |
13999634557 | #!/usr/bin/env python
from __future__ import division
from builtins import zip
from builtins import str
from builtins import range
from builtins import object
import logging
from optparse import OptionParser
from glob import glob
from collections import namedtuple
from datetime import datetime, timedelta
from netCDF... | nasa/RtRetrievalFramework | support/utils/ncep_model_maker.py | ncep_model_maker.py | py | 26,246 | python | en | code | 43 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "collections.namedtuple",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "collections.namedtuple",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "colle... |
36056467098 | from __future__ import division
from sympy.functions.elementary.trigonometric import TrigonometricFunction
from sympy.functions.elementary.trigonometric import InverseTrigonometricFunction
import sympy
from sympy import Add,Mul,rcollect,Number,NumberSymbol,sin,cos,Pow,Integer,Symbol,gcd,div
from .singleton_form import ... | b-97/sympy-form-analysis | monomial_form.py | monomial_form.py | py | 3,109 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "sympy.Pow",
"line_number": 26,
"usage_type": "argument"
},
{
"api_name": "sympy.Add",
"line_number": 36,
"usage_type": "argument"
},
{
"api_name": "sympy.Mul",
"line_number": 39,
"usage_type": "argument"
},
{
"api_name": "sympy.Pow",
"line_numbe... |
2048898076 | import unittest
from math import cos, sin
import numpy as np
import sympy as sp
import matplotlib.pyplot as plt
from src.polyhedra import Polyhedron
from src.systems import System, trajectory
from src.symbolics import evalf_expr
class TestSystems(unittest.TestCase):
def __init__(self, methodName: str = ...) -> Non... | guberger/EXAMPLE_CEGISPolyhedralCLF_Python | test/test_systems.py | test_systems.py | py | 2,007 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "unittest.TestCase",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sympy.symbols",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"l... |
70905523892 | # -*- coding:utf-8 -*-
import requests
from Business.H5.mobile_login import h5_caccessToken
from Business.login import cdms_获取token
from Common.random_number import Randoms
import logging
from Common.com_sql.eddid_data_update import *
import time
from Common.com_sql.eddid_data_select import *
from Config.cdms_config im... | gzz2013/EDDID_CMDS | Business/H5/H5_行情申请.py | H5_行情申请.py | py | 5,364 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "Business.H5.mobile_login.h5_caccessToken",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "requests.Session",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 44,
"usage_type": "call"
},
{
"api_name":... |
15732142590 | from datetime import datetime
from odoo.tests import common
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT as DF
class TestHRAbsenteeismHours(common.TransactionCase):
def setUp(self):
super(TestHRAbsenteeismHours, self).setUp()
self.Holidays = self.env['hr.holidays']
self.HolidaysS... | aravinthu/addons-onestein | hr_absenteeism_hours/tests/test_hr_absenteeism_hours.py | test_hr_absenteeism_hours.py | py | 1,332 | python | en | code | null | github-code | 21 | [
{
"api_name": "odoo.tests.common.TransactionCase",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "odoo.tests.common",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.today",
"line_number": 14,
"usage_type": "call"
},
{
"ap... |
70309715574 | # pylint: disable=redefined-outer-name
import os
import numpy as np
import pytest
from xarray.core.indexing import MemoryCachedArray
from ...data import datasets, load_arviz_data
from ...rcparams import (
_make_validate_choice,
_make_validate_choice_regex,
_validate_float_or_none,
_validate_positive_i... | arviz-devs/arviz | arviz/tests/base_tests/test_rcparams.py | test_rcparams.py | py | 10,283 | python | en | code | 1,461 | github-code | 21 | [
{
"api_name": "rcparams.rcParams",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "rcparams.rc_context",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "rcparams.rcParams",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "rcparams.rcPa... |
4929516773 |
import random
import itertools
class Stack(object):
# Jenga
def __init__(self, centers=None):
if centers:
self.centers = centers
self.blocks = len(centers)
else:
self.centers = [0]
self.blocks = 1
def add_block(self):
self... | chirs/puzzles | riddler/2021/02.19.py | 02.19.py | py | 1,719 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "random.random",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "itertools.count",
"line_number": 76,
"usage_type": "call"
}
] |
72299594294 | """This file is the pipeline for data etl"""
# import relation package.
import pandas as pd
import numpy as np
import pickle
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report
from sklearn.svm import SVC
from sklearn.neighbors import KNeighborsClassifier
from sklearn... | LiuYuWei/kaggle-titanic | src/service/train_eval_service.py | train_eval_service.py | py | 4,173 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "config.config_setting.ConfigSetting",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "p... |
33749256961 | # This program 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) any later version.
#
# This program is distributed in the hope that it will be useful, but
... | RxLaboratory/DuBlast | dublast/__init__.py | __init__.py | py | 2,818 | python | en | code | 24 | github-code | 21 | [
{
"api_name": "importlib.reload",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "importlib.reload",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "importlib.reload",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "importlib.reload",... |
38161497186 | '''
Henali: Henry (e), Erica (hugo), Aahan (spikes)
SoftDev Pd 8
18: (Python+Sqlite)3: A Mare Widge Made in Hebben
Oct 25, 2022
Estimated Time:
'''
import sqlite3 #enable control of an sqlite database
import csv #facilitate CSV I/O
DB_FILE="discobandit.db"
db = sqlite3.connect(DB_FILE) #open if file exists,... | Accorata/softdev1 | 18_csv2db/db_builder.py | db_builder.py | py | 1,113 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sqlite3.connect",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "csv.DictReader",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "csv.DictReader",
"line_number": 29,
"usage_type": "call"
}
] |
24710520626 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""":Mod: sync
:Synopsis:
:Author:
ide
:Created:
1/28/2020
"""
import daiquiri
import pendulum
import requests
from sqlalchemy import create_engine
from urllib.parse import quote_plus
import xml.etree.ElementTree as ET
from soh.config import Config
logger = d... | PASTAplus/soh | src/soh/asserts/sync.py | sync.py | py | 4,205 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "daiquiri.getLogger",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "soh.config.Config.DB_DRIVER",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "soh.config.Config",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": ... |
5347674669 | from __future__ import division
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
import cv2
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
import cv2
def unique(tensor... | Muxindawang/zero-to-one-yolov3- | utils.py | utils.py | py | 11,272 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.unique",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "torch.from_numpy",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "torch.sigmoid",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "torch.sigmoid",
"line... |
8354212343 | '''
Created on Jun 16, 2016
@author: Carlos Lallana
'''
import os
import jinja2, webapp2
from google.appengine.ext import ndb
import random, string
import logging
from datetime import datetime
class MyEntity(ndb.Model):
_use_memcache = True
string_property = ndb.StringProperty()
class Controller(webapp2... | cjlallana/gae-datastore-async | test.py | test.py | py | 2,892 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "google.appengine.ext.ndb.Model",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "google.appengine.ext.ndb",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "google.appengine.ext.ndb.StringProperty",
"line_number": 19,
"usage_type": "... |
6657919784 | from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
class Item(models.Model):
name = models.CharField('Имя', max_length=255)
price = models.IntegerFiel... | nikita26078/practice | web/djangotest/app/models.py | models.py | py | 4,880 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.db.models.Model",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "... |
16181071226 | import argparse
import torch
"""
Tiny utility to print the command-line args used for a checkpoint
"""
parser = argparse.ArgumentParser()
parser.add_argument('checkpoint')
def main(args):
checkpoint = torch.load(args.checkpoint, map_location='cpu')
for k, v in checkpoint['args'].items():
print(k, v)
if ... | google/sg2im | scripts/print_args.py | print_args.py | py | 387 | python | en | code | 1,275 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torch.load",
"line_number": 15,
"usage_type": "call"
}
] |
15061458261 | import os
import torch
from torch.utils.data import Dataset
from torchvision.transforms import transforms
import numpy as np
import collections
from PIL import Image
import csv
import random
import librosa
from skimage.transform import resize
from glob import glob
class CommandData(Dataset):
"""
put speech_co... | Codelegant92/STC-MAML-PyTorch | CommandData.py | CommandData.py | py | 13,034 | python | en | code | 8 | github-code | 21 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "skimage.transform.resize",
"line_number": 57,
"usage_type": "name"
},
{
"api_name": "librosa.load",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "glob.g... |
74147043892 |
import numpy as np
import matplotlib.pyplot as plt
from pathlib import Path
import os
import sys
import pathlib
import matplotlib.cm as cm
import matplotlib.colors as mcolors
import matplotlib.patches as patches
from shapely.geometry import Point
from shapely.geometry import MultiPoint
from shapely.geometry import Mul... | ccg-esb-lab/uJ | two-channels/uJ_src/python/PlottingFunctions.py | PlottingFunctions.py | py | 21,295 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.axes",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "mat... |
71741067894 | import tkinter as tk
import pickle
import pandas as pd
import os
from tkinter import ttk, filedialog, Menu
from graphic.graphics_config import *
from graphic.edit_data_form import EditForm
from graphic.stats_forms import SimpleTextSubmissionForm, StatisticSubmissionForm, PivotSubmissionForm
from graphic.stats_forms imp... | DKay7/DataProject | graphic/main_window.py | main_window.py | py | 12,459 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "tkinter.Frame",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "tkinter.Frame.__init__",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "tkinter.Frame",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "tkinter.... |
10672292859 | '''
A class providing an input object for the Nintendo Wii Fit Balance Board over Bluetooth
This class is an amalgomation over several years from many many sources.
I have modified it to work and tested it with Python 2.7 on Bluez5 on Raspbian on a Raspberry Pi B (V1) only.
Your milage may vary.
A non-comprehens... | DougBarry/JamRacer | InputWiiFitBoard.py | InputWiiFitBoard.py | py | 18,813 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "threading.Lock",
"line_number": 116,
"usage_type": "call"
},
{
"api_name": "logging.warning",
"line_number": 141,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 142,
"usage_type": "call"
},
{
"api_name": "bluetooth.BluetoothSocke... |
41073723462 | # Third party imports
from django.contrib.auth.models import User, Group
from rest_framework import viewsets
from rest_framework import permissions
# Pepper imports
from pepper.facebook import serializers
# Relative imports
from . import models
class UserViewSet(viewsets.ModelViewSet):
"""
API endpoint that... | GeekyShacklebolt/pepper | pepper/facebook/api.py | api.py | py | 1,618 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rest_framework.viewsets.ModelViewSet",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.viewsets",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "django.contrib.auth.models.User.objects.all",
"line_number": 17,
"usage... |
74593718451 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 31 03:20:28 2023
@author: csjosh
"""
import pandas as pd
import matplotlib.pyplot as plt
if __name__=="__main__":
datos=pd.read_csv("./seleccion/mejorSeleccion.csv", sep=";")
datosDos=pd.read_csv("./seleccion/peorSeleccion.csv", sep=";")
... | ImNoth1ng/Analysis-and-Design-of-Algorithms | SEGUNDO PARCIAL/alt/1_metodosOrdenamiento/ordenamientoGrafica.py | ordenamientoGrafica.py | py | 547 | python | es | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyp... |
36084211932 | #!/usr/bin/env python3
"""
Compare all the iteration maps with the one with the lowest energy.
For example:
$ scripts/compare_maps.py -s NC -i 100 -v
For documentation, type:
$ scripts/compare_maps.py -h
"""
import argparse
from argparse import ArgumentParser, Namespace
import statistics
from baseline.constants... | alecramsay/baseline | scripts/compare_maps.py | compare_maps.py | py | 5,901 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "argparse.Namespace",
"line_number": 66,
"usage_type": "name"
},
{
"api_name": "argparse.Namespace",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "argpars... |
41452852063 |
import logging
logger = logging.getLogger(__name__)
class Classification:
"""
Object to represent each individual classification
"""
def __init__(self, user, subject, annotation):
"""
Parameters
----------
user : str
user name of the cl... | zooniverse/hco-experiments | swap/swap/utils/classification.py | classification.py | py | 3,027 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 3,
"usage_type": "call"
}
] |
24224738901 | from logging import root
from platform import node
class Node:
def __init__(self,data):
self.data = data
self.right = None
self.left = None
class BST:
def __init__(self):
self.root = None
def re_insert(self,root,data):
if root.data == data:
... | nothairyyq/Algorithms | day_test/test_312.py | test_312.py | py | 897 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.root.data",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "logging.root",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "logging.root.data",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "logging.ro... |
32981743475 | """zappit URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/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-based ... | mvr-garcia/drf-api-zappit | zappit/urls.py | urls.py | py | 1,147 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "... |
12064491595 | import torch
import lightning.pytorch as pl
from omegaconf import DictConfig
from vitrocr.model.backbone.vitocrtfm import ViTOCR
from vitrocr.model.backbone.vitocrctc import ViTOCRCTC
from torch.optim import AdamW
from vitrocr.utils.optim import NoamScheduler
from vitrocr.utils.wer import compute_wer, compute_batch_wer... | nghiahuynh-ai/vi-trocr | vitrocr/model/recognizer.py | recognizer.py | py | 5,006 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "lightning.pytorch.LightningModule",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "lightning.pytorch",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "omegaconf.DictConfig",
"line_number": 14,
"usage_type": "name"
},
{
"api... |
18533640400 | import os
import numpy as np
import scipy as sp
from scipy import stats
from scipy import signal
from bct.algorithms.distance import distance_wei, distance_wei_floyd, retrieve_shortest_path
from sklearn.linear_model import LinearRegression
from sklearn.kernel_ridge import KernelRidge
# %% Plotting
import matplotlib.py... | lindenmp/nct_hierarchy | src/imaging_derivs.py | imaging_derivs.py | py | 14,047 | python | en | code | 5 | github-code | 21 | [
{
"api_name": "seaborn.set",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.font_manager.FontProperties",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "matplotlib.font_manager",
"line_number": 20,
"usage_type": "name"
},
{
"api_na... |
6771217198 | """
Script for running inference of IrradianceNet model
"""
# Author: Andreas Holm Nielsen <ahn@ece.au.dk>
import torch
import numpy as np
import pandas as pd
import json
import argparse
from src.models.optical_flow_functions import optflow_predict
from src.config.config import config_parser
from src.config.str2bool ... | holmdk/IrradianceNet | test.py | test.py | py | 8,150 | python | en | code | 10 | github-code | 21 | [
{
"api_name": "torch.load",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "torch.load",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "torch.no_grad",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_numb... |
5419107533 | # -*- coding: utf-8 -*-
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn import metrics
from sklearn.neural_network import MLPClassifier
import time
from sklearn.preprocessing import StandardScaler
from visualisation import matrice_confusion as mc
#permet d'avoir l'heure à laquelle... | Coldoolongtea/Credit_card_fraud_detection | Resaux_neurones.py | Resaux_neurones.py | py | 1,515 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "time.asctime",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "time.localtime",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.read_excel",
"line_n... |
13699245124 | import pickle as pickle
import os
import pandas as pd
import torch
import tqdm
from utils import make_entity_ids
import numpy as np
class RE_Dataset(torch.utils.data.Dataset):
""" Dataset 구성을 위한 class."""
def __init__(self, pair_dataset, labels):
self.pair_dataset = pair_dataset
self.labels =... | boostcampaitech4lv23nlp2/level2_klue_nlp-level3-nlp-08 | load_data.py | load_data.py | py | 5,201 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.utils",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.tensor",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.utils",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "torch.tensor",
"li... |
10690827040 | # To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'
# %%
from IPython import get_ipython
# %%
# Standard
import numpy as np
import pandas as pd
from numpy.random import randn
# Stats
from scipy import stats
# Plotting
import matplotlib as mpl
import matplotlib.pyplot as plt
import s... | abel672/python-data-analysis-visualization | Section-7-Data-Visualization/04-Regression-Plots.py | 04-Regression-Plots.py | py | 1,950 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "IPython.get_ipython",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "seaborn.load_dataset",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "seaborn.lmplot",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "seaborn.lmplo... |
3423670907 | from decimal import Decimal
from .forms import SubscribeForm
from webapp.user.models import User
from webapp.model import db, Shop
from .models import GPU, GpuPrice, GpuLink, GpuUser
from flask import (Blueprint, current_app, flash,
redirect, render_template, abort)
from flask_login import current_us... | rom762/learn_python_pricer2 | webapp/gpu/views.py | views.py | py | 3,933 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Blueprint",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "models.GPU.query.all",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "models.GPU.query",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "models.GPU... |
10184526091 | import web
import mvc.firebase_config as token
import pyrebase
import app
import json
render = web.template.render("mvc/views/public/")
class Recuperar:
def GET(self):
message = None
return render.recuperar(message)
def POST(self):
try:
message= None
fireb... | JesusADiaz/mvc | mvc/controllers/public/recuperar.py | recuperar.py | py | 849 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "web.template.render",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "web.template",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pyrebase.initialize_app",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "mvc.fireb... |
9376439240 | from itertools import groupby
from operator import itemgetter
def sarcoma(arr):
t_v = {}
result = []
for row in arr:
if not t_v.get(row['T']):
t_v[row['T']] = (row['V'], len(result))
result.append(row)
continue
if row['V'] > t_v[row['T']][0]:
... | OrderAndCh4oS/filter-out-lowest-value-duplicates | scripts.py | scripts.py | py | 1,494 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "itertools.groupby",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "operator.itemgetter",
"line_number": 28,
"usage_type": "call"
}
] |
73632875254 | import numpy as np
from datetime import datetime, timedelta
import matplotlib.pyplot as plt
from astro_clock import Clock, sun24, plot_sun
obs_loc = (7.744083817548831, 48.58313582900411, 140)
lon, lat, h = obs_loc
adr = 'C:/Moi/_py/Astronomy/Solar System/kernels/'
kernels = [adr + 'naif0012.tls',
adr + ... | behrouzz/astro_clock | ex3_sun_positions.py | ex3_sun_positions.py | py | 764 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "datetime.datetime.utcnow",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "astro_clock.Clock",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "astro_cl... |
74337289653 | import telebot
import urllib.request
import datetime
from PIL import Image
import functions
token = '***'
bot = telebot.TeleBot(token)
@bot.message_handler(content_types=["text", "sticker", "pinned_message", "photo", "audio"])
def get_text_messages(message):
if message.text == "/search":
bot.send_message... | Xpamoff/StudentBookFinder | main.py | main.py | py | 1,001 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "telebot.TeleBot",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "functions.time_definer",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "urllib.request.request.urlretrieve",
"line_number": 27,
"usage_type": "call"
},
{
"api_name... |
21222714961 | import unittest
import numpy
import cupy
from cupy import testing
import cupyx
@testing.parameterize(*testing.product({
'size': [5, 9, 17, 33],
'dtype': [numpy.float32, numpy.float64, numpy.complex64, numpy.complex128],
}))
@testing.gpu
class TestInvh(unittest.TestCase):
@testing.numpy_cupy_allclose(at... | yuhc/ava-cupy | tests/cupyx_tests/linalg_tests/test_solve.py | test_solve.py | py | 1,643 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "unittest.TestCase",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "cupyx.linalg.invh",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "cupyx.linalg",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "numpy.lina... |
7628813408 | import requests
import logging
import config
logging.basicConfig(level=logging.INFO)
sozdatel = 1553644874
def dd():
kosh = (f'https://sms-activate.ru/stubs/handler_api.php?api_key={config.config("api_smsactivate")}&action=getBalance')
den_kosh = requests.get(kosh)
msg_ = den_kosh.text
msg_s = msg_[15... | Cicadadenis/sms-activate | bal.py | bal.py | py | 355 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.basicConfig",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "config.config",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.get",
"... |
9834274469 | from utils import *
from args import *
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.utils.weight_norm import WeightNorm
class BasicBlockWRN(nn.Module):
def __init__(self, in_planes, out_planes, stride, drop_rate):
super(BasicBlockWRN, self).__init__()
self.bn1 = ... | ybendou/easy | wideresnet.py | wideresnet.py | py | 3,912 | python | en | code | 87 | github-code | 21 | [
{
"api_name": "torch.nn.Module",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "torch.nn.BatchNorm2d",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line... |
73400640371 |
import gym
import numpy as np
def evaluate_given_parameter_by_sign(env, weight):
observation = env.reset()
total_reward = 0.
for t in range(1000):
env.render()
weighted_sum = np.dot(weight, observation)
if weighted_sum >= 0:
action = 1
else:
action =... | chenrudan/deep-learning | rl/cartpole/random_guess_hill_climbing.py | random_guess_hill_climbing.py | py | 1,631 | python | en | code | 33 | github-code | 21 | [
{
"api_name": "numpy.dot",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "gym.make",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number"... |
6708152928 | import os
from typing import List, Set
import numpy as np
import pyabf
from ordered_set import OrderedSet
from pyabf import ABF
from src.metadata.data_classes.basic_data import BasicData
from src.metadata.data_classes.data_group import DataGroup
from src.metadata.meta_data import MetaData
from src.file_handlers.specifi... | Elements-SRL/EDA_python | src/file_handlers/specific_handlers/edh_handler.py | edh_handler.py | py | 4,455 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "src.metadata.meta_data.MetaData",
"line_number": 13,
"usage_type": "name"
},
{
"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.... |
72794895732 | import numpy as np
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
import os
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument('--input', help="File containing input pointcloud")
parser.add_argument('--checkdir', help="Directory to save checkpoints to")
parser.add_argument('-... | jonmarty/hemimap | hemimap-genoutputpoints.py | hemimap-genoutputpoints.py | py | 1,135 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "tensorflow.compat.v1.disable_v2_behavior",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "tensorflow.compat.v1",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "call"
},
{
... |
26718672877 | import cv2 as cv
import numpy as np
from cvzone.HandTrackingModule import HandDetector
import sounddevice as sd
import soundfile as sf
from threading import Thread
import random
import time
# Extract data and sampling rate from file
array, smp_rt = sf.read('hit.wav', dtype = np.int16)
window = "Ping Pong"
cap = cv.Vi... | nhlamulo-maluleka/Virtual-Ping-Pong | pong.py | pong.py | py | 9,211 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "soundfile.read",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.int16",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cvzone.HandTrackingM... |
23647002139 | import os
import numpy as np
from flask import Flask, request, render_template, flash, redirect
from werkzeug.utils import secure_filename
#from tensorflow import keras
from google.cloud import automl
# Get the model variables
project_id = "automl-model-293309"
model_id = "ICN1182672090231209984"
# Import the doggy ... | harryshu1997/CloudComputing_Final | web.py | web.py | py | 3,200 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "google.cloud.automl.PredictionServiceClient",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "google.cloud.automl",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "google.cloud.automl.AutoMlClient.model_path",
"line_number": 17,
"usage_t... |
30617964979 | import os, sys, warnings, argparse, numpy as np
from osgeo import gdal, gdalconst, ogr, osr
class MessageProgressStdOut:
def __init__(self, total, showValue=False):
"""
total: total of elements
showValue: If True, write value
"""
self.total = total
self.count = 0
if showValue:
sel... | lmotta/scripts-for-gis | segmentation_values.py | segmentation_values.py | py | 7,262 | python | en | code | 15 | github-code | 21 | [
{
"api_name": "sys.stdout.write",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "sys.stdout.flush",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"l... |
11651872671 | import torch
import torch.nn as nn
import torch.nn.functional as F
from .build_loss import register_loss
@register_loss
class BinaryCrossEntropy(nn.Module):
def __init__(self, pred_name, target_name, loss_weight,
display_name=None, display_tqdm=False, smooth_factor=None,
neg_sam... | achilleess/inca_digital_challenge | bot_detector/losses/bce_loss.py | bce_loss.py | py | 1,568 | python | en | code | 0 | 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": "torch.nn.BCELoss",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_num... |
5438924849 | # list of helper functions
import matplotlib.pyplot as plt
import numpy as np
import scipy as sp
def drop_labels(df):
return df.drop(columns=['subject', 'Activity'])
def convert_categories(row):
conv_dict = {"LAYING": 'NOT_MOVING', "STANDING": 'NOT_MOVING', "SITTING": 'NOT_MOVING',
"WALKING... | Allen-Z-4230/Human-Activity-Classification | utils.py | utils.py | py | 1,773 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.gca",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "numpy.linspace",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.linspace... |
20870448788 | from flask import Flask, g, jsonify, request
import psycopg2
app = Flask(__name__)
# Configuración de la conexión a la base de datos
def get_db():
db = getattr(g, '_database', None)
if db is None:
db = psycopg2.connect(
user="postgres",
... | alexdc1192/books | main.py | main.py | py | 3,136 | python | es | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "flask.g",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "psycopg2.connect",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.g",
"line_number": 2... |
70015731252 | from bs4 import BeautifulSoup
html = """
<div class="panel">
<div class="panel-heading">
<h4>Hello</h4>
</div>
<div class="panel-body">
<ul class="list" id="list-1" name="elements">
<li class="element">Foo</li>
<li class="element">Bar</li>
<li class="elem... | zgy3234748729/learnSpider | ch3/3_2/8_方法选择器.py | 8_方法选择器.py | py | 1,337 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 23,
"usage_type": "call"
}
] |
8733109521 | import os
import random
import string
import subprocess
import pytest
from checkout import checkout_positive
import yaml
from datetime import *
with open('config.yaml') as f:
data = yaml.safe_load(f)
@pytest.fixture()
def make_folders():
return checkout_positive("mkdir {} {} {} {}".format(data["folder_in"]... | KiriLLLLLLLL/Auto_Test_PY | Lesson3/conftest.py | conftest.py | py | 3,062 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "yaml.safe_load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "checkout.checkout_positive",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "checkout.che... |
31235500381 | import face_recognition
import numpy as np
def detect_face(image):
'''
Input: images co dang numpy.ndarray, shape=(W,H,3)
Output: [(y0,x1,y1,x0),(y0,x1,y1,x0),...,(y0,x1,y1,x0)] moi tuple dai dien cho mot khuon mat duoc phat hien
Neu khong co gi duoc phat hien --> Output: []
'''
Output = face... | tienanh28122000/Face_Infomation | my_face_recognition/f_face_recognition.py | f_face_recognition.py | py | 1,735 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "face_recognition.face_locations",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "face_recognition.face_encodings",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "face_recognition.face_distance",
"line_number": 38,
"usage_type": "call"
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.