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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
22353446265 | from typing import List, Tuple, Union
import lightgbm as lgb
import numpy as np
import pandas as pd
import mlrun.errors
from .._ml_common import AlgorithmFunctionality, MLTypes, MLUtils
class LGBMTypes(MLTypes):
"""
Typing hints for the LightGBM framework.
"""
# A union of all LightGBM model base ... | mlrun/mlrun | mlrun/frameworks/lgbm/utils.py | utils.py | py | 7,707 | python | en | code | 1,129 | github-code | 36 | [
{
"api_name": "_ml_common.MLTypes",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "lightgbm.LGBMModel",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "lightgbm.Boos... |
36081264181 | import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import fsolve
a = 2
#b = 1
def plotter(b):
func = lambda x : a - b*x - np.exp(-x)
guess = a/b
max_x = fsolve(func, guess)
x = np.arange(0.0, max_x*1.05, 0.01)
y1 = a - b*x
y2 = np.exp(-x)
y3 = y1 - y2
null = 0*x
plt.figure()
plt.fill_bet... | chrberrig/SEIR_age_diff | programming/sir_dynsys.py | sir_dynsys.py | py | 1,555 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.exp",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "scipy.optimize.fsolve",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line_num... |
28299898397 | from torch.utils.data import Dataset, DataLoader
from torchvision import transforms
import os
import random
import matplotlib.pyplot as plt
from PIL import Image
import torch
from torchvision.models import resnet18, ResNet18_Weights
import torch.nn as nn
import numpy as np
class Mydata(Dataset):
def __init__(self... | kienptitit/Dog_Cat_Classification | train.py | train.py | py | 6,096 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "PIL.Image.fromarray",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyp... |
3763224892 | import cv2 as cv
import pandas as pd
df = pd.read_csv("Set03_video01.csv")
cam = cv.VideoCapture("Set03_video01.h264")
frame = 0
# initBB = (int(df.iloc[0]['x']),int(df.iloc[0]['y']),int(df.iloc[0]['w']),int(df.iloc[0]['h']))
# tracker = cv.TrackerCSRT_create()
# tracking = False
# while True:
# _ret, img = cam.re... | aaravpandya/optic_flow | tracker.py | tracker.py | py | 2,532 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pandas.read_csv",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.selectROI",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "cv2.TrackerCSRT_create",... |
36391585173 | from .method import get_json_ret, json_response_zh
class AuthMiddleware(object):
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request, *args, **kwargs):
if "application/json" in request.headers.get("Content-Type"):
import json
r... | CryptoCompetition2019-RNG/AuthServer | AuthServer/middleware.py | middleware.py | py | 1,435 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "json.loads",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "method.json_response_zh",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "method.get_json_ret",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "Crypto.Util.nu... |
32751323841 | from raspberry_pi.adapter import Adapter
from raspberry_pi.human_sensor import HumanSensor
from raspberry_pi.humidity_sensor import HumiditySensor
from raspberry_pi.target import Target
from raspberry_pi.temperature_sensor import TemperatureSensor
import json
# 根据不同的key,获取需要被适配的类
def get_adaptee_class(key):
adapte... | qihonggang/leetcode | python_code/raspberry_pi/main.py | main.py | py | 902 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "raspberry_pi.target.Target",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "raspberry_pi.temperature_sensor.TemperatureSensor",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "raspberry_pi.humidity_sensor.HumiditySensor",
"line_number": 13,... |
26610403483 | import pandas as pd
from simulation_model.create_params_grid import default_params, path_experiment_table
from utilities.small_functions import mkDir_if_not
import os
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
from simulation_model.gather_results import bilinear_name
def get_results_expe... | paolamalsot/optirank | simulation_model/plot_results.py | plot_results.py | py | 5,116 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "utilities.small_functions.mkDir_if_not",
"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": "nump... |
18914948323 | import pytest
from src.guess_number_higher_or_lower import Solution
@pytest.mark.parametrize(
"n,pick,expected",
[
(10, 6, 6),
(1, 1, 1),
(2, 1, 1),
],
)
def test_solution(n, pick, expected, monkeypatch):
monkeypatch.setenv("SECRET", str(pick))
assert Solution().guessNumbe... | lancelote/leetcode | tests/test_guess_number_higher_or_lower.py | test_guess_number_higher_or_lower.py | py | 337 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "src.guess_number_higher_or_lower.Solution",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pytest.mark.parametrize",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pytest.mark",
"line_number": 6,
"usage_type": "attribute"
}
] |
4654671965 | #!/usr/bin/env python3
import argparse
import os
import subprocess
import sys
from utilities import functional_annotation
from utilities import toGFF3
from utilities import clustering
from utilities import mapping
from utilities import mergeAll_to_gff
def main():
parser = argparse.ArgumentParser()
parser.add_ar... | compgenomics2019/Team1-FunctionalAnnotation | FA_pipeline_final.py | FA_pipeline_final.py | py | 5,822 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
... |
72692461223 | #!/usr/bin/env python3
import asyncio
import unittest
from click.testing import CliRunner
from base_cli import _handle_debug, async_main, main
class TestCLI(unittest.TestCase):
def test_async_main(self) -> None:
self.assertEqual(0, asyncio.run(async_main(True)))
def test_debug_output(self) -> None... | cooperlees/base_clis | py/tests.py | tests.py | py | 597 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "unittest.TestCase",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "asyncio.run",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "base_cli.async_main",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "base_cli._hand... |
24682883982 |
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
from selenium.common import NoSuchElementException
from pages.utils import write_file
class BasePage:
def __init__(self,... | Flibustyer/TicketsBoard | pages/base.py | base.py | py | 3,434 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "selenium.webdriver.support.wait.WebDriverWait",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.support.expected_conditions.visibility_of_element_located",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.sup... |
43763780283 | # -*-coding:utf8-*-
################################################################################
#
#
#
################################################################################
"""
模块用法说明:达人推荐详情页
Authors: Turinblueice
Date: 2016/9/10
"""
from base import base_frame_view
from util import log
from gui_wid... | turinblueice/androidUIAutoTest | activities/discover_details_activities/talent_recommend_activity.py | talent_recommend_activity.py | py | 9,563 | python | en | code | 5 | github-code | 36 | [
{
"api_name": "base.base_frame_view.BaseFrameView",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "base.base_frame_view",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "gui_widgets.basic_widgets.recycler_view.RecyclerView",
"line_number": 54,
"u... |
11687518350 | import numpy as np
import matplotlib
#matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
from skimage import data, img_as_float
from skimage.metrics import structural_similarity as ssim
from skimage.metrics import mean_squared_error
from skimage.transform import rescale, resize, downscale_local_mean
from skimage... | aditi741997/robotics_project | plot_nav2d_mapQuality.py | plot_nav2d_mapQuality.py | py | 2,399 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "skimage.io.imread",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "skimage.io",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "skimage.io.imread",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "skimage.io",
"line... |
9480946225 | import random
from collections import defaultdict
import torch
from ltp import LTP
from .base_func import BaseFunc
class NerFunc(BaseFunc):
def __init__(self, config):
super(NerFunc, self).__init__(config)
self.augment_num = config.ner_func.augment_num
self.combine_dict = self.load_ner_f... | shawn0wang/Text_Augment | function/ner_func.py | ner_func.py | py | 1,703 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "base_func.BaseFunc",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "ltp.LTP",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"... |
10392845560 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Python version: 3.6
import os
import copy
import time
import pickle
import numpy as np
from tqdm import tqdm
import yaml
import argparse
import torch
from tensorboardX import SummaryWriter
# from src.options import args_parser
from update import LocalUpdate
from utils i... | gongzhimin/Trojan-Attack-Against-Structural-Data-in-Federated-Learning | src/federated_main_nonattack.py | federated_main_nonattack.py | py | 4,103 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "time.time",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "tensorboardX.SummaryWriter",
... |
12210284781 | import openpyxl
from openpyxl.utils import cell
def read(config):
try:
workbook = openpyxl.load_workbook(config.source_path, data_only=True)
datasets = {}
for source_tab_name in config.source_tabs:
datasets[source_tab_name] = extract_dataset(workbook, source_tab_name, config)
... | mcweglowski/codegens | codegen/excel/excel_reader.py | excel_reader.py | py | 1,239 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "openpyxl.utils.cell.column_index_from_string",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "openpyxl.utils.cell",
"line_number": 22,
"usage_type": "name"
}
] |
3184473921 | # -*- coding: utf-8 -*-
import yaml
from . import instructions
from . import value_containers
from .exceptions import ParserException
from .method import Method
def _process_func(method, func):
if not func or not isinstance(func, dict):
raise ParserException('"func" not defined')
method.function_nam... | lukleh/Tiny-Stackbased-Virtual-Machine-in-Python | TSBVMIP/code_parser.py | code_parser.py | py | 4,024 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "exceptions.ParserException",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "method.function_name",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "method.return_type",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_... |
73192051625 | import argparse
import os
from distutils.util import strtobool
import random
import time
import numpy as np
import torch
import gym
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.tensorboard import SummaryWriter
import torch.optim as optim
from stable_baselines3.common.buffers import ReplayBuff... | ChufanSuki/cfrl | examples/c51.py | c51.py | py | 12,157 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "distutils.util.... |
417669106 | from array import *
import os
from PIL import Image
Buttons=[0x300fd40bf,0x300fdc03f,0x300fd20df,0x300fda05f,0x300fd609f,0x300fde01f,0x300fd10ef,0x300fd906f,0x300fd50af,0x300fd30cf,0x300fdb24d,0x300fd728d,0x300fdf20d,0x300fd8877,0x300fd48b7]
ButtonsNames=["One","Two","Three","Four","Five","Six","Seven","Eight","Nine",... | Rakibuz/Robotics_HCI | Raspberry Pi/hypothetical_final_0.1.py | hypothetical_final_0.1.py | py | 4,522 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "PIL.Image.open",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 78,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 78... |
9416483162 | # Cemantix game solver
import logging
import os
import yaml
from src import *
os.chdir(os.path.abspath(os.path.dirname(__file__)))
with open("config.yaml", "r") as config_file:
config = yaml.load(config_file, Loader=yaml.FullLoader)
logging.basicConfig(filename=f"./logs/cemantix_{dt.datetime.now().strftime(format... | CorentinMary/cemantix | main.py | main.py | py | 922 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.chdir",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number... |
12530669262 | import torch
from torch import nn
from .strategy import Strategy
from .utils import ner_predict, re_predict
class EntropySampling(Strategy):
def __init__(self, annotator_config_name, pool_size, setting: str='knn', engine: str='gpt-35-turbo-0301',
reduction: str='mean'):
super().__init__(an... | ridiculouz/LLMaAA | src/active_learning/entropy_sampling.py | entropy_sampling.py | py | 1,745 | python | en | code | 5 | github-code | 36 | [
{
"api_name": "strategy.Strategy",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "torch.nn.Module",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "utils.ner_predict",
... |
23971763808 | from replit import db
from util import str_to_arr
from person import Person
def matches_to_string(matches):
string = "List of matches:\n"
for match in matches:
string += match + "\n"
return string
async def make_connections(message, person_calling):
matches = []
person_1 = Person.str_to_person(db[f"{person_ca... | Sharjeeliv/monty-bot | connect.py | connect.py | py | 1,083 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "person.Person.str_to_person",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "person.Person",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "replit.db",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "util.str_to_arr",... |
40222438483 | import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
'''
Ideje kako poboljšati kod:
1. Kreirati novu klasu satelit koja je pod gravitacijskim utjecajem ostalih planeta ali ona ne utječe na njih
2. Ta klasa ima metodu boost koja ju odjednom ubrza
3. Pogledati i proba... | MatejVe/Solar-System-Simulation | Solar system for testing new code.py | Solar system for testing new code.py | py | 12,798 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.linalg.norm",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "numpy.linalg.norm",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
... |
43552704116 | import os
from bot.misc.util import download, calculate_hash
from bot.functions import lessonsToday
from bot.database.main import filesDB
import hashlib
import datetime
files = filesDB()
def filesCheck(urls) -> list:
done = []
filesHash = []
for name, url in urls.items():
h = files.get(name)
... | i3sey/EljurTelegramBot | bot/functions/files.py | files.py | py | 651 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "bot.database.main.filesDB",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "bot.misc.util.download",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "bot.misc.util.calculate_hash",
"line_number": 19,
"usage_type": "call"
},
{
"api_... |
43372121821 | import cv2
import numpy as np
video_path = '/Users/bigphess/Desktop/omnidirection/res/rabbit_250fps.mp4'
cap = cv2.VideoCapture(0)
cap2 = cv2.VideoCapture(video_path)
while True:
ret, frame = cap2.read()
# image = cv2.imread('/Users/bigphess/Downloads/IMG_6453.JPG')
debug = frame
if cv2.waitKey(100) & 0xFF ==... | Bigphess/Notes | OpenCV/polor.py | polor.py | py | 703 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.waitKey",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "cv2.imwrite",
"line_n... |
2532407157 | import re
import sys
import numpy as np
import pandas as pd
from sklearn.base import TransformerMixin
from sklearn.compose import ColumnTransformer
from sklearn.feature_extraction.text import HashingVectorizer
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import OneHotEncoder
class Preprocess... | kernc/Containersec | lib.py | lib.py | py | 3,012 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sklearn.base.TransformerMixin",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "sys.stderr",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "pandas.DataFrame",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "s... |
32409336010 | import time
from torch import optim
from torch.utils.data import DataLoader
from torchvision import datasets, transforms
from ..models import *
from ..utils import AverageMeter, calculate_accuracy, Logger, MyDataset
from visdom import Visdom
DatasetsList = ['CIFAR10', 'CIFAR100']
ModelList = {'AlexNet': Ale... | jimmy0087/model_zoo_torch | modelzoo/libs/train/train.py | train.py | py | 13,106 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "visdom.Visdom",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "torchvision.datasets.CIFAR10",
"line_number": 72,
"usage_type": "call"
},
{
"api_name": "torchvision.datasets",
"line_number": 72,
"usage_type": "name"
},
{
"api_name": "torch... |
957425679 | from flask import render_template, flash, redirect, url_for, request, current_app
from flask_login import login_required, current_user
from apps.app import db
from apps.model import Task, Kind
from apps.todolist import todolist
from apps.todolist.course import AddCategory, AddToDoList, ChangeToDoList
# User View Tas... | INversionNan/Flask | apps/todolist/base.py | base.py | py | 8,802 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "apps.todolist.course.AddToDoList",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 15,
"usage_type": "attribute"
},
{
"a... |
20822639893 | import json
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.metrics import euclidean_distances
import numpy as np
from sklearn.linear_model import LogisticRegression
def load():
with open('C:/Users/Administrator/Desktop/backend-interview-1/samples/generated_test_cases.txt', 'r',
... | Qt7mira/LenovoIVProblem | mira/part3.py | part3.py | py | 4,656 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "json.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sklearn.feature_extraction.text.CountVectorizer",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": ... |
31563331171 | import requests
from bs4 import BeautifulSoup
url = input("Entrer l'URL du site : ")
response = requests.get(url)
if response.status_code == 200:
html_content = response.content
else:
print("Erreur lors de la récupération de la page.")
soup = BeautifulSoup(html_content, "html.parser")
# Extraire le titre de... | Lenked/ScrappingApp | main.py | main.py | py | 690 | python | fr | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 12,
"usage_type": "call"
}
] |
899076815 | import sqlite3
import os
import bamnostic_mod as bn
import argparse
import bisect
import time
#Downloads\Lung\47b982b3-c7ce-4ca7-8c86-c71c15979620\G28588.NCI-H1915.1.bam
#Downloads\Lung\98a0206b-29f5-42d3-957b-6480e2fde185\G20483.HCC-15.2.bam
#Downloads\Lung\18004fb1-89a2-4ba1-a321-a0aa854e98c3\G25210.NCI-H510.1.bam
#... | InSilicoSolutions/Splicer | Splicer/splicerSampleProcessor.py | splicerSampleProcessor.py | py | 12,134 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_... |
800426611 | import mtcnn
from mtcnn.mtcnn import MTCNN
import cv2
detector = MTCNN() # MTCNN is CNN based algorithm
video = cv2.VideoCapture(0)
video.set(3,2000)
video.set(4,3000) # Same as previous technique
while (True):
ret, frame = video.read()
if ret == True:
location = detector.detect_faces... | Sagar-Khode/Face-Detection | MTCNN.py | MTCNN.py | py | 1,089 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "mtcnn.mtcnn.MTCNN",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.rectangle",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line... |
71656882025 | # Based on https://github.com/NATSpeech/NATSpeech
import utils.commons.single_thread_env # NOQA
import json
import numpy as np
import os
import random
import traceback
from functools import partial
from resemblyzer import VoiceEncoder
from tqdm import tqdm
from utils.audio.align import get_mel2note
from utils.audio.... | jisang93/VISinger | preprocessor/base_binarizer.py | base_binarizer.py | py | 16,910 | python | en | code | 13 | github-code | 36 | [
{
"api_name": "numpy.seterr",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "utils.commons.hparams.hparams",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "utils.commons.hparams.hparams",
"line_number": 34,
"usage_type": "name"
},
{
"api_name... |
6800272551 | import yaml
from populate.populator.common.errors import ConfigurationError
from .projects_manager import ProjectsManager
def project_constructor(loader, node):
if isinstance(node, yaml.ScalarNode):
item = loader.construct_scalar(node)
if not isinstance(item, str) or not item:
raise... | tomasgarzon/exo-services | service-exo-projects/populator/projects/project_loader.py | project_loader.py | py | 715 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "yaml.ScalarNode",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "populate.populator.common.errors.ConfigurationError",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "yaml.MappingNode",
"line_number": 15,
"usage_type": "attribute"
... |
36837923429 | from __future__ import annotations
from dataclasses import dataclass
import bson.json_util as json
__all__ = ['Node', 'build_execution_tree']
@dataclass
class Node:
"""Represent SBE tree node."""
stage: str
plan_node_id: int
total_execution_time: int
n_returned: int
n_processed: int
chil... | mongodb/mongo | buildscripts/cost_model/execution_tree.py | execution_tree.py | py | 5,185 | python | en | code | 24,670 | github-code | 36 | [
{
"api_name": "dataclasses.dataclass",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "bson.json_util.dumps",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "bson.json_util",
"line_number": 62,
"usage_type": "name"
}
] |
830016519 | #!/usr/bin/env python
import gzip
import sys
import tarfile
import threading
import urllib.request
import zipfile
import lib.download.task as task
import lib.independence.fs as fs
import lib.ui.color as printer
# The greater purpose of (functions in) this file is
# to download a list of DownloadTasks
class Download... | Sebastiaan-Alvarez-Rodriguez/Meizodon | lib/download/downloader.py | downloader.py | py | 3,963 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "lib.independence.fs.join",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "lib.independence.fs",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "lib.download.task.directory",
"line_number": 41,
"usage_type": "attribute"
},
{
"api... |
10496867860 | import tensorflow as tf
from model.model_builder import ModelBuilder
from utils.model_post_processing import merge_post_process
from tensorflow.keras.models import Model
from tensorflow.python.framework.convert_to_constants import convert_variables_to_constants_v2
from utils.priors import *
import argparse
pa... | chansoopark98/Tensorflow-Keras-Object-Detection | convert_frozen_graph.py | convert_frozen_graph.py | py | 5,426 | python | en | code | 6 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "tensorflow.config.set_soft_device_placement",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "tensorflow.config",
"line_number": 41,
"usage_type": "attribute"
},
... |
23716751711 | import json
from PIL import Image
import os
def main(json_file_path):
json_file = open (json_file_path)
json_string = json_file.read()
json_data = json.loads(json_string)
image = json_data[0]
#for image in json_data:
image_file_path = image['image_path']
image_to_crop = Image.open(image_f... | Larbohell/datasyn | crop_image.py | crop_image.py | py | 1,446 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "json.loads",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "PIL.Image.open",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 14,
"usage_type": "name"
}
] |
22347170498 | import os
from logging import (
CRITICAL,
DEBUG,
ERROR,
getLogger,
INFO,
Logger,
WARNING,
)
from pathlib import Path
from rich.logging import RichHandler
from rich.highlighter import NullHighlighter
from .config import BodyworkConfig
from .constants import (
DEFAULT_LOG_LEVEL,
DEFA... | bodywork-ml/bodywork-core | src/bodywork/logs.py | logs.py | py | 2,348 | python | en | code | 430 | github-code | 36 | [
{
"api_name": "pathlib.Path",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "constants.DEFAULT_PROJECT_DIR",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "constants.PROJECT_CONFIG_FILENAME",
"line_number": 30,
"usage_type": "name"
},
{
"api_... |
18932441390 | #! /usr/bin/env python
# -*- coding:utf-8 -*-
"""
@author : MG
@Time : 19-4-3 下午5:28
@File : __init__.py.py
@contact : mmmaaaggg@163.com
@desc :
"""
import logging
from logging.config import dictConfig
# log settings
logging_config = dict(
version=1,
formatters={
'simple': {
'for... | IBATS/IBATS_Utils | ibats_utils/__init__.py | __init__.py | py | 1,277 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "logging.DEBUG",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "logging.config.dictConfig",
"line_number": 46,
"usage_type": "call"
}
] |
4833395496 | import os
import torch
import genova
from torch import nn, optim
import torch.distributed as dist
from torch.utils.data import DataLoader
from torch.cuda.amp import autocast, GradScaler
from torch.nn.parallel import DistributedDataParallel as DDP
from .optimal_path_inference import optimal_path_infer
from .seq_generat... | AmadeusloveIris/GraphNovo | genova/task/task.py | task.py | py | 10,916 | python | en | code | 6 | github-code | 36 | [
{
"api_name": "torch.distributed.init_process_group",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.distributed",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "os.environ",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name":... |
71300190183 | import time
import tqdm
import torch
import numpy as np
import torch.nn as nn
import torch.optim as optim
from utils import *
def prepare_sequence(seq, word2idx):
idxs = [word2idx[w] for w in seq]
return torch.tensor(idxs, dtype=torch.long)
class BiLSTM_CRF_S(nn.Module):
def __init__(self, vocab_size, l... | YaooXu/Chinese_seg_ner_pos | BiLSTM_CRF.py | BiLSTM_CRF.py | py | 20,207 | python | en | code | 5 | github-code | 36 | [
{
"api_name": "torch.tensor",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.long",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Module",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"lin... |
8755135805 | # -*- coding: utf-8 -*-
import logging
from odoo import models, fields, api, _
from odoo.exceptions import UserError, ValidationError
from odoo.tools.safe_eval import safe_eval
_logger = logging.getLogger(__name__)
class DeliveryCarrier(models.Model):
_inherit = 'delivery.carrier'
of_use_sale = fields.Boo... | odof/openfire | of_delivery/models/delivery_carrier.py | delivery_carrier.py | py | 3,214 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "odoo.models.Model",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "odoo.fields.Boole... |
4023780816 | from bs4 import BeautifulSoup
import urllib.request
import os
class Sachalayatan:
sachDS = {}
def __init__(self, BASE_URL):
self.sachDS['BASE_URL'] = BASE_URL
def getHtml(self, url=''):
if len(url) > 0:
source = urllib.request.urlopen(url).read()
soup = BeautifulSou... | kakanghosh/sachalayatan | scrapping.py | scrapping.py | py | 2,300 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "urllib.request.request.urlopen",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "urllib.request.request",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "urllib.request",
"line_number": 12,
"usage_type": "name"
},
{
"api_nam... |
14451113965 | # -*- coding: utf-8 -*-
"""
Created on Tue Sep 19 15:27:09 2017
@author: Administrator
"""
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation
from keras.optimizers import SGD
model = Sequential() #模型 初始化
model.add( Dense( 20, 64)) #添加 输入 层( 20 节点)、 第一 隐藏 层( 64 节点) 的 连接
... | golfbears/gameofclassname | keras_sample.py | keras_sample.py | py | 1,334 | python | zh | code | 0 | github-code | 36 | [
{
"api_name": "keras.models.Sequential",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "keras.layers.core.Dense",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "keras.layers.core.Activation",
"line_number": 14,
"usage_type": "call"
},
{
"api_... |
29426080346 | import requests
from bs4 import BeautifulSoup
import csv
url = "https://www.gov.uk/search/news-and-communications"
page = requests.get(url)
soup = BeautifulSoup(page.content, "html.parser")
titres_bs = soup.find_all('a')
titres = []
for titre in titres_bs:
titres.append(titre.string)
print(titres)
en_tet... | Lemak243/python_ | ecrire.py | ecrire.py | py | 512 | python | fr | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line_number": 21,
"usage_type": "call"
}
] |
12958605056 | import sys
from requests import get
from core.colors import bad, info, red, green, end
def honeypot(inp):
honey = 'https://api.shodan.io/labs/honeyscore/%s?key=C23OXE0bVMrul2YeqcL7zxb6jZ4pj2by' % inp
try:
result = get(honey).text
except:
result = None
sys.stdout.write('%s No inform... | s0md3v/ReconDog | plugins/honeypot.py | honeypot.py | py | 635 | python | en | code | 1,623 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sys.stdout.write",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "core.colors.bad",
"l... |
70388179303 | from django.contrib.auth import get_user_model
from django.core.validators import MinValueValidator, MaxValueValidator
from django.db import models
from foodgram_backend.settings import STANDARTLENGTH
User = get_user_model()
class Tag(models.Model):
name = models.CharField(
max_length=STANDARTLENGTH,
... | Gustcat/foodgram-project-react | backend/recipes/models.py | models.py | py | 4,848 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.db.models.Model",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 10,
"usage_type": "name"
},
{
"ap... |
41133436478 | from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPalette
from PyQt5.QtWidgets import *
app = QApplication([])
app.setStyle('Fusion')
window = QWidget()
palette = QPalette()
palette.setColor(QPalette.ButtonText, Qt.blue)
app.setStyleSheet("QPushButton { margin: 10ex; background-color: #4747D2 }")
app.setPalette(pal... | imdiode/PythonExper | home5.py | home5.py | py | 476 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "PyQt5.QtGui.QPalette",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtGui.QPalette.ButtonText",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtGui.QPalette",
"line_number": 9,
"usage_type": "name"
},
{
"api_n... |
16571409721 | import os
import io
import hashlib
from base64 import standard_b64encode
from six.moves.urllib.request import urlopen, Request
from six.moves.urllib.error import HTTPError
from infi.pyutils.contexts import contextmanager
from infi.pypi_manager import PyPI, DistributionNotFound
from logging import getLogger
logger = ... | Infinidat/infi.pypi_manager | src/infi/pypi_manager/mirror/mirror_all.py | mirror_all.py | py | 6,623 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "base64.standard_b64encode",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "io.BytesIO",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "six.moves.urll... |
13847534454 | from collections import namedtuple
# Define a namedtuple to represent search results
SearchResult = namedtuple(
"SearchResult", ["name", "location", "job_title", "profile_url"]
)
# Dummy data for testing
dummy_data = [
SearchResult(
name="John Smith",
location="New York, NY",
job_titl... | Kwekuasiedu315/PROJECTS | askademy/aska/web/dummy.py | dummy.py | py | 9,177 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "collections.namedtuple",
"line_number": 5,
"usage_type": "call"
}
] |
20149744558 | # from django.http import HttpResponseServerError
from rest_framework.viewsets import ViewSet
from rest_framework.response import Response
from rest_framework import serializers, status
from holdmycomicsapi.models import User
class UserView(ViewSet):
"""HMC Users View"""
def create(self, request):
"""... | SeaForeEx/HoldMyComics-Server | holdmycomicsapi/views/user.py | user.py | py | 1,451 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "rest_framework.viewsets.ViewSet",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "holdmycomicsapi.models.User.objects.create",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "holdmycomicsapi.models.User.objects",
"line_number": 13,
"usage... |
21050437162 | import unittest
import json
from app import create_app, bad_request, forbidden, not_found, unauthorized, internal_error
class APITestCase(unittest.TestCase):
def setUp(self):
self.app = create_app('testing')
self.app_context = self.app.app_context()
self.app_context.push()
self.cli... | hungvm90/flask_tdd | tests/test_health_check_api.py | test_health_check_api.py | py | 2,834 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "unittest.TestCase",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "app.create_app",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line... |
9580739784 | #!/usr/bin/python3
'''
File Storage
'''
import os
import json
import models
from models.base_model import BaseModel
from models.user import User
from models.state import State
from models.city import City
from models.amenity import Amenity
from models.place import Place
from models.review import Review
classes = {
... | Davidbukz4/AirBnB_clone | models/engine/file_storage.py | file_storage.py | py | 1,815 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "models.base_model.BaseModel",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "models.user.User",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "models.place.Place",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "model... |
42242684970 | import math
import numpy as np
import matplotlib.pyplot as plt
gap_list = [5.0e-6, 7.5e-6, 10e-6]
lam_list = np.logspace(-1.0,2.0,20)*1e-6
print(lam_list)
sens_vals_num = np.zeros((len(lam_list),len(gap_list)))
for i in range(len(gap_list)):
for j in range(4,len(lam_list)):
gap = gap_list[i]
la... | charlesblakemore/opt_lev_analysis | casimir/force_calc/plot_point_pot.py | plot_point_pot.py | py | 1,570 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "numpy.logspace",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.load",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_numbe... |
28240417211 | import requests
import argparse
import json
import pandas as pd
import streamlit as st
APP_URL = "http://127.0.0.1:8000/predict"
# Adding arguments to customize CLI
argparser = argparse.ArgumentParser(description='Process hyper-parameters')
argparser.add_argument('--movie_title', type=str, default='', help='movie t... | lethologicoding/text_summarization | app/server.py | server.py | py | 1,345 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "requests.post",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 38,
"usage_type": "call"
}
] |
22918946072 | import unittest
import os
import lsst.utils.tests
import pandas as pd
import numpy as np
import asyncio
import matplotlib.pyplot as plt
from astropy.time import TimeDelta
from lsst.utils import getPackageDir
from lsst.summit.utils.enums import PowerState
from lsst.summit.utils.efdUtils import makeEfdClient, getDayObs... | lsst-sitcom/summit_utils | tests/test_tmaUtils.py | test_tmaUtils.py | py | 17,835 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "utils.getVcr",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "lsst.utils.getPackageDir",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "os.path",
"lin... |
32199462370 | #!/usr/bin/python3
"""hard coding is a hard working"""
import requests
import sys
if __name__ == '__main__':
moi = requests.get(sys.argv[1])
if moi.status_code >= 400:
print('Error code: {}'.format(moi.status_code))
else:
print(moi.text)
| jinDeHao/alx-higher_level_programming | 0x11-python-network_1/7-error_code.py | 7-error_code.py | py | 267 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 7,
"usage_type": "attribute"
}
] |
25380312208 | #!usr/bin/env python
# coding:utf-8
__author__ = 'sunyaxiong'
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import os
sys.path.append('E:/GitWorkspace/enndc_management/enndc_management')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
import django
django.setup()
from django.db.models import F, Co... | willsion/enndc_management | vmserver/pyvmomi_api/appinfo_excel_to_db.py | appinfo_excel_to_db.py | py | 1,630 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sys.setdefaultencoding",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.environ.setdef... |
8724066404 | """
Example of pi-IW: guided Rollout-IW, interleaving planning and learning.
"""
import numpy as np
import tensorflow as tf
from planning_step import gridenvs_BASIC_features, features_to_atoms
from online_planning import softmax_Q_tree_policy
# Function that will be executed at each interaction with the environment
... | aig-upf/pi-IW | online_planning_learning.py | online_planning_learning.py | py | 5,661 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "tensorflow.constant",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.expand_dims",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.n... |
34112929148 | import requests
import json
battles_win_history = []
# Request Player History from splinterland API
resp = requests.get('https://api.splinterlands.io/battle/history?player=kingsgambit0615').json()
battles = resp['battles']
temp = []
for battle in battles:
temp.append(battle['mana_cap'])
output = []... | jomarmontuya/splinterlands-bot-python | data.py | data.py | py | 1,816 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
}
] |
12409403965 | import collections
import re
import furl
from django.core.urlresolvers import resolve, reverse, NoReverseMatch
from django.core.exceptions import ImproperlyConfigured
from django.http.request import QueryDict
from rest_framework import exceptions
from rest_framework import serializers as ser
from rest_framework.fields... | karenhanson/osf.io_rmap_integration_old | api/base/serializers.py | serializers.py | py | 49,061 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "website.util.check_private_key_for_anonymized_link",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "website.util",
"line_number": 58,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.Field",
"line_number": 61,
"usage_type": "attr... |
21683160230 | from flask import Flask, make_response, jsonify, request
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.metrics.pairwise import cosine_similarity
import requests
import numpy as np
import pandas as pd
import json
app = Flask(__name__)
rows = []
@app.route('/getDB')
def emplace():
prod_... | jane-k/RecommendationSystem | app.py | app.py | py | 4,148 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "flask.reque... |
30346539101 | import os
import psycopg2
from flask import Flask, render_template, request, url_for, redirect
from app import app
def get_db_connection():
conn = psycopg2.connect(host='localhost',
database='restaurant',
user=os.environ['DB_USERNAME'],
... | anthonygfrn/Restaurant-App-Demo1 | app/routes.py | routes.py | py | 1,668 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "psycopg2.connect",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "flask.render_template"... |
28078812679 | import numpy as np
from PIL import Image
img=Image.open("tiger.jpg")
img=np.array(img)
def rgb2gray(rgb):
return np.dot(rgb, [0.299, 0.587, 0.114])
img=rgb2gray(img)
row=img.shape[0]
col=img.shape[1]
print(row)
print(col)
# img.resize(1200,1920);
# row=img.shape[0]
# col=img.shape[1]
# print(row)
# print(col)
Ima... | NegiArvind/NeroFuzzyTechniques-Lab-Program | compressing_filter.py | compressing_filter.py | py | 787 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "PIL.Image.open",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "numpy.dot",
"line_number": 7,
... |
33807342463 | from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QVBoxLayout, QHBoxLayout
# 0 = empty
# 1 = X
# 2 = O
board = [0,0,0,0,0,0,0,0,0]
app = QApplication([])
window = QWidget()
layout1 = QHBoxLayout()
layout2 = QHBoxLayout()
layout3 = QHBoxLayout()
layoutMain = QVBoxLayout()
buttons = [QPushButton(' '),... | j-tetteroo/tictactoe-fpga | python/tictactoe.py | tictactoe.py | py | 7,748 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "PyQt5.QtWidgets.QApplication",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QHBoxLayout",
"line_number": 12,
"usage_type": "call"
},
{
"a... |
22501232171 | """ Module to implement Views for all API Queries"""
from rest_framework.views import APIView
from rest_framework.authentication import TokenAuthentication
from rest_framework.permissions import IsAuthenticated
from rest_framework.authtoken.models import Token
from rest_framework import serializers
from rest_framework... | karthik-d/room-slot-booking | roomBookingManager/api/views.py | views.py | py | 22,909 | python | en | code | 4 | github-code | 36 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "rest_framework.response.Response",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "rest_framework.status.HTTP_200_OK",
"line_number": 32,
"usage_type": "attri... |
36120976493 | from typing import Any, Dict
import os
import sys
from forte.data.caster import MultiPackBoxer
from forte.data.data_pack import DataPack
from forte.data.multi_pack import MultiPack
from forte.data.readers import OntonotesReader, DirPackReader
from forte.data.readers.deserialize_reader import MultiPackDirectoryReader
f... | asyml/forte | examples/serialization/serialize_example.py | serialize_example.py | py | 4,579 | python | en | code | 230 | github-code | 36 | [
{
"api_name": "forte.processors.base.MultiPackProcessor",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "forte.data.multi_pack.MultiPack",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "forte.data.data_pack.DataPack",
"line_number": 23,
"usage_type":... |
8798334453 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""key.py: Handles the keysubmissions for groups"""
import json
import os
import sqlite3
import sys
import string
import auth
from httperror import HTTPError
RETURN_HEADERS = []
def __do_get():
RETURN_HEADERS.append('Status: 403')
return "This script is NOT g... | daGnutt/skvaderhack | api/key.py | key.py | py | 6,279 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sys.stdin.read",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "json.JSONDecodeError",
"... |
37219887215 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('community', '0001_initial'),
]
operations = [
migrations.AlterModelOptions(
name='usergiallorosso',
... | vaquer/ilGiallorosso | ilGiallorosso/community/migrations/0002_auto_20151127_1820.py | 0002_auto_20151127_1820.py | py | 434 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AlterModelOptions",
"line_number": 14,
"usage_type": "call"
... |
28592053848 | import random
import time
#These have to do with importing the pictures
import io
import os
import PySimpleGUI as sg
import PIL
from PIL import Image
n = 49
image = Image.open(r'C:\Users\carte\OneDrive\Desktop\Coding\Hangman\HM_' + chr(n) + '.png')
image.thumbnail((200, 200))
bio = io.BytesIO()
image.save(bio, ... | CarterDFluckiger/Hangman | Hangman.py | Hangman.py | py | 7,079 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "PIL.Image.open",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "io.BytesIO",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.theme",
"line_num... |
2884245779 | # coding:utf-8
# @Time : 2019-04-28 11:13
# @Author: Xiawang
from utils.util import delete_requests, get_app_header
host = 'https://gate.lagou.com/v1/entry'
header = get_app_header(100018934)
def delete_orderId(orderIds):
url = host + '/order/orderId?orderIds={orderIds}'.format(orderIds=orderIds)
remark = '... | Ariaxie-1985/aria | api_script/entry/order/orderId.py | orderId.py | py | 391 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "utils.util.get_app_header",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "utils.util.delete_requests",
"line_number": 13,
"usage_type": "call"
}
] |
13395821581 | """
Entrypoints.
@author: gjorando
"""
import os
import json
from datetime import datetime
import torch
import click
from PIL import Image
import neurartist
def odd_int(value):
value = int(value)
if value % 2 == 0:
raise ValueError("Odd number required")
return value
def threshold_or_neg(value... | gjorando/style-transfer | neurartist/cli.py | cli.py | py | 10,810 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "json.loads",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number": 239,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 239,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_numb... |
33512429756 | # -*- coding: utf-8 -*-
#
# File: setuphandlers.py
#
#
# GNU General Public License (GPL)
#
__docformat__ = 'plaintext'
from collective.contact.core.interfaces import IContactCoreParameters
from plone import api
from z3c.relationfield.relation import RelationValue
from zope import component
from zope.intid.interfaces... | collective/collective.contact.core | src/collective/contact/core/setuphandlers.py | setuphandlers.py | py | 11,311 | python | en | code | 6 | github-code | 36 | [
{
"api_name": "logging.getLogger",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "traceback.format_stack",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "plone.api.portal.get_registry_record",
"line_number": 48,
"usage_type": "call"
},
{
"api... |
35217427072 | from urllib.request import urlopen
import urllib
from selenium import webdriver
from bs4 import BeautifulSoup
import http.client
from openpyxl import Workbook
from openpyxl import load_workbook
from openpyxl.writer.excel import ExcelWriter
from openpyxl.cell.cell import ILLEGAL_CHARACTERS_RE
import json
import re
impor... | Just-Doing/python-caiji | src/work/2021年3月15日/chemical.py | chemical.py | py | 3,863 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "http.client.client",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "http.client",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "urllib.request.build_opener",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "urlli... |
72467060903 | from edgar3.filing_13f import Filing_13F
from edgar3 import __version__
import os
import datetime
import csv
from google.cloud import storage
from distutils import util
from io import StringIO
def save_filing(fil: Filing_13F, year: int, quarter: int):
path_with_name = f"etl-13f/processed/reports/{year}/{quarter}... | kfarr3/etl-13f | process_filings/src/process_filings.py | process_filings.py | py | 4,530 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "edgar3.filing_13f.Filing_13F",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "io.StringIO",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "csv.QUOTE_MINIMAL... |
19500865293 | import csv
from ctypes import pointer
import math
from time import sleep
from unittest import result
from matplotlib import pyplot as plt
import matplotlib.animation as animation
from matplotlib.pyplot import MultipleLocator
import numpy as np
def write_csv_list_a(sk_list, path):
with open(path,'a',... | JYLinOK/3DSKeleton | showSkeleton.py | showSkeleton.py | py | 19,714 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "csv.writer",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "csv.writer",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 50,
... |
34603270416 | import tensorflow as tf
import pandas as pd
from tensorflow.examples.tutorials.mnist import input_data
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
#mnist = input_data.read_data_sets('./data/', one_hot = True)
def numtolist(num):
'将标签转化为01数组'
r1... | cloud0606/AI | BP神经网络/bp3d_2l.py | bp3d_2l.py | py | 10,717 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "numpy.asarray",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_n... |
16185502227 | import os
from sanic import Sanic
from sanic_session import Session, AIORedisSessionInterface
from ..config import config, log_config
from ..container import Container
from ..adapter.blueprint import handle_exception, message_blueprint,\
post_blueprint, file_blueprint, user_blueprint
os.makedirs(config['DATA_PAT... | jaggerwang/sanic-in-practice | weiguan/api/app.py | app.py | py | 1,296 | python | en | code | 42 | github-code | 36 | [
{
"api_name": "os.makedirs",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "config.config",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "sanic.Sanic",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "config.config",
"line_numbe... |
35206134452 | from typing import List
import random
##################################
# GENERAL STUFF
class Queen():
def __init__(self, pos: int, threats: int = -1):
# the position of the queen on the board
self.pos = pos
# the number of threats on the queen
self.threats = threats
def ... | Just-Hussain/n-queen | nqueen.py | nqueen.py | py | 12,806 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "typing.List",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 111,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 116,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number"... |
28493766698 | import time
import os
import numpy as np
import pyaudio
import tensorflow as tf
import speech_recognition as sr
from datetime import datetime
import wave
import threading
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from ThreeCharacterClassicInference import ThreeCharacterCl... | charis2324/SoundCube | src/main.py | main.py | py | 11,703 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "tensorflow.random.set_seed",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "tensorflow.random",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.seed",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "n... |
43361270196 | from rest_framework.decorators import api_view, permission_classes
from rest_framework.permissions import IsAuthenticated
from rest_framework.request import Request
from rest_framework.response import Response
from django.shortcuts import get_object_or_404
from api.utils import paginate
from message.models import Mess... | Hosea2003/meet-alumni-back | message/views.py | views.py | py | 2,371 | python | en | code | 2 | github-code | 36 | [
{
"api_name": "rest_framework.request.Request",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "django.shortcuts.get_object_or_404",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "user.models.User",
"line_number": 18,
"usage_type": "argument"
},
{... |
8926252017 | ##############################################################################################
# File: diceSim.py
# Author: Sam Wareing
# Description: script to determine probability of dice rolls using monte carlo simulation
#
#
#
##################################################################################... | sjwar455/PythonCodeChallenges | diceSim.py | diceSim.py | py | 1,183 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "collections.Counter",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line... |
28678725652 | from selenium import webdriver
from selenium.webdriver.common.by import By
from webdriver_manager.firefox import GeckoDriverManager
browser = webdriver.Firefox(executable_path=GeckoDriverManager().install())
codigos = ['22316', '21897', '22469', '22192', '22567', '22153', '21778', '22281', '22941', '22882', '21603', ... | DaviRamosUC/web_scraping_redmine | index.py | index.py | py | 1,001 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "selenium.webdriver.Firefox",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "webdriver_manager.firefox.GeckoDriverManager",
"line_number": 5,
"usage_type": "call"
},
... |
626133283 |
import os
from collections import OrderedDict
import tensorflow as tf
class KBest(tf.keras.callbacks.Callback):
"""
A subclass of the callback preset class which implements the functionality to keep only the best k checkpoints of
the execution (instead of the best one implemented in Tf).
Attributes... | BNN-UPC/ignnition | ignnition/custom_callbacks.py | custom_callbacks.py | py | 2,203 | python | en | code | 40 | github-code | 36 | [
{
"api_name": "tensorflow.keras",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "collections.OrderedDict",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "os.remove",
"line_number": 69,
"usage_type": "call"
}
] |
17736050506 | import re
import requests
import json
import osascript
import hashlib
from bs4 import BeautifulSoup
def main():
# Get browser and player data via AppleScript
code, output, err = getBrowserAndPlayerData()
# print(output,err)
current_data = output.split(', ')
# Separate output
player_data = curre... | jimu-gh/Kashi | kashi.py | kashi.py | py | 8,841 | python | en | code | 50 | github-code | 36 | [
{
"api_name": "requests.get",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "osascript.run",
"line_number": 102,
"usage_type": "call"
},
{
"api_name": "re.search",
"line_number": 114,
"usage_type": "call"
},
{
"api_name": "re.search",
"line_number":... |
14029690592 | from django import forms
from . models import Contact
class ContactForm(forms.ModelForm):
name = forms.CharField(label = "",widget = forms.TextInput(attrs={
'class':'form-control',
'placeholder' : 'Full Name',
'required' : 'required',
}))
email = forms.EmailField(label= '',widget =... | IbrahimFarukInce/Django-Course-App | smartedu_con/pages/forms.py | forms.py | py | 996 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.f... |
72774382185 | import tkinter as tk
from tkinter import messagebox
from pymongo import MongoClient
from UserInterface.GlobalResources.GuiObjectsFactories import \
MessageBox, \
ImagedButtonWithText
from UserInterface.MainMenu.MonitoredLeagues.ManageMonitoredLeagues.ManageMonitoredLeagues import \
manage_monitored_leagues
... | SigmaFireFox/SigmaFox | apps/eleven10ths/src/app/11sixteen-desktop-app/UserInterface/MainMenu/MonitoredLeagues/MonitoredLeagues.py | MonitoredLeagues.py | py | 4,954 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "UserInterface.MainMenu.MonitoredLeagues.ManageMonitoredLeagues.ManageMonitoredLeagues.manage_monitored_leagues",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "UserInterface.... |
15062690781 | from cassandra.cluster import Cluster
from cassandra.auth import PlainTextAuthProvider
cloud_config= {
'secure_connect_bundle': 'C:/Users/Damian/Documents/leren-programmeren/python/databasestuff/secure-connect-signup.zip'
}
auth_provider = PlainTextAuthProvider('ckjSgHZotmWyYFbJXRYYcYxU', 'FwJ1SjYdckK26ur43y... | damianslavenburg/leren-programmeren | python/databasestuff/connect_database.py | connect_database.py | py | 668 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "cassandra.auth.PlainTextAuthProvider",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cassandra.cluster.Cluster",
"line_number": 9,
"usage_type": "call"
}
] |
16830841390 | #!/usr/bin/env python
# coding: utf-8
# # Random forest DMS
#
# This script runs the random forest model on the data from the differences in fitness effects: deltaS_weak (S_weak - S_opt)
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.linear_model import La... | Landrylab/DfrB1_DMS_2022 | Scripts/Random_forest/Random_forest_DfrB1_DMS.py | Random_forest_DfrB1_DMS.py | py | 10,422 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "sklearn.__version__",
"line_number": 41,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "pandas.notna",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "pandas.notna",
... |
36132831318 | """
Dialog for editing first arrivals.
"""
from PyQt5 import QtCore, QtGui, QtWidgets
import numpy as np
import pyqtgraph as qtg
class FirstArrivalDlg(QtWidgets.QDialog):
def __init__(self, measurement, genie, parent=None):
super().__init__(parent)
self._measurement = measurement
self.g... | GeoMop/Genie | src/genie/ui/dialogs/first_arrival_dialog.py | first_arrival_dialog.py | py | 6,825 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "PyQt5.QtWidgets.QDialog",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QGridLayout",
"line_number": 23,
"usage_type": "call"
},
{
"api_name... |
1828127496 | import json
import os
from pathlib import Path
from typing import List, Tuple
import numpy as np
from arch import arch_model
from systems_util import get_futures_list, get_settings, normalize_weights
def myTradingSystem(DATE: List[int], CLOSE: np.ndarray, settings) -> Tuple[np.ndarray, dict]:
print(f"Predi... | weixue123/quantiacs_algo_trading | systems/garch_system.py | garch_system.py | py | 2,506 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "typing.List",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "numpy.ndarray",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "numpy.transpose",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.diff",
"line... |
15947746512 | '''
用于将dea模型中的构件拆分到单独的dae文件中
'''
def process(dae_path, base_output_dae_path):
'''
将dae文件中的一个个构件分开到多个dae文件中
'''
import xml.dom.minidom
import os
import time
if not os.path.exists(dae_path):
print('路径%s不存在' % dae_path)
# 文件夹路径
output_dir = base_output_dae_path + '\\' + dae_path[dae_path.rfind('\\') + 1: da... | XinJack/UsefulScripts | daeProcessor_python/daeProcessor.py | daeProcessor.py | py | 4,418 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.path.exists",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
71193874663 | #Importing the Dependencies
import tensorflow as tf
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.applications import MobileNetV2
from tensorflow.keras.layers import AveragePooling2D
from tensorflow.keras.layers import Dropout
from tensorflow.keras.layers import Flatten
from... | OmololaOkebiorun/Face_Mask_Detection | training.py | training.py | py | 4,037 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "os.path.join",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number"... |
26446464278 | from django.contrib.auth import login, authenticate
from django.contrib.auth.decorators import login_required
from django.http import JsonResponse
from .forms import SignUpForm, ProfileForm, LoginForm
from django.shortcuts import render, redirect
from .models import Profile, Search
from product.models import Product
im... | RunarVestmann/verklegtnamskeid2 | captain_console/user/views.py | views.py | py | 6,004 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "forms.SignUpForm",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.authenticate",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.login",
"line_number": 20,
"usage_type": "call"
},
{
"api_n... |
11604655493 | import ipaddress
import json
import os
import uuid
import encryption_helper
import phantom.app as phantom
import phantom.rules as ph_rules
import phantom.utils as ph_utils
import requests
import xmltodict
from phantom.action_result import ActionResult
from phantom.base_connector import BaseConnector
from requests.auth... | splunk-soar-connectors/office365 | ewsonprem_connector.py | ewsonprem_connector.py | py | 129,772 | python | en | code | 3 | github-code | 36 | [
{
"api_name": "os.path.dirname",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "os.sys.path.insert",
... |
7752973710 | from fastapi import FastAPI, Request, Form, HTTPException
from fastapi.templating import Jinja2Templates
from fastapi.responses import HTMLResponse, RedirectResponse, JSONResponse
from pydantic import BaseModel
import psycopg2
import datetime
from uuid import uuid4
from fastapi.responses import StreamingResponse
from i... | ksindy/qrfood | qr_food_app/main.py | main.py | py | 9,400 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "fastapi.FastAPI",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "routers.background_tasks.router",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name"... |
6007494490 | import json
import unittest
from datetime import date
from first_config import Config
from first_data import FirstData
from first_distance import FirstDistance
from first_pace import FirstPace
from first_plan import FirstPlan
from first_race import FirstRaceType, FirstRace
from first_runner import FirstRunner
from fir... | bendaten/first_trainer | test/test_plan.py | test_plan.py | py | 10,937 | python | en | code | 1 | github-code | 36 | [
{
"api_name": "unittest.TestCase",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "first_plan.FirstPlan",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "first_config.Config.TEST_RESOURCE_DIR",
"line_number": 30,
"usage_type": "attribute"
},
{... |
10178056973 | import bitstring
import collections
import math
from array import array
import os
""" HGR = 280 * 192
C64 = 40*24 chars => 320 * 192 ; display 3min 20 (2000 images) sec instead of 3min 40 (2200)
Video = 192 * 160 (24*20)
"""
if os.name == 'nt':
IMG_PREFIX = r'c:/PORT-STC/PRIVATE/tmp'
FFMPEG = r'c:... | wiz21b/badapple | utils.py | utils.py | py | 20,203 | python | en | code | 13 | github-code | 36 | [
{
"api_name": "os.name",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "array.array",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 163,
"usage_type": "call"
},
{
"api_name": "math.fabs",
"line_number": 19... |
23216322875 | """Add season_bet table
Revision ID: 8076a0692fc3
Revises:
Create Date: 2023-03-12 10:53:35.538988
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '8076a0692fc3'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands au... | rbikar/f1-guessing-game-app | migrations/versions/8076a0692fc3_add_season_bet_table.py | 8076a0692fc3_add_season_bet_table.py | py | 962 | python | en | code | 0 | github-code | 36 | [
{
"api_name": "alembic.op.create_table",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.