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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
41960896046 | import sys
import traceback
from console import Console
from gui import Gui
from grade import Grade
from ui import Ui
from random import randint
from typing import Callable
def setup_new_secret_num(required_len_of_num: int) -> str:
secret_num = ''
for _ in range(required_len_of_num):
se... | axelbunt/color-logic | main.py | main.py | py | 2,280 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "random.randint",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "grade.Grade",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "grade.Grade",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "ui.Ui",
"line_number": 39,... |
71590727732 | from ..scopes import Scope
from ..ast_nodes import *
from ..utils import Singleton
from ..visitor import visitor
from ..keywords import KEYWORDS
from .exceptions import *
from ..builtin.functions.definition import BuiltinFunctionDef
from ..builtin.types import DSLBoolean, DSLType, get_array_type
class SemanticChecker... | erick-tcsder/text-parser-dsl | textp/semantics/semantic_checker.py | semantic_checker.py | py | 8,085 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "utils.Singleton",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "scopes.Scope",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "keywords.KEYWORDS",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "scopes.Scope",
"li... |
42041908262 |
import tkinter as tk
import tkinter.font as tkFont
from PIL import Image, ImageTk
import argparse
import os
import sys
from pathlib import Path
import cv2
import torch
import torch.backends.cudnn as cudnn
import mysql.connector
from datetime import datetime
import serial
ser = serial.Serial(port='COM4', baudra... | mertonur/Buzdolabi-Asistan | Buzdolabı Asistan/detect.py | detect.py | py | 29,396 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "serial.Serial",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "tkinter.Tk",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "tkinter.Label",
"line_number"... |
18410459837 | import os
import re
import cv2
import pickle
import numpy as np
from tqdm import tqdm
from PIL import Image
import matplotlib.pyplot as plt
import logging
def set_global_logging_level(level=logging.ERROR, prefices=[""]):
prefix_re = re.compile(fr'^(?:{ "|".join(prefices) })')
for name in logging.root.manager.l... | hukz18/dift_cr | eval_single.py | eval_single.py | py | 7,400 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.ERROR",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "re.compile",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "logging.root",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "re.match",
"line_... |
21297970575 | import time
import serial
from unicodeToChar import unicodeToChar
# unicodeToChar.unicodeToChar()
# configure the serial connections (the parameters differs on the device you are connecting to)
ser = serial.Serial(
port='COM7',
baudrate=115200
)
ser.isOpen()
print ('Enter your commands below.\r\nInsert "exit... | mrluaf/gsm-nodejs | gm.py | gm.py | py | 1,153 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "serial.Serial",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 25... |
72939223734 | import numpy as np
import matplotlib.pyplot as plt
X = np.array([float(line.split(',')[0]) for line in open('ex1data1.txt').read().strip().split('\n')])
Y = np.array([float(line.split(',')[1]) for line in open('ex1data1.txt').read().strip().split('\n')])
def evaluate(genotype):
w, b = ... *genotype
return ... | hai98th/KTLT | learnGA/demo.py | demo.py | py | 367 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "numpy.array",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.scatter",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
... |
28006015416 | """pytesseract识别图形验证码"""
# 应该是安装pytesseract包,安装tesseract包不合适
# 删除包代码:pip uninstall tesseract
# pip install pytesseract
import pytesseract
from PIL import Image
image = Image.open('Python_learning/CheckCode_01.jpg')
text = pytesseract.image_to_string(image)
print(text)
image = Image.open('Python_learning/CheckCode_02.... | pkubruce/Test_For_Practice | Python_learning/lesson7_example.2.py | lesson7_example.2.py | py | 1,103 | python | zh | code | 0 | github-code | 21 | [
{
"api_name": "PIL.Image.open",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "pytesseract.image_to_string",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
... |
37482828924 | from bokeh.plotting import figure, show
from bokeh.models import ColumnDataSource, CDSView, GroupFilter
from bokeh.layouts import gridplot
import pandas as pd
data = pd.read_csv("baseball.csv")
print(data.head())
print(len(pd.unique(data['name'])))
colormap = {'R': 'red', 'L': 'green', 'B' : 'blue'}
colors = [color... | abinjawed/Data-Visualization | Revised.py | Revised.py | py | 3,827 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pandas.unique",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "bokeh.models.ColumnDataSource",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "bokeh.plot... |
27944452160 | #!/usr/bin/env python
import sys, re
from collections import Counter
from itertools import chain
lines = sorted(sys.stdin.readlines())
guard_sleeps = {}
for line in lines:
line = line.rstrip()
if line.endswith('begins shift'):
id_str = re.findall(r'\d{2}:\d{2}.*#(\d+)', line)[0]
id_ = int(id_s... | janosgyerik/advent-of-code | 2018/day4/part1.py | part1.py | py | 843 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.stdin.readlines",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "re.findall",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_nu... |
24981914635 | #Python imports
import datetime
import time
import json
import requests
#Django imports
from django.shortcuts import render
from django.http import HttpResponse, JsonResponse
from django.views.generic import View
from django.core import serializers
from django.views.decorators.csrf import csrf_exempt
#REST framewor... | RawalD/Django-REST-API | weather/views.py | views.py | py | 6,244 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.views.generic.View",
"line_number": 52,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.render",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "datetime.date.today",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": ... |
30261316711 | #!/usr/bin/env python
import numpy as np
import os
import sirepo.numpy
import sirepo.sim_data.ml
import h5py
# from sklearn.preprocessing import RobustScaler
# def read_data(data_reader, data_path, **kwargs):
# return sirepo.numpy.ndarray_from_ctx(
# data_reader.data_context_manager(data_path),
# ... | moellep/ml | CIFAR-small.py | CIFAR-small.py | py | 9,217 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "h5py.File",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 99,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 101,
"usage_type": "call"
... |
13513236912 | from os.path import abspath, dirname, join, normpath
import sys
curdir = dirname(abspath(__file__))
src = normpath(join(curdir, '..', '..', '..', '..', '..', 'src'))
sys.path.insert(0, src)
from robot.utils.encoding import CONSOLE_ENCODING, SYSTEM_ENCODING
config = dict(arg.split(':') for arg in sys.argv[1:])
stdou... | robotframework/robotframework | atest/testdata/standard_libraries/process/files/encoding.py | encoding.py | py | 641 | python | en | code | 8,521 | github-code | 21 | [
{
"api_name": "os.path.dirname",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.path.normpath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"lin... |
22186706224 | """This searches for trending topics in a specified location."""
import tweepy
# Authenticate to Twitter and instantiate API.
auth = tweepy.OAuthHandler(API_KEY, API_KEY_SECRET)
auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
api = tweepy.API(auth)
# id – The Yahoo! Where On Earth ID of the location to retur... | jackirvine97/twitter_analysis | examples/trends_by_location.py | trends_by_location.py | py | 464 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "tweepy.OAuthHandler",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "tweepy.API",
"line_number": 7,
"usage_type": "call"
}
] |
4848200849 | import datetime
from timeit import default_timer
import requests
from cogs.utils.chat_formatting import *
from hypixel.utils.functions import *
class Verfiy(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.utils = utils(self.bot)
@commands.command(hidden=True, enabled=False)
... | HypixelBot/bot | hypixel/guild.py | guild.py | py | 14,367 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "datetime.datetime.now",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "requests.Session",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "timeit.... |
32431409653 | """empty message
Revision ID: 840976c3c01d
Revises: 6e57341445f3
Create Date: 2016-06-05 16:28:16.809668
"""
# revision identifiers, used by Alembic.
revision = '840976c3c01d'
down_revision = '6e57341445f3'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - ... | tcbthai/shopping | migrations/versions/840976c3c01d_.py | 840976c3c01d_.py | py | 1,708 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "alembic.op.create_table",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integ... |
8046393044 | import json
import re
from datetime import date
class Persistable:
def __init__(self, file_name, cls):
self.file_name = file_name
self.cls = cls
def append(self, item):
raise NotImplementedError('Method append(self, item) should be overriden by descendants')
def save(self):
... | iproduct/intro-python | sdp-2023-01-oop/dao/persistable.py | persistable.py | py | 965 | python | en | code | 6 | github-code | 21 | [
{
"api_name": "json.dump",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 17,
"usage_type": "argument"
},
{
"api_name": "json.load",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 2... |
29215743382 | import sqlite3
import matplotlib.pyplot as plt
import numpy as np
Connection = sqlite3.connect('life.db')
curs = Connection.cursor()
#drop NULL value
sql_command = '''
DELETE FROM life
where lifeexpectancy IS NULL
OR GDPpercapita IS NULL
'''
sql_command2 ='''SELECT Entity, Lifeexpectancy, GDPpercapita, ... | Namphong01/Visualization | life_expectancy.py | life_expectancy.py | py | 1,505 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sqlite3.connect",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.asfarray",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.asfarray",
"line_... |
35365148035 | # Example : https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3.html
import os
import sys
import threading
import boto3
class ProgressPercentage(object):
def __init__(self, filename):
self._filename = filename
self._size = float(os.path.getsize(filename))
self._seen_so_far = ... | gubbas/scimont-2019-challenge | stand_alone/s3_upload_file.py | s3_upload_file.py | py | 1,224 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.getsize",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "threading.Lock",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sys.stdout.write",
"l... |
36877234600 |
import os
import sys
import time
import json
import torch
from abc import abstractmethod
from typing import Optional, Any, Callable, Dict, Iterable, List, Union
from dataclasses import dataclass
from torch.utils.data import DataLoader, Dataset
from torch.nn.utils.rnn import pad_sequence
from torchtyping import Tensor... | sunzeyeah/RLHF | src/data/pipeline.py | pipeline.py | py | 11,653 | python | en | code | 257 | github-code | 21 | [
{
"api_name": "typing.Dict",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "typing.Iterable",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "torchtyping.TensorT... |
21925490999 | def getVerifierForParameter(parameter):
'''
Returns the initializer name for a parameter (i.e. _valueInitialized for a parameter 'value')
'''
return '_%sInitialized' % parameter.name
class SourceCodeWriter:
'''
Base class for SourceWriter and HeaderWriter. Provides useful methods for writing source code with.
... | ptitSeb/zandronum | protocolspec/generator/codegenerator.py | codegenerator.py | py | 17,489 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "re.search",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "itertools.count",
"line_number": 94,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 474,
"usage_type": "call"
},
{
"api_name": "spec.NetworkSpec",... |
33044242763 | import logging
from typing import Any
from fastapi import APIRouter, HTTPException, status, Request
from barcode_api.deps.auth import JKPUserInfo
from barcode_api.deps.common import Service
from barcode_api.schemas import ShoppingListItemResponse, ShoppingListItemBody, ShoppingListItemCreate
from barcode_api.schemas.... | Mewelopers/barcode-api | barcode_api/api/v1/routes/shopping_list.py | shopping_list.py | py | 5,629 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "barcode_api.schemas.user.User",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "bar... |
37994942967 | from twisted.python import log
import sys
import configparser
class Colorized(log.FileLogObserver):
def emit(self, eventDict):
self.write("\033[3m")
if eventDict["isError"]:
self.write("\033[91m") #Rouge
if not eventDict["isError"]:
self.write("\033[92m") #Bleu
... | Fanboooy/projet_tutore | Aqua/core/config.py | config.py | py | 688 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "twisted.python.log.FileLogObserver",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "twisted.python.log",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "twisted.python.log.FileLogObserver.emit",
"line_number": 14,
"usage_type": "call... |
30132605765 | import numpy as np
from numpy.linalg import cholesky
import matplotlib.pyplot as plt
import random
def get_data():
sampleNo=200
mu=np.array([[1,5]])
sigma=np.array([[2,0],[0,3]])
R=cholesky(sigma)
s1=np.dot(np.random.randn(sampleNo,2),R)+mu
# plt.scatter(s1[:,0],s1[:,1])
mu = ... | Davidzhou19/medical-image | K_Means++.py | K_Means++.py | py | 3,805 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "numpy.array",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.linalg.cholesky",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.dot",
"line_num... |
16835892723 | """
@authors: Juan L. Trincado
@email: juanluis.trincado@upf.edu
A5_A3_ePydoor.py: get significant alternative splice site events
"""
from lib.A5_A3.extract_exonized_junctions import *
from lib.A5_A3.get_reads_exonizations import *
from lib.A5_A3.overlap_with_repeats import *
from lib.A5_A3.get_significant_exonizatio... | comprna/ePydoor | A5_A3_ePydoor_part1.py | A5_A3_ePydoor_part1.py | py | 16,652 | python | en | code | 6 | github-code | 21 | [
{
"api_name": "itertools.chain",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "itertools.islice",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 167,
"usage_type": "call"
},
{
"api_name": "os.path",
"line... |
25610115891 | from bs4 import BeautifulSoup
import requests
BASE_URL = 'http://www.basketball-reference.com/'
def get_soup(url):
html = requests.get(url).text
soup = BeautifulSoup(html, 'html5lib')
return soup
def get_player_links():
url = BASE_URL + 'leagues/NBA_2018_per_game.html'
soup = get_soup(url)
p... | mlaponsky/br_scraper | salary_scrape.py | salary_scrape.py | py | 698 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 8,
"usage_type": "call"
}
] |
23738139429 | #! /usr/env/python
"""
A class used to create and manage regular square raster
grids for 2D numerical models in Landlab.
Getting Information about a Grid
--------------------------------
The following attributes, properties, and methods provide data about a
RasterModelGrid, its geometry, and the connectivity among the... | David-Loibl/landlab | landlab/grid/raster.py | raster.py | py | 228,948 | python | en | code | null | github-code | 21 | [
{
"api_name": "base.CORE_NODE",
"line_number": 526,
"usage_type": "name"
},
{
"api_name": "base.CORE_NODE",
"line_number": 533,
"usage_type": "name"
},
{
"api_name": "landlab.utils.decorators.deprecated",
"line_number": 504,
"usage_type": "call"
},
{
"api_name": "... |
73767459894 | from azure.cognitiveservices.vision.computervision import ComputerVisionClient
from msrest.authentication import CognitiveServicesCredentials
from os import environ
def get_caption(description) -> str:
captions: list[str] = description.captions
return f"I am {captions[0].confidence * 100:.2f}% certain that th... | EvelynVoce/AI-Chatbot | cognitive_azure.py | cognitive_azure.py | py | 876 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.environ",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "os.environ",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "azure.cognitiveservices.vision.computervision.ComputerVisionClient",
"line_number": 17,
"usage_type": "call"
},
... |
31540847666 | import logging
from .cge_weather_coordinator import CgeWeatherCoordinator
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.device_registry import DeviceEntryType
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.h... | luyzfernando08/ha-cgesp | custom_components/cgesp/weather.py | weather.py | py | 3,412 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "homeassistant.core.HomeAssistant",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "homeassistant.config_entries.ConfigEntry",
"line_number": 18,
"usage_type": "name"
}... |
21387558333 | from django.shortcuts import render
from django.http import HttpResponse
from common.models import Users,Compinfo,Feedback
from django.views.generic import View
from datetime import datetime
from django.shortcuts import redirect
from django.core.urlresolvers import reverse
from django.core.paginator import Paginator
fr... | wangqcl/naster | HqMonitor/web/views/messag.py | messag.py | py | 4,098 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "common.models.Users.objects.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "common.models.Users.objects",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "common.models.Users",
"line_number": 14,
"usage_type": "name"
},
{
... |
9228249831 | """
Reproduce results in spherical manifold from the paper:
Aggarwal, C. C., & Yu, P. S.(2001, May).
Outlier detection for high dimensional data.
In Proceedings of the 2001 ACM SIGMOD international conference
on Management of data (pp. 37-46).
"""
import os
import time
import matplotlib.pyplot as plt
# import Ax... | ed-ortizm/topological-curse-of-dimensionality | spheres/spheres.py | spheres.py | py | 2,245 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.random.seed",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "time.perf_counter",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path.exists"... |
28266813601 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 23 12:48:47 2022
@author: nathanwilliams
"""
import networkx as nx
import time
from operator import itemgetter
def MDG(G):
"""
Parameters
----------
G : Graph
Returns
-------
len(C): integer
The Total Number o... | gpark98/Minimum-Vertex-Cover | Heuristics/MDG_V4.py | MDG_V4.py | py | 2,270 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "operator.itemgetter",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "networkx.Graph",
"line_number": 88,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 89,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_nu... |
73117079733 | from datetime import datetime
import vk_api
from vk_api.exceptions import ApiError
from config import access_token
class VkTools:
def __init__(self, access_token):
self.vkapi = vk_api.VkApi(token=access_token)
self.searchYearRange = 1
self.worksheetsPerPage = 3
self.photosPerPage =... | suzerainelias/PROJECT_VKINDER | main.py | main.py | py | 3,067 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "vk_api.VkApi",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "config.access_token",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.now",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.datetim... |
2655912711 | from collections import defaultdict
from typing import List
class Solution:
def majorityElement(self, nums: List[int]) -> int:
"""
O(n) time, O(1) space.
Runtime: 227 ms, faster than 50.36% of Python3 online submissions for Majority Element.
Memory Usage: 15.5 MB, less than 81.81%... | IAjimi/Leetcode | 169_Majority_Element.py | 169_Majority_Element.py | py | 1,301 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "collections.defaultdict",
"line_number": 36,
"usage_type": "call"
}
] |
24958057115 | from django.shortcuts import render
from movies.models import Movies,Studio,Director,Windows
from movies.forms import MoviesForm,StudioForm,DirectorForm
from django.views.generic import DeleteView
from django.contrib.auth.decorators import login_required
def index(request):
window =Windows.objects.filter(name__co... | Gastydiaz/final_proyect | entregable_final/movies/views.py | views.py | py | 8,921 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "movies.models.Windows.objects.filter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "movies.models.Windows.objects",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "movies.models.Windows",
"line_number": 9,
"usage_type": "name"
},... |
41354717996 | import os
import sys
# TODO: remove it when basicts can be installed by pip
sys.path.append(os.path.abspath(__file__ + "/../../.."))
from easydict import EasyDict
from basicts.losses import masked_mae
from basicts.archs import TSWav2Vec
from basicts.runners import TsWav2VecRunner
from basicts.data import TimeSeriesFo... | hlhang9527/KNN-MTS | examples/TsWav2Vec/TSWav2Vec_PEMS04.py | TSWav2Vec_PEMS04.py | py | 2,999 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.path.append",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
31451084879 | from __future__ import absolute_import
import importlib
import tensorflow as tf
from ntm_cell import NTMCell
from ntm import NTM
flags = tf.app.flags
flags.DEFINE_string("task", "copy", "Task to run [copy, recall]")
flags.DEFINE_integer("epoch", 100000, "Epoch to train [100000]")
flags.DEFINE_integer("input_dim", 10,... | youknowone/brainfuck-ntm | brainfuck_main.py | brainfuck_main.py | py | 3,821 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "tensorflow.app",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "ntm_cell.NTMCell",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "ntm.NTM",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "importlib.import_module",... |
71691482934 | from pyrogram import Client
from .config import Config
from .database import Database
class ScreenShotBot(Client):
def __init__(self):
super().__init__(
session_name=Config.SESSION_NAME,
bot_token = Config.BOT_TOKEN,
api_id = Config.API_ID,
api_hash = Conf... | Clinton-Abraham/SCREENSHOT-X-BOT | bot/screenshotbot.py | screenshotbot.py | py | 879 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "pyrogram.Client",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "config.Config.SESSION_NAME",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "config.Config",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "config.C... |
43869297891 | # Structure responsible for keeping game instance states: position, moves, etc
from enum import Enum
from typing import List, Tuple
import copy
class Column(Enum):
A = 0
B = 1
C = 2
D = 3
E = 4
F = 5
G = 6
H = 7
COLUMN = {
'A': 'a',
'B': 'b',
'C': 'c',
'D': 'd',
... | FogInTheFrog/duo-chess-gameserver | app/engine/chessEngine.py | chessEngine.py | py | 36,883 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "enum.Enum",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 53,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 94,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 301,
... |
18403506279 | import itertools; import math; import operator; import random; from bisect import *; from collections import deque, defaultdict, Counter, OrderedDict; from functools import reduce; from heapq import *; import unittest; from typing import List;
def get_sol(): return Solution()
class TreeNode:
def __init__(self, val=... | afzalsiddique/problem-solving | Problem_Solving_Python/leetcode/lc102.py | lc102.py | py | 1,638 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "collections.deque",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "collections.defaultdict",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "typing.List",
... |
10423543184 | from tkinter import*
import time
import pymysql
import cv2
import numpy as np
from collections import deque
from PIL import Image
pic=0
url_sign=r"C:\\Users\\Tanveer\\Documents\\Python\\Sign"
url_pic=r"C:\\Users\\Tanveer\\Documents\\Python\\DP"
url_sign1=r"C:\Users\Tanveer\Documents\Python\Sign"
url_pic1=r"C... | CO18353/OpenCV-Signature | final1.py | final1.py | py | 17,518 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "time.asctime",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "time.localtime",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number":... |
4488437646 | # -*- coding: utf-8 -*-
import scrapy
import logging
import re
from scrapy.selector import Selector
from ProgrammerQA.items import OschinaItem
class OschinaSpider(scrapy.Spider):
name = 'Oschina_spider'
domain = 'https://www.oschina.net/search'
def __init__(self, search='', *args, **kwargs):
supe... | kingboung/programmer-qa | ProgrammerQA/spiders/Oschina_spider.py | Oschina_spider.py | py | 2,450 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "scrapy.Spider",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "logging.info",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "scrapy.Request",
"line_... |
2138305605 | from kivymd.app import MDApp
from kivy.uix.screenmanager import Screen, ScreenManager
from kivy.garden.matplotlib.backend_kivyagg import FigureCanvasKivyAgg
from kivy.lang import Builder
from functions import *
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d
import cplot
Builder.load_f... | razavi1993/Kivy-plotter-app | plotter/main.py | main.py | py | 4,341 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "kivy.lang.Builder.load_file",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "kivy.lang.Builder",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "kivy.uix.screenmanager.ScreenManager",
"line_number": 12,
"usage_type": "name"
},
{
... |
35631417506 | # PCPG2 Agent
from ..network import *
from ..component import *
from .BaseAgent import *
import math, random, pdb, copy, sys
import numpy as np
from gym.spaces.discrete import Discrete
from gym.spaces.box import Box
from torch.utils.data import DataLoader, TensorDataset
import torch.nn.functional as F
import scipy
... | mbhenaff/PCPG | deep_rl/agent/PCPG2_agent.py | PCPG2_agent.py | py | 29,079 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "BaseAgent.__init__",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "torch.utils.data.tenso... |
23657641260 | from django.db import models
# Create your models here.
class Shop(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=30)
location = models.CharField(max_length=30)
age = models.IntegerField(null=True)
class Meta:
db_table = 'shop'
clas... | i11iaore1/lab3bd | models.py | models.py | py | 1,877 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.db.models.Model",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "django.db.models.AutoField",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "... |
70274501492 | import os
import pandas as pd
import numpy as np
import tweepy
from prefect import flatten, task, Flow
from prefect.tasks.notifications.email_task import EmailTask
from prefect.schedules import Schedule
from prefect.schedules.clocks import CronClock
TWEET_ATS = """Check out my latest blog: "{title}"!
Medium: {medium... | Ashton-Sidhu/prefect-home-automation | blog-tweeter/main.py | main.py | py | 1,977 | python | en | code | 5 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"... |
21963694378 | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 1 09:00:33 2016
@author: nancy
"""
from nltk.corpus import wordnet
def getSynonyms(text):
synonyms = []
for syn in wordnet.synsets(text):
for l in syn.lemmas():
synonyms.append(l.name())
return set(synonyms)
def getSimilarWords(text):
... | josnancy/semanticRetrieval | nltk_wordnet.py | nltk_wordnet.py | py | 497 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "nltk.corpus.wordnet.synsets",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.wordnet",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "nltk.corpus.wordnet.synsets",
"line_number": 19,
"usage_type": "call"
},
{
"api_n... |
73034958133 | from __future__ import print_function
import os
import os.path as op
import numpy as np
import warnings
from shutil import copyfile
from scipy import sparse
from nose.tools import assert_true, assert_raises
from numpy.testing import assert_array_equal, assert_allclose, assert_equal
from mne.datasets import testing
fro... | LiuFang816/SALSTM_py_data | python/mne-tools_mne-python/mne-python-master/mne/tests/test_surface.py | test_surface.py | py | 6,961 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "mne.datasets.testing.data_path",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "mne.datasets.testing",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.p... |
23202288650 | #!/usr/bin/env python
from check_warnings import suppress_warnings, check_list
suppress_warnings()
import tensorflow as tf
import argparse
import math
import os
from process import construct_images_labels, load_pandas, Data
def int64_feature(value):
return tf.train.Feature(int64_list=tf.train.Int64List(value=[v... | GeneKitamura/PTX | tf_record_conv.py | tf_record_conv.py | py | 3,458 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "check_warnings.suppress_warnings",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "tensorflow.train.Feature",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "tensorflow.train",
"line_number": 14,
"usage_type": "attribute"
},
{
"ap... |
70622409972 | # Baekjoon - 16235
import sys
from collections import deque
input = sys.stdin.readline
drdc = [(-1,-1), (-1,0), (-1,1), (0,-1), (0,1), (1,-1), (1,0), (1,1)]
N, M, K = map(int, input().split())
A = [list(map(int, input().split())) for __ in range(N)]
tree = [[deque([]) for __ in range(N)] for __ in range(N)]
ground = ... | ederror/algorithm-study | Baekjoon/16235.py | 16235.py | py | 1,579 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.stdin",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 10,
"usage_type": "call"
}
] |
41727823686 | from django.contrib.auth.models import User, Group
from django.db import IntegrityError
from django.test import TestCase
from hs_core import hydroshare
from hs_core.models import GroupOwnership, GenericResource
class TestUsersAPI(TestCase):
def setUp(self):
pass
def tearDown(self):
pass
... | hydroshare/hs_core | tests/api/native/test_users.py | test_users.py | py | 3,256 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "django.test.TestCase",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "hs_core.hydroshare.create_account",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "hs_core.hydroshare",
"line_number": 16,
"usage_type": "name"
},
{
"api_name... |
8555946290 |
from django.test import TestCase
from django.urls import reverse
from rango.models import Category
def add_cat(name,views,likes):
c = Category.objects.get_or_create(name=name)[0]
c.views = views
c.likes = likes
c.save()
return c
class CategoryMethodTests(TestCase):
def test_ensure_views_are... | IlyaES1989/rango | tango_with_django_project/rango/tests.py | tests.py | py | 1,347 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rango.models.Category.objects.get_or_create",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "rango.models.Category.objects",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "rango.models.Category",
"line_number": 8,
"usage_type": "nam... |
32252280033 | from matplotlib.patches import Patch
import matplotlib.pyplot as plt
import numpy as np
import csv, os
with open('data/env_stats.csv', newline='') as f:
reader = csv.reader(f)
data = list(reader)
temp = []
for row in data:
if row[2] == 'random-play':
temp.append(row)
elif row[1] == 'random-pla... | lewis-neal/rl-ee | src/plot_vs_random.py | plot_vs_random.py | py | 1,832 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "csv.reader",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.makedirs",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"li... |
6688281808 | import importlib.util
import os.path
#Modify to the location of your respmech.py:
rmpath = "/Users/emilnielsen/Documents/Medicin/Forskning/Code/RespMech/respmech.py"
if not os.path.isfile(rmpath): raise ValueError("respech.py not found at the specified location: [" + rmpath + "]")
spec = importlib.util.spec_from_file... | emilwalsted/respmech | example.py | example.py | py | 7,837 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "os.path.path.isfile",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "importlib.util.util.spec_f... |
42694722757 |
import requests
import pandas as pd
import numpy as np
#import plotly.graph_objects as go
import math
# Gaussian kernel density estimate for density plot
from scipy.stats import gaussian_kde
# List of lists to single list
from itertools import chain
import traceback
import requests
import datetime
import time
from ... | gpderetta/bokeh | bokeh-app/main.py | main.py | py | 15,331 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.Timedelta",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
... |
33898801963 | from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.aggregation_settings import AggregationSettings
T = TypeVar("T", bound="EventFilter")
@attr.s(auto_attribs=True)
class EventFilter:
r"""A notification... | milyord/sp-api | sp/notifications/models/event_filter.py | event_filter.py | py | 3,877 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "typing.TypeVar",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "typing.Union",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "types.Unset",
"li... |
535877902 | # This Python file uses the following encoding: utf-8
from PySide2.QtCore import QObject
from album import Album
from PySide2.QtWidgets import QTextEdit
class TextView(QObject):
def __init__(self, parent):
self.album = None
self.tracks = dict()
def setTracks(self, te : QTextEdit):
if s... | delleceste/qobuz-qt | textview.py | textview.py | py | 1,844 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "PySide2.QtCore.QObject",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "PySide2.QtWidgets.QTextEdit",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "album.Album",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "PySide2... |
5729584811 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import os
import json
import logging
from vfxpaths.global_config import Configuration, VFXPathBaseConfig
from vfxpaths.ability.path_env_resolve import resolve_real_path
log = logging.getLogger("vfxpaths.initialization")
def init_pattern_config():
"""Initialise wit... | VFXToolkits/vfxpaths | vfxpaths/initialization.py | initialization.py | py | 3,160 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "vfxpaths.global_conf... |
35058095208 | import json
import os
from dataclasses import dataclass
import numpy as np
import supervision as sv
import timm
import torch
from typing import Any
from autodistill.detection import CaptionOntology, DetectionBaseModel
from autodistill.helpers import load_image
HOME = os.path.expanduser("~")
DEVICE = torch.device("cu... | autodistill/autodistill-fastvit | autodistill_fastvit/fastvit.py | fastvit.py | py | 3,259 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.expanduser",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "torch.device",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available"... |
26139930134 | """Jupyter Integration."""
import ast
import socket
from os.path import join as pjoin
from urllib.parse import urljoin
import json
import re
import sys
import types
import time
from multiprocessing import Process
from IPython import get_ipython
from IPython.display import display, HTML, clear_output
from IPython.core... | jwkvam/bowtie | bowtie/_magic.py | _magic.py | py | 4,789 | python | en | code | 761 | github-code | 21 | [
{
"api_name": "re.search",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "ipykernel.connect.get_connection_file",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "ipykernel.connect",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name":... |
13539749647 | import numpy as np
import os.path
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from math import exp
from math import log
from pyspark import SparkConf
from pyspark import SparkContext
from pyspark.mllib.classification import LogisticRegressionWithSGD
from pyspark.mllib.linalg import SparseV... | sevmardi/ml-benchmark | criteo12g/solution-2/ctr.py | ctr.py | py | 7,640 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "matplotlib.use",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pyspark.mllib.linalg.SparseVector",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pyspark.mllib.regression.LabeledPoint",
"line_number": 35,
"usage_type": "call"
},
{
... |
44254906526 | """An evaluator script for pre-trained policies."""
import os
import sys
import argparse
import random
import numpy as np
import tensorflow as tf
import json
from copy import deepcopy
from skvideo.io import FFmpegWriter
from hbaselines.algorithms import RLAlgorithm
from hbaselines.fcnet.td3 import FeedForwardPolicy \
... | kbunal/h-baselines | experiments/run_eval.py | run_eval.py | py | 10,145 | python | en | code | null | github-code | 21 | [
{
"api_name": "hbaselines.fcnet.td3.FeedForwardPolicy",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "hbaselines.fcnet.sac.FeedForwardPolicy",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "hbaselines.goal_conditioned.td3.GoalConditionedPolicy",
"line_n... |
957610717 | import datetime
from unittest.mock import patch
import pandas as pd
from django.core.management import call_command
from django.test import TestCase as DJTest
from prisjakt.models import Prices, Products
class TestLoadPrice(DJTest):
def test_raises_without_input(self):
with self.assertRaises(RuntimeWarn... | mdhor/2021sp-final-project-mdhor | prisjakt/tests/test_commands.py | test_commands.py | py | 2,488 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.test.TestCase",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "django.core.management.call_command",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "unittest.mock.patch",
"line_number": 17,
"usage_type": "call"
},
{
"api_... |
29260835770 | from django.urls import path
from django.conf.urls import url, include
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('accounts/', include('django.contrib.auth.urls')),
url(r'^snippet/new/$', views.snippet_new, name='snippet_add'),
url(r'^snippet/edit/(?P<uid>[0-9]+)/$',... | gpolles/snippets | snippets/urls.py | urls.py | py | 946 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.include",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.conf.u... |
12969248888 | from django.contrib.auth import logout, login
from django.contrib.auth.views import LoginView
from django.contrib.auth.forms import AuthenticationForm
from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponse, HttpResponseNotFound, Http404
from django.urls import reverse_lazy... | Pro100grammist/beeradvocado | avocado/views.py | views.py | py | 6,252 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.views.generic.ListView",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "django.views.generic.ListView",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "django.contrib.auth.mixins.LoginRequiredMixin",
"line_number": 47,
"usage_typ... |
71034952054 | from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
# Create your models here.
class Supplier(models.Model):
name = models.CharField(max_length=50)
def __str__(self):
return self.name
class Ingredient(models.Model):
name = models.CharF... | dellysoul/foodapi | Healthynom/recipes/models.py | models.py | py | 1,869 | 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": "... |
42351112914 | # python active_clustering.py --dataset iris --num_clusters 3 --num_seeds 10
# python active_clustering.py --dataset 20_newsgroups_all --feature_extractor TFIDF --max-feedback-given 100 --num_clusters 20 --verbose
# python active_clustering.py --dataset 20_newsgroups_sim3 --feature_extractor TFIDF --max-feedback-gi... | viswavi/okb-canonicalization | clustering/active_clustering.py | active_clustering.py | py | 33,207 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "sys.path.extend",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 47,
"usage_type": "attribute"
},
{
"api_name": "os.getenv",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"line_n... |
70089210294 | import yaml
from typing import Dict, Any
def read_file(path: str) -> Dict[Any, str]:
result: Dict[str, Any] = {}
with open(path, 'r') as stream:
try:
result = yaml.load(stream)
except yaml.YAMLError as exc:
print(exc)
return result
| f-istvan/zitt | src/utils/file_utils.py | file_utils.py | py | 286 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.Dict",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "yaml.load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "yaml.YAMLError",
"line_number": 10,... |
11983694847 | from dataclasses import dataclass
from tbft.serialization.serializable import Serializable
@dataclass
class Exercise_Variation(Serializable):
__slots__ = ["name", "muscles_targeted", "performance", "notes"]
name: str
muscles_targeted: "list[list[str]]"
performance: "list[str]" # setXrepsX[weight]
... | peaceheis/tbft | tbft/activity/exercise_variation.py | exercise_variation.py | py | 549 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "tbft.serialization.serializable.Serializable",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 5,
"usage_type": "name"
}
] |
2475672041 | '''
Run kmeans analysis on simulated dataset
'''
from sklearn.cluster import KMeans
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d, Axes3D
import pandas as pd
from sklearn.datasets import make_blobs
from sklearn.mixture import GaussianMixture as GMM
from sklearn.metric... | edarraghford/CS229 | simulated_kmeans.py | simulated_kmeans.py | py | 2,838 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.loadtxt",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_n... |
15209219960 | from numpy import real
from sympy import symbols, Eq, solve
from datetime import datetime
from math import ceil
def resolve_interval(start: str, end: str, portion_size: int):
'''
Args:
Dates should be strings.
Interval should be an integer.
'''
f_start = datetime.strptime(start, "%Y-%m-%d")
... | Syreus868389/ukr_v2 | time_utils.py | time_utils.py | py | 822 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 13,
"usage_type": "call"
},
{
"api_name"... |
15358692674 | # cogs / test.py
from discord.ext import commands
import requests
import json
import discord
class Wink(commands.Cog):
def __init__(self, client):
self.client = client # sets the client variable so we can use it in cogs
@commands.command()
async def wink(self, ctx):
response = requests.get('https://some-rando... | divinity1437/osu-bot | cogs/wink.py | wink.py | py | 598 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "discord.ext.commands.Cog",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "discord... |
40098326596 | import logging
import sqlite3
from db_data import bakery, types
class DB_BakeryProducts:
conn = sqlite3.connect("bakery.db")
cur = conn.cursor()
def create_table(self):
self.cur.executescript("""
CREATE TABLE IF NOT EXISTS types(
id INTEGER PRIMARY KEY,
name TEXT ... | AndreyIzotov/vk_bot | db.py | db.py | py | 1,427 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sqlite3.connect",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "db_data.types",
"line_number": 48,
"usage_type": "argument"
},
{
"api_name": "db_data.bakery",
"l... |
31942924480 | from enum import Enum
from typing import List
from weaviate import Client
class TenantOperation(Enum):
ADD_TENANTS = "ADD_TENANTS"
LIST_TENANTS = "LIST_TENANT"
DELETE_TENANTS = "DELETE_TENANTS"
UPDATE_TENANTS = "UPDATE_TENANTS"
async def tenant_call(weaviate_client: Client, operation: TenantOperati... | shiqinlong/weaviate-demo | app/src/services/weaviate/tenant_operation.py | tenant_operation.py | py | 1,323 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "enum.Enum",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "weaviate.Client",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 14,
"usage_type": "name"
}
] |
42801970452 | import csv
import json
import logging
from functools import partial
from io import IOBase
from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Set
from airbyte_cdk.sources.file_based.config.csv_format import CsvFormat, QuotingBehavior
from airbyte_cdk.sources.file_based.config.file_based_stream_c... | JanneImmonen/FootballDataConnector | myenv/Lib/site-packages/airbyte_cdk/sources/file_based/file_types/csv_parser.py | csv_parser.py | py | 10,815 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.Mapping",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "airbyte_cdk.sources.file_based.config.csv_format.QuotingBehavior",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "airbyte_cdk.sources.file_based.config.csv_format.QuotingBehavior.... |
18314063691 | import os
from tkinter import *
from PIL import ImageTk, Image
from pygame import mixer
from tkinter import filedialog
from tkinter import ttk
from ttkthemes import themed_tk as tk
from mutagen.mp3 import MP3
import tkinter.messagebox
import threading
import time
# Functions for Widgets
def open_file():
global fi... | nisco22/music_player | nisco_player.py | nisco_player.py | py | 6,220 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "tkinter.filedialog.askopenfilename",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "tkinter.filedialog",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "os.path.basename",
"line_number": 24,
"usage_type": "call"
},
{
"api_name":... |
12256638471 | # 第一种 全排列返回
from itertools import permutations
class Solution:
def getPermutation(self, n: int, k: int) -> str:
arr = list(permutations([str(i) for i in range(1, n + 1)], n))
return "".join(arr[k - 1])
# 第二种 逆康托展开
class Solution:
def getPermutation(self, n: int, k: int) -> str:
fact = [... | PlutoaCharon/CodeExercise_Python | LeetCode/60. 第k个排列.py | 60. 第k个排列.py | py | 775 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "itertools.permutations",
"line_number": 5,
"usage_type": "call"
}
] |
30709906578 | import click, logging, time
from tenable.io import TenableIO
from .cscc import SecurityCommandCenter
from .transform import GoogleSCCIngest
from . import __version__
@click.command()
@click.option('--tio-access-key',
envvar='TIO_ACCESS_KEY', help='Tenable.io Access Key')
@click.option('--tio-secret-key',
envva... | tenable/integration-cscc | tenable_cscc/cli.py | cli.py | py | 2,750 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "logging.basicConfig",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "logging.WARNING",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "logging.basicConfig",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "logging.... |
9957449745 | import requests
import ast
import json as json_library
from os.path import join, dirname, abspath
from restfulpy.principal import JwtPrincipal
from restfulpy.orm import DBSession
from nanohttp import RestController, text, HttpFound, context, json, settings,\
HttpForbidden, HttpNotFound, HttpBadRequest
import goog... | mohammadsheikhian/urlshortener | urlshortener/controllers/auth.py | auth.py | py | 2,890 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_n... |
28634515084 | #!/usr/bin/env python
import os
import requests
import configparser
import pandas as pd
from functions import get_df_size, transform, check_database
from mapping import table_names, column_types_mysql
from pyspark.sql import SparkSession
# parse config.ini
config = configparser.ConfigParser()
config.read(os.path.dir... | saevrenk/dataengineering_capstone | etl.py | etl.py | py | 2,845 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "configparser.ConfigParser",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "pyspark.sql.Sp... |
18956048331 | from nox.lib.core import *
from nox.lib.util import *
from nox.lib.packet.ethernet import ethernet
from invariant import Invariant
from violation import Violation
import utils
class EateRouteInvariant(Invariant):
def __init__(self):
Invariant.__init__(self, "EateRoute")
self.packet_balance = 0
... | mcanini/nice | model_checker/invariants/eate_route_invariant.py | eate_route_invariant.py | py | 1,284 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "invariant.Invariant",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "invariant.Invariant.__init__",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "invariant.Invariant",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "... |
73336559731 | import pygame #this module pygame has the functionality to build a game
from pygame.sprite import Group #this class behaves like a list with some extra functionality
from settings import Settings
from ship import Ship# This imports classes
from game_stats import GameStats
from button import Button
import game_functions... | shulginmusic/alieninvasion | run_game.py | run_game.py | py | 1,967 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pygame.init",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "settings.Settings",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pygame.display"... |
73793378611 | #!/usr/bin/env python
# coding=utf-8
"""
streaming upload plugin for tornado.
can upload the file from "multipart/form-data",
save it into file system or mongodb, and set the metadata into request arguments.
"""
import tempfile
from tornado.escape import native_str, parse_qs_bytes
class StreamRequestBodyMixin(object... | lloydzhou/tornado-stream-upload | upload_mixin.py | upload_mixin.py | py | 5,521 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "tornado.escape.parse_qs_bytes",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "tornado.escape.native_str",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "tempfile.NamedTemporaryFile",
"line_number": 143,
"usage_type": "call"
}
] |
13282846573 | import csv
from termcolor import colored
from pyfiglet import figlet_format
import random
f = open('CoronaTweetsWithinLastMinute.csv')
csv_f = csv.reader(f)
tweets = []
for row in csv_f:
tweets.append(row[10])
def text_art(str):
result = figlet_format(str)
#color = input("Pick a color to display tweet ... | tatiana-villa/ICAM-VIS141---Tweet-ASCIIfier | Corona_Tweet_Asciifier.py | Corona_Tweet_Asciifier.py | py | 715 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "csv.reader",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pyfiglet.figlet_format",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "termcolor.colored",
... |
16230085803 | import os
import numpy as np
import matplotlib.pyplot as plt
def eavg(ls,a=0.8):
sum = 0
ls2 = []
for i in ls:
ls2.append(a*i+(1-a)*sum)
sum = ls2[-1]
return np.array(ls2)
def pdiff(ls,step=5):
ls2 = []
for i in range(len(ls)-step):
ls2.append( ls[i+step]... | chaudharyachint08/SRGAN | source/AnalyzeMetric.py | AnalyzeMetric.py | py | 2,161 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.array",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 27,... |
73535507893 | from flask import render_template, url_for, flash, redirect, request, abort
from website import app, db
from website.form import AddMovieForm, RemoveMovieForm
from website.models import Movies
from PIL import Image
import os
def save_picture(form_picture):
picture_path = os.path.join(app.root_path, "sta... | killerpanda101/VFLIX | Vflix/website/routes.py | routes.py | py | 2,190 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "website.app.root_path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "website.app",
... |
8780028676 | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as UserAdminBase
from django.utils.translation import gettext_lazy as _
from . import models
@admin.register(models.User)
class UserAdmin(UserAdminBase):
fieldsets = (
(None, {"fields": ("username", "password")}),
(_... | raspberry-jam-jar/advisor-dog-tail | api/users/admin.py | admin.py | py | 991 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.contrib.auth.admin.UserAdmin",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.utils.translation.gettext_lazy",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.utils.translation.gettext_lazy",
"line_number": 14,
"usag... |
11537595918 | from collections import OrderedDict
import numpy as np
import os
import re
_FIELDS = re.compile(r'["]{1}[^"]*["]{1}')
class AtfFile(object):
"""
Represents an Axon Text File (ATF) stored on disk.
This method provides access to the data stored in the ATF as well as any
meta data stored in the header... | CardiacModelling/tailored-ipsc-models | myokit/formats/axon/_atf.py | _atf.py | py | 9,767 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "re.compile",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "os.path.basename",
"line_n... |
33062758203 | #
# Database tools.
#
# Module includes tools for reading and loading data,
# executing SQL queries for various databases.
# Currently realized: SQLite, Teradata, Hive
#
import warnings
import pandas as pd
import sqlite3
import turbodbc
import puretransport
from pyhive import hive
import csv
import re
import os
impo... | anfrolov/dstools | src/db_tools.py | db_tools.py | py | 8,465 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "pandas.Series... |
31898041914 | # -*- coding: utf-8 -*-
"""
Created on Fri Feb 2 18:51:56 2018
@author: sadha
"""
import os
from collections import Counter
import random
import numpy as np
from sklearn.naive_bayes import GaussianNB, MultinomialNB
from sklearn.metrics import accuracy_score
from sklearn.svm import SVC, LinearSVC
def... | sadhave2511/Machine-Learning-Codes | Python/email Spam/Code.py | Code.py | py | 3,049 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_... |
595827321 | from PyQt6 import QtCore, QtGui, QtWidgets
class result_page(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(800, 480)
Form.setMinimumSize(QtCore.QSize(800, 480))
Form.setMaximumSize(QtCore.QSize(800, 480))
self.background = QtWidgets.QGraphicsView(parent=Form)
self.backg... | IvanArsenev/sdpo | pagesCode/eight_result_page.py | eight_result_page.py | py | 9,594 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "PyQt6.QtCore.QSize",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PyQt6.QtCore",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "PyQt6.QtCore.QSize",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PyQt6.QtCore",
"l... |
6923347630 | import os
import sys
from math import sqrt
PROJECT_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(PROJECT_PATH)
from measurement import Stopwatch
class CombinedNumber():
def __init__(self, nonsquare_positive_integer, extra_integer):
if type(nonsquare_... | ony3000/project-euler | problems_051to075/problem_066/solution.py | solution.py | py | 4,319 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.dirname",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"line... |
4182132720 | import pygame
from constants import WIDTH, HEIGHT, WHITE, BACKGROUND_COLOR, initial_player_positions, goals, scal
from player import Player, draw_players
from ball import Ball, draw_ball, draw_textured_ball
from utils import handle_input, handle_collision, update_positions, check_goal, check_game_over, draw_board, disp... | alihuuuntr/Marble-Soccer | main.py | main.py | py | 2,391 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pygame.init",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "constants.WIDTH"... |
24078104402 | from PySide6.QtCore import Qt,QSize
from PySide6.QtGui import QPalette, QColor,QAction,QIcon
from PySide6.QtWidgets import QWidget, QApplication, QMainWindow, QVBoxLayout, QHBoxLayout, QGridLayout, QStackedLayout, QPushButton, QTabWidget, QLabel,QToolBar,QStatusBar,QCheckBox
class VentanaPrincipal(QMainWindow):
... | Oscar-CR09/PySide | Barra_menu.py | Barra_menu.py | py | 3,444 | python | es | code | 2 | github-code | 21 | [
{
"api_name": "PySide6.QtWidgets.QMainWindow",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "PySide6.QtWidgets.QLabel",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "PySide6.QtCore.Qt.AlignCenter",
"line_number": 13,
"usage_type": "attribute"
},
... |
12601816412 | from web3 import Web3
from .utilities import bn_to_bytes8, hash_string, address_to_bytes32
from .constants import *
from .signer import Signer
from .interfaces import Order
class OrderSigner(Signer):
def __init__(self, network_id, orders_contract_address, domain="IsolatedTrader", version="1.0"):
super()._... | fireflyprotocol/firefly-client-python | src/firefly_exchange_client/order_signer.py | order_signer.py | py | 4,091 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "signer.Signer",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "utilities.bn_to_bytes8",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "web3.Web3.solidity_keccak",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "web3.We... |
71457597492 | # -*- coding: utf-8 -*-
import asyncio
from random import randint
from controller.constants import SERIAL_COMM_RESPONSE_TIMEOUT_SECONDS
from controller.utils import command_tracking
from controller.utils.command_tracking import CommandTracker
import pytest
@pytest.mark.asyncio
async def test_CommandTracker__add__set... | CuriBio/stingray-controller | controller/tests/utils/test_command_tracking.py | test_command_tracking.py | py | 3,664 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "controller.utils.command_tracking.asyncio",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "controller.utils.command_tracking",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "controller.utils.command_tracking.CommandTracker",
"line_num... |
4295653417 | import urllib.request,json
from .models import Source,Article
api_key = None
source_url = None
article_url = None
def configRequest(app):
global api_key,source_url,article_url
api_key = app.config['NEWS_API_KEY']
source_url = app.config['NEWS_API_SOURCE_URL']
article_url = app.config['NEWS_API_ARTICLE... | Benardakaka/News-App.com | app/requests.py | requests.py | py | 2,423 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 19,
"usage_type": "name"
},
{
"api_nam... |
47588069564 | import argparse
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import torch
from collections import OrderedDict
from torch import nn
from torch import optim
import torch.nn.functional as F
from torchvision import datasets, transforms, models
from PIL import Image
import json
parser = argparse.A... | coolkate3738/Image-classifier | train (2).py | train (2).py | py | 8,711 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms.Compose",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms",
"line_number": 34,
"usage_type": "name"
},
{
"api... |
19093152330 | import random
import discord
from discord.ext import commands
code = "XXX"
client = discord.Client
client = commands.Bot(command_prefix=">")
client.remove_command("help")
topics = ["How was you're day?","How are you guys?","What's one interesting thing that happened to you this week?","What's your morning routine... | Erwin-afk/Dodmail | main.py | main.py | py | 5,989 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "discord.Client",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands.Bot",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "discor... |
23307217651 | from gtts import gTTS
import subprocess as s
import sys
import vlc
from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
voz = gTTS("oi, sou Jegue! Posso ajudar?", lang="pt")
voz.save("voz.mp3")
falar = "voz.mp3"
tocar = vlc.MediaPlayer(falar)
tocar.play()
bot = ChatBot('Jegue')
bot = Cha... | MarcieL-Bezerra/Meus_Rascunhos | falando.py | falando.py | py | 1,371 | python | pt | code | 0 | github-code | 21 | [
{
"api_name": "gtts.gTTS",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "vlc.MediaPlayer",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "chatterbot.ChatBot",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "chatterbot.ChatBot",
... |
27273063137 | import os
import glob
import random
from tqdm.auto import tqdm
import json
from subprocess import Popen, PIPE, STDOUT, TimeoutExpired
import hashlib
from concurrent.futures import ThreadPoolExecutor, as_completed
import threading
import math
import zipfile
import concurrent.futures
import shutil
import time
import re
i... | harp-lab/Assemblage_dataset_cli | dataset_utils.py | dataset_utils.py | py | 14,431 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.basicConfig",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "os.path.isfile",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.