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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
34277415685 | # -*- coding: utf-8 -*-
import requests
import re
def get_fund(code):
url = "http://hq.sinajs.cn/list=%s" % code
res = requests.get(url).text
str_com = re.compile(r'\"(.*)\"')
result = str_com.findall(res)[0].split(',')
yesterday_closing = float(result[2])
now = float(result[3])
# 根据现价和昨日收... | LittlePanger/ding_robot | fund.py | fund.py | py | 911 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 9,
"usage_type": "call"
}
] |
18984647180 | from binaryninja import *
from . import operations
from . import config
import logging
class MLILResults():
def get_stack_trace(self):
stack_trace = "[PATH]"
stack_trace += "".join(["->" + func for func in config.stack])
return stack_trace
def check_results(self, expr, ssa_v... | thezdi/binaryninja | mysqlcluster/src/analyzers/mlilresults.py | mlilresults.py | py | 4,318 | python | en | code | 22 | github-code | 7 | [
{
"api_name": "logging.info",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_numbe... |
12786395061 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import os
import re
import itertools
import threading
import time
import sys
# In[2]:
cities = ['Dublin','Amsterdam','Madrid','Paris','Berlin','Milan','London','Barcelona','... | sergiomanzo/Choose_and_move | choose_and_move.py | choose_and_move.py | py | 7,805 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.read_csv",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
... |
19078498646 | import cv2
import numpy as np
def valueChanged(value):
pass
cv2.namedWindow("HSV")
cv2.resizeWindow("HSV", 640, 240)
cv2.createTrackbar("HUE MIN","HSV",0,179,valueChanged)
cv2.createTrackbar("HUE MAX","HSV",179,179,valueChanged)
cv2.createTrackbar("SAT MIN","HSV",0,255,valueChanged)
cv2.createTrackbar(... | DRSH-KN/OpenCV_Self_Driving_Car | hsvColorPicker.py | hsvColorPicker.py | py | 1,774 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cv2.namedWindow",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.resizeWindow",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.createTrackbar",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.createTrackbar",... |
29082401458 | import enum
from typing import *
from pydantic import BaseModel, Field
from normalize.utils.clean import clean_whitespace
from normalize.utils.clean import convert_ch_symbols_to_en
class DegreeName(enum.Enum):
PRIMARY = '小学'
JUNIOR_HIGH = '初中'
HIGH = '高中'
SECONDARY = '中专'
COLLEGE = '大专'
SPEC... | ELMEM/text2sql | normalize/degree.py | degree.py | py | 5,547 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "enum.Enum",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pydantic.BaseModel",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "pydantic.Field",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "pydantic.Field",
... |
70397608543 | import sys
from collections import defaultdict
import re
def stripped_lines(filename):
with open(filename) as f:
for line in f.readlines():
yield line.strip()
def parse_file(filename):
lines = list(stripped_lines(filename))
state = 0
rules = defaultdict(list)
messages = []
... | justinjhendrick/advent_of_code_2020 | day19/main.py | main.py | py | 2,227 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "collections.defaultdict",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 82,
"usage_type": "attribute"
}
] |
16880042346 | import io
import json
import os
import shutil
import subprocess
import sys
# Read in the version number from the package.json file
with io.open('package.json', 'r', encoding='utf-8') as data_file:
packageInfo = json.loads(data_file.read())
versionNumber = packageInfo["version"]
# Clean and build the java portion
... | psexton/missing-http | release_preflight.py | release_preflight.py | py | 1,333 | python | en | code | 8 | github-code | 7 | [
{
"api_name": "io.open",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "subprocess.check_call",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number"... |
23443870943 | # Created 20 Dec 2019
import json
import os
import unittest
import pandas as pd
import pandas.testing as pd_testing
from src.securityAnalysis.utils_finance import calculate_security_returns
market_data_dir = f"{os.path.dirname(os.path.abspath(__file__))}/data"
class TestSecurities(unittest.TestCase):
"""Unit ... | philip-papasavvas/src | src/tests/tests_utils.py | tests_utils.py | py | 1,298 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.path.dirname",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "unittest.TestCase",
... |
29291422680 | #!/usr/bin/python3
import sys, getopt
from pymysql import connect, err, sys, cursors
import pandas as pd
import re
class SQLfunc:
global conn, cursor;
conn = connect(host = 'localhost',
user = 'xchen',
passwd = 'f0029mc');
cursor = conn.cursor( cursors.DictCursor );
def help(self, str... | mascoma/IC_project_scripts | sqlfun_class.py | sqlfun_class.py | py | 10,928 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pymysql.connect",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pymysql.cursors.DictCursor",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pymysql.cursors",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "re.sea... |
5153396229 | from detection import object_detection
from utils import visualization_utils as vis_util
import tensorflow as tf
import numpy as np
import cv2
#webcam capture
#cap = cv2.VideoCapture(1)
#video from disk
cap = cv2.VideoCapture('./IpfMyc2OrSs.avi')
detection = object_detection()
def convert_gray_video():
while(Tru... | kevinlin91/video_capture | video_capture_test.py | video_capture_test.py | py | 1,973 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "detection.object_detection",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BG... |
39815415433 | import re
import emoji
import pandas as pd
from tqdm import tqdm
def read_csv(csvfile):
df = pd.read_csv(csvfile)
return df
def basic_clean(text):
#筛除无价值内容
text = text.replace("@ ", "@") # 统一转发格式
text = re.sub(r"(回复)?(//)?\s*@\S*?\s*(:| |$)", " ", text) # 去除正文中的@和回复/转发中的用户名
... | Schwarz-Fuchs/DepressionRecognition_demo_Weibo | data_cleaners/text_clean_unit.py | text_clean_unit.py | py | 5,734 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 17,
"usa... |
19625192820 | import time
import json
import logging
import sqlite3
from web3 import Web3, HTTPProvider
from web3.exceptions import BlockNotFound
from web3.middleware import geth_poa_middleware
logging.basicConfig(
filename='/var/log/scanner/scanner.log',
format='%(asctime)s - %(levelname)s - %(message)s',
level=loggin... | mattmartinez/eyepee | blockchain_scanner.py | blockchain_scanner.py | py | 3,694 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "web3.Web3",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "web3.HTTPProvider",
... |
14469197037 | from datetime import datetime
import auth_reddit
import add_saved_media
import get_user_agent
import pull_proxy_list
import auth_reddit
import remove_saved_media
import write_filenames_to_text_file
import get_keys_to_scrape
import os
import requests
import traceback
from bs4 import BeautifulSoup
from datetime import da... | aaronkcarpenter/OOP-Sub-Analyzer | reddit/scrape_additional_page_v2.py | scrape_additional_page_v2.py | py | 7,558 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "datetime.datetime.now",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "add_saved_media.AddMedia",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "date... |
32341215405 | from multiprocessing import Pool
# from itertools import product
import json
import csv
import sys, getopt
import cplex
import os
from os import path, listdir
import fnmatch
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from timeit import default_timer as timer
from gens... | marcocaserta/tm | multi/doc2Vec.py | doc2Vec.py | py | 26,761 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "nltk.corpus.stopwords.words",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "os.path.expanduser",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "... |
1171486007 | # -*- coding: utf-8 -*-
import pyaudio
import wave
import numpy as np
def audioRecord(filename, time=0):
CHUNK = 512
FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 48000
RECORD_SECONDS = time
WAVE_OUTPUT_FILENAME = filename
p = pyaudio.PyAudio()
stream = p.open(format=FORMAT,
... | GaryBigpig/AUDIO | AudioClassification/audioRecord.py | audioRecord.py | py | 1,015 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pyaudio.paInt16",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pyaudio.PyAudio",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "wave.open",
"line_number": 30,
"usage_type": "call"
}
] |
40630184246 | #!/usr/bin/env python
# coding=utf8
import numpy as np
import matplotlib.pyplot as plt
from scipy.ndimage.morphology import binary_dilation
import segments
def region_sizes_img(region_map, visualize=False):
un = np.unique(region_map)
assert np.max(un) + 1 == un.size
sizes = list()
for r in ... | chrodan/pottics | regions.py | regions.py | py | 7,137 | python | en | code | 10 | github-code | 7 | [
{
"api_name": "numpy.unique",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.max",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.isfinite",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.count_nonzero",
"line... |
16337445137 | #!/usr/bin/python
""" Check to see if a TCP port is open """
import sys
import getopt
import traceback
import socket
import logging
from cdkutils.logger import Logger
TELNET_PORT = 23
SSH_PORT = 22
HTTP_PORT = 80
HTTPS_PORT = 443
HTTP_ALT_PORT = 8080
VM_IP = "192.168.12.12"
class PortCheck(object):
""" checks to... | srpatcha/pyscripts | pyscriptd/checkport.py | checkport.py | py | 3,492 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "socket.socket",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_STREAM",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "socket.SHUT... |
14101154081 | import os
from hparams import set_hparams, hparams
import glob
import random
import pickle
from multiprocessing import Process, Queue
from tqdm import tqdm
import numpy as np
import librosa
import traceback
import pandas as pd
import dataset_utils
def chunked_multiprocess_run(map_func, args, num_workers=None, ordere... | zkx06111/WSRGlow | binarizer.py | binarizer.py | py | 5,822 | python | en | code | 122 | github-code | 7 | [
{
"api_name": "os.getenv",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.cpu_count",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Queue",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Queue",
... |
4554147707 | from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
import telegram
import ephem
from datetime import *
import logging
import settings
import re
import operator
import russiancities
cities = list(russiancities.russian_cities)
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s'... | Zibsun/lesson2 | bot.py | bot.py | py | 6,106 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "russiancities.russian_cities",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "logging.basicConfig",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name"... |
22759647915 | import uuid
import logging
log = logging.getLogger("volux operator")
log.setLevel(logging.DEBUG)
# create file handler which logs even debug messages
fh = logging.FileHandler("volux_operator.log")
fh.setLevel(logging.DEBUG)
# create console handler with a higher log level
ch = logging.StreamHandler()
ch.setLevel(loggi... | DrTexx/scorbot-revival | code/py/scorbot/axis.py | axis.py | py | 1,330 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "logging.FileHandler",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",... |
34658739325 | #!/usr/bin/python
from copy import deepcopy
from queue import Queue
class Item:
idx: int # item id
cid: int # category
num: int # number of this item
w: float # weight
p : float # price
def __init__(self, d: dict):
self.idx = d['id']
self.cid = d['cid']
self.num... | eggeek/pack-optimizer | pack.py | pack.py | py | 6,668 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "copy.deepcopy",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "queue.Queue",
"line_number": 193,
"usage_type": "name"
},
{
"api_name": "json.load",
"line_number": 231,
"usage_type": "call"
}
] |
13000559256 | import numpy as np
import matplotlib.pyplot as plt
from keras.datasets import imdb
from keras import models, layers
from keras import optimizers, losses, metrics
(train_data, train_labels),(test_data, test_labels) = imdb.load_data(num_words=10000) # 자주 나타나는 단어 1만개만 사용
# 정수 시퀀스를 이진 행렬로 인코딩하기
def vectorize_sequence(seq... | JuHyunAn/study_ml | keras_deeplearning/ct_1_basic_deeplearning/2_binary_imdb_2.py | 2_binary_imdb_2.py | py | 1,550 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "keras.datasets.imdb.load_data",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "keras.datasets.imdb",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "numpy.zeros",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.asa... |
4929808805 | import os
import spotipy
from spotipy.oauth2 import SpotifyOAuth
import requests
from bs4 import BeautifulSoup
SPOTIPY_CLIENT_ID = os.environ.get('SPOTIPY_CLIENT_ID')
SPOTIPY_CLIENT_SECRET = os.environ.get('SPOTIPY_CLIENT_SECRET')
SPOTIPY_REDIRECT_URI = os.environ.get('SPOTIPY_REDIRECT_URI')
def welcome_message():
... | barbaracalderon/music-time-machine-spotify | machine.py | machine.py | py | 6,700 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.environ.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_num... |
35676344654 | import ast
import copy
import os
import numpy as np
from gwpy.io import hdf5 as io_hdf5
from gwpy.io import registry as io_registry
from gwpy.io.utils import identify_factory
from gwpy.types.io.hdf5 import write_hdf5_series as gwpy_write_hdf5_series
from ..data import HeterodynedData
# -- read ----------------------... | cwinpy/cwinpy | cwinpy/iostream/readers.py | readers.py | py | 10,980 | python | en | code | 8 | github-code | 7 | [
{
"api_name": "data.HeterodynedData",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "numpy.loadtxt",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "gzip.open",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "data.shape",
"l... |
24729282056 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# All credit to @an0n_r0
# project : https://github.com/tothi/serviceDetector
from impacket.dcerpc.v5 import lsat, lsad
from impacket.dcerpc.v5.dtypes import NULL, MAXIMUM_ALLOWED, RPC_UNICODE_STRING
from impacket.dcerpc.v5 import transport
import pathlib
class CMEModu... | byt3bl33d3r/CrackMapExec | cme/modules/enum_av.py | enum_av.py | py | 20,313 | python | en | code | 7,833 | github-code | 7 | [
{
"api_name": "pathlib.PurePath",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "impacket.dcerpc.v5.lsat.MSRPC_UUID_LSAT",
"line_number": 115,
"usage_type": "attribute"
},
{
"api_name": "impacket.dcerpc.v5.lsat",
"line_number": 115,
"usage_type": "name"
},
... |
11112184637 | import argparse
import pathlib
import os
from PyPDF2 import PdfFileWriter, PdfFileReader
from pathlib import Path
class Config:
def __init__(self, input, split, output):
self.input = input
self.split = split
self.output = output
if output is None:
self.output = Path((o... | rubenvanassche/pdf-splitter | splitter.py | splitter.py | py | 1,838 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "pathlib.Path",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
... |
13567942130 | from tools.my_request import MyRequest
from tools.wexcel import *
import os
class InterfaceTest():
def __init__(self,file):
self.res = get_data(file, "1")#从excel读取原始数据
#将exlce的类似'a=1,b=2,c=3'格式的,转为字典
def dic(self,s):
t=[]
k=[]
v=[]
dic={}
t=s.split... | haoshanwei/python-sted | day8/作业.py | 作业.py | py | 2,611 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "tools.my_request.MyRequest",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 73,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirn... |
37611627650 | from calendar import c
import json
from operator import truediv
import random
from web3 import Web3,IPCProvider,middleware
from web3.middleware import geth_poa_middleware
from web3.gas_strategies.time_based import medium_gas_price_strategy
from web3.gas_strategies.rpc import rpc_gas_price_strategy
from eth_keys import ... | bffr05/random | scripts/user.py | user.py | py | 5,036 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "eth_account.Account.from_key",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "eth_account... |
31883837398 | import asyncio
import os
import tomli
from pyrogram.client import Client
from caligo.core import database
def load_config(filename: str) -> dict:
# Check if the file exists and is readable
if os.path.isfile(filename) and os.access(filename, os.R_OK):
# Load the configuration from the file in binary mo... | userbotindo/caligo | generate_session.py | generate_session.py | py | 2,505 | python | en | code | 50 | github-code | 7 | [
{
"api_name": "os.path.isfile",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.access",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.R_OK",
"line_number": 10... |
18041067956 | from argparse import ArgumentParser
def run():
args = ArgumentParser(prog="cwc",description="Character Word Cloud")
args.add_argument("--text",type=str,help="specify file of words to build the word cloud (default: stdin)")
args.add_argument("--regex",type=str,help="override the regular expression defining ... | TaceyWong/character-word-cloud | cwc_cli.py | cwc_cli.py | py | 3,477 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 4,
"usage_type": "call"
}
] |
26682795173 | """Official evaluation script for v1.1 of the SQuAD dataset.
From the SQuAD website: https://rajpurkar.github.io/SQuAD-explorer/
"""
from collections import Counter
import string
import re
import argparse
import json
import sys
def normalize_answer(s):
"""Lower text and remove punctuation, articles and extra whi... | chrischute/squad-transformer | code/evaluate.py | evaluate.py | py | 5,127 | python | en | code | 33 | github-code | 7 | [
{
"api_name": "re.sub",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "string.punctuation",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "collections.Counter",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
"... |
42200057392 |
from PyQt5 import QtWidgets, QtCore
from PyQt5.QtWidgets import QComboBox, QTextEdit
__author__ = 'Pawel'
"""
Class that represents archieve window. It allows you to see every conversation you have
"""
class ArchieveDialog(QtWidgets.QDialog):
def __init__(self,parent, db):
super(ArchieveDialog, self).__... | ppedzinski/Chatomaniac | archieve_dialog.py | archieve_dialog.py | py | 834 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "PyQt5.QtWidgets.QDialog",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QTextEdit",
"line_number": 14,
"usage_type": "call"
},
{
"api_name":... |
21319930473 | import numpy as np
import pybullet as p
from constants import *
import scene_builder
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation, writers
import tensorflow as tf
import time
import disect_model
import os
np.random.seed(123456)
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"
walls, map_labe... | colin-r-schultz/CS230-Project | pathfinding.py | pathfinding.py | py | 4,265 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "numpy.random.seed",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "scene_builder.bui... |
42690073173 | import random
from croe.conf import Conf
import requests
from requests.models import PreparedRequest
from urllib.parse import urlsplit
UA = "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36"
# http 请求封装函数
def http_req(url, method='get', **kwargs):
if... | Ezioz/language_study | python/bugbountytips/croe/http_re.py | http_re.py | py | 2,583 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "croe.conf.Conf.CONNECT_TIMEOUT",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "croe.conf.Conf",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "croe.conf.Conf.READ_TIMEOUT",
"line_number": 16,
"usage_type": "attribute"
},
{
... |
15656614147 | import pygame
import random
import constants as c
from bullet import Bullet
import enemy_spawner
class Enemy2(pygame.sprite.Sprite):
def __init__(self):
super(Enemy2, self).__init__()
self.img_explosion_01 = pygame.image.load('images\explosion_01.png').convert_alpha()
self.img_explosion_02 ... | BrettKoenig04/MyProjects | Games/Space Invader Remake/enemy_2.py | enemy_2.py | py | 4,261 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pygame.sprite",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.lo... |
33737381896 | import json
import requests
import pandas as pd
import boto3
from lxml.html import fromstring
from io import StringIO
from datetime import date
from localities import S3_BUCKET, HISTORICAL_OBS_LOC
def get_today_data():
'''Scarps the BOM website for the current max, min and rainfall
'''
url = 'http://reg... | RachelBunder/weather_context | scrap_bom/scrap_bom.py | scrap_bom.py | py | 2,685 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "lxml.html.fromstring",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.date.today",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "datetime.date",... |
928761984 | from typing import Callable, List, Optional, TypeVar
from reactivex import Observable, abc, compose
from reactivex import operators as ops
from reactivex import typing
_T = TypeVar("_T")
def buffer_with_time_(
timespan: typing.RelativeTime,
timeshift: Optional[typing.RelativeTime] = None,
scheduler: Opt... | ReactiveX/RxPY | reactivex/operators/_bufferwithtime.py | _bufferwithtime.py | py | 619 | python | en | code | 4,581 | github-code | 7 | [
{
"api_name": "typing.TypeVar",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "reactivex.typing.RelativeTime",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "reactivex.typing",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "typ... |
21993038328 | from PIL import Image
from io import BytesIO
import urllib.parse
def html_to_img(driver,html_content,id_count):
'''converts html to image'''
html_content = urllib.parse.quote(html_content)
driver.get("data:text/html;charset=utf-8," + html_content)
window_size = driver.get_window_size()
max_height,... | hnmspirit/table_datagen | TableGeneration/tools.py | tools.py | py | 1,016 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "urllib.parse.parse.quote",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "urllib.parse.parse",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "urllib.parse",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "PIL.Image.... |
3775180105 | import msprime, pyslim, argparse, random, subprocess
import numpy as np
import re
## This function comes courtesy of Peter Ralph, who directed me to it
## after I posted on the SLiM forum
def remove_mutations(ts, start, end, proportion):
'''
This function will return a new tree sequence the same as the input,
but... | TBooker/MuridRodentProject | bin/SprinkleMutations.py | SprinkleMutations.py | py | 4,356 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "random.uniform",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "pyslim.load",
"... |
16189360583 | from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView, RedirectView
from django.contrib import admin
admin.autodiscover()
from . import views
from .sitemaps import sitemaps
from widgets.views import BookmarkListView, GalleryHome
urlpatterns = patterns('',
url(r'^manage... | mmadil/macroblog | macroblog/urls.py | urls.py | py | 1,188 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "django.contrib.admin.autodiscover",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.conf.urls.patterns",
"line_number": 11,
"usage_type": "call"
},
{
"ap... |
30072536663 | #!/usr/bin/env python
# coding: utf-8
import util
import numpy as np
import cartopy.crs as ccrs
import absplots as apl
# initialize figure
ll = ccrs.PlateCarree()
proj = ccrs.Stereographic(central_latitude=-10.0, central_longitude=10.0)
fig, ax = apl.subplots_mm(
figsize=(45, 90), subplot_kw=dict(projection=proj)... | juseg/alps | figures/alpcyc_lr_records.py | alpcyc_lr_records.py | py | 1,517 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cartopy.crs.PlateCarree",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cartopy.crs",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "cartopy.crs.Stereographic",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cartopy... |
39182482593 | # -*- coding: utf-8 -*-
"""
Created on Sat Jan 28 12:16:28 2023
@author: Nathan Gilmore
"""
import numpy as np
import random
import glob
from astropy.io import fits
from meteostat import Point, Daily, Hourly
from datetime import datetime
import os
import shutil
import time
weather = np.array(['Clear', 'Fair', 'Cloud... | nialljmiller/cloud_class | Training_Data_Anno.py | Training_Data_Anno.py | py | 6,107 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.array",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 31... |
27359787383 | import bpy
from os import path
from mv import fd_types, unit, utils
from . import mv_closet_defaults as props_closet
from . import common_parts
from . import common_prompts
from . import common_lists
import math
class Doors(fd_types.Assembly):
placement_type = "EXTERIOR"
property_id = props_closet.LIBRARY... | CCDevNelson/Snap-Updates | library_scripts/Library-Classy_Closets/data_closet_doors.py | data_closet_doors.py | py | 79,050 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "mv.fd_types.Assembly",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "mv.fd_types",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "mv.unit.inch",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "mv.unit",
"lin... |
74864988384 | from typing import Optional
import ml_collections as collections
import numpy as np
from mindspore import dtype
from mindspore import nn
from mindspore import ops
from mindspore import Parameter
from mindspore import Tensor
from mindvideo.utils.check_param import Rel
from mindvideo.utils.check_param import Validator
... | ZJUT-ERCISS/zjut_mindvideo | mindvideo/models/vist.py | vist.py | py | 39,222 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "numpy.ceil",
"line_number": 132,
"usage_type": "call"
},
{
"api_name": "numpy.ceil",
"line_number": 133,
"usage_type": "call"
},
{
"api_name": "numpy.ceil",
"line_number": 134,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": ... |
4442547525 | #!/usr/bin/python3
# -*- coding=utf-8 -*-
"""Script description goes here
This script do stuff.
"""
__author__ = "someone"
__copyright__ = "Copyright 2020, someone"
__credits__ = ["Jon Doe"]
__license__ = ""
__version__ = "0.0.1"
__maintainer__ = ""
__email__ = ""
__status__ = "Production"
__description__ = """butter... | illusive1984/filesystem_toolbox | someone.py | someone.py | py | 8,634 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "time.sleep",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "sys.stdout.write",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 61,
"usage_type": "attribute"
},
{
"api_name": "sys.stdout.flush",
"l... |
11929785990 | import requests
import re
import os
import json
import xmltodict
import six
from django.conf import settings
from django.db import transaction
from .models import ODKFormGroup, ODKForm, RawSubmissions, DictionaryItems
from .terminal_output import Terminal
terminal = Terminal()
class OdkCentral():
# lets define ... | badili/odk_parser3 | odk_central_parser.py | odk_central_parser.py | py | 16,231 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "terminal_output.Terminal",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "django.conf.setti... |
32811674888 | # -*-coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from matplotlib.backends.backend_pdf import PdfPages
import scipy.stats as st
def cos_sim(v1, v2):
return np.dot(v1, v2) / (np.linalg.norm(v1) * np.linalg.norm(v2))
FACTOR_NUM = 10
TIME_NUM = 10
f_size ... | kkkazumi/quiz_check2016 | cos_sim.py | cos_sim.py | py | 1,522 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.dot",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.linalg.norm",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "numpy.empty",
"line_nu... |
32211907164 | __version__ = "0.1.0"
from typing import Tuple
def parse_name_with_id(name: str) -> Tuple[str, int, str]:
parts = name.split("_")
if len(parts) == 1:
if parts[0].isdigit():
return "", int(parts[0]), ""
elif len(parts) == 2:
if parts[0].isdigit():
return "", int(par... | bitzl/data-wrangling | data_wrangling/__init__.py | __init__.py | py | 579 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "typing.Tuple",
"line_number": 6,
"usage_type": "name"
}
] |
15816244127 | import pygame
from pygame.sprite import Sprite
class Bullet(Sprite):
"""Store information and functions for bullets"""
def __init__(self, screen, g_settings, ship):
"""Init super class and bullet variables"""
super().__init__()
# Init screen
self.screen = screen
... | djtorel/python-crash-course | Chapter 12/Try05/bullet.py | bullet.py | py | 1,237 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pygame.sprite.Sprite",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "pygame.Rect",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pygame.draw.rect",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "pygame.draw",
"l... |
72900908382 | """
https://leetcode.com/problems/number-of-ways-to-arrive-at-destination/
"""
from collections import defaultdict
from heapq import heappush, heappop
class Solution:
def countPaths(self, n: int, roads: list[list[int]]) -> int:
def dijkstra(src: int):
dist = [float('inf')] * n
wa... | eronekogin/leetcode | 2023/number_of_ways_to_arrive_at_destination.py | number_of_ways_to_arrive_at_destination.py | py | 1,262 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "heapq.heappop",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 36,
"usage_type": "name"
}
] |
40131934378 | from flask import Flask, jsonify, make_response, request
import os
from gremlin_python import statics
from gremlin_python.structure.graph import Graph
from gremlin_python.process.graph_traversal import __
from gremlin_python.process.traversal import T
from gremlin_python.process.strategies import *
from gremlin_python.... | armandocv/aws-content-moderation-in-games | scoring-api/app.py | app.py | py | 2,104 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "gremlin_python.statics.load_statics",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "gremlin_python.statics",
"line_number": 12,
"usage_type": "name"
},
{
"api_name":... |
7223119828 | # Database
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
# Project
from models import Base, Clients, Records
engine = create_engine('sqlite:///database.sqlite3', echo=True)
db_session = scoped_session(sessionmaker(bind=engine))
Base.query = db_session.query_property()
... | art1415926535/graphene-sqlalchemy-filter | examples/clients_and_records/database.py | database.py | py | 983 | python | en | code | 118 | github-code | 7 | [
{
"api_name": "sqlalchemy.create_engine",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.orm.scoped_session",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.orm.sessionmaker",
"line_number": 10,
"usage_type": "call"
},
{
... |
8682552483 | import time
import tempfile
import math
from pathlib import Path
import mediapipe as mp
import numpy as np
import cv2
from mediapipe.tasks import python
from mediapipe.tasks.python import vision
from mediapipe.tasks.python.metadata.metadata_writers import model_asset_bundle_utils
### Visualization utilities , from ... | beardad1975/cv4t | cv4t/hand_and_gesture.py | hand_and_gesture.py | py | 10,164 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "mediapipe.framework.formats.landmark_pb2.NormalizedLandmarkList",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "mediapipe.framework.formats.landmark_pb2",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "mediapipe.framework.formats.landmark_pb2... |
6279115493 | from django.conf.urls import patterns, include, url
from rest_receipts import views
__author__ = 'Roland'
urlpatterns = patterns(
'',
url(r'^expense/add/', views.add),
url(r'^expense/index/', views.index),
url(r'^expense/edit/(\d+)', views.edit),
url(r'^expense/delete/(\d+)', views.delete),
url... | rolisz/receipt_budget | receipts/rest_receipts/urls.py | urls.py | py | 466 | python | en | code | 18 | github-code | 7 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "rest_receipts.views.add",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name... |
36913241629 | from PyQt5.QtSql import QSqlDatabase, QSqlQuery
from PyQt5.Qt import QMessageBox
class MyDb(object):
db = QSqlDatabase.addDatabase('QSQLITE')
db.setDatabaseName('zhgl.db')
query = QSqlQuery()
def loaddb(self, sql):
if not self.db.open():
return False
if self.query.exec_(sq... | ocuult/account_management | My_DB.py | My_DB.py | py | 1,930 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "PyQt5.QtSql.QSqlDatabase.addDatabase",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtSql.QSqlDatabase",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtSql.QSqlQuery",
"line_number": 8,
"usage_type": "call"
}
] |
20493554408 | import tkinter as tk
import requests
import json
import pyttsx3
import speech_recognition as sr
import re
API_KEY = "tJx9BcUyUome"
PROJECT_TOKEN = "tm0-6vVrJdYU"
RUN_TOKEN = "tYLJ-8Tf67Y7"
#Class for gathering information from the API
class Covid:
#API request in function form, credits to https://towardsdatascie... | JelloMangune/Tracy-Covid-Tracker | final.py | final.py | py | 8,957 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pyttsx3.init",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "speech_recognition.Recognizer",
... |
19582174333 | from __future__ import annotations
from disnake.ext import commands
from disnake import ApplicationCommandInteraction, RawReactionActionEvent, Message, Member
from utils.player import Player
from utils.approvals import Approval
from utils.characters import CharacterChooseView, Character
from utils.help import Menu
from... | mrrobinhood5/GaryGM | cogs/characters.py | characters.py | py | 8,453 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "disnake.ext.commands.Cog",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "disnake.ext.commands",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "disnake.Member",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "uti... |
3234955570 | import os
import shutil
import logging
import minio
from . import utils
from . import tool
from . import sshkey
log = logging.getLogger(__name__)
def run(step, **kwargs): # pylint: disable=unused-argument
timeout = int(step.get('timeout', 60))
url = step['checkout']
dest = ''
if 'destination' in s... | Kraken-CI/kraken | agent/kraken/agent/kraken_git.py | kraken_git.py | py | 5,022 | python | en | code | 107 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "minio.Minio",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 94,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numb... |
72529039264 | from multiprocessing.spawn import old_main_modules
import pygame
from sprite import Sprite
class Player(Sprite):
def __init__(self, x, y, game, name, obstacles):
super().__init__(x, y, game.PLAYER_WIDTH, game.PLAYER_HEIGHT, game,
"main_characters", name, animation_speed=0.5)
... | yisus82/freecodecamp-platformer-python | player.py | player.py | py | 4,321 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sprite.Sprite",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "pygame.math.Vector2",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pygame.math",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "pygame.time.get_tic... |
25040122377 | import sys
import os
# setting path
sys.path.append('../TM2_segmentation')
import numpy as np
import pandas as pd
import nibabel as nib
from skimage.transform import resize, rescale
from scipy.ndimage import zoom
from settings import target_size_unet, scaling_factor
import matplotlib.pyplot as plt
from scripts.prep... | AIM-KannLab/itmt | itmt_v2/masks_to_npy.py | masks_to_npy.py | py | 5,478 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "sys.path.append",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "scripts.preprocess_utils.find_file_in_path",
"line_number": 22,
"usage_type": "call"
},
{
"api_name":... |
27555054481 | import datetime
import subprocess
import os
import time
import urllib2
from collections import OrderedDict
from math import floor, log
import logging
import psutil
logger = logging.getLogger(__name__)
def convert_bytes(value, unit, output_str=False, decimals=2, auto_determine=False):
"""
:param value: int... | beallio/media-server-status | serverstatus/assets/sysinfo.py | sysinfo.py | py | 9,180 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "math.floor",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "math.log",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "urllib2.urlopen",
"line_num... |
71525898145 | import numpy as np
from rlgym.envs import Match
from rlgym.utils.action_parsers import DiscreteAction
from stable_baselines3 import PPO
from stable_baselines3.common.callbacks import CheckpointCallback
from stable_baselines3.common.vec_env import VecMonitor, VecNormalize, VecCheckNan
from stable_baselines3.ppo import M... | BenjaminChilson/CapstoneProject_RocketLeagueAI | rlgym/ppo-bot-train-v2.py | ppo-bot-train-v2.py | py | 5,985 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "numpy.exp",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "numpy.log",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "rlgym.envs.Match",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "sb3_log_reward.SB3CombinedLogRew... |
71081881503 | import wx
import wx.py as py
import sys
# Regular expression operations
import re
import os
# Conjurer
import pynebula
import childdialoggui
import freedialoggui
import nebulahelpevent as nh
import app
import stringtree
import servers
class TestListCtrl(wx.ListCtrl):
def __init__(self, parent, ... | xuebai5/TheZombieEngine | zombie/code/conjurer/conjurer/gui/stringlister.py | stringlister.py | py | 4,266 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "wx.ListCtrl",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "wx.DefaultPosition",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "wx.DefaultSize",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "wx.ListC... |
23258040363 | # -*- coding: utf-8 -*-
import torch
from torch.utils.data import Dataset, DataLoader
import h5py
import numpy as np
import json
class VideoData(Dataset):
def __init__(self, mode, split_index):
self.mode = mode
self.name = 'tvsum'
self.datasets = ['../data/SumMe/eccv16_dataset_summe_google... | e-apostolidis/SUM-GAN-AAE | model/data_loader.py | data_loader.py | py | 1,929 | python | en | code | 47 | github-code | 7 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "h5py.File",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "torch.Tensor",
"line... |
37827099340 | """Definition and setup of the Omnilogic Sensors for Home Assistant."""
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
STATE_CLASS_MEASUREMENT,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONCENTRATION_PARTS_PER_MILLION,
EL... | djtimca/haomnilogic | custom_components/omnilogic/sensor.py | sensor.py | py | 11,791 | python | en | code | 16 | github-code | 7 | [
{
"api_name": "homeassistant.core.HomeAssistant",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "homeassistant.config_entries.ConfigEntry",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "homeassistant.helpers.entity_platform.AddEntitiesCallback",
"line_n... |
1321351342 | # TUTORIAL
# https://www.youtube.com/watch?v=hDu8mcAlY4E
import pygame, sys
class Crosshair(pygame.sprite.Sprite):
def __init__(self, picture_path):
super().__init__()
self.image = pygame.image.load(picture_path)
self.rect = self.image.get_rect()
self.gunshoot = pygame.mixer.Sound(... | XeviGmail/pythonGames | Dianes/game.py | game.py | py | 1,260 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pygame.sprite",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.load",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pygame.mixer.Soun... |
3748040638 | import webapp2
from google.appengine.api import users
from model import CssiUser
class MainHandler(webapp2.RequestHandler):
def get(self):
user = users.get_current_user()
if user:
signout_link_html = '<a href="%s">sign out</a>' % (
users.create_logout_url('/'))
email_address = use... | saramissak/CSSI-labs | app-engine/fruit_bank/main.py | main.py | py | 1,736 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "webapp2.RequestHandler",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "google.appengine.api.users.get_current_user",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "google.appengine.api.users",
"line_number": 7,
"usage_type": "name"... |
34216376806 | from torch.utils.tensorboard import SummaryWriter
import torch.nn.functional as F
import torch
import datetime
from os.path import join
import numpy as np
from torch.utils.data.sampler import SubsetRandomSampler
pixel_coords = None
class AttrDict(dict):
def __init__(self, *args, **kwargs):
s... | rish-av/ganvo | utils.py | utils.py | py | 6,359 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "torch.utils.data.sampler.SubsetRandomSampler",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "numpy.floor",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
"line_number": 27,
"usage_type": "call"
},
{
"api_na... |
21414349388 | from omni.isaac.kit import SimulationApp
simulation_app = SimulationApp({"headless": False})
from omni.isaac.core import World
from omni.isaac.franka.franka import Franka
from omni.isaac.core.utils.stage import add_reference_to_stage
from omni.isaac.core.utils.types import ArticulationAction
import numpy as np
import... | JunHeonYoon/Isaac_Sim | panda_controller/test.py | test.py | py | 10,068 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "omni.isaac.kit.SimulationApp",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "numpy.set_printoptions",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "omni.isaac.core.World",
"line_number": 23,
"usage_type": "call"
},
{
"api_name... |
9968499010 | import os
import sys
from pathlib import Path
import matplotlib
import matplotlib.pyplot as plt
import QPOEstimation
from QPOEstimation.get_data import *
from QPOEstimation.likelihood import get_kernel, get_mean_model, get_gp_likelihood
from QPOEstimation.parse import parse_args
from QPOEstimation.prior import get_pr... | MoritzThomasHuebner/QPOEstimation | scripts/analyse.py | analyse.py | py | 10,531 | python | en | code | 8 | github-code | 7 | [
{
"api_name": "sys.argv",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "QPOEstimation.parse.parse_args",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.step",
"line_number": 238,
"usage_type": "call"
},
{
"api_name": "... |
28667600829 | # Copyright (C) 2021 Victor Soupday
# This file is part of CC3_Blender_Tools <https://github.com/soupday/cc3_blender_tools>
#
# CC3_Blender_Tools 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 ver... | omlay/cc3_blender_tools | params.py | params.py | py | 27,423 | python | en | code | null | github-code | 7 | [
{
"api_name": "bpy.context",
"line_number": 672,
"usage_type": "attribute"
}
] |
29022468320 |
"""
******************************************************************************
* Purpose: Commercial data processing using queue
*
* @author: Ramnath Patro
* @version: 1.0
* @since: 29-3-2019
*
******************************************************************************
"""
from Data_Structure_Programs.Dat... | ramnathpatro/OOPs | queue_commercial_data_processing.py | queue_commercial_data_processing.py | py | 7,270 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "Data_Structure_Programs.Datastructure_Operations.queue_anagram",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "oops.Commercial_data_processing.sell",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "oops.Commercial_data_processing.buy",
"li... |
25153739845 | from typing import List
import numpy as np
import torch
from ...utils.record import AverageMeter
from ..base import BaseMetric
IGNORE_INDEX_NONE_VALUE = -100
class SegmentationMetric(BaseMetric):
metric_names: List[str] = ['iou', 'pixel_acc']
primary_metric: str = 'iou'
def __init__(self, num_classes=... | Nota-NetsPresso/netspresso-trainer | src/netspresso_trainer/metrics/segmentation/metric.py | metric.py | py | 2,072 | python | en | code | 10 | github-code | 7 | [
{
"api_name": "base.BaseMetric",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "torch.histc",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "torch.histc",
"line_numbe... |
70624062302 | from django.urls import path
from . import views
app_name = '{{cookiecutter.project_slug.lower()}}'
urlpatterns = [
path('', views.cover, name='cover'),
path('home/', views.home, name='home'),
path('sobre/', views.sobre, name='sobre'),
]
| acba/cookiecutter-django | {{cookiecutter.project_slug}}/apps/{{cookiecutter.project_slug}}/urls.py | urls.py | py | 252 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
}
] |
39021254896 | import cv2
imgpath='data/images/20.jpg'
txtpath = 'data/labels/20.txt'
img = cv2.imread(imgpath)
with open(txtpath, 'r') as f:
p = f.readlines()[0]
pix = [float(h) for h in p.split()]
print(pix)
for k in range(9):
i,j = int(pix[2*k]), int(pix[2*k+1])
cv2.circle(img, (i,j), 3,(255,0,0), -1)
cv2.imshow('te... | RogerJzx/MeshMultiViewRender | test.py | test.py | py | 344 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "cv2.imread",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.circle",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "cv2.waitKey",
"line_number": 16,
... |
13020901039 | '''
Demonstrates two numerical integration methods (trapezoid and Simpson) and compares
them to values calculated with SymPy.
'''
from math import pi
import sympy as sym
import numpy as np
import matplotlib.pyplot as plt
def integrate_trapezoid(f, a, b, n):
'''
Numerical integration of definite in... | StaticNoiseLog/python | ffhs/semesterarbeit/5/numerical_integration.py | numerical_integration.py | py | 7,338 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.arange",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_num... |
33438036061 | import pytest
import semver
import warnings
import reframe
import reframe.core.runtime as rt
import reframe.core.warnings as warn
import reframe.utility.color as color
import unittests.fixtures as fixtures
@pytest.fixture(params=['colors', 'nocolors'])
def with_colors(request):
with rt.temp_runtime(fixtures.BUIL... | toxa81/reframe | unittests/test_warnings.py | test_warnings.py | py | 1,762 | python | en | code | null | github-code | 7 | [
{
"api_name": "reframe.core.runtime.temp_runtime",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "reframe.core.runtime",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "unittests.fixtures.BUILTIN_CONFIG_FILE",
"line_number": 14,
"usage_type": "attribu... |
14494434768 | run0 = False
run1 = False
run2 = False
run3 = False
snakeAgentOn = False
bbAgentOn = False
run4 = True
while True:
import pygame
import sys
import math
import random
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import os
import ... | effluvialsplurf/AI_play_games_github | main.py | main.py | py | 40,860 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pygame.init",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "pygame.font.SysFont",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "pygame.font",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.set_m... |
25652272229 | import datetime as dt
import OpenGL.GL as GL
import pygame as pg
import pygame.locals as co
from enum import Enum
from typing import Union, Optional
from contextlib import contextmanager
from easygl.structures import Vec4, Vec2
from .events import *
__all__ = [
'BlendMode',
'DisplayError',
'GLWindow',
... | overdev/easygl-0.1.0-alpha1 | easygl/display/window.py | window.py | py | 10,485 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "enum.Enum",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "pygame.locals.OPENGL",
"line_number... |
27264720187 | from django.conf.urls import patterns, url
from calorietracker import views, import_old_db
urlpatterns = patterns('',
url(r'^$', views.index, name='index'),
url(r'^jstree.json$', views.jstree_json, name='jstree.json'),
url(r'^import_old_db$', import... | PSpeiser/PythonLifeManager | calorietracker/urls.py | urls.py | py | 1,320 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "calorietracker.views.index",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_n... |
28271874924 | """
102. Binary Tree Level Order Traversal
Given the root of a binary tree, return the level order traversal of its nodes' values.
(i.e., from left to right, level by level).
The number of nodes in the tree is in the range [0, 2000].
-1000 <= Node.val <= 1000
"""
# Definition for a binary tree node.
from ... | qubit-finance/algostudy | w2/M102.py | M102.py | py | 1,768 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "typing.List",
"line_number": 21,
"usage_type": "name"
}
] |
7503159643 | import aiohttp
import pytest
from aio_osservaprezzi import OsservaPrezzi, Fuel
from . import load_fixture
SAMPLE = {"town": "Lanciano", "region": "Abruzzo", "province": "CH"}
@pytest.mark.asyncio
async def test_station(aresponses):
"""Test getting station information."""
aresponses.add(
"carburanti... | eliseomartelli/aio_osservaprezzi | tests/test_fuel.py | test_fuel.py | py | 909 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "aiohttp.ClientSession",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "aio_osservaprezzi.OsservaPrezzi",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "aio_osservaprezzi.Fuel",
"line_number": 27,
"usage_type": "name"
},
{
"api_... |
5644466482 | import os
import shutil
from torchvision import transforms
import torchvision
import torch
import glob
from PIL import Image
import numpy as np
#import cupy as np
from tqdm import tqdm
def make_dir(path, del_before=False):
if del_before and os.path.exists(path):
shutil.rmtree(path)
if not os.path.exist... | shanicky4ever/Generating-Adversarial-Examples-with-Controllable-Non-transferability | utils/data.py | data.py | py | 11,388 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.path.exists",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "shutil.rmtree",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_... |
28065511664 | from flask import Flask, request
import json
from markupsafe import escape
from flask_jwt_extended import JWTManager, jwt_required
from controller.utlisateur_controller import UtilisateurController
app = Flask(__name__)
app.config["JWT_SECRET_KEY"] = "Une phrase secrète d'une complexité à couper le souffle !"
jwt = JW... | Pverdiere/blog_velo | main.py | main.py | py | 1,759 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask_jwt_extended.JWTManager",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "controller.utlisateur_controller.UtilisateurController",
"line_number": 14,
"usage_type": "call"
... |
39903311127 | # CNN_1.py
# editor: tongpl
# data: 2020.3.9
import torch
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image
import imageio
# 学习率
LR = 0.0005
class MyRelu:
"""
http://gmei test
"""
def __init__(self):
self.x = None
def __call__(self,x):
self.x = x
... | hao310rui140326/my_pytorch | pytorch_examples/CNN_1.py | CNN_1.py | py | 6,031 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "torch.nn",
"line_number": 79,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Sequential",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 84,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Conv2d",
... |
11814298850 | import numpy as onp
import jax.numpy as np
from jax import random, jit, vmap, grad, lax, value_and_grad
from jax_md import space, smap, energy, minimize, quantity, simulate
from jax.config import config
config.update("jax_enable_x64", True)
# from jax_md.util import check_kwargs_time_dependence
# from jax.experimental ... | rkruegs123/jax-vmmc | src/honeycomb_reference.py | honeycomb_reference.py | py | 8,966 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "jax.config.config.update",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "jax.config.config",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "jax.numpy.array",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "jax.numpy",
... |
8029264557 | import os
import re
import shutil
import unittest
import utils
import django_chuck.template.base
from django_chuck.exceptions import TemplateError
class UtilsTest(unittest.TestCase):
def setUp(self):
self.test_file = os.path.join("test", "project_dir", "test_file")
if os.path.isfile(self.test_fil... | msabramo/django-chuck | django_chuck/test.py | test.py | py | 3,064 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "unittest.TestCase",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.isfile",
... |
15140949277 | import sys
from MAPI import (
MAPI_UNICODE, RELOP_EQ, TBL_BATCH, ECSTORE_TYPE_PUBLIC,
WrapStoreEntryID
)
from MAPI.Defs import PpropFindProp
from MAPI.Struct import (
MAPIErrorNotFound, SPropertyRestriction, SPropValue,
MAPIErrorCollision
)
from MAPI.Tags import PR_EC_COMPANY_NAME_W, PR_EC_STOREGUID
fr... | Kopano-dev/kopano-core | swig/python/kopano/kopano/company.py | company.py | py | 13,853 | python | en | code | 57 | github-code | 7 | [
{
"api_name": "sys.modules",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "sys.modules",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "properties.Properties",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "MAPI.MAPI_UNI... |
34709677018 | import numpy as np
np.random.seed(1003)
import pandas as pd
import os
import time
import datetime
import pickle
import math
import sys
import pdb
import json
#Suppress messages from tensorflow
stderr = sys.stderr
sys.stderr = open(os.devnull, 'w')
import keras
from keras import callbacks
from keras ... | artiom-zayats/inverse_design | run_eval.py | run_eval.py | py | 21,244 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.random.seed",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "sys.stderr",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "sys.stderr",
"l... |
26275817005 | import math
from collections import defaultdict
import gc
import networkx as nx
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import Embedding
from sklearn.metrics import roc_auc_score
from parlai.utils.misc import round_sigfigs
from logger import Logger
from tqdm... | rajbsk/kg-cruse | codes/attnio/AttnIO_build.py | AttnIO_build.py | py | 5,733 | python | en | code | 8 | github-code | 7 | [
{
"api_name": "torch.log",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "torch.stack",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_numbe... |
26332726644 | # -*- coding: utf-8 -*-
"""
Created on Fri May 8 14:17:46 2020
@author: Caterina Brighi
"""
import pandas as pd
import numpy as np
import scipy.stats as stats
import matplotlib.patches as ptch
import matplotlib.pyplot as plt
import os
from pylab import plot, xlim, legend, setp
#%%Functions
# funct... | cbri92/Genesis-GBM-001 | StatisticalAnalysisScript.py | StatisticalAnalysisScript.py | py | 19,958 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pylab.setp",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pylab.setp",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pylab.setp",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "pylab.setp",
"line_number": 26,
... |
10694532610 | # VECTOR AUTOREGRESSION
# https://www.machinelearningplus.com/time-series/vector-autoregression-examples-python/
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from statsmodels.tsa.stattools import grangercausalitytests
from portfolio_optimization.modeling.arima import find_d_arima
from statsm... | MandM-DataScience/portfolio-optimization | portfolio_optimization/modeling/vector_autoregression.py | vector_autoregression.py | py | 5,695 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.DataFrame",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "statsmodels.tsa.stattools.grangercausalitytests",
"line_number": 32,
"usage_type": "call"
},
{
"api_... |
41999560875 | # vim: ts=4:sw=4:expandtabs
__author__ = 'zach.mott@gmail.com'
from django import forms
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
class AssignmentStartForm(forms.Form):
name = forms.CharField(max_length=256)
confirm_name = forms.CharField(
... | E7ernal/quizwhiz | quizard/forms/AssignmentStartForm.py | AssignmentStartForm.py | py | 904 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "django.forms.Form",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.for... |
3878419562 | #Código para controlar via puerto serie al Monocromador desarrollado en la cátedra de
# física experimental II de la facultad de ciencias exactas y naturales - UNCuyo por:
# M. J. V. Ventura,
# M. Galarza Martinez,
# L. A. Merenda,
# G. Portillo,
# M. Chiarpotti,
#... | Luchomerenda3/Control_Monocromador | monocro_interface.py | monocro_interface.py | py | 8,177 | python | es | code | 0 | github-code | 7 | [
{
"api_name": "os.system",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 43,
... |
23775553379 | import os
import numpy as np
import h5py
from tqdm import tqdm
from scipy.ndimage import imread
from random import shuffle
from keras.utils import np_utils
def patch_sampling(image, patch_size=40, stride=20, b_image=None, b_thr=1, m_image=None, beta=1):
(rows, cols, channels) = image.shape
bias_rows = int(rou... | paolorota/deep-splicing | casiaDB_handler.py | casiaDB_handler.py | py | 13,477 | python | en | code | 7 | github-code | 7 | [
{
"api_name": "numpy.argwhere",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 55,
"usage_type": "attribute"
},
{
"api_name": "numpy.rollaxis",
"l... |
34260826459 | """
The GUI component of the Sorting Algorithm Visualizer.
This visualizes all functionalities and the drawing processes using kivy.
"""
import drawing_flow
from algorithms import *
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.metrics import dp
from kiv... | mudandstars/SortingAlgorithmVisualizer | gui.py | gui.py | py | 14,226 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "kivy.uix.screenmanager.Screen",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "kivy.uix.screenmanager.ScreenManager",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "kivy.uix.screenmanager.Screen",
"line_number": 28,
"usage_type": "name... |
10592807566 | from django.conf.urls import include, url
from django.conf import settings
from django.conf.urls.static import static
from django.contrib.auth.decorators import login_required
from glims import views
from django.contrib import admin
from plugins.utils import PluginManager
from bioshare import urls as bioshare_urls
admi... | amschaal/glims | glims/urls.py | urls.py | py | 6,297 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "django.contrib.admin.autodiscover",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 32,
"usage_type": "call"
},
... |
36907705757 | from openpyxl import load_workbook
import requests
import json
wb = load_workbook(filename="saved.xlsx")
ws3 = wb["holders"]
qua = 0
ws3.cell(row=1, column=4).value = "USDC"
usd_user = requests.get(
"https://proton.cryptolions.io/v2/state/get_tokens?limit=1000&account=pimlrp"
).text
usd_user = json.loads(usd_user)... | Kevcollector/NftCollectionVsCode | collections/testfiles.py | testfiles.py | py | 992 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 12,
"usage_type": "call"
}
] |
72428087263 | from django.urls import path, include
from .views import Home, CreatToDo, MyToDo, MyToDoDetail, MyToDoUpdate, MyToDoDelete
urlpatterns = [
path("", Home.as_view(), name="home"),
path("my-todos", MyToDo.as_view(), name="my_todos"),
path("my-todos/details/<int:pk>", MyToDoDetail.as_view(), name="my_todo_deta... | surenab/women_todoapp | todoapp/core/urls.py | urls.py | py | 565 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "views.Home.as_view",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "views.Home",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.urls.path",
"l... |
38981448186 | from django.db.models import Q
from django.conf import settings
from django.http import JsonResponse
from django.contrib.postgres.aggregates import ArrayAgg
from django.views.generic.list import BaseListView
from django.views.generic.detail import BaseDetailView
from movies.models import FilmWork, PersonFilmWork
cla... | Rezyapkin/new_admin_panel_sprint_3 | movies_admin/movies/api/v1/views.py | views.py | py | 1,957 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "movies.models.FilmWork",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "movies.models.PersonFilmWork.Roles",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "movies.models.PersonFilmWork",
"line_number": 23,
"usage_type": "name"
}... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.