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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
41454422615 | # -*- coding: utf-8 -*-
from odoo import api, fields, models
import logging
class AccountMove(models.Model):
_inherit = "account.move"
partida_intcomex = fields.Boolean(string='Partida intcomex', default=False)
tipo_nota = fields.Selection(selection=[
('proteccion','Price protection'),
... | arianaa24/intcomex | models/account_move.py | account_move.py | py | 5,882 | python | es | code | null | github-code | 1 | [
{
"api_name": "odoo.models.Model",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "odoo.fields.Boolean",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "odoo.fields",
... |
73948947872 | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 6 16:45:52 2020
@author: gumcbrid
"""
import os
import numpy as np
import matplotlib.pyplot as plt
import time
import sys
import logging
sys.path.append(r'C:\Program Files (x86)\Keysight\SD1\Libraries\Python')
import keysightSD1 as key
import pulses as pulseLab
impor... | GuyMcBride/KeysightQuadLO | QuadLO.py | QuadLO.py | py | 19,243 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.path.append",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_... |
15758428960 | from django.db import models
# Create your models here.
class Pessoa(models.Model):
GENEROS = (
('F', 'Feminino'),
('O', 'Outro'),
)
nome = models.CharField(
max_length=255,
verbose_name='Nome'
)
sobrenome = models.CharField(
max_length=255,
verbos... | isadoraperes/projeto-demoday | website/models.py | models.py | py | 1,339 | python | pt | code | 0 | github-code | 1 | [
{
"api_name": "django.db.models.Model",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": ... |
3974593534 | from typing import List, Tuple
from math import sqrt, ceil
from functools import cache
def read_input(lines: List[str]) -> Tuple[Tuple[int, int], Tuple[int, int]]:
l = lines[0][len("target area: ") :]
x_part, y_part = l.split(", ")
x1, x2 = (int(x) for x in x_part[2:].split(".."))
y1, y2 = (int(y) for... | vegayours/aoc-2021 | python/aoc_17.py | aoc_17.py | py | 1,845 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "typing.List",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "math.ceil",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 15,
... |
22919833137 | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 31 21:13:46 2023
@author: basti
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import statsmodels.api as sm
import statsmodels.formula.api as smf
from scipy.stats import chi2_contingency
df_reg = pd.read_csv("bdd/data/d... | BastienChicot/seria | services/regressions.py | regressions.py | py | 4,897 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.crosstab",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "scipy.stats.chi2_contingency",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "pandas.D... |
43348782580 |
from azure.cognitiveservices.vision.face import FaceClient
from azure.cognitiveservices.vision.face.models import DetectedFace,FaceAttributeType,VerifyResult , IdentifyResult , IdentifyCandidate , SimilarFace
from msrest.authentication import CognitiveServicesCredentials
from azure.cognitiveservices.vision.face.model... | giuseppe-delgaudio/askToMyBot | helpers/face_cognitive.py | face_cognitive.py | py | 6,485 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "azure.cognitiveservices.vision.face.FaceClient",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "config.DefaultConfig.ENDPOINT",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "config.DefaultConfig",
"line_number": 16,
"usage_type":... |
72377091233 | import pymysql
from collections import Counter
import schedule
import time
#db_p = pymysql.connect("10.10.6.100","root","siipap_RX1","siipapx")
#db = pymysql.connect("10.10.1.225","root","sys","siipapx")
db_p =pymysql.connect("10.10.1.225","root","sys","pruebagr", charset="utf8mb4")
print("")
print("===========ONLIN... | BenjaminAR/replicaPythonMysql | timeControl.py | timeControl.py | py | 1,485 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pymysql.connect",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pymysql.err",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "schedule.every",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "schedule.run_pending"... |
43318937035 | # !/usr/bin/env python
# -*- coding:utf-8 -*-
# @Author: Hansong Nie
# @Time : 2019/12/11 14:43
import os
import json
# aminer_papers_files_path = r"I:\open-academic-graph-2019-01\aminer_papers"
sigmod_paper_path = "data/sigmod_papers_07_16.txt"
# print("提取2007-2016年SIGMOD上的论文信息")
# out_file = open(sigmod_... | HansongN/DANRL | handle_data/aminer_sigmod_papers.py | aminer_sigmod_papers.py | py | 1,912 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "json.loads",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 46,
"usage_type": "call"
}
] |
72359155873 | import datetime
import json
import codecs
import os
import pandas as pd
import pickle
import requests
# import criteo_marketing as cm
# from criteo_marketing import Configuration
import yaml
def get_metrics(
advertiser_id: str,
start_date_input: datetime.datetime,
end_date_input: datetime.datetime,
m... | Leonid-SV/da_skipper | connectors/connector_criteo.py | connector_criteo.py | py | 3,500 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "datetime.datetime",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
11022412448 | from selenium import webdriver
from selenium.webdriver.common.by import By
import pyautogui
import time
driver=webdriver.Chrome(executable_path="chromedriver")
driver.get("https://vidkidz.tistory.com/107")
driver.maximize_window()
pyautogui.moveTo(x=989, y=542)
pyautogui.click()
while True:
a=driver.fin... | joas24/jookrim_dasi | site.py | site.py | py | 728 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "pyautogui.moveTo",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pyautogui.... |
8002736803 | # -*- coding: utf-8 -*-
"""
@author: jungwonchang
"""
#intent_correct 자세히 보기 first_inferred_intent_final[i], intents[i]
from readers.goo_format_reader import Reader
from vectorizers.bert_vectorizer import BERTVectorizer
from models.joint_bert import JointBertModel
from utils import flatten
from vectorizers.tags_vectori... | brudenell/capstonedesign | eval_joint_bert_allsents.py | eval_joint_bert_allsents.py | py | 11,607 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sklearn.metrics.accuracy_score",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "sklearn.metrics",
"line_number": 57,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 137,
"usage_type": "call"
},
{
"api_name"... |
23639467216 | import pyttsx3
import speech_recognition as sr
import datetime
import wikipedia
import webbrowser
import smtplib
import psutil
import pyjokes
import pyautogui
import os
import wolframalpha
import ctypes
import subprocess
import json
import requests
from urllib.request import urlopen
from bs4 import Bea... | DivyasinghGmail/Voice-Assistant | main.py | main.py | py | 17,144 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pyttsx3.init",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "datetime.da... |
72537582434 | import sys, argparse, json, os, pickle
import numpy as np
import torch
from translator import OpenAITranslator
import openai
from tqdm import tqdm
def main():
parser = argparse.ArgumentParser(description='Description.')
parser.add_argument("-s", "--source", type=str, help="path to source file")
parser.add_... | deep-spin/translation-hypothesis-ensembling | chatgpt/code/translate.py | translate.py | py | 3,852 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "translator.OpenAITranslator",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "translator.setup_key",
"line_number": 27,
"usage_type": "call"
},
{
"api_name"... |
27971472908 | import pyautogui
from time import sleep
pyautogui.PAUSE = 0.2 # Define um tempo de espera entre os comandos dados através da 'pyautogui'
# Define as funções
# Procura a imagemt na tela e clica nela
def procurar_imagem (foto):
# Leva o mouse para o canto da tela para não atrapalhar
# a identificação... | Samuel-Wisart/Prova_para_Estagio | PyAutoGui.py | PyAutoGui.py | py | 2,346 | python | pt | code | 0 | github-code | 1 | [
{
"api_name": "pyautogui.PAUSE",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "pyautogui.moveTo",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pyautogui.click",
... |
70000416355 | import cv2 as cv
from yolov7.utils.plots import plot_one_box
import torch
import numpy as np
from pathlib import Path
def plot_boxes(bboxes, img, color=None, labels=None, line_thickness=2):
if type(bboxes) == torch.Tensor:
bboxes = bboxes.cpu().numpy()
if labels is None:
for bbox in bboxes:
... | Sean053047/Smog-Car-Detection | lib/utils/video_inference.py | video_inference.py | py | 2,312 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "torch.Tensor",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "yolov7.utils.plots.plot_one_box",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "yolov7.utils.plots.plot_one_box",
"line_number": 14,
"usage_type": "call"
},
{
"... |
24090074678 | import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
import pickle
font = fm.FontProperties(fname='./font/wqy-microhei.ttc')
def pie(profit_data):
# 饼图显示盈亏占比
# 每一块饼图外侧显示的说明文字
labels = 'Profit', 'Loss', '0'
sizes = [0, 0, 0]
for p in profit_data:
if p > 0:
sizes... | Kiiiiii123/TradeWithRL | visualize_bacth_testing.py | visualize_bacth_testing.py | py | 1,221 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "matplotlib.font_manager.FontProperties",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "matplotlib.font_manager",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 22,
"usage_type": "call"
},
... |
33888337626 | import json
if __name__ == "__main__":
lang = ["en", "es", "fr", "pt"]
clothingTypes = ["COLOUR", "HEAD", "FACE", "NECK", "BODY",
"HAND", "FEET", "FLAG", "PHOTO", "OTHER"]
paperdollDepth = {
"7500": "PAPERDOLLDEPTH_TOP_LAYER",
"7000": "PAPERDOLLDEPTH_HAND_LA... | Yaqq/Crumb-Converter | convert.py | convert.py | py | 6,305 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "json.load",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 74,
... |
17414387752 | from PySide2.QtCore import QAbstractItemModel, QModelIndex, Qt, Signal
from model.Node import Node
from model.Chapter import Chapter
from model.Picture import Picture
from model.Text import Text
from model.Page import Page
class HierarchyTreeModel(QAbstractItemModel):
"""
Model hijerarhijskog stabla
Args:... | dovvla/multimedia-book | MuMijA/view/tree/HierarchyTreeModel.py | HierarchyTreeModel.py | py | 7,284 | python | sr | code | 0 | github-code | 1 | [
{
"api_name": "PySide2.QtCore.QAbstractItemModel",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "PySide2.QtCore.Signal",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "PySide2.QtCore.Signal",
"line_number": 23,
"usage_type": "call"
},
{
"api_... |
37915902648 | import requests
import json
import math
import csv
import os
import pickle
# This code has been tested using Python 3.6 interpreter and Linux (Ubuntu).
# It should run under Windows, if anything you may need to make some adjustments for the file paths of the CSV files.
"""
DO NOT RUN THIS RIGHT AWAY.
WE HAVE A PICK... | logan-lach/Bitcamp2022 | Scraping/generate_rmp_data.py | generate_rmp_data.py | py | 6,310 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.path.exists",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "os.mkdir",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 3... |
29312811724 | import inspect
import logging
import typing
logger = logging.getLogger()
class Event:
def __init__(self, source, source_card, continuous=None, priority=0):
self.source = source
self.source_card = source_card
self.continuous = continuous
self.priority = priority
... | Reggles44/YXSim | yxsim/events.py | events.py | py | 2,563 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "inspect.getmro",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "inspect.getmro",
"line_number": 27,
"usage_type": "call"
}
] |
10071448940 | from urllib import request
from bs4 import BeautifulSoup
import requests # to request information from a specific website.
# Job filtration by owned skills
print("Put some skills you are not familiar with")
unfamiliar_skill = input('>')
print(f'Filtering out {unfamiliar_skill}')
html_text = requests.get('https://inte... | esomesmo/Amazing-Stuff-with-Python | Web Scrapping/05_scrape_all.py | 05_scrape_all.py | py | 1,403 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 12,
"usage_type": "call"
}
] |
14020454925 | import logging
import time
import os
log = logging.getLogger(__name__)
class PredictionsDB(object):
def __init__(self,pred1,pred2):
self.prediction1 = pred1
self.prediction2 = pred2
self.timestr = time.strftime("%Y%m%d-%H%M%S")
def create_file(self,outputdir='output'):
... | chesarin/master-thesis | tools/predictionsdb.py | predictionsdb.py | py | 1,660 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "time.strftime",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_num... |
37919249005 | from collections import namedtuple
from nightwatch import c_dsl
from nightwatch.parser import parse_requires
default_annotations = dict(
depends_on=set(),
object_depends_on=set(),
object_record=False,
object_explicit_state_replace=c_dsl.Expr("NULL"),
object_explicit_state_extract=c_dsl.Expr("NULL"... | utcs-scea/DGSF-AvA | cava/nightwatch/annotation_set.py | annotation_set.py | py | 4,709 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "nightwatch.c_dsl.Expr",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "nightwatch.c_dsl",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "nightwatch.c_dsl.Expr",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "nightwat... |
15674215916 | import numpy as np
import pickle
import os.path
import pandas as pd
import geopy.distance
class distanceParser():
dataDistancedFile='data/PARSED/distancedtraindata.csv'
maxKm=1500.0 #max distance traveled #prev 1500
maxSmallKm=40.0 #average local max distance #prev 40
def __init__(self):
pass... | carlitoselmago/streetPred | distanceParser.py | distanceParser.py | py | 1,706 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pandas.DataFrame",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "geopy.distance.distance.distance",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "geopy.distance.distance",
"line_number": 51,
"usage_type": "attribute"
},
{
"ap... |
32180548187 | import unittest
from catkin_dependency_tree import Package
from catkin_dependency_tree import PackageFromXmlFile
from catkin_dependency_tree import Dependency
from catkin_dependency_tree import DependencyFromXmlNode
from catkin_dependency_tree import get_paths
class GetDependencyRelationshipTestCase(unittest.TestCase... | gdesouza/catkin_dependency_tree | test_catkin_dependency_tree.py | test_catkin_dependency_tree.py | py | 3,892 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "unittest.TestCase",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "catkin_dependency_tree.DependencyFromXmlNode",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree.fromstring",
"line_number": 16,
"usage_type": "c... |
73948962912 | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 9 08:57:55 2020
@author: Administrator
"""
import os
import yaml
import logging
import math
from Configuration import (
Config,
loadConfig,
AwgDescriptor,
DigDescriptor,
Hvi,
HviConstant,
Fpga,
Register,
PulseDescriptor,
SubPulse... | GuyMcBride/HVI2_QuadLO | configurator_averager.py | configurator_averager.py | py | 5,635 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "Configuration.Register",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "Configuration.Register",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "Confi... |
15486031667 | import serial
import time
for i in range (0,10) :
try:
ser = serial.Serial(
port='/dev/ttyUSB' + str(i),
baudrate = 9600,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
... | danilofuchs/monalisa | testes/testeSerial.py | testeSerial.py | py | 783 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "serial.Serial",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "serial.PARITY_NONE",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "serial.STOPBITS_ONE",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "serial.... |
27538780925 | import os
import cv2
import numpy as np
from tqdm import tqdm
import matplotlib.pyplot as plt
import torch
import torch.nn.functional as F
from torchvision import transforms
from segformer import segformer_mit_b3
def preprocess_image(image_path, tf, patch_size):
'''preprocess image for visualization'''
# ... | hankkkwu/SegFormer-pytorch | visualize.py | visualize.py | py | 12,175 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "cv2.cvtColor",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2RGB",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "cv2.resize",
"line... |
12009131168 | ## Import Packages
import pandas as pd #importing all the important packages
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import json
from ast import literal_eval
## Define dataset
df = pd.read_csv('movies_metadata.csv', encoding = 'UTF-8', low_memory=False)
df2 = pd.read_csv('c... | yashkp1234/Movie-Recommendation-Engine | Python Scripts/Actor Analysis.py | Actor Analysis.py | py | 2,799 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "ast.literal_eval",
"line_number": 31,
"usage_type": "argument"
},
{
"api_name": "numpy.leads",
... |
38036535696 | import json
import os
import shutil
from pathlib import Path
from typing import List, Tuple
from fire import Fire
from pydantic import BaseModel
from random import choices
template_map = {}
template_desc_map = {}
labelname2rid = {}
laebl_cls_id = {}
class DynamicModel(BaseModel):
class Config:
arbitrary... | megagonlabs/zett | utils.py | utils.py | py | 4,594 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "pydantic.BaseModel",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "pydantic.BaseModel",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "typing.List",
"... |
12039727407 | from __future__ import division
from collections import defaultdict, OrderedDict
import argparse
import time
import numpy
from functools import reduce
import math
from os.path import abspath, dirname, join
def read_docs(filename):
with open(filename, 'r', encoding="utf8") as f:
lines = f.readlines()
re... | kruthivijay31/KNN-using-Cosine-Distance | idx.py | idx.py | py | 3,653 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "collections.defaultdict",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 23,
"usage_type": "call"
},
{
"api_name"... |
38956703819 | import asyncio
import os
import tempfile
import unittest
from out_sort.sort_statistic import State
from out_sort.sort_statistic import Statistic
import out_sort.out_sort as out_sort
from utils import file_generator
class StatisticTest(unittest.TestCase):
def test_next_state_raises_exception(self):
... | ashibaev/python | Sort/tests.py | tests.py | py | 8,322 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "unittest.TestCase",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "out_sort.sort_statistic.Statistic",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "out_sort.sort_statistic.Statistic",
"line_number": 19,
"usage_type": "call"
},... |
33973618698 | import hashlib
import sys
from flask import Flask, request
app = Flask(__name__)
@app.route('/', methods=['POST'])
def post():
print(request.form, file=sys.stdout)
incoming = request.form['incoming_string'].encode('utf-8')
incoming = hashlib.md5(incoming)
return incoming.digest()
@app.route('/', m... | Progenitoi/test_project | task/app.py | app.py | py | 420 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.request.form",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "sys.stdout",
"li... |
5351884291 | # -*- coding: utf-8 -*-
"""
Created on Fri Jun 18 16:29:33 2021
@author: hzzxq
"""
import json
import os
import requests
import re
import pandas as pd
login_url='http://localhost:3000/login/cellphone?phone=13408462303&password=shiyan123456789'
s=requests.Session()
responsesdata1=s.get(url=login_url)
def getSingerNam... | YunHao-Von/Financial_Intelligence | 机器学习算法模块/singername.py | singername.py | py | 1,132 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "requests.Session",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"l... |
30685935670 | # coding=utf-8
import requests
from lxml import etree
from queue import Queue
import time
import pymysql
import threading
import logging
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(message)s",
datefmt="%m/%d/%Y %H:%M:%S %p"
)
class GM(object):
def __init__(self):
... | okccc/python | crawl/demo10_更美医美项目.py | demo10_更美医美项目.py | py | 6,156 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.basicConfig",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pymysql.cursors",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "queue.Queu... |
71901724193 | import numpy as np
import matplotlib.pyplot as plt
import skfuzzy as fuzz
from skfuzzy import control as ctrl
def load_data():
lines = [line.rstrip('\n') for line in open("S1.txt")]
x = []
y = []
for i in range(len(lines)):
split = lines[i].split()
x.append(float(split[0]))
y.ap... | Zekhire/podstawy_cybernetyki | lab3/cyber3.py | cyber3.py | py | 6,525 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "skfuzzy.control.Antecedent",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "skfuzzy.control",
"line_number": 57,
"usage_type": "name"
},
{
"api_name": "numpy.arange",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "skfuzzy.trimf... |
73044856035 | import nltk
import pandas as pd
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.svm import LinearSVC
from sklearn.naive_bayes import GaussianNB, BernoulliNB, MultinomialNB
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import RandomFore... | ProfessorDonLuigi/ScrapeAndClassify | DiagnosticityClassifier.py | DiagnosticityClassifier.py | py | 3,583 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "nltk.corpus.stopwords.words",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "nltk.corpus.stopwords",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "nltk.stem.PorterStemmer",
"line_number": 26,
"usage_type": "call"
},
{
"api_nam... |
39993483714 | import matplotlib.pyplot as plt
time = []
displacement = []
time2 = []
displacement2 = []
f = open('174744_filtered', 'rU')
lines=f.readlines()
f.close()
for l in lines:
b = l.split()
time.append(float(b[0]))
displacement.append(float(b[9]))
f = open('102723', 'rU')
lines=f.readlines()
f.close()
... | CBermingham/Photonic_Force | example_movement.py | example_movement.py | py | 1,603 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 47,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.subplot",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "... |
32166393486 | """All isort specific exception classes should be defined here"""
from functools import partial
from pathlib import Path
from typing import Any, Dict, List, Type, Union
from .profiles import profiles
class ISortError(Exception):
"""Base isort exception object from which all isort sourced exceptions should inheri... | PyCQA/isort | isort/exceptions.py | exceptions.py | py | 7,060 | python | en | code | 6,145 | github-code | 1 | [
{
"api_name": "functools.partial",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "profiles.profiles",
"line_number": 85,
"usage_type": "argument"
},
{
"api_name": "typing.List",
"line_number": 93,
"usage_type": "name"
},
{
"api_name": "typing.Union",
... |
30400004984 | import json
from flask import Flask
from flask import request
import pandas as pd
import numpy as np
app = Flask(__name__)
@app.route('/indicator',methods=["POST","GET"])
def indicator():
if request.method == "POST":
data = eval(request.args.get("data"))
df = ... | abdulwahidgul24085/stocks-short-public-repo | Buy_Sell.py | Buy_Sell.py | py | 2,946 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "flask.request.args... |
71496460833 | import numpy as np
from scipy.optimize import root_scalar
class sieplasmadisc(object):
def __init__(self, theta_E_g, eta, phi, psi0_plasma_num, theta_0r, theta_0y, alpha, delta_rs, deltab_10, deltab_20):
self.theta_E_g = theta_E_g
self.eta = eta
self.phi = phi
self.psi0_plasma_num ... | everettiantomi/plasmalens | perturbative/plasma_jet_class_disc.py | plasma_jet_class_disc.py | py | 3,782 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.exp",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "scipy.optimize.root_scalar",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.sin",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.cos",
"line_... |
30940197338 | # Author: Israel Kwilinski
# Filename: sieve.py
# Date Created: Jan. 20, 2022
# Description: Visualization tool for the famous "Sieve of Eratosthenes" algorithm.
# This algorithm "sieves" out primes under a certain limit much faster than individual prime tests.
# Written in Python3 using pygle... | israel909/Prime-Visualizer | sieve.py | sieve.py | py | 9,057 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.zeros",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "pyglet.shapes.Line",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "pyglet.shapes",
"line_number": 58,
"usage_type": "attribute"
},
{
"api_name": "pyglet.shapes.Line"... |
42433980833 | from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = pd.read_csv('data1.csv', sep=",")
x = df[['temp','wind_speed','daylight_hour','Insolation','cloud']]
y = df[["value"]]
x_train, x_test, y_t... | jhchoi-ii/CBNU | 2021-01-산업인공지능_개론/과제-Lasso_regression/linear.py | linear.py | py | 828 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.LinearRegression",
"line_number": 13,
"usage_type": "call"
... |
17562752015 | import numpy as np
import gymnasium as gym
from matplotlib import animation
from matplotlib.animation import FuncAnimation
import matplotlib.pyplot as plt
import env as maBanditWorld
class epsilon_greedy:
#why does init need __? python needs it
def __init__(self, n_actions, env, seed):
self.env = env
... | Sam-Fatehmanesh/FSRIresearch | epsilon_greedy.py | epsilon_greedy.py | py | 9,269 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.random.seed",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "numpy.zeros",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"lin... |
36011621978 | """
Preprocess_Fischbach.py
Ryan Fischbach
Dr. Khuri
CSC373
12/4/2020
Final Project: Scraping Tweets For Classification Of Stock Price
This script takes in the preprocessed_stocks.csv and preprocessed_tweets.csv files and generates visualizations and other EDA to better understand the data.
To run, type "Python eda... | RyanFischbach/Data-Mining | FinalProject_Fischbach/eda_fischbach.py | eda_fischbach.py | py | 5,834 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.argv",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "os.path.isdir",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line_number"... |
5345258729 | #!/usr/bin/python
from botocore.session import Session
import re
import os
import sys
import botocore
import argparse
import jinja2
def striphtml(data):
p = re.compile(r'<.*?>')
return p.sub('', data)
def convert(name):
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
return re.sub('([a-z0-9])([A-Z... | StackStorm-Exchange/stackstorm-aws | etc/st2packgen/st2packgen.py | st2packgen.py | py | 3,633 | python | en | code | 15 | github-code | 1 | [
{
"api_name": "re.compile",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number":... |
25467629055 | __author__ = 'rafek@google.com (Rafe Kaplan)'
import appengine_config
from protorpc.webapp import service_handlers
import tunes_db
def main():
service_handlers.run_services(
[('/music', tunes_db.MusicLibraryService),
])
if __name__ == '__main__':
main()
| hanpfei/chromium-net | third_party/catapult/third_party/gsutil/third_party/protorpc/demos/tunes_db/server/services.py | services.py | py | 273 | python | en | code | 289 | github-code | 1 | [
{
"api_name": "protorpc.webapp.service_handlers.run_services",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "protorpc.webapp.service_handlers",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "tunes_db.MusicLibraryService",
"line_number": 12,
"usage_t... |
70505040994 | #json
import json
#tkinter library
from tkinter import *
import tkinter as tk
#pygame library
from pygame import *
#import python Image Library
from PIL import Image, ImageTk
#function declaration
def quit_app():
my_window.destroy()
#button music
def play_music():
mixer.... | anmmoinuddin/Python | Finalaufgabe von GUI Entwicklung-1st phase.py | Finalaufgabe von GUI Entwicklung-1st phase.py | py | 5,241 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "tkinter.Frame",
"line_number": 158,
"usage_type": "call"
},
{
"api_name": "tkinter.TOP",
"line_number": 159,
"usage_type": "attribute"
},
{
"api_name": "tkinter.X",
"line_number": 159,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"li... |
37086718038 | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
import sqlite3
from contextlib import closing
import scrapy
import json
class MsbrPipeline(object):
def open_spider(self... | kmkirov/msbr | msbr/msbr/pipelines.py | pipelines.py | py | 1,641 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sqlite3.connect",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "contextlib.closing",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "contextlib.closing",
... |
2598497133 | from typing import Any, List, Optional
import discord
from discord.components import SelectOption
from discord.ext import commands
import logging
import logging.handlers
from discord.interactions import Interaction
from discord.utils import MISSING
logger = logging.getLogger('discord')
logger.setLevel(logging.INFO)
h... | Tobydog0501/XiaoYueDCBot | core/core.py | core.py | py | 2,071 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "logging.handlers.RotatingFileHandler",
"line_number": 13,
"usage_type": "call"
},
{
"api_name... |
23159972120 | ###############################################################################
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by ... | donovan-h-parks/RefineM | refinem/plots/gc_plots.py | gc_plots.py | py | 7,660 | python | en | code | 60 | github-code | 1 | [
{
"api_name": "refinem.plots.base_plot.BasePlot",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "refinem.plots.base_plot.BasePlot.__init__",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "refinem.plots.base_plot.BasePlot",
"line_number": 34,
"usage_t... |
23613842278 | # -*- coding: utf-8 -*-
import logging
import torch
from torch import nn
from ..layers import TextEncoder
from ..layers.decoders import get_decoder
from ..utils.misc import get_n_params
from ..vocabulary import Vocabulary
from ..utils.topology import Topology
from ..utils.ml_metrics import Loss
from ..utils.device im... | lium-lst/nmtpytorch | nmtpytorch/models/nmt.py | nmt.py | py | 19,994 | python | en | code | 391 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "utils.topology.Topolo... |
7997068898 | import chess
import chess.engine
import chess.pgn
import os
from decouple import config
import numpy as np
def fen_to_matrix(fen):
piece_values = {"P": 1, "R": 5, "N": 3, "B": 3, "K": 100, "Q": 9, "p": -1, "r": -5, "n": -3, "b": -3, "k": -100,
"q": -9}
matrix = [[0 for _ in range(8)] for _... | ChereGG/Popeye | backend/PopeyeBackend/preprocessing/fen_preprocessing.py | fen_preprocessing.py | py | 9,461 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.zeros",
"line_number": 112,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number": 112,
"usage_type": "call"
},
{
"api_name": "numpy.empty",
"line_number": 123,
"usage_type": "call"
},
{
"api_name": "numpy.empty",
"line_number"... |
9384917908 | from django.contrib import admin
from simple_history.admin import SimpleHistoryAdmin
from .models import Foo, Bar
class FooModelAdmin(SimpleHistoryAdmin):
list_display = ["name", "email", "phone"]
class BarModelAdmin(SimpleHistoryAdmin):
list_display = ["foo", "kind", "get_value", "status"]
actions =... | mjr/django-fk-test | django_fk_test/core/admin.py | admin.py | py | 784 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "simple_history.admin.SimpleHistoryAdmin",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "simple_history.admin.SimpleHistoryAdmin",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "django.contrib.admin.site.register",
"line_number": 31,
"u... |
33876079295 | #Purpose: Decode a steganographically coded image
#Author: Dewar P.
from PIL import Image
def hidden_num(pixel):
r,g,b = pixel
lsdr = r%10 *100
lsdg = g%10 *10
lsdb = b%10 *1
return(lsdr+lsdg+lsdb)
def hidden_char(X):
return(chr(X))
def decode(original_pic, N):
pic... | pdewar/Python | Steganography/stegdecode.py | stegdecode.py | py | 1,411 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "PIL.Image.open",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 58,
"usage_type": "name"
}
] |
6918515986 | from django.urls import path
from . import views
app_name = 'math_chart'
urlpatterns = [
path('', views.home, name='home'),
path('my_chart_10/', views.my_chart_10, name='my_chart_10'),
path('my_chart_20/', views.my_chart_20, name='my_chart_20'),
path('b6_b6', views.b6_b6, name='b6_b6'),
path('my_sq... | DispersionemScientia/Math_Charts | math_chart/urls.py | urls.py | py | 579 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
27199421294 | from selenium.common.exceptions import NoSuchElementException, ElementClickInterceptedException
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.su... | Johanlai/ds_salary_project | glassdoor_scraper.py | glassdoor_scraper.py | py | 8,794 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "tqdm.auto.tqdm._instances.clear",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "tqdm.auto.tqdm._instances",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "tqdm.auto.tqdm",
"line_number": 12,
"usage_type": "name"
},
{
"api... |
32200663906 | from tkinter import *
import pygame as py
import os
window = Tk()
window.title("Ton Player")
window.geometry("650x260")
window.config(bg="black")
py.init()
playstate = 0
mainb = PhotoImage(file="Icons/play.png")
pauseimage = PhotoImage(file="Icons/stop.png")
playimage = PhotoImage(file="Icons/play.png")
def playsto... | capsaicin01/Mp3-Player | main.py | main.py | py | 2,442 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pygame.init",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pygame.mixer.music.load",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pygame.mixer",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "pygame.mixer.mu... |
5928162899 | import torch
import torch.nn.functional as F
class Act(torch.nn.Module):
def __init__(self, act: str, slope: float = 0.05) -> None:
super(Act, self).__init__()
self.act = act
self.slope = slope
self.shift = torch.log(torch.tensor(2.0)).item()
def forward(self, input: torch.Ten... | Open-Catalyst-Project/ocp | ocpmodels/models/utils/activations.py | activations.py | py | 1,471 | python | en | code | 518 | github-code | 1 | [
{
"api_name": "torch.nn",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.log",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torch.tensor",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torch.Tensor",
"line_number":... |
19103804423 | import os
import unittest
import numpy as np
import pydrake
from pydrake.attic.multibody import shapes
from pydrake.common.eigen_geometry import Isometry3
class TestShapes(unittest.TestCase):
def test_api(self):
box_size = [1., 2., 3.]
radius = 0.1
length = 0.2
box = shapes.Box(... | GTLIDAR/safe-nav-locomotion | motion_planner/drake/bindings/pydrake/attic/multibody/test/shapes_test.py | shapes_test.py | py | 2,312 | python | en | code | 21 | github-code | 1 | [
{
"api_name": "unittest.TestCase",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pydrake.attic.multibody.shapes.Box",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pydrake.attic.multibody.shapes",
"line_number": 17,
"usage_type": "name"
},
... |
11324927158 | # This example requires the 'members' privileged intent to use the Member converter.
# This example also requires the 'message_content' privileged intent to function.
import traceback
import typing
import discord
from discord.ext import commands
intents = discord.Intents.default()
intents.members = True
intents.mess... | Rapptz/discord.py | examples/converters.py | converters.py | py | 5,355 | python | en | code | 13,719 | github-code | 1 | [
{
"api_name": "discord.Intents.default",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "discord.Intents",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "discord.ext.commands.Bot",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": ... |
25331119448 | from itertools import zip_longest, combinations
import json
import os
import warnings
import numpy as np
import tvm
from tvm import relay
from tvm import rpc
# from tvm.contrib.debugger import debug_runtime as graph_executor
from tvm.contrib import graph_executor
from tvm.relay.op.contrib import clml
from tvm.contri... | mvermeulen/tvm | tests/python/contrib/test_clml/infrastructure.py | infrastructure.py | py | 7,005 | python | en | code | null | github-code | 1 | [
{
"api_name": "os.getenv",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "tvm.relay",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "tvm.ir",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name": "tvm.relay",
"line_number": 6... |
25615912618 | # from django.shortcuts import render
from django.contrib.auth.models import User
from room import models
import requests
from rest_framework import status
from rest_framework.utils import json
from rest_framework.views import APIView
from rest_framework.response import Response
# from rest_framework_simplejwt.tokens ... | LinYi-Taiwan/borrow_sys_backend | room/views.py | views.py | py | 6,101 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "rest_framework.r... |
69860707874 | import tkinter as tk
from tkinter import filedialog
from tkinter.ttk import Combobox
import pyperclip
from summarizetext import Summarizer
from languagedropdown import dropdown
# Create an instance of the Summarizer class
summarizer = Summarizer()
# Function to browse for a file
def browse_file():
filename = file... | tokyographer/text-summarizer-python | text_summarizer_gui.py | text_summarizer_gui.py | py | 3,008 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "summarizetext.Summarizer",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "tkinter.filedialog.askopenfilename",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tkinter.filedialog",
"line_number": 13,
"usage_type": "name"
},
{
"api... |
27824488516 | from numba import prange, jit
import numpy as np
@jit(nopython=True, parallel=True)
def reshape_to_2d_array_numba(arr: np.ndarray, new_shape: tuple):
reshaped_array = np.empty(new_shape, dtype=arr.dtype)
# Reshape the array without using np.reshape
idx = 0
for i in range(new_shape[0]):
for j ... | sharon200102/VMD | MovingCameraForegroundEstimetor/utils_numba.py | utils_numba.py | py | 17,650 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.ndarray",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "numpy.empty",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numba.jit",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.ndarray",
"line_numbe... |
41983004925 | # Compute mean and variance for training data
import json
import os
import random
from pytorch_wavelets import DWTForward, DWTInverse
from torchvision.datasets import ImageFolder
from torchvision import transforms
from torch.utils.data import Dataset
from PIL import Image
import torch
from torch.utils.data im... | makai0222/WiGNet | WiGNet/normalize.py | normalize.py | py | 9,935 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "random.seed",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number... |
25623285728 | import tensorflow as tf
from tensorflow.keras import datasets, layers, models
import matplotlib.pyplot as plt
(train_images, train_labels), (test_images, test_labels) = datasets.cifar10.load_data()
# Normalize pixel values to be between 0 and 1, like we did in testproj 6
train_images, test_images = train_i... | Ihsan101/tensorflow-test-projects | Convolutional Neural Network Models/testproj 7- CNN Model, Image Class.py | testproj 7- CNN Model, Image Class.py | py | 3,651 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "tensorflow.keras.datasets.cifar10.load_data",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.datasets.cifar10",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras.datasets",
"line_number": 6,
"usage_typ... |
30000999890 | import dlvhex
from dlvhex import ID
import hexlite
import atexit
import logging
import os
import re
import sys
import threading
import time
# this requires jpype to be installed and it requires a working Java runtime environment
import jpype
from jpype import java
from jpype.types import *
logging.info("starting JVM... | hexhex/hexlite | plugins/javaapiplugin.py | javaapiplugin.py | py | 12,643 | python | en | code | 13 | github-code | 1 | [
{
"api_name": "logging.info",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "jpype.startJVM",
"lin... |
28393657639 | import numpy as np
import cv2
import json
import os.path as osp
import xml.etree.ElementTree as ET
import copy
import datetime
from collections import defaultdict
from coco_annotation import CocoAnnotationClass
def recursively_get_all_subchild_ids(e_id, element_ids_dict):
if e_id not in element_ids_dict:
return ... | mrlooi/labelme_scripts | labelme_to_coco.py | labelme_to_coco.py | py | 4,494 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "os.path.join",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 64,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 65,
... |
313912497 | import sys
if sys.version_info[0] == 3:
from builtins import str
import json
from ._loader import ClassLoader
from ._codec_utils import parseMoClassName, getParentDn, listWithTotalCount
def parseJSONError(rspText, errorClass, httpCode=None):
try:
rspDict = json.loads(rspText)
data = rspDict.g... | datacenter/cobra | cobra/mit/jsoncodec.py | jsoncodec.py | py | 3,897 | python | en | code | 89 | github-code | 1 | [
{
"api_name": "sys.version_info",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "_codec_utils.listWithTotal... |
4451022121 | from qdrant_client import models, QdrantClient
import numpy as np
import torch
import pandas as pd
from sentence_transformers import SentenceTransformer
from transformers import ViTImageProcessor, ViTModel
import cv2
import numpy as np
import time
import os
qdrant = QdrantClient(":memory:")
def upload_qdrant(embeddin... | MuhammadBilal848/Vector-DB-Qdrant | qdrant_module for image.py | qdrant_module for image.py | py | 2,088 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "qdrant_client.QdrantClient",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "qdrant_client.models.VectorParams",
"line_number": 25,
"usage_type": "call"
},
{
"api_name"... |
1586067119 | """Tests for ``highcharts.no_data``."""
import pytest
from json.decoder import JSONDecodeError
from highcharts_core.global_options.language import Language as cls
from highcharts_core import errors
from tests.fixtures import input_files, check_input_file, to_camelCase, to_js_dict, \
Class__init__, Class__to_untr... | highcharts-for-python/highcharts-core | tests/global_options/language/test_language.py | test_language.py | py | 3,946 | python | en | code | 40 | github-code | 1 | [
{
"api_name": "tests.fixtures.Class__init__",
"line_number": 98,
"usage_type": "call"
},
{
"api_name": "highcharts_core.global_options.language.Language",
"line_number": 98,
"usage_type": "argument"
},
{
"api_name": "pytest.mark.parametrize",
"line_number": 96,
"usage_typ... |
14339755416 | from django.contrib.auth import get_user_model
from django.test import Client, TestCase
from django.urls import reverse
from posts.models import Group, Post
User = get_user_model()
class PostPagesTests(TestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.user = User.objects... | alexandr-shinko96/hw04_tests | yatube/posts/tests/test_views.py | test_views.py | py | 3,719 | python | ru | code | 0 | github-code | 1 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.test.TestCase",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "posts.models.Group.objects.create",
"line_number": 16,
"usage_type": "call"
},
... |
41746279645 | import pandas as pd
import numpy as np
df = pd.read_csv('WA_Fn-UseC_-Telco-Customer-Churn.csv')
df.head()
# Convert categorical variables into numerical variables
from sklearn.preprocessing import LabelEncoder, StandardScaler
categorical_features = ['gender', 'Partner', 'Dependents', 'PhoneService', 'MultipleLines', ... | aniketwdubey/Customer-Churn-Prediction | churn.py | churn.py | py | 3,769 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.LabelEncoder",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 27,
"usage_type": "call"
},... |
133399967 | import numpy as np
import random
import matplotlib.pyplot as plt
from matplotlib import animation
################################
# 修改这个alpha玩!其他代码不需要动!
# 这个示意的例子跟真实ML不一样,alpha通常在0.001到0.1之间
alpha = 0.9
################################
x = np.arange(-5,5,0.1)
y = x**2
fig, ax = plt.subplots()
ax.grid()
ax.plot(x,... | zxupstar/TensorFlow-Tools | Learn_rating.py | Learn_rating.py | py | 1,356 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "numpy.arange",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "matplotlib.... |
18286028278 | import os, sOE
import matplotlib.pyplot as plt
from Request import module
from cassiopeia import riotapi
from cassiopeia.type.core.common import LoadPolicy
import pprint
def main():
name = "Céll"
region = "NA"
key = os.environ["DEV_KEY"]
riotapi.set_api_key(key)
riotapi.set_load_policy(LoadPolicy... | plyte/Creep-My-Score | Driver.py | Driver.py | py | 1,405 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "os.environ",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "cassiopeia.riotapi.set_api_key",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cassiopeia.riotapi",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "cas... |
23114807108 | from models.PersonsModel import PersonsModel
from core.Controller import Controller
from views.LoginFrame import LoginFrame
from pubsub import pub
import wx
class LoginController(Controller):
def __init__(self, session=None, parent=None):
super().__init__(session)
self.model: PersonsModel = Person... | hifra01/aplikasi-wisata | src/controllers/auth/LoginController.py | LoginController.py | py | 2,156 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "core.Controller.Controller",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "models.PersonsModel.PersonsModel",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "views.LoginFrame.LoginFrame",
"line_number": 12,
"usage_type": "call"
},
{... |
22727159189 | import os
import cv2
import time
name = 'trial'
file_format = '.mp4'
fps = 24.0
res = '480p'
duration = 30
# Standard Video Dimensions
STD_DIMENSIONS = {
"480p": (640, 480),
"720p": (1280, 720),
"1080p": (1920, 1080),
"4k": (3840, 2160),
}
# Set resolution for the video capture
def change_res(cap, w... | farhanfuadabir/video-recorder | main.py | main.py | py | 1,670 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "cv2.VideoWriter_fourcc",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "cv2.VideoWriter_fourcc",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.path.splitext",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "os.pat... |
18023591978 | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from torch import optim
import warnings
from .training import WGAN
def make_GANbalancer(dataset, generator_input, generator_layers, critic_layers,
emb_sizes, no_aux,learning_rate,critic_iteration... | johaupt/GANbalanced | DEPRECATED/wgan/models_cat.py | models_cat.py | py | 9,506 | python | en | code | 14 | github-code | 1 | [
{
"api_name": "torch.optim.Adam",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "torch.optim",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "torch.optim.Adam",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "torch.optim",
"line... |
72116078755 | import os
import pickle
import shutil
import tempfile
import unittest
from rnn_prof import run_rnn as undertest
from rnn_prof.data.constants import ASSISTMENTS
from rnn_prof.data.splitting_utils import split_data
from rnn_prof.data.wrapper import load_data, DEFAULT_DATA_OPTS
ASSISTMENTS_TESTDATA_FILENAME = os.path.jo... | Knewton/edm2016 | rnn_prof/tests/test_run_rnn.py | test_run_rnn.py | py | 2,499 | python | en | code | 58 | github-code | 1 | [
{
"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.dirname",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "unittest.TestCase",
"li... |
6788616069 | from flask import Flask, jsonify
import requests
import csv
from io import StringIO
import datetime
from lib.countries import countries
from lib.date import getDate
app = Flask(__name__)
url = "https://github.com/CSSEGISandData/COVID-19/raw/master/csse_covid_19_data/csse_covid_19_daily_reports/"
def get_data(b_url... | kojo-shark/pase-python | app.py | app.py | py | 2,058 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "io.StringIO",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 2... |
5550341640 | import requests
import urllib.request
import os
import time
def run(url):
headers = {'User-Agent': 'Mozilla/5.0'}
folder_path = 'img'
if (os.path.exists(folder_path) == False):
os.makedirs(folder_path) #Create folder
for index in range(0, 100):
html = requests.get(url, headers = header... | don6105/OCR-Captcha-Recognition | download_img.py | download_img.py | py | 638 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.path.exists",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number... |
34086039184 | """
This file computes the mutual information between every pair of variables in the specificed Bayes net
"""
import pandas as pd
import numpy as np
import pickle
from itertools import product
from argparse import ArgumentParser
from tqdm import tqdm
import sys
sys.path.extend(["../core", "./code/core"])
from pyprojroo... | benpry/why-think-step-by-step | code/evaluate/mutual_informations.py | mutual_informations.py | py | 2,310 | python | en | code | 7 | github-code | 1 | [
{
"api_name": "sys.path.extend",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "itertools.product",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line... |
5163812852 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import copy
import argparse
import cv2 as cv
import numpy as np
import tensorflow as tf
from utils import CvFpsCalc
from mlsd.utils import pred_lines, pred_squares
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument("--device", type=int, defa... | Kazuhito00/M-LSD-warpPerspective-Example | example.py | example.py | py | 5,989 | python | en | code | 10 | github-code | 1 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "cv2.getPerspectiv... |
38950075756 | # Imports
from flask import Flask, send_from_directory, jsonify, render_template, request, make_response, redirect, url_for, escape, send_file
import json
from flask_cors import CORS
from werkzeug.utils import secure_filename
import os
import sys
import hashlib
import secrets
import base64
# Adding all files for impor... | ahanabhattchrya/eSlay | backend/app/app.py | app.py | py | 9,922 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "sys.path.append",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_nu... |
2819717353 | from app import app, db, load_user
from app.models import User, Order, Admin, Reseller, Product, Item
from app.forms import SignUpForm, SignInForm, CreateOrderForm, ProductForm
from flask import render_template, redirect, url_for, request, flash, session
from flask_login import login_required, login_user, logout_user, ... | simaomansur/project-1-windoors | app/routes.py | routes.py | py | 10,950 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "flask.render_template",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "app.app.route",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "app.app",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "app.app.route",
"line_n... |
72492188833 | """Temporary utility for visualising the data contained
in the weather files.
This file is now being kept solely as a record of
the development process."""
from scraper.scraping_tools import get_files, get_xml
from datetime import datetime
import plotly.graph_objects as go
class WeatherEntry:
# make a method that... | Dalia-21/weather-forecast | deprecated/xml_display.py | xml_display.py | py | 4,913 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "scraper.scraping_tools.get_files",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "scraper.scraping_tools.get_xml",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 73,
"usage_type": "call"
},... |
14386219701 | """
## 14-4. 이진 트리 반전
이진 트리를 좌우 반전 시켜라.
"""
from typing import *
import collections
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def invertTree(self, root: Tre... | hyo-eun-kim/algorithm-study | ch14/saeyoon/ch14_4_saeyoon.py | ch14_4_saeyoon.py | py | 1,732 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "collections.deque",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 48,
"usage_type": "call"
}
] |
5586775092 | def pthFactor(n, p):
from functools import reduce
factors = reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0 ))
factors.sort()
if p > len(factors):
return 0
return factors[p - 1]
import time
t1 = time.time()
print(pthFactor(10**15, 5))
print(f"finished in {ti... | tejas-adg/Code_of_Codswallop | Python_Programs/ATA_Prob/p2_sol.py | p2_sol.py | py | 342 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "functools.reduce",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 12,
"usage_type": "call"
}
] |
70706180514 | import paho.mqtt.client as mqtt
import time
#import PWM
#import grovepi
import grove_rgb_lcd
from grove_rgb_lcd import *
import statistics
# GrovePi + Grove Buzzer
import time
import grovepi
# Connect the Grove Buzzer to digital port D8
# SIG,NC,VCC,GND
buzzer = 3
button = 4
grovepi.pinMode(button,"INPUT")
#note_prod... | usc-ee250-spring2021/lab05-the-duo | ee250/lab05/lcd_tuner2.py | lcd_tuner2.py | py | 3,181 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "grovepi.pinMode",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "statistics.mean",
"line_number": 127,
"usage_type": "call"
},
{
"api_name": "grovepi.digitalRead",
"line_number": 131,
"usage_type": "call"
},
{
"api_name": "grove_rgb_lcd.s... |
4752275130 | import os
import openai
openai.api_key = ""
def get_completion(prompt, model="gpt-3.5-turbo"):
messages = [{"role": "user", "content": prompt}]
response = openai.ChatCompletion.create(
model=model,
messages=messages,
temperature=0,
)
return response.choices[0].message["content... | yeonieheoo/MemoryCompanion | ML4H_LLM/case57.py | case57.py | py | 2,807 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "openai.api_key",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "openai.ChatCompletion.create",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "openai.ChatCompletion",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name... |
71317077794 | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
from torch.optim import Adam
import numpy as np
import datasets, networks, utils, loss, kernels, options
import os
import sys
import time
import tqdm
def train(loader, model, optimizer, criterion, epoch, d1, ... | teboli/CPCR | train_lchqs.py | train_lchqs.py | py | 7,650 | python | en | code | 25 | github-code | 1 | [
{
"api_name": "tqdm.tqdm",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.random.rand",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "torch.randn_like",
... |
71732253793 | #######################################################################################################
# LICENSE
# Copyright (C) 2021 - INPE - NATIONAL INSTITUTE FOR SPACE RESEARCH - BRAZIL
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU
# General Public Licens... | diegormsouza/SHOWCast-2.3.0_a | html_update.py | html_update.py | py | 4,684 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "os.path.dirname",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_nu... |
31828763438 | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 30 13:01:43 2021
@author: MI2
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import tia.bbg.datamgr as dm
from datetime import date as dt
from pandas.tseries.offsets import BDay
startDate = dt(1980,1,1)
endDate = dt(2020,12,31)
... | tommyoneil/Market-Models | Extras/VWAP.py | VWAP.py | py | 1,962 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "datetime.date",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "tia.bbg.datamgr.BbgDataManager",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "tia.bbg.da... |
17514977530 | import argparse
import yaml
from src.processed import PROCESSED
parser = argparse.ArgumentParser()
parser.add_argument("--config", type=str, required=True, help="path to yaml config")
args = parser.parse_args()
with open(args.config, mode="r") as stream:
config = yaml.safe_load(stream)
if __name__ == "__main_... | EDJINEDJA/foot-ml | app.py | app.py | py | 382 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "yaml.safe_load",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "src.processed.PROCESSED",
"line_number": 17,
"usage_type": "call"
}
] |
28909376277 | import random
import datetime
import torch
from tqdm import tqdm
from src.utils.load_data import load_tables
from src.utils.reproducibility import set_random_seed
from src.model.pretrain import PretrainMatching
from src.graph_construction.tabular_graph import TabularGraph
tables = None
def pretrain(config):
set... | FeiWang96/GTR | src/train/run_pretraining.py | run_pretraining.py | py | 3,289 | python | en | code | 34 | github-code | 1 | [
{
"api_name": "src.utils.reproducibility.set_random_seed",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "src.utils.load_data.load_tables",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "src.model.pretrain.PretrainMatching",
"line_number": 20,
"usage... |
31445927920 | import math
import torch
from timm.scheduler import CosineLRScheduler
from torch.optim.lr_scheduler import LambdaLR
class FlatAnnealLR(torch.optim.lr_scheduler.LambdaLR):
"""
Schedule LR linear anneal from 1.0 to `eta_min` after `T_max * flat_ratio` steps.
"""
def __init__(
self,
opt... | Stardust87/VIP | src/utils/scheduler.py | scheduler.py | py | 2,339 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "torch.optim",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "math.cos",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "math.pi",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "math.cos",
"line_number": 7... |
384341994 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('school', '0014_auto_20161012_0659'),
]
operations = [
migrations.AlterField(
model_name='student',
n... | suryakumar1024/schoolcms | school/migrations/0015_auto_20161013_1126.py | 0015_auto_20161013_1126.py | py | 461 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AlterField",
"line_number": 14,
"usage_type": "call"
},
{... |
7029268671 | #!/usr/bin/python3
import asyncio
import evdev
from evdev import *
import dbus_next
from dbus_next.aio import MessageBus
import time
import logging
from hid_scanner import HidScanner
from usb_hid_decoder import UsbHidDecoder
class KvmMouse(object):
def __init__(self):
self.event_mice = dict()
async ... | BLeeEZ/rpi-kvm | rpi_kvm/mouse.py | mouse.py | py | 7,617 | python | en | code | 27 | github-code | 1 | [
{
"api_name": "logging.info",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "dbus_next.aio.MessageBus",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "dbus_next.BusType",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "logging.... |
8502662374 | from app import app
from flask import Blueprint, request, make_response, redirect, render_template, url_for, flash, json, jsonify, send_file
import requests
import re
import os
from .ortools import *
from .st_classes import *
GMAPS_KEY = os.getenv('GMAPS_API')
DEPOT = 'Sacramento, CA, USA'
def flash_errors(form):
f... | amiller5233/truck-routing-application | app/views.py | views.py | py | 3,358 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.getenv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.flash",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "flask.redirect",
"line_number"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.