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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
42495755382 | #First attempt to connect to ethereum mainnet via Infura API
import json
import web3
from web3 import Web3, HTTPProvider
try:
w3 = Web3(Web3.HTTPProvider("https://mainnet.infura.io/dPotOByPqLlLN3nx14Pq"))
print('w3 HTTPProvider call success')
except: print('w3 HTTPProvider call failure')
block = w3.eth.getBlock... | KedarJo/ethScan | ethHello.py | ethHello.py | py | 1,494 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "web3.Web3",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "web3.Web3.HTTPProvider",
"line_number": 7,
"usage_type": "call"
}
] |
20528489084 | import pygame
WIDTH = 600
HEIGHT = 700
class Start:
def __init__(self):
pygame.init()
self.display = pygame.display.set_mode((WIDTH, HEIGHT))
self.background = pygame.Surface(self.display.get_size()).convert()
self.words = pygame.Surface(self.display.get_size()).convert()
s... | dlam15/Emoji-Memorize | Start.py | Start.py | py | 2,930 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pygame.Surface",... |
30510489975 | # coding=utf-8
import hashlib
from falcon.errors import HTTPBadRequest
from ultros_site.base_route import BaseRoute
__author__ = "Gareth Coles"
class ProfileRoute(BaseRoute):
route = "/profile"
def on_get(self, req, resp):
user = req.context["user"]
if not user:
raise HTTPBadRe... | UltrosBot/Ultros-site | ultros_site/routes/users/profile.py | profile.py | py | 719 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "ultros_site.base_route.BaseRoute",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "falcon.errors.HTTPBadRequest",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "hashlib.md5",
"line_number": 30,
"usage_type": "call"
}
] |
31871823537 | from http.server import HTTPServer, SimpleHTTPRequestHandler, BaseHTTPRequestHandler, test
import json
import io, shutil,urllib
from raidtool import get_models
host = ('localhost', 8888)
class CORSRequestHandler(SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header('Access-Control-Allow-Origi... | a1992012015/find-tool | tool/api.py | api.py | py | 1,861 | python | en | code | 14 | github-code | 6 | [
{
"api_name": "http.server.SimpleHTTPRequestHandler",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "urllib.parse.unquote",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "urllib.parse",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_na... |
27259885900 | """We are the captains of our ships, and we stay 'till the end. We see our stories through.
"""
"""515. Find Largest Value in Each Tree Row
"""
from collections import deque
class TreeNode:
def __init__(self, val):
self.val = val
self.left = None
self.right = None
class Solution:
d... | asperaa/back_to_grind | Trees/largestValues.py | largestValues.py | py | 1,007 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "collections.deque",
"line_number": 22,
"usage_type": "call"
}
] |
13588905096 | import numpy as np
from sklearn.decomposition import PCA
# Calculate the average of the list
def calculate_list_avg(lst):
if len(lst) == 0:
avg_list = 0.0
else:
avg_list = sum(lst) / len(lst)
return avg_list
# Extract the information for each sample
def extract_msg(mrna_exp... | yiangcs001/CSPRV | extract_features.py | extract_features.py | py | 5,370 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.zeros",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": ... |
38601541912 | #!/usr/bin/python3
import argparse
import sys
import json
import dballe
__version__ = '@PACKAGE_VERSION@'
def main(inputfiles, out):
importer = dballe.Importer("BUFR")
out.write('{"type":"FeatureCollection", "features":[')
for f in inputfiles:
with importer.from_file(f) as fp:
is_f... | ARPA-SIMC/bufr2json | bufr2json.py | bufr2json.py | py | 2,639 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "dballe.Importer",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 59,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"li... |
15983166378 | # Mjolnir
from ...infrastrcutures.dynamo.infrastructure import DynamodbInfrastructure
# Third party
from boto3.dynamodb.conditions import Key
from decouple import config
class DynamodbRepository:
infra = DynamodbInfrastructure
@classmethod
async def get_items(cls, key: str, value: str) -> list:
... | vinireeis/Mjolnir | src/repositories/dynamodb/repository.py | repository.py | py | 895 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "infrastrcutures.dynamo.infrastructure.DynamodbInfrastructure",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "decouple.config",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "boto3.dynamodb.conditions.Key",
"line_number": 19,
"usage_ty... |
7759575517 | import serial
class SerialParameters:
def __init__(self, port=None, baudrate=9600, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE, timeout=None, xonxoff=False, rtscts=False,
write_timeout=None, dsrdtr=False, inter_byte_timeout=None, exclusive=N... | timhenning1997/Serial-Port-Monitor | SerialParameters.py | SerialParameters.py | py | 1,086 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "serial.EIGHTBITS",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "serial.PARITY_NONE",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "serial.STOPBITS_ONE",
"line_number": 6,
"usage_type": "attribute"
}
] |
17668930312 | #!/usr/bin/env python3
# Compare event boundary timing in HMMs from cortical Yeo ROIs
# to timing in hand(RA)-labeled events
import os
import tqdm
import brainiak.eventseg.event
from scipy.fftpack import fft,ifft
from scipy.stats import zscore, norm, pearsonr
from HMM_settings import *
from event_comp import ev_conv,... | samsydco/HBN | HMM_vs_hand.py | HMM_vs_hand.py | py | 1,502 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "event_comp.ev_conv",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "event_comp.child_ev_conv",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "event_comp.ev_conv",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "tqdm.t... |
20066269029 | import os
import pandas as pd
import properties
from audio import audio_utils as au
from files import file_utils as fu
min_fragment_duration_ms = 400
def __build_syncmap_sentences(chapter_audio, chapter_syncmap):
sentences = []
for fragment in chapter_syncmap['fragments']:
start_time = float(fragme... | arnasRad/speech_dataset | export_dataset.py | export_dataset.py | py | 3,322 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "files.file_utils.build_dataset_audio_path",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "files.file_utils",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "pandas.DataFrame",
"line_number": 34,
"usage_type": "call"
},
{
"api_n... |
37552127134 | from utils.utils import getLinesOfFile
def getPriority(char: str):
asciiVal = ord(char[0])
if(asciiVal>=97 and asciiVal<=122):
# lettera minuscola
return asciiVal-96
else:
#lettera maiuscola
return asciiVal - 65 + 27
def findLetterInBothString(s1,s2):
for char in s1:
... | liuker97/adventOfCode2022 | src/day3/day3.py | day3.py | py | 1,216 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "utils.utils.getLinesOfFile",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "utils.utils.getLinesOfFile",
"line_number": 34,
"usage_type": "call"
}
] |
32925752157 | import scrapy
import os
import wget
class BlogSpider(scrapy.Spider):
name = 'blogspider'
start_urls = ['https://www.va.gov/vdl/application.asp?appid=6']
def parse(self, response):
try:
link='https://www.va.gov/vdl/'
for title in response.xpath('//tr'):
sect=respon... | RamSailopal/VA-Markup | scrape3.py | scrape3.py | py | 1,537 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "scrapy.Spider",
"line_number": 4,
"usage_type": "attribute"
}
] |
19243874206 | import sys
from pathlib import Path
import environ
PROJECT_DIR = Path(__file__).resolve().parent
ROOT_DIR = PROJECT_DIR.parent
# Environment
ENV_FILE = "/etc/purldb/.env"
if not Path(ENV_FILE).exists():
ENV_FILE = ROOT_DIR / ".env"
env = environ.Env()
environ.Env.read_env(str(ENV_FILE))
# Security
SECRET_K... | nexB/purldb | purldb_project/settings.py | settings.py | py | 7,976 | python | en | code | 23 | github-code | 6 | [
{
"api_name": "pathlib.Path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "environ.Env",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "environ.Env.read_env",
"line... |
342809739 | from collections import OrderedDict
import numpy as np
import pandas as pd
import requests
from bs4 import BeautifulSoup
import re
df = pd.read_csv('pd_url_list_short.csv') #df 변수로 csv 파일을 읽어옵니다.
#기존에 수동으로 입력하던 크롤링 범위를 start와 end로 지정해줬습니다.(클래스 만들때 입력)
class GetText(object):
def __init__(self, ulist, start, ... | nosangho/team_project | [02-15][junyang] wine21_save_loop.py | [02-15][junyang] wine21_save_loop.py | py | 6,458 | python | ko | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup... |
17508342693 | from typing import List
class Solution:
def maxArea(self, height: List[int]) -> int:
i,j=0,len(height)-1
im,jm,mx=0,0,0
while i<j:
val = (j-i)*min(height[i],height[j])
if val > mx:
im,jm,mx=i,j,val
if height[i]<height[j]:
i+... | soji-omiwade/cs | dsa/before_rubrik/container_with_most_water.py | container_with_most_water.py | py | 426 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 3,
"usage_type": "name"
}
] |
15835641511 | from config import db
class PricePerHour(db.Model):
id = db.Column(db.Integer, primary_key=True)
date_of_parsing = db.Column(db.String(10), nullable=False)
hour = db.Column(db.Integer, nullable=False)
price = db.Column(db.Float, nullable=False)
sales_volume_MWh = db.Column(db.Float, nullable=False... | BohdanLazaryshyn/rdn_test_task | models.py | models.py | py | 986 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "config.db.Model",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "config.db",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "config.db.Column",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "config.db",
"line_nu... |
39920785113 | from flask import Flask, render_template, request, redirect, jsonify, after_this_request
from flask_cors import CORS
from app.trajectory import *
from app.ion import get_ion
from app.esp import *
esp_addr = ''
data = {}
app = Flask(__name__,
static_url_path='',
static_folder='static',
template_folder="templ... | Eugen171/gps | app/__init__.py | __init__.py | py | 1,952 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "app.trajectory",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "app.trajectory",
"line_n... |
28395932084 | import torch
from torch import optim
from torch import nn
from torch.utils import data
from data import AnimeDataset, LossWriter
from model import Generator, Discriminator
DATA_DIR = "../datasets/selfie2anime/all"
MODEL_G_PATH = "./Net_G.pth"
MODEL_D_PATH = "./Net_D.pth"
LOG_G_PATH = "./Log_G.txt"
LOG_D_PATH = "./Log_... | cwpeng-cn/DCGAN | train.py | train.py | py | 3,971 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "data.AnimeDataset",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.utils.data.DataLoader",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "torch.utils.data",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "torch.... |
19400181919 | from typing import List
import common.arrayCommon as Array
import heapq
class Solution:
def pondSizes(self, land: List[List[int]]) -> List[int]:
h = len(land)
w = len(land[0])
result = []
for i in range(h):
for j in range(w):
if land[i][j] == 0:
... | Yigang0622/LeetCode | pondSizes.py | pondSizes.py | py | 1,310 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "heapq.heappush",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "heapq.nsmallest",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "common.arrayCommon.print2DA... |
16536913637 | import pandas as pd
dataset = pd.read_csv('iris.csv')
data = dataset.iloc[ : 99 , :]
target = data.iloc[ : , -1: ]
y = []
for x in target.values:
if x == 'Iris-setosa':
y.append(1)
else:
y.append(0)
x = data.iloc[ : , : -1]
x = x.values.tolist()
from sklearn.utils i... | Nuhru1/Machine_Learning_Logistic_Regression_From_Scratch | Logistic_Regression_with_Sklearn.py | Logistic_Regression_with_Sklearn.py | py | 897 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sklearn.utils.shuffle",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 33,
"usage_type": "call"
},
{
"api... |
70065264188 |
'Program to create the Functional Requirement Classifer model and validate it'
from fileProcess import FileProcess
import numpy
from pandas import DataFrame
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.naive_bayes import MultinomialNB
from sklearn.pipeline import Pipeline
from sklearn.cross... | xiejen/rfpFunctionReqClf | classifier.py | classifier.py | py | 2,435 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "fileProcess.FileProcess",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "fileProcess... |
39911784422 | import argparse
import time
import warnings
import pickle
import torch
import random
import numpy as np
import pandas as pd
import torch.nn.functional as F
from transformers import AutoTokenizer, AutoModelForSequenceClassification, Trainer, TrainingArguments, ElectraForSequenceClassification, AdamW
from torch import ... | TEAM-IKYO/Open-Domain-Question-Answering | code/question_labeling/train.py | train.py | py | 5,127 | python | en | code | 24 | github-code | 6 | [
{
"api_name": "random.seed",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "torch.manual_seed",
... |
73879522109 | # -*- coding: utf-8 -*-
import requests
import pandas as pd
import pytest
import urllib
import pprint
# 課題1
def get_api(url):
result = requests.get(url)
return result.json()
def main():
keyword = "鬼滅"
url = "https://app.rakuten.co.jp/services/api/IchibaItem/Search/20170706?format=json&keyword={}&ap... | KanjiIshikawa-lab/Kadai6syuusei | kadai6_4.py | kadai6_4.py | py | 2,333 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "pprint.pprint",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_numb... |
25006908635 | from git import Repo
from logging import info
from pathlib import Path
from platform import system
from shutil import copyfile, rmtree
from stat import S_IWRITE
from subprocess import check_output, STDOUT, CalledProcessError
from tempfile import TemporaryDirectory
from twrpdtgen import current_path
from twrpdtgen.utils... | DENE-dev/dene-dev | RQ1-data/exp2/969-lobo1978-coder@device-tree-generator-aab7df0a3c0246a5dbe524f1196bedc1b4c05e05/twrpdtgen/utils/aik_manager.py | aik_manager.py | py | 4,787 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "stat.S_IWRITE",
"line_number": 14,
"usage_type": "argument"
},
{
"api_name": "pathlib.Path",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "tempfile.TemporaryDirectory",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pathlib.Pa... |
39174277833 | import numpy as np
import torch
from torch.utils.data import DataLoader
from random import seed
from dataset import MNIST
from network import FeedForward
from train_mnist import Train, TrainConfig
from plotter import Plotter
np.random.seed(1234)
seed(1234)
torch.manual_seed(1234)
if '__main__' == __name__:
da... | shalomma/PytorchBottleneck | ib_mnist.py | ib_mnist.py | py | 1,394 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "numpy.random.seed",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "random.seed",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.manual_seed",
... |
3536318559 | from django.db import models
class Task(models.Model):
username = models.CharField(verbose_name='Имя сотрудника', max_length=30)
task_name = models.CharField(verbose_name='Текст задачи', max_length=100)
per_day = models.PositiveIntegerField(
default=1,
verbose_name='Количество напоминаний ... | DalaevBC/ping_bot | inside/models.py | models.py | py | 658 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.db.models.Model",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "... |
28076023790 | from .gaussian_attention import gaussian_mask, gaussian_attention
from keras.layers import Layer
class VisualAttentionLayer(Layer):
def __init__(self, output_dim, transpose=False, **kwargs):
if len(output_dim) != 2:
raise ValueError("`output_dim` has to be a 2D tensor [Height, Width].")
... | zimmerrol/tf_keras_attention | src/gaussian_attention_layer.py | gaussian_attention_layer.py | py | 1,066 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "keras.layers.Layer",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "gaussian_attention.gaussian_attention",
"line_number": 19,
"usage_type": "call"
}
] |
40199173264 | from django.test import TestCase
from django.urls import reverse
from . import utils
class TestView(TestCase):
"""
Test that access to views that accept get do not raise exception.
"""
def setUp(self) -> None:
self.views = [
{"name": 'index', 'requires_authentication': False},
... | Koffi-Cobbin/ACES-WEB | core/tests/test_views.py | test_views.py | py | 961 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "django.test.TestCase",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.urls.reverse",
"line_number": 20,
"usage_type": "call"
}
] |
21480313260 | import bpy
import re
from ..helpers import sentence_join
default_lock = False
default_lock_array = [default_lock] * 3
component_names = ('X', 'Y', 'Z', 'W')
def is_prop_locked(pb, name, component_index):
if name == 'location':
return getattr(pb, 'lock_location', default_lock_array)[component_i... | greisane/gret | anim/channels_delete_unavailable.py | channels_delete_unavailable.py | py | 3,374 | python | en | code | 298 | github-code | 6 | [
{
"api_name": "bpy.types",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "re.match",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "helpers.sentence_join",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "bpy.utils.register_clas... |
29947747353 | """
Tesla Crystal for Tornado wallet
"""
import sys
import time
from os import path
from modules.basehandlers import CrystalHandler
from modules.i18n import get_dt_language
from modules.helpers import base_path
from modules.helpers import async_get_with_http_fallback
sys.path.append('crystals/420_tesla')
from bismuth... | bismuthfoundation/TornadoWallet | wallet/crystals/420_tesla/__init__.py | __init__.py | py | 7,537 | python | en | code | 14 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
8267950596 | from __future__ import annotations
import socket
import pytest
from kombu import Connection, Consumer, Exchange, Producer, Queue
class test_PyroTransport:
def setup(self):
self.c = Connection(transport='pyro', virtual_host="kombu.broker")
self.e = Exchange('test_transport_pyro')
self.q... | celery/kombu | t/unit/transport/test_pyro.py | test_pyro.py | py | 2,892 | python | en | code | 2,643 | github-code | 6 | [
{
"api_name": "kombu.Connection",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "kombu.Exchange",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "kombu.Queue",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "kombu.Queue",
"line_n... |
70096737469 | import itertools
# 소수 판별 함수
# 2보다 작으면 무조건 False
# 2나 3이면 소수다.
# 2 또는 3으로 나눠지면 소수가 아니다.
# 10 미만의 값들은 2나 3으로만 나눠지지 않으면 된다.
# 그 이상의 수들에 대해서는 5, 7, 9, 11, 13, 15... 등의 홀수로 나눠보면 된다. 하지만 이미 3의 배수에 대해서는 앞에서 검사하기 때문에 5, 7, 11, 15,... 의 패턴으로 검사할 수 있다.
# N이 소수인지를 알고 싶으면 N의 제곱근까지만 검사해보면 된다.
def is_prime(n):
if n < 2:
... | YooGunWook/coding_test | practice_coding_old/연습문제/소수 만들기.py | 소수 만들기.py | py | 1,070 | python | ko | code | 0 | github-code | 6 | [
{
"api_name": "itertools.combinations",
"line_number": 31,
"usage_type": "call"
}
] |
10368918603 | import asyncio
import re
from os import remove
from pyUltroid.dB import DEVLIST
try:
from tabulate import tabulate
except ImportError:
tabulate = None
from telethon import events
from telethon.errors import MessageNotModifiedError
from telethon.tl.functions.contacts import (
BlockRequest,
GetBlockedRe... | TeamUltroid/Ultroid | plugins/pmpermit.py | pmpermit.py | py | 29,216 | python | en | code | 2,615 | github-code | 6 | [
{
"api_name": "tabulate.tabulate",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "pyUltroid.dB.base.KeyManager",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "pyUltroid.dB.base.KeyManager",
"line_number": 35,
"usage_type": "call"
},
{
"api_n... |
5648159483 |
import sys
from typing import List, Optional, Tuple, cast
import unittest
def how_construct(target_string: str, strings: List[str]) -> Optional[List[str]]:
n = len(target_string) + 1
table: List[Optional[List[str]]] = [
[] if i == 0 else None for i in range(n)]
for i in range(n):
if table... | bradtreloar/freeCodeCamp_DP_problems | problems/tabulated/how_construct.py | how_construct.py | py | 1,311 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "typing.cast",
"line_number":... |
40367677442 | import pygame
import random
from Farm import Farm
from Lab import Lab
from Armor import Armor
from PowerPlant import PowerPlant
from Battery import Battery
from Engine import Engine
from Command_module import Comand_Module
from Warehouse import Warehouse
from Laser import Laser
from Biome import Biome
from Asteroid im... | Martian2024/PyGame_Project | Ship.py | Ship.py | py | 5,582 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "pygame.sprite.Group",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "pygame.sprite",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "Engine.Engine",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "Engine.Engine",
... |
44497013120 | from traceback import print_stack
from allure_commons.types import AttachmentType
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.common.exceptions import NoSuchElementException, ElementNotVisibleException, ... | sudeepyadav5/SeleniumA2Z | SeleniumFrameWork/basepage/BasePage.py | BasePage.py | py | 6,476 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "SeleniumFrameWork.utilities.CustomLogger.customLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "SeleniumFrameWork.utilities.CustomLogger",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.ID",
"line_num... |
36814841108 | import importlib
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_assets import Environment
from flask_socketio import SocketIO
from config import config
db = SQLAlchemy()
migrate = Migrate()
assets = Environment()
socketio = SocketIO()
def create_app(confi... | reaper47/weather | app/__init__.py | __init__.py | py | 1,223 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask_migrate.Migrate",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask_assets.Environment",
"line_number": 11,
"usage_type": "call"
},
{
"api_nam... |
31106779539 | from datetime import datetime
import requests
import pandas as pd
from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from airflow.operators.postgres_operator import PostgresOperator
from airflow.providers.postgres.hooks.postgres import PostgresHook
from psycopg2.extras import execute_v... | jorge-flores-py/rick-morty | dags/dag_carga_automatica_episodios.py | dag_carga_automatica_episodios.py | py | 2,329 | python | es | code | 0 | github-code | 6 | [
{
"api_name": "datetime.datetime",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "airflow.providers.pos... |
25566549731 | from django.shortcuts import render
from .models import Product
from .forms import ProductForm
from django.http import HttpResponse
def list(request):
products = Product.objects.all()
context = {'products': products}
return render(request, 'product/list.html', context)
def save_product(request):
if(re... | d3stroya/ob-django | wishlist/product/views.py | views.py | py | 1,700 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "models.Product.objects.all",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "models.Product.objects",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "models.Product",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "dj... |
9185132950 | import collections
from collections import abc
import getpass
import io
import itertools
import logging
import os
import socket
import struct
import sys
import threading
import time
import timeit
import traceback
import types
import warnings
from absl import flags
from absl.logging import converter
try:
from typing... | bazelbuild/bazel | third_party/py/abseil/absl/logging/__init__.py | __init__.py | py | 38,729 | python | en | code | 21,632 | github-code | 6 | [
{
"api_name": "absl.flags.FLAGS",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "absl.flags",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "absl.logging.converter.ABSL_FATAL",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name"... |
28492207070 | import librosa,librosa.display
import matplotlib.pyplot as plt
import numpy as np
file="your-summer-day-5448.wav"
#waveform
signal,sr=librosa.load(file,sr=22050) #signal will be a numpy array which will have no.of values=sr*duration of sound track
librosa.display.waveplot(signal,sr=sr) #visualizing the wave
... | yashi4001/ML_Basics | audio_preprocess.py | audio_preprocess.py | py | 1,735 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "librosa.load",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "librosa.display.waveplot",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "librosa.display",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.py... |
17651189647 | import telebot
from config import TOKEN, keys
from extensions import ExchangeException, Exchange
bot = telebot.TeleBot(TOKEN)
# Обработка команды /start
@bot.message_handler(commands=['start'])
def start(message):
start = "Привет! Я бот, который может вернуть цену на определенное количество валюты.\n\n... | Airton99999/telegram_bot_convertor | bot.py | bot.py | py | 2,989 | 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": 34,
"usage_type": "attribute"
},
{
"api_name": "config.keys.keys",
... |
39380955921 |
#%% Imports
import pandas as pd
import numpy as np
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import Pipeline
from collections import defaultdict
from helpers import pairwiseDistCorr,nn_reg,nn_arch,reconstructionError
from matplotlib import cm
from sklearn.neural_network import MLPClassi... | SenRamakri/CS-7641-Assignment-3 | RP.py | RP.py | py | 3,594 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.cm.get_cmap",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "matplotlib.cm",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "numpy.random.seed",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.random",... |
26248063876 | from datetime import datetime
import six
from oslo_config import cfg
from oslo_log import log
from oslo_utils import uuidutils, importutils
from delfin import db
from delfin.common.constants import TelemetryCollection, TelemetryJobStatus
from delfin.exception import TaskNotFound
from delfin.i18n import _
from delfin.... | sodafoundation/delfin | delfin/task_manager/scheduler/schedulers/telemetry/job_handler.py | job_handler.py | py | 9,923 | python | en | code | 201 | github-code | 6 | [
{
"api_name": "oslo_config.cfg.CONF",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "oslo_config.cfg",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "oslo_log.log.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "oslo... |
38474237620 | from trainer import image_classifier, augmentation_pipeline,GCSHelper
import argparse
def str2bool(v):
if v.lower() in ('yes', 'true', 't', 'y', '1'):
return True
elif v.lower() in ('no', 'false', 'f', 'n', '0'):
return False
else:
raise argparse.ArgumentTypeError('Boolean value exp... | chrike-platinum/Cloud_ML_Template | trainer/task.py | task.py | py | 2,861 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentTypeError",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "trainer.image_classifier.check_input",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "trainer.image_classifier",
"line_number": 14,
"usage_type": "name"
},
... |
19407988415 | from flask import Flask, jsonify, request
from flask_cors import CORS
from flask_jwt_extended import create_access_token, JWTManager
from flask_mysqldb import MySQL
from dotenv import load_dotenv
import os
from datetime import datetime
app = Flask(__name__)
load_dotenv()
app.config['MYSQL_HOST'] = os.environ.get('MY... | RogelioBenavides/frida-kitchen | tracking_service/routes/tracking.py | tracking.py | py | 1,020 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "dotenv.load_dotenv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_n... |
24059326549 | from PIL import Image
from os import listdir, mkdir
def PrepareChars5x7(jmeno, mezX, mezY):
im = Image.open(jmeno)
Pixels = im.load()
for x in range(13):
for y in range(4):
imnew = Image.new(mode="RGB", size=(5, 7))
pole = imnew.load()
print(pole[1, 1], imnew.si... | MedOndrej/ASCIIart | Preparation.py | Preparation.py | py | 1,019 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PIL.Image.open",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "PIL.Image.new",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 1... |
14040284357 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | yenbryan/raffle | ticketing/migrations/0001_initial.py | 0001_initial.py | py | 2,454 | python | en | code | 0 | github-code | 6 | [
{
"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.swappable_dependency",
"line_number": 11,
"usage_type": "call... |
32936869929 | # 导入所需的库
import jieba
import docx
from docx import Document
from docx.shared import Inches
import matplotlib.pyplot as plt
from wordcloud import WordCloud, STOPWORDS
# 读取文档内容
filter_words = ['', '','','','','','','']
document = Document('221.docx')
text = ''
text= jieba.cut(text)
text = ''.join(str(x) for x in text)
... | lingqingjiuying/9ying1 | day1class1.py | day1class1.py | py | 1,150 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "docx.Document",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "jieba.cut",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "wordcloud.STOPWORDS",
"line_number": 22,
"usage_type": "argument"
},
{
"api_name": "wordcloud.WordCloud",... |
25072840538 | #!/usr/bin/env python3
#_*_ coding: utf8 _*_
#------------------------------------------------------------
#----- GUILLOTINE -----|
# ---- FINDER HTTP SECURITY HEADERS ----|
# ---- Gohanckz ----|
# ---- Contact ... | Gohanckz/guillotine | guillotine.py | guillotine.py | py | 3,431 | python | en | code | 12 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "requests.packages.urllib3.disable_warnings",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "requests.packages",
"line_number": 27,
"usage_type": "attribute"
},
... |
69928685308 | from django.db import models
class Vehicles(models.Model):
class Meta:
ordering = [ 'year']
id = models.AutoField(
primary_key = True
)
year_min = 1900
year_max = 2100
year = models.IntegerField(
'Year',
)
man_max_len = 50
manufacturer = models.CharField(... | babarehner/carwork | carrepairs/models.py | models.py | py | 640 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.db.models.Model",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "django.db.models.AutoField",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "... |
11250773237 | import connexion
from openapi_server import orm
from openapi_server.db import db
from openapi_server.models.error import Error # noqa: E501
from openapi_server.models.qc_result import QcResult # noqa: E501
def samples_id_qc_result_delete(id): # noqa: E501
"""samples_id_qc_result_delete
Delete the QC resu... | Mykrobe-tools/mykrobe-atlas-tracking-api | openapi_server/controllers/qc_result_controller.py | qc_result_controller.py | py | 1,810 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "openapi_server.orm.Sample.query.get",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "openapi_server.orm.Sample",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "openapi_server.orm",
"line_number": 20,
"usage_type": "name"
},
{
... |
72530296187 | import os
import cv2
import pytesseract
import numpy as np
from tqdm import tqdm
INPUT_PATH: str = "inputs_control/"
OUTPUT_PATH: str = "text_pred_control/"
#CONFIG: str = "--psm 6 --oem 1"
CONFIG: str = "--psm 7 --oem 1"
def pipeline(file) -> str:
path: str = f"{INPUT_PATH}{file}"
img: np.ndarray = cv2.imre... | lukeabela38/image2text-tesseract | workspace/main.py | main.py | py | 693 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.ndarray",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "cv2.imread",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pytesseract.image_to_string",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.listdir"... |
30513354824 | import os
import requests
from app import Processing
import nltk
from moviepy.editor import *
from pexels_api import API
from pathlib import Path
import time
import pyttsx3
# configurations of paths, output URL, file structure
# 16:9 ratios possible for upright smartphone usage
# 1080, 1920 --> FullHD resolution
# 54... | oliverkoetter/kopfkino | tasks.py | tasks.py | py | 6,989 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "os.path.abspath",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numb... |
16254773107 | import pandas as pd
import numpy as np
import random
from sklearn.datasets import load_iris
import matplotlib.pyplot as plt
x= ""
def calc_color_indxs(centroids):
#function assigns centroid indexes to each training example i.e. it assigns the
# nearest cluster centroid to each training example
# It uses ... | DhyeyDabhi/Machine-Learning | K Means Clustering/Logic Code/KMeans.py | KMeans.py | py | 3,311 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.zeros",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.power",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.argmin",
"line_number": 1... |
35041146572 | import copy
import json
import logging
import os
from threading import Thread
import requests
import six
import yaml
from toscaparser.tosca_template import ToscaTemplate
from yaml import Loader
from configuration_tool.common.tosca_reserved_keys import IMPORTS, DEFAULT_ARTIFACTS_DIRECTORY, \
EXECUTOR, NAME, TOSCA_... | sadimer/clouni_configuration_tool | configuration_tool/common/translator_to_configuration_dsl.py | translator_to_configuration_dsl.py | py | 9,016 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "configuration_tool.common.tosca_reserved_keys.TOSCA_ELEMENTS_DEFINITION_FILE",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "configuration_tool.common.tosca_reserved_keys.DEFAULT_ARTIFACTS_DIRECTORY",
"line_number": 23,
"usage_type": "name"
},
{
"api_na... |
21402626105 | import numpy as np
import tensorflow as tf
from pyTasks.task import Task, Parameter
from pyTasks.task import Optional, containerHash
from pyTasks.target import CachedTarget, LocalTarget
from pyTasks.target import JsonService, FileTarget
from .gram_tasks import PrepareKernelTask
import logging
import math
from time impo... | cedricrupb/pySVRanker | word2vec_tasks.py | word2vec_tasks.py | py | 14,557 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "tensorflow.Graph",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "tensorflow.summary.FileWriter",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "tensorflow.summary",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name":... |
29841914634 | import threading
import traitlets
import pyrosetta
import pyrosetta.rosetta.basic.options
import pyrosetta.rosetta.protocols.rosetta_scripts as rosetta_scripts
import pyrosetta.rosetta.protocols.moves as moves
import pyrosetta.distributed
import pyrosetta.distributed.tasks.taskbase as taskbase
import pyrosetta.distr... | MedicaicloudLink/Rosetta | main/source/src/python/PyRosetta/src/pyrosetta/distributed/tasks/rosetta_scripts.py | rosetta_scripts.py | py | 2,892 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "pyrosetta.distributed.tasks.taskbase.TaskBase",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "pyrosetta.distributed.tasks.taskbase",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "pyrosetta.rosetta.protocols.rosetta_scripts.RosettaScript... |
37030043869 | import PySimpleGUI as sg
import numpy as np
import cv2
import matplotlib.pyplot as plt
from Baysian_Mat import Bayesian_Matte
from PIL import Image, ImageOps
import time # Execution TIme imports
import psutil
from laplac import Laplacianmatting
from compositing import compositing
from QualityTest import mse2d
from Q... | ADG4050/Bayesian-Matting-Implementation | bayesian-Matting-Python/UI.py | UI.py | py | 4,145 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PySimpleGUI.Text",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Input",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.FileBrowse",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI... |
2279604404 | from Sentence import Sentence
import nltk
class Text:
def __init__(self, rawText, name):
self.rawText = rawText#self.formatText(rawText)
self.name = name
splitAtNewlines = [s.strip() for s in rawText.splitlines()]
rawSentences = []
for line in splitAtNewlines:
... | Lombre/LemmaLearner | Text.py | Text.py | py | 745 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "nltk.sent_tokenize",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "Sentence.Sentence",
"line_number": 18,
"usage_type": "call"
}
] |
42602830723 |
from matplotlib import pyplot as plt
font = {'family':'sans-serif', 'sans-serif':'Arial'}
plt.rc('font', **font)
plt.title('', fontsize='x-large', pad=None)
plt.xlabel('', fontsize='x-large')
plt.ylabel('', fontsize='x-large')
# plt.xscale('log')
plt.tick_params(axis="both",direction="in", labelsize='x-large')
plt.su... | hitergelei/tools | plt-format.py | plt-format.py | py | 475 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.pyplot.rc",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.title",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotli... |
39359053941 | import time
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support.ui import WebDriverWait
import selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import service
#driver ... | Paviterence/Selenium-Python-BasicCodes | fb_select_method.py | fb_select_method.py | py | 5,232 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.XPATH",
"line_number": 15,
"usage_type": "attribute"
},
... |
41034447740 | from django.test import TestCase
from car import models
class ModelTest(TestCase):
def test_create_user_with_email_successful(self):
"""Test creating a new car is successful"""
category = 'CO'
model = "TT RS 2020"
name = 'Audi TT RS TURBO'
number_of_doors = 3
descr... | Womencancode/technical-test-Talana | app/car/tests/test_models.py | test_models.py | py | 814 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.test.TestCase",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "car.models.Car.objects.create",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "car.models.Car",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": ... |
3528547150 | import os
import pytest
from dvclive.data.scalar import Scalar
from dvclive.keras import DvcLiveCallback
from tests.test_main import read_logs
# pylint: disable=unused-argument, no-name-in-module, redefined-outer-name
@pytest.fixture
def xor_model():
import numpy as np
from tensorflow.python.keras import S... | gshanko125298/Prompt-Engineering-In-context-learning-with-GPT-3-and-LLMs | myenve/Lib/site-packages/tests/test_keras.py | test_keras.py | py | 4,219 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "numpy.array",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "tensorflow.python.keras.Sequential",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "tensorflow... |
33548045927 | from django.test import TestCase
from costcenter.forms import FundForm
class FundFormTest(TestCase):
def test_empty_form(self):
form = FundForm()
self.assertIn("fund", form.fields)
self.assertIn("name", form.fields)
self.assertIn("vote", form.fields)
self.assertIn("downloa... | mariostg/bft | costcenter/tests/test_forms.py | test_forms.py | py | 1,394 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.test.TestCase",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "costcenter.forms.FundForm",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "costcenter.forms.FundForm",
"line_number": 22,
"usage_type": "call"
},
{
"api_name":... |
37080131599 | def solution(s):
from collections import deque
answer = ''
s = deque(s)
while s:
a = s.popleft()
if answer:
if answer[-1] == ' ':
answer += a.upper()
else:
answer += a.lower()
else:
answer += a.upper()
return... | JeonggonCho/algorithm | 프로그래머스/lv2/12951. JadenCase 문자열 만들기/JadenCase 문자열 만들기.py | JadenCase 문자열 만들기.py | py | 327 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "collections.deque",
"line_number": 4,
"usage_type": "call"
}
] |
11481741965 | import json
import random
while True:
inp = input("> ")
ints = {}
with open('intents.json', 'r') as f:
json.dump(f, ints)
try:
if ints[inp].type() == list:
val = random.choice(ints[inp])
else:
val = ints[inp]
print(val)
except:
print("... | poopcoder/Game | chat/code.py | code.py | py | 341 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "json.dump",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "random.choice",
"line_number": 11,
"usage_type": "call"
}
] |
26994135313 | from django.urls import path
from Zoo import views
import templates
urlpatterns = [
path('login/', views.user_login, name='login'),
path('logout/',views.logout, name='logout'),
path('user_create/', views.user_create, name='user_create'),
path('index/', views.index, name='index'),
path('detail/<i... | klll2/Zoozoo1 | Zoo/urls.py | urls.py | py | 886 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "Zoo.views.user_login",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "Zoo.views",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.urls.path",
... |
27447292826 | import time
from selenium.webdriver.support.ui import Select
from selenium import webdriver
class InventoryPage():
def __init__(self,driver) :
self.driver = driver
def navigate(self, urlLogin):
self.driver.get(urlLogin)
def changeSorting(self, locatorClass, option):
self.sel =... | Abanoub-waheed/python_test | inventoryPage.py | inventoryPage.py | py | 3,580 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "selenium.webdriver.support.ui.Select",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 87,
"usage_type": "call"
}
] |
70084638589 | from sklearn.cluster import KMeans
import numpy as np
import matplotlib.pyplot as plt
# X = np.array([[1, 2], [1, 4], [1, 0], [10, 2], [10, 4], [10, 0]])
X = np.array(np.random.random((100, 2)))
kmeans = KMeans(n_clusters=2).fit(X)
print('Labels')
print(kmeans.labels_)
result = kmeans.predict([[0, 0], [12, 3]])
print... | bpark/ml-demos | simple_kmeans.py | simple_kmeans.py | py | 486 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.array",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.random.random",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "sklearn.cluster.KMeans... |
74668118906 | from collections import Counter
from itertools import product
from operator import add
def solve(lines, cycles, dimensions):
board = set()
for row, line in enumerate(lines):
for col, elem in enumerate(line):
if elem == '#':
cell = dimensions * [0,]
cell[0], c... | dionyziz/advent-of-code | 2020/17/17.py | 17.py | py | 1,006 | python | en | code | 8 | github-code | 6 | [
{
"api_name": "collections.Counter",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "itertools.product",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "operator.add",
"line_number": 21,
"usage_type": "argument"
}
] |
36647480067 | import collections
from .pybeesgrid import TAG_SIZE, NUM_CONFIGS, NUM_MIDDLE_CELLS
from .pybeesgrid import GridGenerator, BadGridArtist, BlackWhiteArtist, \
MaskGridArtist, DepthMapArtist
from .pybeesgrid import drawGrids
from .pybeesgrid import INNER_BLACK_SEMICIRCLE, CELL_0_BLACK, CELL_1_BLACK, \
CELL_2_BLA... | berleon/pybeesgrid | python/beesgrid/__init__.py | __init__.py | py | 5,325 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "collections.OrderedDict",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "pybeesgrid.INNER_BLACK_SEMICIRCLE",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "pybeesgrid.CELL_0_BLACK",
"line_number": 45,
"usage_type": "name"
},
{
... |
2078438087 | # -*- coding: utf-8 -*-
from django_webtest import DjangoTestApp, WebTestMixin
import pytest
from testapp.articles.factories import AuthorFactory, ArticleFactory, TeamFactory
@pytest.fixture(scope='function')
def app(request):
wtm = WebTestMixin()
wtm._patch_settings()
wtm._disable_csrf_checks()
req... | odoku/django-searchview | tests/conftest.py | conftest.py | py | 846 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django_webtest.WebTestMixin",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django_webtest.DjangoTestApp",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 9,
"usage_type": "call"
},
{
"api_name":... |
33595344312 | from django.http import JsonResponse
from base.views import chekctoken
WHITE_URLS = ( '/apis/login/')
class RequestMideleware(object):
def process_request(self, request):
if request.path_info in WHITE_URLS:
return
try:
ret = chekctoken(request)
i... | Hchenwy/web | www/server/base/middleware.py | middleware.py | py | 514 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "base.views.chekctoken",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.http.JsonResponse",
"line_number": 15,
"usage_type": "call"
}
] |
9137033058 | import os
import pandas as pd
from scipy.io import loadmat
def load_data():
list_of_files = os.listdir("data\\Identification\\MFCC\\")
cumulative_df = pd.DataFrame()
for file in list_of_files:
data_set = loadmat("data\\Identification\\MFCC\\" + file)
features = data_set['feat']
lab... | PGG106/ReadMat | utils.py | utils.py | py | 1,004 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.listdir",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "scipy.io.loadmat",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"li... |
72052702908 | #!/usr/bin/env python
# coding: utf-8
""" This script collects all the data in orgs and sources folders and merge them in a single json file. """
import json, pathlib, os, sys
### ENVIRONMENTAL VARIABLES
# environmental variables can be set in order to override default values
# NOTE: you can use relative or absolute... | italia/public-opendata-sources | export_all.py | export_all.py | py | 8,264 | python | en | code | 17 | github-code | 6 | [
{
"api_name": "os.environ",
"line_number": 47,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line... |
5454371991 | """
Problem:
1. Two Sum
Difficulty:
Easy
URL:
https://leetcode.com/problems/two-sum
Tags:
Array, Hash Table
Date:
2022-05-10T14:00:29.877163+08:00
"""
from typing import List
class Solution:
def twoSum(self, nums: List[int], target: int) -> List[int]:
for i, num in enumerate(nums):
... | s0u0b/leetcode | solutions/a00001_two_sum.py | a00001_two_sum.py | py | 630 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 17,
"usage_type": "name"
}
] |
43954128076 | import json
import requests # see http://python-requests.org
def url_for(endpoint):
return 'http://localhost:5000/{}/'.format(endpoint)
def delete_all_people():
r = requests.delete(url_for('people'))
print("'people' deleted, server response:", r.status_code)
def post_people():
data = [
{'... | talkpython/eve-building-restful-mongodb-backed-apis-course | code/clients/client.py | client.py | py | 1,081 | python | en | code | 62 | github-code | 6 | [
{
"api_name": "requests.delete",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_num... |
21394429670 | import numpy as np
import statistics
from scipy import stats
dataset= [5,6,7,5,6,5,7,4,5,5,5,5,7,5,6,6,7,6,6,7,7,7,6,5,6]
#mean value
mean= np.mean(dataset)
#median value
median = np.median(dataset)
#mode value
mode= stats.mode(dataset)
#standard Deviation
Std = statistics.stdev(dataset)
#Variance
Var = statistic... | lamyanlok/FTDS | test.py | test.py | py | 447 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.mean",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.median",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "scipy.stats.mode",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "scipy.stats",
"line_numbe... |
16314867701 | import sqlite3
import sys
import datetime
from collections import defaultdict
from stats_ui_window import Ui_StatWindow
from PyQt5 import QtCore, QtGui, QtWidgets
class MainWindow_EXEC():
def __init__(self):
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
... | chrisw706/examination_stats | Stats/Python/Stats.py | Stats.py | py | 7,488 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PyQt5.QtWidgets.QApplication",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "sys.argv",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWi... |
4552178157 | # Busca Local Múltiplos Inicios
# Local Search Multiple Starts
import sys
import time
sys.path.insert(1, '../stage_01')
sys.path.insert(1, '../')
from utils import corrent_solution_size, objetive_function, read_instance, viable_solution
from local_search import local_search
from semi_greedy import semi_greedy
import c... | guilhermelange/Test-Assignment-Problem | stage_02/multiple_starts_local_search_02.py | multiple_starts_local_search_02.py | py | 1,452 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.insert",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "sys.path.insert",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_numbe... |
15996890764 | from django.contrib import admin
from django.urls import path
from . import views
urlpatterns = [
path('api/songs', views.SongsView.as_view(), name='songs'),
path('api/songs/<int:song_id>', views.SongInfoView.as_view(), name='song_info'),
path('api/songs/search/', views.SongSearchView.as_view(), name='song... | artooff/2023-MAI-Backend-A-Artov | lab3/musicProject/musicService/urls.py | urls.py | py | 652 | 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",
... |
26420619240 | from datetime import timedelta, datetime
from typing import Optional
from fastapi import Depends, HTTPException, status
from fastapi.security import OAuth2PasswordBearer
from sqlalchemy.orm import Session
from jose import jwt, JWTError
from app import database, models
from app.schemas import TokenData
from app.config ... | AdityaPunetha/FastAPI-Full-Devlopment | app/oauth2.py | oauth2.py | py | 1,771 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "fastapi.security.OAuth2PasswordBearer",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "app.config.settings.secret_key",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "app.config.settings",
"line_number": 14,
"usage_type": "name"
... |
72438613309 | from fastapi import APIRouter, Body, Depends, Request, status
from fastapi.responses import JSONResponse
from jarvis.db.database import DataBase, get_database
from jarvis.core import config, utils
from jarvis.lib import TwilioHelper
from typing import Dict
from twilio.rest import Client
import jarvis.crud as crud
impor... | christian-miljkovic/jarvis | jarvis/api/v1/user_endpoint.py | user_endpoint.py | py | 2,604 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "jarvis.lib.TwilioHelper",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "twilio.rest.Client",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "jarvis.c... |
16704619000 | #!/usr/bin/env python
# Code property of Matteo Scanavino - matteo.svanavino@gmail.it
# Minor changes by Iris David Du Mutel
import rospy
# from std_msgs.msg import Float32MultiArray
from myrobot.msg import vect_msg
from geometry_msgs.msg import Twist
from nav_msgs.msg import Odometry
import cv2
# import cv2.cv
import... | IrisDuMutel/myrobot | scripts/green_ball.py | green_ball.py | py | 4,054 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "rospy.init_node",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "rospy.Publisher",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "myrobot.msg.vect_msg",
"line_number": 24,
"usage_type": "argument"
},
{
"api_name": "message_filt... |
10844685453 | from database import db
from flask import request
from middleware.auth import login_required, admin_only
from models.guild import Guild
from typing import Dict, Optional, Tuple
def check_request(req: request, id_only: Optional[bool] = False) -> int | Tuple[int, str, bool] | Tuple[Dict[str, str], int]:
# Check req... | jareddantis-bots/rico-backend | api/guilds.py | guilds.py | py | 4,053 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.request",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_numbe... |
26043118086 | from __future__ import annotations
from textwrap import dedent
import pytest
from pants.backend.java.target_types import JavaSourcesGeneratorTarget
from pants.backend.java.target_types import rules as target_types_rules
from pants.core.util_rules import config_files, source_files
from pants.engine.addresses import A... | pantsbuild/pants | src/python/pants/jvm/resolve/coursier_fetch_test.py | coursier_fetch_test.py | py | 4,186 | python | en | code | 2,896 | github-code | 6 | [
{
"api_name": "pants.testutil.rule_runner.RuleRunner",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "pants.core.util_rules.config_files.rules",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pants.core.util_rules.config_files",
"line_number": 30,
"u... |
28811405161 | import torch
import csv
import pytorch_lightning as pl
from sys import platform
if platform == "linux":
from pypesq import pesq
from pystoi import stoi
from math import isnan
from numpy import random
def check_inf_neginf_nan(tensor, error_msg):
assert not torch.any(torch.isinf(tensor)), error_msg
if tensor... | Youzi-ciki/DCS-Net | network_functions.py | network_functions.py | py | 22,891 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "sys.platform",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "torch.any",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.isinf",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.complex32",
"line_number"... |
8950963065 | import requests
from bs4 import BeautifulSoup
import pandas as pd
from os import listdir, remove
import datetime as dt
from time import sleep
from MainMethods import getInfo, showDays
from conf import INT, INF, URL, LOC, NINF, LOC2,\
chosenF, errorsF, doneF
"""
The information for saved days is checke... | Stryder-Git/Movati_Signup | Get_Reqs.py | Get_Reqs.py | py | 7,822 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.listdir",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "conf.LOC2",
"line_number": 16,
"usage_type": "argument"
},
{
"api_name": "os.remove",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "conf.LOC2",
"line_number": 19,... |
22176331977 | import networkx as nx
from networkx.algorithms import community
from nltk.corpus import stopwords
import re
def build_graph(text):
word_list = []
G = nx.Graph()
for line in text:
line = (line.strip()).split()
for i, word in enumerate(line):
if i != len(line)-1:
w... | michal-pikusa/topic-network | topicnetwork/__init__.py | __init__.py | py | 2,066 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "networkx.Graph",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "networkx.betweenness_centrality",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "networkx.set_node_attributes",
"line_number": 27,
"usage_type": "call"
},
{
"api_na... |
73499996027 | import numpy as np
from numpy import ma
import xarray as xr
from netCDF4 import Dataset
import struct
import sys
import os
import datetime as dt
import glob
"""
This module contains functions for reading external data
to use with LPT.
The data_read_function is called at various points in other LPT functions.
To add ... | brandonwkerns/lpt-python-public | lpt/readdata.py | readdata.py | py | 19,320 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "numpy.ma.masked_array",
"line_number": 99,
"usage_type": "call"
},
{
"api_name": "numpy.ma",
"line_number": 99,
"usage_type": "name"
},
{
"api_name": "xarray.open_dataset",
"line_number": 129,
"usage_type": "call"
},
{
"api_name": "numpy.ma.masked_a... |
75051529788 | import logging
import random
from typing import Set, Generator, Optional
from .location import Location
from .move import Move
from .piece import Color, Piece, Rank
from .board import Board
class MoveSet:
_brd = None # type: Board
@staticmethod
def set_board(brd: Board) -> None:
r""" Sets the b... | ZaydH/stratego | src/stratego/player.py | player.py | py | 14,932 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "board.Board",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "piece.Color",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "typing.Set",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "piece.Piece",
"line_number": 3... |
42162211409 | """tilltheend URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | king9799/7-1-projects | forever/urls.py | urls.py | py | 1,695 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "forever.views.login_request",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "forever.views",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "djang... |
27551842247 | #K-Nearesst Neighbour
#importing the Librares
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
#set the index value as index_col 0
data=pd.read_csv('./Dataset/Classified Data',index_col=0)
#standardize the values
from sklearn.preprocessing import StandardScaler
#Create a... | kamarajanis/Machine-Learning | K_Nearest_Neighbor/k-nearest.py | k-nearest.py | py | 2,535 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.StandardScaler",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": ... |
7241271696 | ####################
# Joint distribution of Ask/Bid Qty
####################
import os
import pickle
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d import axes3d
data_directory = 'data/xFGBL'
img_directory = 'images/'
data_file = 'xFGBL20130702.p... | maroxe/SchoolProjects | EA/joint_distribution.py | joint_distribution.py | py | 1,286 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.listdir",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "pickle.load",
"line_number":... |
74992294908 | from django.core.exceptions import ValidationError
from django.core.validators import MaxValueValidator, MinValueValidator
from django.db import models
from django.utils.translation import gettext_lazy as _
from django.contrib.postgres.fields import ArrayField
from udemy.apps.core.models import TimeStampedBase, Ordere... | gabrielustosa/udemy-old | udemy/apps/quiz/models.py | models.py | py | 2,272 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "udemy.apps.core.models.TimeStampedBase",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "udemy.apps.core.models.OrderedModel",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 14,
"usage_type": ... |
17334218878 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import re,os,sys
import random
import argparse
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('--per', dest='per', type=int, default=10, help='ratio of test set (%)')
parser.add_argument('--file', dest='file', type... | jshmjs45/data_for_chem | codes/select_file.py | select_file.py | py | 1,111 | python | en | code | 13 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentDefaultsHelpFormatter",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "random.sample",
"line_number": 28,
"usage_type": "call"
}
] |
11706943391 | from string import ascii_lowercase, ascii_uppercase
from utils.data import read_data_as_list
characters = list(ascii_lowercase) + list(ascii_uppercase)
priority_lookup = dict(zip(characters, range(1, len(characters) + 1)))
rucksacks = read_data_as_list(day=3)
# Part 1
total = 0
for rucksack in rucksacks:
midpo... | stuartjwright/advent_of_code_2022 | day_03.py | day_03.py | py | 902 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "string.ascii_lowercase",
"line_number": 5,
"usage_type": "argument"
},
{
"api_name": "string.ascii_uppercase",
"line_number": 5,
"usage_type": "argument"
},
{
"api_name": "utils.data.read_data_as_list",
"line_number": 8,
"usage_type": "call"
}
] |
70675296187 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from ..pki.migrate_data import migrate_pki_data
class Migration(migrations.Migration):
dependencies = [
('ssl_pki', '0002_default_config'),
]
operations = [
migrations.RunPython(migrate_pki... | ngageoint/exchange | exchange/sslpki/migrations/0001_migrate_pki_data.py | 0001_migrate_pki_data.py | py | 361 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.RunPython",
"line_number": 16,
"usage_type": "call"
},
{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.