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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2234908431 | import datetime
import pytest
from model_bakery import baker
from rest_framework import status
from uuid import UUID
from unittest.mock import Mock
from usaspending_api.common.exceptions import InvalidParameterException
from usaspending_api.recipient.v2.views import recipients
# Getting relative dates as the 'latest... | fedspendingtransparency/usaspending-api | usaspending_api/recipient/tests/integration/test_recipient.py | test_recipient.py | py | 28,214 | python | en | code | 265 | github-code | 97 | [
{
"api_name": "datetime.datetime.now",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "datetime.timedelta",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datet... |
8027097131 | import os
from dataclasses import dataclass
from flask import Flask, render_template, send_from_directory
from sqlalchemy import func, select
from src.jinja_helper import today
from src.database import get_db, init_app
from src.views import auth, books, members
from src.models import Book, Issued, Member
app = Flas... | rv-ragul/libraryman | src/__init__.py | __init__.py | py | 1,622 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "src.database.init_app",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "src.database.get_db",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "dataclasses.dat... |
41185325643 | import numpy as np
import cv2 as cv
class FrameWrapper:
def __init__(self,line_down,line_middle,line_up,frameWidth) -> None:
#using hight of lines position and width of frame to create point to plot lines on a screen
self.line_down = np.array([[0, line_down],[frameWidth, line_down]], np.int32)
... | DeadArcadiy/BagCounter | framewrapper.py | framewrapper.py | py | 1,262 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.array",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.int32",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.int32",
"line_number"... |
74902105277 |
from unittest.mock import patch, MagicMock
import pytest
from aiohttp.test_utils import AioHTTPTestCase, unittest_run_loop
from aiohttp import web
from main import get_app, post_to_slack
hub_payload = """{
"callback_url": "https://registry.hub.docker.com/u/svendowideit/testhook/hook/2141b5bi5i5b02bec211i4eeih024... | kouki-dan/hub2slack | test_main.py | test_main.py | py | 2,530 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "aiohttp.test_utils.AioHTTPTestCase",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "main.get_app",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "aiohttp.test_utils.unittest_run_loop",
"line_number": 48,
"usage_type": "name"
},
{
... |
30844960267 | #!/usr/bin/env python
from pprint import pprint
import copy
import os
import re
import numpy as np
from matplotlib import pyplot as plt
from coffea import hist
from bucoffea.plot.util import (acc_from_dir, merge_datasets, merge_extensions,
scale_xs_lumi)
from bucoffea.helpers.paths imp... | bu-cms/bucoffea | bucoffea/plot/studies/gen/lhe_v_pt/plot_lhe_v_pt.py | plot_lhe_v_pt.py | py | 4,884 | python | en | code | 8 | github-code | 97 | [
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "uproot.open",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "bucoffea.helpers.paths.bucoffea_path",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "uproot.... |
74612488317 | import sqlite3
try:
con=sqlite3.connect("C:\\Users\\Balarubinan\\PycharmProjects\\SocialMediaApp\\src\\storeDB.db")
cur=con.cursor()
# con.row_factory=sqlite3.Row
except:
print("DB connect error!")
def add_comment(post_id,comment,username):
try:
cur.execute(f"insert into Comment values('{p... | Balarubinan/Y_Social_media_app | src/databaseOperations.py | databaseOperations.py | py | 4,010 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "sqlite3.connect",
"line_number": 4,
"usage_type": "call"
}
] |
9141459176 | import shutil
import tempfile
from django.contrib.auth import get_user_model
from django.core.files.uploadedfile import SimpleUploadedFile
from django.test import Client, TestCase, override_settings
from django.urls import reverse
from ..models import Group, Post
MEDIA_ROOT = tempfile.mkdtemp()
User = get_user_model... | skanavy/hw04_tests | yatube/posts/tests/test_forms.py | test_forms.py | py | 2,848 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tempfile.mkdtemp",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.core.files.uploadedfile.SimpleUploadedFile",
"line_number": 24,
"usage_type": ... |
24353003033 | # -*- coding: utf-8 -*-
#!/usr/bin/env python3
'''
Created on Sat Sep 15 19:31:52 CST 2018
@Mail: minnglee@163.com
@Author: Ming Li
'''
import sys,os,logging,click,re
logging.basicConfig(filename='{0}.log'.format(os.path.basename(__file__).replace('.py','')),
format='%(asctime)s: %(name)s: %(level... | minglibio/Script | GenomeStrip/SoftmaskedToBed.py | SoftmaskedToBed.py | py | 1,498 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "logging.basicConfig",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "logging.DEBUG",
... |
9732285402 | import pandas
import numpy as np
from sklearn.cross_validation import KFold
from sklearn.ensemble import RandomForestRegressor
from sklearn.grid_search import GridSearchCV
def main():
data = pandas.read_csv('abalone.csv')
data['Sex'] = data['Sex'].map(lambda x:
1 if x == 'M' ... | Vladimir1994/MachineLearning | AbaloneRandomForestRegression/main.py | main.py | py | 894 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sklearn.cross_validation.K... |
13080324002 | '''
This is the code for the Yo-Yo
Simulated Model written by
Rohan Deswal, 20202UMP1071, MPAE, NSUT Delhi
based on the work of Koichi Hashimoto and Toshiro Noritsugu
of Okayama University.
'''
import numpy as np
import scipy as sp
import matplotlib.pyplot as plt
m = 1 # mass of the Yo-Yo
r = 0.1 # radius of the Yo-Y... | rohan-deswal/yoyo-math-model | code/yoyo.py | yoyo.py | py | 2,026 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.pi",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "numpy.arange",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number":... |
15580794678 | #<---------Solucion a los problemas propuestos en el notebook--------------->
#<------------------01 escalares vectores matrices tensores.ipynb-------------->
import numpy as np
#<--------------Crear un escalar 42-------------->
a=42
print("Esto es un escalar con valor 42\n",a)
#<------------Crear el vector con los ele... | giovannilopez9808/TCQ | Algebra_lineal/Soluciones/01/01.py | 01.py | py | 1,459 | python | es | code | 1 | github-code | 97 | [
{
"api_name": "numpy.array",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.yticks",
"li... |
18568749838 | import pandas as pd
import dash
import dash_html_components as html
import dash_core_components as dcc
from dash.dependencies import Input, Output, State
import plotly.graph_objects as go
import plotly.express as px
from dash import no_update
app = dash.Dash(__name__)
# REVIEW1: Clear the layout and do not display ex... | craigtrupp/Online_Data_Python | Coursera/DataAnalyst_Cert/DataViz_Section8/Dash_AutoBoard.py | Dash_AutoBoard.py | py | 3,115 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "dash.Dash",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "dash_html_components.Div",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "dash_html_componen... |
70990653439 | """Snooper is a data processor created for the purpose of downloading JSON data from supported
WeedMaps APIs to be converted into Pandas DataFrames and stored in multiple different formats.
1. Objects
1. data_dir
os.path data directory used for saving / exporting data from snooper.
2... | commoder/Snooper | src/snooper.py | snooper.py | py | 9,937 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.path.dirname",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "os.path.path.abspath",... |
3129301154 | from datetime import datetime
from datetime import timedelta
from config import app
from models.shift import Shift
from utils import date_convertor, shifts_db
class Employee:
def __init__(self, employee_no):
self.employee_no = employee_no
self.first_name = app.redis.get('first_name')
self... | DJJ547/CMPE272_Project | backend/models/employee.py | employee.py | py | 3,961 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "config.app.redis.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "config.app.redis",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "config.app",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "config.app.redi... |
40049860539 | """Module logs for customized logger creation.
Author: Jan Jakub Kubik (xkubik32)
Date: 12.3.2023
"""
import logging
from typing import Callable, Union
import structlog
def _create(
name: str, get_logger_func: Callable, logging_options=logging
) -> Union[logging.Logger, structlog.BoundLogger]:
"""Create a ... | Jakub-Kubik/smasf | base/logs.py | logs.py | py | 1,586 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.Callable",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "logging.setLoggerClass",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "typing.Union",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "logging.Logger",
... |
71998300798 | """
@File : loss.py
@Author : CodeCat
@Time : 2021/7/28 上午9:57
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
# 二分类
class FocalLoss(nn.Module):
def __init__(self, gamma=2, alpha=0.5):
super(FocalLoss, self).__init__()
self.gamma = gamma
self.alpha = alpha
def ... | codecat0/Crack_Attention_Network | utils/loss.py | loss.py | py | 1,696 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "torch.nn.Module",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "torch.softmax",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "torch.log",
"line_num... |
31438124097 | from django.urls import reverse
from core.tests.base import UserBaseTestCase
class SimpleViewsTestCase(UserBaseTestCase):
def test_renders_main_view_redirect_code(self):
response = self.client.get(reverse('main'))
self.assertEqual(302, response.status_code)
def test_renders_main_view_redire... | hossamelneily/nexchange | core/tests/test_views.py | test_views.py | py | 766 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "core.tests.base.UserBaseTestCase",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.urls.reverse",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.reverse",
"line_number": 14,
"usage_type": "call"
}
] |
29398525743 | import argparse
import logging
import multiprocessing as mp
import os
import os.path
import random
import signal
import sys
import time
from copy import deepcopy
import cherrypy
import cherrypy_cors
from cherrypy.lib import auth_digest
from sflib import SpiderFoot
from sfscan import startSpiderFootScanner
from sfwebu... | smicallef/spiderfoot | sf.py | sf.py | py | 23,857 | python | en | code | 10,704 | github-code | 97 | [
{
"api_name": "spiderfoot.SpiderFootHelpers.usernamesFromWordlists",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "spiderfoot.SpiderFootHelpers",
"line_number": 51,
"usage_type": "name"
},
{
"api_name": "spiderfoot.SpiderFootHelpers.dataPath",
"line_number": 52,
... |
8900620790 | import pandas as pd
import glob
import os
import re
import datetime
import matplotlib.pyplot as plt
from tqdm import tqdm
import copy
import numpy as np
os.chdir("D:\\[山口]研究\\YJFX\\2018_USDJPY")
pickle_file = sorted(glob.glob( "*.pickle"))
month = "feb"
if month == "feb":
file = sorted(glob.glob( "USD_JPY_20180... | kanaria0710/program | create_price_basec_features.py | create_price_basec_features.py | py | 6,295 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.chdir",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 20,
"... |
6471908556 | import random
from random_word import RandomWords
class Hangman:
def fill10(word1,word2):
for i in range(len(word1)):
rand = random.randint(1,2)
if rand == 1:
word2 = word2[:i] + word1[i] + word2[i+1:]
return word2
def __init__(self,word:str):
fla... | nishalahmedpk/cookiecutterswithpython | Hangman/main.py | main.py | py | 1,276 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "random.randint",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "random_word.RandomWords",
"line_number": 34,
"usage_type": "call"
}
] |
19858532201 | import scipy.misc
import tensorflow as tf
import numpy as np
import math
import json
import random
from skimage.transform import resize
import RPN
import utils
def load_image_gt(dataset, config, image_id):
image_id = int(image_id)
image = dataset.load_image(image_id) #
old_shape = 416
print(image)
... | datnguyenzzz/faster-rcnn-handgun-detection | display_data.py | display_data.py | py | 7,357 | python | en | code | 5 | github-code | 97 | [
{
"api_name": "skimage.transform.resize",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.full",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.ones",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "numpy.int32",
"lin... |
14630595215 | #
import json
import openpyxl
import re
################################################################
# INPUT
YEAR = 2023
filename = "../CERT-Officer-Dienstplan_{}.xlsx".format(YEAR)
################################################################
sheetname_regex = '{}-0[1-9]|1[012]'.format(YEAR)
vacations = {}
... | telekom-security/officerscript | helper/vacation_excel2json.py | vacation_excel2json.py | py | 1,572 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "re.match",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 50,
"usage_type": "call"
}
] |
8924731308 | import cv2
import numpy as np
from utils.object_detection import ObjectDetection
from utils.video_recorder import VideoRecorder
from utils.frame_rate import FrameRate
fish_name = 'flowerhorn'
objectDetection = ObjectDetection(model='rfcn_resnet101_{}'.format(fish_name),
labels='{}_l... | nearkyh/smart-aqua-system | fish7_detector.py | fish7_detector.py | py | 1,127 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "utils.object_detection.ObjectDetection",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "utils.video_recorder.VideoRecorder",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 21,
"usage_type": "call"
},... |
39420524280 | from __future__ import annotations
from asyncio import (
AbstractEventLoop,
AbstractEventLoopPolicy,
CancelledError,
Future,
InvalidStateError,
Queue as AQueue,
ensure_future,
gather,
get_event_loop,
new_event_loop,
)
from dataclasses import dataclass
from functools import parti... | digital-asset/dazl-client | python/dazl/util/asyncio_util.py | asyncio_util.py | py | 25,509 | python | en | code | 10 | github-code | 97 | [
{
"api_name": "typing.TypeVar",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "typing.TypeVar",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "typing.TypeVar",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "inspect.iscoroutinefunct... |
35109594758 | from mpl_toolkits.axes_grid1 import make_axes_locatable
import numpy as np
from myterial import grey_dark
import matplotlib.patheffects as path_effects
from matplotlib.artist import Artist
from fcutils.plot.elements import plot_mean_and_error
from analysis.ephys.utils import get_frate_per_bin
def raster_histo(ax, X... | BrancoLab/LocomotionControl | analysis/ephys/viz.py | viz.py | py | 5,900 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "numpy.ndarray",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "numpy.histogram",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "mpl_toolkits.axes_grid1.make_axes_locatable",
"line_number": 24,
"usage_type": "call"
},
{
"ap... |
15704190353 | import numpy as np
import torch
import torch.nn as nn
from torch.distributions import Normal, Categorical
import torch.nn.functional as F
torch.autograd.set_detect_anomaly(True)
class MLP(nn.Module):
def __init__(self, sizes, activation_func=nn.Tanh):
super(MLP, self).__init__()
layers = []
... | yijerjer/reinforcement_learning | mini_project/algorithms/mlp.py | mlp.py | py | 2,293 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "torch.autograd.set_detect_anomaly",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "torch.autograd",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Module",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name... |
12378016066 | # Import the functions we need from flask
from flask import Flask
from flask import render_template
from flask import jsonify
from flask import request
from datetime import datetime
import math
from sklearn.preprocessing import StandardScaler
from tensorflow.keras.models import load_model
import joblib
from joblib ... | ggdecapia/Home-Pricing-Predictor | app.py | app.py | py | 6,442 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.models.load_model",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "sklearn.pr... |
39225431944 | from datetime import datetime
from pathlib import Path
import requests as req
import locale
import logging
locale.setlocale(locale.LC_ALL, 'es_ES.utf8')
logger = logging.getLogger(__name__)
class csv_download:
def __init__(self, url, file_name):
"""Inicializador de la clase
Args:
url:... | RichardDDiaz/culture-data | csv_download.py | csv_download.py | py | 2,428 | python | es | code | 2 | github-code | 97 | [
{
"api_name": "locale.setlocale",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "locale.LC_ALL",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.... |
15551952493 | from typing import List, Optional
from . import bootloader
from .base import Nitrokey3Base
from .device import Nitrokey3Device
VID_NITROKEY = 0x20A0
PID_NITROKEY3_DEVICE = 0x42B2
PID_NITROKEY3_LPC55_BOOTLOADER = 0x42DD
PID_NITROKEY3_NRF52_BOOTLOADER = 0x42E8
def list() -> List[Nitrokey3Base]:
devices: List[Nitr... | Nitrokey/pynitrokey | pynitrokey/nk3/__init__.py | __init__.py | py | 787 | python | en | code | 81 | github-code | 97 | [
{
"api_name": "typing.List",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "base.Nitrokey3Base",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "device.Nitrokey3Device.list",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "device.Nit... |
9732366102 | import numpy as np
from sklearn.decomposition import PCA
def main():
features = np.loadtxt('close_prices.csv', delimiter=',',
usecols=range(1, 31), skiprows=1)
pca = PCA(n_components=10)
pca_features = pca.fit_transform(features)
sum = 0
cnt = 0
while sum < 0.9:
... | Vladimir1994/MachineLearning | SharesPca/main.py | main.py | py | 790 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.loadtxt",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sklearn.decomposition.PCA",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.corrcoef",
... |
44159712398 | import cv2 as cv
import numpy as np
def main():
img = cv.imread("E.png")
img = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
rows, cols = img.shape
for y in range(rows):
for x in range(cols):
if img[y, x] > 100:
img[y, x] = 255
else:
i... | breno-abreu/ProjectsPDI | Trabalho Final/main.py | main.py | py | 7,760 | python | pt | code | 0 | github-code | 97 | [
{
"api_name": "cv2.imread",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "numpy.where",
"line_... |
11554599044 |
import sys
import YDR_aux as aux
import YDR_gene as drv
import YDR_land as lnd
from datetime import datetime
import MoNeT_MGDrivE as monet
from joblib import Parallel, delayed
if monet.isNotebook():
(USR, SET, DRV, AOI) = ('dsk', 'homing', 'CRS', 'HLT')
(OVW, JOB) = (True, aux.JOB_DSK)
else:
(USR, SET, D... | Chipdelmal/MoNeT_DA | PAN/YDR/YDR_preProcess.py | YDR_preProcess.py | py | 2,372 | python | de | code | 0 | github-code | 97 | [
{
"api_name": "MoNeT_MGDrivE.isNotebook",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "YDR_aux.JOB_DSK",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "YDR_aux.J... |
15287902092 | import sys
import math
import matplotlib.pyplot as plt
def get_histogram(filename):
histro=[0]*256
file=open(filename,'rb')
data=bytearray(file.read())
for d in data:
histro[d]+=1
return histro
def entrophy_cal(histro):
entropy=0
prob=sum(histro)
for h in histro:
if h!=... | EC97B0EAB79C/K15_Analysis-of-Binary-Programs | K15-FileHistogram/FileHistogram/FileHistogram.py | FileHistogram.py | py | 3,215 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "math.log2",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.clf",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.b... |
32232887319 | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('tasks/', views.get_tasks, name='get_tasks'),
path('tasks/add/', views.add_task, name='add_task'),
path('about/', views.about, name='about'),
path('tasks/<int:id>/edit', views.edit_task, name... | lysnikolaou/django-todo | skasys_ha/todo/urls.py | urls.py | py | 409 | python | en | code | 0 | github-code | 97 | [
{
"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",
... |
540770647 | import sys
from io import StringIO
from typing import Optional, List
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def hasPathSum(self, root: Optional[TreeNode], targetSum: int) -> bool:
sta... | wf9a5m75/leetcode | path-sum/solution.py | solution.py | py | 1,377 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.Optional",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 31,
"usage_type": "name"
}
] |
4476466556 | import numpy as np
import xmltodict
import pprint
import json
from tqdm import tqdm
from pathlib import Path
from matplotlib import pyplot as plt
import pandas as pd
import cv2
from pprint import pprint
from utils import visualize_annotation, get_objects_from_annotations, get_bbox_from_obj
import imagesize
if __name... | abdleysan/voc_visualizer | test.py | test.py | py | 3,891 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pathlib.Path",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "imagesize.get",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "utils.get_objects_from_annota... |
74032837119 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.http import JsonResponse
from django.template.loader import render_to_string
import tempfile
from django.shortcuts import redirect, render
from django.views.generic.edit import UpdateView
from django.views.generic.list import ListView
from dj... | AsaK/santamariadrivers | base/views.py | views.py | py | 2,995 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.views.generic.list.ListView",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "models.Motorista",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "models.Motorista.objects.all",
"line_number": 25,
"usage_type": "call"
},
{
"... |
189090839 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Date : 2020/8/7
# @Author : zhangranghan
from common.LinearServiceAPI import t
from tool.get_test_data import case_data
from schema import Schema,And,Or,Regex,SchemaError
from pprint import pprint
import pytest,allure,random,time
@allure.epic('正向永续')
@allure.f... | wenyan808/auto-test | testCase/SchemaTestCase/LinearSchemaCheck/test_linear_financial_record_exact.py | test_linear_financial_record_exact.py | py | 1,246 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "common.LinearServiceAPI.t.linear_financial_record_exact",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "common.LinearServiceAPI.t",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "pprint.pprint",
"line_number": 32,
"usage_type": "call"... |
3563182046 | # -*- coding: utf-8 -*-
"""
Slack chat-bot Lambda handler.
"""
from niallbot import *
from slacker import *
from google_play_reporter import GooglePlayReporter
from config import *
import logging
def lambda_handler(event, context):
# Disable googleapiclient warnings
logging.getLogger('googleapiclient.disco... | kafejo/Niallbot | lambda_function.py | lambda_function.py | py | 939 | python | en | code | 6 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.ERROR",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "google_play_reporter.GooglePlayReporter",
"line_number": 29,
"usage_type": "call"
},
{
"api_... |
963342741 | import json
import ecdsa
class Transaction:
def __init__(self, sender_address, sender_private_key, recipient_address, amount):
self.sender_address = sender_address
self.sender_private_key = sender_private_key
self.recipient_address = recipient_address
self.amount = amount
def t... | lmtrarbach/blockchain-python | src/wallet/transaction.py | transaction.py | py | 908 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "ecdsa.SigningKey.from_pem",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "ecdsa.SigningKey",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "json.dumps",
"line_number": 22,
"usage_type": "call"
}
] |
4322004149 |
import os, sys, re, io, base64, json
import requests, bs4
import PIL, PIL.Image, PIL.ImageOps, PIL.ImageEnhance
def getday(day):
"""Load the webpage collecting Curiosity Front Hazard Cam
images for Sol day, and yield a sequence of URLs for (left,right) pairs.
Before loading, see if the webpage is availabl... | spen0203/PythonGroundUp | Jupyter Notebooks/Chapter 3 - Exploiting Python Libraries/Serve Web Pages With Jinja2 and Flask/stereo.py | stereo.py | py | 2,447 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "os.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number"... |
43527129349 | import time
starttime=time.time()
from threading import Thread
import os
import json
import sys
from traceback import print_exc
dirname, filename = os.path.split(os.path.abspath(__file__))
sys.path.append(dirname)
import threading,win32gui
from tts.windowstts import tts
from PyQt5.QtCore import QCoreApplication... | madlaxcb/LunaTranslator | LunaTranslator/LunaTranslator.py | LunaTranslator.py | py | 8,137 | python | en | code | null | github-code | 97 | [
{
"api_name": "time.time",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "os.path.split",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number"... |
24328214634 | import os
from glob import glob
import pandas as pd
import numpy as np
from scipy import signal, stats
from math import sqrt
data_path = "/Volumes/LV_HD_2/Accelerometry/training_sessions_IMU/"
acc_files = [os.path.basename(x) for x in glob(data_path + "*.csv")]
acc_files = sorted(acc_files)
# Initialize an empty dict... | verasls/BaSEIB_exercise_bone_health | code/scripts/08_analyze_training_sessions.py | 08_analyze_training_sessions.py | py | 1,849 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.basename",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "glob.glob",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_numb... |
15051313858 | import pandas as pd
from collections import Counter
import sys
from glob import iglob
import string
import re
def main(n=10):
filenames = iglob(input("Enter filename (wildcard * accepted): "))
tags = count_hashtags(merge_files(filenames))
hashtag_col_len = max(len('hashtag'), *map(len, [x for x, y in tags.... | mosho-p/data_cleaning | top_tags.py | top_tags.py | py | 2,421 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "glob.iglob",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.read_json",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "re.split",
"line_n... |
26333071684 | import argparse
from typing import Dict
import graphviz as gv
import robot_server.service.session.session_types
from robot_server.robot.calibration.check.session import (
CalibrationCheckState,
CHECK_TRANSITIONS,
)
from robot_server.robot.calibration.tip_length.constants import TipCalibrationState
from robot_s... | Opentrons/opentrons | robot-server/scripts/plot_session.py | plot_session.py | py | 8,139 | python | en | code | 363 | github-code | 97 | [
{
"api_name": "graphviz.Digraph",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "robot_server.robot.calibration.check.session.CalibrationCheckState",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "robot_server.robot.calibration.check.session.CalibrationCheck... |
37831178098 | from collections import UserDict
from typing import List
class Abundances(UserDict):
"""
Dict-like class to store the abundances
Usage:
>>> Abundances.from_3abunds_as_lines(
... '''# initial abundances, n(X)/n(H), 'frc(1:nfrc)
... 15 ! "Low" metals
... G0 1.000D-0... | rfranceschi/diskchef | diskchef/chemistry/abundances.py | abundances.py | py | 1,402 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "collections.UserDict",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 33,
"usage_type": "name"
}
] |
20309303526 | from decimal import Decimal
import datetime
from dateutil.relativedelta import relativedelta
from django.contrib.auth.models import User
from django.core import validators
from django.core.exceptions import ValidationError
from django.db import models
from django.db.models import F, Q, Sum, Max, Min
from django.utils ... | mgeorge8/django_time | timepiece/entries/models.py | models.py | py | 11,810 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "django.db.models.query",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "django.db.models.Sum",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "dat... |
8932655997 | from typing import List
import numpy
from collatable.collator import Collator
from collatable.extras.indexer import LabelIndexer, TokenIndexer
from collatable.fields import LabelField, MetadataField, TextField
from collatable.instance import Instance
def test_instance() -> None:
dataset = [
("this is aw... | altescy/collatable | tests/test_instance.py | test_instance.py | py | 1,438 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "collatable.extras.indexer.TokenIndexer",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "collatable.extras.indexer.LabelIndexer",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 22,
"usage_type": "name"
},
... |
34977184884 | from requests_html import HTMLSession
from dotenv import load_dotenv
import os
import requests
import schedule
import time
s = HTMLSession()
load_dotenv() #Load .env variable
def send_msg(text):
token = os.getenv("TOKEN")
chat_id = os.getenv("CHAT_ID")
url_req = "https://api.telegram.org/bot" + token + ... | polimaurizio/Weather-Telegram-Msg-Bot | main.py | main.py | py | 1,201 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests_html.HTMLSession",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "dotenv.load_dotenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.getenv",
... |
13974740973 | import logging
from typing import *
import pandas as pd
import yaml
logging.basicConfig(level=logging.INFO)
def load_config(file_name: str) -> dict:
"""
Load the configuration file and store it as a dictionary.
:returns: The configuration settings as a dictionary.
"""
with open(fil... | squeakerdev/yaml_helpers | helpers.py | helpers.py | py | 1,854 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.basicConfig",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "yaml.safe_load",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "yaml.safe_load",
... |
24885660651 | from .common import Extractor, Message
from .. import text, exception
from ..cache import cache
import hashlib
import time
class MangoxoExtractor(Extractor):
"""Base class for mangoxo extractors"""
category = "mangoxo"
root = "https://www.mangoxo.com"
cookiedomain = "www.mangoxo.com"
cookienames =... | prodbydaniel245/gallery-dl | gallery_dl/extractor/mangoxo.py | mangoxo.py | py | 6,211 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "common.Extractor",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "cache.cache",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "hashlib.md5",
"line_number"... |
29247888387 | """
开闭和礼帽运算
"""
import cv2
import cv2 as cv
import numpy as np
import random
# 开运算 先侵蚀后膨胀
def my_opening():
element = cv.getStructuringElement(cv.MORPH_CROSS, (3, 3), (1, 1))
img_opening = cv.morphologyEx(img_bgr, cv.MORPH_OPEN, element)
img_show = cv2.hconcat([img_bgr, img_opening])
cv.imshow("img... | LittleSheepy/MyMLStudy | ml06pyPackeg/pk02opencv/cv02官网教程470/cv3ImageProcessing/cv1Basic/cv5MoreMorphologyTransformations.py | cv5MoreMorphologyTransformations.py | py | 3,371 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "cv2.getStructuringElement",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.MORPH_CROSS",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "cv2.morphologyEx",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.M... |
20639899150 | from flask import Flask, request, jsonify, redirect, session, url_for, send_file
from flask_pymongo import PyMongo, ObjectId
from flask_jwt_extended import JWTManager, jwt_required, create_access_token, create_refresh_token, get_jwt_identity, jwt_refresh_token_required
from flask_cors import CORS, cross_origin
import j... | kaisucode/soundsocial-backend | app.py | app.py | py | 8,649 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "google.cloud.storage.Client",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "google.clo... |
15281698911 | import sys
sys.path.insert(1, "/home/ubuntu/cust2vec")
import h5py
import pandas as pd
import boto3
import pickle
import io
from pyspark.ml.feature import VectorAssembler
from pyspark.sql import SparkSession
from utils.logging_framework import log
from src.models.kmeans import *
if __name__ == "__main__":
task... | richjdowney/cust2vec | runners/cust_seg_runner.py | cust_seg_runner.py | py | 3,630 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.path.insert",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number... |
24980835539 | #!/usr/bin/env python
import os
import sys
import numpy as np
import argparse
from kaffe import KaffeError, print_stderr
from kaffe.tensorflow import TensorFlowTransformer
def fatal_error(msg):
print_stderr(msg)
exit(-1)
def validate_arguments(args):
if (args.data_output_path is not None) and (args.caf... | maples1993/UserGuide_caffe | convert.py | convert.py | py | 2,569 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "kaffe.print_stderr",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "kaffe.tensorflow.TensorFlowTransformer",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "kaffe.print_stderr",
"line_number": 28,
"usage_type": "call"
},
{
"api_... |
8468356618 | import os
import time
import tornado.ioloop
import tornado.web
import tornado.websocket
port = int(os.getenv('PORT', 80))
WIDTH = 80
HEIGHT = 45
mx = [['#000000' for j in range(HEIGHT)] for i in range(WIDTH)]
PRD = 3600 # seconds
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write(op... | mrKuznetsov698/gyver-ars-matrix | main.py | main.py | py | 1,861 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.getenv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "tornado.ioloop.web",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "tornado.ioloop",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "tornado.ioloop.web",
... |
9231697999 | # -*- coding: utf-8 -*-
"""
Created on Mon Jul 15 15:57:18 2019
@author: RayKMAllen
"""
import tensorflow as tf
import numpy as np
from models import LeNet
from matplotlib import pyplot as plt
import pickle
from common_functions import get_data, get_generator, setup_sess, run_training
np.set_printoptio... | RayKMAllen/Headpose | numcomponents.py | numcomponents.py | py | 2,744 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.set_printoptions",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "common_functions.get_data",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.ra... |
27171824446 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
import pytest
import docopt
from pymorphy2 import cli
def run_pymorphy2(args=(), stdin=None):
cli.main(args)
def test_show_usage():
with pytest.raises(docopt.DocoptExit) as e:
run_pymorphy2([])
assert 'Usage:' in str... | pymorphy2/pymorphy2 | tests/test_cli.py | test_cli.py | py | 1,258 | python | en | code | 1,077 | github-code | 97 | [
{
"api_name": "pymorphy2.cli.main",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pymorphy2.cli",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "pytest.raises",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "docopt.DocoptExit",
... |
3121640030 | #CS496 Mobile and Web development HW3
# Cord Meados 2017
#-----------------------------------
#Slip Class and handler for main.py
#-----------------------------------
# [START imports]
from google.appengine.ext import ndb
import webapp2
import json
#slips
class Slip(ndb.Model):
number = ndb.IntegerProperty(require... | Meadosc/CS496-REST | slip.py | slip.py | py | 4,077 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "google.appengine.ext.ndb.Model",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "google.appengine.ext.ndb",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "google.appengine.ext.ndb.IntegerProperty",
"line_number": 16,
"usage_type": ... |
122357285 | from django.urls import path
from . import views
app_name='storemenu'
urlpatterns = [
path('', views.index,name='index'),
path('create/', views.create,name='create'),
path('update/<int:id>', views.update,name='update'),
path('delete/<int:id>', views.delete,name='delete'),
path('userindex/', views.us... | gary1209/syoku | storemenu/urls.py | urls.py | py | 454 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"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",
... |
32302792352 | import logging
import argparse
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
from torch.autograd import Variable
import copy
import numpy as np
import os
from torch.utils.data import DataLoader
from torch.utils.data.sampler import SubsetRandomSampler
#import matplotlib.... | druckmann-lab/QuadraticNets | TwoLayerNetworks/varyHidden.py | varyHidden.py | py | 9,509 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "torch.FloatTensor",
"line_number": 71,
"usage_type": "attribute"
},
{
"api_name": "torch.cuda",
"line_number": 74,
"usage_type": "attribute"
},
{
"api_name": "torchv... |
9167813154 | #!/usr/bin/env python
"""Example demonstrating collision detection and shortest distance queries."""
import time
import numpy as np
import pybullet as pyb
import pybullet_data
import pyb_utils
TIMESTEP = 1.0 / 60
def load_environment(client_id):
pyb.setTimeStep(TIMESTEP, physicsClientId=client_id)
pyb.set... | adamheins/pyb_utils | examples/collision_detection_example.py | collision_detection_example.py | py | 4,964 | python | en | code | 39 | github-code | 97 | [
{
"api_name": "pybullet.setTimeStep",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pybullet.setAdditionalSearchPath",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pybullet_data.getDataPath",
"line_number": 18,
"usage_type": "call"
},
{
"a... |
74334886400 | import base64
import math
from .varint import get_varint, pop_varint
from cardcodedb import carddb as cdb
import binascii
CARDCODE_LENGTH = 7
MAX_KNOWN_VERSION = 4
FORMAT = 1
INITIAL_VERSION = 1
faction_library_version = {
"DE" : 1,
"FR" : 1,
"IO" : 1,
"NX" : 1,
"PZ" : 1,
"SI" : 1,
"BW" : ... | cutecryptid/lor-deck-experiments | deckcoder/deckcoder.py | deckcoder.py | py | 7,551 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "base64.b32encode",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "base64.b32decode",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "binascii.Error",
"lin... |
39226583313 | import itertools
import pymaid
import navis
import scipy.spatial
import networkx as nx
import numpy as np
from .. import utils
# This is to prevent FutureWarning from numpy (via vispy)
import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)
use_pbars = utils.use_pbars
def collapse_nodes(A, ... | navis-org/fafbseg-py | fafbseg/move/merge_utils.py | merge_utils.py | py | 15,284 | python | en | code | 11 | github-code | 97 | [
{
"api_name": "warnings.simplefilter",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "navis.NeuronList",
"line_number": 54,
"usage_type": "attribute"
},
{
"api_name": "navis.stitch_neurons",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "navi... |
12525048822 | from __future__ import annotations
import copy
import logging
from typing import Any, ClassVar, Dict, List, Optional, TYPE_CHECKING, Union
import numpy as np
import pandas as pd
from flask_babel import _
from pandas import DateOffset
from typing_extensions import TypedDict
from superset import app
from superset.anno... | odissei-data/odissei-stack | distros/Superset/superset/common/query_context_processor.py | query_context_processor.py | py | 18,615 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "superset.app.config",
"line_number": 49,
"usage_type": "attribute"
},
{
"api_name": "superset.app",
"line_number": 49,
"usage_type": "name"
},
{
"api_name": "superset.s... |
36393523730 | from django.shortcuts import render
import requests
def home(request):
city = request.GET.get("city", 'lucknow')
url = f'https://api.openweathermap.org/data/2.5/weather?q={city}&appid=32dc91f6865a372a8ed4750bc583369c'
data = requests.get(url).json()
payload ={
'city': data['name'],
... | osamakhan786/The-Mosam | api/views.py | views.py | py | 783 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 21,
"usage_type": "call"
}
] |
40614365108 | from __future__ import division
import pytest
from ethereum.tester import TransactionFailed
def test_flawed_fund(chain, accounts, web3):
# Deploy the Fund Contract
balance = 100000000000000000
contract = chain.get_contract(
'FundFlawed',
deploy_transaction={'from': accounts[0], 'value': b... | LefterisJP/merkleweek | tests/test_fund.py | test_fund.py | py | 2,707 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "pytest.raises",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "ethereum.tester.TransactionFailed",
"line_number": 44,
"usage_type": "argument"
}
] |
389272493 | # -*- coding: utf-8 -*- 2-4 [ Iris data for descriptive statistics with matplotlib ] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import pandas as pd
import numpy as np
from scipy import stats
import statistics as stat
from matplotlib import pyplot
df_iris = pd.read_csv('../Cust_Data Preprocessing.csv', hea... | mesotops/bigData_classText | U2/U2_code/code2-4.py | code2-4.py | py | 710 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.hist",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "matplotlib.py... |
70881234878 | from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import today
from functools import partial, reduce
import operator
from toolz import merge, pluck, get, compose, first, flip, groupby, excepts, keyfilter
from optic_store.utils.helpers import generate_intervals
from optic_stor... | f-9t9it/optic_store | optic_store/optic_store/report/item_consumption/item_consumption.py | item_consumption.py | py | 5,988 | python | en | code | 23 | github-code | 97 | [
{
"api_name": "functools.partial",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "toolz.keyfilter",
"line_number": 18,
"usage_type": "argument"
},
{
"api_name": "frappe.throw",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "frappe._",
"li... |
27163068450 | from django.shortcuts import render
# Create your views here.
# Source: https://opensource.com/life/15/2/resize-images-python
import os
from PIL import Image
import time
start_time = time.time()
# scale by setting a height
# baseheight = 300
# for file in os.listdir("images/"):
# img = Image.open(f"images/{file}... | cgpalmer/pdf_rename | home/views.py | views.py | py | 1,958 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "time.time",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 24,... |
15234836501 | import streamlit as st
from streamlit_option_menu import option_menu
from streamlit_extras.app_logo import add_logo
from streamlit_extras.add_vertical_space import add_vertical_space
from streamlit_extras.colored_header import colored_header
st.set_page_config(
page_title="AI Buddy Guard",
layout= "wide",
... | gpsandhu23/ai_buddy_guard | ai_buddy_guard/web_app/pages/999_Settings.py | 999_Settings.py | py | 2,663 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "streamlit.set_page_config",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "streamlit_extras.app_logo.add_logo",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "streamlit_extras.colored_header.colored_header",
"line_number": 15,
"usage_ty... |
1134394462 | import core
import logging
logging = logging.getLogger(__name__)
def add(data, type_='success'):
''' Adds notification to core.NOTIFICATIONS
data (dict): notification information
type_ (str): style of notification, see javascript docs for available styles <optional - default 'success'>
Merges sup... | nosmokingbandit/Watcher3 | core/notification.py | notification.py | py | 2,402 | python | en | code | 280 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "logging.debug",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "core.NOTIFICATIONS",
... |
7665676843 | from django.shortcuts import render
from rest_framework.views import APIView
from articles import serializers
from articles.models import Article
from articles.serializers import ArticleSerializer
from rest_framework.response import Response
from rest_framework.generics import get_object_or_404
class ArticleList(AP... | nhkmi1001/morningquiz | articles/views.py | views.py | py | 1,018 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "articles.models.Article.objects.all",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "articles.models.Article.objects",
"line_number": 14,
"usage_type": "attr... |
27600718043 | from django.db import models
# Create your models here.
class Setting(models.Model):
top_bg = models.FileField(
upload_to="bg/"
)
footer_bg = models.FileField(
upload_to="bg/"
)
email_bg = models.FileField(
upload_to="bg/"
)
gallery_bg = models.FileField(
upl... | bezbak/pamirkg | settings/models.py | models.py | py | 2,930 | python | en | code | 0 | github-code | 97 | [
{
"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.FileField",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "... |
24273295676 | """
Utility code used to retrieve a result set of YouTube videos via YouTube's API given a query term.
The result set - stored as DataFrame - does not contain the actual videos but the most important metadata about them.
Which metadata is stored is defined by param 'videoData_template'.
"""
import googleapiclient.d... | MaxiNeis/thesis_dataset_gen | utils/videos.py | videos.py | py | 6,504 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "googleapiclient.discovery.discovery.build",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "googleapiclient.discovery.discovery",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "googleapiclient.discovery",
"line_number": 22,
"usage_... |
8022360040 | import ctypes
import os
import sys
import functools
import itertools
import inspect
import threading
from .base import _LIB, check_call
_np_ufunc_default_kwargs = {
'where': True,
'casting': 'same_kind',
'order': 'K',
'dtype': None,
'subok': True,
}
def makedirs(d):
"""Create directories re... | mlcommons/training_results_v0.7 | Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/python/mxnet/util.py | util.py | py | 30,006 | python | en | code | 58 | github-code | 97 | [
{
"api_name": "sys.version_info",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "distutils.dir_util.mkpath",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.makedirs",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "ctypes.c_... |
1090837988 | """empty message
Revision ID: faeb7823b522
Revises: 54a08d2bcfd7
Create Date: 2023-09-11 16:44:23.578397
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'faeb7823b522'
down_revision = '54a08d2bcfd7'
branch_labels = None
depends_on = None
def upgrade() -> None... | StickerStack/backend | migrations/versions/faeb7823b522_.py | faeb7823b522_.py | py | 841 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "alembic.op.add_column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integer... |
72895833918 | import datetime
import pytest
from markers import require_spotify_api_auth, require_youtube_api_key
from obapi.export import (EPUBPandocWriter, MarkdownPandocWriter,
export_sequence)
from obapi.models import ContentItem, Sequence
@pytest.fixture
def simple_sequence():
now = datetime.da... | chris-mcdo/django-overcomingbias-api | tests/test_export.py | test_export.py | py | 2,319 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "datetime.datetime.now",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "datetime.timezone",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "o... |
42012123999 | from collections import deque
n, m = map(int, input().split())
graph=[]
for _ in range(n):
graph.append(list(input()))
def bfs():
q = deque()
q.append([1, 0, 0, 0]) # dist, r, c, 벽
visited=set()
visited.add((0, 0, 0))
while q:
dist, r, c, wall_cnt = q.popleft()
if r==n-1 a... | afterssafy6/afterssafy6 | 3주차/BOJ_2206_벽_부수고_이동하기/BOJ_2206_벽_부수고_이동하기_최정민.py | BOJ_2206_벽_부수고_이동하기_최정민.py | py | 947 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "collections.deque",
"line_number": 11,
"usage_type": "call"
}
] |
26143857036 | import matplotlib.pyplot as plt
import numpy as np
from scipy import integrate
def electric_field(theta, R, z):
"""
Returns electric field function to integrate in cgs
units and with sigma = 1.
"""
num = (z - R * np.cos(theta)) * (2 * np.pi * R * np.sin(theta)) * R
den = (z**2 + R**2 - 2 * z * ... | pwndr3/PHYS512 | assignments/hw1/prob4.py | prob4.py | py | 1,845 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.cos",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "numpy.sin",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.cos",
"line_number": 11,
... |
43642675609 | import sys
from collections import deque
sentence = list(sys.stdin.readline().strip())
# sentence = [i for i in '< space >space space space< spa c e>']
final = ''
tag = deque() #deque
word = [] #stack
add_tag = False
for i in sentence:
if i == "<":
tag.append(i)
while word:
... | JYC11/data-structures-and-algos | baekjun/reverse_words2.py | reverse_words2.py | py | 1,071 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.stdin.readline",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 7,
"usage_type": "call"
}
] |
69806536640 | from django.urls import path
from . import views
app_name = 'product'
urlpatterns = [
path('<int:pk>/', views.ProdeuctDetailView.as_view(), name='detail'),
# path('<int:pk>/', views.ProductDetailFormView.as_view(), name='detail'),
path('<int:pk>/add_to_cart', views.add_to_cart, name='add_to_cart'),
pat... | YasiucheniaAndrey/djangoProject | product/urls.py | urls.py | py | 362 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
}
] |
23951055202 | import os
import torch
import torch.distributed as dist
import torch.multiprocessing as mp
def init_gpu_env(process_id, cfg):
"""
Handle single and multi-GPU / multi-node.
"""
assert cfg.worker_count != 0
if cfg.worker_count >= 1 and cfg.gpu_count >= 1:
cfg.n_gpu = cfg.gpu_count * cfg.work... | alibaba/EasyNLP | examples/mell/utils/distribution_utils.py | distribution_utils.py | py | 1,897 | python | en | code | 1,835 | github-code | 97 | [
{
"api_name": "torch.cuda.device_count",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.environ",
... |
37734066399 | import cv2
import imageio
import numpy as np
import matplotlib.pyplot as plt
import os
from time import sleep
os.system('cls')
def get_images_from_video(video_name, time_F):
video_images = []
vc = cv2.VideoCapture(video_name)
c = 1
if vc.isOpened():
rval, video_frame = vc.read... | shinakami/work_git | anime.py | anime.py | py | 1,790 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "os.system",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "cv2.resize",
"line_number": ... |
39034248265 | from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
import io
from os import path
import sys
import click
click.disable_unicode_literals_warning = True
from itertools import chain
import scanengine_config
# hack to be able to load testxx utilities. T... | SmartsYoung/FenixscanX | scanengine/etc/scripts/buildlictests.py | buildlictests.py | py | 4,025 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "click.disable_unicode_literals_warning",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "scan... |
27368619460 | """
author:Sanidhya Mangal
github:sanidhyamangal
"""
from typing import Any
from gensim.models import Word2Vec
from dataloader import gensim_dataloader
import gensim # for other ops
import argparse # for parsing the options
import os # for os ops
def train_model(args) -> None:
"""Function to train word2vec mod... | sanidhyamangal/word2vec-negsampling | gensim_model.py | gensim_model.py | py | 2,690 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "dataloader.gensim_dataloader",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "gensim.models.Word2Vec",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path.split",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.... |
15833259283 | from typing import Any, Dict, Iterable
from odd_collector_sdk.domain.adapter import AbstractAdapter
from odd_models.models import DataEntityList
from oddrn_generator.generators import DmsGenerator
from odd_collector_aws.domain.fetch_paginator import fetch_paginator
from odd_collector_aws.domain.paginator_config impor... | opendatadiscovery/odd-collector-aws | odd_collector_aws/adapters/dms/adapter.py | adapter.py | py | 2,474 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "odd_collector_sdk.domain.adapter.AbstractAdapter",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "odd_collector_aws.domain.plugin.DmsPlugin",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "client.DMSClient",
"line_number": 19,
"usage_t... |
18474524553 | from setuptools import setup
from pathlib import Path
BASE = Path(__file__).parent
LONG_DESCRIPTIONS = (BASE / "README.md").read_text()
setup(
name="ChromaticColorBurst",
version='1.0.3',
description="You can now print styled TEXT to console/terminal without much of a hassel",
long_description=LONG_DES... | sachin-acharya-projects/ColorBurst | setup.py | setup.py | py | 913 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pathlib.Path",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
}
] |
26709381164 | import os
import asyncio
import discord
from dotenv import load_dotenv
import praw
from prettytable import PrettyTable
reddit = praw.Reddit("scraper",user_agent="scraper")
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
GUILD = os.getenv('DISCORD_GUILD')
CHANNELS = [int(i) for i in os.getenv('ALL_CHANNELS').split(',... | realjacoblinder/pickbot-discord-bot | learning_loops.py | learning_loops.py | py | 1,037 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "praw.Reddit",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "dotenv.load_dotenv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number"... |
26798003217 | from matplotlib import pyplot as plt
import matplotlib
with open(
'/data/vision/torralba/ganprojects/placesgan/tracer/metrics/patch_fid.txt'
) as f:
results = {
k: (float(v1), float(v2))
for k, v1, v2 in [l.strip().split(" ") for l in f.readlines()]
}
font = {'family' : 'normal',
... | davidbau/rewriting | metrics/patch_metrics/plot_patch_fids.py | plot_patch_fids.py | py | 1,263 | python | en | code | 535 | github-code | 97 | [
{
"api_name": "matplotlib.rc",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "matplotlib... |
4711553770 | import logging
from flask_cors import CORS, cross_origin
from flask import Flask, jsonify, request, session, send_from_directory, send_file, Blueprint
from data_service import hardware, user, project, dataset
from passlib.hash import pbkdf2_sha256
from bson import ObjectId, json_util
import io
import os
import shutil
... | sohaibi/EE461L-Project | modules/dataset_module.py | dataset_module.py | py | 1,527 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Blueprint",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "data_service.... |
42560803380 | # encoding=utf8
import numpy as np
import matplotlib.pyplot as plt
import random
class Perceptron:
def __init__(self):
self.datas,self.lables=self.load_data()
self.num_samples,self.num_features=self.datas.shape
self.w=np.ones((self.num_features,1))
def calculate_error(self,vector):
... | Tveek/ML_CLASS | pla.py | pla.py | py | 3,619 | python | zh | code | 0 | github-code | 97 | [
{
"api_name": "numpy.ones",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.sign",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.dot",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.sign",
"line_number": 45,
... |
17921882879 | import requests
from bs4 import BeautifulSoup
import csv
URL = "https://movie.naver.com/movie/running/current.nhn"
response = requests.get(URL)
soup = BeautifulSoup(response.text, 'html.parser')
soup1 = soup.select('div[id=wrap] > div[id=container] > div[id=content] > div[class=article] > div[class=obj_section] > di... | cmin427/web | 5_movie/movie.py | movie.py | py | 2,353 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_numb... |
41012242929 | from modelos import Times
from tinydb import TinyDB, Query
import pandas as pd
bdtime = TinyDB("Times.json")
time = Query()
def inserir_time(model: Times):
bdtime.insert({"id":model.id,
"turma":model.turma,
"nome_time":model.nome_time })
def mostrarTodos_times() -> object:
todos = bdtime.all... | Pythonators/API_semestre1_pythonators | Website/connectTime.py | connectTime.py | py | 782 | python | pt | code | 5 | github-code | 97 | [
{
"api_name": "tinydb.TinyDB",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "tinydb.Query",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "modelos.Times",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "modelos.Times",
"line_numbe... |
9146137088 | import os as os
import pickle as pickle
import copy as copy
import pandas as pd
import numpy as np
import plotly.graph_objects as go
def compute_runtime(runtimes, alternatives, objectives, data):
"""
Function computes average, min, max, median and std of runtimes.
Does not modify runtimes.
Other functi... | KemalAltwlkany/articulation | src/ResultProcessing/performance_measures.py | performance_measures.py | py | 13,722 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.average",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.min",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.max",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.median",
"line_number": 1... |
33353183467 | from django.contrib import admin
from django.urls import path
from . import views
app_name = 'board'
urlpatterns = [
path("board_list_dong/<str:category_name>", views.board_list_dong, name="board_list_dong"),
path("board_list_complaint/<str:category_name>", views.board_list_complaint, name="board_list_compla... | hakgu-tpu/DB_ICPBL | board/urls.py | urls.py | py | 913 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
20367181649 | from app.models import Order, Product, ConfigValues, Voucher, OrderItem, User, OrderItem, SubscriptionType, UserSubscription, OrderProducts, Order_Item_With_Product, Variation, ProductSkeleton
from app.api.v1 import api_v1
from app.helpers import Messages, Responses
from app.helpers.utility import res, parse_int, get_p... | RoadRunner11/Adaya | app/api/v1/user/order_api.py | order_api.py | py | 11,014 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.request.json",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "app.models.Order",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "app.models.Ord... |
797348181 | import sys
from PyQt5.QtSql import QSqlDatabase, QSqlTableModel
from PyQt5.QtWidgets import QWidget, QApplication
from addEditCoffeeForm import AddEdit_Form
from coffeeInfoTable import CoffeeTable_Form
class EditCoffeeTable(QWidget, AddEdit_Form):
def __init__(self, parent, model):
super().__init__()
... | kpmcp/coffee_project | main.py | main.py | py | 1,708 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "addEditCoffeeForm.AddEdit_Form",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtSql.QSqlTableModel.OnManualSubmit",
"line_number": 20,
"usage_type": "attrib... |
5678985324 | """Manages API or the molecular lines calcultion."""
from ctypes import c_char_p, c_double, c_int, CDLL
from glob import glob
from pathlib import Path
from numpy import zeros
from numpy.ctypeslib import ndpointer
library = glob(str(Path(__file__).parent / "libabsorption*.so"))[0]
library = CDLL(library)
def check... | GRIPS-code/pyLBL | pyLBL/c_lib/gas_optics.py | gas_optics.py | py | 2,746 | python | en | code | 6 | github-code | 97 | [
{
"api_name": "glob.glob",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "ctypes.CDLL",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 6... |
70199416638 | from params import STATE_PPO_PARAMS as SPP
from params import STATE_PPO_TRAINER_PARAMS as SPTP
from params import STATE_PPO_TESTER_PARAMS as SPTEP
from params import VISUAL_PPO_TRAINER_PARAMS as VPTP
from params import VISUAL_PPO_TESTER_PARAMS as VPTEP
from models.actor import StateActor, VisualActor
from models.critic... | jullian-yapeter/rl_game | tasks/ppo.py | ppo.py | py | 19,879 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.arange",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "utils.model_utils.shuffled_indices",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "numpy.arr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.