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
74366377918
"""Helper functions/classes related to dates/datetimes.""" import datetime as dt import re from typing import List from dateutil.parser import parse as dateutil_parse from .types import DateLike, assert_never def parse_date(date: DateLike) -> dt.date: """Parses a date string. Args: date: The date ...
bbugyi200/python-lib
src/bugyi/lib/dates.py
dates.py
py
2,018
python
en
code
2
github-code
97
[ { "api_name": "types.DateLike", "line_number": 12, "usage_type": "name" }, { "api_name": "re.match", "line_number": 33, "usage_type": "call" }, { "api_name": "datetime.date.today", "line_number": 44, "usage_type": "call" }, { "api_name": "datetime.date", "line...
6395714393
from django.shortcuts import render from django.http import HttpResponse from scripts.data_handler import data_handler from collections import OrderedDict import json # Create your views here. def index(request): healthy_levels = data_handler.read_healthy_levels() healthy_temperature = healthy_levels['temperature'] ...
colestrine/NYSG
UI/greenhouse/dashboard/views.py
views.py
py
3,886
python
en
code
0
github-code
97
[ { "api_name": "scripts.data_handler.data_handler.read_healthy_levels", "line_number": 9, "usage_type": "call" }, { "api_name": "scripts.data_handler.data_handler", "line_number": 9, "usage_type": "name" }, { "api_name": "scripts.data_handler.data_handler.get_available_temperature...
15464379582
#!/usr/bin/env python # coding: utf-8 # # THE COVID-19 PROJECT # # In[1]: import pandas as pd import numpy import matplotlib.pyplot as plt import seaborn as sns import warnings warnings.filterwarnings("ignore") # In[2]: #To read cs...
crajfighter/AWP
AWP.Project (1) (3).py
AWP.Project (1) (3).py
py
3,119
python
en
code
0
github-code
97
[ { "api_name": "warnings.filterwarnings", "line_number": 14, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 21, "usage_type": "call" }, { "api_name": "seaborn.heatmap", "line_number": 54, "usage_type": "call" }, { "api_name": "matplotlib.py...
19872891462
from SSINS import SS from SSINS import Catalog_Plot as cp import argparse parser = argparse.ArgumentParser() parser.add_argument('obs') parser.add_argument('inpath') parser.add_argument('outpath') args = parser.parse_args() read_kwargs = {'ant_str': 'cross', 'file_type': 'uvfits'} MF_kwargs = {'sig_th...
mwilensky768/MJW-MWA
AWS_Shell_Scripts/Diffuse_Survey/Diffuse_Catalog.py
Diffuse_Catalog.py
py
696
python
en
code
0
github-code
97
[ { "api_name": "argparse.ArgumentParser", "line_number": 5, "usage_type": "call" }, { "api_name": "SSINS.SS", "line_number": 20, "usage_type": "call" }, { "api_name": "SSINS.Catalog_Plot.MF_plot", "line_number": 23, "usage_type": "call" }, { "api_name": "SSINS.Cata...
72399208958
import os import pandas as pd import numpy as np import pyarrow import glob import geopandas as gpd import multiprocessing import timeit import ogr import gdal import shutil from matplotlib import pyplot import matplotlib.pyplot as plt import haversine as hs # this is for distance calculation between two points (pip i...
FRahmani368/dam
Reservoirs.py
Reservoirs.py
py
9,091
python
en
code
0
github-code
97
[ { "api_name": "src.createOutput.outputDir", "line_number": 42, "usage_type": "call" }, { "api_name": "geopandas.read_file", "line_number": 51, "usage_type": "call" }, { "api_name": "pandas.read_feather", "line_number": 54, "usage_type": "call" }, { "api_name": "ge...
73434250558
# --- # jupyter: # jupytext: # formats: ipynb,py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.14.0 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # %% [ma...
yzerlaut/old_physion
notebooks/scripts/Orientation-Direction-Selectivity.sync.py
Orientation-Direction-Selectivity.sync.py
py
6,728
python
en
code
0
github-code
97
[ { "api_name": "os.path.join", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path", "line_number": 26, "usage_type": "attribute" }, { "api_name": "os.path.expanduser", "line_number": 26, "usage_type": "call" }, { "api_name": "sys.path.append", "l...
13710494200
import joblib import json import re import numpy as np NON_WORD_CHAR = re.compile(r'[-|——|,|.|:|@|#|!|$|%|^|&|*|,|、|;|-|+|~|`|⋯⋯|。|/|||】|【|」|》|>|<|《|;|;|:|」|"|\'|/|「|}|{|,]') def word2features(sent, i, embeddings): word = sent[i] features = { 'bias': 1.0, 'word.lower()': word.lower(), ...
currentslab/extractnet
extractnet/sequence_tagger/models.py
models.py
py
3,458
python
en
code
115
github-code
97
[ { "api_name": "re.compile", "line_number": 6, "usage_type": "call" }, { "api_name": "joblib.load", "line_number": 60, "usage_type": "call" }, { "api_name": "joblib.load", "line_number": 63, "usage_type": "call" } ]
24479051092
# Resolve.py """ We consider a normal order ramified on snc but no secondary ramification. We blow up repeatedly at nodes recording the log discrepancy and b-discrepancy until we have all possible negative discrepancy curves. The exceptional curves should probably be indexed by dyadic fractions, written as bina...
ColinIngalls/terminal-resolutions
Resolve.py
Resolve.py
py
3,514
python
en
code
0
github-code
97
[ { "api_name": "fractions.Fraction", "line_number": 55, "usage_type": "call" }, { "api_name": "fractions.Fraction", "line_number": 76, "usage_type": "call" } ]
3238574366
# coding: utf-8 # データセットを作る ver1 import os import numpy as np import glob from PIL import Image class MakeData(object): def __init__(self, gpuID): self.gpuID = gpuID # 動画フォルダのパスをシャッフル,行動ごとにラベル付け def makePath(self, path, ratio): dirs = sorted(os.listdir(path)) pa...
takumukat/Chainer
CRNN/makeData.py
makeData.py
py
8,579
python
en
code
0
github-code
97
[ { "api_name": "os.listdir", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.asarray", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.int32", "line_number": 26, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": ...
29398418143
import os.path from subprocess import PIPE, Popen from netaddr import IPNetwork from spiderfoot import SpiderFootEvent, SpiderFootPlugin class sfp_tool_nmap(SpiderFootPlugin): meta = { 'name': "Tool - Nmap", 'summary': "Identify what Operating System might be used.", 'flags': ["tool", "...
smicallef/spiderfoot
modules/sfp_tool_nmap.py
sfp_tool_nmap.py
py
6,845
python
en
code
10,704
github-code
97
[ { "api_name": "spiderfoot.SpiderFootPlugin", "line_number": 9, "usage_type": "name" }, { "api_name": "netaddr.IPNetwork", "line_number": 82, "usage_type": "call" }, { "api_name": "netaddr.IPNetwork", "line_number": 98, "usage_type": "call" }, { "api_name": "os.pat...
24482986481
from gc import get_objects from django.http import HttpResponse from django.shortcuts import render, get_object_or_404 from django.core.paginator import Paginator,InvalidPage,EmptyPage # Create your views here. from .models import category, product def allProdCat(request,c_slug=None): c_page=None products=N...
mathewjoseph2811/mathew
ecommerce/app1/views.py
views.py
py
1,124
python
en
code
0
github-code
97
[ { "api_name": "django.shortcuts.get_object_or_404", "line_number": 16, "usage_type": "call" }, { "api_name": "models.category", "line_number": 16, "usage_type": "argument" }, { "api_name": "models.product.objects.all", "line_number": 17, "usage_type": "call" }, { ...
8358680017
import os import re from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from webdriver_manager.chrome import ChromeDriverManager import datetime, json from dateutil.tz import tzutc from urllib.parse import urlparse, parse_qs, parse_qsl, urlencode, u...
hjjju/createQrCode
test4.py
test4.py
py
1,823
python
en
code
0
github-code
97
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 13, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 13, "usage_type": "name" }, { "api_name": "webdriver_manager.chrome.ChromeDriverManager", "line_number": 13, "usage_type": "call" }, ...
109079402
import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm from scipy.ndimage.filters import gaussian_filter """ Note: this script has been edited since the blog post to try to improve the heat map / test different levels of smoothing. """ def myplot(x, y, s, bins=1000): heatmap, xedges, y...
angelowilliams/reddit-user-politics
generateHeatmap.py
generateHeatmap.py
py
1,064
python
en
code
1
github-code
97
[ { "api_name": "numpy.histogram2d", "line_number": 13, "usage_type": "call" }, { "api_name": "scipy.ndimage.filters.gaussian_filter", "line_number": 14, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 20, "usage_type": "call" }, { ...
1517310618
from tabula import read_pdf from tabulate import tabulate import pandas as pd df = read_pdf("C:\\Users\\jayzo\\Downloads\\llm_sample_dataset.pdf", pages='1') df = df[0] x = list(df.columns) new_row = pd.DataFrame({'applicant_id': x[0], 'application_date': x[1], 'age': x[2], 'cibil_score': x[3...
jayzobalia/WitAI_Interface_Think360
tools/OCR.py
OCR.py
py
4,099
python
en
code
0
github-code
97
[ { "api_name": "tabula.read_pdf", "line_number": 5, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 10, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 17, "usage_type": "call" } ]
30522141433
import win32com.client import re import keyboard import os import cv2 import time import random import numpy as np import json from PIL import ImageGrab import threading import codecs keyboard.add_hotkey('end',os._exit,(0,)) player_list = {'台男':'白虎','明女':'阎王'} dm = win32com.client.Dispatch('dm.dmsoft') monster_inf...
zhh9211/g_tools
单角色挂机/单角色挂机.py
单角色挂机.py
py
25,687
python
en
code
0
github-code
97
[ { "api_name": "keyboard.add_hotkey", "line_number": 14, "usage_type": "call" }, { "api_name": "os._exit", "line_number": 14, "usage_type": "attribute" }, { "api_name": "win32com.client.client.Dispatch", "line_number": 18, "usage_type": "call" }, { "api_name": "win...
30625808606
import cv2 as cv import numpy as np lower_red = np.array([0, 150, 150]) upper_red = np.array([10, 255, 255]) # Capturing webcam footage webcam_video = cv.VideoCapture(0) while True: success, video = webcam_video.read() img = cv.cvtColor(video, cv.COLOR_BGR2HSV) mask = cv.inRange(img, lower_red, upper_...
mubinui/OpenCVDetailed
RedBallDetection01.py
RedBallDetection01.py
py
871
python
en
code
0
github-code
97
[ { "api_name": "numpy.array", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.VideoCapture", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number...
3532658584
from .models import * import json from django.core.exceptions import PermissionDenied import requests import os import base64 import urllib from .models import OAuthCache import random from django.utils import timezone from django.conf import settings module_path = os.path.dirname(__file__) REDIRECT_URI = settings.MY...
venkatesh-sivaraman/fireroad-server
common/oauth_client.py
oauth_client.py
py
4,211
python
en
code
13
github-code
97
[ { "api_name": "os.path.dirname", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "django.conf.settings.MY_BASE_URL", "line_number": 15, "usage_type": "attribute" }, { "api_name": "dj...
3290927110
from quopri import decodestring from .requests import PostRequests, GetRequests class PageNotFound404: def __call__(self, request): return "404 WHAT", "404 PAGE Not Found" class Framework: def __init__(self, routes_obj, fronts_obj): self.routes_lst = routes_obj self.fronts_lst = fro...
visor517/GB_architecture
archer_framework/main.py
main.py
py
2,110
python
ru
code
0
github-code
97
[ { "api_name": "requests.GetRequests", "line_number": 31, "usage_type": "call" }, { "api_name": "requests.PostRequests", "line_number": 36, "usage_type": "call" }, { "api_name": "quopri.decodestring", "line_number": 60, "usage_type": "call" } ]
74700298879
import re import random import copy import logging import json from typing import List, Any #FROM SIX PAPER: #try?? #set the (?P<room>kitchen|hall|bedroom) lights to (?P<color>blue|yellow|red) class _Slot: slot_type = None def __init__(self, spec): self.name: str = spec["name"] self.require...
lorenz-h/six_intents
six_intents/intent.py
intent.py
py
3,199
python
en
code
0
github-code
97
[ { "api_name": "typing.Any", "line_number": 25, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 38, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 38, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_numbe...
4562673066
""" Clustering's Tasks """ import requests from common.vectorize import Vectorize from common.clustering import Clustering from common import config def do_clustering(clustering_id, peminjamans, url): juduls = [] distinct_peminjamans = [] for peminjaman in peminjamans: if peminjaman['buku_title'] ...
ridhof/library-procurement-v2
app/mod_clustering/tasks.py
tasks.py
py
1,972
python
en
code
0
github-code
97
[ { "api_name": "common.vectorize.Vectorize", "line_number": 17, "usage_type": "call" }, { "api_name": "common.clustering.Clustering", "line_number": 18, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 39, "usage_type": "call" }, { "api_name": ...
24393180878
import math import pdb import numpy as np import pandas as pd import tensorflow as tf from sklearn import metrics from tensorflow.python.data import Dataset import visualizations as vi from matplotlib import pyplot as plt def split_train_data(dataframe): # shuffle data dataframe.reindex(np.random.permutation...
busybug91/house_price_prediction
house_prices.py
house_prices.py
py
10,341
python
en
code
2
github-code
97
[ { "api_name": "numpy.random.permutation", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 15, "usage_type": "attribute" }, { "api_name": "pandas.DataFrame", "line_number": 48, "usage_type": "call" }, { "api_name": "numpy.arr...
13431005851
from datetime import datetime from bs4 import BeautifulSoup import time from selenium import webdriver import pendulum options = webdriver.ChromeOptions() options.add_argument('--ignore-ssl-errors=yes') options.add_argument('--ignore-certificate-errors') driver = webdriver.Remote( command_executor='http://185.104...
PaperDevil/more-tech-4.0
parsers/consultant_parser.py
consultant_parser.py
py
1,786
python
en
code
0
github-code
97
[ { "api_name": "selenium.webdriver.ChromeOptions", "line_number": 8, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 8, "usage_type": "name" }, { "api_name": "selenium.webdriver.Remote", "line_number": 11, "usage_type": "call" }, { "api_n...
35495752323
# -*- coding: utf-8 -*- ############################################################################## # # ACHIEVE WITHOUT BORDERS # ############################################################################## from odoo import api, fields, models from datetime import datetime import logging _logger = logging.get...
awb-jonathan/Modules
awb_subscriber_bill/models/account.py
account.py
py
4,578
python
en
code
0
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "odoo.models.Model", "line_number": 16, "usage_type": "attribute" }, { "api_name": "odoo.models", "line_number": 16, "usage_type": "name" }, { "api_name": "odoo.fields.One2...
7745693542
import uuid from cas import CASPrincipal from nanohttp import context from restfulpy.orm import DeclarativeBase, Field, ModifiedMixin, \ ActivationMixin, SoftDeleteMixin, relationship, DBSession, \ FilteringMixin, PaginationMixin, OrderingMixin from restfulpy.principal import JwtRefreshToken from sqlalchemy im...
mkhfring/pychat
jaguar/models/membership.py
membership.py
py
4,817
python
en
code
2
github-code
97
[ { "api_name": "sqlalchemy.Table", "line_number": 12, "usage_type": "call" }, { "api_name": "restfulpy.orm.DeclarativeBase.metadata", "line_number": 14, "usage_type": "attribute" }, { "api_name": "restfulpy.orm.DeclarativeBase", "line_number": 14, "usage_type": "name" },...
25469552092
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="bioimageit_formats", version="0.2.0", author="Sylvain Prigent and BioImageIT team", author_email="bioimageit@gmail.com", description="Manage data formats for BioImageIT project", long_...
bioimageit/bioimageit_formats
setup.py
setup.py
py
821
python
en
code
0
github-code
97
[ { "api_name": "setuptools.setup", "line_number": 6, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 15, "usage_type": "call" } ]
32925360488
import random import arcade import math SPRITE_SCALING = 0.5 SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 class Medal(arcade.Sprite): def __init__(self, filename, sprite_scaling): """ Constructor. """ # Call the parent class (Sprite) constructor super().__init__(filename, sprite_scaling) ...
zachwemhoff/learn-arcade-work
Lab 08 - Sprites/lab_08.py
lab_08.py
py
5,688
python
en
code
null
github-code
97
[ { "api_name": "arcade.Sprite", "line_number": 10, "usage_type": "attribute" }, { "api_name": "math.sin", "line_number": 34, "usage_type": "call" }, { "api_name": "math.cos", "line_number": 36, "usage_type": "call" }, { "api_name": "arcade.Sprite", "line_number...
7027310249
import numpy as np import matplotlib.pyplot as plt from scipy.special import factorial from matplotlib.widgets import Slider from scipy.stats import expon def function(la,x): return np.exp(-la)*np.power(la,x)/factorial(x) def exponential(x,scale): return expon.pdf(x,0,scale) x = np.arange(0,20,0.1) fig, ax ...
rock53-cmd/Probability-Distribution-Visualizer
exponential_vs_poisson.py
exponential_vs_poisson.py
py
849
python
en
code
2
github-code
97
[ { "api_name": "numpy.exp", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.power", "line_number": 9, "usage_type": "call" }, { "api_name": "scipy.special.factorial", "line_number": 9, "usage_type": "call" }, { "api_name": "scipy.stats.expon.pdf", ...
25126480205
import networkx as nx import matplotlib.pyplot as plt url_graph_file = 'TestDataset/url_graph_file' url_id_mapping = 'TestDataset/url_id_mapping' G = nx.DiGraph() # Read in URL id mapping url_map = {} with open(url_id_mapping, 'r') as f: for line in f: node_id, url = line.strip().split() ...
adbu42/google_prototype
hits_calculation.py
hits_calculation.py
py
988
python
en
code
0
github-code
97
[ { "api_name": "networkx.DiGraph", "line_number": 7, "usage_type": "call" }, { "api_name": "networkx.hits", "line_number": 25, "usage_type": "call" } ]
27736178330
# -*- coding: utf-8 -*- from argh.decorators import arg from lain_sdk.util import warn, info from lain_cli.auth import authorize_and_check from lain_cli.utils import get_version_lists, lain_yaml, check_phase @arg('phase', help="lain cluster phase id, can be added by lain config save") def appversion(phase): """ ...
laincloud/lain-cli
lain_cli/appversion.py
appversion.py
py
844
python
en
code
6
github-code
97
[ { "api_name": "lain_cli.utils.check_phase", "line_number": 15, "usage_type": "call" }, { "api_name": "lain_cli.utils.lain_yaml", "line_number": 16, "usage_type": "call" }, { "api_name": "lain_cli.auth.authorize_and_check", "line_number": 17, "usage_type": "call" }, { ...
11785094382
import time import cv2 import numpy as np import torch from mmcv.runner import get_dist_info from ..builder import PIPELINES @PIPELINES.register_module() class SelectRays: """random select rays when training Args: keys (Sequence[str]): Required keys to be converted. """ def __init__(self, ...
openxrlab/xrnerf
xrnerf/datasets/pipelines/augment.py
augment.py
py
12,090
python
en
code
529
github-code
97
[ { "api_name": "torch.stack", "line_number": 45, "usage_type": "call" }, { "api_name": "torch.meshgrid", "line_number": 46, "usage_type": "call" }, { "api_name": "torch.linspace", "line_number": 47, "usage_type": "call" }, { "api_name": "torch.linspace", "line_...
26363829099
from PySide6 import QtCore, QtWidgets from numbers import Number from cmlibs.zinc.element import Element from cmlibs.zinc.glyph import Glyph from cmlibs.zinc.graphics import Graphics, GraphicsStreamlines, Graphicslineattributes from cmlibs.zinc.scenecoordinatesystem import SCENECOORDINATESYSTEM_LOCAL, Scenecoordinate...
cmlibs-python/cmlibs.widgets
src/cmlibs/widgets/graphicseditorwidget.py
graphicseditorwidget.py
py
46,505
python
en
code
0
github-code
97
[ { "api_name": "cmlibs.zinc.element.Element.FaceTypeEnumFromString", "line_number": 26, "usage_type": "call" }, { "api_name": "cmlibs.zinc.element.Element", "line_number": 26, "usage_type": "name" }, { "api_name": "cmlibs.zinc.element.Element.FaceTypeEnumToString", "line_numbe...
1083413623
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('store', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='category', options={'v...
kevgathuku/compshop
store/migrations/0002_auto_20150605_1406.py
0002_auto_20150605_1406.py
py
475
python
en
code
0
github-code
97
[ { "api_name": "django.db.migrations.Migration", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.migrations.AlterModelOptions", "line_number": 14, "usage_type": "call" ...
41233455155
import unittest from decimal import Decimal from unittest import TestCase from pyspark.sql import types as T class SparkTestCase(TestCase): ''' Custom TestCase fully dedicated to the unit test between pyspark dataframes ''' def __init__(self, methodName=None): if methodName: ...
jnisa/tdd-pipeline
tests/utils/spark_test_case.py
spark_test_case.py
py
3,238
python
en
code
0
github-code
97
[ { "api_name": "unittest.TestCase", "line_number": 15, "usage_type": "name" }, { "api_name": "unittest.TestCase.__init__", "line_number": 24, "usage_type": "call" }, { "api_name": "unittest.TestCase", "line_number": 24, "usage_type": "attribute" }, { "api_name": "d...
17114893554
import numpy as np import cv2 import pandas as pd import Read_data from keras.preprocessing import image def clean_data(img_raw,label_raw,threshold=25): bool_arr=np.array(map(lambda x:True if (x.shape[0]>threshold or x.shape[1]>threshold) else False,img_raw)) return img_raw[bool_arr],label_raw[bool_arr] def...
Meirtz/TAIL-CAMP-2018
CV/Data_scale.py
Data_scale.py
py
2,539
python
en
code
0
github-code
97
[ { "api_name": "numpy.array", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.full", "line_number": 17, "usage_type": "call" }, { "api_name": "cv2.resize", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.random.randint", "line_nu...
39953862509
from pathlib import Path from antarest.study.storage.rawstudy.io.reader import MultipleSameKeysIniReader from antarest.study.storage.rawstudy.io.writer.ini_writer import IniWriter from antarest.study.storage.rawstudy.model.filesystem.root.settings.generaldata import DUPLICATE_KEYS GENERAL_DATA_PATH = "settings/genera...
AntaresSimulatorTeam/AntaREST
antarest/study/storage/study_upgrader/upgrader_800.py
upgrader_800.py
py
1,137
python
en
code
10
github-code
97
[ { "api_name": "pathlib.Path", "line_number": 10, "usage_type": "name" }, { "api_name": "antarest.study.storage.rawstudy.io.reader.MultipleSameKeysIniReader", "line_number": 21, "usage_type": "call" }, { "api_name": "antarest.study.storage.rawstudy.model.filesystem.root.settings.g...
18848009528
#!/usr/bin/python3 from __future__ import annotations from abc import ABCMeta from typing import TYPE_CHECKING from pollinatarr.logger.log import logger from pollinatarr.torrents.torrent_container import TorrentContainer if TYPE_CHECKING: from pollinatarr.config.config import Config from pollinatarr.config....
Pollinatarr/Pollinatarr
pollinatarr/torrent_clients/abstract_torrent_client.py
abstract_torrent_client.py
py
1,442
python
en
code
4
github-code
97
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 11, "usage_type": "name" }, { "api_name": "abc.ABCMeta", "line_number": 20, "usage_type": "name" }, { "api_name": "pollinatarr.config.torrent_clients_config.TorrentClientConfig", "line_number": 21, "usage_type": "name" ...
70199415038
import os from models.params import COMMON_PARAMS as CP from models.params import IM_DECODER_PARAMS as IDP from models.basic_models.linear import DoublingLinearNetwork import torch as T import torch.nn as nn import torch.optim as optim class ImageDecoderNetwork(nn.Module): def __init__(self, input_dim, output_d...
jullian-yapeter/rl_game
tasks/models/im_decoder.py
im_decoder.py
py
1,286
python
en
code
0
github-code
97
[ { "api_name": "torch.nn.Module", "line_number": 12, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 12, "usage_type": "name" }, { "api_name": "models.params.IM_DECODER_PARAMS.OUTPUT_DIM", "line_number": 13, "usage_type": "attribute" }, { "api...
31827964270
#**************************************************************************** #* setup.py for debug-mgr #**************************************************************************** import os import subprocess import sys from setuptools import setup from distutils.extension import Extension from setuptools.command.buil...
mballance-utils/debug-mgr
setup.py
setup.py
py
6,593
python
en
code
0
github-code
97
[ { "api_name": "sys.argv", "line_number": 12, "usage_type": "attribute" }, { "api_name": "sys.argv.remove", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.environ.keys", "li...
3071495777
import numpy as np import pandas as pd import matplotlib.pyplot as plt import pandas_datareader as data import streamlit as st st.title('Stock Trend Prediction') start = '2010-01-01' end = '2019-12-31' user_input = st.text_input('Enter Stock Ticker', 'AAPL') df = data.DataReader(user_input, 'yahoo', start, end) st....
AdarshDhiman11/stock-analysis
stockapp.py
stockapp.py
py
877
python
en
code
0
github-code
97
[ { "api_name": "streamlit.title", "line_number": 7, "usage_type": "call" }, { "api_name": "streamlit.text_input", "line_number": 12, "usage_type": "call" }, { "api_name": "pandas_datareader.DataReader", "line_number": 13, "usage_type": "call" }, { "api_name": "stre...
73619712320
import allure from utils.base_web_driver import BaseWebDriver import pytest from Common import Log from Page.Telpo_MDM_Page import TelpoMDMPage log = Log.MyLog() class TestTelpoMDM: def setup_class(self): self.driver = BaseWebDriver().get_web_driver() self.page = TelpoMDMPage(self.driver, 40) ...
wmm98/Telpo_MDM
TestCase/test_z_telpo_mdm_page_discard.py
test_z_telpo_mdm_page_discard.py
py
1,088
python
en
code
0
github-code
97
[ { "api_name": "Common.Log.MyLog", "line_number": 7, "usage_type": "call" }, { "api_name": "Common.Log", "line_number": 7, "usage_type": "name" }, { "api_name": "utils.base_web_driver.BaseWebDriver", "line_number": 13, "usage_type": "call" }, { "api_name": "Page.Te...
74296825920
from imutils.video import VideoStream import argparse import datetime import imutils import time import cv2 min_area = 250 vs = cv2.VideoCapture('case 6 (one after one).MOV') firstFrame = None while True: frame = vs.read() frame = frame if vs is None else frame[1] if frame is None: break frame = imut...
glebulyanov/cosvid
det.py
det.py
py
1,188
python
en
code
0
github-code
97
[ { "api_name": "cv2.VideoCapture", "line_number": 10, "usage_type": "call" }, { "api_name": "imutils.resize", "line_number": 23, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 24, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", ...
11502351175
import json import xmltodict from StringIO import StringIO ##IF PYTHON3 from io import StringIO from pyang.__init__ import Context, FileRepository from pyang.translators.yin import YINPlugin def create_yin(yang_model): yang_model = str(yang_model).replace('\n', '') yang_model_dict = _transform_yang_to_dict(...
netgroup-polito/frog4-datastore
datastore/YANGtoYIN.py
YANGtoYIN.py
py
999
python
en
code
2
github-code
97
[ { "api_name": "json.dumps", "line_number": 13, "usage_type": "call" }, { "api_name": "pyang.__init__.Context", "line_number": 22, "usage_type": "call" }, { "api_name": "pyang.__init__.FileRepository", "line_number": 22, "usage_type": "call" }, { "api_name": "pyang...
18388963637
import logging import os import sys import pandas from immuno_probs.cdr3.olga_container import OlgaContainer from immuno_probs.model.default_models import get_default_model_file_paths from immuno_probs.model.igor_interface import IgorInterface from immuno_probs.model.igor_loader import IgorLoader from immuno_probs.ut...
keshav-motwani/immuno-probs
immuno_probs/cli/generate_sequences.py
generate_sequences.py
py
16,694
python
en
code
0
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 33, "usage_type": "call" }, { "api_name": "immuno_probs.model.default_models.get_default_model_file_paths", "line_number": 52, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 53, "usage_type": "attribute" ...
13202571086
# Create your views here. from django.template import Context, loader from agutoli.blog.models import Post, Category from django.http import HttpResponse def index(request): posts_list = Post.objects.filter(published=True) category_list = Category.objects.all() t = loader.get_template('blog/index.html') ...
agutoli/django_blog_exemple
agutoli/blog/views.py
views.py
py
854
python
en
code
0
github-code
97
[ { "api_name": "agutoli.blog.models.Post.objects.filter", "line_number": 7, "usage_type": "call" }, { "api_name": "agutoli.blog.models.Post.objects", "line_number": 7, "usage_type": "attribute" }, { "api_name": "agutoli.blog.models.Post", "line_number": 7, "usage_type": "n...
27694779228
# -*- coding: utf-8 -*- import pytest import requests from pathlib_mate import Path from sfm.fingerprint import fingerprint from superjson import json from seedinvest_monitor.crawler import html_parser def jprint(data): print(json.dumps(data, indent=4, sort_keys=True)) def get_html(url): fpath = Path(__fi...
MacHu-GWU/seedinvest_monitor-project
tests/test_crawler/test_html_parser.py
test_html_parser.py
py
2,268
python
en
code
0
github-code
97
[ { "api_name": "superjson.json.dumps", "line_number": 13, "usage_type": "call" }, { "api_name": "superjson.json", "line_number": 13, "usage_type": "name" }, { "api_name": "pathlib_mate.Path", "line_number": 17, "usage_type": "call" }, { "api_name": "sfm.fingerprint...
10738738186
import socket from ipaddress import IPv4Address, IPv6Address from adapters.interfaces.sockets import SocketClientAbstract from helpers import sockets from core import exceptions, data_types class SocketClient(SocketClientAbstract): """Socket TCP/IP""" def __init__(self, address: IPv4Address | IPv6Address |...
HeinerAlejandro/tcp_socket_template
adapters/socket_client.py
socket_client.py
py
1,553
python
en
code
0
github-code
97
[ { "api_name": "adapters.interfaces.sockets.SocketClientAbstract", "line_number": 10, "usage_type": "name" }, { "api_name": "ipaddress.IPv4Address", "line_number": 13, "usage_type": "name" }, { "api_name": "ipaddress.IPv6Address", "line_number": 13, "usage_type": "name" ...
33113101015
from geopy.geocoders import Nominatim geolocator = Nominatim(user_agent="manual_geo_querier") # The following works: # Address with block and street name. Eg. '605 ANG MO KIO AVENUE 5' # Name of point of interest: 'SUNTEC CITY' ADDRESSES = [ 'XINMIN PRIMARY SCHOOL', 'SUNTEC CITY', '22 BALAM ROAD' ] for a...
MadJFish/DataPipeline
CXY/util_manual_geo_querier.py
util_manual_geo_querier.py
py
475
python
en
code
0
github-code
97
[ { "api_name": "geopy.geocoders.Nominatim", "line_number": 3, "usage_type": "call" } ]
1646925498
# Chatbot with Python by Clarence Itai Msindo import os import telebot from telegram import ReplyKeyboardMarkup, ReplyKeyboardRemove from telegram.ext import Updater, CommandHandler, MessageHandler, Filters from bot import main BOT_TOKEN = os.environ.get('your-bot-token-here') bot = telebot.TeleBot(BOT_TOKEN...
claryzw/Cozmo
Chatbot with Python/main.py
main.py
py
1,919
python
en
code
0
github-code
97
[ { "api_name": "os.environ.get", "line_number": 8, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 8, "usage_type": "attribute" }, { "api_name": "telebot.TeleBot", "line_number": 10, "usage_type": "call" }, { "api_name": "telegram.ext.Updater", ...
71220766718
from datetime import date, datetime import pandas as pd import pytest from pandas._testing import assert_frame_equal from python_project.data import ( ForecastResult, ForecastParams, ForecastData, ForecastProblem, ) from python_project.models.base import ForecastSolver @pytest.mark.parametrize( "...
fralfaro/python_project
tests/models/test_base.py
test_base.py
py
5,055
python
en
code
1
github-code
97
[ { "api_name": "python_project.models.base.ForecastSolver.forecaster", "line_number": 40, "usage_type": "call" }, { "api_name": "python_project.models.base.ForecastSolver", "line_number": 40, "usage_type": "name" }, { "api_name": "pandas._testing.assert_frame_equal", "line_num...
15316757758
from django.conf.urls import patterns, include, url from rest_framework.urlpatterns import format_suffix_patterns # Reference Model Views: from oarndb.views import AdultChildRelationshipTypesList, AdultChildRelationshipTypesDetail from oarndb.views import LanguagesList, LanguagesDetail from oarndb.views import Languag...
wire-rabbit/oarn-database
oarn/oarndb/urls.py
urls.py
py
21,438
python
en
code
0
github-code
97
[ { "api_name": "django.conf.urls.url", "line_number": 94, "usage_type": "call" }, { "api_name": "oarndb.views.AdultChildRelationshipTypesList.as_view", "line_number": 94, "usage_type": "call" }, { "api_name": "oarndb.views.AdultChildRelationshipTypesList", "line_number": 94, ...
23212725438
from itertools import ( chain, product, permutations, repeat, ) from functools import ( reduce, ) from operator import add import blinker from .replication_manager import GameObject from .tools import dict_merge from .bind_widget import bind_widget summon_event = blinker.signal("summon") revoke =...
Ecialo/seven_something_somewhat
mlp/grid.py
grid.py
py
8,407
python
en
code
0
github-code
97
[ { "api_name": "blinker.signal", "line_number": 18, "usage_type": "call" }, { "api_name": "blinker.signal", "line_number": 19, "usage_type": "call" }, { "api_name": "operator.add", "line_number": 24, "usage_type": "call" }, { "api_name": "replication_manager.GameOb...
918968509
import math import seaborn as sns from bioexplorer import BioExplorer, ParametricMembrane, Protein, Sugars, Virus, RNASequence, \ Vector2, Vector3, Quaternion # pylint: disable=no-member # pylint: disable=missing-function-docstring def test_virus(): resource_folder = 'tests/test_files/' pdb_folder = reso...
Centralize/BioExplorer
bioexplorer/pythonsdk/tests/test_virus.py
test_virus.py
py
9,331
python
en
code
null
github-code
97
[ { "api_name": "bioexplorer.BioExplorer", "line_number": 16, "usage_type": "call" }, { "api_name": "bioexplorer.BioExplorer.REPRESENTATION_ATOMS", "line_number": 23, "usage_type": "attribute" }, { "api_name": "bioexplorer.BioExplorer", "line_number": 23, "usage_type": "nam...
37034429721
import sys import os import pathlib sys.path.append(os.path.join(pathlib.Path(__file__).parent.absolute(), '..')) import glob import copy import torch import numpy as np import time from options import TrainOptions from data import create_data_loader, create_dataset from models import create_model from models.mvs.mvs_p...
Xharlie/pointnerf
run/test_ft.py
test_ft.py
py
17,612
python
en
code
992
github-code
97
[ { "api_name": "sys.path.append", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 4, "usage_type": "call" }, { "api_name": "os.path", "line_number": ...
4795446800
import os from binance.client import Client from binance.enums import * from binance.exceptions import BinanceAPIException from binance.websockets import BinanceSocketManager from futuremaker import utils class BinanceAPI: def __init__(self): key = os.getenv('key') secret = os.getenv('secret') ...
songaal/futuremaker
futuremaker/binance_api.py
binance_api.py
py
5,435
python
en
code
17
github-code
97
[ { "api_name": "os.getenv", "line_number": 14, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 15, "usage_type": "call" }, { "api_name": "binance.client.Client", "line_number": 16, "usage_type": "call" }, { "api_name": "binance.websockets.BinanceS...
33284784882
# sitio_web/urls.py from django.conf.urls import include, url from django.contrib import admin from registration.backends.simple.views import RegistrationView # Create a new class that redirects the user to the index page, if successful at logging class MyRegistrationView(RegistrationView): def get_success_url(s...
rbnuria/DAI
sitio_web/urls.py
urls.py
py
648
python
en
code
1
github-code
97
[ { "api_name": "registration.backends.simple.views.RegistrationView", "line_number": 9, "usage_type": "name" }, { "api_name": "django.conf.urls.url", "line_number": 15, "usage_type": "call" }, { "api_name": "django.conf.urls.include", "line_number": 15, "usage_type": "call...
31101371096
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('phd_info_mgmt_system', '0013_auto_20180306_1741'), ] operations = [ migrations.RemoveField( model_name='scholarq...
chaitybhandari/phd_info_mgmt_system
phd_info_mgmt_system/migrations/0014_auto_20180414_0924.py
0014_auto_20180414_0924.py
py
665
python
en
code
0
github-code
97
[ { "api_name": "django.db.migrations.Migration", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.migrations.RemoveField", "line_number": 14, "usage_type": "call" }, ...
5305675246
from django.shortcuts import render, get_object_or_404 from rest_framework import generics, status, viewsets, mixins from rest_framework.response import Response from . import serializers from drf_yasg.utils import swagger_auto_schema from .models import Profile, RunnerLevel, RunnerTag from rest_framework.permissions i...
CCP4-senior/runtomo-backend
users/views.py
views.py
py
4,522
python
en
code
1
github-code
97
[ { "api_name": "django.contrib.auth.get_user_model", "line_number": 12, "usage_type": "call" }, { "api_name": "rest_framework.generics.GenericAPIView", "line_number": 14, "usage_type": "attribute" }, { "api_name": "rest_framework.generics", "line_number": 14, "usage_type":...
23949825872
from typing import List, Optional from ...tokenization_utils_base import AddedToken from ...utils import logging from ..gpt2.tokenization_gpt2_fast import GPT2TokenizerFast from .tokenization_roberta import RobertaTokenizer logger = logging.get_logger(__name__) VOCAB_FILES_NAMES = {"vocab_file": "vocab.json", "merg...
alibaba/EasyNLP
easynlp/modelzoo/models/roberta/tokenization_roberta_fast.py
tokenization_roberta_fast.py
py
6,770
python
en
code
1,835
github-code
97
[ { "api_name": "utils.logging.get_logger", "line_number": 9, "usage_type": "call" }, { "api_name": "utils.logging", "line_number": 9, "usage_type": "name" }, { "api_name": "gpt2.tokenization_gpt2_fast.GPT2TokenizerFast", "line_number": 19, "usage_type": "name" }, { ...
18307141990
#!/usr/bin/env python import ROOT import sys,os import pandas as pd import argparse parser = argparse.ArgumentParser(description="input and output names") parser.add_argument("-i", "--input", type=str, help="Input dir lives in ../output/ ??") parser.add_argument("-test", "--testflag", action="store_true", help="test mo...
rafaeljacobsen/WVZMinitreeAnalysisTemp
MLcode/preprocess.py
preprocess.py
py
1,319
python
en
code
0
github-code
97
[ { "api_name": "argparse.ArgumentParser", "line_number": 6, "usage_type": "call" }, { "api_name": "ROOT.TFile.Open", "line_number": 26, "usage_type": "call" }, { "api_name": "ROOT.TFile", "line_number": 26, "usage_type": "attribute" }, { "api_name": "pandas.DataFra...
70718453759
from aiogram.types import (InlineKeyboardMarkup, InlineKeyboardButton, ReplyKeyboardMarkup, KeyboardButton, WebAppInfo) from aiogram.utils.keyboard import InlineKeyboardBuilder from geopy.distance import geodesic from app.database.requests import (get_locations_device, get_locations_sticks, ...
rlxrd/locatorbot
app/keyboards.py
keyboards.py
py
4,331
python
en
code
1
github-code
97
[ { "api_name": "aiogram.types.InlineKeyboardMarkup", "line_number": 23, "usage_type": "call" }, { "api_name": "aiogram.types.InlineKeyboardButton", "line_number": 24, "usage_type": "call" }, { "api_name": "aiogram.types.InlineKeyboardButton", "line_number": 25, "usage_type...
26138665336
import re import sys import datetime import bork.config as CV from enum import Enum # ----------------------------------------------------------------------------- # Observable States # RegEx pattern to parse the logcat file (wearable) # ----------------------------------------------------------------------------- ...
purdue-dcsl/vulcan
vulcan/vulcan-wear/bork/utils.py
utils.py
py
7,269
python
en
code
7
github-code
97
[ { "api_name": "enum.Enum", "line_number": 58, "usage_type": "name" }, { "api_name": "enum.Enum", "line_number": 70, "usage_type": "name" }, { "api_name": "re.compile", "line_number": 93, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 117, ...
17340191860
import json import requests from requests_toolbelt.multipart import MultipartEncoder from config import Config class AskerAPI: def __init__(self): self.headers = Config.headers_asker.copy() def log_in(self, email, password): data_login = { "has_accepted_privacy_policy": False, ...
jasmine206/Selenium-Webdriver-Practice
api/asker_api.py
asker_api.py
py
3,004
python
en
code
0
github-code
97
[ { "api_name": "config.Config.headers_asker.copy", "line_number": 11, "usage_type": "call" }, { "api_name": "config.Config.headers_asker", "line_number": 11, "usage_type": "attribute" }, { "api_name": "config.Config", "line_number": 11, "usage_type": "name" }, { "a...
42787309450
import speech_recognition as sr from gtts import gTTS import os import apa102 import time LED_NUM = 3 leds = apa102.APA102(num_led=3) colors = [[255,0,0],[0,255,0],[0,0,255]] # LED0: R, LED1: G, LED2: B #obtain audio from the microphone r=sr.Recognizer() # recognize speech using Google Speech Recognition try: whil...
yue0211/Program-in-YZU
物聯網與微處理機系統設計/hw7(語音辨識燈開關)/test.py
test.py
py
1,811
python
en
code
4
github-code
97
[ { "api_name": "apa102.APA102", "line_number": 7, "usage_type": "call" }, { "api_name": "speech_recognition.Recognizer", "line_number": 10, "usage_type": "call" }, { "api_name": "speech_recognition.Microphone", "line_number": 15, "usage_type": "call" }, { "api_name...
74735679040
import os import json import pyodbc import socket from flask import Flask, request from flask_restful import Api, Resource from threading import Lock from tenacity import * import logging import numpy as np import pandas as pd import requests # User-defined libraries import preprocessors.data_loader as data_loader fro...
polarBearYap/used-car-dealership-fyp
car-dealership-web-service/shap-web-service/app/main.py
main.py
py
15,943
python
en
code
0
github-code
97
[ { "api_name": "flask.Flask", "line_number": 24, "usage_type": "call" }, { "api_name": "flask_restful.Api", "line_number": 25, "usage_type": "call" }, { "api_name": "preprocessors.data_loader.load_car_price_data", "line_number": 31, "usage_type": "call" }, { "api_n...
33342843153
import string import numpy as np import sys import csv import itertools import lap def index_to_well(index): batch = int(np.floor(float(index)/4608.01)+1) remainder = index % 4608 if remainder == 0: remainder = 4608 #print(batch,remainder) sett = int(np.floor(float(remainder)/384.01)+1) remainder = remainder %...
arturrc/bbqtl_inference
3_compressed_sensing/lap_solve.py
lap_solve.py
py
2,187
python
en
code
0
github-code
97
[ { "api_name": "numpy.floor", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.floor", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.floor", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.floor", "line_number": ...
24912915808
import keyboard import time import serial import inputs ser = serial.Serial('COM9', 9800, timeout=1) steps=0.2 global lastevent global lastlastevent lastevent= ["hey",24] lastlastevent= ["hey",24] global tooglelumos tooglelumos=False while True: events = inputs.get_gamepad() for event in e...
Siddh1rt1/HogwartsLegacyLED
DONTLOOKATME.py
DONTLOOKATME.py
py
1,912
python
en
code
0
github-code
97
[ { "api_name": "serial.Serial", "line_number": 6, "usage_type": "call" }, { "api_name": "inputs.get_gamepad", "line_number": 15, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 25, "usage_type": "call" }, { "api_name": "time.sleep", "line_num...
15584509519
#!/usr/bin/python """ ZetCode PyQt5 tutorial This example shows an icon in the titlebar of the window. Author: Jan Bodnar Website: zetcode.com """ import sys from PySide2.QtWidgets import QApplication, QWidget from PySide2.QtGui import QIcon class Example(QWidget): def __init__(self): super().__init_...
dEAduction/dEAduction
snippets/PySide2/ZetCode_PyQt5_tutorial/First programs in PyQt5/icon.py
icon.py
py
673
python
en
code
17
github-code
97
[ { "api_name": "PySide2.QtWidgets.QWidget", "line_number": 18, "usage_type": "name" }, { "api_name": "PySide2.QtGui.QIcon", "line_number": 28, "usage_type": "call" }, { "api_name": "PySide2.QtWidgets.QApplication", "line_number": 34, "usage_type": "call" }, { "api_...
19627106079
#!/usr/bin/env python # coding: utf-8 from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import ...
OscarMing/AI_Gesture
Hand_Detect_Software/AI_Software/AI_Software/Demo/libs/youtube_lib.py
youtube_lib.py
py
6,209
python
en
code
0
github-code
97
[ { "api_name": "libs.desktop_lib.Desktop", "line_number": 18, "usage_type": "name" }, { "api_name": "libs.utils.StateFlow", "line_number": 18, "usage_type": "name" }, { "api_name": "libs.utils.StateFlow.__init__", "line_number": 27, "usage_type": "call" }, { "api_n...
37767618728
import torch import torch.nn as nn import SemesterProject2.helpers.pytorch_utils as ptu from torch.optim.lr_scheduler import ReduceLROnPlateau from torch.utils.tensorboard import SummaryWriter from SemesterProject2.envs.volumetric import Volumetric from SemesterProject2.agents.policies.sampling_policy import SamplingP...
10258392511/SemesterProject2
helpers/vit_pre_trainer.py
vit_pre_trainer.py
py
7,995
python
en
code
0
github-code
97
[ { "api_name": "SemesterProject2.envs.volumetric.Volumetric", "line_number": 16, "usage_type": "name" }, { "api_name": "SemesterProject2.agents.policies.sampling_policy.SamplingPolicy", "line_number": 16, "usage_type": "name" }, { "api_name": "SemesterProject2.agents.vit_agent.ViT...
1399450928
from flask import request, jsonify from ...flask_jwt_extended import jwt_required from .controller import NoteController from ... import bpp, Note from ...general import Status from ...general.route_decorators import allow_access from ...schema import NoteSchema @bpp.route('/note/<string:note_id>', methods=['PUT']) @...
triplesmostar/dmk-backend
flask-project/FlaskProject/controllers/notes_controller/router.py
router.py
py
1,249
python
en
code
0
github-code
97
[ { "api_name": "flask.request.get_json", "line_number": 14, "usage_type": "call" }, { "api_name": "flask.request", "line_number": 14, "usage_type": "name" }, { "api_name": "schema.NoteSchema", "line_number": 15, "usage_type": "call" }, { "api_name": "schema.load", ...
27943967424
from glob import glob from setuptools import setup, find_packages, Extension from os import getenv Includes = [ '%s/include' % getenv('VIRTUAL_ENV', '/usr/local') , '/usr/include' ] Libraries = [ '%s/lib' % getenv('VIRTUAL_ENV', '/usr/local') , '/usr/include' ] VEN...
cjhanks/app-config
python/setup.py
setup.py
py
910
python
en
code
0
github-code
97
[ { "api_name": "os.getenv", "line_number": 6, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 8, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 12, "usage_type": "call" }, { "api_name": "setuptools.Extension", "line_number":...
26318534924
from datetime import datetime from dataclasses import dataclass from typing import List, Optional from opentrons.calibration_storage.ot3.models.v1 import CalibrationStatus from opentrons.calibration_storage.ot3.module_offset import ( get_module_offset, load_all_module_offsets, save_module_calibration, ) fr...
Opentrons/opentrons
api/src/opentrons/hardware_control/modules/module_calibration.py
module_calibration.py
py
3,033
python
en
code
363
github-code
97
[ { "api_name": "opentrons.types.Point", "line_number": 23, "usage_type": "name" }, { "api_name": "opentrons.hardware_control.modules.types.ModuleType", "line_number": 25, "usage_type": "name" }, { "api_name": "opentrons.calibration_storage.types.SourceType", "line_number": 26,...
72277346558
from django.shortcuts import render, redirect from django.views.decorators.csrf import csrf_exempt from articles.models import Article, Comment from django.http import HttpResponse from django.http import JsonResponse from foods.models import Food import random # Create your views here. def index(request): return...
auberr/django_tutorial05
articles/views.py
views.py
py
3,669
python
en
code
0
github-code
97
[ { "api_name": "django.shortcuts.render", "line_number": 12, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 16, "usage_type": "call" }, { "api_name": "articles.models", "line_number": 18, "usage_type": "name" }, { "api_name": "articles.models...
7412171162
''' the function of the code 批量提取指定类别的xml和对应图片 author@bjtu_huangyuxiang ''' from __future__ import division import os import xml.dom.minidom import shutil classes = ['person', 'car', 'bus', 'bicycle', 'motorbike'] dirnames = ['xml_2007', 'images_2007'] def extraction_box(ImgPath, AnnoPath, OutPath): ...
XLin816/Data-Processing
tiqu_xml.py
tiqu_xml.py
py
2,087
python
en
code
0
github-code
97
[ { "api_name": "os.path.join", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path", "line_number": 17, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path", "line_number":...
21130778419
import logging import os from functools import wraps from importlib import import_module from inspect import isclass from pkgutil import iter_modules from typing import ( Callable, Collection, Dict, List, MutableMapping, Sequence, Type, Union, ) from sklearn.base import BaseEstimator fr...
open-telemetry/opentelemetry-python-contrib
instrumentation/opentelemetry-instrumentation-sklearn/src/opentelemetry/instrumentation/sklearn/__init__.py
__init__.py
py
27,244
python
en
code
527
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 31, "usage_type": "call" }, { "api_name": "typing.Callable", "line_number": 35, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 36, "usage_type": "name" }, { "api_name": "sklearn.base.BaseEstim...
74127004479
from typing import List import nltk # nltk.download('punkt') from nltk.sem.evaluate import Model from nltk.stem.api import StemmerI from nltk.stem.lancaster import LancasterStemmer from numpy.core.fromnumeric import shape stemer = LancasterStemmer() import numpy import tflearn import tensorflow import rand...
coffee-tonight/chatbot_tflearn
main.py
main.py
py
3,394
python
en
code
1
github-code
97
[ { "api_name": "nltk.stem.lancaster.LancasterStemmer", "line_number": 8, "usage_type": "call" }, { "api_name": "json.load", "line_number": 19, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 24, "usage_type": "call" }, { "api_name": "nltk.word_t...
31826568201
""" Utility functions for integrating ODEs. Author: Spencer M. Richards Autonomous Systems Lab (ASL), Stanford (GitHub: spenrich) """ from functools import partial import jax import jax.numpy as jnp from jax.flatten_util import ravel_pytree import numpy as np @partial(jax.jit, static_argnums=(0,))...
spenrich/Control-Oriented-Meta-Learning
utils/ode.py
ode.py
py
2,464
python
en
code
7
github-code
97
[ { "api_name": "jax.numpy.array", "line_number": 23, "usage_type": "call" }, { "api_name": "jax.numpy", "line_number": 23, "usage_type": "name" }, { "api_name": "jax.numpy.array", "line_number": 29, "usage_type": "call" }, { "api_name": "jax.numpy", "line_numbe...
73305204479
from tarantella import logger import tarantella as tnt import tarantella.keras.utilities as utilities import tarantella.strategy.pipelining.utilities as putil import copy import numpy as np from functools import singledispatchmethod from typing import Callable, Dict, Type, Any import tensorflow as tf def _on_epoch_e...
cc-hpc-itwm/tarantella
src/tarantella/strategy/pipelining/pipelining_callbacks.py
pipelining_callbacks.py
py
9,052
python
en
code
12
github-code
97
[ { "api_name": "tarantella.is_group_master_rank", "line_number": 15, "usage_type": "call" }, { "api_name": "tarantella.is_group_master_rank", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.isnan", "line_number": 29, "usage_type": "call" }, { "api_n...
18660594501
from RAI.AISystem import AISystem from RAI.Analysis import Analysis import os from dash import html, dcc import plotly.graph_objs as go class DataVisualization(Analysis, class_location=os.path.abspath(__file__)): def __init__(self, ai_system: AISystem, dataset: str, tag: str = None): super().__init__(ai_s...
cisco-open/ResponsibleAI
RAI/Analysis/VisualizationAnalysis/data_visualization.py
data_visualization.py
py
6,638
python
en
code
42
github-code
97
[ { "api_name": "RAI.Analysis.Analysis", "line_number": 8, "usage_type": "name" }, { "api_name": "os.path.abspath", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "RAI.AISystem.AISystem...
5544157229
#!/usr/bin/env python3 #!/usr/bin/env python3 import json from pathlib import Path from itertools import chain from sklearn.metrics import f1_score, precision_score, recall_score import numpy as np import random def load_json(path: Path): with path.open() as f: return json.load(f) def restruct_gold(g)...
davidkna/Bachelorarbeit-Extraction
stats/find_best_f1.py
find_best_f1.py
py
3,599
python
en
code
0
github-code
97
[ { "api_name": "pathlib.Path", "line_number": 13, "usage_type": "name" }, { "api_name": "json.load", "line_number": 15, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 27, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number":...
6195250175
# LICENCIATURA EM ENGENHARIA INFORMÁTICA # MESTRADO integrado EM ENGENHARIA INFORMÁTICA # Inteligência Artificial # 2022/23 # Draft Ficha 1 # Biblioteca de tratamento de grafos necessária para desenhar graficamente o grafo import networkx as nx # Biblioteca de tratamento de grafos necessária para desenha...
Gustominox/Intelegencia_artificial
grafo.py
grafo.py
py
10,668
python
en
code
0
github-code
97
[ { "api_name": "nodo.Node", "line_number": 56, "usage_type": "call" }, { "api_name": "nodo.Node", "line_number": 75, "usage_type": "call" }, { "api_name": "vector.x", "line_number": 84, "usage_type": "attribute" }, { "api_name": "vector.y", "line_number": 84, ...
73443716480
##FROM ## https://www.kaggle.com/kentaroyoshioka47/cnn-with-batchnormalization-in-keras-94 ## ## # -*- coding: utf-8 -*- import argparse import math import sys import time import copy import keras from keras.models import Sequential, Model from keras.layers import Dense, Dropout, Flatten, Activation, B...
nsaura/ML
codes_python/keras/cnn-with-batchnormalization-in-keras-94.py
cnn-with-batchnormalization-in-keras-94.py
py
4,279
python
en
code
1
github-code
97
[ { "api_name": "keras.backend.set_image_dim_ordering", "line_number": 21, "usage_type": "call" }, { "api_name": "keras.backend", "line_number": 21, "usage_type": "name" }, { "api_name": "keras.backend.image_data_format", "line_number": 22, "usage_type": "call" }, { ...
32576583238
from pytest import fixture from selenium import webdriver def pytest_addoption(parser): parser.addoption("--browser", action="store", default="firefox", choices=["chrome", "firefox", "safari"]) parser.addoption("--executor", action="store", default="10.48.22.83") # default = "192.168....
FearFactor1/OtusPythonQAJune2020
lesson15/Grid/conftest.py
conftest.py
py
1,069
python
en
code
0
github-code
97
[ { "api_name": "selenium.webdriver.Remote", "line_number": 25, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 25, "usage_type": "name" }, { "api_name": "pytest.fixture", "line_number": 21, "usage_type": "call" } ]
35296275460
from fastapi import HTTPException, status from routers.schemas import DS18B20 from sqlalchemy.orm.session import Session from .models import database_DS18B20 import datetime def create(db:Session, request: database_DS18B20): new_readings = database_DS18B20( timestamp = request.timestamp, raw_input ...
Promofinder2/RPi-SmartGarden
backend/database/db_DS18B20.py
db_DS18B20.py
py
724
python
en
code
0
github-code
97
[ { "api_name": "sqlalchemy.orm.session.Session", "line_number": 7, "usage_type": "name" }, { "api_name": "models.database_DS18B20", "line_number": 7, "usage_type": "name" }, { "api_name": "models.database_DS18B20", "line_number": 8, "usage_type": "call" }, { "api_n...
28908321664
#space invader (ship and bullets) import math import pygame import random from pygame import mixer #initializing pygame pygame.init() #change number of enemies num_of_enemies = 50 #change player speed step = 1.9 # score score_value = 0 font = pygame.font.Font("assets//Sportive-Regular.ttf", 32) fon...
Nijaoui-Wassim/Space-Invaders
main.py
main.py
py
6,829
python
en
code
0
github-code
97
[ { "api_name": "pygame.init", "line_number": 8, "usage_type": "call" }, { "api_name": "pygame.font.Font", "line_number": 17, "usage_type": "call" }, { "api_name": "pygame.font", "line_number": 17, "usage_type": "attribute" }, { "api_name": "pygame.font.Font", "...
31420047297
from pandas import read_csv, DataFrame import random import numpy as np from geek.analysis import geek_regression """ Define the GEEK Michaelis-Menten ODE-System """ seed = 1 df = read_csv('../data/result_full_factorial_pgm.csv') # Reference concentrations pgm = 64e-6 total_enzyme = pgm g3p = 49e-6 g2p = g3p #...
EPFL-LCSB/geek
paper/geek_qssa_example.py
geek_qssa_example.py
py
9,888
python
en
code
2
github-code
97
[ { "api_name": "pandas.read_csv", "line_number": 14, "usage_type": "call" }, { "api_name": "geek.analysis.geek_regression", "line_number": 54, "usage_type": "call" }, { "api_name": "geek.analysis.geek_regression", "line_number": 60, "usage_type": "call" }, { "api_n...
37756864152
import streamlit as st #importing libraries import pickle import time model = pickle.load(open('RF_model.pkl','rb')) #importing the model that was trained using Random forest algo def main(): #defining main function string = "CAR PRICE PREDICTOR" st.set_page_config(page_title=string, page_icon="🚗", layou...
Rishikesh233/Hack_ccelerate_car
CarPredictor.py
CarPredictor.py
py
13,233
python
en
code
0
github-code
97
[ { "api_name": "pickle.load", "line_number": 4, "usage_type": "call" }, { "api_name": "streamlit.set_page_config", "line_number": 8, "usage_type": "call" }, { "api_name": "streamlit.title", "line_number": 9, "usage_type": "call" }, { "api_name": "streamlit.markdown...
17663185548
import requests; import os; import json; import argparse; import random import string import google_auth_oauthlib.flow import googleapiclient.discovery import googleapiclient.errors client_secrets_file = "client_secret_929159790117-e2jfbd1es2tgdncpkhk8a4l3nil55711.apps.googleusercontent.com.json" class youtubeAPI: ...
HWask/youtubescraper
youtube.py
youtube.py
py
4,723
python
en
code
0
github-code
97
[ { "api_name": "os.environ", "line_number": 21, "usage_type": "attribute" }, { "api_name": "google_auth_oauthlib.flow.flow.InstalledAppFlow.from_client_secrets_file", "line_number": 29, "usage_type": "call" }, { "api_name": "google_auth_oauthlib.flow.flow", "line_number": 29, ...
5616348676
# (c) Nelen & Schuurmans. Proprietary, see LICENSE file. from django.contrib import admin from django.utils.html import mark_safe from nens_auth_client import models import base64 import json def decode_jwt(token): """Decode a JWT without checking its signature""" if not token: return # JWT cons...
nens/nens-auth-client
nens_auth_client/admin.py
admin.py
py
3,469
python
en
code
1
github-code
97
[ { "api_name": "json.loads", "line_number": 22, "usage_type": "call" }, { "api_name": "base64.b64decode", "line_number": 22, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 27, "usage_type": "call" }, { "api_name": "django.utils.html.mark_safe", ...
3422169556
# -*- coding: utf-8 -*- # @Time : 2020/2/26 12:23 # @Author : Deng Wenxing # @Email : dengwenxingae86@163.com # @File : 51jobDemo.py # @Software: PyCharm import requests,json from lxml import etree ##搜索职位的入口url url = 'https://search.51job.com/list/010000,000000,0000,00,9,99,python,2,1.html?lang=c&stype=&postc...
maketubu7/spiderDemo
baseSpider/51jobDemo.py
51jobDemo.py
py
1,799
python
en
code
0
github-code
97
[ { "api_name": "requests.get", "line_number": 25, "usage_type": "call" }, { "api_name": "lxml.etree.HTML", "line_number": 28, "usage_type": "call" }, { "api_name": "lxml.etree", "line_number": 28, "usage_type": "name" }, { "api_name": "json.dumps", "line_number...
19276806251
import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import normalize import pandas as pd from LogisticRegression import LogisticRegression df = pd.read_csv('data.csv') data = df.to_numpy() # Normalise First 3 Columns X = data[:, 0:-2] X = normalize(X, axis=0) X = np.hstack((X, data[:, 3:-1])...
rahulduttt/logistic-regression
main.py
main.py
py
643
python
en
code
0
github-code
97
[ { "api_name": "pandas.read_csv", "line_number": 7, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.normalize", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.hstack", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.hst...
2198397016
#!/usr/bin/env python3 #coding=utf-8 import sqlite3 as sql import sys def out(lists): for f in lists: print(f) db = sql.connect(sys.argv[1]) fetch = db.execute('select filename from sha group by filename having count(*)>1;') multi_filename = fetch.fetchall() out(multi_filename) for f in multi_fi...
calllivecn/testing
sqlite3/query.py
query.py
py
582
python
en
code
0
github-code
97
[ { "api_name": "sqlite3.connect", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 14, "usage_type": "attribute" } ]
2748448298
#!/usr/bin/env python # -*- coding: utf-8 -* from __future__ import print_function import re import sys import string import argparse parser = argparse.ArgumentParser(description='remove-short-lines: Delete short lines') parser.add_argument('-s','--source', help='Source file that contains training data that needs scr...
jenh/epub-ocr-and-translate
onmt-helpers/remove-short-lines.py
remove-short-lines.py
py
2,024
python
en
code
36
github-code
97
[ { "api_name": "argparse.ArgumentParser", "line_number": 9, "usage_type": "call" }, { "api_name": "string.punctuation", "line_number": 46, "usage_type": "attribute" }, { "api_name": "re.sub", "line_number": 48, "usage_type": "call" } ]
42473359464
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys from typing import Callable from PyQt5.QtWidgets import QApplication, QMainWindow from src.rightClickHelper.tool.effectTool import EffectTool class TestTool: @staticmethod def createTestWindow(setMainWindowContent: Callable, size: tuple = (200, 200)):...
NWYLZW/right-click-helper
test/tool/testTool.py
testTool.py
py
1,114
python
en
code
23
github-code
97
[ { "api_name": "typing.Callable", "line_number": 12, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QApplication", "line_number": 13, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 13, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWi...
10938809582
""" Extension to landxplorer api allows for extraction of more than landsat data from usgs purpose for this project is to get modis data sets landsatxplore has two functions: download: Download one or several Landsat scenes. search: Search for Landsat scenes. this script will search for the appropria...
convergencelab/LSHT-HSLT-MODIS-Landsat-Fusion
Data_Extraction/EE_api_extension.py
EE_api_extension.py
py
6,977
python
en
code
0
github-code
97
[ { "api_name": "util.load_json", "line_number": 36, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 36, "usage_type": "call" }, { "api_name": "os.path", "line_number": 36, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_...
24915465929
import csv import json csvfile = open('buffalo-average-processing-time.csv', 'r') jsonfile = open('buffalo.json', 'w') fieldnames = ("id", "city_slug", "region_slug", "field_type_slug", "field_type_name", "date", "value", "national_avg") reader = csv.DictReader( csvfile, fieldnames) for row in reader: json.dump(r...
randalljmardus/moonbeam
csv_json.py
csv_json.py
py
358
python
en
code
1
github-code
97
[ { "api_name": "csv.DictReader", "line_number": 8, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 10, "usage_type": "call" } ]
16584756507
import numpy as np import argparse import shutil import glob import cv2 import os def main(args): # train train_dirs = glob.glob(os.path.join(args.src, 'train', '*')) train_dst = os.path.join(args.src, 'train_list.txt') print(len(train_dirs)) # if os.path.exists(train_dst): # print('{} exists. exiting'....
nathanin/milk
scripts/imagenet/preprocess_imagenet.py
preprocess_imagenet.py
py
1,888
python
en
code
1
github-code
97
[ { "api_name": "glob.glob", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number":...
38294640836
import numpy as np import pandas as pd from scipy import stats from matplotlib import pyplot as plt import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D from sklearn.cluster import DBSCAN import glob, os from sklearn import preprocessing import scipy.cluster.hierarchy as hcluster import sys import warnings...
rastirith/Project_FRB
machine_learning/Osk/featureWriter.py
featureWriter.py
py
13,240
python
en
code
0
github-code
97
[ { "api_name": "warnings.filterwarnings", "line_number": 19, "usage_type": "call" }, { "api_name": "matplotlib.cbook", "line_number": 19, "usage_type": "attribute" }, { "api_name": "warnings.filterwarnings", "line_number": 20, "usage_type": "call" }, { "api_name": ...
43468097337
import sys import socket import time import json import struct import traceback from binascii import hexlify, unhexlify from threading import Thread, RLock, Condition from hashlib import sha256 from core.actualworksource import ActualWorkSource from core.job import Job class StratumWorkSource(ActualWorkSource): ...
TheSeven/Modular-Python-Bitcoin-Miner
modules/theseven/stratum/stratumworksource.py
stratumworksource.py
py
12,039
python
en
code
82
github-code
97
[ { "api_name": "core.actualworksource.ActualWorkSource", "line_number": 15, "usage_type": "name" }, { "api_name": "core.actualworksource.ActualWorkSource.settings", "line_number": 19, "usage_type": "attribute" }, { "api_name": "core.actualworksource.ActualWorkSource", "line_nu...
36004963996
from django.shortcuts import render, redirect from .models import League, Team, Player from . import team_maker def index(request): context = { "baseball_leagues": League.objects.filter(sport__contains="baseball"), "womens_leagues": League.objects.filter(name__contains="women"), "hockey_leagues": League.object...
februarypython/Alex_Green
Django_Assignments/sports_orm/apps/leagues/views.py
views.py
py
2,798
python
en
code
0
github-code
97
[ { "api_name": "models.League.objects.filter", "line_number": 8, "usage_type": "call" }, { "api_name": "models.League.objects", "line_number": 8, "usage_type": "attribute" }, { "api_name": "models.League", "line_number": 8, "usage_type": "name" }, { "api_name": "mo...