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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12042701114 | """GRPC server for temporal service."""
from concurrent import futures
import logging
import re
import datetime
import grpc
from temporal import temporal_service_pb2
from temporal import temporal_service_pb2_grpc
from temporal.timex import tag, ground
class TemporalServiceServicer(temporal_service_pb2_grpc.Tempora... | nick96/withoutdelay | temporal/temporal/server.py | server.py | py | 1,781 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "temporal.temporal_service_pb2_grpc.TemporalServiceServicer",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "temporal.temporal_service_pb2_grpc",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "temporal.timex.tag",
"line_number": 19,
... |
28520939025 | """
Mail Module.
This handles sending emails using AWS SES.
Usage:
1. create a folder for the email that you want to send
2. create 3 files in the folder :
html.html -> contains the html content of the email
text.txt -> contains the text content of the email
subject -> ... | harveyslash/backend-cleaned | beatest/Mail/Mail.py | Mail.py | py | 6,379 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "boto3.client",
"line_number": 88,
"usage_type": "call"
},
{
"api_name": "flask.current_app.config",
"line_number": 91,
"usage_type": "attribute"
},
{
"api_name": "flask.current_app",
"line_number": 91,
"usage_type": "name"
},
{
"api_name": "flask.cu... |
42511634403 | import pyodbc as pdbc
import pandas as pd
import glob as gb
import csv
class fideicomiso_load:
#Constructor
def __init__(self, ruta, rutadb, cartera, fecha):
print("Creando fideicomiso")
self.fecha = fecha
self.rutaOrigin = ruta
self.ruta = ruta
self.ru... | jose-prieto/DataWareHouseAutomation | fideicomiso_load.py | fideicomiso_load.py | py | 3,820 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "glob.glob",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pandas.read_excel",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pandas.merge",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "csv.QUOTE_NONE",
"line_n... |
9738218470 | import cv2
import numpy as np
import os
total = 1920 * 1080 * 3 # resolution * channels
def score(a, b):
diff = a - b
same = np.count_nonzero(diff == 0)
return same / total
def run():
img1 = cv2.imread("./img1.png")
img2 = cv2.imread("./img2.png")
print(f"{score(img1, img2):.4f}")
imgdi... | goelayu/Jawa | scripts/fidelity/img_diff.py | img_diff.py | py | 394 | python | en | code | 12 | github-code | 6 | [
{
"api_name": "numpy.count_nonzero",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.absolute",
"line_n... |
30913403505 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('silver', '0039_auto_20161112_1006'),
]
operations = [
migrations.AlterField(
model_name='loadbalencer',
... | infomagnum-net/tcoapp | silver/migrations/0040_auto_20161112_1026.py | 0040_auto_20161112_1026.py | py | 470 | python | en | code | 0 | github-code | 6 | [
{
"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"
},
{... |
15217562788 | import PySimpleGUI as sg
from hangman import easy_words, all_words, startoverlay
def main():
layout = [
[sg.Text("Choose your word list:")],
[sg.Radio("Common English Words", group_id="words", key="common", default=True)],
[sg.Radio("All English Words", group_id="words", key="all")],
... | Kasai49/Hangman_game | gui.py | gui.py | py | 3,196 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PySimpleGUI.Text",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Radio",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Radio",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Text",
... |
19561393737 | """
en el que esta fuera del plano no logre hacer que A me diera 500
por lo tanto use 1000 y funciono al igual que por ese motivo mis cantidades
debian ser mayores para que salgan del plano
autor: Daniel Norberto Hernádez Santiago
número de control 18390015
"""
import matplotlib.pyplot as plt
import numpy as ... | FIRE-DARK/Testd_3d | Test_3d.py | Test_3d.py | py | 2,722 | python | es | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.pyplot.axis",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.axis",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matpl... |
40646886055 | from datetime import date, datetime
import logging
def time_passed(input_str: str) -> int:
input_date = datetime.strptime(input_str, '%d/%m/%Y')
today = date.today()
year_passed: int = today.year - input_date.year - \
((today.month, today.day) < (input_date.month, input_date.day))
return year... | FoxOps/bike-licence | bl_functions.py | bl_functions.py | py | 3,705 | python | fr | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "datetime.date.today",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetim... |
14127997236 | import pandas as pd
import numpy as np
from sklearn.linear_model import LogisticRegression
import pickle
def data_split(data1 , ratio):
np.random.seed(42)
shuffled = np.random.permutation(len(data1))
test_size = int(len(data1) * ratio)
train_indecies = shuffled[:test_size]
train_test ... | vishalnair16/Covid-19-Infection-Detector-python-flask- | Untitled Folder/trainings.py | trainings.py | py | 1,096 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.random.seed",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.permutation",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.rand... |
38333935332 | import json_tools
import jsondiff
import json
from collections import Iterable
def jsonDiff(a,b):
result=json_tools.diff(a,b)
if result==[]:
print("两个数据内容一致:%s"%result)
else:
print("两个数据内容存在不一致:%s"%result)
def json_diff(a,b):
"""第三方库,对于嵌套json数据进行比较"""
result=jsondiff.diff(a,b)
... | leen0910/websocket_api_2.0.1 | common/json_diff.py | json_diff.py | py | 2,838 | python | zh | code | 0 | github-code | 6 | [
{
"api_name": "json_tools.diff",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "jsondiff.diff",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "collections.Iterable",
"line_number": 49,
"usage_type": "argument"
},
{
"api_name": "collections.Ite... |
70480381627 | import logging
import boto3
from io import BytesIO
import zipfile
"""
----------------------
"""
bucket_name = 'bucket' # bucketname
prefix = 'prefix/' # prefix/
substring = 'string' # String to search
f = open('/Users/user/Rappi/s3_key.txt','w+')
out_f = open('/Users/user/Rappi/s3_header.txt','w+')
s3_resour... | DanielEdu/boto3 | unzip_s3.py | unzip_s3.py | py | 1,427 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "boto3.resource",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "boto3.resource",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "io.BytesIO",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "zipfile.ZipFile",
"line_... |
32044984220 | '''
Layers and operations for Mask R-CNN
including FPN(ResNet50 backbone), RPN head, ROIAlign, mask generator, losses calculator, etc.
Author: Ziwen Chen (2019.3)
'''
import random
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import Parameter
import torchvision... | arthurhero/Mask_R-CNN_Pytorch | masker_ops.py | masker_ops.py | py | 35,430 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.nn.Module",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "torchvision.models.resnet50",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "torchvision... |
2588195822 | import torch
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
img_size = 128 # dimensione delle immagini (64 x 64)
epochs = 100 # numero di epoche del training
batch_size = 64 # grandezza di un batch di campioni
lr = 0.0002 # tasso di apprendimento
input_real = torch.Fl... | peppe-99/Inpainting-with-GAN | utils/parameters.py | parameters.py | py | 2,450 | python | it | code | 0 | github-code | 6 | [
{
"api_name": "torch.device",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "torch.FloatTensor",... |
70065983549 | from fgapiserverdaemon_config import fg_config
from fgapiserverdaemon_db import fgapisrv_db
import os
import sys
import logging.config
import threading
"""
FutureGateway APIServerDaemon task extractor
"""
__author__ = 'Riccardo Bruno'
__copyright__ = '2019'
__license__ = 'Apache'
__version__ = 'v0.0.0'
__maintainer... | FutureGatewayFramework/fgAPIServerDaemon | fgapiserverdaemon_ei.py | fgapiserverdaemon_ei.py | py | 970 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "threading.Thread",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "threading.Thread.__init__",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": ... |
25166826443 | import xarray as xr
import numpy as np
import matplotlib.pyplot as plt
from calc_rmse import *
nsubs = np.arange(0,11)
#nsubs = np.append(nsubs, [100,200,300])
rmse = np.zeros(nsubs.shape)
bias = np.zeros(nsubs.shape)
t = "/project/meteo/work/Mujkanovic.Max/maproject/trace_test/newtests/panorama_checkerboard_mystic.nc... | MujkanovicMax/master-thesis | trace_test/weightingtest/rmse_plot.py | rmse_plot.py | py | 901 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.arange",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"l... |
14959104899 | import binascii
import io
from os.path import abspath, dirname, join
FIXTURES_DIR = join(dirname(abspath(__file__)), "fixtures")
def get_file_bytes(file_path):
base64_data = read_file(file_path)
file_bytes = binascii.a2b_base64(base64_data)
return file_bytes
def read_file(file_path):
with io.open(... | getyoti/yoti-python-sdk | yoti_python_sdk/tests/file_helper.py | file_helper.py | py | 395 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "os.path.join",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "binascii.a2b_base64",
"... |
72294899709 | from django.shortcuts import render
from .forms import ColorfulContactForm
from django.http import HttpResponse
from django.template.loader import get_template
import os
from .settings import PROJECT_ROOT
def home(request):
if request.method == 'POST':
form = ColorfulContactForm(request.POST)
if fo... | janemurzinova/2017-osnov-programm | project/mysite/mysite/views.py | views.py | py | 1,682 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "forms.ColorfulContactForm",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "forms.ColorfulContactForm",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 18,
"usage_type": "call"
},
{
"api_n... |
5624363809 | import mysql.connector
import configparser
def query_db(query, query_type):
config = configparser.ConfigParser()
config.read('local_db.ini')
db_config = config['LOCAL_DB']
cnx = mysql.connector.connect(user = db_config['user'],
password = db_config['password'],
... | kyle-mac/capstone_angular | src/app/flask/db_connector.py | db_connector.py | py | 904 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "configparser.ConfigParser",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connector.connect",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connector",
"line_number": 11,
"usage_type": "attribute"
},
... |
8963850794 | #!/usr/bin/env python3
from BattleData import BattleDB
from datetime import datetime
bdata = BattleDB('t_robot_db.sqlite3')
for i_id in range(3,10):
stamp = datetime(2014,10,7,9,0,0)
name = 'nonex.TestRobot' + str(i_id)
try:
i_robot = bdata.GetRobot(name=name)
# robot exists
prin... | mojomojomojo/di-arena | lib/t/t_robot_db.py | t_robot_db.py | py | 873 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "BattleData.BattleDB",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "datetime.da... |
15932164091 | from ..db.model import Note
from .. import db
from ..exceptions import HydraError, ResourceNotFoundError
from sqlalchemy.orm.exc import NoResultFound
def _get_note(note_id):
try:
note_i = db.DBSession.query(Note).filter(Note.id == note_id).one()
except NoResultFound:
raise ResourceNotFoundError... | hydraplatform/hydra-base | hydra_base/lib/notes.py | notes.py | py | 2,279 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "db.model.DBSession.query",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "db.model.Note",
"line_number": 8,
"usage_type": "argument"
},
{
"api_name": "db.model.DBSession",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "db.mo... |
16021001227 | # -*- coding: utf-8 -*-
"""
Created on Thu May 24 23:47:52 2018
@author: sunka
"""
import pandas as pd
dataframe = pd.read_csv('concrete.csv')
print(dataframe)
df1 = dataframe.iloc[:,:8]
df2 = dataframe.iloc[:,2:]
from sklearn import model_selection
test_data , train_data , test_target ... | saitej52/Linear-Regression-Problems | Concrete Data Set/conco1.py | conco1.py | py | 1,072 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection",
"line_number": 23,
"usage_type": "name"
},
{
"... |
12993400962 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import textwrap
import seaborn as sns
from ast import literal_eval
sns.set_context("paper", font_scale=1)
def to_array(x):
return np.fromstring(x[1:-1], dtype=np.int, sep=' ').tolist()
fig_save_path = '/home/efkag/Desktop/matchers'
data = pd... | efkag/ant_world_alg_bench | Results/newant/idf-v-cc-analysis.py | idf-v-cc-analysis.py | py | 2,477 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "seaborn.set_context",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.fromstring",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.int",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
... |
21725299629 | # Python3 Program to print BFS traversal
# from a given source vertex. BFS(int s)
# traverses vertices reachable from s.
from collections import defaultdict
class Graph:
def __init__(self):
# default dictionary to store graph
self.graph = defaultdict(list)
# function to add an edge to a gr... | ItsSamarth/ds-python | DataStructures/graphs/bfs.py | bfs.py | py | 1,363 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "collections.defaultdict",
"line_number": 13,
"usage_type": "call"
}
] |
18921286672 | """Tests related to inclusions."""
import pytest
from _pytest.logging import LogCaptureFixture
from ansiblelint.rules import RulesCollection
from ansiblelint.runner import Runner
def test_cases_warning_message(default_rules_collection: RulesCollection) -> None:
"""Test that including a non-existing file produces... | ansible/ansible-lint | test/test_include_miss_file_with_role.py | test_include_miss_file_with_role.py | py | 1,433 | python | en | code | 3,198 | github-code | 6 | [
{
"api_name": "ansiblelint.rules.RulesCollection",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "ansiblelint.runner.Runner",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "ansiblelint.rules.RulesCollection",
"line_number": 29,
"usage_type": "name"
... |
4972122128 | from decorator_and_sorting.program import Program
from decorator_and_sorting.decorators import BubbleSortDecorator, SelectionSortDecorator, InsertionSortDecorator
from enum import Enum
class Sorting(Enum):
bubble = 'bubble'
selection = 'selection'
insertion = 'insertion'
def main():
"""
Exam... | t0theheart/decorator-and-sorting | start.py | start.py | py | 1,410 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "enum.Enum",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "decorator_and_sorting.program.Program",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "decorator_and_sorting.decorators.BubbleSortDecorator",
"line_number": 37,
"usage_type": "c... |
21160897276 | import os
import time
from multiprocessing import Process, Queue
from factory.slide_reader import *
from factory.annotation_reader import Annotation
from factory.config import *
from factory.misc import *
import argparse
def split_sublist(file_list, num_files):
return [ file_list[ i * num_files: (i + 1) * num_f... | Junkkkk/ovarian_cancer_detection | patch_generator.multi.py | patch_generator.multi.py | py | 6,350 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "os.path.join",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 1... |
19367495733 | #!/usr/bin/python
# pygameEvent1.py
# Chapter 16 Game Programming
# Author: William C. Gunnells
# Rapid Python Programming
# libs
import pygame
white=(255,255,255) # RGB values
black=(0,0,0)
pygame.init()
display=pygame.display.set_mode((800,600))
x=300; y=300
while 1:
for event in pygame.event.get(): # event h... | thecount12/rapidpythonprogramming | python2x/chapter16/pygameEvent1.py | pygameEvent1.py | py | 654 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "pygame.event.... |
29127961738 | from django.db.models import Q
from django.shortcuts import render
from accounts.models import Profile
from artist.models import ArtistProfile
from fan.models import FanProfile
from venue.models import VenueProfile
from composersCouch.utils import get_page
def search(request, template_name='search/search.html',
... | TimBest/ComposersCouch | search/views.py | views.py | py | 1,293 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "artist.models.ArtistProfile.objects.filter",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "artist.models.ArtistProfile.objects",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "artist.models.ArtistProfile",
"line_number": 20,
"usa... |
32740830733 | from z3 import Solver, Bools, And, Or, Not, Implies, sat
# Tetrahedron topology:
#
# d
# |
# a---b
# \ / \
# c---d
#
# unsat.
a, b, c, d = Bools("a b c d")
ab, ac, ad, bc, bd, cd = Bools("ab ac ad bc bd cd")
def repress(x, y):
return And(Implies(x, Not(y)), Implies(Not(x), y))
def arrow(direction, x, ... | snsinfu/bit5 | test325-tetrahedron_unsat_core/main.py | main.py | py | 803 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "z3.Bools",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "z3.Bools",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "z3.And",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "z3.Implies",
"line_number": 18,
"usa... |
37379356436 | import os
import numpy as np
import pandas as pd
import torch.nn as nn
from tqdm import tqdm
import cv2
import torch
from collections import OrderedDict
from utils.loss import SegmentationLosses
from data import make_train_loader
# from decoder import Decoder
from utils.lr_scheduler import LR_Scheduler
from utils.saver... | faye0078/RS-ImgShp2Dataset | train_example/engine/trainer.py | trainer.py | py | 14,526 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_nu... |
39628252993 | #spiralplus_net.py
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch_scatter import scatter_add
class SpiralConv(nn.Module):
def __init__(self, in_channels, out_channels, indices, dim=1):
super(SpiralConv, self).__init__()
self.dim = dim
self.indices = indices
... | jleesdev/meshdnns | models/spiralnet_model.py | spiralnet_model.py | py | 5,860 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "torch.nn.Module",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "torch.nn.Linear",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numb... |
26116504096 | from web import app, socketio, core_data, BINANCE_API_KEY, BINANCE_PRIVATE_KEY, datab
from flask import render_template, jsonify
import time
import hmac
import requests
import hashlib
from urllib.parse import urlencode
from sqlalchemy.event.api import listen
from web.db import Price, PerpetualPrice
@app.route("/")
def... | JonathanBastineKho/crypto-arbitrage | web/routes.py | routes.py | py | 4,167 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "flask.render_template",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "web.app.route",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "web.app",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "flask.render_template",
... |
21636231084 | # -*- coding: utf-8 -*-
from argparse import Namespace
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
from torch.utils.data import Dataset
# own imports
from utils import vectorization
from nn_models import MLPerceptron
args = Namespace(
# Data and Path information
frequency_cutoff... | badrex/xNLP | surname_classification/nn_eval.py | nn_eval.py | py | 5,458 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.Namespace",
"line_number": 14,
"usage_type": "call"
},
{
"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.devi... |
73529461627 | from torch import nn
import albumentations as A
import pytest
from customTypes import MetricList
from utils.trainer import Trainer
simple_augmentation = A.Compose([
A.Resize(40, 40)
])
class DemoModel(nn.Module):
def __init__(self):
super(DemoModel, self).__init__()
self.model = nn.Sequential... | default-303/easyTorch | tests/pytest_helpers/nn.py | nn.py | py | 950 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "albumentations.Compose",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "albumentations.Resize",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch... |
34760216483 | from PySide6.QtWidgets import *
from PySide6.QtUiTools import *
from PySide6.QtCore import *
from functools import partial
import random
class TicTacToe(QMainWindow):
def __init__(self):
super().__init__()
self.score_1 = 0
self.score_2 = 0
self.equal = None
loa... | Hoda-Shad/Python | Assignment17/main.py | main.py | py | 5,152 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "functools.partial",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 54,
"usage_type": "call"
}
] |
32755781861 | from __future__ import generators
import fractions
from collections import defaultdict
import math
def infinite_game_check(num1,num2):
'''
takes in number of bananas of player 1 and player2.
returns True if game goes on infinetely otherwise returns False
this is the brute force apporach. this has no... | YahyaHaq/GoogleFoobarChallenge | level 4/level4_1/main.py | main.py | py | 3,452 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "math.log10",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "math.log10",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "math.floor",
"line_number": 51,
... |
18077202332 | import os
from pathlib import Path
from threading import Thread
from bag_load_utils import BagFileEvaluator
import matplotlib.pyplot as plt
import numpy as np
from plot_utils import plot_bag_compare
from plot_utils import plot_thresholds
import rclpy
from rclpy.node import Node
PARAMS = {
"twist_topic": "/deviati... | tier4/CalibrationTools | localization/deviation_estimation_tools/deviation_evaluator/scripts/deviation_evaluation_visualizer.py | deviation_evaluation_visualizer.py | py | 3,927 | python | en | code | 68 | github-code | 6 | [
{
"api_name": "numpy.inf",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "numpy.inf",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "rclpy.node.Node",
"line_number": 51,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"lin... |
20442444007 | """
Created by Sanjay at 10/31/2018
Feature: Enter feature name here
Enter feature description here
"""
import numpy as np
import os
from keras.models import Model
from keras.layers import Input, Dense, Conv2D, Activation, MaxPool2D, Dropout, Flatten
from keras.layers.convolutional import Convolution3D, MaxPooling3D, ... | sanjaysaha1311/CS5242-project | source/train_test.py | train_test.py | py | 2,975 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "keras.layers.Input",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "keras.layers.convolutional.Convolution3D",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "keras.layers.convolutional.MaxPooling3D",
"line_number": 33,
"usage_type": "c... |
11221570551 | from bs4 import BeautifulSoup
import requests
import sys
import time
import random
import scraper_setting as st
def listing_url_request(url, headers, output, num_page_listing):
for num_request_attempt in range(1,101):
try:
response = requests.get(url,headers=headers)
html = respo... | renyc432/headphone-product-analysis | scraper_request.py | scraper_request.py | py | 3,129 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number":... |
35816958775 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from itertools import product
import numpy as np
import pytest
from chemreac import ReactionDiffusion
from chemreac.integrate import run
from chemreac.serialization import load
from chemreac.chemistry import mk_sn_dict_from_names, Reaction, ReactionSystem
from... | chemreac/chemreac | chemreac/tests/test_four_species.py | test_four_species.py | py | 5,060 | python | en | code | 14 | github-code | 6 | [
{
"api_name": "numpy.set_printoptions",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
... |
45364863543 | from airflow.hooks.postgres_hook import PostgresHook
from airflow.models import BaseOperator
from airflow.utils.decorators import apply_defaults
from airflow.contrib.hooks.aws_hook import AwsHook
class StageToRedshiftOperator(BaseOperator):
"""
StageToRedshiftOperator for load data to Staging table
... | pakpoom66/Udacity_DataPipelines_with_Airflow_Project | home/airflow/plugins/operators/stage_redshift.py | stage_redshift.py | py | 2,251 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "airflow.models.BaseOperator",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "airflow.utils.decorators.apply_defaults",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "airflow.contrib.hooks.aws_hook.AwsHook",
"line_number": 45,
"usage_typ... |
31470166302 | import requests
from bs4 import BeautifulSoup
from threading import Timer
import smtplib
from email.message import EmailMessage
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36',
'Accept': 'text/html,applic... | Gehansh/Price-drop-alert-app | tracker.py | tracker.py | py | 1,770 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "threading.Timer",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "email.message.EmailMes... |
8072312231 | from flask import render_template,request, redirect, session, flash
from flask_app import app
from flask_app.models.employee import Employee
from flask_app.models.form import Form
from flask_bcrypt import Bcrypt
@app.route('/')
def index():
return render_template("employee_create.html")
bcrypt = Bcrypt(app)
@app... | KYU102/python2 | koche/flask_app/controllers/employees.py | employees.py | py | 2,050 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.render_template",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask_app.app.route",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask_app.app",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "flask_bcrypt.Bcr... |
20381569354 | import os
from io import BytesIO
from pathlib import Path
from telegram import Bot, Update, PhotoSize
from telegram.ext import Dispatcher, MessageHandler, Filters, Updater, CallbackContext
from utils.clients import create_bot
from utils.conf import load_data, load_config
from utils.path import data_path
class Backu... | atsunaakiya/telegram-backup-bot | main.py | main.py | py | 3,288 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "telegram.ext.Updater",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "telegram.Bot",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "utils.clients.create_bot",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "utils.conf... |
28649297801 | from flask import Flask, jsonify, make_response,request
from flask_marshmallow import Marshmallow
from flask_restful import Api, Resource, reqparse
from models import db, Pizza, Restaurant, RestaurantPizza
from flask_migrate import Migrate
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///pizzad... | Mwasigwa2/pizza-restaurants | models/app.py | app.py | py | 3,935 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask_migrate.Migrate",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "models.db",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "models.db.init_app",
... |
3929975850 | import json
import argparse
import os
import time
from sseclient import SSEClient as EventSource
from kafka import KafkaProducer
from kafka.errors import NoBrokersAvailable
import pandas as pd
import datetime
import threading
import real_date_update
from populate_db.db_interact import CassandraClient,handle_entry
def... | BohdanVey/Big_data_Project | wikipedia_events_kafka_producer.py | wikipedia_events_kafka_producer.py | py | 4,607 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "kafka.KafkaProducer",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "kafka.errors.NoBrokersAvailable",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "pandas... |
70736175867 | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('home/', views.home, name='home'),
path('user_stats/<uname>/', views.user_stats, name='user_stats'),
path('create_user/<uname>/<nm>/<loc>', views.insert_user, name='insert_user'),
path('login/<uname>', view... | Loubear111/volunteer_backend | unchained/volunteer/urls.py | urls.py | py | 431 | python | en | code | 0 | github-code | 6 | [
{
"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",
... |
3468656924 | #!/usr/bin/python
# coding=utf-8
import numpy
import random
import math
import copy
import pyaudio
from tkinter import *
class NoteGen(object):
def __init__(self, notes=range(30, 70)):
self.choices = list(map(self._note, notes))
self.possibilities = copy.copy(self.choices)
self.mapping = ... | collabcode/VideoMaker | music.py | music.py | py | 4,402 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "copy.copy",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "math.pow",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 68,... |
13957886966 | # -*- coding: utf-8 -*-
from django.shortcuts import render_to_response, redirect, render
from shop.models import Lustra, Comment# импортируем модели
#from django.core.exceptions import ObjectDoesNotExist # ошибка - объект не существует
#from django.http.response import Http404 # вывод страницы 404
from shop.forms i... | ukrduino/lustry | shop/views.py | views.py | py | 8,269 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "shop.models.Lustra.objects.get",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "shop.models.Lustra.objects",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "shop.models.Lustra",
"line_number": 36,
"usage_type": "name"
},
{
... |
72097166587 | from setuptools import setup, find_packages
from typing import List
def get_requirement(filePath:str)-> List[str]:
'''
This function returns the list of required packages for the implementation
'''
HYPEN_E_DOT = "-e ."
requirement =[]
with open(filePath) as file_obj:
requirement = f... | fanthony16/UofG_Project | setup.py | setup.py | py | 736 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "setuptools.setup",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 25,
"usage_type": "call"
}
] |
8584851311 | import json
userinput = input("Δώστε όνομα αρχείου: ")
file = open(userinput)
# Ανάγνωση αρχείου
dict_list = []
while True:
text = file.readline()
if (text == ''): # Τέλος αρχείου
break
dictionary = json.loads(text)
dict_list += [dictionary]
print("Τα διαθέσιμα κλειδιά είναι: x, y, name.")
keych... | Al-Christodoulou/Python-Project | 7.py | 7.py | py | 1,205 | python | el | code | 0 | github-code | 6 | [
{
"api_name": "json.loads",
"line_number": 12,
"usage_type": "call"
}
] |
29477734302 | import numpy
import pandas
import statsmodels.api as smodel
import time
from itertools import combinations
# Set some options for printing all the columns
pandas.set_option('precision', 7)
cars = pandas.read_csv('C:\\IIT\Machine Learning\\Data\\cars.csv', delimiter=',')
def SWEEPOperator (pDim, inputM,... | jorgegonzalez97/Machine-Learning | Codes/Week 6 Cars Logistic All Possible.py | Week 6 Cars Logistic All Possible.py | py | 3,307 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "pandas.set_option",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.copy",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.diagonal",
"lin... |
19167077276 | #!/usr/bin/env python3
import matplotlib
matplotlib.use('Agg')
import Adafruit_BNO055.BNO055
import numpy as np
from time import time, sleep
import matplotlib.pyplot as plt
bno = Adafruit_BNO055.BNO055.BNO055(busnum=0)
bno.begin()
calibration_status = bno.get_calibration_status()
print("BNO055 status: %s self_test: %... | notkarol/derplearning | test/visualize_bno055.py | visualize_bno055.py | py | 1,881 | python | en | code | 40 | github-code | 6 | [
{
"api_name": "matplotlib.use",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "Adafruit_BNO055.BNO055.BNO055.BNO055",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "Adafruit_BNO055.BNO055.BNO055",
"line_number": 9,
"usage_type": "attribute"
},
{
... |
27594158641 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import pandas_datareader.data as web
quotes_df = pd.read_excel("Carteira.xlsx")
# print(quotes_df)
# for company in quotes_df['Ativos']:
# quote = web.DataReader(f"{company}", data_source='yahoo', start='2020-01-01', end='2020-11-10')... | francaCoder/Courses | Hashtag Programação/Python Impressionador/21 Python para Finanças/Classes/CL081 Comparando Ações/code.py | code.py | py | 2,451 | python | pt | code | 2 | github-code | 6 | [
{
"api_name": "pandas.read_excel",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas_datareader.data.DataReader",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "p... |
29379465914 | from datetime import datetime
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.action_chains import ActionChains
driver = webdriver.Chrome()
... | ansyori28/Auotomate-Backup-Virtualmin-Virtual-Servers | backupVirtualminVirtualServer.py | backupVirtualminVirtualServer.py | py | 4,959 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.support.ui.WebDriverWait",
"line_number": 23,
"usage_type": "call"
},
{... |
28733260656 | import h3
import os
import glob
import pandas as pd
from shapely.geometry import Polygon, Point
import geopandas as gpd
def add_geometry(row):
points = h3.h3_to_geo_boundary(row, True)
return Polygon(points)
oak_west, oak_south, oak_east, oak_north = -122.355881,37.691211,-122.113884,37.885426
keep_columns =... | vlingenfelter/mapping_crows | get_all_birds.py | get_all_birds.py | py | 3,232 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "h3.h3_to_geo_boundary",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "shapely.geometry.Polygon",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "h3.geo_... |
70302910909 |
import numpy as np
import matplotlib.pyplot as plt
import csv
import random
from noise import pnoise1
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
import pandas as pd
from scipy.interpolate import griddata
import os
import matplotlib.tri as tri
n = 6
columns = 2**n + 1
time_to_run = 10 # in seco... | PERSISTLab/BatterylessSim | ekho/test.py | test.py | py | 5,378 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "numpy.polyfit",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "numpy.polyfit",
"line_numbe... |
69970150588 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import socket
from datetime import datetime
from afp_cli.cli_functions import (get_api_url,
get_aws_credentials,
get_first_role,
get_valid_seconds,
... | Scout24/afp-cli | src/unittest/python/cli_functions_tests.py | cli_functions_tests.py | py | 9,833 | python | en | code | 13 | github-code | 6 | [
{
"api_name": "unittest2.TestCase",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "datetime.datetime",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "afp_cli.cli_functions.get_valid_seconds",
"line_number": 25,
"usage_type": "call"
},
{
"api_... |
28256294185 | #!/usr/bin/env python3
import picamera
import time
from fractions import Fraction
import argparse
import logging
import io
import typing
from PIL import Image
from PIL import ImageStat
CONFIGURATIONS = {
'auto': {
},
'sunny': {
'exposure_mode': 'auto',
'awb_mode': 'sunlight'
},
'c... | claudiomattera/meteo-application | sensors/takepicture.py | takepicture.py | py | 5,645 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "fractions.Fraction",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "BH1750.BH1750",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "errno.EACCES",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name": "logging.warning",
... |
74847703548 | from enum import Enum
class PType(Enum):
"""Enum for paragraph types."""
SCENE = 0
ACTION = 1
NAME = 2
PARENTHETICALS = 3
DIALOG = 4
class PPrefs(object):
"""Enum for paragraph preferences."""
SCENE_INDENT = 0
SCENE_WIDTH = 60
SCENE_PREC_EMPTY = 2
SCENE_ENTER = PType.AC... | tobchen/Shane | shane/paragraph.py | paragraph.py | py | 7,007 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "enum.Enum",
"line_number": 4,
"usage_type": "name"
}
] |
31850042682 | """
Check model performance on the held-aside test set.
"""
import logging
import os
import re
import numpy as np
import pandas as pd
import tensorflow as tf
def main():
# Evaluate models
model_names = os.listdir("data/models")
for model_name in model_names:
# if not "circles" in model_name:
... | kinto-b/ssl | test_dummy.py | test_dummy.py | py | 1,198 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.listdir",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.models.load_model",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "n... |
29826944718 | from tkinter import *
import cx_Oracle
con = cx_Oracle.connect('system/goldblock')
curs = con.cursor()
curs.arraysize = 50
def movwin():
def addmov():
def added():
curs.execute('select max(movieid) from movie')
e=curs.fetchone()
movid=int(e[0])+1
... | ranganayakielango/movie-theatre-management | Movie.py | Movie.py | py | 5,165 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cx_Oracle.connect",
"line_number": 3,
"usage_type": "call"
}
] |
31031672047 | import pytest
from tempfile import TemporaryDirectory
from pathlib import Path
from skbs.cli import main
@pytest.fixture(scope='module')
def protocol(request):
proto = Path(request.fspath).with_suffix('') / 'protocol'
#with TemporaryDirectory() as dest_s :
dest_s = TemporaryDirectory()
try:
dest = Path(de... | hl037/hrprotoparser | tests/test_hrpp_py/conftest.py | conftest.py | py | 986 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pathlib.Path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "tempfile.TemporaryDirectory",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "skbs.cli.main.ma... |
71477067708 | import sys
from collections import deque
input = sys.stdin.readline
def BFS(y, x):
q = deque()
q.append((y, x, 0))
while q:
sy, sx, destroy = q.popleft()
if sy == n-1 and sx == m-1:
return visited[sy][sx][destroy]
for dy, dx in ((0, 1), (1, 0), (-1, 0), (0, -1)):
... | YOONJAHYUN/Python | BOJ/2206.py | 2206.py | py | 1,020 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "sys.stdin",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 6,
"usage_type": "call"
}
] |
74052678909 | from Bio import Entrez
import pandas as pd
import numpy as np
# Get searched results
def search(query):
Entrez.email = 'hah90@pitt.edu'
handle = Entrez.esearch(db='pubmed',
sort='relevance',
retmax='5',
retmode='xml',
... | HaominHU/scrapping-pubmed | main.py | main.py | py | 2,032 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "Bio.Entrez.email",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "Bio.Entrez",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "Bio.Entrez.esearch",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "Bio.Entrez",
"li... |
33529027697 | import json
import os
import argparse
import numpy as np
import random
import torch
import torch.nn as nn
import torch.nn.functional as F
from transformers import AutoTokenizer
from transformers.optimization import AdamW, get_linear_schedule_with_warmup
from sklearn.metrics import f1_score, precision_score, recall_sc... | huiminzeng/ASONAM22_COVID_Contrastive_Adversarial_Domain_Mixup | train_baseline.py | train_baseline.py | py | 10,215 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "random.seed",
"line_number": 89,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "numpy.random",
... |
14272253814 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#Script for extracts
from openpyxl import Workbook
from openpyxl.utils import get_column_letter
from openpyxl import load_workbook
import os
def sumaValores():
wb = load_workbook(filename = 'extractos.xlsx')
ws = wb['Sheet']
d1 = ws['D1'].value
d2 = ws['D... | MikhaelRemboski/ExtractosBancariosPython | python/Extractos.py | Extractos.py | py | 5,865 | python | es | code | 0 | github-code | 6 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "openpyxl.load_workbook",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "openpyxl.load_workbook",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "... |
71840926909 | import pygame
import math
class Bullet:
bullet_image = pygame.image.load('assets/images/bullet_sprite.png')
def __init__(self, pos, angle):
self.image = Bullet.bullet_image
self.rect = self.image.get_rect(center=pos)
self.pos = pygame.math.Vector2(pos)
self.speed = 15
... | PedroHenriqueMM/Projeto-CG | src/bullet.py | bullet.py | py | 801 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.image.load",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pygame.math.Vector2",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pygame.math",
... |
14698527404 | from deep_translator import GoogleTranslator
import json
class LanguageTranslator:
"""
Language Translation class a blue
print for the tranlation object.
Attributes: source_lang: str, target_lang: str.
"""
def __init__(self, source_lang: str, target_lang: str) -> None:
self.source_lang = source_la... | Ginohmk/json_file_lang_translator | lib/translator.py | translator.py | py | 1,917 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "deep_translator.GoogleTranslator",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 52,
"usage_type": "call"
}
] |
185164912 | import requests
from datetime import datetime
from PCF8574 import PCF8574_GPIO
from Adafruit_LCD1602 import Adafruit_CharLCD
from time import sleep
API_KEY = ""
"""This program displays potentially hazardous asteroids on a Raspberry LCD screen.
This program accesses NASA's public API to obtain daily information about... | eninodel/Nasa_Hazerdous_Asteroid_Displayer | Nasa.py | Nasa.py | py | 3,537 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime.today",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "time.sleep",
... |
27316082583 | import os
from uuid import uuid4
from flask import Flask, send_from_directory, render_template, make_response, request, abort
from flaskext.mysql import MySQL
from flask_limiter import Limiter
from flask_limiter.util import get_remote_address
app = Flask(__name__)
app.config.update(
MYSQL_DATABASE_HOST='db',
... | IIT-BHU-CyberSec/Codefest-CTF-2020 | web/sql 2.0/app.py | app.py | py | 1,315 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flaskext.mysql.MySQL",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "flask_limiter.Limiter",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "flask_limiter.... |
30970224305 | from euphorie.client import model
from euphorie.client.tests.test_model import createSurvey
from osha.oira.client.tests import utils
from osha.oira.testing import OiRAFunctionalTestCase
from osha.oira.testing import OiRAIntegrationTestCase
from z3c.saconfig import Session
import datetime
import unittest
class Euphor... | euphorie/osha.oira | src/osha/oira/client/tests/test_report.py | test_report.py | py | 19,247 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "osha.oira.testing.OiRAFunctionalTestCase",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "euphorie.client.tests.utils.addSurvey",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "euphorie.content.tests.utils.BASIC_SURVEY",
"line_number": 21,... |
8350555000 | import os
import logging
from datetime import datetime
class Logger:
'''
Creates logging
'''
def __init__(self, logs_dir, verbose=False):
'''
Initialisation
Arguments:
- logs_dir -- path to log directory, str
- verbose -- whether print out to console, bo... | mishagli/audio_classification | src/logger.py | logger.py | py | 1,500 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.path.exists",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"... |
33613582514 | import torch.nn as nn
import torch.nn.functional as F
import torch
from matplotlib import pyplot as plt
import cv2
class GradCAM:
def __init__(self, model, layer_name='center'):
self.model = model
self.feature_maps = []
self.gradients = []
self.device = torch.device('cuda:0' if torc... | ydchen0806/PromptTTA | calc_grad_cam.py | calc_grad_cam.py | py | 10,746 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "torch.device",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.DataPar... |
69895133629 | # -*- encoding: utf-8 -*-
"""
lunaport.dao.hook_registration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hook_registration - m2m connection case with hook. Rule to starte test.
"""
import json
import pprint
pp = pprint.PrettyPrinter(indent=4).pprint
from sqlalchemy import text, exc
from exceptions import StorageE... | greggyNapalm/lunaport_server | lunaport_server/dao/hook_registration.py | hook_registration.py | py | 7,528 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pprint.PrettyPrinter",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "exceptions.StorageError",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "wsgi.app.config.get",
"line_number": 87,
"usage_type": "call"
},
{
"api_name": "wsgi... |
5355947585 | #!/usr/bin/python3
"""
10-my_github.py
This module contains a script that takes your GitHub credentials
(username and password) and uses the GitHub API to display your id
"""
import requests
import sys
if __name__ == "__main__":
user = sys.argv[1]
pwd = sys.argv[2]
url = f"https://api.github.com/users/{u... | tobi-tobes/alx-higher_level_programming | 0x11-python-network_1/10-my_github.py | 10-my_github.py | py | 592 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.argv",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
}
] |
30324740051 | from visualize import *
from utils import *
from enum import Enum
def occlusion_index(masks, keypoints):
num_models = len(keypoints)
all_mask = read_im(masks[0], scale=1, show=False)
dilation_kernel = np.ones((2,2), np.uint8)
occluded_keypoints_list = np.zeros((num_models, 19), dtype=int) # 1 means... | egirgin/occlusionIndex | agora/src/occlusion_tools.py | occlusion_tools.py | py | 5,954 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "enum.Enum",
"line_number": 79,
"usage_type": "name"
},
{
"api_name": "enum.Enum",
"line_number": 107,
"usage_type": "name"
}
] |
74190994108 | """Load data into Spowtd data file
"""
import csv as csv_mod
import datetime as datetime_mod
import logging
import os
import numpy as np
import pytz
ISO_8601_FORMAT = '%Y-%m-%d %H:%M:%S'
SCHEMA_PATH = os.path.join(os.path.dirname(__file__), 'schema.sql')
LOG = logging.getLogger('spowtd.load')
def load_data(
... | alex-cobb/spowtd | spowtd/load.py | load.py | py | 8,625 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "os.path.join",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"li... |
42757831275 | import math
import numpy as np
import cartopy.feature as cfeature
import cartopy.io.shapereader as shpreader
import xarray as xr
import cartopy.crs as ccrs
from shapely.ops import unary_union
import matplotlib.pyplot as plt
from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER
import matplotlib.tick... | GuyBenDor/SWS-north-Israel | utils.py | utils.py | py | 12,481 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "math.radians",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "math.sin",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "math.cos",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "math.asin",
"line_number": 32... |
40332233998 | import re
import time
import logging
import mysql.connector
from selenium import webdriver
import search_helper as search
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import NoS... | yyadav99/Product_Scrapping | web-scrapper-tool/source/main_scrapper.py | main_scrapper.py | py | 9,931 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.info",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "logging.exception",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number":... |
42821113460 | import argparse
import os
import random
import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data as Data
from pytorch_transformers import *
from torch.autograd import Variable
from torch.utils.data import Dataset
from read_data import *
from mixtext imp... | SALT-NLP/MixText | code/train.py | train.py | py | 17,384 | python | en | code | 333 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 84,
"usage_type": "attribute"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "torch... |
71969316349 | import logging
import os
from google.cloud import storage
from ._common_ops import parse_blob_path
def download_blob(source_blob_path, destination_file_path):
"""Downloads a blob from the bucket.
Args:
source_blob_path (str): the source blob path to download from.
destination_file_path (s... | kubeflow/kfp-tekton-backend | components/gcp/container/component_sdk/python/kfp_component/google/storage/_download_blob.py | _download_blob.py | py | 866 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "_common_ops.parse_blob_path",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "google.cloud.storage.Client",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "google.cloud.storage",
"line_number": 15,
"usage_type": "name"
},
{
"api_... |
15925799550 | from typing import List
import numpy as np
import torch
from torchazoic.train import train
from torchazoic.model import Model
from torchazoic.layers import Linear, Tanh
from torchazoic.optimizers import SGD
def fizz_buzz_encode(x: int) -> List[int]:
if x % 15 == 0:
return [0, 0, 0, 1]
elif x % 5 == 0... | milesjwinter/torchazoic | fizzbuzz.py | fizzbuzz.py | py | 1,284 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "torch.tensor",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "torch.float",
"line_number":... |
38885560186 | from DAL.DBTemperature import DBTemperature
from DAL.DBHumidity import DBHumidity
from DAL.DBStatus import DBStatus
from DAL.DBUser import DBUser
from DAL.DBPis import DBPis
from dotenv import load_dotenv
import os
from flask import Flask, json, request, make_response, redirect
from flask_cors import CORS, cross_origi... | SmoothWin/PythonWebApp | app.py | app.py | py | 7,255 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "cryptography.fernet... |
73676606589 | import sys
import os
from argparse import ArgumentParser, RawTextHelpFormatter
CORRECT_IMPL="""template <typename... Ts> struct length;
template <typename T, typename... Ts>
struct length<T, Ts...>
{
static const int value = 1 + length<Ts...>::value;
};
template <>
struct length<>
{
static const int va... | stlemme/openswr | ogldriver/ogl_serialize.py | ogl_serialize.py | py | 8,276 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.path.exists",
"line_number": 173,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 173,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 174,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
... |
17748188357 | from .models import Booking
from django import forms
# Create a form class named MakeBooking based on the Booking model
class MakeBooking(forms.ModelForm):
class Meta:
# Base form off of booking model
model = Booking
# Name the fields from the Booking model that should be included in the... | JustinFourie1993/tables | website/forms.py | forms.py | py | 841 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "models.Booking",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.forms.Da... |
372246404 | from github import Github
# Replace with your GitHub access token
access_token = "YOUR_ACCESS_TOKEN_HERE"
# Replace with the name of your organization
org_name = "YOUR_ORGANIZATION_NAME_HERE"
# Replace with the file name containing the repository names (one per line)
repo_file = "REPO_NAMES_FILE.txt"
# Replace with... | sabarish196/scripts | gitrepoloop.py | gitrepoloop.py | py | 1,167 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "github.Github",
"line_number": 16,
"usage_type": "call"
}
] |
19499730861 | # -*- coding: utf-8 -*-
import math
from typing import List, Callable
# Need to repeatedly dimish given int, n, by smallest prime found that is
# greater than all previous until no prime factors are left. The last factor
# will be the largest prime factor. Note that prime factors of a number (n)
# will be in range [2... | michaeldye/mdye-python-samples | src/mdye_euler/solution_3_largest_prime_factor.py | solution_3_largest_prime_factor.py | py | 1,590 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "math.floor",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 48,... |
23133092232 | import pandas as pd
import numpy as np
import pickle
from flask import Flask
from flask import request
from flask import render_template
import flask
def conv_date(str1):
words = word = str1.split('/')
year = int(word[2])
if year!=2012:
return 'e'
day = int(word[0])
month = int(word[1])
... | rohanawale/Train_Delay_Prediction | main.py | main.py | py | 2,376 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"... |
38692065679 | from __future__ import annotations
from dataclasses import dataclass
import torch
from torch import Tensor
from typing import List, Tuple
from yolo_lib.cfg import DEVICE
from yolo_lib.util.check_tensor import check_tensor
@dataclass
class LabelAssignment:
num_assignments: int
full_head_idxs: Tensor # [num_ass... | matill/Ship-detection | yolo_lib/detectors/yolo_heads/label_assignment/label_assignment.py | label_assignment.py | py | 3,165 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "torch.Tensor",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "torch.Tensor",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "yolo_lib.util.check_tensor.check_tensor",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "tor... |
73783137789 | import sqlite3
conn = sqlite3.connect('PiData.db')
c = conn.cursor()
def create_table():
c.execute("CREATE TABLE IF NOT EXISTS data(sonic int, light double, temp double, hum int)")
#(getlight(),getSonic(),gettemp(),gethum()))
create_table()
| jackbourkemckenna/IOT-data | makeTable.py | makeTable.py | py | 284 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 3,
"usage_type": "call"
}
] |
7192504686 | """empty message
Revision ID: b42fcf431ada
Revises: 5ba6bf37672b
Create Date: 2018-06-20 06:56:40.755744
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b42fcf431ada'
down_revision = '5ba6bf37672b'
branch_labels = None
depends_on = None
def upgrade():
# ... | pebble-dev/rebble-appstore-api | migrations/versions/b42fcf431ada_.py | b42fcf431ada_.py | py | 1,696 | python | en | code | 13 | github-code | 6 | [
{
"api_name": "alembic.op.create_table",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integ... |
41992510069 | import random
import requests
import json
from flask import Flask, render_template, request, redirect, session # Import Flask to allow us to create our app
app = Flask(__name__) # Create a new instance of the Flask class called "app"
@app.route('/') # The "@" decorator associates this route with the functi... | AlexKosz/pokemon | pokemon.py | pokemon.py | py | 1,072 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line... |
25086269022 | import logging
from flask import current_app, redirect, render_template, request, url_for
from application import CROSSWORD_CREATOR_GAME_MANAGER_CONFIG_KEY
from application.games.common.player import get_player_id, get_player_name
from . import crossword_creator_blueprint
from ..data.game_manager import CrosswordCrea... | Tyler-Yates/games-box | application/games/crosswordcreator/networking/routes.py | routes.py | py | 2,411 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "application.games.common.player.get_player_id",
"line_number": 23,
"usage_type": "call"
},
{
... |
4494391582 | import telebot
from config import keys, TOKEN
from extensions import *
bot = telebot.TeleBot(TOKEN)
# @bot.message_handler()
# def echo_test(message: telebot.types.Message):
# bot.send_message(message.chat.id, 'Привет')
@bot.message_handler(commands=['start','help'])
def help(message: telebot.types.Message):
... | Sviatoslav-Lobanov/ConverterValueEchchangePythonCourse | ConverterValueEchchangePythonCourse/main.py | main.py | py | 2,712 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "telebot.TeleBot",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "config.TOKEN",
"line_number": 5,
"usage_type": "argument"
},
{
"api_name": "telebot.types",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "telebot.types",
... |
71742254269 | #!/usr/bin/env python3
"""
Transfer data (and associated metadata) from one HIEv instance to another
"""
__author__ = "Gerard Devine"
__version__ = "0.1.0"
__license__ = "MIT"
import os
import shutil
import hievpy as hp
from datetime import datetime
# -- Open log file for writing and append date/time stamp into f... | gdevine/hiev2hiev | hiev2hiev.py | hiev2hiev.py | py | 2,620 | python | en | code | 0 | github-code | 6 | [
{
"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.dirname",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line... |
30366464571 | from math import sqrt
from numpy import around, array, empty, isnan, transpose
# Enthought library imports
from enable.api import black_color_trait
from traits.api import Any, Array, Bool, Enum, Float, Instance, Property, Range
# Local relative imports
from .abstract_mapper import AbstractMapper
from .abstract_plot_... | enthought/chaco | chaco/base_xy_plot.py | base_xy_plot.py | py | 26,220 | python | en | code | 286 | github-code | 6 | [
{
"api_name": "abstract_plot_renderer.AbstractPlotRenderer",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "traits.api.Instance",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "array_data_source.ArrayDataSource",
"line_number": 34,
"usage_type": "arg... |
16127998787 | from collections import defaultdict
N = int(input())
A = list(map(int, input().split()))
k = defaultdict(int)
for a in A:
k[a] += 1
k = sorted(k.items(), reverse=True)
i = 0
for v in k:
print(v[1])
i += 1
for j in range(i, N):
print(0)
| keimoriyama/Atcoder | ABC/273/c.py | c.py | py | 255 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "collections.defaultdict",
"line_number": 5,
"usage_type": "call"
}
] |
7846607823 | # -*- coding: utf-8 -*-
"""
Created on Tue Sep 3 17:22:50 2019
@author: beck_i
"""
import csv
import matplotlib.pyplot as plt
from pathlib import Path
import pandas as pd
import numpy as np
#START=====================================================================
#Close all existing figures:
plt.close("all") #t... | PolarScience/MOSAiC | Inlet Characterization/Inlet Characterization.py | Inlet Characterization.py | py | 8,987 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.pyplot.close",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pandas.read_cs... |
37889205593 | from django.http import HttpResponse, Http404, HttpRequest
from django.shortcuts import render, redirect
from datetime import date
from api.dto.FlightDto import FlightDetailsDto, ListFlightDto, EditFlightDto, CreateFlightDto, SearchFlightDetailsDto
from api.service_provider import api_service_container
from api.models ... | laken11/nites | api/views/flights/views.py | views.py | py | 5,123 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "api.service_provider.api_service_container.flight_management_service",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "api.service_provider.api_service_container",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.render",
"li... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.