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
33654948642
import unittest from onnx import defs, helper from onnx.onnx_pb2 import NodeProto class TestRelu(unittest.TestCase): def test_relu(self): self.assertTrue(defs.has('Relu')) node_def = helper.make_node( 'Relu', ['X'], ['Y']) if __name__ == '__main__': unittest.main()
tianyaoZhang/myONNX
onnx/test/relu_test.py
relu_test.py
py
307
python
en
code
0
github-code
36
[ { "api_name": "unittest.TestCase", "line_number": 7, "usage_type": "attribute" }, { "api_name": "onnx.defs.has", "line_number": 10, "usage_type": "call" }, { "api_name": "onnx.defs", "line_number": 10, "usage_type": "name" }, { "api_name": "onnx.helper.make_node",...
73527120745
''' candidate generation: writes a pickle file of candidates ''' import sys import nltk import numpy as np from ncbi_normalization import load, sample from ncbi_normalization.parse_MEDIC_dictionary import concept_obj from normalize import dump_data, load_data, load_mentions from gensim.models import KeyedVectors ...
fshdnc/nor-bert
src/candidate_generation.py
candidate_generation.py
py
6,793
python
en
code
0
github-code
36
[ { "api_name": "gensim.models.KeyedVectors.load_word2vec_format", "line_number": 26, "usage_type": "call" }, { "api_name": "gensim.models.KeyedVectors", "line_number": 26, "usage_type": "name" }, { "api_name": "numpy.random.uniform", "line_number": 39, "usage_type": "call"...
18252621901
from typing import List class Solution: def minStartValue1(self, nums: List[int]) -> int: n = len(nums) m = 100 left = 1 right = m * n + 1 while left < right: middle = (left + right) // 2 total = middle is_valid = True for num...
hujienan/Jet-Algorithm
leetcode/1413. Minimum Value to Get Positive Step by Step Sum/index.py
index.py
py
951
python
en
code
0
github-code
36
[ { "api_name": "typing.List", "line_number": 5, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 25, "usage_type": "name" } ]
72300794345
import sys from osgeo import gdal, osr class GDALUtilities: """ This class has the following capabilities 1. Get raster info 2. Read image band as an array 3. Reproject a raster """ def __init__(self, path): self.path = path def get_raster_info(self): self.datas...
manojappalla/RSGIS-Tutorials
gdal_tutorials/gdal_utilities.py
gdal_utilities.py
py
2,135
python
en
code
0
github-code
36
[ { "api_name": "osgeo.gdal.Open", "line_number": 19, "usage_type": "call" }, { "api_name": "osgeo.gdal", "line_number": 19, "usage_type": "name" }, { "api_name": "osgeo.gdal.GA_ReadOnly", "line_number": 19, "usage_type": "attribute" }, { "api_name": "osgeo.gdal.Ope...
20761353624
import math import numpy as np import statistics import random import time import matplotlib.pyplot as plt h = 40 limit_number_of_taken_values = 200 nb_of_initial_values = 100 nb_of_Dthet = 100 Dthets = [(i * 1 / nb_of_Dthet) for i in range(nb_of_Dthet)] # thet step for ARL function # sigs = [(0.5 + i/nb_of_sensor...
gwenmaudet/PhD_main
detection_step_signal/GLR.py
GLR.py
py
17,337
python
en
code
0
github-code
36
[ { "api_name": "random.randint", "line_number": 28, "usage_type": "call" }, { "api_name": "random.random", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.random.normal", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.random", "...
24390096374
from itertools import chain from . import builder from .. import options as opts, safe_str, shell from .common import Builder, choose_builder, SimpleBuildCommand from ..file_types import HeaderFile, SourceFile from ..iterutils import iterate from ..languages import known_langs from ..path import Path from ..versioning...
jimporter/bfg9000
bfg9000/tools/qt.py
qt.py
py
7,250
python
en
code
73
github-code
36
[ { "api_name": "languages.known_langs.make", "line_number": 15, "usage_type": "call" }, { "api_name": "languages.known_langs", "line_number": 15, "usage_type": "name" }, { "api_name": "languages.known_langs.make", "line_number": 18, "usage_type": "call" }, { "api_n...
38164677251
import math import matplotlib.pyplot as plt import numpy as np from matplotlib import gridspec from scipy.special import factorial from plot.plot_data import plot_matrixImage def normalize(X): f_min, f_max = X.min(), X.max() return (X - f_min) / (f_max - f_min) def gabor_kernel_2(frequency, sigma_x, sigma...
franzigeiger/training_reductions
utils/gabors.py
gabors.py
py
5,020
python
en
code
3
github-code
36
[ { "api_name": "numpy.floor", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.mgrid", "line_number": 18, "usage_type": "attribute" }, { "api_name": "numpy.cos", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.sin", "line_number":...
70553069544
import os, datetime, time import torch import torch.optim as optim import numpy as np import math import cv2 import tqdm import config import constants from utils.trainer_utils import ( AverageMeter, get_HHMMSS_from_second, save_checkpoint, save_all_img, save_joints3d_img, save_mesh, save...
JunukCha/SSPSE
trainer.py
trainer.py
py
45,916
python
en
code
6
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 131, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 131, "usage_type": "attribute" }, { "api_name": "datetime.datetime.strftime", "line_number": 132, "usage_type": "call" }, { "api_na...
22313884437
from django.core.management.base import BaseCommand from import_data.models import OuraMember, FitbitMember, GoogleFitMember from retrospective.tasks import ( update_fitbit_data, update_oura_data, update_googlefit_data, ) import time import requests class Command(BaseCommand): help = "Updates all data...
OpenHumans/quantified-flu
import_data/management/commands/update_data_imports.py
update_data_imports.py
py
1,148
python
en
code
24
github-code
36
[ { "api_name": "django.core.management.base.BaseCommand", "line_number": 12, "usage_type": "name" }, { "api_name": "requests.get", "line_number": 17, "usage_type": "call" }, { "api_name": "import_data.models.OuraMember.objects.all", "line_number": 19, "usage_type": "call" ...
11514166585
from hashlib import sha1 from json import dump from os import makedirs apps = { 'apps': [ 'club.postdata.covid19cuba', 'com.codestrange.www.cuba_weather', 'com.cubanopensource.todo', ] } def main(): result = {} makedirs('api', exist_ok=True) with open(f'api/apps.json', mo...
leynier/cubaopenplay.github.io
app/main.py
main.py
py
725
python
en
code
3
github-code
36
[ { "api_name": "os.makedirs", "line_number": 17, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 19, "usage_type": "call" }, { "api_name": "hashlib.sha1", "line_number": 22, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 25,...
5881104834
import array import binascii import configparser import datetime import io import logging import os import signal import sys import time try: import serial except ImportError: pass ModulSerialMissing = True ################################################################################ # Constants BUILDVERSION ...
nasrudin2468/pye-motion
pye-motion.py
pye-motion.py
py
4,158
python
en
code
4
github-code
36
[ { "api_name": "sys.exit", "line_number": 72, "usage_type": "call" }, { "api_name": "signal.signal", "line_number": 81, "usage_type": "call" }, { "api_name": "signal.SIGINT", "line_number": 81, "usage_type": "attribute" }, { "api_name": "lib.config.read", "line...
38660134742
import logging import sys import click import requests from bs4 import BeautifulSoup from telegram.ext import CommandHandler, Filters, MessageHandler, Updater from tinydb import Query, TinyDB db = TinyDB("db.json") Job = Query() TELEGRAM_BOT_TOKEN = None class JobExistsException(Exception): pass def parse_re...
NiklasMM/ebk-bot
bot.py
bot.py
py
5,611
python
en
code
0
github-code
36
[ { "api_name": "tinydb.TinyDB", "line_number": 10, "usage_type": "call" }, { "api_name": "tinydb.Query", "line_number": 11, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 56, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line...
32716485591
""" Image editing class for head to bot, time-trail, obstacle where there is only single agent """ import datetime import logging import rospy import cv2 from markov.log_handler.logger import Logger from markov.utils import get_racecar_idx from mp4_saving import utils from mp4_saving.constants import (RaceCarColorToRG...
aws-deepracer-community/deepracer-simapp
bundle/src/deepracer_simulation_environment/scripts/mp4_saving/single_agent_image_editing.py
single_agent_image_editing.py
py
13,347
python
en
code
79
github-code
36
[ { "api_name": "markov.log_handler.logger.Logger", "line_number": 20, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 20, "usage_type": "attribute" }, { "api_name": "mp4_saving.image_editing_interface.ImageEditingInterface", "line_number": 22, "usage_t...
18526754583
import logging import tqdm from multiprocessing import Pool from dsrt.config.defaults import DataConfig class Padder: def __init__(self, properties, parallel=True, config=DataConfig()): self.properties = properties self.config = config self.parallel = parallel self.max_ule...
sbarham/dsrt
dsrt/data/transform/Padder.py
Padder.py
py
2,765
python
en
code
1
github-code
36
[ { "api_name": "dsrt.config.defaults.DataConfig", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 19, "usage_type": "call" }, { "api_name": "multiprocessing.Pool", "line_number": 28, "usage_type": "call" }, { "api_name": ...
29055282773
import io import picamera import cv2 import numpy import serial import time import RPi.GPIO as gp ####### Servo Motor Contol ####### gp.setmode(gp.BOARD) gp.setup(11, gp.OUT) pwm=gp.PWM(11, 50) pwm.start(3) port = '/dev/ttyACM0' Face = 0 turn=1 while(turn): i=3 while(i): #Create a memory stream...
FarhatBuet14/Rescue-BOT
Codes/main.py
main.py
py
3,571
python
en
code
1
github-code
36
[ { "api_name": "RPi.GPIO.setmode", "line_number": 10, "usage_type": "call" }, { "api_name": "RPi.GPIO", "line_number": 10, "usage_type": "name" }, { "api_name": "RPi.GPIO.BOARD", "line_number": 10, "usage_type": "attribute" }, { "api_name": "RPi.GPIO.setup", "l...
2811075086
from torch import optim from torch.distributions import Categorical import importlib class Model(): def __init__(self, config, modelParam, env): self.update_counter = 0 if modelParam['cuda']['use_cuda']: self.device = f"cuda:{modelParam['cuda']['device_idx']}" else: ...
ivartz/IN9400_exercises
week14/exercise/policy_learning/utils/model.py
model.py
py
1,937
python
en
code
1
github-code
36
[ { "api_name": "importlib.import_module", "line_number": 26, "usage_type": "call" }, { "api_name": "torch.optim.Adam", "line_number": 32, "usage_type": "call" }, { "api_name": "torch.optim", "line_number": 32, "usage_type": "name" }, { "api_name": "torch.optim.SGD"...
74207456423
import argparse import logging log_debug = logging.getLogger("debugLog") _available_commands = ["list"] def get_parser(parent=None): # Anomaly commands conf_file_parser = argparse.ArgumentParser(add_help=False) conf_file_parser.add_argument('--config_file', '--config_path', help='Path to config file', ...
Ydjeen/openstack_anomaly_injection
openstack_anomaly_injection/anomaly_injection/node_control/config/argparser.py
argparser.py
py
2,668
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 5, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 17, "usage_type": "call" }, { "api_name": "argp...
7305309200
import serial import serial from time import sleep import threading import time # sudo chmod 666 /dev/ttyACM0 device_port = "/dev/ttyACM0" from multiprocessing.pool import ThreadPool import settings class uwb_data(threading.Thread): def __init__(self,file_name,device_port): threading.Thread.__init__(self) ...
CoRotProject/FOF-API
Agents/UWB_agent/uwb_data.py
uwb_data.py
py
1,567
python
en
code
0
github-code
36
[ { "api_name": "threading.Thread", "line_number": 11, "usage_type": "attribute" }, { "api_name": "threading.Thread.__init__", "line_number": 13, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 13, "usage_type": "attribute" }, { "api_name": ...
35864084249
from __future__ import print_function import boto3 #This module creates a table with the table constraints as well dynamodb = boto3.resource('dynamodb', region_name='us-west-2', endpoint_url='http://localhost:8000', aws_access_key_id='Secret', aws_secret_access_key='Secret') table = dynamodb.create_table( Ta...
Codexdrip/DynamoDB-Testing
MoviesCreateTable.py
MoviesCreateTable.py
py
894
python
en
code
0
github-code
36
[ { "api_name": "boto3.resource", "line_number": 6, "usage_type": "call" } ]
7494741687
"""Train a model on Treebank""" import random import json import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torch.optim.lr_scheduler as sched import torch.utils.data as data import utils from collections import OrderedDict from tqdm import tqdm fr...
Vincent25-Li/Treebank
train.py
train.py
py
7,389
python
en
code
0
github-code
36
[ { "api_name": "args.save_dir", "line_number": 23, "usage_type": "attribute" }, { "api_name": "utils.get_save_dir", "line_number": 23, "usage_type": "call" }, { "api_name": "args.name", "line_number": 23, "usage_type": "attribute" }, { "api_name": "utils.get_logger...
2515032447
import sys import seaborn as sns import pandas as pd import numpy as np import scipy.stats from collections import defaultdict from matplotlib import pyplot as plt from sklearn.metrics import r2_score, mean_absolute_error #plt.style.use('seaborn-whitegrid') #sns.set_theme() #Function for creating a dictionary from the...
thek71/epiScripts
calculateCorrelationDensity.py
calculateCorrelationDensity.py
py
3,000
python
en
code
0
github-code
36
[ { "api_name": "numpy.array", "line_number": 43, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 46, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 46, "usage_type": "name" }, { "api_name": "matplotlib.pyplo...
32624805079
from torch import nn import torch import numpy as np import os class Encoder(nn.Module): def __init__(self, latent_dims, qc_level): super(Encoder, self).__init__() dims = [] if qc_level == 1: dims = [17, 24, 8, latent_dims] elif qc_level == 2: dims = [22, 36, 12, latent_dims] elif qc...
chiyang/tmasque
tmasque/QualityEncoder.py
QualityEncoder.py
py
8,839
python
en
code
0
github-code
36
[ { "api_name": "torch.nn.Module", "line_number": 7, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 7, "usage_type": "name" }, { "api_name": "torch.nn.Linear", "line_number": 19, "usage_type": "call" }, { "api_name": "torch.nn", "line_numb...
21892894147
from django.urls import path from accounts import views app_name='accounts' urlpatterns=[ path('register',views.register,name='register'), path('login',views.login,name='login'), path('logout',views.logout,name='logout'), path('page1',views.page1,name='page1'), path('r^create_view/',views.create_vie...
amalarosebenny/farming
collegeproject/accounts/urls.py
urls.py
py
533
python
en
code
0
github-code
36
[ { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "api_name": "accounts.views.register", "line_number": 5, "usage_type": "attribute" }, { "api_name": "accounts.views", "line_number": 5, "usage_type": "name" }, { "api_name": "django.urls...
20886565147
#!/usr/bin/env python """ Identifies groups of medium order (512, 1152, 1536, 1920, 2187, 6561, 15625, 16807, 78125, 161051) by connecting to devmirror.lmfdb.xyz and using the stored hashes there. Usage: Either provide an input file with hashes to identify, one per line, each of the form N.i ./identify.py -i INPUT_F...
roed314/FiniteGroups
Code/identify.py
identify.py
py
4,140
python
en
code
2
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 51, "usage_type": "call" }, { "api_name": "sys.stdin.read", "line_number": 63, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 63, "usage_type": "attribute" }, { "api_name": "collections.def...
72164631784
# -*- encoding: utf-8 -*- # External imports import requests import json import datetime # ---------------------------------------- Ne pas mettre là # # Load settings # with open('settings.json', encoding="utf-8") as f: # settings = json.load(f) # # Get the original file # API_KEY = settings["API_KEY"] # TOKEN =...
Alban-Peyrat/Trello_API_interface
Trello_API_cards.py
Trello_API_cards.py
py
3,799
python
en
code
0
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 52, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 52, "usage_type": "attribute" }, { "api_name": "requests.request", "line_number": 79, "usage_type": "call" }, { "api_name": "request...
22377866084
from django import forms from django.db import transaction from .models import CustomUser from django.contrib.auth.forms import UserCreationForm,UserChangeForm class CustomerSignUpForm(UserCreationForm): class Meta: model=CustomUser fields = ('username', 'name', 'email', 'number', 'address') @...
aditrisinha/Aagman
accounts/forms.py
forms.py
py
807
python
en
code
0
github-code
36
[ { "api_name": "django.contrib.auth.forms.UserCreationForm", "line_number": 6, "usage_type": "name" }, { "api_name": "models.CustomUser", "line_number": 8, "usage_type": "name" }, { "api_name": "django.db.transaction.atomic", "line_number": 11, "usage_type": "attribute" ...
74361688425
from datetime import datetime import logging from django.contrib.auth import authenticate from django.core import serializers from django.http import HttpResponse, HttpResponseBadRequest from django.shortcuts import get_object_or_404 from django.views.decorators.csrf import csrf_exempt from django.contrib.auth import l...
lepilepi/eturtle
server/api/views.py
views.py
py
5,950
python
en
code
5
github-code
36
[ { "api_name": "django.http.HttpResponseBadRequest", "line_number": 18, "usage_type": "call" }, { "api_name": "django.http.HttpResponseBadRequest", "line_number": 22, "usage_type": "call" }, { "api_name": "django.contrib.auth.authenticate", "line_number": 24, "usage_type":...
39056592319
from numpy import array,zeros from matplotlib import pyplot as plt num='0016' path='/Users/dmelgar/Slip_inv/Amatrice_3Dfitsgeol_final1/output/inverse_models/models/_previous/' root1='bigkahuna_vrtest3win_vr' root2='.'+num+'.log' vr=array([1.6,1.8,2.0,2.2,2.4,2.6]) vr_static=zeros(len(vr)) vr_insar=zeros(len(vr)) vr_v...
Ogweno/mylife
amatrice/plot_vr_test.py
plot_vr_test.py
py
935
python
en
code
0
github-code
36
[ { "api_name": "numpy.array", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 1...
73818234985
import requests from bs4 import BeautifulSoup from database import DataBase from log import log from scrape import Scrape class Flipkart(Scrape): def formatData(self, soupText): """ This function extracts specific information from the `soupText` object and returns it in a formatted manner. ...
ujitkumar1/ramranger
src/flipkart_scrape.py
flipkart_scrape.py
py
3,338
python
en
code
0
github-code
36
[ { "api_name": "scrape.Scrape", "line_number": 9, "usage_type": "name" }, { "api_name": "database.DataBase", "line_number": 65, "usage_type": "call" }, { "api_name": "log.log.info", "line_number": 67, "usage_type": "call" }, { "api_name": "log.log", "line_numbe...
22372717524
import os import sys import time import glob import numpy as np import torch import utils import logging import argparse import torch.nn as nn import torch.utils import torch.nn.functional as F import torchvision.datasets as dset import torch.backends.cudnn as cudnn from torch.autograd import Variable from model_searc...
importZL/LFM
NAS/darts-lfm/train_search_lfm.py
train_search_lfm.py
py
15,995
python
en
code
0
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 23, "usage_type": "call" }, { "api_name": "time.strftime", "line_number": 80, "usage_type": "call" }, { "api_name": "torch.utils.tensorboard.SummaryWriter", "line_number": 81, "usage_type": "call" }, { "api_n...
2026891662
import argparse import torch from torch.autograd import Variable from network_prep import create_loaders, prep_model, create_classifier def get_input_args(): parser = argparse.ArgumentParser(description='Get NN arguments') parser.add_argument('data_dir', type=str, help='mandatory data directory') pars...
hikaruendo/udacity
ai programming with python1/train.py
train.py
py
6,086
python
en
code
0
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 25, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 25, "usage_type": "attribute" }, { "api_name": "torch....
24205678140
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Aug 26 13:21:56 2019 @author: nilose """ import matplotlib.pyplot as plt import numpy as np import pandas as pd import random from scipy import stats import scipy.integrate as integrate def gauss(x,mu,sigma): return (1/(np.sqrt(2*np.pi)*sigma))*...
NataliaDelCoco/FilamentAnalysis
KDE_RS_V2.py
KDE_RS_V2.py
py
9,660
python
en
code
0
github-code
36
[ { "api_name": "numpy.sqrt", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 17, "usage_type": "attribute" }, { "api_name": "numpy.exp", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 54, ...
36808295769
import copy from typing import Tuple, Union from numbers import Number import torchio as tio from torchio.transforms.augmentation import RandomTransform import torch import numpy as np class ReconstructMeanDWI(RandomTransform): def __init__( self, full_dwi_image_name: str = "full_dwi", ...
efirdc/Segmentation-Pipeline
segmentation_pipeline/transforms/reconstruct_mean_dwi.py
reconstruct_mean_dwi.py
py
6,434
python
en
code
1
github-code
36
[ { "api_name": "torchio.transforms.augmentation.RandomTransform", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 17, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 17, "usage_type": "name" }, { "api_nam...
34773386089
from flask import Flask, render_template from bs4 import BeautifulSoup import requests, json def scrapCars(): source = requests.get('https://www.izmostock.com/car-stock-photos-by-brand').text soup = BeautifulSoup(source, 'lxml') my_table = soup.find('div', {'id': 'page-content'}) links = my_tab...
tech387-academy-python/PythonAppDemo
webscraper.py
webscraper.py
py
537
python
en
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": "json.dump", "line_number": 21, "usage_type": "call" } ]
4489955191
""" Name : test_addmember.py Author : Tiffany Time : 2022/8/1 19:02 DESC: """ import time import yaml from faker import Faker from selenium import webdriver from selenium.common import StaleElementReferenceException from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_condition...
TiffanyWang1108/web_camp
prepare/test_case/test_addmember.py
test_addmember.py
py
3,698
python
en
code
0
github-code
36
[ { "api_name": "faker.Faker", "line_number": 20, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 25, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 25, "usage_type": "name" }, { "api_name": "yaml.safe_lo...
39060387909
from numpy import arange,log,exp,r_ from matplotlib import pyplot as plt from scipy.special import gamma import Cua2008 from numpy import fft,sin,pi from numpy.random import normal duration=60 hf_dt=0.01 mean=0.0 std=1.0 num_samples = int(duration/hf_dt) t=arange(0,duration,hf_dt) noise = normal(mean, std, size=num_sa...
Ogweno/mylife
misc/windowing_test.py
windowing_test.py
py
1,076
python
en
code
0
github-code
36
[ { "api_name": "numpy.arange", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.random.normal", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.sin", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.pi", "line_numbe...
33453047943
from __future__ import print_function import socket import sys import os import re import logging import datetime """ FTPClient object requires: - HOST (IP address or domain) - PORT (Integer value between 0-99999) - COMMANDS (List of Strings: LIST|PUT|GET followed by filename) CTRL+C to exit client """ EXAMPLE_INPU...
denBot/clientserver-ftp-sockets-demo
src/client.py
client.py
py
10,207
python
en
code
0
github-code
36
[ { "api_name": "logging.basicConfig", "line_number": 24, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 24, "usage_type": "attribute" }, { "api_name": "socket.socket", "line_number": 25, "usage_type": "call" }, { "api_name": "socket.AF_INET",...
39883705611
import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt h, k_up1, k_up2 = np.loadtxt('./Reactions/Kup.dat',skiprows=3,usecols=(1,5799+1,5800+1),unpack=True) h *= 1e-5 k_up = k_up1 + k_up2 plt.xscale('log') plt.plot(k_up,h,'k-') plt.savefig('./N2O-rates.pdf',bbox_inches='tight')
aheays/spectr_examples
argo/data/early_earth/out/plot-k.py
plot-k.py
py
320
python
en
code
0
github-code
36
[ { "api_name": "matplotlib.use", "line_number": 3, "usage_type": "call" }, { "api_name": "numpy.loadtxt", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.xscale", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotlib.pyplot...
18550396896
from django.http import HttpResponse from django.shortcuts import render def index(request): #params = {'name':'Tarbi'} return render(request,"index.html") def analyze(request): #Get the text djtext = request.POST.get('text','default') #Operations removepunc = request.POST.get('removepunc','...
Bibhash7/Textlyzer
mysite/views.py
views.py
py
2,508
python
en
code
0
github-code
36
[ { "api_name": "django.shortcuts.render", "line_number": 7, "usage_type": "call" }, { "api_name": "django.http.HttpResponse", "line_number": 68, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 69, "usage_type": "call" }, { "api_name"...
39666743662
# -*- coding: utf-8 -*- """ Created on Tue Feb 14 20:18:14 2017 @author: user """ import csv import numpy as np from gensim.models import word2vec content_POS = list(np.load('all_content_POS.npy')) """取出n,a,d,v詞性的詞""" sentiment_POS = [] sentiment_content = [] ADNV = [1,3,7,13] for sentence in content...
Maomaomaoing/Sacasm-Detection
2.word2vector_pre.py
2.word2vector_pre.py
py
2,254
python
en
code
0
github-code
36
[ { "api_name": "numpy.load", "line_number": 11, "usage_type": "call" }, { "api_name": "csv.writer", "line_number": 41, "usage_type": "call" }, { "api_name": "csv.QUOTE_NONE", "line_number": 41, "usage_type": "attribute" }, { "api_name": "gensim.models.word2vec.Text...
72284442024
import kth_native as nat import sys import time import asyncio import kth # def fetch_last_height_async(chain): # loop = asyncio.get_event_loop() # fut = loop.create_future() # nat.chain_fetch_last_height(chain, lambda err, h: fut.set_result((err, h))) # return fut def generic_async_1(func, *args): ...
k-nuth/py-api
kth/chain/chain.py
chain.py
py
14,093
python
en
code
0
github-code
36
[ { "api_name": "asyncio.get_event_loop", "line_number": 14, "usage_type": "call" }, { "api_name": "asyncio.get_event_loop", "line_number": 20, "usage_type": "call" }, { "api_name": "asyncio.get_event_loop", "line_number": 26, "usage_type": "call" }, { "api_name": "...
5491251302
import sys import os sys.path.append(os.path.abspath('.')) import torch import utils as ut from train import * from dataset import load_train_data, load_test_data import constants def main(config): # Fixed random number seed torch.manual_seed(config.seed) torch.cuda.manual_seed_all(config.seed) # Ini...
daoduyhungkaistgit/SRGAN
src/main.py
main.py
py
3,641
python
en
code
3
github-code
36
[ { "api_name": "sys.path.append", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 3, "usage_type": "call" }, { "api_name": "os.path", "line_number...
18482571232
import math import torch.nn as nn class HRNET_NECK(nn.Module): def __init__(self, in_channels, feature_size=256): super(HRNET_NECK, self).__init__() C2_size, C3_size, C4_size, C5_size = in_channels # P2 self.P2_1 = nn.Conv2d(C2_size, feature_size, kernel_size=1, stride=1, padding=...
TWSFar/FCOS
models/necks/hrnet_neck.py
hrnet_neck.py
py
2,155
python
en
code
1
github-code
36
[ { "api_name": "torch.nn.Module", "line_number": 5, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 5, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.nn", "line_numb...
30569760677
from typing import List, Tuple def create_adjacent_list(edges): adjacent_list = dict() for edge in edges: if adjacent_list.get(edge[0]): adjacent_list[edge[0]].append(edge[1]) else: adjacent_list[edge[0]] = [edge[1]] return adjacent_list def solution(n: int, m: in...
fenixguard/yandex_algorithms
sprint_6/B.exchange_edges_list_to_adjacent_list.py
B.exchange_edges_list_to_adjacent_list.py
py
935
python
en
code
2
github-code
36
[ { "api_name": "typing.List", "line_number": 14, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 14, "usage_type": "name" } ]
8860920055
from collections import defaultdict import Policy as policy import random import numpy as np import matplotlib.pyplot as plt # import pytorch as torch class Agent: def __init__(self, env) -> None: self.env = env # replay_buffer = {(state, action) : (state_, reward)} self.repla...
TheGoldenChicken/robust-rl
rl/agent.py
agent.py
py
4,660
python
en
code
0
github-code
36
[ { "api_name": "collections.defaultdict", "line_number": 14, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 33, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 36, "usage_type": "call" }, { "api_name"...
25163328807
import operator import pandas as pd from easul.action import ResultStoreAction from easul.algorithm import StoredAlgorithm from easul.algorithm.factor import OperatorFactor from easul.data import DataSchema, DFDataInput from easul.step import VisualStep from easul.visual import Visual from easul.visual.element import...
rcfgroup/easul
easul/tests/example.py
example.py
py
21,533
python
en
code
1
github-code
36
[ { "api_name": "os.path.dirname", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path", "line_number": 23, "usage_type": "attribute" }, { "api_name": "easul.algorithm.ClassifierAlgorithm", "line_number": 32, "usage_type": "call" }, { "api_name": "skle...
7341734490
import sys import os import ctypes from ctypes import ( c_double, c_int, c_float, c_char_p, c_int32, c_uint32, c_void_p, c_bool, POINTER, _Pointer, # type: ignore Structure, Array, c_uint8, c_size_t, ) import pathlib from typing import List, Union # Load the ...
mengbingrock/shepherd
shepherd/llama2c_py/llama2c_py.py
llama2c_py.py
py
2,276
python
en
code
0
github-code
36
[ { "api_name": "pathlib.Path", "line_number": 29, "usage_type": "call" }, { "api_name": "typing.List", "line_number": 32, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 32, "usage_type": "attribute" }, { "api_name": "sys.platform.startswith", ...
31418095220
from Word2Vec.Word2VecGenerator import Word2VecGenerator import glob from JsonParse.JsonParser import JsonParser import json as Json class TrainingComponentGenerator: __largest_n_words = 0 __astNode2Vec_size = 0 __number_of_vector_code2vec = 0 def __init__(self, astNode2Vec_size, number_of_vector_cod...
ZzillLongLee/TsGen
TrainingDataGenerator/TrainingComponentGenerator.py
TrainingComponentGenerator.py
py
3,300
python
en
code
0
github-code
36
[ { "api_name": "glob.glob", "line_number": 18, "usage_type": "call" }, { "api_name": "JsonParse.JsonParser.JsonParser", "line_number": 23, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 38, "usage_type": "call" }, { "api_name": "Word2Vec.Word2Ve...
23497341801
################ Henri Lahousse ################ # voice assistant # 05/31/2022 # libraries import struct import pyaudio import pvporcupine # for wakeword import pvrhino # for situations porcupine = None pa = None audio_stream = None rhino = None # documentation picovoice...
lahousse/ONWARD
software/voice-assistant/voice-assis.py
voice-assis.py
py
3,324
python
en
code
0
github-code
36
[ { "api_name": "pvporcupine.create", "line_number": 24, "usage_type": "call" }, { "api_name": "pvrhino.create", "line_number": 31, "usage_type": "call" }, { "api_name": "pyaudio.PyAudio", "line_number": 40, "usage_type": "call" }, { "api_name": "pyaudio.paInt16", ...
26336618129
import datetime import smtplib import time import requests import api_keys MY_LAT = 51.53118881973776 MY_LONG = -0.08949588609011068 response = requests.get(url="http://api.open-notify.org/iss-now.json") data = response.json() longitude = data["iss_position"]["longitude"] latitude = data["iss_position"]["la...
Zoom30/100-python
Day 33/Day 33.py
Day 33.py
py
1,385
python
en
code
0
github-code
36
[ { "api_name": "requests.get", "line_number": 9, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 21, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 35, "usage_type": "call" }, { "api_name": "datetime.datetime", ...
70387249063
from aplication.models import historical_record from aplication.dto.dto_record import dto_record import datetime as dt def register(_record:dto_record): historical = historical_record() historical.registration_date = dt.date.today() historical.registration_time = dt.datetime.now().strftime('%H:%M:%...
GustavoRosario/pass
pj/aplication/controles/record.py
record.py
py
414
python
en
code
0
github-code
36
[ { "api_name": "aplication.dto.dto_record.dto_record", "line_number": 5, "usage_type": "name" }, { "api_name": "aplication.models.historical_record", "line_number": 6, "usage_type": "call" }, { "api_name": "datetime.date.today", "line_number": 7, "usage_type": "call" }, ...
31329677612
import requests from requests import HTTPError import yaml import json import os def load_config(): config_path = 'api_config.yaml' with open(os.path.join(os.getcwd(), config_path), mode='r') as yaml_file: config = yaml.safe_load(yaml_file) return config def auth(): conf = load_config()['...
daniiche/DE
hmwrk4/airflow/dags/api_handle_airflow.py
api_handle_airflow.py
py
1,987
python
en
code
0
github-code
36
[ { "api_name": "os.path.join", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 10, "usage_type": "call" }, { "api_name": "yaml.safe_load", "line_number...
496206437
import os import pytest from dagster_aws.emr import EmrJobRunner, emr_pyspark_resource from dagster_pyspark import pyspark_resource, pyspark_solid from moto import mock_emr from dagster import ( DagsterInvalidDefinitionError, ModeDefinition, RunConfig, execute_pipeline, pipeline, ) from dagster.se...
helloworld/continuous-dagster
deploy/dagster_modules/libraries/dagster-aws/dagster_aws_tests/emr_tests/test_pyspark.py
test_pyspark.py
py
5,158
python
en
code
2
github-code
36
[ { "api_name": "dagster_pyspark.pyspark_solid", "line_number": 19, "usage_type": "name" }, { "api_name": "dagster_pyspark.pyspark_solid", "line_number": 28, "usage_type": "call" }, { "api_name": "dagster.pipeline", "line_number": 37, "usage_type": "call" }, { "api_...
5232319809
from openpyxl import Workbook wb = Workbook() ws = wb.active # [현재까지 작성된 최종 성적 데이터] data = [["학번", "출석", "퀴즈1", "퀴즈2", "중간고사", "기말고사", "프로젝트"], [1,10,8,5,14,26,12], [2,7,3,7,15,24,18], [3,9,5,8,8,12,4], [4,7,8,7,17,21,18], [5,7,8,7,16,25,15], [6,3,5,8,8,17,0], [7,4,9,10,16,27,18], [8,6,6,6,15,19,17], [...
OctoHoon/PythonStudy_rpa
rpa_basic/1_excel/17_quiz.py
17_quiz.py
py
1,382
python
en
code
0
github-code
36
[ { "api_name": "openpyxl.Workbook", "line_number": 3, "usage_type": "call" } ]
12177872909
import requests import urllib.parse main_api = "https://www.mapquestapi.com/directions/v2/route?" key = "p0Modq3JoAtVS6BXK5P5CinXWhJNUQwI" while True: orig = input("Starting Location: ") dest = input("Destination: ") url = main_api + urllib.parse.urlencode({ "key" : key, "from" : orig, ...
JerickoDeGuzman/MapQuest-Feature-Enhancement
tempdir/referenceFiles/mapquest_parse-json_3.py
mapquest_parse-json_3.py
py
561
python
en
code
0
github-code
36
[ { "api_name": "urllib.parse.parse.urlencode", "line_number": 10, "usage_type": "call" }, { "api_name": "urllib.parse.parse", "line_number": 10, "usage_type": "attribute" }, { "api_name": "urllib.parse", "line_number": 10, "usage_type": "name" }, { "api_name": "req...
11867021952
# ----------------------------------------------------------------------------- # main.py # # Hung-Ruey Chen 109971346 # ----------------------------------------------------------------------------- import sys, os import ply.lex as lex import ply.yacc as yacc from token_def import * # Build the lexer def main(): ...
vbigmouse/CSE307
HW5/main.py
main.py
py
949
python
en
code
0
github-code
36
[ { "api_name": "sys.argv", "line_number": 14, "usage_type": "attribute" }, { "api_name": "sys.stderr", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.devnull", "line_number": 15, "usage_type": "attribute" }, { "api_name": "ply.lex.lex", "line...
75263396265
import requests from urllib.parse import urlparse import concurrent.futures # Extract domain from a URL def extract_domain(url): return urlparse(url).netloc # Fetch subdomains from crt.sh def get_subdomains_from_crtsh(domain): try: response = requests.get(f"https://crt.sh/?q=%.{domain}&output=json") ...
RepoRascal/test
run.py
run.py
py
1,650
python
en
code
0
github-code
36
[ { "api_name": "urllib.parse.urlparse", "line_number": 7, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 12, "usage_type": "call" }, { "api_name": "requests.RequestException", "line_number": 18, "usage_type": "attribute" }, { "api_name": "conc...
22644746365
import requests import time from bs4 import BeautifulSoup as bs import re import webbrowser sizes = [7, 9.5, 11] new_arrivals_page_url = 'https://www.theclosetinc.com/collections/new-arrivals' base_url = 'https://www.theclosetinc.com' post_url = 'https://www.theclosetinc.com/cart/add.js' keywords = ['yeezy', 'inertia'...
athithianr/deadstock-bot
bots/theclosetinc_bot.py
theclosetinc_bot.py
py
1,681
python
en
code
0
github-code
36
[ { "api_name": "bs4.BeautifulSoup", "line_number": 17, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 20, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 22, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line...
6411274184
import json from bitbnspy import bitbns # from bitbnspy import bitbns import config key = config.apiKey secretKey = config.secret bitbnsObj = bitbns(key, secretKey) # print('APIstatus: =', bitbnsObj.getApiUsageStatus) # getPairTicker = bitbnsObj.getTickerApi('DOGE') # print(' PairTicker : ', getPairTicker) print(...
npenkar/botCode
BitbnsPy/botbns.py
botbns.py
py
788
python
en
code
0
github-code
36
[ { "api_name": "config.apiKey", "line_number": 8, "usage_type": "attribute" }, { "api_name": "config.secret", "line_number": 9, "usage_type": "attribute" }, { "api_name": "bitbnspy.bitbns", "line_number": 10, "usage_type": "call" }, { "api_name": "bitbnspy.bitbns.p...
72753340263
import json import time import os import uuid import argparse from datetime import datetime, timedelta from kafka import KafkaConsumer, SimpleConsumer import os.path import subprocess def gzip_yesterday(yesterday): #print "gzip_yesterday" out = None fname = args.target_folder+"/"+args.target_file+"_"+yesterday+"...
goliasz/kafka2bigquery
src/main/python/dump_topic.py
dump_topic.py
py
1,687
python
en
code
0
github-code
36
[ { "api_name": "os.path.isfile", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "subprocess.check_output", "line_number": 18, "usage_type": "call" }, { "api_name": "kafka.KafkaConsum...
31965515598
#!/usr/bin/python # -*- coding: utf-8 -*- # vi: ts=4 sw=4 import pickle from ..Protocols import * from scipy.spatial.distance import cdist from sklearn.preprocessing import StandardScaler from sklearn.cluster import KMeans, MeanShift, estimate_bandwidth, AffinityPropagation, SpectralClustering # Clustering methods f...
CFN-softbio/SciAnalysis
SciAnalysis/ImAnalysis/Flakes/cluster.py
cluster.py
py
42,216
python
en
code
19
github-code
36
[ { "api_name": "pickle.load", "line_number": 77, "usage_type": "call" }, { "api_name": "joblib.Parallel", "line_number": 97, "usage_type": "call" }, { "api_name": "joblib.delayed", "line_number": 97, "usage_type": "call" }, { "api_name": "itertools.chain.from_itera...
14198442268
import os from flask import Flask, render_template, request import base64 from io import BytesIO import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import src.components.data_ingestion as DI from src.components.model_trainer import modelTrain from werkzeug.utils import secure_filename app = Flask(...
al0nkr/style-transfer-nn
app.py
app.py
py
3,973
python
en
code
0
github-code
36
[ { "api_name": "matplotlib.use", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path.abspath", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_number"...
16209163559
import datetime import os import random import string from datetime import datetime import requests from boto3 import Session from django.conf import settings from django.conf.global_settings import MEDIA_ROOT from market_backend.apps.accounts.models import Media from market_backend.v0.accounts import serializers c...
muthukumar4999/market-backend
market_backend/v0/accounts/utils.py
utils.py
py
5,060
python
en
code
0
github-code
36
[ { "api_name": "random.choice", "line_number": 45, "usage_type": "call" }, { "api_name": "string.ascii_uppercase", "line_number": 45, "usage_type": "attribute" }, { "api_name": "string.ascii_lowercase", "line_number": 45, "usage_type": "attribute" }, { "api_name": ...
8473901690
#!/usr/bin/env python3 ############ ## https://gist.github.com/DevBOFH/7bd65dbcb945cdfce42d21b1b6bc0e1b ############ ## ## description = 'Terraform workspace tool. This tool can be used to perform CRUD operations on Terraform Cloud via their public API.' version = "0.0.1" import os import re import sys import reques...
babywyrm/sysadmin
terraform/tf_workspace_.py
tf_workspace_.py
py
5,404
python
en
code
10
github-code
36
[ { "api_name": "os.path.expanduser", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path", "line_number": 23, "usage_type": "attribute" }, { "api_name": "re.search", "line_number": 24, "usage_type": "call" }, { "api_name": "requests.post", "line_n...
35876191865
import sqlite3 from sqlite3 import Error class Key: def __init__(self, key,content,info, database_path): if database_path!="": try: self.key = key self.database_path =database_path if not self.check_key_exists(): if len(self.get_all__key(key))==0: if key!="...
dahstar/xwx.ctflab
fldb.py
fldb.py
py
2,775
python
en
code
0
github-code
36
[ { "api_name": "sqlite3.Error", "line_number": 17, "usage_type": "name" }, { "api_name": "sqlite3.connect", "line_number": 21, "usage_type": "call" }, { "api_name": "sqlite3.connect", "line_number": 36, "usage_type": "call" }, { "api_name": "sqlite3.connect", "...
33738820247
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_cors import CORS db = SQLAlchemy() def create_app(): app = Flask(__name__) cors = CORS(app) app.config["FLASK_DEBUG"] = True app.config['SECRET_KEY'] = 'secret-key-goes-here' app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:...
KariukiAntony/MMUST-HealthIT-TAT-App
app/__init__.py
__init__.py
py
571
python
en
code
1
github-code
36
[ { "api_name": "flask_sqlalchemy.SQLAlchemy", "line_number": 4, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 9, "usage_type": "call" }, { "api_name": "main.main", ...
38075605873
# -*- coding: utf-8 -*- from pathlib import Path class Manager: def create_readme(): root_path = Path(__file__).parent info ="""## حل سوالات کوئرا برای دیدن صفحه ی اصلی هر سوال در سایت کوئرا میتوانید روی نام هر سوال کلیک کنید و یا در قسمت توضیحات روی PDF کلیک کنید. showmeyourcode.ir """ ...
MohammadNPak/quera.ir
manage.py
manage.py
py
2,594
python
en
code
40
github-code
36
[ { "api_name": "pathlib.Path", "line_number": 8, "usage_type": "call" } ]
31920197231
from google.cloud import vision # with 開始から終了まで自動で実行してくれる # rb read binaryモード バイナリーモードを読み込む # テキスト以外のデータ 主に画像や動画 # road.jpgを開いて読み込む with open('./road.jpg', 'rb') as image_file: content = image_file.read() # vision APIが扱える画像データに変換 image = vision.Image(content=content) # annotation テキストや音声、画像などあらゆる形式のデータにタグ付けをする作...
yuuki-1227/vision-ai-test
index.py
index.py
py
916
python
ja
code
0
github-code
36
[ { "api_name": "google.cloud.vision.Image", "line_number": 12, "usage_type": "call" }, { "api_name": "google.cloud.vision", "line_number": 12, "usage_type": "name" }, { "api_name": "google.cloud.vision.ImageAnnotatorClient", "line_number": 17, "usage_type": "call" }, {...
39939114136
from PyQt5.QtWidgets import QTableWidgetItem, QLabel, QFileDialog from PyQt5.QtCore import Qt from pandas.tests.io.excel.test_xlrd import xlwt from UI.resultWinUI import * from algorithm import * from UI.mainWinUI import * class BrokerWin(Ui_MainWindow, QtWidgets.QMainWindow): def __init__(self, parent=None): ...
JuliaZimina/Remote-Banking-Brokers
UI/brokerUI.py
brokerUI.py
py
8,392
python
ru
code
0
github-code
36
[ { "api_name": "PyQt5.QtWidgets.QLabel", "line_number": 123, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QTableWidgetItem", "line_number": 124, "usage_type": "call" }, { "api_name": "PyQt5.QtCore.Qt.AlignHCenter", "line_number": 125, "usage_type": "attribute" ...
15672387350
from clearpath_config.common.types.config import BaseConfig from clearpath_config.common.types.list import OrderedListConfig from clearpath_config.common.utils.dictionary import flip_dict from clearpath_config.mounts.types.fath_pivot import FathPivot from clearpath_config.mounts.types.flir_ptu import FlirPTU from clear...
clearpathrobotics/clearpath_config
clearpath_config/mounts/mounts.py
mounts.py
py
7,899
python
en
code
1
github-code
36
[ { "api_name": "clearpath_config.mounts.types.fath_pivot.FathPivot.MOUNT_MODEL", "line_number": 15, "usage_type": "attribute" }, { "api_name": "clearpath_config.mounts.types.fath_pivot.FathPivot", "line_number": 15, "usage_type": "name" }, { "api_name": "clearpath_config.mounts.ty...
35451201459
import cv2 from pydarknet import Detector, Image net = Detector(bytes("tank.cfg", encoding="utf-8"), bytes("tank.weights", encoding="utf-8"), 0, bytes("tank.data",encoding="utf-8")) def Detect(path): vidObj = cv2.VideoCapture(path) count = 0 success = 1 while success: success, ...
wisekrack/BattleTankDown
tankLocFromSurveillanceVideo.py
tankLocFromSurveillanceVideo.py
py
958
python
en
code
1
github-code
36
[ { "api_name": "pydarknet.Detector", "line_number": 3, "usage_type": "call" }, { "api_name": "cv2.VideoCapture", "line_number": 7, "usage_type": "call" }, { "api_name": "pydarknet.Image", "line_number": 14, "usage_type": "call" }, { "api_name": "cv2.rectangle", ...
30352454411
from fastapi import APIRouter, Depends, HTTPException from sqlalchemy.orm import Session from starlette import status from starlette.responses import RedirectResponse from database import get_db from domain.answer import answer_schema, answer_crud from domain.question import question_crud, question_schema from domain....
dlawnsdk/study-fastapi-project
domain/answer/answer_router.py
answer_router.py
py
2,709
python
en
code
1
github-code
36
[ { "api_name": "fastapi.APIRouter", "line_number": 12, "usage_type": "call" }, { "api_name": "domain.answer.answer_schema.AnswerCreate", "line_number": 19, "usage_type": "attribute" }, { "api_name": "domain.answer.answer_schema", "line_number": 19, "usage_type": "name" }...
31931640588
import srt from datetime import timedelta INPUT = "You've Got Mail (si).srt" OUTPUT = "out.srt" START = 1411 END = -1 SHIFT = timedelta(milliseconds=1000) with open(INPUT) as f: subs = list(srt.parse(f.read())) for sub in subs[START-1:END]: sub.start += SHIFT sub.end += SHIFT with open(OUTPUT, 'w') as f...
aquiire/liyum-awith
sync.py
sync.py
py
353
python
en
code
0
github-code
36
[ { "api_name": "datetime.timedelta", "line_number": 8, "usage_type": "call" }, { "api_name": "srt.parse", "line_number": 11, "usage_type": "call" }, { "api_name": "srt.compose", "line_number": 18, "usage_type": "call" } ]
18041766413
# -*- coding: utf-8 -*- """ Created on Wed Aug 9 11:35:21 2023 @author: akava """ import tkinter as tk from tkinter import ttk from PIL import Image, ImageTk import customtkinter, tkinter from retinaface import RetinaFace import cv2 from gender_classification.gender_classifier_window import GenderClassifierWindow c...
MartinVaro/Modular
detection/single_photo_detection_page.py
single_photo_detection_page.py
py
10,890
python
es
code
0
github-code
36
[ { "api_name": "customtkinter.CTkToplevel", "line_number": 21, "usage_type": "call" }, { "api_name": "retinaface.RetinaFace.extract_faces", "line_number": 31, "usage_type": "call" }, { "api_name": "retinaface.RetinaFace", "line_number": 31, "usage_type": "name" }, { ...
28886974693
import os import numpy as np import tensorflow as tf from tensorflow.keras.models import load_model from tensorflow.keras.preprocessing.image import img_to_array, load_img from tqdm import tqdm import json def preprocess_image(image_path, target_size): img = load_img(image_path, target_size=target_size) img_arr...
Donike98/Assignment_Solaborate
model_inference/JSON.py
JSON.py
py
1,701
python
en
code
0
github-code
36
[ { "api_name": "tensorflow.keras.preprocessing.image.load_img", "line_number": 9, "usage_type": "call" }, { "api_name": "tensorflow.keras.preprocessing.image.img_to_array", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.expand_dims", "line_number": 11, "us...
26490765888
import base64 from rest_framework import serializers from categories.models import Categories, Translations, Authorities from categories.serializers import TranslationsSerializer from users.models import User from .models import Documents def get_predicted_trees(): try: return Categories.objects.filter( ...
JU4NP1X/teg-backend
documents/serializers.py
serializers.py
py
3,796
python
en
code
1
github-code
36
[ { "api_name": "categories.models.Categories.objects.filter", "line_number": 11, "usage_type": "call" }, { "api_name": "categories.models.Categories.objects", "line_number": 11, "usage_type": "attribute" }, { "api_name": "categories.models.Categories", "line_number": 11, "...
29997839939
from OpenGL.GL import * from OpenGL.GLU import * import sys #from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, QOpenGLWidget from PyQt5.QtWidgets import QOpenGLWidget, QApplication, QMainWindow, QLabel, QLineEdit, QVBoxLayout, QWidget from PyQt5.QtWidgets import QSlider from PyQt5.QtCore import * class...
dknife/2021Graphics
Source/01_Windowing/04_GLwQtWidgets.py
04_GLwQtWidgets.py
py
2,613
python
en
code
2
github-code
36
[ { "api_name": "PyQt5.QtWidgets.QOpenGLWidget", "line_number": 11, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QMainWindow", "line_number": 52, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QMainWindow.__init__", "line_number": 55, "usage_type": "call" ...
25170664533
import gspread import pandas as pd import numpy as np from oauth2client.service_account import ServiceAccountCredentials from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, confusion...
Big6Ent/Predict_Next_Day_SP500_Direction
sp500_confidence.py
sp500_confidence.py
py
4,152
python
en
code
0
github-code
36
[ { "api_name": "oauth2client.service_account.ServiceAccountCredentials.from_json_keyfile_name", "line_number": 14, "usage_type": "call" }, { "api_name": "oauth2client.service_account.ServiceAccountCredentials", "line_number": 14, "usage_type": "name" }, { "api_name": "gspread.auth...
35205340902
from RocketMilesClass import RocketMiles import time import logging.handlers import datetime import os #Smoke test for basic functionality of the Search Results page for the Rocketmiles.com search app. #This module contains an error logger, test preconditions, and TCIDs 9-10. #Initializing class object. RM = Rocket...
just-hugo/Test-Automation
Rocketmiles/SmokeTestSearchResultsModule.py
SmokeTestSearchResultsModule.py
py
2,827
python
en
code
0
github-code
36
[ { "api_name": "RocketMilesClass.RocketMiles", "line_number": 13, "usage_type": "call" }, { "api_name": "os.mkdir", "line_number": 20, "usage_type": "call" }, { "api_name": "os.mkdir", "line_number": 25, "usage_type": "call" }, { "api_name": "datetime.datetime.now"...
27045433039
import sys import pysnooper @pysnooper.snoop() def lengthOfLongestSubstring(s: str) -> int: a_ls = [x for x in s] max_len = 0 substring = [] for a in a_ls: if a in substring: idx = substring.index(a) substring = substring[idx + 1:] substring.append(a) if...
ikedaosushi/python-sandbox
pysnoozer/lengthOfLongestSubstring.py
lengthOfLongestSubstring.py
py
504
python
en
code
11
github-code
36
[ { "api_name": "pysnooper.snoop", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 22, "usage_type": "attribute" } ]
73269742825
def checkCompletion(access_token,client_id): import wunderpy2 import pygsheets import datetime x = 2 gc = pygsheets.authorize() sh = gc.open('wunderlist_update') wks = sh.sheet1 api = wunderpy2.WunderApi() client = api.get_client(access_token, client_id) current_rows = wks.get_a...
krishan147/wundersheet
wundersheet/check_task_completion.py
check_task_completion.py
py
876
python
en
code
0
github-code
36
[ { "api_name": "pygsheets.authorize", "line_number": 7, "usage_type": "call" }, { "api_name": "wunderpy2.WunderApi", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 25, "usage_type": "call" }, { "api_name": "datetime...
27621948392
import time import pandas as pd import numpy as np import random from sklearn.metrics.pairwise import cosine_similarity, euclidean_distances,manhattan_distances from sklearn.preprocessing import MinMaxScaler from sklearn.decomposition import PCA from sklearn.manifold import TSNE import matplotlib.pyplot as plt #CLASS ...
hrishivib/k-means-iris-MNIST-classification
k-means_MNIST.py
k-means_MNIST.py
py
7,624
python
en
code
0
github-code
36
[ { "api_name": "pandas.read_csv", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 20, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.MinMaxScaler", "line_number": 24, "usage_type": "call" }, { "api_name": "sklear...
6793257031
from django.apps import apps from django.db.models.signals import post_save from .invitation_status_changed import when_invitation_registration_post_save from .consultant_validation_status_changed import when_consultant_validation_status_update def setup_signals(): Invitation = apps.get_model( app_label=...
tomasgarzon/exo-services
service-exo-core/registration/signals/__init__.py
__init__.py
py
736
python
en
code
0
github-code
36
[ { "api_name": "django.apps.apps.get_model", "line_number": 9, "usage_type": "call" }, { "api_name": "django.apps.apps", "line_number": 9, "usage_type": "name" }, { "api_name": "django.apps.apps.get_model", "line_number": 13, "usage_type": "call" }, { "api_name": "...
17883995055
# -*- encoding: utf-8 -*- import logging import os import time import numpy as np import openpyxl import pandas as pd import xlrd # 导入PyQt5模块 from PySide2.QtCore import * from PySide2.QtWidgets import * from dataImportModel import Ui_Form as dataImportFormEngine from widgets import kwargs_to_str from lib.comm import ...
pyminer/pyminer
pyminer/packages/dataio/sample.py
sample.py
py
47,148
python
zh
code
77
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 21, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 22, "usage_type": "attribute" }, { "api_name": "pandas.DataFrame", "line_number": 31, "usage_type": "attribute" }, { "api_name": "os.path.ex...
31897243562
from bs4 import BeautifulSoup from collections import defaultdict, Counter class Parser: @staticmethod def getWordsArticle(file): words = [] with open(file, encoding='utf-8') as f: for line in f: line = line.split(" => ") word = line[0].replace("#", "...
cenh/Wikipedia-Heavy-Hitters
Parser.py
Parser.py
py
1,600
python
en
code
3
github-code
36
[ { "api_name": "bs4.BeautifulSoup", "line_number": 19, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 24, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 29, "usage_type": "call" }, { "api_name": "collections.Cou...
36376749917
# Devin Fledermaus Class 1 import tkinter from tkinter import * from tkinter import messagebox from playsound import playsound import requests from datetime import datetime import re import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart # Creating the window root = Tk() roo...
DevinFledermaus/Lotto_EOMP
main3.py
main3.py
py
7,008
python
en
code
0
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 20, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 20, "usage_type": "name" }, { "api_name": "tkinter.StringVar", "line_number": 46, "usage_type": "call" }, { "api_name": "requests.ge...
17884032715
import logging import os import types from typing import Optional import core.algorithms as algorithms from features.extensions.extensionlib import BaseExtension, BaseInterface from packages.document_server.docserver import Server logger = logging.getLogger(__name__) class Extension(BaseExtension): server = Ser...
pyminer/pyminer
pyminer/packages/document_server/main.py
main.py
py
3,241
python
en
code
77
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "features.extensions.extensionlib.BaseExtension", "line_number": 13, "usage_type": "name" }, { "api_name": "packages.document_server.docserver.Server", "line_number": 14, "usage_ty...
39553483739
from rest_framework import viewsets from rest_framework.response import Response from rest_framework.exceptions import ParseError from rest_framework.decorators import action, api_view from core import models, serializers, utils from rest_framework_simplejwt.tokens import RefreshToken @api_view(['POST']) def signup(...
mahziyar-es/movie-review
server/api/views/auth.py
auth.py
py
824
python
en
code
0
github-code
36
[ { "api_name": "core.serializers.UserSerializer", "line_number": 17, "usage_type": "call" }, { "api_name": "core.serializers", "line_number": 17, "usage_type": "name" }, { "api_name": "rest_framework.exceptions.ParseError", "line_number": 20, "usage_type": "call" }, { ...
74059453544
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils import dellemc_ansible_utils as utils import logging from datetime import datetime, timedelta from uuid import UUID __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'], ...
avs6/ansible-powerstore
dellemc_ansible/powerstore/library/dellemc_powerstore_snapshot.py
dellemc_powerstore_snapshot.py
py
39,907
python
en
code
0
github-code
36
[ { "api_name": "ansible.module_utils.dellemc_ansible_utils.get_logger", "line_number": 184, "usage_type": "call" }, { "api_name": "ansible.module_utils.dellemc_ansible_utils", "line_number": 184, "usage_type": "name" }, { "api_name": "logging.INFO", "line_number": 185, "us...
13918851672
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Oct 3 13:07:13 2018 @author: marcos """ import pandas as pd import csv import pickle as pkl import numpy as np import scipy.stats as sts from sklearn import preprocessing as prep # =====================================================================...
mhfribeiro/safra-meta
modules/preprocess/dmt.py
dmt.py
py
10,322
python
en
code
0
github-code
36
[ { "api_name": "pandas.read_csv", "line_number": 37, "usage_type": "call" }, { "api_name": "pandas.read_json", "line_number": 39, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 41, "usage_type": "call" }, { "api_name": "pandas.DataFrame.from_di...
41329717796
import tensorflow as tf import numpy as np import cv2 import os def save_image(path, image) : extension = os.path.splitext(path)[1] result, encoded_img = cv2.imencode(extension, image) if result : with open(path, "wb") as f : encoded_img.tofile(f) # 대상 입력 target = input("대상을 입력하세요 : ...
moonsung1234/SimilarityComparisonProject
increase.py
increase.py
py
1,532
python
en
code
1
github-code
36
[ { "api_name": "os.path.splitext", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "cv2.imencode", "line_number": 9, "usage_type": "call" }, { "api_name": "os.listdir", "line_number...
75187049704
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() with open('requirements.txt') as fin: lines = fin.readlines() lines = [o.strip() for o in lines] lines = [o for o in lines if len(o) > 0] req = [o for o in lines if not o.star...
nghiahuynh-ai/ResViT
setup.py
setup.py
py
643
python
en
code
0
github-code
36
[ { "api_name": "os.path.join", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 5, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_n...
41924245365
from .sentence_cutting import cutting_500_under import requests, json def cleaned_result(final_result): result = [] tmp = final_result.split('<br>') WRONG_SPELLING = "<span class='red_text'>" WRONG_SPACING = "<span class='green_text'>" AMBIGUOUS = "<span class='violet_text'>" S...
SeongMyo/Spell_Checker_plus
utils/spell_checker.py
spell_checker.py
py
2,669
python
en
code
0
github-code
36
[ { "api_name": "requests.Session", "line_number": 29, "usage_type": "call" }, { "api_name": "sentence_cutting.cutting_500_under", "line_number": 34, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 48, "usage_type": "call" }, { "api_name": "json.l...
34697431338
# -*- coding: utf-8 -*- """ Created on Thu Oct 20 06:20:43 2022 @author: beauw """ import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import numpy as np import itertools from pandas import to_datetime from prophet import Prophet from pandas import DataFrame from matplotlib import...
SpeciesXBeer/BeerVolumeProphet
Entire Beer Volume Forecase .py
Entire Beer Volume Forecase .py
py
22,300
python
en
code
0
github-code
36
[ { "api_name": "pandas.read_csv", "line_number": 29, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 32, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "line_number": 34, "usage_type": "call" }, { "api_name": "pandas.read_csv", ...
71782650344
#!/usr/bin/env python # -*- conding:utf-8 -*- import requests import argparse import sys import urllib3 import re from prettytable import PrettyTable urllib3.disable_warnings() def title(): print(""" Dedecms_5.8.1 代码执行漏洞 Use:python3 dedecms_5.8.1_RC...
Henry4E36/dedecms_5.8.1_RCE
dedecms_5.8.1_RCE.py
dedecms_5.8.1_RCE.py
py
3,462
python
en
code
5
github-code
36
[ { "api_name": "urllib3.disable_warnings", "line_number": 9, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 35, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 37, "usage_type": "call" }, { "api_name": "argparse.ArgumentPars...
25852270022
"""Functions for dynamically loading modules and functions. """ import importlib import os __author__ = 'Hayden Metsky <hayden@mit.edu>' def load_module_from_path(path): """Load Python module in the given path. Args: path: path to .py file Returns: Python module (before returning, this...
broadinstitute/catch
catch/utils/dynamic_load.py
dynamic_load.py
py
1,312
python
en
code
63
github-code
36
[ { "api_name": "os.path.abspath", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path", "line_number": 20, "usage_type": "attribute" }, { "api_name": "os.path.split", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path", "line_number...
71785754983
#!/usr/bin/python3 import datetime import flask from . import client from . import session bp = flask.Blueprint("main", __name__) def format_time(seconds): return str(datetime.timedelta(seconds=seconds)) def format_size(size): for unit in ["B","KB","MB","GB"]: if abs(size) < 1024.0: return "%3.1f%s" ...
jakub-vanik/youtube-ripper
http/ripper/main.py
main.py
py
2,200
python
en
code
0
github-code
36
[ { "api_name": "flask.Blueprint", "line_number": 9, "usage_type": "call" }, { "api_name": "datetime.timedelta", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.g", "line_number": 22, "usage_type": "attribute" }, { "api_name": "flask.request", "l...
1914874686
import math from distributed import Client from tqdm import tqdm import numpy as np import pandas as pd def calculate_distance_between_queries(data_df, queries, metric, dask_client: Client= None, n_blocks = None): involved_instances = np.unique(queries, axis = None) relevant_data = data_df.reset_index(drop=Tr...
jankrans/Conditional-Generative-Neural-Networks
repositories/profile-clustering/energyclustering/clustering/similarity/distmatrix.py
distmatrix.py
py
4,922
python
en
code
0
github-code
36
[ { "api_name": "distributed.Client", "line_number": 8, "usage_type": "name" }, { "api_name": "numpy.unique", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.array_split", "line_number": 11, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line...
30586804681
from django.contrib.formtools.wizard.views import SessionWizardView from django.core.urlresolvers import reverse from django.forms import modelformset_factory from django.http import HttpResponseRedirect from django.shortcuts import render, get_object_or_404 # Create your views here. from recipe.forms import * from r...
BrewRu/BrewRu
recipe/views.py
views.py
py
2,193
python
en
code
0
github-code
36
[ { "api_name": "django.forms.modelformset_factory", "line_number": 14, "usage_type": "call" }, { "api_name": "django.forms.modelformset_factory", "line_number": 15, "usage_type": "call" }, { "api_name": "django.forms.modelformset_factory", "line_number": 16, "usage_type": ...
17173794780
# -*- coding: utf-8 -*- # @Time : 2019/9/10 11:21 # @Author : bjsasc import json import logging import os import sys import time import DataUtil from pyinotify import WatchManager, Notifier, ProcessEvent, IN_CLOSE_WRITE # 设置日志输出两个handle,屏幕和文件 log = logging.getLogger('file watch ---') fp = logging.FileHandler('a.lo...
xingyundeyangzhen/zxm
DataWatcher.py
DataWatcher.py
py
2,812
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.FileHandler", "line_number": 14, "usage_type": "call" }, { "api_name": "logging.StreamHandler", "line_number": 15, "usage_type": "call" }, { "api_name": "logging.D...