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
41957950588
# encoding: UTF-8 """ 包含一些开发中常用的函数 """ import os import decimal import json from datetime import datetime import sys MAX_NUMBER = 10000000000000 MAX_DECIMAL = 4 def getRootPath(): path = '' for i in range(1,10): path = os.path.abspath(os.path.dirname('../'*i)) path = path if os.path.exists(path+'/log/') a...
suixinio/marketMaker
prj/common/vtFunction.py
vtFunction.py
py
2,048
python
en
code
15
github-code
21
[ { "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.dirname", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path.exists", "li...
46821849964
# Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html # useful for handling different item types with a single interface from itemadapter import ItemAdapter import json import os #合约及其地址信息存储位置 ADDRESS_D...
xf97/HuangGai
src/contractSpider/contractCodeGetter/contractCodeGetter/pipelines.py
pipelines.py
py
1,845
python
en
code
32
github-code
21
[ { "api_name": "json.loads", "line_number": 28, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 34, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 57, "usage_type": "call" }, { "api_name": "os.path", "line_number": 57, ...
20227643611
import utils KEY = b"YELLOW SUBMARINE" BLOCKSIZE = 16 with open("10.txt", "r") as file: lines = file.readlines() cipher = "".join([line[:-1] for line in lines]) plain = utils.AES_CBC_decrypt(KEY, b"\x00"*BLOCKSIZE, utils.b64Decode(cipher)) print(plain)
max644/matasano
10.py
10.py
py
259
python
en
code
0
github-code
21
[ { "api_name": "utils.AES_CBC_decrypt", "line_number": 11, "usage_type": "call" }, { "api_name": "utils.b64Decode", "line_number": 11, "usage_type": "call" } ]
15955633262
import warnings from typing import List, Mapping, Optional import arrow from vital.api.api import API class Sleep(API): """Endpoints for getting sleep data.""" def get( self, user_id: str, start_date: str, end_date: Optional[str] = "", provider: Optional[str] = "", ...
tryVital/vital-python
vital/api/sleep.py
sleep.py
py
2,259
python
en
code
8
github-code
21
[ { "api_name": "vital.api.api.API", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 16, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 17, "usage_type": "name" }, { "api_name": "typing.Mapping", ...
23634291972
import config import storage import logging import hashlib from flask import Flask, render_template, request, session from flask.json import jsonify from google.cloud.storage import Blob from search_api import SearchAPI app = Flask(__name__) app.config.from_object(config) # store of recipes recipes = SearchAPI() # ...
cleathart/Cloud-project
main.py
main.py
py
2,965
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 11, "usage_type": "call" }, { "api_name": "search_api.SearchAPI", "line_number": 15, "usage_type": "call" }, { "api_name": "storage.upload_file", "line_number": 22, "usage_type": "call" }, { "api_name": "flask.render_tem...
3163604486
import os import requests apiKey = os.getenv('API_KEY') headers = { 'X-API-Key': apiKey, 'Content-Type': 'application/json', 'Accept': 'application/json', } data = '{\n "texts": ["Just try it mate.","What are you waiting for?"],\n "to": ["pt-BR", "de"],\n "from": "en"\n }' respon...
lecto-ai/docs
examples/python/request.py
request.py
py
457
python
en
code
0
github-code
21
[ { "api_name": "os.getenv", "line_number": 4, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 14, "usage_type": "call" } ]
20693732017
import cv2 import numpy as np import HandTrackingModule as htm import time import autopy ######################## wScr,hScr = autopy.screen.size() wCan, hCan = 640,480 frameR = 100 smothening = 3 ######################## plocX,plocY = 0,0 clocX,clocy = 0,0 cap = cv2.VideoCapture(0) cap.set(3,wC...
WellingtonDev25/ShootingGameAI
AIPlayGame.py
AIPlayGame.py
py
1,460
python
en
code
0
github-code
21
[ { "api_name": "autopy.screen.size", "line_number": 8, "usage_type": "call" }, { "api_name": "autopy.screen", "line_number": 8, "usage_type": "attribute" }, { "api_name": "cv2.VideoCapture", "line_number": 18, "usage_type": "call" }, { "api_name": "HandTrackingModu...
26560654291
import pandas as pd import matplotlib.pyplot as plt import numpy as np import scipy.stats PRIOR = 'norm' # csv save data path. Will NOT overwrite if it already exists! TRACE_PATH = ('/home/mike/research/ac6_microburst_scale_sizes/models/mcmc_traces' f'/mcmc_weibull_{PRIOR}_trace.csv') df = pd.read_csv(TRA...
mshumko/ac6_microburst_scale_sizes
models/plot_weibull_dist.py
plot_weibull_dist.py
py
1,095
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.random.choice", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 15, "usage_type": "attribute" }, { "api_name": "numpy.linspace"...
73571969012
import os from five_paisa import * import time,json,datetime,sys import xlwings as xw import pandas as pd import copy import numpy as np import time import requests import dateutil.parser import threading from datetime import datetime,timedelta import pandas_ta as pta import math from pandas import DataFrame, Series...
mkbairwa/mkbairwa
strategy/Breakout_for_opt.py
Breakout_for_opt.py
py
56,769
python
en
code
0
github-code
21
[ { "api_name": "pandas.options", "line_number": 28, "usage_type": "attribute" }, { "api_name": "datetime.timedelta", "line_number": 30, "usage_type": "call" }, { "api_name": "pandas.bdate_range", "line_number": 38, "usage_type": "call" }, { "api_name": "pandas.set_...
72492590773
#!/bin/python from bs4 import BeautifulSoup as BS import re soup = BS(open('pre.html')) output = open('to_wz_pre.txt','w') expression = [] predict = [] terminal = [] nTerminal = [] iid = [] cnt = 0 table = soup.table ss = '' for tr in table.find_all('tr'): expr = re.sub(r'\s+',' ',tr.find('td',class_='expression...
DaytimeAH/My_SNLStudio
studio/MySNL/pg/to_wz.py
to_wz.py
py
1,992
python
en
code
2
github-code
21
[ { "api_name": "bs4.BeautifulSoup", "line_number": 6, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 18, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 34, "usage_type": "call" } ]
25941916540
# course: cmps3500 # CLASS Project # PYTHON IMPLEMENTATION OF A CUSTOM STATISTICS SUMMARY CALCULATOR # date: 09/10/09 # Student 1: Tawfic Jobah # Student 2: Edgar Rosales # Student 3: Dylan Anzaldo # description: Implementation of a statistics summary Calculator #sorting algorithm fr...
tawficJobah/programmingLanguages
calculatorProject.py
calculatorProject.py
py
8,543
python
en
code
0
github-code
21
[ { "api_name": "math.ceil", "line_number": 102, "usage_type": "call" }, { "api_name": "math.sqrt", "line_number": 117, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 139, "usage_type": "call" }, { "api_name": "csv.reader", "line_num...
36595508128
from __future__ import absolute_import, print_function, unicode_literals import sys import threading import halo.cursor as cursor from halo import Halo from halo._utils import colored_frame, decode_utf_8_text class HaloNotebook(Halo): def __init__( self, text="", color="cyan", t...
manrajgrover/halo
halo/halo_notebook.py
halo_notebook.py
py
3,183
python
en
code
2,798
github-code
21
[ { "api_name": "halo.Halo", "line_number": 12, "usage_type": "name" }, { "api_name": "sys.stdout", "line_number": 23, "usage_type": "attribute" }, { "api_name": "ipywidgets.widgets.Output", "line_number": 41, "usage_type": "call" }, { "api_name": "halo.cursor.hide"...
39342864311
import numpy as np try: import cupy as cp except ImportError: cp = None from kernel_tuner.observers.observer import BenchmarkObserver class CupyRuntimeObserver(BenchmarkObserver): """Observer that measures time using CUDA events during benchmarking in the CuPy backend""" def __init__(self, dev): ...
bouweandela/kernel_tuner
kernel_tuner/observers/cupy.py
cupy.py
py
756
python
en
code
null
github-code
21
[ { "api_name": "kernel_tuner.observers.observer.BenchmarkObserver", "line_number": 11, "usage_type": "name" }, { "api_name": "cupy.cuda.get_elapsed_time", "line_number": 23, "usage_type": "call" }, { "api_name": "cupy.cuda", "line_number": 23, "usage_type": "attribute" }...
4540610192
import json import numbers import requests class JSONError(Exception): def __init__(self, msg): super().__init__(msg) class JSON(object): def __init__(self, json_obj): self.json_obj = json_obj self.type = None if type(self.json_obj) == str: self.type = 'str' elif type(self.json_obj) ==...
tmathmeyer/chromium-src-tools
lib/libjson.py
libjson.py
py
1,957
python
en
code
0
github-code
21
[ { "api_name": "numbers.Number", "line_number": 21, "usage_type": "attribute" }, { "api_name": "requests.get", "line_number": 73, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 78, "usage_type": "call" }, { "api_name": "json.loads", "line_nu...
17064171413
#!/usr/bin/python3 import os import sys import csv import re import math from datetime import datetime # THIS SCRIPT NEEDS AT LEAST PYTHON 3.8. assert sys.version_info >= (3,8) # Extracts graphs generated by GaussianCluster. # The graphs is formatted into two files: nodesFile and edgesFile containing data for nodes ...
AutoPas/AutoPas
examples/md-flexible/scripts/extractClusterGraphSeparate.py
extractClusterGraphSeparate.py
py
11,079
python
en
code
30
github-code
21
[ { "api_name": "sys.version_info", "line_number": 11, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 48, "usage_type": "call" }, { "api_name": "re.search", "line_number": 53, "usage_type": "call" }, { "api_name": "re.search", "line_number...
70961871094
import numpy as np from pyquest_cffi import quest import pytest import mkl mkl.set_num_threads(1) env = quest.createQuESTEnv() nqubits_list = range(4, 26) def first_rotation(qubits, nqubits): for k in range(nqubits): quest.rotateX(qubits, k, np.random.rand()) quest.rotateZ(qubits, k, np.random.r...
qulacs/benchmark-qulacs
benchmark/singlethread/quest/benchmarks.py
benchmarks.py
py
1,505
python
en
code
6
github-code
21
[ { "api_name": "mkl.set_num_threads", "line_number": 6, "usage_type": "call" }, { "api_name": "pyquest_cffi.quest.createQuESTEnv", "line_number": 8, "usage_type": "call" }, { "api_name": "pyquest_cffi.quest", "line_number": 8, "usage_type": "name" }, { "api_name": ...
42684247808
import os from abc import ABC from datetime import datetime, timedelta from typing import List, Optional, Type from aiogram import types from . import states from .properties import Properties from bot.utils.ads.generator import get_ad class Job(ABC): """Job with opportunity to change properties and confirm"""...
Drop-Team/InnoPrintBot
Bot/bot/utils/jobs/job.py
job.py
py
3,935
python
en
code
18
github-code
21
[ { "api_name": "abc.ABC", "line_number": 14, "usage_type": "name" }, { "api_name": "typing.Type", "line_number": 18, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 19, "usage_type": "name" }, { "api_name": "aiogram.types.Message", "li...
30649978754
from pyrogram import Client, filters from pyrogram.errors import FloodWait from time import sleep from defs import ran from random import randint, choice as ch app = Client("project") global reg reg = [] global sos sos = 0 #запуск регистрации @app.on_message(filters.command("lot", prefixes=".") & filters.me) def lot...
PRO100-IVANOFF/USERBOT-FOR-LOTTERY
project/userbot/user.py
user.py
py
4,000
python
ru
code
1
github-code
21
[ { "api_name": "pyrogram.Client", "line_number": 7, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 27, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 30, "usage_type": "call" }, { "api_name": "defs.ran", "line_number": 32...
41780582660
from selenium import webdriver from time import sleep from selenium.webdriver.common.by import By from selenium.webdriver.chrome.options import Options import json import pandas as pd class SacombankCrawler: def __init__(self) -> None: self.options = Options() self.options.headless = False ...
hongtienhaolk2001/Crawler_Tools
crawling_sacombank.py
crawling_sacombank.py
py
11,476
python
en
code
0
github-code
21
[ { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 11, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 22, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 27, "usage_type": "call" }, { "ap...
20727292362
import io from operator import mod import sys # 再帰用 # sys.setrecursionlimit(10**9) _INPUT = """\ 7 7 6 8 6 8 7 7 6 """ sys.stdin = io.StringIO(_INPUT) # --------------------------------- import itertools ll = [] for _ in range(3): ll += map(int, input().split()) cand = [ # 横一列ずつ (0, 1, 2), (3, 4, ...
makima333/Atcoder-ganbaru
contest/abc319/C.py
C.py
py
771
python
en
code
0
github-code
21
[ { "api_name": "sys.stdin", "line_number": 15, "usage_type": "attribute" }, { "api_name": "io.StringIO", "line_number": 15, "usage_type": "call" }, { "api_name": "itertools.permutations", "line_number": 48, "usage_type": "call" } ]
16089482195
import streamlit as st import numpy as np import plotly.express as px import streamlit as st import altair as alt import pandas as pd from add_data import db_execute_fetch def app(): st.title('APP2') st.write('Welcome to app2') def app(): st.title('Languages') st.write('You can see the languages piec...
heavye/Day5_Challenge_10ac
lang.py
lang.py
py
1,351
python
en
code
0
github-code
21
[ { "api_name": "streamlit.title", "line_number": 11, "usage_type": "call" }, { "api_name": "streamlit.write", "line_number": 12, "usage_type": "call" }, { "api_name": "streamlit.title", "line_number": 15, "usage_type": "call" }, { "api_name": "streamlit.write", ...
19073198002
import os import re import tempfile import shutil import configparser from threading import Thread import pytest from maninex import maninex CONF_CONTENT = ''' [directories] extension_dir = none json_dir = /usr/share/inox/extensions [extensions] cjpalhdlnbpafiamejdnhcphjbkeiagm pkehgijcmpdhfbdbbnkijodmdjhbjlgp egnjhc...
InspectorMustache/maninex
tests/test_maninex.py
test_maninex.py
py
4,126
python
en
code
5
github-code
21
[ { "api_name": "tempfile.mkdtemp", "line_number": 24, "usage_type": "call" }, { "api_name": "tempfile.mkdtemp", "line_number": 25, "usage_type": "call" }, { "api_name": "tempfile.mkstemp", "line_number": 26, "usage_type": "call" }, { "api_name": "configparser.Confi...
23110094361
import editdistance from functools import partial import matplotlib.pyplot as plt import numpy as np import random import tensorflow as tf from tqdm import trange class Vocab(object): def __init__(self, tokens, bos='__BOS__', eos='__EOS__', sep=''): """ handles tokenizing and detokenizing """ ass...
markmo/dltemplate
src/rl/rl_for_seq2seq/util.py
util.py
py
15,483
python
en
code
57
github-code
21
[ { "api_name": "numpy.zeros", "line_number": 56, "usage_type": "call" }, { "api_name": "tensorflow.get_default_session", "line_number": 94, "usage_type": "call" }, { "api_name": "tensorflow.global_variables", "line_number": 95, "usage_type": "call" }, { "api_name":...
13009859994
import torch from math import sqrt import numpy as np from torch_geometric.data import Data def KNN_classify(k, X_set, x): """ k:number of neighbours X_set: the datset of x x: to find the nearest neighbor of data x """ distances = [sqrt(np.sum((x_compare-x)**2)) for x_compare in X_set] # cal...
yanshen0210/DGAT-LPS
datasets/Generator.py
Generator.py
py
1,373
python
en
code
23
github-code
21
[ { "api_name": "math.sqrt", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.sum", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.argsort", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 29...
37690725662
import pandas as pd import streamlit as st import numpy as np st.set_page_config( page_title="Oh Snap! Card Rules" ) # CSS to inject contained in a string hide_table_row_index = """ <style> thead tr th:first-child {display:none} tbody th {display:none} </style> """ ...
kmm2600/card_rules
streamlit_app.py
streamlit_app.py
py
1,339
python
en
code
0
github-code
21
[ { "api_name": "streamlit.set_page_config", "line_number": 5, "usage_type": "call" }, { "api_name": "streamlit.markdown", "line_number": 18, "usage_type": "call" }, { "api_name": "streamlit.markdown", "line_number": 28, "usage_type": "call" }, { "api_name": "pandas...
13370825540
# from replit import db from discord.ext import commands import globals as gl class Requests(commands.Cog): # commands associated with memes def __init__(self, bot): self.bot = bot self._last_member = None if 'requests' not in gl.db.keys(): gl.db['requests'] = {} if ...
clevs1363/MO-Bot
src/Requests.py
Requests.py
py
5,370
python
en
code
0
github-code
21
[ { "api_name": "discord.ext.commands.Cog", "line_number": 5, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 5, "usage_type": "name" }, { "api_name": "globals.db.keys", "line_number": 10, "usage_type": "call" }, { "api_name": "glob...
73677475574
# plot the CC import pygmt import os from obspy import read basedir = 'Sanxia' # 定义需要绘图的文件 ccfile = basedir+os.sep+'Events'+os.sep+'WaveformCC'+os.sep+'draw.cc3' dirf = basedir+os.sep+'Events'+os.sep+'IdDirFiles'+os.sep+'iddir.dat' pygmt.config(FONT='7p,black',FONT_ANNOT='7p,black',FONT_LABEL='7p,black') with open(ccf...
Luojiahong/PyBCSEIS
plotbcseis.py
plotbcseis.py
py
3,823
python
en
code
3
github-code
21
[ { "api_name": "os.sep", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.sep", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pygmt.config", "line_number": 10, "usage_type": "call" }, { "api_name": "os.sep", "line_number": 25, ...
32642424095
from nltk import * from nltk.corpus import stopwords import docx import string def input_doxc(): data_docx = docx.Document('input.docx') data = [] for paragraph in data_docx.paragraphs: data.append(paragraph.text) data = ' '.join(data) return data def graphematic_analiz(data): l...
SeemerGG/computational_linguistics
Lab_1/Lab_1/Lab_1.py
Lab_1.py
py
1,351
python
en
code
0
github-code
21
[ { "api_name": "docx.Document", "line_number": 8, "usage_type": "call" }, { "api_name": "string.punctuation", "line_number": 20, "usage_type": "attribute" }, { "api_name": "nltk.corpus.stopwords.words", "line_number": 25, "usage_type": "call" }, { "api_name": "nltk...
18172437968
import numpy as np from copy import copy, deepcopy from scipy.stats import norm from spikesorting_fullpursuit import neuron_separability from spikesorting_fullpursuit.consolidate import SegSummary from spikesorting_fullpursuit.preprocessing import calculate_robust_template from spikesorting_fullpursuit.parallel.segment...
njh27/spikesorting_fullpursuit
spikesorting_fullpursuit/full_binary_pursuit.py
full_binary_pursuit.py
py
24,675
python
en
code
5
github-code
21
[ { "api_name": "numpy.arange", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.int64", "line_number": 22, "usage_type": "attribute" }, { "api_name": "numpy.arange", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.int64", "line_nu...
73988109813
"""Number of variant per sample in vcf file Author: Shujia Huang Date: 2021-04-19 15:08:42 """ import argparse import gzip import sys import re from datetime import datetime if __name__ == "__main__": START_TIME = datetime.now() cmdparser = argparse.ArgumentParser(description="Number of variant per sample i...
ShujiaHuang/genotools
genotools/vcf_hethom.py
vcf_hethom.py
py
2,837
python
en
code
3
github-code
21
[ { "api_name": "datetime.datetime.now", "line_number": 14, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 14, "usage_type": "name" }, { "api_name": "argparse.ArgumentParser", "line_number": 16, "usage_type": "call" }, { "api_name": "gzip....
74243097972
from typing import TYPE_CHECKING import numpy as np from pyuff_ustb.objects.scans.scan import Scan from pyuff_ustb.objects.uff import compulsory_property, dependent_property from pyuff_ustb.readers import LazyArray if TYPE_CHECKING: # Make sure properties are treated as properties when type checking compulso...
magnusdk/pyuff_ustb
pyuff_ustb/objects/scans/linear_scan.py
linear_scan.py
py
2,997
python
en
code
9
github-code
21
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 9, "usage_type": "name" }, { "api_name": "pyuff_ustb.objects.uff.compulsory_property", "line_number": 11, "usage_type": "name" }, { "api_name": "pyuff_ustb.objects.uff.dependent_property", "line_number": 13, "usage_type...
8943408420
from django.shortcuts import render, redirect from django.http import HttpResponse, JsonResponse from rest_framework.serializers import Serializer from inicio.models import Producto, Categoria, Valorizacion from inicio.forms import ProductoForm from .forms import ValorizacionForm from . import forms from django.http im...
puduckey/python_page_crud_mysql
inicio/views.py
views.py
py
6,795
python
es
code
0
github-code
21
[ { "api_name": "inicio.models.Producto.objects.all", "line_number": 20, "usage_type": "call" }, { "api_name": "inicio.models.Producto.objects", "line_number": 20, "usage_type": "attribute" }, { "api_name": "inicio.models.Producto", "line_number": 20, "usage_type": "name" ...
17466256562
"""This is a prototype that displays different attributes of the feature vectors that have been obtained from the riot api. These features are displayed as a distribution. """ import pymongo from tensorflow import keras from tensorflow.keras import layers import numpy as np from sklearn.model_selection import train_tes...
sudarshanvankudre/league-match-prediction
prototype.py
prototype.py
py
2,489
python
en
code
0
github-code
21
[ { "api_name": "pymongo.MongoClient", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 57, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 58, "usage_type": "call" }, { "api_name": "sklearn.model_selection.t...
36099867555
import argparse parser = argparse.ArgumentParser() parser.add_argument('--label_path', '--path', default=None,type=str, help="labeln_dir") parser.add_argument('--out_path', '--output', default=None,type=str, help="labeln_dir") args = parser.parse_args() with open(args.label_path) as f: lines=f.readlines() li...
chiahuilin0531/yolov4-tflite
data/dataset/sort.py
sort.py
py
418
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 3, "usage_type": "call" } ]
5181440652
import argparse from datetime import datetime, timedelta import json import sys import urllib.parse import urllib.request def fetch(url): headers = { 'Authorization': 'Bearer {}'.format(args.apikey) } url = urllib.parse.urljoin('https://api.aleth.io/', url) print('.', end='', flush=True, file=...
meronym/eth-counterparties
scan.py
scan.py
py
2,755
python
en
code
2
github-code
21
[ { "api_name": "urllib.parse.parse.urljoin", "line_number": 13, "usage_type": "call" }, { "api_name": "urllib.parse.parse", "line_number": 13, "usage_type": "attribute" }, { "api_name": "urllib.parse", "line_number": 13, "usage_type": "name" }, { "api_name": "sys.s...
73034960693
# Authors : Alexandre Gramfort, alexandre.gramfort@telecom-paristech.fr (2011) # Denis A. Engemann <denis.engemann@gmail.com> # License : BSD 3-clause import numpy as np from ..parallel import parallel_func from ..io.pick import _pick_data_channels from ..utils import logger, verbose, _time_mask from ..fixe...
LiuFang816/SALSTM_py_data
python/mne-tools_mne-python/mne-python-master/mne/time_frequency/psd.py
psd.py
py
11,027
python
en
code
9
github-code
21
[ { "api_name": "epochs.BaseEpochs", "line_number": 41, "usage_type": "name" }, { "api_name": "io.base.BaseRaw", "line_number": 41, "usage_type": "name" }, { "api_name": "evoked.Evoked", "line_number": 41, "usage_type": "name" }, { "api_name": "utils._time_mask", ...
38594229236
import util import matplotlib.pyplot as plt import matplotlib def dirname(param, a, b, prec): return "inverse_power" + param + "_a" + a + "_b" + b \ + "_EMh_qf_prec" + str(prec) param = ["0.5", "1", "2"] log2a = [-1, -10] a = [str(2**e) for e in log2a] b = "1" prec = [248, 184] ymin = [1e-50, 1e-30]...
ymkoyama/fcmf
fig5.py
fig5.py
py
1,909
python
en
code
0
github-code
21
[ { "api_name": "util.print_sys_version", "line_number": 18, "usage_type": "call" }, { "api_name": "util.read_float", "line_number": 22, "usage_type": "call" }, { "api_name": "util.read_float2", "line_number": 25, "usage_type": "call" }, { "api_name": "util.read_flo...
24161206573
from matplotlib.lines import Line2D import datetime # Set the marker fill style # fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top' | 'none'] # drawstyle: [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ] # linestyle: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] _SUPPORTED_ARGS = dict(draws...
gavriva/pyview
sview/line.py
line.py
py
2,422
python
en
code
0
github-code
21
[ { "api_name": "matplotlib.lines.Line2D", "line_number": 39, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 75, "usage_type": "attribute" } ]
32684651716
######################################################################## # File name: listen_pep.py # This file is part of: aioxmpp # # LICENSE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Found...
horazont/aioxmpp
examples/listen_pep.py
listen_pep.py
py
2,545
python
en
code
215
github-code
21
[ { "api_name": "framework.Example", "line_number": 36, "usage_type": "name" }, { "api_name": "io.BytesIO", "line_number": 54, "usage_type": "call" }, { "api_name": "aioxmpp.disco.xml.write_single_xso", "line_number": 55, "usage_type": "call" }, { "api_name": "aioxm...
28421553079
import adsk.core, adsk.fusion, adsk.cam, traceback from datetime import datetime from pathlib import Path from typing import NamedTuple, List, Set import re import hashlib import os handlers = [] class Ctx(NamedTuple): ''' Context manager. Passed between functions to provide paramaters ''' folder: str ...
MOAMIndustries/F360_Stl_Exporter
Body exporter.py
Body exporter.py
py
8,475
python
en
code
0
github-code
21
[ { "api_name": "typing.NamedTuple", "line_number": 11, "usage_type": "name" }, { "api_name": "adsk.core.core", "line_number": 15, "usage_type": "attribute" }, { "api_name": "adsk.core", "line_number": 15, "usage_type": "name" }, { "api_name": "adsk.core.fusion.Desi...
21574940958
from zone import Zone, MainZone, Cell, Cartesian from conversion import RadixBase, ndigit_for_radix, NumberView import copy import json import sys from typing import List, Optional, Union, Any, Tuple, Dict class MetaZone(MainZone): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) ...
GGTT2/DISHAS
web/pythonScript/metazone.py
metazone.py
py
14,783
python
en
code
0
github-code
21
[ { "api_name": "zone.MainZone", "line_number": 10, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 15, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 15, "usage_type": "name" }, { "api_name": "typing.List", "line_num...
1780799313
import datetime from django import http from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response from django.template.context import RequestContext from django.core.cache import cache """ Aimed at extracting information abou...
pathakamit88/memcacheinfo
views.py
views.py
py
5,874
python
en
code
1
github-code
21
[ { "api_name": "django.http.Http404", "line_number": 17, "usage_type": "attribute" }, { "api_name": "django.http", "line_number": 17, "usage_type": "name" }, { "api_name": "django.core.cache.cache.clear", "line_number": 21, "usage_type": "call" }, { "api_name": "dj...
16120933670
import functools from os import path import time from absl import app import flax from flax.metrics import tensorboard from flax.training import checkpoints from internal import configs, datasets, math, models, utils, vis # pylint: disable=g-multiple-import import jax from jax import random import numpy as np from sk...
leejaeyong7/regnerf
write.py
write.py
py
4,681
python
en
code
0
github-code
21
[ { "api_name": "internal.configs.define_common_flags", "line_number": 21, "usage_type": "call" }, { "api_name": "internal.configs", "line_number": 21, "usage_type": "name" }, { "api_name": "jax.config.parse_flags_with_absl", "line_number": 22, "usage_type": "call" }, {...
39096530423
from django.shortcuts import render, redirect from .models import Maincategory, Subcategory, Products,Post_advertise,Blog from .form import MaincategoryForm, SubcategoryForm,ProductsForm,AddsproductForm,AddBlogForm from django.http import HttpResponse from profiles.models import User from django.contrib.auth.decor...
gajanan0707/PythonDjangoFarming
admin_owner/views.py
views.py
py
7,692
python
en
code
2
github-code
21
[ { "api_name": "models.Blog.objects.all", "line_number": 15, "usage_type": "call" }, { "api_name": "models.Blog.objects", "line_number": 15, "usage_type": "attribute" }, { "api_name": "models.Blog", "line_number": 15, "usage_type": "name" }, { "api_name": "django.s...
14902312653
#!/usr/bin/python # # A simple recursive file revision control system. # Simple: it's a tiny subset of other revision control systems. # Recursive: operates on the current working directory and subdirectories. # # Usage: # # Archive.py init # # Create a repository in the current working directory. # The repository...
DoctorLoki/tools
Archive.py
Archive.py
py
15,140
python
en
code
0
github-code
21
[ { "api_name": "os.sep", "line_number": 113, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 143, "usage_type": "attribute" }, { "api_name": "os.mkdir", "line_number": 158, "usage_type": "call" }, { "api_name": "sys.stdout.write", "line_nu...
73894079733
# -*- coding: utf8 -*- # @Time : 2020/5/9 20:46 # @Author : Wu Tianyu # 图片 import numpy as np from matplotlib import pyplot as plt import cv2 def cv_test01(): img = cv2.imdecode(np.fromfile("F:\\腾讯\\图\\80780817_p0.png", dtype='uint8'), -1) if img is None: print("图片路径错误") cv2.namedWindow("image...
CynicalHeart/PyLearn
CV_Learn/GUI_Learn01.py
GUI_Learn01.py
py
841
python
en
code
0
github-code
21
[ { "api_name": "cv2.imdecode", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.fromfile", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.namedWindow", "line_number": 14, "usage_type": "call" }, { "api_name": "cv2.WINDOW_AUTOSIZE", ...
74871147571
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from werkzeug.utils import secure_filename import os # init SQLAlchemy to use it later db = SQLAlchemy() # create media route to store files UPLOAD_FOLDER = "" if os.name == "posix": # media root in linux UPL...
alex-chinche/file_manager
project/__init__.py
__init__.py
py
1,313
python
en
code
0
github-code
21
[ { "api_name": "flask_sqlalchemy.SQLAlchemy", "line_number": 9, "usage_type": "call" }, { "api_name": "os.name", "line_number": 13, "usage_type": "attribute" }, { "api_name": "os.name", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.getcwd", ...
16089385355
from datetime import delta, timedelta import airflow from airflow import DAG from airflow.operators.bash_operator import BashOperator default_args = { 'owner' : 'airflow', 'start_date' : airflow.utils.dates.days_ago(2), # 'end_date' : datetime(2020, 12, 30), 'depends_on_past' : False, 'email' : ['a...
heavye/Data-warehouse-tech-stack-with-MySQL-DBT-Airflow-and-Spark
dag.py
dag.py
py
1,460
python
en
code
0
github-code
21
[ { "api_name": "airflow.utils.dates.days_ago", "line_number": 8, "usage_type": "call" }, { "api_name": "airflow.utils", "line_number": 8, "usage_type": "attribute" }, { "api_name": "datetime.timedelta", "line_number": 16, "usage_type": "call" }, { "api_name": "airf...
23697996640
import matplotlib.pyplot as plt import numpy as np from sklearn import datasets dataset = datasets.load_digits() x_data = dataset.data y_data = dataset.target K = 11 fig, axes = plt.subplots(3, 3, figsize=(10, 10)) for ax_idx, ax in enumerate(axes.flatten()): ax.imshow(x_data[ax_idx].reshape(8, 8), ...
yeongun130/Python
py_sklearn.py
py_sklearn.py
py
1,076
python
en
code
0
github-code
21
[ { "api_name": "sklearn.datasets.load_digits", "line_number": 5, "usage_type": "call" }, { "api_name": "sklearn.datasets", "line_number": 5, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 10, "usage_type": "call" }, { "api_name":...
31301994494
import argparse import random import numpy as np import torch from trainer import ( CBHGTrainer, Seq2SeqTrainer, ) SEED = 1234 random.seed(SEED) np.random.seed(SEED) torch.manual_seed(SEED) torch.cuda.manual_seed(SEED) torch.backends.cudnn.deterministic = True torch.backends.cudnn.benchmark = False def tra...
almodhfer/Arabic_Diacritization
train.py
train.py
py
1,152
python
en
code
29
github-code
21
[ { "api_name": "random.seed", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.random.seed", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 14, "usage_type": "attribute" }, { "api_name": "torch.manual_seed", ...
29054343386
from django.contrib import admin from main.models import ( Cabinet, Position, Employee, Schedule, PosHeld, Floor, Degree ) from django.contrib.staticfiles.templatetags.staticfiles import static from django.utils.safestring import mark_safe from django.template.loader import get_template from main.forms impor...
Smet1/bmstuback
bmstumap_admin/main/admin.py
admin.py
py
1,919
python
en
code
0
github-code
21
[ { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 12, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 12, "usage_type": "name" }, { "api_name": "django.contrib.admin.register", "line_number": 11, "usage_type": "call" }, ...
3358790802
from django.contrib.auth.mixins import LoginRequiredMixin from django.http import JsonResponse from django.views.generic import View from YtManagerApp.management.jobs.synchronize import SynchronizeJob from YtManagerApp.models import Video, Subscription class SyncNowView(LoginRequiredMixin, View): def post(self, ...
chibicitiberiu/ytsm
app/YtManagerApp/views/actions.py
actions.py
py
1,581
python
en
code
308
github-code
21
[ { "api_name": "django.contrib.auth.mixins.LoginRequiredMixin", "line_number": 9, "usage_type": "name" }, { "api_name": "django.views.generic.View", "line_number": 9, "usage_type": "name" }, { "api_name": "YtManagerApp.management.jobs.synchronize.SynchronizeJob.schedule_now_for_su...
14405141299
import torch.nn as nn import torch class AutoEncoder(nn.Module): def __init__(self): super(AutoEncoder, self).__init__() in_channels = 64 * 64 * 64 out_channels = 128 #256 #1024 #64 #Encoder self.flat = nn.Flatten() self.en1 = nn.Linear(in_channels, out_channels) ...
MASILab/DeepN4
src/scratch/model_AE.py
model_AE.py
py
983
python
en
code
0
github-code
21
[ { "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.Flatten", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.nn", "line_num...
6206153191
from collections import namedtuple def compare_text_files(edw_file, skills_file): """ reads text files and converts each to a set and then checks for differences """ with open(edw_file, 'r') as f: edw_data = f.readlines() edw_uids = {row for row in edw_data} with open(skills_file, 'r') as ...
rlee21/snippets
python/namedtupled.py
namedtupled.py
py
773
python
en
code
0
github-code
21
[ { "api_name": "collections.namedtuple", "line_number": 15, "usage_type": "call" } ]
38456345301
from selenium import webdriver from selenium.webdriver.firefox.options import Options import pandas as pd import time, re, json, sys, datetime, os from configparser import ConfigParser ###### SIDE COURSE ####### def progress(current, end): tot_len = 30 percentage = current / float(end) filled_len = int(r...
lukefreeman42/ChaturBot
chaturbot.py
chaturbot.py
py
7,669
python
en
code
0
github-code
21
[ { "api_name": "sys.stdout.write", "line_number": 18, "usage_type": "call" }, { "api_name": "sys.stdout", "line_number": 18, "usage_type": "attribute" }, { "api_name": "sys.stdout.flush", "line_number": 19, "usage_type": "call" }, { "api_name": "sys.stdout", "l...
73026995893
from __future__ import print_function """ Distribution definition for Cartopy. """ import setuptools from setuptools import setup, Extension from setuptools import Command from setuptools import convert_path from distutils.spawn import find_executable from distutils.sysconfig import get_config_var import fnmatch imp...
LiuFang816/SALSTM_py_data
python/SciTools_cartopy/cartopy-master/setup.py
setup.py
py
14,877
python
en
code
9
github-code
21
[ { "api_name": "setuptools.dist.Distribution", "line_number": 23, "usage_type": "call" }, { "api_name": "setuptools.dist", "line_number": 23, "usage_type": "attribute" }, { "api_name": "sys.version_info", "line_number": 38, "usage_type": "attribute" }, { "api_name"...
23540311362
from sklearn.neighbors import NearestNeighbors from scipy.spatial import distance import numpy as np import os from copy import deepcopy import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.collections as mc from scipy.io import savemat from sklearn.metrics.pairwise import pairwise...
nrkarthikeyan/topology-decision-boundaries
src/TopologicalData.py
TopologicalData.py
py
31,872
python
en
code
26
github-code
21
[ { "api_name": "matplotlib.use", "line_number": 7, "usage_type": "call" }, { "api_name": "common_utils.create_dir_if_not_exist", "line_number": 51, "usage_type": "call" }, { "api_name": "common_utils.create_dir_if_not_exist", "line_number": 52, "usage_type": "call" }, ...
22813707567
""" bilibili_api.login_func 登录功能相关 """ import enum import json import uuid import threading from typing import Tuple, Union import requests from . import login from .utils.utils import get_api from .exceptions import LoginError from .utils.picture import Picture from .utils.credential import Crede...
Nemo2011/bilibili-api
bilibili_api/login_func.py
login_func.py
py
5,362
python
zh
code
1,410
github-code
21
[ { "api_name": "utils.utils.get_api", "line_number": 21, "usage_type": "call" }, { "api_name": "enum.Enum", "line_number": 24, "usage_type": "attribute" }, { "api_name": "utils.picture.Picture.from_file", "line_number": 48, "usage_type": "call" }, { "api_name": "ut...
71534333814
import wandb from sklearn.linear_model import LogisticRegression from sklearn.metrics import accuracy_score from sklearn.metrics import f1_score import pandas as pd def run(): df_train = pd.read_csv('../data/s_train.csv') df_valid = pd.read_csv('../data/s_valid.csv') # df_test = pd.read_csv('../data/s_val...
berkegocmen/wesad
src/stepwise_lr.py
stepwise_lr.py
py
1,705
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 10, "usage_type": "call" }, { "api_name": "wandb.init", "line_number": 16, "usage_type": "call" }, { "api_name": "wandb.run", "line_numbe...
36474600701
import numpy as np import tensorflow.keras.callbacks from matplotlib import pyplot as plt def plot_history(history: tensorflow.keras.callbacks.History) -> None: """ Method to plot the training and validation accuracy over the different epochs. Args: history: history returned by training the model ...
nadbot/Exploring-Convolutional-Neural-Networks-for-Voice-Activity-Detection
train.py
train.py
py
1,248
python
en
code
0
github-code
21
[ { "api_name": "tensorflow.keras.callbacks.keras", "line_number": 6, "usage_type": "attribute" }, { "api_name": "tensorflow.keras.callbacks", "line_number": 6, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 12, "usage_type": "call" }, { ...
18776622637
''' this script works with CPU or single GPU ''' from __future__ import print_function import time import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import random import numpy as np import scipy.io import argparse import os import gflags import sys # Matplotlib import ...
qidigit/Physics-Informed-Data-Driven-Algorithm-for-Ensemble-Forecast
pred_dyad_condGau.py
pred_dyad_condGau.py
py
13,063
python
en
code
2
github-code
21
[ { "api_name": "matplotlib.rcParams", "line_number": 28, "usage_type": "name" }, { "api_name": "matplotlib.rcParams", "line_number": 29, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.rc", "line_number": 35, "usage_type": "call" }, { "api_name": "matplotl...
13859891750
import asyncio import json import time import logging import contextlib log = logging.getLogger(__name__) # Log under current position in hierarchy class SocketReader: def __init__(self, settings, loop=None,): self.ip = settings['ip'] self.port = settings['port'] self.command = settings.get...
jmosbacher/direxino_monitor
readers.py
readers.py
py
2,756
python
en
code
0
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "asyncio.get_event_loop", "line_number": 19, "usage_type": "call" }, { "api_name": "asyncio.open_connection", "line_number": 40, "usage_type": "call" }, { "api_name": "json....
24069671250
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="restutil-tjdaley", # Replace with your own username version="0.0.3", author="Thomas J. Daley", author_email="tdaley@daleyfound.org", description="API for accessing my restutil service", ...
tjdaley/restutil_api
setup.py
setup.py
py
786
python
en
code
0
github-code
21
[ { "api_name": "setuptools.setup", "line_number": 6, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 15, "usage_type": "call" } ]
38135371817
from flask import Flask, request, jsonify from prj125 import getPrediction app = Flask(__name__) @app.route("/preditic-alpha", methods = ["POST"]) def predictData(): image = request.files.get("alpha") prediction = getPrediction(image) return jsonify({ "Prediction": prediction ...
AmoghMerudi/Project125
app.py
app.py
py
385
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 4, "usage_type": "call" }, { "api_name": "flask.request.files.get", "line_number": 8, "usage_type": "call" }, { "api_name": "flask.request.files", "line_number": 8, "usage_type": "attribute" }, { "api_name": "flask.reque...
8490665201
from __future__ import unicode_literals from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation from django.contrib.contenttypes.models import ContentType from django.db import models # Create your models here. from rest_framework import permissions from cor...
gafusss/technotrack_web_sem2
src/m_like/models.py
models.py
py
3,050
python
en
code
1
github-code
21
[ { "api_name": "core.models.DeletableMixin", "line_number": 15, "usage_type": "name" }, { "api_name": "m_event.models.CreateEventOnCreateMixin", "line_number": 15, "usage_type": "name" }, { "api_name": "rest_framework.permissions.SAFE_METHODS", "line_number": 25, "usage_ty...
18293493432
import torch import torch.nn as nn from torch.nn import init from torch.nn import functional as F import functools from torch.optim import lr_scheduler import torchvision.models as models ############################################################################### # Helper Functions ################################...
ms903-github/ACAL-pytorch
libs/models.py
models.py
py
25,408
python
en
code
0
github-code
21
[ { "api_name": "functools.partial", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.nn.BatchNorm2d", "line_number": 16, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 16, "usage_type": "name" }, { "api_name": "functools.partia...
71279083894
from web3 import Web3, HTTPProvider from crypto_commando.daemon.service import get_contract, cvxCRV_rewardsconvex from crypto_commando.config import NETWORKS ETH_MAINNET = NETWORKS[0] # HTTPProvider: w3 = Web3(HTTPProvider(ETH_MAINNET.get("https_url"))) def test_contract(): weth = Web3.toChecksumAddress("0xC02a...
citadelgrad/crypto-commando
tests/daemon/test_service.py
test_service.py
py
539
python
en
code
3
github-code
21
[ { "api_name": "crypto_commando.config.NETWORKS", "line_number": 6, "usage_type": "name" }, { "api_name": "web3.Web3", "line_number": 8, "usage_type": "call" }, { "api_name": "web3.HTTPProvider", "line_number": 8, "usage_type": "call" }, { "api_name": "web3.Web3.to...
14968303555
import os, sys, random, os.path import re, textwrap from optparse import OptionParser from io import open Z = os.path.basename(sys.argv[0]) __version__ = '1.0.2' __doc__ = """ %s [options] input-file %s is a python script to generate type-safe getopt_long() option parsing routines. Version: %s Author: Sudhi Herle <...
opencoff/portable-lib
tools/mkgetopt.py
mkgetopt.py
py
44,096
python
en
code
36
github-code
21
[ { "api_name": "os.path.basename", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 6, "usage_type": "attribute" }, { "api_name": "sys.stderr.write", "line...
14405184512
import time from .const import DOMAIN, LOGGER from .helpers import format_mqtt_message, get_val_from_str from homeassistant.core import HomeAssistant, Context, callback from homeassistant.helpers.script import Script from homeassistant.helpers.condition import async_template as template_condition from homeassistant.hel...
Sian-Lee-SA/Home-Assistant-Switch-Manager
custom_components/switch_manager/models.py
models.py
py
15,945
python
en
code
140
github-code
21
[ { "api_name": "homeassistant.core.HomeAssistant", "line_number": 13, "usage_type": "name" }, { "api_name": "homeassistant.helpers.template.Template", "line_number": 17, "usage_type": "argument" }, { "api_name": "homeassistant.helpers.condition.async_template", "line_number": ...
15527519594
import requests import json import sys import lxml.html as lh import datetime as dt import base64 import random import time #constants urlBase = "https://webapp.library.uvic.ca/studyrooms/" header={'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0'} groupNames = ['Literature ...
RcrossF/BookingBot
book.py
book.py
py
9,298
python
en
code
3
github-code
21
[ { "api_name": "random.randrange", "line_number": 17, "usage_type": "call" }, { "api_name": "json.load", "line_number": 21, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 24, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 3...
4123124707
import asyncio import types import pytest from ipc import rpc, utils from ipc.rpc.client_commands import ClientCommands @pytest.fixture def client() -> rpc.Client: return rpc.Client('', 0) @pytest.mark.asyncio async def test_rpc_client_invoke( client: rpc.Client, event_loop: asyncio.AbstractEventLoop ) ->...
tinoy1336/py-ipc
tests/test_rpc_client.py
test_rpc_client.py
py
1,466
python
en
code
0
github-code
21
[ { "api_name": "ipc.rpc.Client", "line_number": 12, "usage_type": "call" }, { "api_name": "ipc.rpc", "line_number": 12, "usage_type": "name" }, { "api_name": "pytest.fixture", "line_number": 10, "usage_type": "attribute" }, { "api_name": "ipc.rpc.Client", "line...
2216560488
import pandas as pd import numpy as np from tqdm import tqdm from scipy.spatial.distance import pdist from scipy.optimize import minimize_scalar from sklearn.metrics import silhouette_score from sklearn.cluster import KMeans from .metrics import mean_absolute_error class MemoryCollaborativeFilter: def __init__(...
Csuarezgurruchaga/TESIS-HYBRID-RECOMMENDER-SYSTEM
source/utils/collaborative_filtering.py
collaborative_filtering.py
py
29,048
python
en
code
0
github-code
21
[ { "api_name": "scipy.spatial.distance.pdist", "line_number": 54, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 65, "usage_type": "attribute" }, { "api_name": "pandas.pivot_table", "line_number": 68, "usage_type": "call" }, { "api_name": ...
14404159624
""" Parts of the U-Net model """ import torch import torch.nn as nn import torch.nn.functional as F from typing import Type, Any, Callable, Union, List, Optional class Unet_backbone(nn.Module): """(convolution => [BN] => ReLU)""" def __init__(self, in_channels, out_channels): super().__init__() ...
ilcessadecalcular/attention_seg
model_1/raw/unet_parts.py
unet_parts.py
py
6,829
python
en
code
0
github-code
21
[ { "api_name": "torch.nn.Module", "line_number": 9, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 9, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 14, "usage_type": "call" }, { "api_name": "torch.nn", "line_numb...
43062733672
''' RWExtractSCC - Extract information from SSC and populate Elastic tables - pull new information if either scandate changed or counts changed ''' ''' Initialization and setup/configuration - includes establishing authorization ''' from RWSSC_Utils import sscUtils from RWSSCESutil import SSCESUtils from RW...
gatsalt/FDRewrite
RWExtractSSC.py
RWExtractSSC.py
py
8,789
python
en
code
0
github-code
21
[ { "api_name": "json.load", "line_number": 20, "usage_type": "call" }, { "api_name": "configLogging.configLogging", "line_number": 22, "usage_type": "call" }, { "api_name": "logging.info", "line_number": 24, "usage_type": "call" }, { "api_name": "RWSSC_Utils.sscUti...
663878943
import requests import re proxies={"http":"http://127.0.0.1:8888"} sessions=requests.session() response1=sessions.get('http://47.107.178.45/phpwind/',proxies=proxies) body=response1.content.decode('utf-8') value=re.findall('csrf_token" value="(.+?)"/><',body)[0] print(value) headinfos={'Accept':'application/json, te...
Mmeiapple/Request
20200603_work/phpwind_login.py
phpwind_login.py
py
969
python
en
code
0
github-code
21
[ { "api_name": "requests.session", "line_number": 5, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 8, "usage_type": "call" } ]
43048882687
import logging.config import os BASE_DIR = os.path.dirname(os.path.abspath(__file__)) LOGGER = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { 'format': ("[%(asctime)s] %(levelname)s " "[%(name)s:%(lineno)s] %(message)s"), 'datefmt': "%d/%b/%Y %H:...
pratikgajjar/mysql-data-stream-kafka
logger_config.py
logger_config.py
py
1,206
python
en
code
3
github-code
21
[ { "api_name": "os.path.dirname", "line_number": 4, "usage_type": "call" }, { "api_name": "os.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 4, "usage_type": "call" }, { "api_name": "logging.config.DEBUG", ...
41692945232
import argparse import os import numpy as np import tensorflow as tf import gpflow as gpf import tensorflow_probability as tfp from gpflow.utilities import to_default_float from models.outcome.piecewise_se.model_shared_marked import TRSharedMarked from models.outcome.piecewise_se.model_shared_marked_hierarchical impo...
caglar-hizli/dynamic-causal-mediation
utils/om_utils.py
om_utils.py
py
9,972
python
en
code
0
github-code
21
[ { "api_name": "numpy.float64", "line_number": 16, "usage_type": "attribute" }, { "api_name": "numpy.hstack", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.float64", "line_number": 18, "usage_type": "attribute" }, { "api_name": "numpy.float64", ...
71099285172
"""eeg refund rate added Revision ID: b3ad8ac91dd4 Revises: e67d6747e9cb Create Date: 2020-08-24 09:21:33.148677 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'b3ad8ac91dd4' down_revision = 'e67d6747e9cb' branch_labels = None depends_on = None def upgrade()...
vrcompugo/EV-Manager-Data-API
migrations/versions/b3ad8ac91dd4_eeg_refund_rate_added.py
b3ad8ac91dd4_eeg_refund_rate_added.py
py
992
python
en
code
0
github-code
21
[ { "api_name": "alembic.op.create_table", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy.Integ...
31251922836
import re from typing import List from utils.game import Board from utils.player import Player """ This code will control the input from the command line asking first for a number of player between 0 and 9 and then the name of each player which should be and single word creating a list of player. T...
jejobueno/Card_Game_OOP
main.py
main.py
py
1,376
python
en
code
0
github-code
21
[ { "api_name": "re.search", "line_number": 18, "usage_type": "call" }, { "api_name": "typing.List", "line_number": 24, "usage_type": "name" }, { "api_name": "utils.player.Player", "line_number": 24, "usage_type": "name" }, { "api_name": "re.search", "line_numbe...
11786566177
import torch import re import json from quant.quant_linear import QuantLinear # from GPTQ FOR LLAMA import types class CustomLoraLayerMerged(torch.nn.Module): def __init__(self, scaling, lora_A_q, lora_B_q, lora_A_v, lora_B_v): super().__init__() self.lora_A_q = lora_A_q s...
johnsmith0031/alpaca_lora_4bit
src/alpaca_lora_4bit/monkeypatch/gptq_for_llala_lora_monkey_patch.py
gptq_for_llala_lora_monkey_patch.py
py
4,127
python
en
code
496
github-code
21
[ { "api_name": "torch.nn", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.float16", "line_number": 44, "usage_type": "attribute" }, { "api_name": "json.load", "line_number": 49, "usage_type": "call" }, { "api_name": "torch.load", "line_numb...
18389741547
import pygame as pg from settings import * from tilemap import collide_hit_rect # from tilemap import reconstruct_path # a_star_search, dijkstra_search, # from random import uniform, choice import pytweening as tween # import pathfinding # import AI vec = pg.math.Vector2 class BaseGameEntity(): _nextID = 0 ...
robinstauntoncollins/TopDownZombieShooter
dayzrpg/sprites.py
sprites.py
py
3,543
python
en
code
0
github-code
21
[ { "api_name": "pygame.math", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pygame.sprite.spritecollide", "line_number": 31, "usage_type": "call" }, { "api_name": "tilemap.collide_hit_rect", "line_number": 31, "usage_type": "argument" }, { "api_name...
34216929513
import pandas as pd import matplotlib.pyplot as plt odf = pd.read_csv('outs.tsv', delimiter='\t') # print(len(odf)) # print(odf.columns) plt.figure(figsize=(16, 9), dpi=100) plt.grid(True) plt.hist(odf['ROUGE-L Score'], bins=100) plt.title('Histogram of similarity scores', \ fontdict={'fontname': 'DejaVu Sans',...
EshwarSR/AutomaticEvaluationMetrics
4_ROUGE/don_make_plots.py
don_make_plots.py
py
1,510
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 4, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 8, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 8, "usage_type": "name" }, { "api_name": "matplotlib.py...
25902806547
import json import os import swgoh def save_game_data(): """ Save the game data returned by swgoh.help in game_data.json, for use by the game_data() fixture. """ data = { 'ability_data_list': swgoh.api.get_ability_list(), 'skill_data_list': swgoh.api.get_skill_list(), 'uni...
abey79/sqds
sqds/tests/datafiles.py
datafiles.py
py
1,876
python
en
code
0
github-code
21
[ { "api_name": "swgoh.api.get_ability_list", "line_number": 13, "usage_type": "call" }, { "api_name": "swgoh.api", "line_number": 13, "usage_type": "attribute" }, { "api_name": "swgoh.api.get_skill_list", "line_number": 14, "usage_type": "call" }, { "api_name": "sw...
72781009974
from typing import List from random import randint from board import Stone, BoardConfig from tei_bot_v2 import TeiBot_v2 from tei_bot import TeiBot from alex_bot import AlexBot from strategic_bot import StrategicBot class Bot: def __init__(self, board_config: BoardConfig): self.config = board_config ...
allmeat/connect6
playground/bot.py
bot.py
py
1,922
python
en
code
1
github-code
21
[ { "api_name": "board.BoardConfig", "line_number": 12, "usage_type": "name" }, { "api_name": "tei_bot.TeiBot", "line_number": 14, "usage_type": "call" }, { "api_name": "tei_bot_v2.TeiBot_v2", "line_number": 15, "usage_type": "call" }, { "api_name": "alex_bot.AlexBo...
10757208086
"""empty message Revision ID: d1f7b4d649db Revises: Create Date: 2017-08-21 13:55:21.313000 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = 'd1f7b4d649db' down_revision = None branch_labels = None depends_on = None def up...
boreone/apppy
migrations/versions/d1f7b4d649db_.py
d1f7b4d649db_.py
py
1,548
python
en
code
0
github-code
21
[ { "api_name": "alembic.op.drop_table", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "alembic.op.drop_table", "line_number": 22, "usage_type": "call" }, { "api_name": "alembic.op", ...
21449517105
# history: # 2018/09/01 v1.0 initial import os import sys import datetime import re VERSION = '1.0' LOG_DIR = r'e:\temp' def ERR(abbrv): return '[Error] ' + { 'no_file': 'no such file', 'split_err': 'cannot split log by day', 'level_err': 'cannot extract valid level...
socrates77-sh/toolkit
check_dump.py
check_dump.py
py
3,628
python
en
code
0
github-code
21
[ { "api_name": "datetime.datetime.now", "line_number": 34, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 34, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 36, "usage_type": "call" }, { "api_name": "os.path", ...
9119484975
import numpy as np import torch from vel.api.base import Schedule from vel.api.metrics import AveragingNamedMetric from vel.rl.api import Rollout, Transitions from vel.rl.api.base import ReplayEnvRollerBase, EnvRollerFactory from vel.rl.buffers.prioritized_backend import PrioritizedReplayBackend class PrioritizedRep...
timothyyu/ml_monorepo
vel/vel/rl/env_roller/single/prioritized_replay_roller_epsgreedy.py
prioritized_replay_roller_epsgreedy.py
py
7,702
python
en
code
59
github-code
21
[ { "api_name": "vel.rl.api.base.ReplayEnvRollerBase", "line_number": 11, "usage_type": "name" }, { "api_name": "vel.api.base.Schedule", "line_number": 20, "usage_type": "name" }, { "api_name": "vel.api.base.Schedule", "line_number": 22, "usage_type": "name" }, { "a...
13857255553
import tensorflow as tf import numpy as np import argparse import loaddata parser = argparse.ArgumentParser() parser.add_argument('--batch_size', default=100, type=int, help='batch size') parser.add_argument('--train_steps', default=1000, type=int, help='number of training steps') def my_model(f...
ngovietanh/python
TensorFlow/Iris/main.py
main.py
py
2,776
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 6, "usage_type": "call" }, { "api_name": "tensorflow.feature_column.input_layer", "line_number": 12, "usage_type": "call" }, { "api_name": "tensorflow.feature_column", "line_number": 12, "usage_type": "attribute" }...
17222736070
import os import glob import codecs from django.http import HttpResponse def index(request, param): if len(param) < 5 or param[0:2] != '!!': return HttpResponse('<html><body>No such phone.</body></html>') search = param[2:].lower() fh = codecs.open('./ws_django/spc/phones/phones.dat', 'r', 'utf8')...
modu/website_grokit_ca
ws_root/ws_django/spc/phones/views.py
views.py
py
561
python
en
code
1
github-code
21
[ { "api_name": "django.http.HttpResponse", "line_number": 11, "usage_type": "call" }, { "api_name": "codecs.open", "line_number": 15, "usage_type": "call" }, { "api_name": "django.http.HttpResponse", "line_number": 27, "usage_type": "call" } ]
72152369333
from cmath import e import csv from tkinter import E from attr import validate import os import requests #data from https://etherscan.io/exportData?type=tokenholders&contract=0x960b236A07cf122663c4303350609A66A7B288C0&decimal=18 totalAddess=0 approved=0 depost=0 valid=0 def check(url) : try : #print('url =...
cqq/otherside-kyc-report
landreport.py
landreport.py
py
1,770
python
en
code
0
github-code
21
[ { "api_name": "requests.get", "line_number": 16, "usage_type": "call" }, { "api_name": "cmath.e", "line_number": 23, "usage_type": "name" }, { "api_name": "cmath.e", "line_number": 24, "usage_type": "name" }, { "api_name": "csv.DictReader", "line_number": 31, ...
16250376564
from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404, render, redirect from django.urls import reverse_lazy from django.utils.decorators import method_decorator from django.views.generic import ListView, View, TemplateView from pinax.messages.models import Message, Th...
jerryshikanga/therapy
session/views.py
views.py
py
3,768
python
en
code
0
github-code
21
[ { "api_name": "django.views.generic.ListView", "line_number": 12, "usage_type": "name" }, { "api_name": "profiles.models.Therapist", "line_number": 13, "usage_type": "name" }, { "api_name": "profiles.models.Therapist.objects.all", "line_number": 14, "usage_type": "call" ...
74427810291
import datetime import os import time from pathlib import Path from selenium import webdriver def scrollToComments(curDriver): last_height = curDriver.execute_script("return document.body.scrollHeight") pagesAmount = 0 while True and pagesAmount <= 2: pagesAmount += 1 # Scroll down to bot...
CoderPants/MasterDegree
yandex_dzen/yandex_extract_data.py
yandex_extract_data.py
py
6,156
python
en
code
0
github-code
21
[ { "api_name": "time.sleep", "line_number": 21, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 68, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 72, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 75...
26746581711
import numpy as np import torch as th from torch.nn import functional as F from stable_baselines3.td3.td3 import TD3 from stable_baselines3.common.preprocessing import preprocess_obs as pobs from typing import Any, Dict, List, Optional, Type, Union import gym import torch as th from torch import nn from stable_baseli...
HACMan-2023/HACMan
hacman/algos/hacman_td3.py
hacman_td3.py
py
3,878
python
en
code
28
github-code
21
[ { "api_name": "stable_baselines3.td3.td3.TD3", "line_number": 21, "usage_type": "name" }, { "api_name": "stable_baselines3.common.preprocessing.preprocess_obs", "line_number": 30, "usage_type": "call" }, { "api_name": "torch.cat", "line_number": 46, "usage_type": "call" ...
41248621796
from __future__ import annotations import csv import datetime import pathlib import sys from pathlib import Path from typing import ClassVar, NamedTuple from aind_data_transfer.jobs.s3_upload_job import GenericS3UploadJobList from aind_data_schema.data_description import ExperimentType from aind_data_transfer.config_...
AllenInstitute/np_codeocean
src/np_codeocean/upload_one.py
upload_one.py
py
7,185
python
en
code
0
github-code
21
[ { "api_name": "np_logging.get_logger", "line_number": 22, "usage_type": "call" }, { "api_name": "np_config.fetch", "line_number": 24, "usage_type": "call" }, { "api_name": "aind_data_transfer.jobs.basic_job.BasicUploadJobConfigs", "line_number": 27, "usage_type": "name" ...
4082734364
import re import datetime def get_date(index, res): date = re.findall(r"^.*\d\d:.*$", res, re.MULTILINE)[index].strip()[4:-5] date = datetime.datetime(int(date[12:16]), int(date[9:11]), int(date[6:8])) return date def test_search_with_start_date(client, auth): auth.login() res = client.get('/szu...
konrad43/Health-Centre
tests/test_search_data.py
test_search_data.py
py
1,986
python
en
code
1
github-code
21
[ { "api_name": "re.findall", "line_number": 6, "usage_type": "call" }, { "api_name": "re.MULTILINE", "line_number": 6, "usage_type": "attribute" }, { "api_name": "datetime.datetime", "line_number": 7, "usage_type": "call" }, { "api_name": "datetime.datetime", "...
27507569260
from aloe import * from aloe import tools import requests import json from .. import config, logger from ..cities import call @before.each_feature def delete_all_rows(_): call.deleteInBulk() # ..... 1 Scenario ....# @step('Adding cities with data') def add_cities(self): results = list() for row in tools....
khoshsoroor/test_city
features/cities/__init__.py
__init__.py
py
4,206
python
en
code
0
github-code
21
[ { "api_name": "cities.call.deleteInBulk", "line_number": 10, "usage_type": "call" }, { "api_name": "cities.call", "line_number": 10, "usage_type": "name" }, { "api_name": "aloe.tools.guess_types", "line_number": 17, "usage_type": "call" }, { "api_name": "aloe.tool...
7070595366
import datetime from django.core.exceptions import ValidationError from django.forms import ModelForm, DateTimeInput from database_view.models.supply_model import SupplyModel class SupplyForm(ModelForm): class Meta: model = SupplyModel fields = ('product_id', 'provider_id', 'count', 'supply_date'...
boyboyjoy/Shop
database_view/forms/supply_form.py
supply_form.py
py
1,154
python
ru
code
0
github-code
21
[ { "api_name": "django.forms.ModelForm", "line_number": 8, "usage_type": "name" }, { "api_name": "database_view.models.supply_model.SupplyModel", "line_number": 10, "usage_type": "name" }, { "api_name": "django.forms.DateTimeInput", "line_number": 15, "usage_type": "call" ...
39121983113
######################################################################### #$Id: bld.py 28 2021-01-21 15:10:31Z whuang $ #$Revision: 28 $ #$HeadURL: file:///Users/whuang/.wei_svn_repository/trunk/jedi-build-tools/bld.py $ #$Date: 2021-01-21 08:10:31 -0700 (Thu, 21 Jan 2021) $ #$Author: whuang $ #########################...
weihuang-jedi/jedi-tools
perfplot/plotomp2.py
plotomp2.py
py
12,311
python
en
code
0
github-code
21
[ { "api_name": "sys.exit", "line_number": 41, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 65, "usage_type": "call" }, { "api_name": "os.path", "line_number": 65, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot.subplots", ...
25157929587
#! /usr/bin/python3 import os import argparse import base64 from time import sleep from scapy.sendrecv import sr1 from scapy.layers.inet import IP, ICMP def main(): parser = argparse.ArgumentParser() parser.add_argument("-dst", required=True, help="Destination IP address") ...
meewash-p/icmp-file-transfer
icmp-send.py
icmp-send.py
py
1,021
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 11, "usage_type": "call" }, { "api_name": "base64.b64encode", "line_number": 23, "usage_type": "call" }, { "api_name": "scapy.layers.inet.IP", "line_number": 32, "usage_type": "call" }, { "api_name": "scapy.l...
21436521535
#!/root/vMU/vEnv/bin/python3 import subprocess, os, yaml, psutil def main(): subprocess.run(command_Continuous, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) pass # Service Directory myDir = os.getcwd() workDir = os.path.dirname(os.path.abspath(__file__)) os.chdir(workDir) C_buildPath...
Alailton-jr/Virtual-PAC
vMU/forTests.py
forTests.py
py
1,712
python
en
code
0
github-code
21
[ { "api_name": "subprocess.run", "line_number": 8, "usage_type": "call" }, { "api_name": "subprocess.PIPE", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path.dirname", "li...