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
20644437454
import numpy as np import open3d as o3d import os import torch import torch.nn as nn import torch.nn.functional as F import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOR_DIR = os.path.dirname(BASE_DIR) sys.path.append(ROOR_DIR) from utils import batch_transform, angle from models import gather_points...
zhulf0804/ROPNet
src/models/TFMR.py
TFMR.py
py
10,333
python
en
code
51
github-code
1
[ { "api_name": "os.path.dirname", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.dirname", "line...
71109526434
import numbers import datetime as dt def get_sample_count(profileDict): """ Gets the number of samples taken from a dictionary representing data from an Arm MAP file Args: profileDict (dict): Dictionary from which to obtain the count of samples Returns: The number of samples taken...
arm-hpc/allinea_json_analysis
MAP_JSON_Scripts/map_json_common.py
map_json_common.py
py
19,968
python
en
code
3
github-code
1
[ { "api_name": "numbers.Number", "line_number": 480, "usage_type": "attribute" }, { "api_name": "datetime.datetime.strptime", "line_number": 557, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 557, "usage_type": "attribute" }, { "api_name...
15654363718
import gzip import pickle import tensorflow as tf import numpy as np # Translate a list of labels into an array of 0's and one 1. # i.e.: 4 -> [0,0,0,0,1,0,0,0,0,0] def one_hot(x, n): """ :param x: label (int) :param n: number of bits :return: one hot code """ if type(x) == list: x = ...
adrianmesa93/practica2-fsi
nn_mnist.py
nn_mnist.py
py
3,885
python
en
code
0
github-code
1
[ { "api_name": "numpy.array", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 20, "usage_type": "call" }, { "api_name": "gzip.open", "line_number": 2...
36261614433
from setuptools import setup with open("README.md") as file: long_description = file.read() setup( include_package_data=True, name='ginz', version='1.1', license="MIT", description='Ginz is a command-line utility that simplifies the process of cloning multiple repositories from GitHub by allow...
happer64bit/ginz-cli
setup.py
setup.py
py
726
python
en
code
0
github-code
1
[ { "api_name": "setuptools.setup", "line_number": 6, "usage_type": "call" } ]
74363230754
import base64 import json import requests class VisionUtils: def __init__(self): self.endpoint_url = 'https://vision.googleapis.com/v1/images:annotate' self.api_key = 'AIzaSyCSqfhtZXwEy8JxJRtUYm31YWLC1aACUMg' def __make_request(self, img_path, feature_type): request_list = [] ...
drimyus/GoogleCloudAPI
vision_utils.py
vision_utils.py
py
2,022
python
en
code
1
github-code
1
[ { "api_name": "base64.b64encode", "line_number": 16, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 30, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 33, "usage_type": "call" }, { "api_name": "json.loads", "line_numb...
20597467269
#!/usr/bin/env python3 # # Project homepage: https://github.com/mwoolweaver # Licence: <http://unlicense.org/> # Created by Michael Woolweaver <m.woolweaver@icloud.com> # ================================================================================ import os from inspect import getframeinfo, stack from sqlite3 impo...
mwoolweaver/listManager.py
lib/debug.py
debug.py
py
3,700
python
en
code
1
github-code
1
[ { "api_name": "os.system", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "l...
20179427993
import codecs import atexit from flask import Flask,render_template import urllib3 import requests import csv from flask_crontab import Crontab import pandas as pd app = Flask(__name__) cron=Crontab(app) class LocationsData: def __init__(self,state='NA',country='NA',latestCount=0,prevDayCount=0): self.s...
ayush0407/Corona-Stats
app.py
app.py
py
1,661
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 11, "usage_type": "call" }, { "api_name": "flask_crontab.Crontab", "line_number": 12, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 34, "usage_type": "call" }, { "api_name": "csv.DictReader", "...
32198374896
from django.urls import path from response.slack import views urlpatterns = [ path("slash_command", views.slash_command, name="slash_command"), path("action", views.action, name="action"), path("event", views.event, name="event"), path("cron_minute", views.cron_minute, name="cron_minute"), path("c...
monzo/response
response/slack/urls.py
urls.py
py
372
python
en
code
1,487
github-code
1
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "response.slack.views.slash_command", "line_number": 6, "usage_type": "attribute" }, { "api_name": "response.slack.views", "line_number": 6, "usage_type": "name" }, { "api_na...
26741822791
# A library for streamlining ML processes # by Matthew Mauer # last editted 2020-05-10 ''' EDITS TO COME: - more exception handling!!! - more Grid Parameters in SupervisedLearner - an UnsupervervisedLearner... ''' import pandas as pd import numpy as np import datetime import matplotlib.pyp...
mrmauer/pipelines
Python/supervised_pipeline.py
supervised_pipeline.py
py
13,284
python
en
code
0
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 32, "usage_type": "call" }, { "api_name": "numpy.nan", "line_number": 41, "usage_type": "attribute" }, { "api_name": "seaborn.pairplot", "line_number": 52, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.fig...
4484391480
import requests import os config_path = os.path.join(os.getcwd() + '\Config\\token.md') def getHeaders(): '''获取headers''' return { 'Parkingwang-Client-Source': 'ParkingWangAPIClientWeb', 'Authorization': getToken()} def login(url,params): try: url = "http://dykttest.zsyky.cn:9999" +...
wfamzing/Test_API
config/gettoken.py
gettoken.py
py
1,404
python
en
code
1
github-code
1
[ { "api_name": "os.path.join", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 5, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 1...
959248874
'''LiteMobileNet in PyTorch. See the paper "MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications" for more details. ''' from torch.nn import init import torch.nn as nn import math import torch import collections import torch.nn.functional as F class Block(nn.Module): '''Depthwise co...
AlexanderParkin/CASIA-SURF_CeFA
rgb_track/models/architectures/lite_mobilenet.py
lite_mobilenet.py
py
3,585
python
en
code
149
github-code
1
[ { "api_name": "torch.nn.Module", "line_number": 14, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 14, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 18, "usage_type": "call" }, { "api_name": "torch.nn", "line_nu...
23167920981
import os import tensorflow as tf from scipy import misc import numpy as np import random import sys import io def to_rgb(img): if img.ndim < 3: h, w = img.shape ret = np.empty((h, w, 3), dtype=np.uint8) ret[:, :, 0] = ret[:, :, 1] = ret[:, :, 2] = img return ret else: ...
luckycallor/InsightFace-tensorflow
data/classificationDataTool.py
classificationDataTool.py
py
4,902
python
en
code
246
github-code
1
[ { "api_name": "numpy.empty", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 13, "usage_type": "attribute" }, { "api_name": "tensorflow.shape", "line_number": 21, "usage_type": "call" }, { "api_name": "tensorflow.image.random...
16779028414
import numpy as np import cv2 import math def calculate_hs_histogram(img, bin_size): height, width, _ = img.shape img_hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) max_h = 179 max_s = 255 hs_hist = np.zeros((math.ceil((max_h+1)/bin_size), math.ceil((max_s+1)/bin_size))) for i in range(he...
Tano-Coppoletta/Computer_vision
color_segmentation/main.py
main.py
py
1,453
python
en
code
0
github-code
1
[ { "api_name": "cv2.cvtColor", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2HSV", "line_number": 7, "usage_type": "attribute" }, { "api_name": "numpy.zeros", "line_number": 10, "usage_type": "call" }, { "api_name": "math.ceil", "line_n...
19448146036
from string import Template import smtplib import os from os.path import basename from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.mime.application import MIMEApplication SMTP_SERVER = "smtp.gmail.com" SMTP_PORT = 465 EMAIL_ADDRESS = os.environ.get('EMAIL_USER') EMAIL_PAS...
jakobOB/Automate-Email
main.py
main.py
py
2,430
python
en
code
0
github-code
1
[ { "api_name": "os.environ.get", "line_number": 12, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.environ.get", "line_number": 13, "usage_type": "call" }, { "api_name": "os.environ", "line_...
20041132401
import sys import matplotlib.pyplot as plt import pickle from scapy.all import rdpcap from math import log import numpy as np broadcast_address = 'ff:ff:ff:ff:ff:ff' def dict_add(dic, key): if key in dic: dic[key] += 1 else: dic[key] = 1 def tipo(n): if str(n) in types: return typ...
alejandroFerrante/TP_Redes_Wiretapping
plot_entropia_s1.py
plot_entropia_s1.py
py
1,461
python
en
code
0
github-code
1
[ { "api_name": "pickle.load", "line_number": 22, "usage_type": "call" }, { "api_name": "scapy.all.rdpcap", "line_number": 24, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 24, "usage_type": "attribute" }, { "api_name": "math.log", "line_numbe...
32396192117
import asyncio from websockets import server from threading import Thread import logging from datetime import datetime import numpy as np logging.basicConfig(filename='controlador.log', # w -> sobrescreve o arquivo a cada log # a -> não sobrescreve o arquivo ...
felipe-junior/ExclusaoMutuaDistribuida
app.py
app.py
py
3,536
python
pt
code
1
github-code
1
[ { "api_name": "logging.basicConfig", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 12, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.zeros", ...
73872794272
import json import pandas as pd import requests from common.utils import * from tushare_client.base import AbstractDataRetriever from tushare_client.stock_calendar import StockCalendar stock_index_map = { 's50': ('stock_index_s50', '000016'), 'h300': ('stock_index_h300', '000300'), 'z500': ('stock_index_...
xiekeng/tushare-client
tushare_client/stock_index.py
stock_index.py
py
2,526
python
en
code
6
github-code
1
[ { "api_name": "tushare_client.base.AbstractDataRetriever", "line_number": 17, "usage_type": "name" }, { "api_name": "tushare_client.stock_calendar.StockCalendar", "line_number": 28, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 48, "usage_type": "c...
28097719889
import logging import pathlib from unittest.mock import patch from rest_framework.test import APITestCase logger = logging.getLogger(__name__) class TestTemplates(APITestCase): def test_when_get_then_response(self): ret_value = pathlib.Path( "src/human_lambdas/templates_handler/tests/t.json"...
Human-Lambdas/human-lambdas
src/human_lambdas/templates_handler/tests/test_templates.py
test_templates.py
py
1,465
python
en
code
32
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 7, "usage_type": "call" }, { "api_name": "rest_framework.test.APITestCase", "line_number": 10, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 12, "usage_type": "call" }, { "api_name": "unittes...
74152330592
import praw import sys import pickle import operator import json from datetime import datetime AGENT='windows:blood_bender.reddit-data:v1.0.1 (by /u/blood_bender)' reddit = praw.Reddit(user_agent=AGENT) def main(): print("Warning: this takes a tooonnnnn of time, sorry") if (len(sys.argv) != 2): print("Must p...
jgr3go/reddit_ar
artopcommenters.py
artopcommenters.py
py
2,168
python
en
code
3
github-code
1
[ { "api_name": "praw.Reddit", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 14, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 16, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 18, ...
5928117169
import math from typing import Dict, Union import numpy as np import torch from scipy.special import binom from ocpmodels.common.typing import assert_is_instance from ocpmodels.modules.scaling import ScaleFactor class PolynomialEnvelope(torch.nn.Module): """ Polynomial envelope function that ensures a smoot...
Open-Catalyst-Project/ocp
ocpmodels/models/gemnet_oc/layers/radial_basis.py
radial_basis.py
py
7,484
python
en
code
518
github-code
1
[ { "api_name": "torch.nn", "line_number": 12, "usage_type": "attribute" }, { "api_name": "torch.Tensor", "line_number": 30, "usage_type": "attribute" }, { "api_name": "torch.where", "line_number": 37, "usage_type": "call" }, { "api_name": "torch.zeros_like", "l...
18253543936
from django.core.cache import cache from config.settings import CACHE_ENABLED from blog.models import Post def get_cached_posts(): """Получить список постов из кеша, если необходимо, то из БД.""" if CACHE_ENABLED: key = 'blog_posts_list' queryset = cache.get(key) if queryset is None:...
RomanBogdanov5111/Coursework_6
blog/services.py
services.py
py
540
python
ru
code
0
github-code
1
[ { "api_name": "config.settings.CACHE_ENABLED", "line_number": 10, "usage_type": "name" }, { "api_name": "django.core.cache.cache.get", "line_number": 12, "usage_type": "call" }, { "api_name": "django.core.cache.cache", "line_number": 12, "usage_type": "name" }, { ...
12990749826
import os import sys import unittest _PARENT_DIR = os.path.abspath(os.path.join(os.getcwd(), os.pardir)) _PYLINT_PATH = os.path.join(_PARENT_DIR, 'oppia_tools', 'pylint-1.7.1') sys.path.insert(0, _PYLINT_PATH) # Since these module needs to be imported after adding Pylint path, # we need to disable isort for the below...
shouri007/oppia
scripts/custom_lint_checks_test.py
custom_lint_checks_test.py
py
2,269
python
en
code
null
github-code
1
[ { "api_name": "os.path.abspath", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 5, "usage_type": "call" }, { "api_name": "os.getcwd", "line_number":...
13857045676
import asyncio from discord.ext import commands from utils.moduleloader import get_module_loader class MemeBot: bot: commands.Bot command_prefix: str async def loadModules(self, bot): #def __ainit__(self, config: dict, bot: commands.Bot): print( await self.moduleLoader.reload_all_cogs()) ...
JeppeLovstad/Discord-Meme-Delivery-Bot
memebot.py
memebot.py
py
1,980
python
en
code
0
github-code
1
[ { "api_name": "discord.ext.commands.Bot", "line_number": 7, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 7, "usage_type": "name" }, { "api_name": "discord.ext.commands.Bot", "line_number": 14, "usage_type": "attribute" }, { "ap...
8410126543
import matplotlib.pyplot as plt def f(x): return (7*x) % 1729 x = [] y = [] for i in range(0, 2000): x.append(i) y.append(f(i)) plt.plot(x, y) plt.show()
hermanholmoy/TDT4109
Oppgaver/plotmod.py
plotmod.py
py
173
python
en
code
0
github-code
1
[ { "api_name": "matplotlib.pyplot.plot", "line_number": 16, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 16, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.show", "line_number": 17, "usage_type": "call" }, { "api_name": "matpl...
7594669007
from keras.models import load_model from keras.preprocessing.image import img_to_array import cv2 import numpy as np import webbrowser from tkinter import * face_classifier = cv2.CascadeClassifier( r'D:\EMOTION BASED MUSIC PLAYER\haarcascade_frontalface_default.xml') classifier = load_model(r'D:\EMOTION...
anuragx18/EMOTION-BASED-MUSIC-PLAYER
main(1).py
main(1).py
py
2,631
python
en
code
0
github-code
1
[ { "api_name": "cv2.CascadeClassifier", "line_number": 9, "usage_type": "call" }, { "api_name": "keras.models.load_model", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.VideoCapture", "line_number": 15, "usage_type": "call" }, { "api_name": "cv2.cvt...
33715367939
import argparse import datetime import random import sys from pathlib import Path from pprint import pprint from typing import Dict from tqdm import tqdm import numpy as np import torch from torch.utils.tensorboard import SummaryWriter from cal_angle import * base_dir = str(Path(__file__).resolve().parent.parent) sys.p...
w4ngzI/MARL-olympic-running
olympic_running_algo&reward/rl_trainer/main_reward.py
main_reward.py
py
11,843
python
en
code
0
github-code
1
[ { "api_name": "pathlib.Path", "line_number": 13, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "rl_trainer.algo.ppo.PPO", ...
35947564914
# -*- coding: utf-8 -*- import re import csv import matplotlib.pyplot as plt """ This script is for plotting each node# (force/RMSE & TC(300K) diff from 112.1) with classified color of each data# """ if __name__ == '__main__': datagrp=["2","10","20","40","60"] dlabels=['70','350','700','1400','2100'] no...
s-okugawa/HDNNP-tools
tools/Lmps-MD/plotRMSETCdata-all4.py
plotRMSETCdata-all4.py
py
3,341
python
en
code
0
github-code
1
[ { "api_name": "csv.reader", "line_number": 24, "usage_type": "call" }, { "api_name": "re.split", "line_number": 28, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 38, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", ...
40517490417
import bpy, mathutils class RenderManager(): files = None camera = None dummyObject = None zAxis = (0,0,1) blenderFilesDir = "." radius = 6378137 def __init__(self, **kwargs): for k in kwargs: setattr(self, k, kwargs[k]) def getBoundingBox(self): # perform context.scene.update(), otherwise o.mat...
vvoovv/blender-2.5dmaps
render_manager.py
render_manager.py
py
808
python
en
code
10
github-code
1
[ { "api_name": "bpy.context.scene.update", "line_number": 20, "usage_type": "call" }, { "api_name": "bpy.context", "line_number": 20, "usage_type": "attribute" }, { "api_name": "bpy.context", "line_number": 25, "usage_type": "attribute" }, { "api_name": "mathutils....
24845698363
#!/usr/bin/env python # WS server that sends messages at random intervals import asyncio import datetime import random import websockets async def time(websocket, path): print('Start... Loop előtt') while True: now = datetime.datetime.utcnow().isoformat() + 'Z' print(now) await websock...
cogitoergoread/em-simul
minta/ws_server_tine.py
ws_server_tine.py
py
665
python
en
code
0
github-code
1
[ { "api_name": "datetime.datetime.utcnow", "line_number": 12, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 12, "usage_type": "attribute" }, { "api_name": "asyncio.sleep", "line_number": 15, "usage_type": "call" }, { "api_name": "random....
36850304791
""" 此文件用于解析rsl.out.0000文件 """ from datetime import datetime # import matplotlib.pyplot as plt class rslOutParser: """ 此类用于解析rsl.out.0000文件 """ def __init__(self, rslFilePath): self.rslFilePath = rslFilePath self.dataLines = [] def tryParse(self): """ a """ print('aaaaa') ...
the-1000th-summer/wrfViewerDjango
wrfViewer/app1/parser.py
parser.py
py
3,362
python
en
code
1
github-code
1
[ { "api_name": "datetime.datetime.strptime", "line_number": 92, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 92, "usage_type": "name" } ]
27514299411
from base import Screen import curses from math import sin, cos, pi from time import sleep, strftime from datetime import datetime from threading import Lock, Thread class TimeClock(Screen): name = '时钟' used_pairs = ( (curses.COLOR_BLACK, curses.COLOR_WHITE), (curses.COLOR_YELLOW, -1), ...
xiaohehao2009/lib
py/clock/builtin_components/timeclock.py
timeclock.py
py
8,622
python
en
code
0
github-code
1
[ { "api_name": "base.Screen", "line_number": 9, "usage_type": "name" }, { "api_name": "curses.COLOR_BLACK", "line_number": 12, "usage_type": "attribute" }, { "api_name": "curses.COLOR_WHITE", "line_number": 12, "usage_type": "attribute" }, { "api_name": "curses.COL...
10663353857
from transformers import AutoTokenizer from optimum.onnxruntime import ORTModelForSeq2SeqLM from optimum.pipelines import pipeline from pathlib import Path class OptimizedM100Model: def __init__(self, model_path, src_lang, tgt_lang): model_path = Path(model_path) assert model_path.exists(), "Model...
dsfsi/masakhane-web
src/m_to_m_models/model_handlers.py
model_handlers.py
py
1,404
python
en
code
34
github-code
1
[ { "api_name": "pathlib.Path", "line_number": 9, "usage_type": "call" }, { "api_name": "optimum.onnxruntime.ORTModelForSeq2SeqLM.from_pretrained", "line_number": 12, "usage_type": "call" }, { "api_name": "optimum.onnxruntime.ORTModelForSeq2SeqLM", "line_number": 12, "usage...
8430419909
import torch import torch.nn as nn from torch import optim import torch.nn.functional as F from torch.autograd import Variable import numpy as np import matplotlib.pyplot as plt train_data = np.load("E:\\quant_research\\train the rank of ten points\\RNN_point\\data\\train_data_10num.npy") train_aim = np.loa...
00wuweimin/rank-ten-types-of-stocks-using-pointer-network
pointer_network.py
pointer_network.py
py
7,979
python
en
code
0
github-code
1
[ { "api_name": "numpy.load", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.from_numpy", "line_number": 14, "usage_type": "call" }, { "api_name": "torch.FloatTensor", "line_...
16557727585
# 10 그래프 이론 - 커리큘럼 # Solved Date: 22.07.17. import sys from collections import deque import heapq read = sys.stdin.readline # 위상정렬하고, 더 오래 걸리는 값을 항상 저장해줌 def book_topological_sort(indegrees, graph, costs): answer = [cost for cost in costs] queue = deque() for node, indegree in enumerate(indegrees): ...
imn00133/algorithm
ItIsCodingTest/chap10/04.curriculum.py
04.curriculum.py
py
2,018
python
en
code
0
github-code
1
[ { "api_name": "sys.stdin", "line_number": 7, "usage_type": "attribute" }, { "api_name": "collections.deque", "line_number": 13, "usage_type": "call" }, { "api_name": "heapq.heappush", "line_number": 34, "usage_type": "call" }, { "api_name": "heapq.heappop", "l...
70199258594
# -*- coding: utf-8 -*- import json import logging import traceback from datetime import datetime, timedelta import odoo from odoo import _, models, fields, api from odoo.api import Environment from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT as DATETIME_FORMAT from ..api import AsyncDB _logger = logging.getLo...
oejia/task_queue
models/task_task.py
task_task.py
py
3,503
python
en
code
15
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 15, "usage_type": "call" }, { "api_name": "odoo.models.AbstractModel", "line_number": 17, "usage_type": "attribute" }, { "api_name": "odoo.models", "line_number": 17, "usage_type": "name" }, { "api_name": "odoo.fie...
70506253795
import logging import typing from flask import render_template import api import api_types from soda_api import client, LICENSE_DATASET log = logging.getLogger(__name__) def license_lookup(license: str) -> str: if license: try: results = client.get( LICENSE_DATASET, limit=1...
OrcaCollective/1-312-hows-my-driving
src/dataset.py
dataset.py
py
2,722
python
en
code
3
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "soda_api.client.get", "line_number": 17, "usage_type": "call" }, { "api_name": "soda_api.LICENSE_DATASET", "line_number": 18, "usage_type": "argument" }, { "api_name": "so...
10576800492
from pymongo import MongoClient # Create a pymongo client client = MongoClient("localhost", 27017) # Get the database instance db = client["mydb"] # db collection pytech = db["PyTech"] # insert 3 students records = [ { "student_id": "1007", "first_name": "Fred", "last_name": "Jones" ...
taj1395/Python
csd_310/module_5/pytech_insert.py
pytech_insert.py
py
829
python
en
code
0
github-code
1
[ { "api_name": "pymongo.MongoClient", "line_number": 4, "usage_type": "call" } ]
74419552994
import os import pickle import argparse import numpy as np import torch import utils import attacks class TargetedIndexedDataset(): def __init__(self, dataset, classes): self.dataset = dataset self.classes = classes def __getitem__(self, idx): x, y, ii = self.dataset[idx] y +...
fshp971/robust-unlearnable-examples
generate_tap.py
generate_tap.py
py
5,798
python
en
code
35
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 28, "usage_type": "call" }, { "api_name": "utils.add_shared_args", "line_number": 29, "usage_type": "call" }, { "api_name": "torch.save", "line_number": 58, "usage_type": "call" }, { "api_name": "utils.get_mo...
16967247888
from tqdm import tqdm import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from pyflann import FLANN from scipy.stats import gaussian_kde from sklearn.neighbors import KernelDensity import tool class Coverage: def __init__(self, model, layer_size_dict, hyper=None...
Yuanyuan-Yuan/NeuraL-Coverage
coverage.py
coverage.py
py
34,661
python
en
code
243
github-code
1
[ { "api_name": "torch.device", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 17, "usage_type": "attribute" }, { "api_name": "tqdm.tqdm", ...
32958159929
import sys import signal import socket import gym import json import numpy as np import cv2 import tqdm from itertools import product from time import sleep from utils.virtual_controller import VirtualKeyboard from utils.img import ImageCapture from utils.utils import changeWindowName, kill_process, kill_steam, run_ga...
Seladus/The-RL-of-Isaac
isaac_env.py
isaac_env.py
py
10,300
python
en
code
0
github-code
1
[ { "api_name": "gym.logger.set_level", "line_number": 19, "usage_type": "call" }, { "api_name": "gym.logger", "line_number": 19, "usage_type": "attribute" }, { "api_name": "gym.Env", "line_number": 24, "usage_type": "attribute" }, { "api_name": "itertools.product",...
7954580347
# -*- coding: utf-8 -*- import select import socket as sk import logging import common import terminal import commands.client import commands.command MAX_LOOP_TIME = 0.1 # s server_ip = ("localhost", 23456) class Client(common.Client): def __init__(self, *args, **kwargs): super().__init__(*args, **kw...
Unprex/python-server
client.py
client.py
py
3,792
python
en
code
0
github-code
1
[ { "api_name": "common.Client", "line_number": 17, "usage_type": "attribute" }, { "api_name": "commands.client.client", "line_number": 21, "usage_type": "attribute" }, { "api_name": "commands.client", "line_number": 21, "usage_type": "name" }, { "api_name": "comman...
26139386529
import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier from sklearn.metrics import accuracy_score import category_encoders as ce import warnings import sys import os import logging import mlflow import mlflow.sklearn import dvc.ap...
nshutijean/DVC-Mlflow-pipeline
train.py
train.py
py
3,607
python
en
code
2
github-code
1
[ { "api_name": "logging.basicConfig", "line_number": 20, "usage_type": "call" }, { "api_name": "logging.WARN", "line_number": 20, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 21, "usage_type": "call" }, { "api_name": "dvc.api.api.g...
8975814633
import os from re import L import sys import numpy as np from numpy import asarray import PIL from PIL import Image, ImageDraw, ImageFont from PIL.ExifTags import TAGS np.set_printoptions(threshold=sys.maxsize) def addition_decode_algo(stego_path): stego_image = Image.open(stego_path, 'r') stego_array = np....
PoornaHegde20/stegWebApp
algo/addition.py
addition.py
py
4,609
python
en
code
0
github-code
1
[ { "api_name": "numpy.set_printoptions", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.maxsize", "line_number": 11, "usage_type": "attribute" }, { "api_name": "PIL.Image.open", "line_number": 15, "usage_type": "call" }, { "api_name": "PIL.Image", ...
72551170595
"""Module test for the multi-agent action model learning.""" from pddl_plus_parser.models import Domain, MultiAgentObservation, ActionCall, MultiAgentComponent, \ GroundedPredicate from pytest import fixture from sam_learning.core import LiteralCNF from sam_learning.learners import MultiAgentSAM from tests.consts ...
argaman-aloni/sam_learning
tests/multi_agent_sam_test.py
multi_agent_sam_test.py
py
14,700
python
en
code
1
github-code
1
[ { "api_name": "pddl_plus_parser.models.Domain", "line_number": 16, "usage_type": "name" }, { "api_name": "sam_learning.learners.MultiAgentSAM", "line_number": 17, "usage_type": "call" }, { "api_name": "pytest.fixture", "line_number": 15, "usage_type": "call" }, { ...
36214270512
import click import joblib import pandas as pd import numpy as np import sklearn from sklearn.pipeline import Pipeline from sklearn.compose import ColumnTransformer from sklearn.preprocessing import OrdinalEncoder from sklearn.impute import KNNImputer from sklearn.tree import DecisionTreeClassifier import src CAT_F...
mikhailmartin/Breast-Cancer
src/models/train_decision_tree_pipe.py
train_decision_tree_pipe.py
py
2,200
python
en
code
1
github-code
1
[ { "api_name": "src.constants", "line_number": 16, "usage_type": "attribute" }, { "api_name": "src.constants", "line_number": 17, "usage_type": "attribute" }, { "api_name": "src.constants", "line_number": 18, "usage_type": "attribute" }, { "api_name": "src.constant...
36891714649
from typing import List def print_array(array: List[List]): for i in range(0, len(array)): print(" ".join([str(num) if num >= 10 else '0%s' % num for num in array[i]])) def spiral(n: int) -> List[List]: if n == 1: return [[1]] start, end = (0, n) array = [[-1 for i in range(0, n)] fo...
peterehik/scripts
src/spiral.py
spiral.py
py
2,015
python
en
code
0
github-code
1
[ { "api_name": "typing.List", "line_number": 4, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 22, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 56...
18270633501
import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms # Load the data train = torch.utils.data.DataLoader( datasets.MNIST('../data', train=True, download=True, transform=transforms.Compose([transforms.ToT...
bencarletonn/Intro-to-Deep-Learning
pytorchMNISTmodel.py
pytorchMNISTmodel.py
py
2,007
python
en
code
0
github-code
1
[ { "api_name": "torch.utils.data.DataLoader", "line_number": 9, "usage_type": "call" }, { "api_name": "torch.utils", "line_number": 9, "usage_type": "attribute" }, { "api_name": "torchvision.datasets.MNIST", "line_number": 10, "usage_type": "call" }, { "api_name": ...
20567820784
import etl import boto3 import io ny_url = "data/ETL_data.csv" jh_url = "data/ETL_recovery.csv" ACCESS_KEY_ID = 'YOUR_ACCESS_KEY_ID' SECRET_ACCESS_KEY = 'YOUR_SECRET_ACCESS_ID' filename = 'MyPandasData.' bucketName = 'mypyfile' s3_client = boto3.client( "s3", aws_access_key_id=ACCESS_KEY_ID, aws_secret_a...
Gayathrimahe/ETL-aws-cloud-project
lamda.py
lamda.py
py
861
python
en
code
0
github-code
1
[ { "api_name": "boto3.client", "line_number": 13, "usage_type": "call" }, { "api_name": "etl.extract_transform", "line_number": 20, "usage_type": "call" }, { "api_name": "io.StringIO", "line_number": 21, "usage_type": "call" } ]
20798569158
import sys import cv2 import numpy as np class VideoWriter(object): def __init__(self, save_path='./video.mp4', fps=25, imsize=(224, 224)): # encoder(for mp4) #imsize must be tuplle object fourcc = cv2.VideoWriter_fourcc('m', 'p', '4', 'v') # output file name, encoder, fps, size(fi...
WeLoveKiraboshi/DeepTiltedDepthEstimation
utils/VideoWriter.py
VideoWriter.py
py
1,247
python
en
code
0
github-code
1
[ { "api_name": "cv2.VideoWriter_fourcc", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.ndarray", "line_number": 12, "usage_type": "attribute" }, { "api_name": "cv2.VideoWriter", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.exit", ...
36365978443
import os import glob import shutil import sys import re import string import argparse import unicodedata import six.moves.configparser as ConfigParser from os.path import expanduser import h5py import automo.util as util import subprocess from distutils.dir_util import mkpath import logging # logger = logging.getLog...
decarlof/automo
automo/robo.py
robo.py
py
8,424
python
en
code
1
github-code
1
[ { "api_name": "os.path.expanduser", "line_number": 45, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 46, "usage_type": "call" }, { "api_name": "os.path", "line_number": 46, "usage_type": "attribute" }, { "api_name": "os.path.abspath", ...
18248847095
import requests from bs4 import BeautifulSoup import time # 爬取美女壁纸 url = 'https://pic.netbian.com/4kmeinv/' resp = requests.get(url) resp.encoding = 'gbk' tags = BeautifulSoup(resp.text, 'html.parser') imgs = tags.find('ul', class_='clearfix').find_all('img') for img in imgs: imgUrl = url[0:-9] + img.get('src') ...
xshxsh/pythonProject
美女壁纸-bs4.py
美女壁纸-bs4.py
py
585
python
en
code
0
github-code
1
[ { "api_name": "requests.get", "line_number": 8, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 10, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 15, "usage_type": "call" } ]
31636756521
from StringIO import StringIO from lxml import etree import requests #NLM DTD is at http://dtd.nlm.nih.gov/archiving/3.0/archivearticle3.dtd r = requests.get('http://dtd.nlm.nih.gov/archiving/3.0/archivearticle3.dtd') NLM_DTD = r.text dtd = etree.DTD(StringIO(NLM_DTD)) root = etree.XML("<foo/>") print(dtd.validate...
elifesciences/elife-poa-xml-generation
validate.py
validate.py
py
1,009
python
en
code
1
github-code
1
[ { "api_name": "requests.get", "line_number": 6, "usage_type": "call" }, { "api_name": "lxml.etree.DTD", "line_number": 9, "usage_type": "call" }, { "api_name": "lxml.etree", "line_number": 9, "usage_type": "name" }, { "api_name": "StringIO.StringIO", "line_num...
71015525475
#!/usr/bin/env python3 """Get the minimum distance ** 2 among the given points. >>> main("testcases/test_100000_1") 0 >>> main("testcases/test_10000_1") 144 >>> main("testcases/test_1000_1") 200 >>> main("testcases/test_uniform") 3969 """ import math import fileinput from collections import defaultdict...
yskang/AlgorithmPractice
baekjoon/python/closest_two_point_2261.py
closest_two_point_2261.py
py
3,400
python
en
code
1
github-code
1
[ { "api_name": "fileinput.input", "line_number": 29, "usage_type": "call" }, { "api_name": "math.hypot", "line_number": 56, "usage_type": "call" }, { "api_name": "math.floor", "line_number": 57, "usage_type": "call" }, { "api_name": "math.sqrt", "line_number": ...
17329945888
""" bid_frame.py represents the abstract frame for different types of auctions. """ __author__ = "Max Chan, Nick Chua" # Library import from tkinter import * from datetime import datetime from abc import ABC # File import from Controller.bid_controller import BidController from View.abstract_frames import AbstractFr...
itsMoxMox/fit3077
View/abstract_frames/bid_frame.py
bid_frame.py
py
5,282
python
en
code
0
github-code
1
[ { "api_name": "View.abstract_frames.AbstractFrame", "line_number": 19, "usage_type": "name" }, { "api_name": "abc.ABC", "line_number": 19, "usage_type": "name" }, { "api_name": "View.abstract_frames.AbstractFrame.__init__", "line_number": 25, "usage_type": "call" }, {...
29262785888
import pygame from pygame.sprite import Sprite class Alien(Sprite): """a single alien class""" def __init__(self, ai_settings, screen): """init alien set""" super(Alien, self).__init__() self.screen = screen self.ai_settings = ai_settings #load alien image, set it as r...
miasen939/alien_invasion
alien.py
alien.py
py
745
python
en
code
0
github-code
1
[ { "api_name": "pygame.sprite.Sprite", "line_number": 4, "usage_type": "name" }, { "api_name": "pygame.image.load", "line_number": 14, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 14, "usage_type": "attribute" } ]
19609182885
#!/usr/bin/python3 '''This module contains one class, HBNBCommand''' import cmd import sys import models import json from models.engine.file_storage import FileStorage from models.amenity import Amenity from models.base_model import BaseModel from models.city import City from models.place import Place from models.revi...
komerela/AirBnB_clone_v1
console.py
console.py
py
5,397
python
en
code
0
github-code
1
[ { "api_name": "cmd.Cmd", "line_number": 18, "usage_type": "attribute" }, { "api_name": "json.loads", "line_number": 37, "usage_type": "call" }, { "api_name": "models.base_model.BaseModel", "line_number": 73, "usage_type": "argument" }, { "api_name": "models.storag...
12828599322
#!/usr/bin/python # -*- coding: utf-8 -*- ''' 4.11 同时迭代多个序列 Created on 2016年9月2日 @author: wang ''' xpts = [1, 5, 4, 2, 10, 7] ypts = [101, 78, 37, 15, 62, 99] for x, y in zip(xpts, ypts): print(x, y) a = [1, 2, 3] b = ['w', 'y', 'z', 'x'] for x, y in zip(a, b): print(x, y) from itertoo...
hejiawang/PythonCookbook
src/four/11.py
11.py
py
555
python
en
code
0
github-code
1
[ { "api_name": "itertools.zip_longest", "line_number": 21, "usage_type": "call" }, { "api_name": "itertools.zip_longest", "line_number": 23, "usage_type": "call" } ]
467656577
import spotipy import sys import pandas as pd import numpy as np from spotipy.oauth2 import SpotifyClientCredentials from get_data import get_audio_features, get_songs, get_playlist_ID, preprocess_data from model import separate_features, split_data, kNN_model, rf_model, logreg_model, mlp_model import argparse import s...
prathik-naidu/Spotify-Music-Analytics
predict.py
predict.py
py
2,747
python
en
code
6
github-code
1
[ { "api_name": "spotipy.oauth2.SpotifyClientCredentials", "line_number": 16, "usage_type": "call" }, { "api_name": "spotipy.Spotify", "line_number": 17, "usage_type": "call" }, { "api_name": "spotipy.util.prompt_for_user_token", "line_number": 23, "usage_type": "call" },...
26212538295
# -*- coding: utf-8 -*- from odoo import api, fields, models, _ from odoo.exceptions import ValidationError from datetime import datetime class AflowzSchoolPolling(models.Model): _name = 'aflowz.school.polling' _description = 'Aflowz School Polling' _inherit = ['mail.thread'] name = fields.Char(requi...
FRFirdaus/aflowz_school
aflowz_school/models/aflowz_school_polling.py
aflowz_school_polling.py
py
5,583
python
en
code
0
github-code
1
[ { "api_name": "odoo.models.Model", "line_number": 7, "usage_type": "attribute" }, { "api_name": "odoo.models", "line_number": 7, "usage_type": "name" }, { "api_name": "odoo.fields.Char", "line_number": 12, "usage_type": "call" }, { "api_name": "odoo.fields", "...
36066718460
# -*- coding: utf-8 -*- """ Created on Wed Jun 21 11:23:57 2023 @author: athar """ import pandas as pd import numpy as np import matplotlib.pyplot as plt path = r"C:\Users\athar\OneDrive\Desktop\Machine learning\Projects\SimpleLinearRegressionDataset\HtWt.csv" df = pd.read_csv(path) X = df['Height']...
atharvakalele/Machine_Learning
Projects/SImpleLinearRegression_4.py
SImpleLinearRegression_4.py
py
1,299
python
en
code
0
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 14, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.scatter", "line_number": 21, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 21, "usage_type": "name" }, { "api_name": "matplotli...
13387915055
from fixture import DataSet from datetime import datetime, date, time class UserData(DataSet): class LoggedInUser: id = 101 username = "test_public" first_name = "TestPublic" last_name = "Public", email = "test.public@parthenonsoftware.com" raw_password = "password"...
fenriz07/flask-hippooks
hipcooks/fixtures.py
fixtures.py
py
7,044
python
en
code
2
github-code
1
[ { "api_name": "fixture.DataSet", "line_number": 5, "usage_type": "name" }, { "api_name": "fixture.DataSet", "line_number": 56, "usage_type": "name" }, { "api_name": "fixture.DataSet", "line_number": 72, "usage_type": "name" }, { "api_name": "fixture.DataSet", ...
34091916829
from math import cos, radians import matplotlib.pyplot as plt import numpy as np def finger_path(phase): """ If you plot this function it is a graph of the motion of each finger phase: 0-259, phase the finger is in returns: angle: offset angle from finger's step start position z: heigh...
neutronztar/Pivot
MicroPython/testing/bunga.py
bunga.py
py
876
python
en
code
5
github-code
1
[ { "api_name": "math.cos", "line_number": 21, "usage_type": "call" }, { "api_name": "math.radians", "line_number": 21, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.xlim", "line_number": 38, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", ...
12062159317
#!/usr/bin/env python import warnings warnings.simplefilter(action='ignore', category=FutureWarning) import numpy as np import pandas as pd #warnings.resetwarnings() import re import os import time import argparse import prob_dist as prob import fano_calc as fc import resfuncRead as rfr import time from argparse impor...
villano-lab/nrFano_paper2019
python/sig_diff.py
sig_diff.py
py
6,154
python
en
code
2
github-code
1
[ { "api_name": "warnings.simplefilter", "line_number": 4, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 29, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 44, "usage_type": "call" }, { "api_name": "pandas.r...
30079951396
import time import requests import pandas as pd from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.firefox.options import Options import json import os print("Opening web browser ") url = "https://www.fifa.com/fifa-world-ranking/men" option = Options() option.headless = True driver =...
mnluan/web_scrapping
rankingFIFA.py
rankingFIFA.py
py
1,677
python
en
code
0
github-code
1
[ { "api_name": "selenium.webdriver.firefox.options.Options", "line_number": 13, "usage_type": "call" }, { "api_name": "selenium.webdriver.Firefox", "line_number": 15, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 15, "usage_type": "name" }, ...
74736765474
import json from typing import TYPE_CHECKING, Optional, Iterable from boxsdk.object.base_object import BaseObject from ..pagination.marker_based_object_collection import MarkerBasedObjectCollection from ..util.api_call_decorator import api_call if TYPE_CHECKING: from boxsdk.object.user import User from boxsdk...
box/box-python-sdk
boxsdk/object/task.py
task.py
py
2,694
python
en
code
395
github-code
1
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 8, "usage_type": "name" }, { "api_name": "boxsdk.object.base_object.BaseObject", "line_number": 14, "usage_type": "name" }, { "api_name": "json.dumps", "line_number": 38, "usage_type": "call" }, { "api_name": "u...
10563716155
from pathlib import Path import pytest import time import json import platform from usb_audio_test_utils import ( check_analyzer_output, get_xtag_dut, XrunDut, XsigInput, ) from conftest import list_configs, get_config_features def OS_uncollect(features, board, config): if ( platform.syst...
xmos/sw_usb_audio
tests/test_loopback.py
test_loopback.py
py
2,914
python
en
code
16
github-code
1
[ { "api_name": "platform.system", "line_number": 18, "usage_type": "call" }, { "api_name": "conftest.get_config_features", "line_number": 27, "usage_type": "call" }, { "api_name": "usb_audio_test_utils.get_xtag_dut", "line_number": 28, "usage_type": "call" }, { "ap...
32205008255
import librosa import joblib import numpy as np import pandas as pd from typing import List # Load the StandardScaler used during training scaler = joblib.load("./resources/standard_scaler_pytorch_model_last.pkl") def audio_to_csv(audio) -> List[pd.DataFrame]: dfs = [] segments = get_3sec_sample(audio) ...
Pindice/Music
modules/preprocessing.py
preprocessing.py
py
4,246
python
en
code
0
github-code
1
[ { "api_name": "joblib.load", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 84, "usage_type": "call" }, { "api_name": "typing.List", "line_number": 14, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line...
20643232235
import sys import os import math from random import randint import networkx as nx # import matplotlib.pyplot as plt import random from networkx.readwrite import json_graph # 0 ≤ β ≤ 1 0\leq \beta \leq 1 and N ≫ K ≫ ln ⁡ N ≫ 1 {\displaystyle N\gg K\gg \ln N\gg 1} # num_nodes = 1024 # k = 50 # num_nodes = 512 # k = 28...
shishirrraic/LB-Spiral
network_generator.py
network_generator.py
py
6,044
python
en
code
0
github-code
1
[ { "api_name": "random.randint", "line_number": 31, "usage_type": "call" }, { "api_name": "networkx.shortest_path_length", "line_number": 37, "usage_type": "call" }, { "api_name": "networkx.eccentricity", "line_number": 38, "usage_type": "call" }, { "api_name": "ne...
10001371754
import cv2 import numpy as np from IMP_SD import computeHOGs,get_svm_detector if __name__ == '__main__': # 第一步计算HOG特征 gradien_list = [] labels = [] hard_neg_list = [] # 正样本以及label导入 # pos_num, gradien_list_pos = computeHOGs('C:\\Users\\SLJ\\Desktop\\OCR_Project\\sample_R') pos_num, gradi...
SWSWswswZJU/OCR_Relative
TrainHOG.py
TrainHOG.py
py
2,567
python
en
code
0
github-code
1
[ { "api_name": "IMP_SD.computeHOGs", "line_number": 14, "usage_type": "call" }, { "api_name": "IMP_SD.computeHOGs", "line_number": 17, "usage_type": "call" }, { "api_name": "cv2.ml.SVM_create", "line_number": 23, "usage_type": "call" }, { "api_name": "cv2.ml", ...
26406619282
import json import os import datetime import tarfile import torch import warnings import copy import yaml from . import constants from ... import utils from . import datasets from . import training from . import compilation from .params import init_params from . import descriptions class ModelRunner(): @classmet...
TexasInstruments/edgeai-modelmaker
edgeai_modelmaker/ai_modules/vision/runner.py
runner.py
py
11,088
python
en
code
9
github-code
1
[ { "api_name": "params.init_params", "line_number": 22, "usage_type": "call" }, { "api_name": "torch.hub.set_dir", "line_number": 25, "usage_type": "call" }, { "api_name": "torch.hub", "line_number": 25, "usage_type": "attribute" }, { "api_name": "os.path.join", ...
26809118520
#!/bin/env python import time from datetime import datetime import numpy as np import pandas as pd from sportsipy.nfl.boxscore import Boxscore, Boxscores from definitions import ( AGG_DROP_COLS, AGG_MERGE_ON, AGG_RENAME_AWAY, AGG_RENAME_HOME, AWAY_STATS, AWAY_STATS_DROP, ELO_DATA_URL, ...
mitch-avis/nfl-predictor
src/data_collection.py
data_collection.py
py
17,657
python
en
code
0
github-code
1
[ { "api_name": "datetime.datetime.strptime", "line_number": 30, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 30, "usage_type": "name" }, { "api_name": "datetime.datetime.strptime", "line_number": 32, "usage_type": "call" }, { "api_name"...
33160864962
import asyncio import copy import json import re import uuid from datetime import datetime from async_generator import aclosing from jupyterhub.utils import maybe_future from jupyterhub.utils import url_path_join from traitlets import Callable from traitlets import Dict from traitlets import Union from .backendspawne...
kreuzert/jupyterhub-backendspawner
backendspawner/eventspawner.py
eventspawner.py
py
10,280
python
en
code
2
github-code
1
[ { "api_name": "backendspawner.BackendSpawner", "line_number": 18, "usage_type": "name" }, { "api_name": "copy.deepcopy", "line_number": 33, "usage_type": "call" }, { "api_name": "datetime.datetime.strptime", "line_number": 38, "usage_type": "call" }, { "api_name":...
25206615587
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jun 26 08:24:46 2019 "Brown Corpus Analysis" @author: Singh Gagan Deep The Brown Corpus was the first million-word electronic corpus of English, created in 1961 at Brown University. This corpus contains text from 500 sources, and the sources have been...
Gagan40/NLP_Learn
brown_Corpus_Analysis.py
brown_Corpus_Analysis.py
py
2,217
python
en
code
0
github-code
1
[ { "api_name": "nltk.corpus.brown.categories", "line_number": 18, "usage_type": "call" }, { "api_name": "nltk.corpus.brown", "line_number": 18, "usage_type": "name" }, { "api_name": "nltk.corpus.brown.words", "line_number": 26, "usage_type": "call" }, { "api_name":...
26064580319
import argparse import os import random import shutil import time import warnings from tqdm import tqdm from typing import Callable, Optional import faiss import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim import torch.utils.data from torch.utils.data im...
UCDvision/low-budget-al
sampler.py
sampler.py
py
15,075
python
en
code
13
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 69, "usage_type": "call" }, { "api_name": "os.path", "line_number": 69, "usage_type": "attribute" }, { "api_name": "os.makedirs", ...
36930660381
from django.shortcuts import render, redirect from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from . import servise from .forms import * def login_required_decorator(f): return login_required(f, login_url="login") # @login_required_decorator ...
islombek-boboyorov/burger
mysite/spicyo/views.py
views.py
py
2,340
python
en
code
0
github-code
1
[ { "api_name": "django.contrib.auth.decorators.login_required", "line_number": 9, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 24, "usage_type": "call" }, { "api_name": "django.contrib.auth.authenticate", "line_number": 31, "usage_type": ...
10805770602
from data import question_data from quiz_brain import QuizBrain import random class Main: def __init__(self, index): self.index = index def play(self): self.index = random.randint(0, len(question_data) - 1) quiz = QuizBrain(self.index) return quiz.check_answer() while True: ...
krasenHristov/pythonL
OOP/quiz_game/main.py
main.py
py
625
python
en
code
1
github-code
1
[ { "api_name": "random.randint", "line_number": 11, "usage_type": "call" }, { "api_name": "data.question_data", "line_number": 11, "usage_type": "argument" }, { "api_name": "quiz_brain.QuizBrain", "line_number": 12, "usage_type": "call" } ]
2737478756
import scrapy import time limit = False infty = 1000000 class Player(scrapy.Item): name = scrapy.Field() team = scrapy.Field() passport = scrapy.Field() birth_date = scrapy.Field() height = scrapy.Field() position = scrapy.Field() class NewSpider(scrapy.Spider): name = 'players' def ...
handedeemirci/Webscraping-PolishBasketballLeague-UW2023
scrapy/suzuki/spiders/players.py
players.py
py
1,326
python
en
code
0
github-code
1
[ { "api_name": "scrapy.Item", "line_number": 7, "usage_type": "attribute" }, { "api_name": "scrapy.Field", "line_number": 8, "usage_type": "call" }, { "api_name": "scrapy.Field", "line_number": 9, "usage_type": "call" }, { "api_name": "scrapy.Field", "line_numb...
9748320846
''' READ THIS! caption have been exracted into the variable 'caption' ''' import os import shutil from instaloader import Post import instaloader url = 'https://www.instagram.com/reel/Ce85ucDFx_F/?utm_source=ig_web_copy_link' k = url.split("/") url =...
AnsahMohammad/Hackmanthan
InstaPost.py
InstaPost.py
py
796
python
en
code
0
github-code
1
[ { "api_name": "instaloader.Instaloader", "line_number": 18, "usage_type": "call" }, { "api_name": "instaloader.Post.from_shortcode", "line_number": 19, "usage_type": "call" }, { "api_name": "instaloader.Post", "line_number": 19, "usage_type": "name" }, { "api_name...
4966719236
from setuptools import setup, find_packages version = '0.0.1' setup(name="helga-naked-ping", version=version, description=('annoy users who insist (or have no idea) on naked pings'), classifiers=['Development Status :: 1 - Beta', 'Environment :: IRC', 'Intended ...
alfredodeza/helga-naked-ping
setup.py
setup.py
py
1,022
python
en
code
0
github-code
1
[ { "api_name": "setuptools.setup", "line_number": 5, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 21, "usage_type": "call" } ]
2556952859
import vcf import numpy as np def get_all_gt(records: vcf.Reader) -> list: """ Receiving all genotype values from vcf.Reader records :param records: vcf.Reader records :return: list with all genotype values """ all_gt_values = list() for row in records: samples = row.samples ...
Mil-m/bioinf-VAF_profile-barcode-mutations
calculate_VAF.py
calculate_VAF.py
py
4,016
python
en
code
0
github-code
1
[ { "api_name": "vcf.Reader", "line_number": 5, "usage_type": "attribute" }, { "api_name": "vcf.Reader", "line_number": 23, "usage_type": "attribute" }, { "api_name": "numpy.matrix", "line_number": 82, "usage_type": "call" }, { "api_name": "numpy.array", "line_n...
16854851533
""" Pre-Processing 1. The JSON file is processed to extract raw data and store it. 2. Raw data is converted to a data frame and processed to filter non-English characters. 3. Messages containing SHIB and DODGE are kept. """ # Libraries from tqdm import tqdm import json import argparse import pandas as pd # Creates an...
paritoshsinghrahar/telegram_crawler
preprocessing.py
preprocessing.py
py
2,447
python
en
code
0
github-code
1
[ { "api_name": "pandas.DataFrame", "line_number": 16, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line_number": 45, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line_number": 59, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "l...
18355212386
from datetime import datetime import argparse import kudu from kudu.client import Partitioning # Parse arguments parser = argparse.ArgumentParser(description='Basic Example for Kudu Python.') parser.add_argument('--masters', '-m', nargs='+', default='localhost', help='The master address(es) to co...
apache/kudu
examples/python/basic-python-example/basic_example.py
basic_example.py
py
2,191
python
en
code
1,762
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 9, "usage_type": "call" }, { "api_name": "kudu.connect", "line_number": 18, "usage_type": "call" }, { "api_name": "kudu.schema_builder", "line_number": 21, "usage_type": "call" }, { "api_name": "kudu.int64", ...
28522705093
from BaseUserHandler import * import datetime as dt class ResaveExercisesHandler(BaseUserHandler): async def get(self, course_id, assignment_id): try: if self.is_administrator or await self.is_instructor_for_course(course_id) or await self.is_assistant_for_course(course_id): cou...
srp33/CodeBuddy
front_end/server/handlers/ResaveExercisesHandler.py
ResaveExercisesHandler.py
py
1,945
python
en
code
8
github-code
1
[ { "api_name": "datetime.datetime.utcnow", "line_number": 17, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 17, "usage_type": "attribute" } ]
36068249065
from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.forms import UserCreationForm from django.forms import TextInput, EmailInput, PasswordInput from cloudinary.forms import cl_init_js_callbacks class SignupForm(UserCreationForm): class Meta(UserCreationForm.Meta):...
clara-lancelle/shareyourplate
authentication/forms.py
forms.py
py
832
python
en
code
0
github-code
1
[ { "api_name": "django.contrib.auth.forms.UserCreationForm", "line_number": 7, "usage_type": "name" }, { "api_name": "django.contrib.auth.forms.UserCreationForm.Meta", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.contrib.auth.forms.UserCreationForm", "l...
20191142944
import datetime as dt import pytz import json import os from typing import Any, List, Tuple from operator import attrgetter, itemgetter import matplotlib.pyplot as plt import numpy as np import pandas as pd import pandas_datareader as web import seaborn as sns from functools import wraps from dotenv import load_dotenv...
raphtlw/crypto-price-predictor
src/telegram-bot.py
telegram-bot.py
py
9,734
python
en
code
1
github-code
1
[ { "api_name": "dotenv.load_dotenv", "line_number": 25, "usage_type": "call" }, { "api_name": "pytz.timezone", "line_number": 37, "usage_type": "call" }, { "api_name": "telegram.ext.callbackcontext.CallbackContext", "line_number": 40, "usage_type": "name" }, { "api...
42643117573
import shodan import socket from pprint import pprint as pp import json from openpyxl import Workbook from openpyxl import styles import argparse import sys from dotenv import load_dotenv import os from tqdm import tqdm parser = argparse.ArgumentParser( prog='shodanscanner', description='Simple script to bul...
aerodiduch/shodanscanner
shodanscanner.py
shodanscanner.py
py
4,339
python
en
code
2
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 15, "usage_type": "call" }, { "api_name": "openpyxl.Workbook", "line_number": 52, "usage_type": "name" }, { "api_name": "openpyxl.styles.Font", "line_number": 79, "usage_type": "call" }, { "api_name": "openpy...
36170356261
from typing import Any, Callable, Iterable, List from volatility3.framework import interfaces, renderers from volatility3.framework.configuration import requirements from volatility3.framework.objects import utility from volatility3.framework.renderers import format_hints from volatility3.framework.symbols import inte...
volatilityfoundation/volatility3
volatility3/framework/plugins/linux/pslist.py
pslist.py
py
7,386
python
en
code
1,879
github-code
1
[ { "api_name": "volatility3.framework.interfaces.plugins", "line_number": 12, "usage_type": "attribute" }, { "api_name": "volatility3.framework.interfaces", "line_number": 12, "usage_type": "name" }, { "api_name": "volatility3.framework.configuration.requirements.ModuleRequirement...
25650715659
from django.contrib import admin from repairshop.models import SubCategory # Class to control how to display SubCategory on admin page class SubCategoriesAdmin(admin.ModelAdmin): list_display = ["name", "url", "position", "image", "blank"] list_display_links = ["name"] list_editable = ["position"] se...
bmyronov/eremont
repairshop/admin/sub_category.py
sub_category.py
py
482
python
en
code
0
github-code
1
[ { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 7, "usage_type": "name" }, { "api_name": "django.contrib.admin.site.register", "line_number": 16, "usage_type": "call" },...
39571750898
import json class json_setting: def __init__(self, file:str) -> None: self.file = file def loging(self, massage) -> None: with open('history.txt', 'a+') as file: file.write(f'{massage}\n') def get_json(self) -> dict: with open(f"{self.file}", "r+") as json_file: ...
KASSAS20/learn_python
inventory_JSON/main.py
main.py
py
2,219
python
en
code
0
github-code
1
[ { "api_name": "json.load", "line_number": 13, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 17, "usage_type": "call" } ]
10110617943
#!/usr/bin/env python3 """ Download JENDL data from JAEA and convert it to a HDF5 library for use with OpenMC. """ import argparse import ssl from multiprocessing import Pool from pathlib import Path from urllib.parse import urljoin import openmc.data from openmc_data import download, extract, process_neutron, state...
openmc-data-storage/openmc_data
src/openmc_data/generate/generate_jendl.py
generate_jendl.py
py
4,581
python
en
code
null
github-code
1
[ { "api_name": "argparse.ArgumentDefaultsHelpFormatter", "line_number": 18, "usage_type": "attribute" }, { "api_name": "argparse.RawDescriptionHelpFormatter", "line_number": 19, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "line_number": 23, "usage...
11479906122
from flask import Flask, request import argparse import boto3 import json from tqdm import tqdm # Set up the Flask app app = Flask(__name__) # Set the values of the configuration, destination, and files variables config = "" dest = "" files = [] @app.route("/", methods=["GET", "POST"]) def index(): if request.me...
OrShmuel22/boto3_searchfile
s3_search.py
s3_search.py
py
2,531
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 17, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 17, "usage_type": "name" }, { "api_name": "flask.request.form...
24808861508
# https://github.com/rdegges/pelican-minify # Not used anymore, see gulpfile.js at root import os import htmlmin import rcssmin import jsmin import pelican def minify_html(filename): with open(filename, 'r') as f: # Read file to minify uncompressed = f.read() with open(filename, 'w') as f: ...
lucas-santoni/blog.geographer.fr
plugins/minify/minify.py
minify.py
py
1,909
python
en
code
4
github-code
1
[ { "api_name": "htmlmin.minify", "line_number": 18, "usage_type": "call" }, { "api_name": "rcssmin.cssmin", "line_number": 29, "usage_type": "call" }, { "api_name": "jsmin.jsmin", "line_number": 40, "usage_type": "call" }, { "api_name": "os.walk", "line_number"...
74149748832
# -*- coding: utf-8 -*- """ Created on Mon Feb 21 14:18:27 2022 @author: mamun Face Recognition Face recognition problems commonly fall into one of two categories: Face Verification "Is this the claimed person?" For example, at some airports, you can pass through customs by letting a system scan your passport an...
mamunrushdi/face_recognition
face_recognition.py
face_recognition.py
py
18,244
python
en
code
0
github-code
1
[ { "api_name": "tensorflow.keras.backend.set_image_data_format", "line_number": 49, "usage_type": "call" }, { "api_name": "tensorflow.keras.backend", "line_number": 49, "usage_type": "name" }, { "api_name": "tensorflow.keras.models.model_from_json", "line_number": 87, "usa...
36810385194
import argparse import sys import os import TitaniaTest def parse_args() -> argparse.Namespace: # parse command line argument parser = argparse.ArgumentParser(description="Titania Testing") parser.add_argument('--output', type=str, default=".", help="\ Folderpath to store test results. \n \ ...
i3drobotics/titania-testing
run.py
run.py
py
7,169
python
en
code
0
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 9, "usage_type": "call" }, { "api_name": "argparse.Namespace", "line_number": 7, "usage_type": "attribute" }, { "api_name": "TitaniaTest.enableCameraEmulation", "line_number": 87, "usage_type": "call" }, { "a...
74726793312
from lib.cohort import Cohort from lib.student import Student class CohortRepository(): def __init__(self, connection): self.connection = connection def find_with_students(self, cohort_id): rows = self.connection.execute( "SELECT cohorts.id, cohorts.name, cohorts.start_date, stude...
TomMazzag/Makers-Learning
Week 5 - Databases/Find_with/lib/cohort_repository.py
cohort_repository.py
py
826
python
en
code
0
github-code
1
[ { "api_name": "lib.student.Student", "line_number": 17, "usage_type": "call" }, { "api_name": "lib.cohort.Cohort", "line_number": 21, "usage_type": "call" } ]
32185064776
import argparse import datetime import random import socket import struct from binascii import hexlify from copy import copy from impacket.krb5 import constants from impacket.krb5.asn1 import AS_REQ, KERB_PA_PAC_REQUEST, seq_set, seq_set_iter, KRB_ERROR, AS_REP, METHOD_DATA, \ ETYPE_INFO2, ETYPE_INFO, PA_ENC_TS_EN...
Amulab/CAudit
plugins/AD/Plugin_AD_Exploit_ASRepRoasting.py
Plugin_AD_Exploit_ASRepRoasting.py
py
14,610
python
en
code
250
github-code
1
[ { "api_name": "plugins.AD.PluginAdExploitBase", "line_number": 27, "usage_type": "name" }, { "api_name": "utils.consts.AllPluginTypes.Exploit", "line_number": 30, "usage_type": "attribute" }, { "api_name": "utils.consts.AllPluginTypes", "line_number": 30, "usage_type": "n...
37272849998
import datetime import time import typing import boto3 import pytest DEFAULT_WAIT_UNTIL_TIMEOUT_SECONDS = 60*10 DEFAULT_WAIT_UNTIL_INTERVAL_SECONDS = 15 DEFAULT_WAIT_UNTIL_DELETED_TIMEOUT_SECONDS = 60*10 DEFAULT_WAIT_UNTIL_DELETED_INTERVAL_SECONDS = 15 ProxyMatchFunc = typing.NewType( 'ProxyMatchFunc', typin...
aws-controllers-k8s/rds-controller
test/e2e/db_proxy.py
db_proxy.py
py
3,439
python
en
code
58
github-code
1
[ { "api_name": "typing.NewType", "line_number": 13, "usage_type": "call" }, { "api_name": "typing.Callable", "line_number": 15, "usage_type": "attribute" }, { "api_name": "datetime.datetime.now", "line_number": 50, "usage_type": "call" }, { "api_name": "datetime.da...
22801704554
import pygame,sys,math,time,copy,datetime,json import numpy as np SCREEN_WIDTH = 500 SCREEN_HEIGHT = 500 WHITE = (255, 255, 255) ORANGE = (255, 127, 0) BLACK = (0, 0, 0) G = 6.673 * 1e-11 M_SUN = 1.98892e+30 M_EARTH = 5.9722e+24 camSize = 1 def add_h(arg): h = 1e-6 return int(arg/(camSize+h)) def addTwo...
unknownbox-collab/gargantua
main.py
main.py
py
8,166
python
en
code
0
github-code
1
[ { "api_name": "numpy.array", "line_number": 20, "usage_type": "call" }, { "api_name": "math.cos", "line_number": 20, "usage_type": "call" }, { "api_name": "math.radians", "line_number": 20, "usage_type": "call" }, { "api_name": "math.sin", "line_number": 20, ...
17617829594
import cv2 import numpy as np import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' from utils import detect_faces, predict_face, StatsStore, emotions, overlay_emoji cap = cv2.VideoCapture(0) stats = StatsStore({emot:0 for emot in emotions}) ret, frame = cap.read() while (ret == True): ret, frame = cap.read() ...
Core9nvidia/behavioural-assessment
code/emotion_detect.py
emotion_detect.py
py
1,507
python
en
code
0
github-code
1
[ { "api_name": "os.environ", "line_number": 4, "usage_type": "attribute" }, { "api_name": "cv2.VideoCapture", "line_number": 8, "usage_type": "call" }, { "api_name": "utils.StatsStore", "line_number": 11, "usage_type": "call" }, { "api_name": "utils.emotions", ...
30209391413
import numpy as np import torch from botorch.acquisition.cost_aware import InverseCostWeightedUtility from botorch.acquisition import PosteriorMean from botorch.acquisition.knowledge_gradient import qMultiFidelityKnowledgeGradient from botorch.acquisition.fixed_feature import FixedFeatureAcquisitionFunction from botorc...
yiping514/LMGP
lmgp_pytorch/bayesian_optimizations/bo_steps.py
bo_steps.py
py
6,790
python
en
code
0
github-code
1
[ { "api_name": "lmgp_pytorch.optim.fit_model_scipy", "line_number": 42, "usage_type": "call" }, { "api_name": "botorch.models.gp_regression_fidelity.SingleTaskMultiFidelityGP", "line_number": 66, "usage_type": "call" }, { "api_name": "botorch.models.transforms.outcome.Standardize"...