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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6261354560 | import threading
import socket
import sys
import time
import random
import os
import colorama
from colorama import Fore,Back, Style
print(Fore.MAGENTA)
print(r"""ascii here ig
""")
print(Fore.RED)
print("\n****************************************************************")
print(Fore.BLACK)
print("\n* lo... | cahzie/deny | main.py | main.py | py | 1,923 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "colorama.Fore.MAGENTA",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "colorama.Fore",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "colorama.Fore.RED",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "coloram... |
38448885815 | import logging
from dependency_injector import containers, providers
from app.common.application.controllers.responses.error_response_serializer import ErrorResponseSerializer
from app.health.application.controllers.services.git_service import GitService
from app.health.infrastructure.compound_connectivity_service im... | harvard-lts/drs-import-management-service | app/containers.py | containers.py | py | 1,773 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "dependency_injector.containers.DeclarativeContainer",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "dependency_injector.containers",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "dependency_injector.providers.Factory",
"line_number"... |
7557802756 | #!/usr/bin/env python
from io import open
from setuptools import setup, find_packages
with open("README.md", "r") as f:
long_description = f.read()
setup(
name="wheeltools",
use_scm_version={"write_to": "src/wheeltools/_version.py"},
description="General tools for working with wheels",
long_desc... | scikit-build/wheeltools | setup.py | setup.py | py | 1,262 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "io.open",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "setuptools.setup",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 21,
"usage_type": "call"
}
] |
41337426809 | import requests
import json
url = 'http://127.0.0.1:8000/api2/'
header = {'content-Type':'application/json'}
def record_fetch(id=None):
data = {}
if id is not None:
data = {'id':id}
json_data = json.dumps(data)
r = requests.get(url=url,headers = header, data=json_data)
data = r.json()
... | sriram143647/django_rest | rest_project1/app2_api/app2_requests.py | app2_requests.py | py | 1,595 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "json.dumps",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number":... |
21483117678 | # -*- coding: UTF-8 -*-
import xml.etree.ElementTree as ET
import os
import sys
def parse_xml(xml_file_name):
tree = ET.parse(xml_file_name)
root = tree.getroot()
file_name=root.find('filename').text
file_name=file_name[:-4]
objs=root.findall('object')
result=[]
for obj in objs:
ob... | wonderingboy/detection_validation | gt_list.py | gt_list.py | py | 1,840 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "os.listdir",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sys.argv",... |
31171932782 | import datetime
from django.core.cache import cache
from django.http import JsonResponse, HttpResponse, HttpResponseRedirect
from django.shortcuts import render
from django.urls import reverse_lazy
from fruitshop import models
from fruitshop.services import get_true_fruit_name, validate_integer
from users.models impo... | isamarcev/fruit_shop | fruitshop/views.py | views.py | py | 5,348 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "django.core.cache.cache.get",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "django.core.cache.cache",
"line_number": 24,
"usage_type": "name"
},
{... |
28695634620 | #coding:utf-8
import requests
import unittest
class GetEventListTest(object):
'''查询发布会接口测试'''
# def setUp(self):
# self.url="http://127.0.0.1:8000/api/get_event_list/"
def __init__(self):
self.url = "http://127.0.0.1:8000/api/get_event_list/"
def test_get_event_null(self):
'''发布... | Air-Zhuang/requests_unittest_db | interface_test.py | interface_test.py | py | 1,326 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 29,
"usage_type": "call"
}
] |
38415344206 | from datetime import datetime
from django.contrib.auth.models import User
from django.test import TestCase
from django.urls import reverse
from rest_framework import status
from rest_framework.test import APIClient
from ..models import Cast, PageSection
class PageSectionModelTestCase(TestCase):
"""
Tests the ... | rocky-roll-call/rrc-backend | casts/tests/test_page_section.py | test_page_section.py | py | 5,417 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.test.TestCase",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.contrib.auth.models.User.objects.create_user",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.User.objects",
"line_number": 16,
"us... |
75311563560 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import tensorflow as tf
import os
from sklearn.model_selection import train_test_split
tf.compat.v1.disable_eager_execution()
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
x_data=np.linspace(0,10,100)
noise=np.random.randn(100)
y_data=.3*... | goswamiprashant/Machine-Learning | tf_7.py | tf_7.py | py | 1,323 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "tensorflow.compat.v1.disable_eager_execution",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "tensorflow.compat",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 8,
"usage_type": "attribute"
},
{
"... |
538094596 | import os
from jinja2 import Environment, PackageLoader, select_autoescape
from sanic import Sanic, request, response
from blur_detection_core import blur_check_file, blur_check_link
from custom_exceptions import (Base64ImageError, ImageInvalidError,
UrlInvalidError)
env = Environment(... | ikuyarihS/image-api | app.py | app.py | py | 2,509 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "jinja2.Environment",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "jinja2.PackageLoader",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "jinja2.select_autoescape",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sani... |
15826158145 | import numpy as np
import pandas as pd
import pbc
from pymatgen.core.periodic_table import Element
from sklearn.cluster import KMeans
import sys
import os
import glob
from joblib import Parallel, delayed
import warnings
CC_CUTOFF = 0.03
RADIUS_FACTOR = 1.2
def get_nbrs(crystal_xyz, crystal_lat, R_max):
A = np.tr... | Tony-Y/cgnn | tools/mp_graph.py | mp_graph.py | py | 4,457 | python | en | code | 93 | github-code | 18 | [
{
"api_name": "numpy.transpose",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.linalg.inv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "numpy.matmul",
... |
34659566273 | import xml.etree.ElementTree as ET
import uuid
import os
import time
import logging
import logging.handlers
import uuid
class ScriptLogger():
def __init__(self):
self.log_file_name = 'logs/latest.log'
self.path = os.getcwd()
self.logpath = os.path.join(self.path, 'logs')
... | gutma-org/droneregistry | tools/arn-to-registry-json.py | arn-to-registry-json.py | py | 5,431 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "os.getcwd",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number... |
70736486119 | # This problem was asked by Google.
# Find the minimum number of coins required to make n cents.
# You can use standard American denominations, that is, 1¢, 5¢, 10¢, and 25¢.
# For example, given n = 16, return 3 since we can make it with a 10¢, a 5¢, and a 1¢.
from typing import List
# Greedy (Works due to currency)... | jpayan/excercises | algorithms/coin_change.py | coin_change.py | py | 668 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "typing.List",
"line_number": 9,
"usage_type": "name"
}
] |
19407037632 | import argparse
from datetime import datetime
import torch
import torch.nn.functional as F
from torch.nn.utils import clip_grad_norm_
from torchmetrics.image.fid import FrechetInceptionDistance
import numpy as np
import os
import time
from torchvision.transforms import (
CenterCrop,
Compose,
Interpolatio... | quincy2112/diffusion-lottery | train.py | train.py | py | 12,955 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "datetime.datetime.now",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "torch.device",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_av... |
39410698081 | import os
import json
import argparse
import shutil
import yaml
import copy
from datetime import datetime
import ehr_ml.timeline
import ehr_ml.ontology
import ehr_ml.index
import ehr_ml.labeler
import ehr_ml.clmbr
from ehr_ml.clmbr import Trainer
from ehr_ml.clmbr import PatientTimelineDataset
from ehr_ml.clmbr.datase... | som-shahlab/CLMBR-contrastive-learning | experiments/main/scripts/linear_probe.py | linear_probe.py | py | 21,922 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 238,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 238,
"usage_type": "name"
},
{
"api_name": "torch.nn.Line... |
71267475561 | import spotipy
from spotipy.oauth2 import SpotifyOAuth
import openpyxl
# Configura las credenciales de la API de Spotify
sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id='id_cliente', #esto lo consigues en la pagina sporify developer
client_secret='id_secreto', #a... | Kevin25DC/Sporify_playlist_excel | spotify_to_excel.py | spotify_to_excel.py | py | 1,409 | python | es | code | 1 | github-code | 18 | [
{
"api_name": "spotipy.Spotify",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "spotipy.oauth2.SpotifyOAuth",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "openpyxl.Workbook",
"line_number": 18,
"usage_type": "call"
}
] |
35071227738 | import numpy as np
import cv2
from rknn.api import RKNN
if __name__ == '__main__':
# Create RKNN object
rknn = RKNN()
# load rknn
print('--> Load rknn model')
ret = rknn.load_rknn("./examples/squeezenet_test/squeezenet.rknn")
if ret != 0:
print('Load rknn model failed')
exit(... | zjd1988/timvx_engine | examples/squeezenet_test/squeezenet_test_rknn.py | squeezenet_test_rknn.py | py | 981 | python | en | code | 5 | github-code | 18 | [
{
"api_name": "rknn.api",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "rknn.api.RKNN",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "rknn.api.load_rknn",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "rknn.api",
"line_number":... |
38963052414 | import numpy as np
import matplotlib.pyplot as plt
import math
from scipy.misc import face
from skimage.measure import label, regionprops
from skimage import color
from os import listdir
from scipy.ndimage import label
from skimage.filters import threshold_otsu, gaussian
from skimage.exposure import adjust_sigmoid
from... | Netawa/computer_vision_homework | Pencils [5]/pencils.py | pencils.py | py | 2,111 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.where",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "scipy.ndimage.label",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "numpy.where",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "scipy.ndimage.label",
... |
8258453677 | from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need
# fine tuning.
buildOptions = dict(packages = [], excludes = [])
executables = [
Executable('main.py', 'Win32GUI')
]
setup(name='UniViewSigGrpMakerQt',
version = '0.1',
description = 'Qt application f... | gurkslask/UniviewSigGrpMakerQt | setup.py | setup.py | py | 439 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "cx_Freeze.Executable",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cx_Freeze.setup",
"line_number": 11,
"usage_type": "call"
}
] |
449111988 | import pymysql
import threading
b = 0
flag = 0
db = pymysql.connect("localhost","root","","databasename" )
cursor = db.cursor()
def thread_1():
global flag
global b
while(True):
if (flag == 0):
a = input("nhap x:")
if (a == "exit"):
flag = 3
... | tquang14/test | RTOS_Ngay3/B3.py | B3.py | py | 1,808 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pymysql.connect",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 59,
"usage_type": "call"
}
] |
39702783586 | import os
import requests, json
from flask import Flask,redirect,url_for,render_template,request
from steam_api import get_csgo3, get_csgo4, get_csgo5
from helper import fill_till
app = Flask(__name__)
@app.route('/',methods=['GET','POST'])
def home():
output1 = ""
output2 = ""
output3 = "TEST"
id = ... | Alexico1969/csgo_stats | flask_app.py | flask_app.py | py | 5,165 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "steam_api.get_csgo3",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "steam_api.get_csgo4",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "steam_api.get_csgo... |
24479008341 | import logging
import requests
from time import sleep
from pathlib import Path
from requests_cache import CachedSession
from requests_cache.backends import SQLiteCache
from requests.exceptions import RequestException
from bbot.core.errors import WordlistError
log = logging.getLogger("bbot.core.helpers.web")
def wor... | melroy89/venom | osint/bbot/bbot/core/helpers/web.py | web.py | py | 8,361 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bbot.core.errors.WordlistError",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "bbot.core.errors.WordlistError",
"line_number": 22,
"usage_type": "call"
},
{
"a... |
35852234363 | # Converts the PCAP Files to CSV Files for next steps
import sys
import os
import argparse
import csv
sys.path.append(os.getcwd())
class PCAP2CSVConverter:
pcapDir = None
csvDir = None
CMD = '''tshark -r {} -T fields -e frame.number -e frame.time -e ip.src -e ip.dst -e ip.proto -e tcp.srcport -e tcp.dstpo... | dilawer11/iot-device-fingerprinting | src/scripts/PCAP2CSV.py | PCAP2CSV.py | py | 2,602 | python | en | code | 4 | github-code | 18 | [
{
"api_name": "sys.path.append",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.splitext",
"line_num... |
4947972818 | from argparse import ArgumentParser
from pathlib import Path
from os import listdir
from os.path import isfile, join
from difflib import unified_diff
from dataclasses import dataclass
import yaml
import subprocess
import termcolor
OK_TAG = f"[{termcolor.colored('OK', 'green')}]"
KO_TAG = f"[{termcolor.colored('KO', '... | s3ite/42sh---Bash-posix-shell | tests/test_suite.py | test_suite.py | py | 1,948 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "termcolor.colored",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "termcolor.colored",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "difflib.uni... |
10862849734 | import tkinter as tk
from matplotlib.figure import Figure
from matplotlib.backends.backend_tkagg import (FigureCanvasTkAgg,
NavigationToolbar2Tk)
import numpy as np
from back import *
#VALORES INICIALES DE LOS PARÁMETROS
hp = 0.01
to1 = 10.0
tf1 = 50.0
to2 = 50.0
tf2 = ... | 0Jhoel/proyecto_final_prog_cientifica | main.py | main.py | py | 13,019 | python | es | code | 0 | github-code | 18 | [
{
"api_name": "tkinter.END",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "tkinter.END",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "tkinter.END",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "tkinter.DISABLED",... |
71426764520 | import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
import seaborn as sns
from functools import reduce
from matplotlib import pyplot
import os
import gc
from sklearn.ensemble import ExtraTreesClassifier
PATH = "../input"
# Preview of Categorical variables in a dat... | aorursy/new-nb-3 | gauravtaneja_home-credit-take0.py | gauravtaneja_home-credit-take0.py | py | 15,042 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pandas.DataFrame",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "seaborn.set_style",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.su... |
41053994788 | from matplotlib import pyplot as plt
import numpy as np
import csv
from collections import Counter
import ast
import pandas as pd
with open('twitterData_public_tweets.csv') as file:
csv_reader = csv.DictReader(file)
user_id_counter = Counter()
followers = {}
count = 0
highest_follower = ''
... | kimia84/disseration_twitter_data_collection | mathplotlib/tweet_user_followers.py | tweet_user_followers.py | py | 1,795 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "csv.DictReader",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "matplotlib.pypl... |
484157311 | import json
import os
class Configuration(object):
class ConfigError(Exception):
pass
def __init__(self, path, categories):
# Reset properties
self.bind = None
self.server = None
self.motd = {"modified": 0, "content": ""}
self.rules = {"modified": 0, "content"... | OzoneNZ/pyrcd | System/configuration.py | configuration.py | py | 1,964 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "json.loads",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "json.decoder",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "os.path.getmtime",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_num... |
72143107239 | import os
from typing import Sequence
from pyrogram.types import ChatPermissions
from userge import Message, userge
CHANNEL = userge.getCLogger(__name__)
_types = [
"msg",
"media",
"polls",
"invite",
"pin",
"info",
"webprev",
"inlinebots",
"animations",
"games",
"stickers... | code-rgb/USERGE-X | userge/plugins/admin/locks.py | locks.py | py | 11,568 | python | en | code | 130 | github-code | 18 | [
{
"api_name": "userge.userge.getCLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "userge.userge",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "userge.Message",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "typing.Sequence",... |
7605760144 | # =========================================================================== #
# Date: 06/12/19
# Author: Richard Lu
# Description:
# train classification model
# Runtime:
# =========================================================================== #
import copy
import glob
import logging
import numpy as np
impor... | richardwhlu/insight_project | 2_data_analysis/2_modeling/train_model.py | train_model.py | py | 19,771 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "ujson.load",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_... |
11378657308 | from odd_models.models import DataSetField, DataSetFieldType, Type
from oddrn_generator import MysqlGenerator
from . import (
ColumnMetadataNamedtuple, _data_set_field_metadata_schema_url, _data_set_field_metadata_excluded_keys
)
from .metadata import append_metadata_extension, convert_bytes_to_str
from .types imp... | Appen/odd-mysql-adapter | odd_mysql_adapter/mappers/columns.py | columns.py | py | 1,439 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "oddrn_generator.MysqlGenerator",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "metadata.convert_bytes_to_str",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "metadata.convert_bytes_to_str",
"line_number": 15,
"usage_type": "call"
},... |
19247897230 | import nltk, os
from nltk.corpus import movie_reviews
from nltk.tokenize import word_tokenize, sent_tokenize
from nltk.corpus import stopwords
from random import randrange, sample
from gensim import utils
from gensim.corpora.dictionary import Dictionary
from gensim.corpora.mmcorpus import MmCorpus
from gensim.corpora.t... | dshahaf/snap-sentiment | engine/corpus.py | corpus.py | py | 14,223 | python | en | code | 0 | github-code | 18 | [
{
"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": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number"... |
72751998761 | from pathlib import Path
from argparse import ArgumentParser
def existing_file_path(s):
p = Path(s)
if not p.exists() or not p.is_file():
raise TypeError('Path is invalid or is not a file.')
return p
def parsed_args():
parser = ArgumentParser('NerFlexGIF', description='A perfect GIF creator.... | MacDucky/NeRFleXGIF | src/parser.py | parser.py | py | 2,854 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "pathlib.Path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 13,
"usage_type": "call"
}
] |
70853366759 | # import numpy as np
# import pandas as pd
# import copy
# import math as mth
# import random
# import matplotlib.pyplot as plt
# random.seed(200)
# df = pd.DataFrame({
# 'x': [5, 10, 15, 24, 30, 55, 60, 71, 80, 85],
# 'y': [3, 15, 12, 10, 45, 52, 78, 80, 91, 70]
# })
# def distance(xy, mu):
# return np.... | KavenArango/ML-Class | Python/kmean.py | kmean.py | py | 3,960 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pandas.DataFrame",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
"line_number": 78,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 78,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.ran... |
35892231971 | import scrapy
import constants as keys
from spiders.spider_modules.base import BaseSpider
from spiders.spider_modules.search_helper import (
CUSTOM_SEARCHBOX_SETTINGS,
BarcodeSearchHelper,
)
from spiders.spider_modules.visible.with_search.groseri_helper import TopLocalHelper
from spiders.test_spider import deb... | selimslab/entrophy | spiders/spider_modules/visible/with_search/groseri_search.py | groseri_search.py | py | 1,532 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "spiders.spider_modules.base.BaseSpider",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "spiders.spider_modules.search_helper.CUSTOM_SEARCHBOX_SETTINGS",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "spiders.spider_modules.search_helper.Barcod... |
1810071761 | from public.message import translate_msg
from robot.botClient import get_bot_client
from robot.comm.pluginBase import Session
from robot.comm.command import NormalCommand, RegexCommand
def translate(from_: str, to_: str, text: str) -> str:
return get_bot_client().send(translate_msg.build({
'from_': from_,... | comiee/bot2 | source/robot/section/translate.py | translate.py | py | 1,058 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "robot.botClient.get_bot_client",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "public.message.translate_msg.build",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "public.message.translate_msg",
"line_number": 8,
"usage_type": "name"
}... |
20281583625 | import configparser
def read_config():
# cp = configparser.SafeConfigParser()
cp = configparser.RawConfigParser()
print('cp_no_read', cp)
cp.read("test.conf")
print('cp_read', cp)
sections = cp.sections()
print('sections', sections)
res_bitbucket_org = cp.options('bitbucket.org')
p... | Faithlmy/Python_base | P_base/add_config/config.py | config.py | py | 1,248 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "configparser.RawConfigParser",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "configparser.ConfigParser",
"line_number": 31,
"usage_type": "call"
}
] |
5236827714 | from typing import *
from math import fsum,sqrt
from collections import defaultdict
from random import sample
#big Ideass with little code
#kmeans
allpoints =[(10,41,23),(22,30,29),(11,42,5),(20,32,4),(12,40,12),(21,36,23)]
def mean(a: Iterable)-> Tuple:
return (fsum(a)/len(a))
def dist(centroid,point):
ret... | moksha34/flasktuts | static.py | static.py | py | 1,187 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "math.fsum",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "math.fsum",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_num... |
2657779624 | from typing import Any, Dict, List, Optional, Tuple, Union
import numpy as np
import torch
from datasets import concatenate_datasets
from datasets.arrow_dataset import Dataset
from transfer_classifier.dataset_preprocessor.classification_dataset_preprocessor import (
ClassificationDatasetPreprocessor,
)
from transf... | icoxfog417/transformer-sandbox | transfer_classifier/augmentor/augmentor.py | augmentor.py | py | 4,790 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "datasets.arrow_dataset.Dataset",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "transfer_classifier.dataset_preprocessor.classification_dataset_preprocessor.ClassificationDatasetPreprocessor",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "tra... |
3748469616 | from typing import List, Type, Generator
from evidently.analyzers.base_analyzer import Analyzer
from evidently.analyzers.regression_performance_analyzer import RegressionPerformanceAnalyzer
from evidently.model_monitoring.monitoring import ModelMonitor, ModelMonitoringMetric, MetricsType
class RegressionPerformanceM... | tembhurnetanvi/Assignment3-DAMG7245 | evidently-main/evidently-main/evidently/model_monitoring/regression_performance.py | regression_performance.py | py | 4,267 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "evidently.model_monitoring.monitoring.ModelMonitoringMetric",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "evidently.model_monitoring.monitoring.ModelMonitoringMetric",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "evidently.model_monitorin... |
34617723253 | from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support.select import Select
import time
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
class ass... | Pardhasaradhi-edwisely/Edwisely_Automation_Project | pageObjects/AssessmentPage.py | AssessmentPage.py | py | 12,473 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "selenium.webdriver.common.by.By.XPATH",
"line_number": 71,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.common.by.By",
"line_number": 71,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.XPATH",
"line_number": 75,
"us... |
34343886628 | import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier
data = pd.read_csv('train.csv')
X = data.iloc[:,:-1].values
y = data.iloc[:,-1].values
X_train, X_test, y_train, y_test = train_test_split(X,y, test_size = 0.2, random_state = 0)
###############... | ulkuyondem/MobilePriceClassification | MobilePriceClassification/py_code/tahmin.py | tahmin.py | py | 2,076 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "pandas.read_csv",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sklearn.neighbors.KNeighborsClassifier",
"line_number": 11,
"usage_type": "call"
... |
32226880915 |
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
import telebot
import pygame
#privet
print("Bot WTP started")
bot = telebot.TeleBot('1777290579:AAGVarx5xRQ9QlPRx0L2LHyzgKMz-hDK284')
keyboard = telebot.... | donkent/WTP | main.py | main.py | py | 1,516 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "telebot.TeleBot",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "telebot.types.ReplyKeyboardMarkup",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "telebot.types",
"line_number": 13,
"usage_type": "attribute"
}
] |
3568906738 | #!/usr/bin/env python3
from pyboard import Pyboard
from serial.tools import list_ports
import inspect
import time
DEBUG = False
def remote(pyb, func, *args, **kwargs):
"""Calls func with the indicated args on the micropython board."""
args_arr = [repr(i) for i in args]
kwargs_arr = ["{}={}".format(k, rep... | dhylands/upy-examples | sync_rtc.py | sync_rtc.py | py | 1,965 | python | en | code | 95 | github-code | 18 | [
{
"api_name": "inspect.getsource",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "time.localtime",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "pyb.RTC",
"line_number... |
26791585280 | import base64
import json
import os
from typing import Optional, Tuple
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import padding, rsa
from cryptography.hazmat.primitives.asymmetric.rsa import R... | Szu-Chi/3d-printing-with-moveo | Cura/Uranium/UM/Trust.py | Trust.py | py | 11,411 | python | en | code | 9 | github-code | 18 | [
{
"api_name": "cryptography.hazmat.primitives.hashes.SHA384",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "cryptography.hazmat.primitives.hashes",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 45,
"usage_type": "call"... |
35614769137 | # -*- encoding:utf-8 -*-
"""
模拟结果的可视化
plot_country: 绘制国家总SEIR-时间演化曲线
plot_all: 绘制各城市SEIR-时间演化曲线
animate: 制作国家演化视频
report: 生成csv格式的报告表,包含国家和各城市演化过程中的感染最大值及时刻、健康人数降至50%时刻信息
"""
import numpy as np
import pandas as pd
import os
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from simulation import ... | ChrisInBed/GraphSEIR | vision.py | vision.py | py | 3,209 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "os.path.exists",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "os.path",... |
31230392034 | """Core serializers."""
from rest_framework import serializers
from core.markdown import MarkdownField
from .models import Document
class DocumentSerializer(serializers.HyperlinkedModelSerializer):
"""Serializer for documents."""
content = MarkdownField()
class Meta: # noqa
model = Document
... | oser-cs/oser-showcase-backend | project/core/serializers.py | serializers.py | py | 536 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "rest_framework.serializers.HyperlinkedModelSerializer",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "core.markdown.MarkdownField",
"line_number": 13,
"u... |
28499872395 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import mimetypes
import os
import smtplib
import sys
from email import encoders
from email.mime.audio import MIMEAudio
from email.mime.base import MIMEBase
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMETex... | xiangshuyu/PythonAioWeb | src/util/email_util.py | email_util.py | py | 6,945 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "util.logger.logger.Logger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "email.mime.multipart.MIMEMultipart",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "smtplib.SMTP",
"line_number": 108,
"usage_type": "call"
},
{
"api_na... |
5808458165 | from torch import nn
class LigthSpeechLoss(nn.Module):
""" LigthSpeech Loss """
def __init__(self):
super(LigthSpeechLoss, self).__init__()
def forward(self, mel,
padd_predicted, cemb_out,
mel_tac2_target,
D, cemb):
mel_loss = nn.MSELoss()(... | entn-at/LightSpeech | loss.py | loss.py | py | 575 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "torch.nn.Module",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "torch.nn.MSELoss",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_num... |
74728079720 | #!/usr/bin/python3
import time
import datetime
from gpiozero import InputDevice, LED
import subprocess
import requests
# RPI enumeration is:
# pin 5 & 6 are used for the button (3 & ground)
# pin 7 & 9 are used for the LED (4 & ground)
button_pin = 3
led_pin = 4
button = InputDevice(button_pin, pull_up=True)
last_ac... | kylemcdonald/bsp | pi/button/button.py | button.py | py | 1,171 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "gpiozero.InputDevice",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "gpiozero.LED",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line... |
2522389062 | # -*- coding: utf-8 -*-
from __future__ import (
absolute_import,
division,
print_function,
unicode_literals,
)
from builtins import *
import json
import pytest
import pytz
import requests
import requests_mock
import uuid
from copy import deepcopy
from datetime import datetime
from pkg_resources import ... | DC23/scriptabit | scriptabit/tests/task_implementations.py | task_implementations.py | py | 4,000 | python | en | code | 8 | github-code | 18 | [
{
"api_name": "scriptabit.Task",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "scriptabit.Difficulty.easy",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "scriptabit.Difficulty",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": ... |
71812779560 | # 시퀀스 필터링
my_list = [1, 4, -5, 10, -7, 2, 3, -1]
# 가장 간단한 방범: list comprehension
bigger_then_zero = [n for n in my_list if 0 < n]
print(bigger_then_zero)
smaller_then_zero = [n for n in my_list if n < 0]
print(smaller_then_zero)
# 결과로 생성되는 리스트가 너무 크면 메모리나 시간 측면에서 한번에 리스트로 반환받기가 부담스러울 수가 있다.
# 그럴땐 list comprehensions... | Ma-rk/python-cookbook-3rd | 01_DataStructuresAndAlgorithms/16_Filtering_Sequence_Elements.py | 16_Filtering_Sequence_Elements.py | py | 2,272 | python | ko | code | 1 | github-code | 18 | [
{
"api_name": "math.sqrt",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "itertools.compress",
"line_number": 80,
"usage_type": "call"
}
] |
38401730283 | from cvzone.FaceDetectionModule import FaceDetector
from model.resnet import resnet_face18
from torch.nn import DataParallel
from sklearn.metrics.pairwise import cosine_similarity
import cv2, math, json, torch, os
import numpy as np
def load_model():
model = resnet_face18(use_se=False)
model = DataPar... | lindaadha/face-recoginition-identification-verification | regis_new_face.py | regis_new_face.py | py | 2,144 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "model.resnet",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "model.resnet.resnet_face18",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "model.resnet",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "torch.nn.DataParal... |
43330735474 | #!/usr/bin/env python3
from argparse import ArgumentParser
from time import localtime, mktime, strftime, struct_time
import shelve
import shutil
import sys
argparser = ArgumentParser(description='''
Extracts a time range from db/tweets and stores it in db/slice.
''')
defaulttime = 'xxxx0101000000'
def parse_time(s)... | rgrig/twitstat | slice.py | slice.py | py | 1,948 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "time.mktime",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "time.struct_time",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "time.strftime",
... |
16050740861 |
import pandas as pd
import numpy as np
import re
import os
import pickle
import sys
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.cluster import KMeans
from yellowbrick.cluster import KElbowVisualizer
from sklearn.feature_extract... | pswaldia/Automatic-Server-Logs-Clustering- | cluster.py | cluster.py | py | 3,455 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "sklearn.feature_extraction.text.CountVectorizer",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "sklearn.feature_extraction.text.TfidfTransformer",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "cluster_utils.save_txt",
"line_number": 34,
... |
8225562975 | import sseclient, requests
from urllib.parse import urlparse, parse_qs
from ermez.connect.abstract_consumer import AbstractConsumer
class Consumer(AbstractConsumer):
def __init__(self, uri: str, credential):
self.uri_parsed = urlparse(uri)
headers = {
"Accept": "text/event-stream",
... | ggekos/ermez | ermez/connect/mercure/mercure_consumer.py | mercure_consumer.py | py | 871 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "ermez.connect.abstract_consumer.AbstractConsumer",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "urllib.parse.urlparse",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "urllib.parse.parse_qs",
"line_number": 15,
"usage_type": "call"
},... |
13020471831 | import sqlite3
import re
import os
import traceback
import json
import sys
import hashlib
DATABASE_FILENAME = 'C:\Program Files (x86)\Steam\steamapps\common\My Time At Portia\Portia_Data\StreamingAssets\CccData\LocalDb.bytes'
CACHED_PROPS = None
CACHED_GIFTS = None
CACHED_FOOD_MENU = None
CACHED_DATE_DIA... | whereswallace/portia-miner | main.py | main.py | py | 56,209 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "hashlib.md5",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "json.load",
"line_number"... |
22278534620 | import os
import re
import pickle
import random
import inspect
import argparse
import subprocess
import torch
from torch import optim
from logging import getLogger
from .logger import create_logger
from .loader import AVAILABLE_ATTR
FALSY_STRINGS = {'off', 'false', '0'}
TRUTHY_STRINGS = {'on', 'true', '1'}
MODELS_P... | facebookresearch/FaderNetworks | src/utils.py | utils.py | py | 7,811 | python | en | code | 755 | github-code | 18 | [
{
"api_name": "os.path.join",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"li... |
12462130055 | # -*- coding: utf-8 -*-
from plone import api
from plone.app.event.interfaces import IEventSettings
from plone.registry.interfaces import IRegistry
from zope.component import getUtility
import datetime
import os
from imio.helpers.content import create, richtextval, add_image
data_path = os.path.join(os.path.dirname(_... | IMIO/cpskin.demo | cpskin/demo/setuphandlers.py | setuphandlers.py | py | 16,783 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_nu... |
15372164153 | import collections
class TreeNode(object):
def __init__(self, data=0, left=None, right=None):
self.data = data
self.left, self.right = left, right
def __repr__(self):
return str(self.data) + " " + str(self.left) + " " + str(self.right)
gpos = 0
def delete_nodes_to_make_forests(root, ... | litakgit/DSAlgo | Random/1110_delete_node_return_forest.py | 1110_delete_node_return_forest.py | py | 1,353 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "collections.defaultdict",
"line_number": 32,
"usage_type": "call"
}
] |
10838986817 | from typing import *
import numpy as np
import pandas as pd
import time
from collections import namedtuple
import threading
import math
import warnings
from .spectral_clustering import spectral_clustering
from .flow_clustering import flow_clustering
from .GraphLocal import GraphLocal
from .triangleclusters import tri... | RevoData/LocalGraphClustering | localgraphclustering/ncp.py | ncp.py | py | 16,122 | python | en | code | null | github-code | 18 | [
{
"api_name": "time.time",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 52,
... |
39041977088 | import sys
import binascii
import json
import bisect
import logging as log
from rangeset import RangeSet
import idaapi
#
# ScratchABit API and code
#
START = 0
END = 1
PROPS = 2
BYTES = 3
FLAGS = 4
from .defs import *
arch_id = None
def str_area(area):
if not area:
return "Area(None)"
return "A... | pfalcon/ScratchABit | scratchabit/engine.py | engine.py | py | 46,125 | python | en | code | 391 | github-code | 18 | [
{
"api_name": "rangeset.RangeSet",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "logging.debug",
"line_number": 116,
"usage_type": "call"
},
{
"api_name": "logging.warn",
"line_number": 414,
"usage_type": "call"
},
{
"api_name": "idaapi.dr_O",
"lin... |
24684427669 | from anki import hooks, sound
from aqt import mw, utils
from aqt.qt import *
from aqt import progress
import time
from aqt.utils import getText
from anki.utils import isWin
from aqt.utils import tooltip, closeTooltip
from aqt.reviewer import Reviewer
import string
from .mutagen.mp3 import MP3
from .mutagen.mp4 import ... | yu7777/Auto-Advance--Anki_addon- | Auto_Advance.py | Auto_Advance.py | py | 26,057 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "aqt.mw.app.activeWindow",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "aqt.mw.app",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "aqt.mw",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "anki.sound.play",
... |
74741744681 | import logging
import dnfdaemon.client
from gi.repository import Gdk
import yumex.common.const as const
from yumex.backend import Backend
from yumex.common import (
CONFIG,
exception_handler,
timer,
_,
format_number,
ngettext,
pkg_id_to_full_name,
to_pkg_tuple,
)
logger = logging.getL... | timlau/yumex-dnf | src/yumex/backend/dnf.py | dnf.py | py | 15,981 | python | en | code | 60 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "yumex.common.to_pkg_tuple",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "yumex.common.format_number",
"line_number": 42,
"usage_type": "call"
},
{
"api_name":... |
606084173 | import numpy as np
from prettytable import PrettyTable
def manual_input(n, m):
Q = []
print("Введите значения таблицы Q построчно:")
for i in range(n):
row = []
for j in range(m):
value = int(input(f"Введите значение для строки {i + 1}, столбца {j + 1}: "))
row.appen... | IrmA-ErroR/Serov_7 | lab_1/1_1.py | 1_1.py | py | 11,705 | python | ru | code | 0 | github-code | 18 | [
{
"api_name": "numpy.random.randint",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "prettytable.Pretty... |
27398804281 | """
The cube.py file contains the cube class used in the racing test
"""
import pygame
class Cube(pygame.sprite.Sprite):
"The cube class is used for the delta time racing demo"
def __init__(self, game, speed, coords):
self.walking_speed = speed
self.image = pygame.Surface([50, 50])
... | 6Gcharlie/Whack-a-mole | assets/scripts/cube.py | cube.py | py | 753 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "pygame.sprite",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "pygame.Surface",
"line_number": 10,
"usage_type": "call"
}
] |
74602710759 | class Solution:
def dailyTemperatures(self, temperatures: List[int]) -> List[int]:
from collections import deque
result = [0] * len(temperatures)
stack = deque()
for i in range(len(temperatures)):
while stack and temperatures[stack[-1]] < temperatures[i]:
... | Ayomipo18/Data-Structures-and-Algorithms-LeetCode | 739-daily-temperatures/739-daily-temperatures.py | 739-daily-temperatures.py | py | 475 | python | en | code | 5 | github-code | 18 | [
{
"api_name": "collections.deque",
"line_number": 5,
"usage_type": "call"
}
] |
21261502035 | import numpy as np
import cv2
import pickle
####################
width = 640
height = 480
threshold = 0.65
camera = 0
####################
cap = cv2.VideoCapture(camera)
cap.set(3, width)
cap.set(4, height)
pickle_in = open("A/model_trained.p", "rb")
model = pickle.load(pickle_in)
def preProcessing(img):
img = ... | mialskywalker/NumRecognition | OCR_CNN_Test.py | OCR_CNN_Test.py | py | 1,180 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"l... |
3259126265 | # -*- coding: utf-8 -*-
"""
Created on Sat Mar 7 15:03:01 2020
@author: jacqu
Computes pretrained embeddings for nucleotides,
adds as a node feature and saves annotated nx graphs to 'args.savedir'
"""
import sys, os
import pickle
import argparse
import torch
import torch.utils.data
from torch import nn, optim
im... | jacquesboitreaud/rna_ne | embeddings.py | embeddings.py | py | 4,409 | python | en | code | 5 | github-code | 18 | [
{
"api_name": "os.path.dirname",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"... |
22692100693 | from PIL import Image
import visdom
vis = visdom.Visdom()
def reset(env):
vis.close(env=env)
def visualize_samples(title, sample, env):
vis.images(
sample,
opts=dict(title=title),
env=env
)
vis.save([env])
| uhlerlab/geneexpression | code/mnist_usps_AE/visualize.py | visualize.py | py | 253 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "visdom.Visdom",
"line_number": 4,
"usage_type": "call"
}
] |
13773392145 | #!/usr/bin/env python
import os
import yaml
import logging
import subprocess
import time
import zipfile
import shutil
from subprocess import run
from openpyxl import load_workbook
# 给库添加日志
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler)
#通用类型##############################################... | TrellixVulnTeam/kscripts_19GQ | WY/file/ei1010/common.py | common.py | py | 6,858 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.NullHandler",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path.dirnam... |
21281278987 | # -*- coding: utf-8 -*-
"""
Spyder Editor
Este é um arquivo de script temporário.
"""
"""
1) A tensão elétrica medida em um circuito, em volts,
tem a seguinte expressão no instante t, em segundos:
v(t)=e−0.5tcos(2π0.8t)
Faça o gráfico da altura em função do tempo.
Sugestão: fazer o gráfico com tempo entr... | barbara-barbosa/Bases-computacionais | tarefa6barbara.py | tarefa6barbara.py | py | 1,775 | python | pt | code | 0 | github-code | 18 | [
{
"api_name": "numpy.arange",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.cos",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 20,
... |
23017297384 | import numpy as np
import json
def loadData(json_link):
with open(json_link, 'r') as data:
file = json.load(data)
all_lanes = file["LanesMeasurement"]
for k,v in enumerate(all_lanes):
all_lanes[k] = np.array(all_lanes[k])
best_performance_range = file["BestPerformanceRan... | GiangHLe/traffic_monitoring | Source code/loading.py | loading.py | py | 771 | python | en | code | 12 | github-code | 18 | [
{
"api_name": "json.load",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 21,
"usage_type": "call"
}
] |
38450327649 | from main import app
from pydantic import BaseModel
from authenticator import authenticator
from fastapi.testclient import TestClient
from queries.accounts import AccountQueries
client = TestClient(app)
# Arrange where you write out the data that you're going to use in the test
# Act where you call the function or m... | ryancur/Tasktic | api_service/routers/tests/test_accounts.py | test_accounts.py | py | 1,589 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "fastapi.testclient.TestClient",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "main.app",
"line_number": 7,
"usage_type": "argument"
},
{
"api_name": "pydantic.BaseModel",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "main.app.... |
22216048531 | from numba import cuda
import numpy as np
@cuda.jit
def add_kernel(x, y, out):
tx = cuda.threadIdx.x
ty = cuda.threadIdx.y
bx = cuda.blockIdx.x
by = cuda.blockIdx.y
bw = cuda.blockDim.x
bh = cuda.blockDim.y
x = tx + bx * bw
y = ty + by * bh
array[x, y] = something(x, y)
block... | YassinAZOUAGH/TraitementImage | Code/GPU/add_kernel2.py | add_kernel2.py | py | 831 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numba.cuda.threadIdx",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "numba.cuda",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "numba.cuda.threadIdx",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "numba.cud... |
25073159478 | import asyncio
from telethon import events
import random
BILL = [
"Yes, look at the human triangle!",
"Remember! Reality's an illusion, the universe is a hologram, buy gold! Byeeee!",
"Pain is hilarious!",
"I've got some children I need to make into corpses.",
"Oh, wow, that's a great offer. How 'bout i... | SunnyXdm/otpuserbot | stdplugins/random_bill.py | random_bill.py | py | 653 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "random.choice",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "telethon.events.NewMessage",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "telethon.events",
"line_number": 16,
"usage_type": "name"
}
] |
12176979460 | """empty message
Revision ID: 69219be8b34c
Revises: 764fc66c406a
Create Date: 2019-08-10 09:09:31.692658
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '69219be8b34c'
down_revision = '764fc66c406a'
branch_labels = None
depends_on = None
def upgrade():
# ... | verse7/COC2019-API | migrations/versions/69219be8b34c_.py | 69219be8b34c_.py | py | 1,476 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "alembic.op.drop_table",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "alembic.op.drop_table",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "alembic.op",
... |
40959409084 | from django.shortcuts import render, redirect
from django.views.generic.list import ListView
from django.views.generic.edit import CreateView
from django.views.generic.detail import DetailView
from .models import Survey
from bookmark.models import Bookmark
from django.urls import reverse_lazy
# Create your views here.... | timeofwise/2021bsprogram | survey/views.py | views.py | py | 1,455 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "django.views.generic.edit.CreateView",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "models.Survey",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "django.urls.reverse_lazy",
"line_number": 45,
"usage_type": "call"
},
{
"api_n... |
72518631720 | from database.mongodb import mongodb
from kafka import KafkaConsumer
from json import loads
class consumer_problem:
def __init__(self):
self.database = mongodb()
self.consumer = KafkaConsumer(
'problemInfo',
bootstrap_servers=['localhost:9092'],
auto_offset_rese... | 70825/solvedac-pipeline | kafka_file/consumer.py | consumer.py | py | 1,523 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "database.mongodb.mongodb",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "kafka.KafkaConsumer",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "database.mongod... |
4536916685 | import numpy as np
from scipy.linalg import dft
import os
import matplotlib.pyplot as plt
class QAM():
def __init__(self, Ave_Energy=1, B=2):
'''
Gray mapping for QPSK (B=2)
| b0 | I | b1 | Q |
| 0 | -1 | 0 | -1 |
| 1 | 1 | 1 | 1 |
Gray mapping for 1... | mingyuyng/JSCC | util/mod.py | mod.py | py | 5,117 | python | en | code | 7 | github-code | 18 | [
{
"api_name": "numpy.arange",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": ... |
16319902089 | #!/usr/bin/env python3
import os
import json
import logging
from WDL import Document, Tree, Env, Expr, values_to_json, values_from_json
from WDL._util import provision_run_dir
from WDL.runtime import cache as _cache
from WDL.runtime.workflow import StateMachine as _StateMachine, _StdLib
from tasks import run_task
f... | perezja/routines | routines/state.py | state.py | py | 3,952 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "WDL.runtime.cache.CallCache",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "WDL.runtime.cache",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "WDL.runtime.workflow._StdLib",
"line_number": 16,
"usage_type": "call"
},
{
"a... |
43191767461 | import json
from nltk.tokenize import RegexpTokenizer, sent_tokenize
from nltk.stem import PorterStemmer
from nltk import WordNetLemmatizer
from nltk import ngrams
from nltk.corpus import stopwords
import matplotlib.pyplot as plt
import numpy as np
import re
import os
import string
import glob
from math import pi, l... | mdesenfants/probam | vectorizer.py | vectorizer.py | py | 4,730 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "nltk.stem.PorterStemmer",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "nltk.tokenize.RegexpTokenizer",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "nltk.WordNetLemmatizer",
"line_number": 21,
"usage_type": "call"
},
{
"api_... |
16876140291 | import fitz
from PIL import Image
from dotenv import load_dotenv
load_dotenv()
from azure.cognitiveservices.vision.computervision import ComputerVisionClient
from azure.cognitiveservices.vision.computervision.models import OperationStatusCodes
from azure.cognitiveservices.vision.computervision.models import VisualFea... | navanchauhan/PaperBlog | pdf2md.py | pdf2md.py | py | 3,573 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "azure.cognitiveservices.vision.... |
7950645045 | import numpy as np
import matplotlib.pyplot as plt
# Probability distributions of phi and Y
def sample_phi_y(size):
return np.array([
np.random.uniform(low=-np.pi / 2, high=np.pi / 2, size=size),
np.random.exponential(1, size=size)
])
# Define random variable X
def X(phi, Y, alpha):
retu... | jlindermeir/TUD-StochasticProcesses | Ex02/levy_flights.py | levy_flights.py | py | 1,131 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "numpy.array",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.random.uniform",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "numpy.pi",
"line_... |
5024403789 | from typing import Iterable, Optional, Tuple, Union, Sequence
import numpy as np
from PIL import Image, ImageDraw
from utils import transformations as trans
WIDTH, HEIGHT = 1280, 1024
SCALE = 20
POINT_SIZE = 3
LINE_WEIGHT = 1
POINT_COLOR = "red"
LINE_COLOR = "grey"
FILL_COLOR = "pink"
BG_COLOR = "black"
class Draw... | byewokko/penrose | drawing/pil_draw_simple.py | pil_draw_simple.py | py | 7,055 | python | en | code | 12 | github-code | 18 | [
{
"api_name": "typing.Optional",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "PIL.Image.new",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "PIL.ImageDraw.Draw",
"lin... |
15826432356 | from flask import Flask, request, render_template
import os
import sys
src_path = os.path.join(os.path.dirname(__file__), 'src')
sys.path.insert(0, src_path)
from mlengine.models.predict import Prediction, CustomData
application = Flask(__name__)
app = application
@app.route('/')
def index():
return render_te... | badutka/ml-app | application.py | application.py | py | 1,262 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "os.path.join",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path.insert",
"line_nu... |
21118848714 | """
You are given an array of integers, where each element represents
the maximum number of steps that can be jumped going forward from
that element. Write a function to return the minimum number of jumps
you must take in order to get from the start to the end of the array.
For example,
given [6, 2, 4, 0, 5, 1, 1,... | rrwt/daily-coding-challenge | daily_problems/problem_201_to_300/245.py | 245.py | py | 1,152 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "typing.List",
"line_number": 14,
"usage_type": "name"
}
] |
27343043272 | #!/usr/bin/python3
#imports
import conf
import requests
import json
from datetime import datetime, timedelta
from dateutil import parser
import pytz
import csv
#conf
conf.load("config.json")
#constants
UP_API_ENDPOINT = "https://api.up.com.au/api/v1"
TIME_NOW = pytz.timezone(conf.get("TIMEZONE")).localize(datetime.n... | ethanbayliss/upbank-data | main.py | main.py | py | 4,960 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "conf.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pytz.timezone",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "conf.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_nu... |
33376204860 | #!/usr/bin/env python
__author__ = 'apw'
# Standard library dependencies
import os, sys
import sys
# Third-party imports
import numpy as np
import sqlalchemy
import matplotlib.pyplot as plt
from matplotlib.patches import Circle
from math import radians
# Custom modules
from spectradb.HydraDR9dbConnection import db
... | adrn/sandbox | boss_dr9_coverage.py | boss_dr9_coverage.py | py | 2,440 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "spectradb.HydraDR9dbConnection.db.Session.query",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "spectradb.HydraDR9dbConnection.db.Session",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "spectradb.HydraDR9dbConnection.db",
"line_numb... |
37833919607 | from pathlib import Path
import os
from datetime import timedelta
# from .loc_settings import *
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent.parent
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.cont... | landges/dycon | dycon_web/dycon_web/settings/base.py | base.py | py | 6,837 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "pathlib.Path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number... |
32866546698 | import pyodbc
import json
import os
import qrcode
from flask import Flask, request, send_file, jsonify
from flask_restful import Api
from io import BytesIO
app = Flask(__name__)
api = Api(app)
# LOCAL
# with open('secrets.json') as f:
# secrets = json.load(f)
# connection = pyodbc.connect(secrets['DATABASE_CONNE... | oconnorjac/Qardless-QRCodeAPI | app.py | app.py | py | 2,782 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask_restful.Api",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_n... |
28340769726 | # -*- coding: utf-8 -*-
import scrapy
from scrapy_sample.items import ImageItem
from scrapy.http import Request
from scrapy.loader import ItemLoader
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
import copy
import re
class Mzi... | csy9730/pyScrawler | code/scrapy/scrapy_sample/scrapy_sample/spiders/mzitu.py | mzitu.py | py | 5,825 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "scrapy.Spider",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "scrapy.http.Request",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "scrapy.http.Request",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "scrapy.htt... |
73484864360 | """Profile model."""
# Django
from django.db import models
# Utilities
from utils.models import GymModel
class Profile(GymModel):
"""Profile model.
A profile holds a users public data like,
picture, features and if it is active."""
user = models.OneToOneField('users.User', on_delete=models.CAS... | Julian-Bio0404/Gym-Admin | users/models/profiles.py | profiles.py | py | 1,028 | python | en | code | 2 | github-code | 18 | [
{
"api_name": "utils.models.GymModel",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.db.models.OneToOneField",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "django.db.models",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": ... |
14288774549 | import asyncio
from engine.codec.proto_importer import PlayerLoginRequest,CreateRoleRequest, SpeakOnWorldRequest
from engine.codec.Codec import CodecMgr
from engine.utils.Utils import uint_from_bytes, uint32_to_bytes
from engine.utils.Singleton import Singleton
import uuid
class ClientMessage:
__slots__ = ["msg_id... | ferris1/wind | example/python/SpeakToWorld.py | SpeakToWorld.py | py | 3,184 | python | en | code | 87 | github-code | 18 | [
{
"api_name": "engine.utils.Singleton.Singleton",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "engine.utils.Utils.uint32_to_bytes",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "engine.utils.Utils.uint32_to_bytes",
"line_number": 27,
"usage_type":... |
28391419733 | #!/usr/bin/env python
from __future__ import division
import rospy
from pidrone_pkg.msg import RC
from geometry_msgs.msg import Pose, PoseStamped
import time
import tf
import math
import numpy as np
from copy import deepcopy
import sys
#####################################################
# PID #
#########... | baichuan05/PiDrone_Language_HoloLens | scripts/archive/pid_class_secs.py | pid_class_secs.py | py | 4,285 | python | en | code | 0 | github-code | 18 | [
{
"api_name": "time.time",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "numpy.absolute",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "numpy.sign",
"line_number": 54... |
135043726 | """Functions for building a simplex centroid design."""
import dexpy.design as design
import pandas as pd
import numpy as np
import itertools
from dexpy.eval import count_n_choose_k as count_nk
def build_simplex_centroid(factor_count):
"""Builds a Simplex Centroid mixture design.
This mixture design can be u... | AI-Assistant/FEMAG-Optimizer | .venv/Lib/site-packages/dexpy/simplex_centroid.py | simplex_centroid.py | py | 1,486 | python | en | code | 1 | github-code | 18 | [
{
"api_name": "dexpy.eval.count_n_choose_k",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "dexpy.design.get_factor_names",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "dexpy.design",
"line_number": 35,
"usage_type": "name"
},
{
"api_name":... |
12512199098 | import argparse
import pickle
from pathlib import Path
import data
import models
import models.networks as networks
import torch
class BaseOptions():
def __init__(self):
self.initialized = False
def initialize(self, parser):
# experiment specifics
parser.add_argument('--name', type=s... | naoto0804/SynShadow | src/options/base_options.py | base_options.py | py | 8,134 | python | en | code | 69 | github-code | 18 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 89,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentDefaultsHelpFormatter",
"line_number": 90,
"usage_type": "attribute"
},
{
"api_name": "models.get_option_setter",
"line_number": 98,
"usage_type": "call"
... |
13880720382 | import os
from typing import Union
import datetime
import json
from dateutil.relativedelta import relativedelta
from enum_keys import *
class TiempoEn_Años_Meses_Dias():
def __init__(self, _años:int=0, _meses:int=0, _dias:int=0):
self.años = _años
self.meses = _meses
self.dias = _di... | gonzalo-lb/Calculadora-de-libertades | libcalc_methods.py | libcalc_methods.py | py | 49,626 | python | es | code | 0 | github-code | 18 | [
{
"api_name": "datetime.datetime",
"line_number": 103,
"usage_type": "attribute"
},
{
"api_name": "dateutil.relativedelta.relativedelta",
"line_number": 128,
"usage_type": "call"
},
{
"api_name": "dateutil.relativedelta.relativedelta",
"line_number": 143,
"usage_type": "c... |
26430772981 | import torch
import torch.nn as nn
import json
from processor import PreTrainData
class NextSentencePrediction(nn.Module):
def __init__(self, hidden_size):
super(NextSentencePrediction, self).__init__()
self.pooler = nn.Sequential(
nn.Linear(hidden_size, hidden_size),
nn.T... | Ginga1892/bert-x | pretrain.py | pretrain.py | py | 6,757 | python | en | code | 0 | github-code | 18 | [
{
"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.Sequential",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_... |
8734788214 | import numpy as np
import os
from scipy import signal
from scipy.io import wavfile
def get_silence_average(path):
path = path + os.sep + 'silence' + os.sep + '3e7124ba_nohash_0.wav'
samplerate, test_sound = wavfile.read(path)
print(test_sound)
# referred from: https://www.kaggle.com/davids1992/data-visualizatio... | sdhayalk/TensorFlow_Speech_Recognition_Challenge | data_preprocessing.py | data_preprocessing.py | py | 4,131 | python | en | code | 24 | github-code | 18 | [
{
"api_name": "os.sep",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "scipy.io.wavfile.read",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "scipy.io.wavfile",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "scipy.signal.spectrog... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.