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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12170355543 |
import pandas as pd
# import snowflake.connector
from snowflake.sqlalchemy import URL
from sqlalchemy import create_engine
from cryptography.fernet import Fernet
from ml_processor.configuration import config
import time
import os
import json
class snowflake_processor:
"""
Performing ETL tasks such as... | G-Geofrey/package_dev | ml/src/ml_processor/etl_processor.py | etl_processor.py | py | 5,017 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "os.path.join",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_nu... |
33626311925 | """
Console output colorizer. pyreadline required( on windows )
"""
__author__ = "Jussi Toivola"
__license__ = "MIT License"
from SCons.Platform import win32, posix
import os
import subprocess as sp
import sys
#: Pyreadline console
CONSOLE = None
try:
if os.name == "nt":
import pyreadline... | Tallefer/scons-for-symbian | colorizer.py | colorizer.py | py | 7,700 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.name",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "pyreadline.GetOutputFile",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sys.platform",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "sys.stdout",
... |
34277714260 | import torch
import sys
from vision.nn.mobilenet import MobileNetV1
from extract_tf_weights import read_weights
def fill_weights_torch_model(weights, state_dict):
for name in state_dict:
if name == 'classifier.weight':
weight = weights['MobilenetV1/Logits/Conv2d_1c_1x1/weights']
w... | qfgaohao/pytorch-ssd | translate_tf_mobilenetv1.py | translate_tf_mobilenetv1.py | py | 3,277 | python | en | code | 1,349 | github-code | 71 | [
{
"api_name": "torch.tensor",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.float32",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.tensor",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "torch.float32",
"lin... |
7841438067 | # -*- coding: utf-8 -*-
'''
Manage Kibana objects.
.. code-block:: yaml
kibana:
kibana_url: 'https://es.host.com:9200'
kibana_index: '.kibana'
.. code-block:: yaml
Ensure minimum dashboard is managed:
kibana_objects.present:
- name: 'Logs'
- kibana_content: <JSON object>
... | salt-formulas/salt-formula-kibana | _states/kibana_object.py | kibana_object.py | py | 3,508 | python | en | code | 5 | github-code | 71 | [
{
"api_name": "requests.put",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "requests.exceptions",
"line_number": 62,
"usage_type": "attribute"
},
{
"api_name": "requests.delete",
"line_number": 97,
"usage_type": "call"
},
{
"api_name": "requests.except... |
25304998588 | #!/usr/bin/env python3
import os
import sys
sys.path.append("../")
import utils
import imu
import time
from math import sqrt
import threading
stop_thread = threading.Event()
acc_data = []
imu_thread = threading.Thread(target=imu.imu_thread_func,args=(acc_data,stop_thread,))
imu_thread.start()
try:
while True:
... | nmarks99/aero-capstone | dronekit/imu_test.py | imu_test.py | py | 761 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "sys.path.append",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "threading.Event",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"l... |
38798649396 | """Dataset utilities."""
from typing import Union
import hashlib
import urllib.request
from tqdm import tqdm
def download_file(url: str, destination: str, progress_bar: bool = True, md5sum: Union[str, None] = None) -> None:
"""Download a file.
Parameters
----------
url: str
File URL.
des... | KamitaniLab/bdpy | bdpy/dataset/utils.py | utils.py | py | 1,396 | python | en | code | 30 | github-code | 71 | [
{
"api_name": "typing.Union",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "urllib.request.request.urlopen",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name"... |
38089976876 | from time import sleep
import argparse
import os
import re
import ntpath
import glob
import sys
import fileinput
from shutil import copyfile
import json
def parse_args():
"""Uses argparse to enable user to customize script functionality"""
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefa... | vymao/SNVCurate | calling/HaplotypeCaller.py | HaplotypeCaller.py | py | 9,523 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentDefaultsHelpFormatter",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 41,
"usage_type": "call"
},
{
... |
31126451980 | import os
import sys
# from typing import Sequence
sys.path.insert(0,os.getcwd())
import copy
import argparse
import shutil
import time
import numpy as np
import random
import torch
# import torch.backends.cudnn as cudnn
import torch.optim as optim
from torch.utils.data import DataLoader
from torch.nn.p... | Fafa-DL/Awesome-Backbones | tools/train.py | train.py | py | 7,034 | python | en | code | 1,057 | github-code | 71 | [
{
"api_name": "sys.path.insert",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"l... |
74981918310 | import sqlite3
from datetime import datetime
conn = sqlite3.connect('crud.db')
cursor = conn.cursor()
def main():
print ("Qual tabela gostaria de acessar? ")
print ("Para acessar postagens, escreva POST" )
print ("Para acessar comentarios, escreva COMMENT ")
table = input("-> ")
... | bluz1n/python-tests | CRUD.py | CRUD.py | py | 6,495 | python | pt | code | 0 | github-code | 71 | [
{
"api_name": "sqlite3.connect",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 46,
"usage_type": "name"
},
{
"api_name": "datetime.datet... |
20925450116 | import pandas as pd
import simplejson as json
data_file = open("fiveyearsdata.json", "r")
data = json.load(data_file)
data = data
print("Data size:", len(data), "observations")
df = pd.DataFrame()
for i, d in enumerate(data[:]): # Going through data: observation by observation per each day
try:
df_1 = pd... | tabarkarajab/Predicted-Weather-Temperature | CODE/JSONtoCSV.py | JSONtoCSV.py | py | 1,178 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "simplejson.load",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
... |
31966291413 | # encoding=<Encoding.LATIN1: 0>
import os
from shutil import copy2, move
from pydub import AudioSegment
import mutagen
from mutagen import mp4, easymp4, mp3, aiff
class AifMetaData:
def __init__(self, fl):
self.title = str(fl.get('TIT2', None))
self.artist = str(fl.get('TPE1', None))
self.albumArtist =... | howesc/file-scripts | audio-sorting/aif_metaData.py | aif_metaData.py | py | 1,436 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.path.join",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "os.walk",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 4... |
20743759446 | #!/usr/bin/env python
# lint_ignore=E501
# ***** BEGIN LICENSE BLOCK *****
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
# ***** END LICENSE BLOCK *****
""" updates.py... | WaterfoxCo/Waterfox-Classic | testing/mozharness/scripts/release/publish_balrog.py | publish_balrog.py | py | 7,000 | python | en | code | 160 | github-code | 71 | [
{
"api_name": "sys.path.insert",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_num... |
19700536915 | from selenium.webdriver.common.by import By
from traceback import print_stack
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import *
import utilities.custom_logger as cl
import logging
import time
import os
class... | NaliniGovindaraj/seleniumeasy | base/seleniumdriver.py | seleniumdriver.py | py | 4,877 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "utilities.custom_logger.customLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "utilities.custom_logger",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "logging.DEBUG",
"line_number": 13,
"usage_type": "attribute"
},
{
"a... |
23660695917 | from django.db.models.signals import post_save
from django.dispatch import receiver
from .models import User, LoanedBook
from .tasks import send_user_data, send_loaned_book_data
@receiver(post_save, sender=User)
def send_user_data_event(sender, **kwargs) -> None:
user = kwargs["instance"]
created = kwargs["c... | Ennyola/library_microservice | client_api/api/signals.py | signals.py | py | 1,002 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "tasks.send_user_data.delay",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "tasks.send_user_data",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "django.dispatch.receiver",
"line_number": 8,
"usage_type": "call"
},
{
"api_name"... |
29043706029 | import config as cfg
if cfg.lang == 'en':
import localization.en as msg_cfg
else:
import localization.ru as msg_cfg
from messages.message_base import MessageBase
class ModuleMsg(MessageBase):
"""Constructs the module asking message with Buttons
based on MessageBase class"""
def __init__(self, ... | vovapetryna/DR_questions | messages/module_message.py | module_message.py | py | 1,223 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "config.lang",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "messages.message_base.MessageBase",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "messages.message_base.MessageBase.__init__",
"line_number": 16,
"usage_type": "call"
... |
71858803111 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('project', '0001_initial'),
('inventory', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | awemulya/prithivi-construction | inventory/migrations/0002_demand_demandrow.py | 0002_demand_demandrow.py | py | 1,447 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 16,
"usage_type": "call"
},
... |
15636506531 | import os
import logging
from collections import OrderedDict
import json
import numpy as np
import random
import torch
def set_logger(params, log_file=None):
if log_file is None:
dataset_id = params['dataset_id']
model_id = params['model_id']
log_dir = os.path.join(params['model_root'], da... | Qingfeng-Yao/Test_Codes | CTR/torch/utils.py | utils.py | py | 1,362 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.path.join",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 1... |
72110671909 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import sklearn.metrics
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler
from sklearn.cluster import KMeans
import os
os.environ['OMP_NUM_THREADS'] = '2'
data = pd.read_csv('p... | freshmea/chungnam_chatbot | pytorch/torch15.py | torch15.py | py | 1,168 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "os.environ",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.get_dummies",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
... |
41827110578 |
import copy
import os
import time
import warnings
from collections import defaultdict, namedtuple
from enum import unique
from typing import Callable, Dict, Iterable, List, NamedTuple, Optional, Tuple, Union
from continuum.rehearsal.memory import RehearsalMemory
from continuum.tasks.base import BaseTaskSet
import num... | oleksost/latent_CL | main.py | main.py | py | 38,327 | python | en | code | 28 | github-code | 71 | [
{
"api_name": "torch.cuda.is_available",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.CrossEntropyLoss",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "tor... |
25484244134 | from scipy.interpolate import RegularGridInterpolator as RGI
import numpy as np
import math as m
import pandas as pd
# from sympy import Point3D, Plane, Line3D
from multiprocessing import Pool
import time
import matplotlib.pyplot as plt
import matplotlib as mpl
import matplotlib.cm as cmx
from matplotlib.collections im... | eliottjohnson/MADX-Examples-Eliott | atracker.py | atracker.py | py | 28,137 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.sqrt",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.arctan",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.arcsin",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": ... |
69962943910 | import matplotlib.pyplot as plt
import tensorflow as tf
import numpy as np
import pandas as pd
import os
import sys
from PIL import Image
from tensorflow.python.keras.models import Sequential
from tensorflow.python.keras.layers import Conv2D, Dense, MaxPool2D, Flatten
from tensorflow.python.keras.layers import BatchNo... | evpa/cactus-classification | nn.py | nn.py | py | 2,930 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pandas.read_csv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "numpy.zeros",
"line_numb... |
73334676071 | from pylab import *
import netCDF4
nc = netCDF4.Dataset(sys.argv[1])
ncv=nc.variables
idx = int(sys.argv[2])
no3 = ncv['hzg_ecosmo_no3'][:,idx,-1]
dia = ncv['hzg_ecosmo_dia'][:,idx,-1]
fla = ncv['hzg_ecosmo_fla'][:,idx,-1]
temp = ncv['temp'][:,idx,-1]
salt = ncv['salt'][:,idx,-1]
zoo = ncv['hzg_ecosmo_microzoo'][:,i... | hofmeist/schism-setups | narrowlake/plot/plot_ecosmo_station.py | plot_ecosmo_station.py | py | 1,038 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "netCDF4.Dataset",
"line_number": 4,
"usage_type": "call"
}
] |
31589844648 | #!/usr/bin/python3
import os
import sys
import time
from multiprocessing import Value, Queue, Process
import cv2
import numpy as np
from observer import Camera
from observer.cam_defs import *
__all__ = ['do_setup']
# keys
KEY_RETURN = 13
KEY_ESC = 27
# windows
CONTROL = "Control"
DELTA = "Delta"
DILATE = "Dilate"... | PoruchikRjevski/pytelecambot | src/cam_tester.py | cam_tester.py | py | 6,480 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "multiprocessing.Value",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Value",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Value",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "mul... |
4879508480 | import datetime
import django
import sys
import os
from ApiTest.serializers import ProjectDynamicDeserializer
curPath = os.path.abspath(os.path.dirname(__file__))
rootPath = os.path.split(curPath)[0]
PathProject = os.path.split(rootPath)[0]
sys.path.append(rootPath)
sys.path.append(PathProject)
os.environ.setdefault... | liudefang/Auto_Test_Platform | ApiTest/common/common.py | common.py | py | 3,353 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "os.path.abspath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.split",
"line_n... |
21705087442 | from django.shortcuts import render, redirect
from django.contrib.auth import login, authenticate, logout
from django.template.loader import render_to_string
from django.utils.encoding import force_bytes, force_text
from src.account.forms import RegistrationForm, AccountAuthenticationForm, AccountUpdateForm
from src.a... | bartkow1999/chess-tournaments-website | src/account/views.py | views.py | py | 4,839 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "src.account.forms.RegistrationForm",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "django.contrib.sites.shortcuts.get_current_site",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "django.template.loader.render_to_string",
"line_number": 2... |
30238776002 |
## Program to print the day based on date ##
import datetime
n = int(input('Enter no of dates:'))
li = []
status = False
if n in list(range(1,101)):
for i in range(n):
a = str(input('Enter date:'))
li.append(a)
day_dic = {0:'Monday',1:'Tuesday',2:'Wednesday',3:'Thursday',4:'Friday',5:'Saturday',6:'Sunday'}
... | venkatesh533/Practice | birthday.py | birthday.py | py | 479 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 18,
"usage_type": "attribute"
}
] |
70363129830 | #!/usr/bin/python3
from datetime import date, datetime
from flask import Flask, jsonify, make_response, request, abort
from flask_cors import CORS
import sys
import os
script_dir = os.path.dirname(os.path.abspath(__file__))
# Add the parent directory (which contains 'project_directory') to the Python path
parent_dir =... | Henree001/hng | api_endpoint/myapp.py | myapp.py | py | 2,151 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.path.dirname",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line... |
27703725476 | import os
import pickle
import requests
# Karaoke Mugen repository to scrape from
kara_list_url = "https://kara.moe/api/karas/"
media_download_url = "https://kara.moe/downloads/medias/{mediafile}"
kara_bundle_url = "https://kara.moe/api/karas/{kid}/raw"
# Language to scrape
language = "jpn"
# Sub filetype to scrape f... | 42aruaour/KaraokeSync | kara_moe_scraper.py | kara_moe_scraper.py | py | 2,480 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "requests.get",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pickle.dump",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": ... |
5746379895 | import datetime
import glob
dt = datetime.datetime.now()
code = ['!','@','#','$','%','^','&','*','(',')','-','+','=',';',':','`','~','?','/','<','>','1','2','3','4','5',
'A','E','I','O','U','a','e','i','o','u','D','M','N','G','Z','d','m','n','g','z','R','W']
alphabet = ['a','b','c','d','e','f','g','h','i... | irondomi/CodedNotes | CodeNotes v1.py | CodeNotes v1.py | py | 4,537 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "datetime.datetime.now",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "glob.glob",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "glob.glob",
... |
6204285152 | import falcon
from kanaria.server.email_util import Email
from kanaria.core.agent import Agent
class IndexResource(object):
def on_get(self, req, resp):
import json
msg = {
"message": "kanaria works well."
}
resp.body = json.dumps(msg)
class KanariaResource(object):... | icoxfog417/kanaria | kanaria/server/app.py | app.py | py | 1,119 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "json.dumps",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "kanaria.server.email_util.Email",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "kanaria.core.agent.Agent",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "f... |
11025090730 | # -*- coding: utf-8 -*-
"""
Created on Fri Jul 10 19:17:58 2020
@author: SOPHIE
"""
from wordcloud import WordCloud
import pandas as pd
import matplotlib.pyplot as plt
from PIL import Image
import numpy as np
from lxml import etree
from nltk.tokenize import word_tokenize
#导入数据
data = pd.read_csv('Marke... | xiaozhe26/EK_Data_Engine | Week5.py | Week5.py | py | 1,109 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pandas.read_csv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "nltk.tokenize.word_tokenize",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "wordcloud.WordCloud",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "wordc... |
4679808440 | from flask import render_template, url_for, request, redirect
from src import app, db
from src.models import Article
@app.route('/')
@app.route('/home')
def index():
return render_template('index.html')
# /about
@app.route('/about')
def about():
return render_template('about.html')
# /posts
@app.route('/p... | ravil99/simple-flask-website | src/routes.py | routes.py | py | 2,352 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "flask.render_template",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "src.app.route",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "src.app",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "src.app.route",
"line_nu... |
34351156640 | import base64
import json
import os
import pickle
import sys
import pandas as pd
import xgboost as xgb
from dotenv import load_dotenv
from google.cloud import storage
load_dotenv()
PROJECT_ID = os.getenv("PROJECT_ID")
MODEL_BUCKET = os.getenv("MODEL_BUCKET")
DATA_BUCKET = os.getenv("DATA_BUCKET")
categorical = [
... | Qfl3x/mlops-zoomcamp-project | function/main.py | main.py | py | 2,822 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number":... |
71433434151 | from .. import config
from .. import utils
import wikipedia
import signal
import sys
def on_message(mqtt_client, message):
text = message.payload.decode('utf-8')
if text == 'search_wiki':
utils.read_aloud(mqtt_client, 'podaj hasło, które chcesz wyszukać na wikipedii', config.WEB_TOPIC)
... | m-wojnar/AssistantPL | assistant/assistant_web/__main__.py | __main__.py | py | 1,327 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "wikipedia.suggest",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "wikipedia.suggest",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "wikipedia.summary",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "wikipedia.excep... |
16841091311 | import os
from flask import Flask, render_template, request
from flask import json
from flask import send_from_directory
from jinja2 import Template
app = Flask(__name__)
@app.route('/assets/<path:path>')
def send_assets(path):
return send_from_directory('templates/assets', path)
@app.route("/login")
def login... | PowerDNS-AA/AA | server.py | server.py | py | 1,628 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.send_from_directory",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "flask.rend... |
75058754469 | import os, sys
import matplotlib.pyplot as plt
import json
from utils import init_root
def load_data_file(path: str):
with open(path, "r", encoding="ascii") as f:
text = f.read()
try:
return json.loads(text)
except:
ret = {}
for line in text.split("\n"):
... | bdevnani3/vis_lang | zero_shot/plot.py | plot.py | py | 1,146 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "json.loads",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "utils.init_root",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.title",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot"... |
74646322469 | from django.contrib.auth.models import User
from rest_framework import serializers
from books.models import Book, Comment, Genre, Author
class BookSerializer(serializers.ModelSerializer):
author_name = serializers.CharField(source='author.full_name', read_only=True)
book_genres = serializers.StringRelatedFie... | TeamForLabs/book-forum | backend/books/serializers.py | serializers.py | py | 1,843 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.CharField",
"line_number": 8,
"usage_... |
25758863551 | import sentivi
from typing import Optional
from fastapi import FastAPI
from pydantic import BaseModel
from sentivi import Pipeline
from fastapi import Form
from fastapi.responses import HTMLResponse
class ResponseModel(BaseModel):
polarity: int
label: str
class Config:
schema_extra = {
... | vndee/sentivi | sentivi/service.py | service.py | py | 2,474 | python | en | code | 13 | github-code | 71 | [
{
"api_name": "pydantic.BaseModel",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "fastapi.FastAPI",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "sentivi.__version__",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "typing.Op... |
31622159618 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
@Project :LeetCodePthonVersion
@File :15. 三数之和.py
@Author :HuntingGame
@Date :2023-02-01 20:15
C'est la vie!!! enjoy ur day :D
'''
from typing import List
class Solution:
"""
这是第一个解题的思路,就是正着遍历,但是这样不好,因为有一个数组的insert插入;
那么第二个思路就是倒着遍历,就不用insert了。见下面的代码
... | enternityFan/LeetCodePythonVersion | leetcode100/15. 三数之和.py | 15. 三数之和.py | py | 2,106 | python | zh | code | 0 | github-code | 71 | [
{
"api_name": "typing.List",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 47,
"usage_type": "name"
}
] |
16620613438 | #----------------------------------------------------------------------------#
# Imports
#----------------------------------------------------------------------------#
from datetime import date
import json
import dateutil.parser
import babel
from flask import Flask, render_template, request, Response, flash, redirect, ... | abdullohdeveloper1/Fyyur | app.py | app.py | py | 15,242 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "flask.Flask",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "flask_moment.Moment",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "model.db.init_app",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "model.db",
"lin... |
19304402225 | # -*- coding: utf-8 -*-
import numpy as np
import argparse
from multiprocessing import Pool
import sys
import glob
import copy
parser = argparse.ArgumentParser(description='Sort the spectra.')
parser.add_argument('bins', type=str, help='File defining the wawelenght bins')
parser.add_argument('subBins', help='File defi... | Migelo/AtmosphericParameters | reduce.py | reduce.py | py | 8,106 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_... |
2351438594 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch
import numpy as np
from models.losses import FocalLoss, RegL1Loss, RegLoss, RegWeightedL1Loss, BinRotLoss, AutoShape_Position_loss, RegWeightedL1Loss2
from models.utils import _sigmoid
from .base_... | zongdai/AutoShape | pytorch/src/lib/trains/autoshape.py | autoshape.py | py | 3,895 | python | en | code | 115 | github-code | 71 | [
{
"api_name": "torch.nn",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "models.losses.FocalLoss",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.nn.MSELoss",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.nn",
... |
17771973787 | import logging
import os
import pickle
import numpy as np
from sklearn.model_selection import train_test_split
def get_training_files_for_params(full_dataset, prefix, training_files_full, training_files_partial):
'''
Function that returns the correct training files, for both cases we want to use the small da... | m-doru/tweets-binary-emoji-prediction | src/util.py | util.py | py | 4,240 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.path.join",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 2... |
14035819427 | import csv
import random
import os
import uuid
import xml.etree.ElementTree as ET
from argparse import ArgumentParser
from multiprocessing import cpu_count
from multiprocessing.pool import ThreadPool
from typing import List, Tuple
from zipfile import ZipFile
DEFAULT_ARC_COUNT = 50
DEFAULT_ARC_FILES = 100
DEFAULT_PROCE... | oooooleg/xml_to_csv_random | xml_gen.py | xml_gen.py | py | 5,097 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "multiprocessing.cpu_count",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "os.mkdir",
... |
71584444389 | from django.conf import settings
from django.shortcuts import redirect, render
class login_required_middleware:
""" This middleware takes care of anonymous users trying to visit links that requires an user to be logged-in.
Also, non-admin users trying to access the admin panel
"""
admin_base_path... | ArmaanRaut/CentralPerk | centralperk/middleware.py | middleware.py | py | 1,194 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.shortcuts.render",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.redirect",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.LOGIN_EXEMPT_URL",
"line_number": 30,
"usage_type": "attribute"
... |
25513247717 | import io
import logging
import re
import sys
from collections import UserDict, UserList
from collections.abc import Mapping, Sequence
logger = logging.getLogger(__name__)
def deep_update(
target: Mapping,
other: Mapping,
overwrite=True,
list_insert_index: dict = None,
) -> None:
if other.get("_d... | MarkHooijkaas/kreate-kube | kreate/kore/_core.py | _core.py | py | 9,026 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "collections.abc.Mapping",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "collections.abc.Mapping",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "coll... |
10166630844 | from django.contrib import admin
from django.urls import path, include
from django.conf.urls import url
from booker import views
from django.conf.urls.static import static
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseNotFound
from django.... | Quack842/p4-dndcampaign | dndcampaign/urls.py | urls.py | py | 1,837 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.urls.path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "... |
16873312126 | import os.path
from datetime import datetime
from lib.Bocsar import Bocsar
from lib.ExcelParser import ExcelParser
class ImportResponse:
def __init__(self):
self.USED_TO_UPDATED_BEFORE = 10
self.UPDATE_SUCCESSFULLY = 11
self.LGA_HAS_NO_DATA = 20
def get(self, lga):
assumedDire... | guiltyspark12138/data-app | server_beer/lib/ImportResponse.py | ImportResponse.py | py | 1,058 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.path.path.isfile",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.fromt... |
71621151269 | from time import gmtime, strftime
from bottle import route, get, run, post, request
@post('/get')
def index():
rulename = request.forms.get('rulename')
f = open(rulename, 'rb')
rule = f.read()
f.close()
return rule
@post('/put')
def index():
recivedt = strftime('%Y-%m-%d %H:%M:%S', gmtime())... | LukeAger/YaraREST | rest.py | rest.py | py | 628 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "bottle.request.forms.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "bottle.request.forms",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "bottle.request",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "bottle... |
37797366837 | from db import dbtypes as dbt
from typing import Any, Dict, List, Iterator, Sequence, Type, Union, Optional, get_type_hints
class TableMetadata:
def __init__(self, table_class):
type_hints:Dict[str, Any] = get_type_hints(table_class)
self.table_name = type_hints['__table_name__'] if '__ta... | masaharu-kato/class-db | src/db/schema.py | schema.py | py | 6,684 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "typing.Dict",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "typing.get_type_hints",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "typing.Dict",
"line_num... |
33237757660 | import algorithms.linear_reg.linearreg as lr
import algorithms.linear_reg.plotdata as pd
import numpy as np
import matplotlib.pyplot as plt
"""This is the main driver file to test the rest machine learning modules."""
#loads the data1_1.txt into data variable
#The data is a 97 x 2 matrix
data = np.genfromtxt("datas/d... | akshkr/mac_learn | library/driver.py | driver.py | py | 2,137 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.genfromtxt",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.c_",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "numpy.ones",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.c_",
"line_number... |
72471673509 | import tensorflow as tf
import numpy as np
import core as cr
from buffer import replay_buffer
from tensorboardX import SummaryWriter
from ou_noise import OU_noise
import gym
class SAC:
def __init__(self):
self.sess = tf.Session()
self.state_size = 33
self.output_size = 4
self.tau = ... | RLOpensource/spinning_up_kr | sac.py | sac.py | py | 7,668 | python | en | code | 6 | github-code | 71 | [
{
"api_name": "tensorflow.Session",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "buffer.replay_buffer",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "ou_noise.OU_noise",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "core.placeh... |
37623659902 | from random import randint
import pdb
from config import NUM_PERSONS, MAX_LOCATION, NUM_ITERATION_PER_DAY, NUM_HOSPITALS, NUM_BEDS_PER_HOSPITAL, NUM_INITIAL_INFECTED, NUM_ITERATIONS_TO_RUN
from living_state import *
from person import Person
from hospital import Hospital
from covid19 import Covid19
from get_stats imp... | TheRohitRahul/Disease_Spread_Simulator | main.py | main.py | py | 3,403 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "config.NUM_HOSPITALS",
"line_number": 15,
"usage_type": "argument"
},
{
"api_name": "random.randint",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "config.MAX_LOCATION",
"line_number": 19,
"usage_type": "argument"
},
{
"api_name": "rando... |
70765789989 | def getProperty(configFile, section, prop):
try:
import configparser
config = configparser.ConfigParser()
config.read(configFile)
return config[section][prop]
except KeyError:
print ('Configuration file does not exist, or is corrupted. Please create it using helpers/makeconfig.py');
return ''
import s... | tgummerer/filesync | server/server.py | server.py | py | 628 | python | en | code | 5 | github-code | 71 | [
{
"api_name": "configparser.ConfigParser",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "socket.socket",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "connection.Client",
"line_number": 28,
"usage_type": "call"
}
] |
38224598021 | from environments.music_world import MusicWorld
from visualizer.music_visualizer import InteractiveComposer
from argparse import ArgumentParser
def main():
parser: ArgumentParser = ArgumentParser()
parser.add_argument('--epsilon', type=float, default=0.1, help="randomness in action")
parser.add_argument('--disc... | franciscovilchezv/eurydice.rl | source/run_music_generation.py | run_music_generation.py | py | 1,531 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "environments.music_world.MusicWorld",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "visualizer.music_visualizer.InteractiveComposer",
"line_number": 22,
"usage_ty... |
16174137907 | from numbers import Number
from typing import Dict, Hashable, List, Tuple
class IndexedPriorityQueue:
def __init__(self):
self.queue: List[Number] = []
self.key_index: Dict[Hashable, int] = {} # key -> index in heap
self.index_key: Dict[int, Hashable] = {} # index in heap -> key
def... | gabrielbazan/indexed_priority_queue | indexed_priority_queue/ipq.py | ipq.py | py | 4,466 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "typing.List",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "numbers.Number",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "typing.Hashable",
"line_numbe... |
34646776876 | from selenium import webdriver
from selenium.webdriver.common.by import By
driver=webdriver.Chrome(executable_path="D:\\Python_Atul\\chromedriver\\chromedriver.exe")
driver.get("https://rahulshettyacademy.com/AutomationPractice/")
validatetext="ATUL"
driver.find_element(by=By.CSS_SELECTOR,value='#name').send_keys(val... | atulmali11/Atul_Python | PythonSelenium/popupsdemo.py | popupsdemo.py | py | 497 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.CSS_SELECTOR",
"line_number": 8,
"usage_type": "attribute"
}... |
39977961446 | import argparse
import re
import logging
"""
This script checks whether the results format for Task 5 is correct.
It also provides some warnings about possible errors.
The correct format of the Task 5 results file is the following:
<line_number> <TAB> <score>
where <line_number> is the number of the claim in the d... | sshaar/clef2020-factchecking-task1 | format_checker/main.py | main.py | py | 1,459 | python | en | code | 20 | github-code | 71 | [
{
"api_name": "re.compile",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "logging.error",
... |
14136514109 | '''
File to be used to test CRUD operations on the api.
The data for the Create operation can be passed as command line
arguments, or simply ignored as defaults are put in place.
'''
import requests, argparse
from json import dumps as _
parser = argparse.ArgumentParser()
parser.add_argument('-n', '--name', help='Th... | TegaRorobi/HNGx-backend-stage2-task | TESTING_SCRIPT.py | TESTING_SCRIPT.py | py | 2,078 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "requests.post",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"l... |
7762435373 | from aiogram import types, Dispatcher
from telegram import markups
from aiogram.dispatcher import FSMContext
async def start_command(message: types.Message, state: FSMContext):
if message.chat.type != 'private': # start only in private messages
return
await state.finish()
keyboard = markups.get_s... | YoDooky/profiRealEstateMoscowParserBot | telegram/handlers/common.py | common.py | py | 800 | python | ru | code | 0 | github-code | 71 | [
{
"api_name": "aiogram.types.Message",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "aiogram.types",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "aiogram.dispatcher.FSMContext",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "t... |
16262326957 | from fastapi import APIRouter, Depends, HTTPException, status
import database, models, schemas
from sqlalchemy.orm import Session
get_db = database.get_db
router = APIRouter(
prefix='/dataentry',
tags=['dataentry']
)
@router.post('/')
async def data_entry(request: schemas.Data, db: Session = Depends(get_db... | Amindosti/merrit-fastapi | router/dataentry.py | dataentry.py | py | 750 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "database.get_db",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "fastapi.APIRouter",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "schemas.Data",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "sqlalchemy.orm... |
72797736229 | #! *-* coding: utf-8 *-*
"""reconfig formula after brew upgrade"""
from fabric.api import env
from fabric.operations import put, run
import os
LOCAL_DIR = '/usr/local'
CELLAR_DIR = '/usr/local/Cellar'
SOFTWARE_DIR = '/Users/hqlgree2/Downloads/software'
CONNECTOR_MYSQL = 'mysql-connector-java-5.1.38-bin.jar'
env.hos... | gree2/fabric | brew/fabfile.py | fabfile.py | py | 6,145 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "fabric.api.env.hosts",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "fabric.api.env",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "fabric.operations.run",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.pat... |
31556136436 | from game_classes import Character, Weapon
import json, os
# This will save the players character data (Only to be used for one player it will overwrite all data in the JSON file.) light_damage, _heavy_damage, level, xp
def save_character(player):
player_stats = {"Name": player.name, "Health": player.health, "Race... | faulknerpearce/terminal_game | game_data_functions.py | game_data_functions.py | py | 1,604 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "json.dump",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "json.load",
"line_number": 1... |
909611857 | from datetime import datetime
from ..call_logs import CallLogsCommand
from hamcrest import assert_that
from hamcrest import equal_to
from xivo_lib_rest_client.tests.command import RESTCommandTestCase
class TestCallLogs(RESTCommandTestCase):
Command = CallLogsCommand
csvdata = u"Call Date,Caller,Called,Peri... | gesnaud/xivo-confd-client | xivo_confd_client/commands/tests/test_call_logs.py | test_call_logs.py | py | 1,565 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "xivo_lib_rest_client.tests.command.RESTCommandTestCase",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "call_logs.CallLogsCommand",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "hamcrest.assert_that",
"line_number": 23,
"usage_type": "... |
17863909914 | import config
import requests
urlLine = 'https://notify-api.line.me/api/notify'
token = config.LINE_NOTIFY_TOKEN
headers = {
'content-type':
'application/x-www-form-urlencoded',
'Authorization':'Bearer '+token
}
def send_alert(msg = 'ทดสอบ'):
r = requests.post(urlLin... | momo2100/PiBot | lineNotify.py | lineNotify.py | py | 707 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "config.LINE_NOTIFY_TOKEN",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "requests.post",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "requests.Session",
"line_number": 22,
"usage_type": "call"
}
] |
9022189359 | import os
import shutil
import math
import warnings
import numpy as np
import pandas as pd
from GlobalParameters import DefaultParam
from Preprocess import Utilities
from python_speech_features import sigproc
from FeatureExtraction import ITheoryDomain, WaveletDomain, FrequencyDomain, TimeDomain
warnings.filterwarnings... | rajeshjnu2006/DictionaryAttackOnIMUGait | FeatureExtraction/ExtractFromGenuineDataset.py | ExtractFromGenuineDataset.py | py | 9,822 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "GlobalParameters.DefaultParam.DATA_PATH",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "GlobalParameters.DefaultParam",
"line_number": 13,
"usage_type": "na... |
30692476875 | import os
import warnings
from collections import namedtuple
import numpy as np
import torch
from PIL import Image
from kaolin.io.materials import MaterialLoadError, MaterialFileError, MaterialNotFoundError, \
process_materials_and_assignments
from kaolin.io import utils
__all__ = [
'ignore_error_handler',
... | YuQiao0303/kaolin | kaolin/io/obj.py | obj.py | py | 14,144 | python | en | code | null | github-code | 71 | [
{
"api_name": "collections.namedtuple",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "warnings.warn",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "kaolin.io.materials.MaterialNotFoundError",
"line_number": 42,
"usage_type": "name"
},
{
"ap... |
28219750780 | import pandas as pd
import torch
from dataset import Dataset
from model import LSTMStockPriceModel
if __name__ == '__main__':
batch_size = 16
lr = 0.0001
epochs = 100
# set device to cuda if available
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
print(... | tim-roethig-db/masters_thesis | deprecated/lstm/train.py | train.py | py | 2,141 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "torch.cuda.is_available",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "torch.device",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv"... |
23729532933 | import json
# with open('worldpopulation.json','r') as f:
with open(input('File Name: '),'r') as f:
data = json.load(f)
# print(data)
def c1():
nCountry = 0
for i in data:
nCountry += 1
print(nCountry)
def c2():
pop = 0
for i in range(len(data)):
pop += int(data[i]['popula... | KanonKC/CPE-34-Computor-and-Programming | Lab 10 - JSON/10-01 World population.py | 10-01 World population.py | py | 1,856 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "json.load",
"line_number": 5,
"usage_type": "call"
}
] |
8267961596 | import platform
from selenium import webdriver
from time import sleep
from datetime import datetime
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from se... | corruptbear/twitter_guard | twitter_guard/selenium_bot.py | selenium_bot.py | py | 17,840 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "utils.load_yaml",
"line_number": 113,
"usage_type": "call"
},
{
"api_name": "platform.system",
"line_number": 123,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 127,
"usage_type": "call"
},
{
"api_name": "seleniu... |
5813089119 | import numpy
import streamlit as st
import pandas as pd
from sklearn.ensemble import RandomForestRegressor
from sklearn.model_selection import train_test_split
pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', None)
st.set_page_config(layout="wide", page_title='Sample Sales Forecast'... | italomarcelogit/heroku-sales-prediction | salesPrediction-app.py | salesPrediction-app.py | py | 4,628 | python | pt | code | 0 | github-code | 71 | [
{
"api_name": "pandas.set_option",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.set_option",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "streamlit.set_page_config",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "streamlit.... |
27589206710 | import numpy as np
import pandas as pd
from sklearn.linear_model import LogisticRegressionCV
from tpot.metrics import balanced_accuracy
from sklearn.metrics import make_scorer
import time
input_file = '/home/ansohn/Python/data/CGEMS-data/CGEMS-prostate-cancer-data-only-genes-predict-aggressive.csv'
data = pd.read_csv... | sohnam/backup-scripts | logit_cgems.py | logit_cgems.py | py | 842 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.LogisticRegressionCV",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "n... |
19827927428 | from multiprocessing import Pool
import os, time, random
def worker(msg):
t_start = time.time()
print("worker[%s] starts, pid: %d" % (msg, os.getpid()))
time.sleep(random.random() * 2)
t_stop = time.time()
print("worker[%s] finished, time: %0.2f" % (msg, t_stop - t_start))
pool = Pool(2)
for i i... | lightjameslyy/python-full-stack | advanced/02-multi-tasks/02-multi-processing/lt_07_pool.py | lt_07_pool.py | py | 431 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "time.time",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.getpid",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "random.random",
"line_number": 8,
... |
42285699003 | # Literally following this tutorial: https://www.youtube.com/watch?v=vzabeKdW9tE
DEBUG = True
if DEBUG:
from PIL import Image
import numpy as np
def read_image(path):
return np.asarray(Image.open(path).convert('L'))
def write_image(image, path):
img = Image.fromarray(np.array(image),... | TonyAnciaux/KPMG-gpt-3-ideation-project | optical_character_recognition.py | optical_character_recognition.py | py | 3,712 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.asarray",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "PIL.Image.fromarray",
"lin... |
10678946822 | from collections import Counter
import requests
CAR_DATA = 'https://bites-data.s3.us-east-2.amazonaws.com/cars.json'
# pre-work: load JSON data into program
with requests.Session() as s:
data = s.get(CAR_DATA).json()
# your turn:
def most_prolific_automaker(year):
"""Given year 'year' return the automaker... | rodrigobmedeiros/PyBites-Code-EveryDay | 130/bite_130.py | bite_130.py | py | 2,688 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "requests.Session",
"line_number": 9,
"usage_type": "call"
}
] |
29399571511 | import os
import time
import argparse
import numpy as np
import saverloader
from fire import Fire
from nets.segnet import Segnet
import utils.misc
import utils.improc
import utils.vox
import random
import nuscenesdataset
import torch
import torch.multiprocessing
torch.multiprocessing.set_sharing_strategy('file_system'... | aharley/simple_bev | vis_nuscenes.py | vis_nuscenes.py | py | 14,454 | python | en | code | 369 | github-code | 71 | [
{
"api_name": "torch.multiprocessing.set_sharing_strategy",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.multiprocessing",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.use",
"line_number": 22,
"usage_type": "call"
},
{
... |
74931840868 | import requests
import io
import os
from wordcloud import WordCloud
from requests.packages.urllib3.util.retry import Retry
from flask import Flask, redirect, url_for, render_template, request, Response
from flask_session import Session
from werkzeug.exceptions import default_exceptions, HTTPException, InternalServerErr... | edelosre/Song-Lyric-Web-App | application.py | application.py | py | 5,239 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "flask.Flask",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask_session.Session",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"l... |
5310478936 | import pygame
import os
import sys
from random import choice, randrange
pygame.init()
size = w, h = 1000, 420
pygame.display.set_caption('runner')
screen = pygame.display.set_mode(size)
all_sprites = pygame.sprite.Group()
runner_group = pygame.sprite.Group()
obstacles_group = pygame.sprite.Group()
back... | rwerrx/CUTESCAPE | cutescape.py | cutescape.py | py | 17,243 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pygame.init",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_caption",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pygame.displa... |
29353499694 | #!/usr/bin/env python
import rospy
import smach
from std_msgs.msg import String, Int64MultiArray
from utils import *
import parameters as param
from tf.transformations import euler_from_quaternion, quaternion_from_euler
from geometry_msgs.msg import (
Pose,
PoseStamped,
PoseArray
)
from farming_bot_msgs.msg... | Sharaths7/Repo | base_global_planner_segment_/scripts/smach_harvey.py | smach_harvey.py | py | 9,664 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "farming_bot_msgs.msg.ModeSwitchRequestMessage.NAVIGATION",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "farming_bot_msgs.msg.ModeSwitchRequestMessage",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "farming_bot_msgs.msg.ModeSwitchReques... |
73503245349 | # python3 -m -venv .venv - to create environment
# . venv/bin/activate - to activate the environment
import csv
from flask import Flask, render_template, url_for, request , redirect
app = Flask(__name__) # this is the app name
print(__name__)
@app.route("/")
def hello_world():
return render_templat... | raihan1301/Portfolio | main.py | main.py | py | 4,217 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "flask.render_t... |
36131799539 | from django.urls import path
from HelloTemplate import views
urlpatterns = [
path('hello', views.hello),
path('get_students', views.get_students),
path('home/', views.home),
path('home_mine/', views.home_mine),
] | ithjl521/python | qianfeng/framework/Django/HelloDjango/HelloTemplate/urls.py | urls.py | py | 230 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "HelloTemplate.views.hello",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "HelloTemplate.views",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "djan... |
19649911296 | # Based on Schreiber & Fitting
# See /doc/extra/phonon-scattering.lyx
from cslib import units, Settings
from cslib.dcs import DCS
from cslib.numeric import (log_interpolate)
from cstool.parse_input import read_input
from math import pi
import numpy as np
from numpy import (cos, expm1, log10)
from functools import ... | eScatter/cstool | cstool/phonon.py | phonon.py | py | 9,859 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "cslib.units.T_room",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "cslib.units",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "cslib.numeric.log_interpolate",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "mat... |
31347080310 | from SPARQLWrapper import SPARQLWrapper, JSON
import pandas as pd
#results_df=pd.read_pickle('wiki_orte.p')
results_df = pd.DataFrame()
results_df.to_pickle('wiki_orte.p')
import time
queries=[]
queries.append("query1")
queries.append("query2")
language=['de','en','ru','cz','pl','fr','es','pt']
#off=len(results_df)
for... | erikradisch/historic-place-name-locator | make-place-name-db/sparqlwikidata.py | sparqlwikidata.py | py | 7,287 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "pandas.DataFrame",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "SPARQLWrapper.SPARQLWrapper",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "SPARQLWrapper.JSON",
"line_number": 59,
"usage_type": "argument"
},
{
"api_name": "pa... |
28926201245 | from PySide6 import QtCore
from PySide6.QtGui import QIcon
from PySide6.QtCore import (
Qt
)
from PySide6.QtWidgets import (
QDialog
)
from project_info import Info
from src.ui.gui.Progress import Ui_Dialog
class ProgressWindow(Ui_Dialog, QDialog):
"""
.
"""
def __init__(self, *args: object... | SoundsLikeJonny/UCS-Voice-Naming-Tool | UCS Voice Naming Tool/src/ui/ui_progress_window.py | ui_progress_window.py | py | 1,317 | python | en | code | 2 | github-code | 69 | [
{
"api_name": "src.ui.gui.Progress.Ui_Dialog",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "PySide6.QtWidgets.QDialog",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "PySide6.QtGui.QIcon",
"line_number": 32,
"usage_type": "call"
},
{
"api_n... |
6382363039 | """
Splunk's implementation of the python OpenTracing API.
http://opentracing.io
https://github.com/opentracing/api-python
See the API definition for comments.
"""
from __future__ import absolute_import
from basictracer import BasicTracer
from basictracer.text_propagator import TextPropagator
from opentracing import... | splnkit/splunk-tracer-python | splunktracing/tracer.py | tracer.py | py | 3,815 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "recorder.Recorder",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "basictracer.BasicTracer",
"line_number": 64,
"usage_type": "name"
},
{
"api_name": "opentracing.Format.TEXT_MAP",
"line_number": 68,
"usage_type": "attribute"
},
{
"api_na... |
72517349340 | from asyncio.events import AbstractEventLoop
from typing import Union
from wmp.asyncio import Transport
class FakeTransport():
def __init__(self, asyncio: Transport, loop: AbstractEventLoop):
self._asyncio = asyncio
self._loop = loop
self._last_data: str
self._next_response: Union[... | madpilot/pyintesiswmp | test/mocks/transport.py | transport.py | py | 929 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "wmp.asyncio.Transport",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "asyncio.events.AbstractEventLoop",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "asyncio.events",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "ty... |
21308234225 | import geopandas as gpd
from geoalchemy2 import Geometry
from sqlalchemy.ext.hybrid import hybrid_property
from planner.extensions import db
class TrajectoryPredictionData(db.Model):
id = db.Column(db.Integer, primary_key=True)
run_at = db.Column(db.DateTime, nullable=False)
launch_time = db.Column(db.Da... | jparta/balloon-flights-planner | planner/models.py | models.py | py | 2,234 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "planner.extensions.db.Model",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "planner.extensions.db",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "planner.extensions.db.Column",
"line_number": 9,
"usage_type": "call"
},
{
"... |
5776623458 | import openpyxl
path= "C:\\python\\data\\data.xlsx"
workbook= openpyxl.load_workbook(path)
sheet=workbook.active # single sheet
# sheet=workbook.get_sheet_by_name("Sheet1") multiple sheet
rows=sheet.max_row
colm=sheet.max_column
print(rows,colm)
for r in range(1,rows+1):
for c in range(1,colm+1):
print(... | smmvalan/Python-Learning | Selenium_Automation/data.py | data.py | py | 377 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 3,
"usage_type": "call"
}
] |
26129698791 | '''
SERVER of Jake's Distributed TD3 implementation. I guess call it Distr Twin Delayed DDPG
DTD3. This is done to transition to a recurrent version.
This server is essentially the replay buffer, maintained as a SumTree structure and prioritized, that
maintains and operates copies of the Q-nets and policy nets and all... | jakeelkins/dtd3 | dtd3_server.py | dtd3_server.py | py | 26,575 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "warnings.filterwarnings",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "warnings.filterwarnings",
"line_number": 44,
"usage_type": "call"
},
{
"api_name"... |
22971375349 | import base64
from openpyxl import Workbook, load_workbook
import hmac
import time
import uuid
import jwt
import datetime
from django.core.files.base import ContentFile
from django.db.models import Q, F
from django.http import HttpResponse,JsonResponse
from django.shortcuts import redirect, render
from dja... | jackwhee/sms | moodle/views.py | views.py | py | 37,815 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.views.View",
"line_number": 402,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.render",
"line_number": 447,
"usage_type": "call"
},
{
"api_name": "hmac.new",
"line_number": 456,
"usage_type": "call"
},
{
"api_name": "django.http.Jso... |
4384884706 | import click
from pdfminer.pdfparser import PDFParser
from pdfminer.pdfdocument import PDFDocument
from pdfminer.pdfpage import PDFPage, PDFTextExtractionNotAllowed
from pdfminer.pdfinterp import PDFResourceManager
from pdfminer.pdfinterp import PDFPageInterpreter
from pdfminer.layout import LAParams, LTTextBoxHorizont... | DLu/probablyscripts | pdf_search.py | pdf_search.py | py | 2,558 | python | en | code | 1 | github-code | 69 | [
{
"api_name": "pdfminer.layout.LTTextBoxHorizontal",
"line_number": 15,
"usage_type": "argument"
},
{
"api_name": "click.secho",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "pdfminer.pdfparser.PDFParser",
"line_number": 56,
"usage_type": "call"
},
{
"... |
73903201818 | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 27 14:06:33 2023
@author: 서다현
"""
'''
이용 데이터: 고객 서비스 이탈 예측 데이터
작업 유형: 서비스 이탈 예측(분류)
사용 모델: 텐서플로우 기반 인공신경망
'''
# 패키지 임포트
import pandas as pd
from sklearn.preprocessing import LabelEncoder
from sklearn.preprocessing import MinMaxScaler
from sklearn.model_... | DahyeonS/Data_Analysis_Python_Practice | 20230627 01.py | 20230627 01.py | py | 2,621 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "pandas.read_csv",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing... |
19267995711 | import cv2
import numpy as np
def sketch_transform(frame):
img_gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
img_gray_blurred = cv2.GaussianBlur(img_gray, (7, 7), 0)
img_canny = cv2.Canny(img_gray_blurred, 10, 80)
_, mask = img_canny_inverted = cv2.threshold(img_canny, 30, 255, cv2.THRESH_BINARY_INV)... | devasenan134/code | ML/openCV/krish/transform_roi_to_sketch.py | transform_roi_to_sketch.py | py | 1,014 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "cv2.cvtColor",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "cv2.GaussianBlur",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.Canny",
"l... |
37711663261 | import mmcv
import numpy as np
import torch
from mmdet.datasets.pipelines import Compose
from torch2trt_dynamic import TRTModule
import time
import mmcv
import pycuda.driver as cuda_driver
import pycuda.autoinit
def init_detector(trt_model_path, device='cuda:0'):
# #if isinstance(cfg, str):
# # cfg = mmcv.Co... | namburusiddhartha/Object-Detection-with-tensorRT | inference.py | inference.py | py | 8,907 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pycuda.driver.Device",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pycuda.driver",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "torch2trt_dynamic.TRTModule",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.... |
13105982999 | from django.urls import path
from . import views
from . import tkinter4
app_name = 'login'
urlpatterns = [
path('', views.index, name='index'),
path('auth/', views.auth, name='auth'),
path('<str:user_id>/<int:box_id>/', views.box_detail, name='box_detail'),
path('<str:user_id>/<int:box_id>/<int:traffi... | solsolr/nextLevel | projects_pycharm_bak/mysite_bak/login/urls.py | urls.py | py | 533 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
38988498748 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#遺伝的アルゴリズム
import pygame, random
import sys #sysモジュール: コマンドライン引数受け取りのため
import math
import copy
import ga_puyo_ as puyo
args = sys.argv # コマンドライン引数受け取り
ai = True if len(args) >= 2 else False # コマンドライン引数(=seed値)でAIモード
IND = 6 # 個体数()
GENE = 300 # 遺伝子数()
class Game(objec... | Takutoo/Puyopuyo | GA_puyo/ga_puyo.py | ga_puyo.py | py | 11,358 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "sys.argv",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "pygame.init",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pygame.display",
... |
12366295137 | import os
import numpy as np
import pandas as pd
import pyodbc as db
import matplotlib.pyplot as plt
from sklearn.externals import joblib
from sklearn.metrics import auc
from sklearn.metrics import roc_auc_score
from sklearn.metrics import confusion_matrix
from sklearn.metrics import roc_curve
from sklearn.metrics imp... | goldenberg-lab/SorenLiverDisease | pre_LDH_code/Evaluating Trained Algorithms/final_2000-2014no(hb,wbc)/test.py | test.py | py | 38,698 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.chdir",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.percentile",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.percentile",
"line_num... |
42469431199 | import pandas as pd # Biblioteca usada para criação de dataframe
quakes = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/earthquakes-23k.csv') # Cria o dataframe com dados do arquivo
import plotly.graph_objects as go # Chama o módulo go
# Cria a figura e suas configurações
fig = go.Figu... | Rafabs/Python | Plotly/Mapa de Calor no Globo Terrestre/Exemplo 2/MAPA DE CALOR COM MAPAS ex.2.py | MAPA DE CALOR COM MAPAS ex.2.py | py | 715 | python | pt | code | 0 | github-code | 69 | [
{
"api_name": "pandas.read_csv",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "plotly.graph_objects.Figure",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "plotly.graph_objects",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "plotly.... |
13648604540 | import logging
class SimpleStateMachine():
def __init__(self, starting_state):
self.state = []
self.state.append(starting_state)
def change(self, new_state):
self.state.append(new_state)
def back(self):
self.state.pop()
def get_state(self):
if self.state:
... | zerorock1312/lt-maker-master | app/engine/state_machine.py | state_machine.py | py | 9,569 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "app.engine.title_screen.TitleStartState",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "app.engine.title_screen",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "app.engine.title_screen.TitleMainState",
"line_number": 36,
"usage_t... |
29920177826 | from uuid import uuid4
from sanic import Blueprint
from sanic.response import json
from rbac.common.task import Task
from rbac.server.api.auth import authorized
from rbac.server.api import utils
from rbac.server.db import tasks_query
from rbac.server.db.relationships_query import fetch_relationships
TASKS_BP = Bluep... | pgobin-zz/sawtooth-next-directory | rbac/server/api/tasks.py | tasks.py | py | 4,453 | python | en | code | null | github-code | 69 | [
{
"api_name": "sanic.Blueprint",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "rbac.server.api.utils.get_request_block",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "rbac.server.api.utils",
"line_number": 19,
"usage_type": "name"
},
{
"api... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.