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
18446441275
# -*- coding: utf-8 -*- ### # Nesta etapa as distribuições já foram construidas # __author__ = 'sidon' from sklearn import svm from sklearn.metrics import confusion_matrix from .utilclf import * import utils import matplotlib.pyplot as plt from sklearn.metrics import accuracy_score from sklearn.metrics import recall...
Sidon/dwt
clfs/matrix3.py
matrix3.py
py
2,912
python
en
code
1
github-code
21
[ { "api_name": "sklearn.svm.SVC", "line_number": 20, "usage_type": "call" }, { "api_name": "sklearn.svm", "line_number": 20, "usage_type": "name" }, { "api_name": "sklearn.metrics.confusion_matrix", "line_number": 52, "usage_type": "call" }, { "api_name": "sklearn....
23589979517
import numpy as np from sklearn.metrics import f1_score def accuracy(input, target): assert len(input.shape) == 1 return sum(input==target)/input.shape[0] def averaged_f1_score(input, target): N, label_size = input.shape f1s = [] for i in range(label_size): f1 = f1_score(input[:, i], target[:, i]) f1...
msy1412/ABAW4
utils/evaluation_metric.py
evaluation_metric.py
py
967
python
en
code
5
github-code
21
[ { "api_name": "sklearn.metrics.f1_score", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.argmax", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.argmax", "...
2970540492
import socket import os import sys import datetime import pickle import time #160401019 #Sena Günay host = "127.0.0.1" port = 142 greenwich=datetime.datetime.utcnow() zaman=datetime.datetime.now() ilk_zaman=[zaman.hour,zaman.minute,zaman.second,zaman.microsecond] utc=zaman.hour-greenwich.hour if...
nyucel/blm304
final/160401019/Sunucu/sunucu.py
sunucu.py
py
1,042
python
tr
code
8
github-code
21
[ { "api_name": "datetime.datetime.utcnow", "line_number": 15, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 15, "usage_type": "attribute" }, { "api_name": "datetime.datetime.now", "line_number": 16, "usage_type": "call" }, { "api_name": ...
18587405351
""" Module for parsing astronomical object names to extract embedded coordinates eg: '2MASS J06495091-0737408'. """ import re import numpy as np import astropy.units as u from astropy.coordinates import SkyCoord RA_REGEX = r"()([0-2]\d)([0-5]\d)([0-5]\d)\.?(\d{0,3})" DEC_REGEX = r"([+-])(\d{1,2})([0-5]\d)([0-5]\d)\...
astropy/astropy
astropy/coordinates/jparser.py
jparser.py
py
1,865
python
en
code
4,015
github-code
21
[ { "api_name": "re.compile", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.split", "line_number": 39, "usage_type": "call" }, { "api_name": "astropy.units.hourangle", "lin...
26995196808
import pymesh import numpy as np from scipy.spatial import cKDTree # This script evaluates which pdbs in a list involve a receptor: helix binder. # Useful tools : It invokes dssp from IPython.core.debugger import set_trace import os datadir = '/home/gainza/lpdi_fs/masif_design_paper/masif/data/masif_site' pdbdir = o...
pablogainza/my_scripts
biopython/compute_helices.py
compute_helices.py
py
3,958
python
en
code
0
github-code
21
[ { "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": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 1...
25272179170
import matplotlib.pyplot as plt from causalset import CausalSet from causalsetfunctions import compute_spacetimecuts_uniform_Rindler, compute_spacetimecuts_tube def main(): fig = plt.figure() ax = fig.add_subplot(111, projection='3d') # boundsArray, adjusted_rho, l, adjusted_l = compute_spacetimecuts_unif...
hinchilee/Causal_Sets
visualise_lambda_molecules.py
visualise_lambda_molecules.py
py
2,031
python
en
code
0
github-code
21
[ { "api_name": "matplotlib.pyplot.figure", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 6, "usage_type": "name" }, { "api_name": "causalsetfunctions.compute_spacetimecuts_tube", "line_number": 16, "usage_type": "call" }, {...
70585986612
""" The main StructEdit network architecture """ import os import sys import numpy as np import torch import torch.nn.functional as F from torch import nn from chamfer_distance import ChamferDistance from data import Tree from utils import linear_assignment, load_pts, transform_pc_batch, get_surface_reweighting_ba...
daerduoCarey/structedit
code/model.py
model.py
py
34,499
python
en
code
36
github-code
21
[ { "api_name": "torch.nn.Module", "line_number": 18, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 18, "usage_type": "name" }, { "api_name": "torch.nn.Linear", "line_number": 24, "usage_type": "call" }, { "api_name": "torch.nn", "line_nu...
18406266219
from itertools import accumulate; import math; import operator; import random; import string; from bisect import *; from collections import deque, defaultdict, Counter, OrderedDict; from functools import reduce,cache; from heapq import *; import unittest; from typing import List,Optional; from functools import cache; f...
afzalsiddique/problem-solving
Problem_Solving_Python/leetcode/lc72.py
lc72.py
py
1,772
python
en
code
1
github-code
21
[ { "api_name": "functools.cache", "line_number": 8, "usage_type": "name" }, { "api_name": "unittest.TestCase", "line_number": 36, "usage_type": "attribute" } ]
1052928264
import sys from datetime import datetime, timedelta from request_maker import RequestMaker from utils import JSONUtils, OSFileOperations class EpochGenerator: def get_new_epoch_time(self, date=datetime.now(), days=0): delta = timedelta(days=days) new_date = date + delta epoch_time = new_d...
udwivedi394/social-studio-posts
get_posts.py
get_posts.py
py
8,556
python
en
code
0
github-code
21
[ { "api_name": "datetime.datetime.now", "line_number": 9, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 9, "usage_type": "name" }, { "api_name": "datetime.timedelta", "line_number": 10, "usage_type": "call" }, { "api_name": "utils.JSONUt...
41164349389
#!/usr/bin/env python2 """ Cassandra data backup. """ import logging import os import subprocess import sys import time from appscale.common import appscale_info from appscale.common import appscale_utils from appscale.common import monit_interface from appscale.common.constants import APPSCALE_DATA_DIR from appscale...
HafeezRai/appscale
AppDB/appscale/datastore/backup/cassandra_backup.py
cassandra_backup.py
py
9,822
python
en
code
0
github-code
21
[ { "api_name": "sys.path.append", "line_number": 26, "usage_type": "call" }, { "api_name": "appscale.common.unpackaged.INFRASTRUCTURE_MANAGER_DIR", "line_number": 26, "usage_type": "argument" }, { "api_name": "sys.path", "line_number": 26, "usage_type": "attribute" }, ...
74074134133
from fastapi import FastAPI, WebSocket # pip install websockets, fastapi, uvicorn[standard] # uvicorn server:app --reload --port 8000 import random import json import asyncio app = FastAPI() @app.websocket("/ws") async def websocket_endpoint(websocket:WebSocket): await websocket.accept() print("accepted") ...
erdene-k/WEBGL-shapes-fastapi
server.py
server.py
py
803
python
en
code
0
github-code
21
[ { "api_name": "fastapi.FastAPI", "line_number": 7, "usage_type": "call" }, { "api_name": "fastapi.WebSocket", "line_number": 11, "usage_type": "name" }, { "api_name": "random.uniform", "line_number": 18, "usage_type": "call" }, { "api_name": "random.uniform", ...
18680124447
import math import numpy as np from sklearn.datasets import load_iris from sklearn.model_selection import train_test_split from collections import Counter import matplotlib.pyplot as plt from collections import namedtuple from time import clock from random import random class ValueError(Exception): def __init__(se...
1249402434/Algorithm
KNN.py
KNN.py
py
6,495
python
en
code
1
github-code
21
[ { "api_name": "math.pow", "line_number": 23, "usage_type": "call" }, { "api_name": "math.pow", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.linalg.norm", "line_number": 39, "usage_type": "call" }, { "api_name": "numpy.linalg", "line_number":...
4161217881
import numpy as np import cv2 import matplotlib.pyplot as plt # print("Getting started") #### here's how to load images bkgrn_img = cv2.imread('Day4/Images/b.jpg', 0) q_img = cv2.imread('Day4/Images/1.jpg', 0) # this reads in the image as a grayscale image blur_q = cv2.GaussianBlur(q_img,(5,5),1) blur_b = cv2.Gau...
nds-jeebu/SmolGunz
Day4/BackgroundSubtraction.py
BackgroundSubtraction.py
py
893
python
en
code
0
github-code
21
[ { "api_name": "cv2.imread", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.GaussianBlur", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.GaussianBlur", "line_nu...
20483500350
from fastapi import FastAPI, Body, Cookie, Depends, Header, Query, Path from pydantic import BaseModel, Field, HttpUrl from fastapi.middleware.cors import CORSMiddleware # from app.api.api import api_router app = FastAPI() origins = [ "http://localhost.tiangolo.com", "https://localhost.tiangolo.com", "ht...
xreip/UPS_Monitoring_svelte_fastapi
backend_ups/app/main.py
main.py
py
1,574
python
en
code
0
github-code
21
[ { "api_name": "fastapi.FastAPI", "line_number": 7, "usage_type": "call" }, { "api_name": "fastapi.middleware.cors.CORSMiddleware", "line_number": 18, "usage_type": "argument" } ]
30567532947
""" This library acts as an intermediate to between the database and the server. This also function as the main code for connecting between the server and the front end. """ from flask import Flask, request, jsonify, redirect, url_for, Response, g from flask_cors import CORS, cross_origin from flask_oauthlib.client imp...
FiresoftPH/Canarie
Libs/parrot_server.py
parrot_server.py
py
18,261
python
en
code
0
github-code
21
[ { "api_name": "threading.Lock", "line_number": 18, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 21, "usage_type": "name" }, { "api_name": "dotenv.dotenv_values", "line_number": 25, "usage_type": "call" }, { "api_name": "parrot_db.Database", ...
4626144123
import logging from appium.webdriver import WebElement from appium.webdriver.common.mobileby import MobileBy from appium.webdriver.webdriver import WebDriver class BasePage: def __init__(self, driver: WebDriver = None): self.driver = driver def find(self, by, locator): return self.driver.fi...
ceshiren/HogwartsSDET16
test_appium/page2/base_page.py
base_page.py
py
1,669
python
en
code
15
github-code
21
[ { "api_name": "appium.webdriver.webdriver.WebDriver", "line_number": 10, "usage_type": "name" }, { "api_name": "appium.webdriver.common.mobileby.MobileBy.ANDROID_UIAUTOMATOR", "line_number": 20, "usage_type": "attribute" }, { "api_name": "appium.webdriver.common.mobileby.MobileBy...
29642840156
from adls_module import ADLSModule from steamgames_silver_transform import SteamGamesSilverTransform # import os import yaml import os import sys from pathlib import Path import pandas as pd def testing(): print("a") # Import custom scripts # src_path=AIRFLOW_HOME+'/plugins/scripts/steam_project' # sys.path.app...
VinhQuocTran/SteamGame_ETL_pipeline
src/steam_driver.py
steam_driver.py
py
1,614
python
en
code
0
github-code
21
[ { "api_name": "os.getenv", "line_number": 21, "usage_type": "call" }, { "api_name": "yaml.safe_load", "line_number": 27, "usage_type": "call" }, { "api_name": "adls_module.ADLSModule", "line_number": 36, "usage_type": "call" }, { "api_name": "pandas.read_csv", ...
75136876853
from fastapi import APIRouter, Depends,HTTPException from sqlalchemy.orm import Session from models.cameras import Cameras from schemas.camera import createCamera,Camera, currentPos, renewCamera from uuid import uuid4, UUID from utils.db.db import get_db from utils.gmaps.googleapi import getAddress # This is the camer...
ThePylaa/googleMapsAddon
api/app/routers/camera.py
camera.py
py
2,318
python
en
code
0
github-code
21
[ { "api_name": "fastapi.APIRouter", "line_number": 10, "usage_type": "call" }, { "api_name": "uuid.UUID", "line_number": 14, "usage_type": "name" }, { "api_name": "sqlalchemy.orm.Session", "line_number": 14, "usage_type": "name" }, { "api_name": "fastapi.Depends", ...
74871779571
import numpy as np import argparse import imutils import time import cv2 import tensorflow.keras np.set_printoptions(suppress=True) model = tensorflow.keras.models.load_model('keras_model.h5') ap = argparse.ArgumentParser() ap.add_argument("-c", "--confidence", type=float, default=0.3, help="minimum probability to ...
ebtesam25/immunipass
webapp/camera.py
camera.py
py
2,328
python
en
code
1
github-code
21
[ { "api_name": "numpy.set_printoptions", "line_number": 7, "usage_type": "call" }, { "api_name": "tensorflow.keras.keras.models.load_model", "line_number": 9, "usage_type": "call" }, { "api_name": "tensorflow.keras.keras", "line_number": 9, "usage_type": "attribute" }, ...
34739873496
import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np # Read in the image and print out some stats image = mpimg.imread('test.jpg') #print('This image is: ', type(image), 'with dimensions: ', image.shape) # Grab the x and y size and make a copy of the image ysize = image.shape[0] xsize ...
aravindk2604/self-driving-car-nd
cv_fundamentals/colorAndRegion.py
colorAndRegion.py
py
1,997
python
en
code
0
github-code
21
[ { "api_name": "matplotlib.image.imread", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotlib.image", "line_number": 6, "usage_type": "name" }, { "api_name": "numpy.copy", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.copy", "l...
642474703
import os import dash from dash.dependencies import Input, Output import dash_core_components as dcc import dash_html_components as html from datetime import datetime as dt import pandas as pd import plotly.graph_objs as go ######################################## ## ## prepping data ## #############################...
GWarrenn/dc-stop-frisk-dash
app.py
app.py
py
8,903
python
en
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 18, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "line_number": 41, "usage_type": "call" }, { "api_name": "pandas.merge", "line_number": 47, "usage_type": "call" }, { "api_name": "dash.Dash", "line...
33775271866
import os from boto.s3.connection import OrdinaryCallingFormat from os import environ as env # Auth AUTH = "https://gdc-portal.nci.nih.gov/auth/keystone/v3/" INTERNAL_AUTH = env.get("INTERNAL_AUTH", "https://gdc-portal.nci.nih.gov/auth/") AUTH_ADMIN_CREDS = { "domain_name": env.get("KEYSTONE_DOMAIN"), "userna...
uc-cdis/peregrine
peregrine/dev_settings.example.py
dev_settings.example.py
py
3,046
python
en
code
11
github-code
21
[ { "api_name": "os.environ.get", "line_number": 7, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 7, "usage_type": "name" }, { "api_name": "os.environ.get", "line_number": 10, "usage_type": "call" }, { "api_name": "os.environ", "line_number"...
34021794142
#------------------------------------- https://github.com/m4mallu/ashesOFpheonix -------------------------------------# import os import time import logging from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton from pyrogram.errors import FloodWait from helper.gen_ss_help import cult_small_video from tr...
m4mallu/ashesOFpheonix
plugins/trim_video.py
trim_video.py
py
3,207
python
en
code
7
github-code
21
[ { "api_name": "logging.basicConfig", "line_number": 10, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 10, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "logging.getL...
5211673560
""" This script matches MovieRecommendationsALSDataset.scala. """ import argparse import pyspark.sql.functions as sf from pyspark.ml.recommendation import ALS from pyspark.sql import SparkSession from pyspark.sql.types import StructType, IntegerType, StringType, LongType def get_args() -> argparse.Namespace: pars...
Tomer0013/pyspark-examples
MovieRecommendationsALSDataFrame.py
MovieRecommendationsALSDataFrame.py
py
2,303
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "argparse.Namespace", "line_number": 11, "usage_type": "attribute" }, { "api_name": "argparse.Namespace", "line_number": 22, "usage_type": "attribute" }, { "api_name"...
72872694452
import pandas as pd import numpy as np import matplotlib.pyplot as plt from scipy.io import loadmat from shapely.geometry import Polygon, Point # load matrix mat_contents = loadmat('matrice.mat') X = mat_contents['Mat'] X_att = ['ID', 'LocalHour', 'Latitude', 'Longitude', 'Weekday'] npts, natt = X.shape # load sihex ...
hibertclement/eqdiscrim
SiHex_discrim/ProjAurelie/classification_aurelie.py
classification_aurelie.py
py
2,442
python
en
code
0
github-code
21
[ { "api_name": "scipy.io.loadmat", "line_number": 8, "usage_type": "call" }, { "api_name": "pandas.read_table", "line_number": 16, "usage_type": "call" }, { "api_name": "pandas.read_table", "line_number": 20, "usage_type": "call" }, { "api_name": "shapely.geometry....
12588751163
#!/usr/bin/env python3 from setuptools import setup, find_packages # configure the setup to install from specific repos and users DESC = 'Rapid proto typing framework for creating memory analysis overlays' setup(name='overlay-prototyping', version='1.0', description=DESC, author='adam pridgen', ...
trumetaverse/overlay-prototyping
setup.py
setup.py
py
536
python
en
code
1
github-code
21
[ { "api_name": "setuptools.setup", "line_number": 6, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 13, "usage_type": "call" } ]
34664190353
from __future__ import print_function import os.path import pickle from datetime import datetime, timedelta from pathlib import Path from threading import RLock from google.auth.transport.requests import Request from google_auth_oauthlib.flow import InstalledAppFlow from googleapiclient.discovery import build from c...
Diverso-NVR/NVR
backend/core/apis/calendar_api.py
calendar_api.py
py
3,792
python
en
code
0
github-code
21
[ { "api_name": "threading.RLock", "line_number": 15, "usage_type": "call" }, { "api_name": "pathlib.Path.home", "line_number": 17, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 17, "usage_type": "name" }, { "api_name": "os.path.path.exists", ...
35878330006
# -*- coding: utf-8 -*- # PyTorch 0.4.1, https://pytorch.org/docs/stable/index.html # ============================================================================= # @article{zhang2017beyond, # title={Beyond a {Gaussian} denoiser: Residual learning of deep {CNN} for image denoising}, # author={Zhang, Kai and Z...
UIUC-SINE/icon-fuv
python3/iconfuv/destarring/main_train.py
main_train.py
py
10,741
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 44, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 55, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 55, "usage_type": "attribute" }, { "api_name": "os.pa...
34144017157
#!/usr/bin/env python import os import numpy as np from timeit import default_timer as timer import eigensystem import diff from custom_parser import parse from tools import cd def main(b, d, n, delta_n, st_epsilon, lvl_epsilon, cut=0): print("Running with: B = " + str(b) + " D = " + str(d) + " N = " + str(n)) ...
SebastianM-C/Nuclear-surface-vibrations
src/quantum/Scripts/select_rep.py
select_rep.py
py
2,285
python
en
code
2
github-code
21
[ { "api_name": "tools.cd", "line_number": 15, "usage_type": "call" }, { "api_name": "timeit.default_timer", "line_number": 16, "usage_type": "call" }, { "api_name": "eigensystem.get", "line_number": 17, "usage_type": "call" }, { "api_name": "diff.stable", "line...
3785123695
from django.urls import path from .views import Doar, MapaDoacao, ProdutosDoacao app_name = 'doacaoapi' urlpatterns = [ path('grupo/<int:pk>', ProdutosDoacao.as_view(), name='produto_list'), path('doar/<int:pk>', Doar.as_view(), name='doar'), path('', MapaDoacao.as_view(), name='list'), ]
celsorv/cesta
api/v1/doacaoapi/urls.py
urls.py
py
305
python
pt
code
3
github-code
21
[ { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "views.ProdutosDoacao.as_view", "line_number": 8, "usage_type": "call" }, { "api_name": "views.ProdutosDoacao", "line_number": 8, "usage_type": "name" }, { "api_name": "djang...
3036095710
import bpy from Bonera_Toolkit import Utility_Functions import os import pathlib import mathutils import math import numpy def midpoint(coordinates, mode): if len(coordinates) > 0: if mode == "BOUNDING_BOX": x= [] y= [] z= [] for coordinate in coordin...
BlenderBoi/Bonera
Utility_Operator/Add_Selected_Objects_To_Bone_Shape_Library.py
Add_Selected_Objects_To_Bone_Shape_Library.py
py
8,248
python
en
code
23
github-code
21
[ { "api_name": "mathutils.Vector", "line_number": 39, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 39, "usage_type": "call" }, { "api_name": "mathutils.Vector", "line_number": 42, "usage_type": "call" }, { "api_name": "numpy.array", "line...
73035563573
import pytest from thefuck.rules.sudo_command_from_user_path import match, get_new_command from tests.utils import Command stderr = 'sudo: {}: command not found' @pytest.fixture(autouse=True) def which(mocker): return mocker.patch('thefuck.rules.sudo_command_from_user_path.which', return...
LiuFang816/SALSTM_py_data
python/nvbn_thefuck/thefuck-master/tests/rules/test_sudo_command_from_user_path.py
test_sudo_command_from_user_path.py
py
1,407
python
en
code
9
github-code
21
[ { "api_name": "pytest.fixture", "line_number": 9, "usage_type": "call" }, { "api_name": "thefuck.rules.sudo_command_from_user_path.match", "line_number": 19, "usage_type": "call" }, { "api_name": "tests.utils.Command", "line_number": 19, "usage_type": "call" }, { ...
2430646820
#import youtube-dl from __future__ import unicode_literals import yt_dlp #import PyUsb import usb #import google search try: from googlesearch import search except ImportError: print("No module named 'google' found") import os #CHANGE THE HOME FOLDER TO THE FOLDER PATH YOU WANT TO DOWNL...
nreichen/clonehero-video-downloader
CH-VideoScript.py
CH-VideoScript.py
py
1,030
python
en
code
5
github-code
21
[ { "api_name": "os.chdir", "line_number": 18, "usage_type": "call" }, { "api_name": "os.getcwd", "line_number": 19, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 22, "usage_type": "call" }, { "api_name": "googlesearch.search", "line_number"...
27505392967
#!/usr/bin/env python # coding: utf-8 import codecs import os import yaml from utils import print_out, file_name class Config(dict): def __init__(self, *args, **kwargs) -> None: super(Config, self).__init__(*args, **kwargs) margs = self.__read_params() self.update(margs) parg...
zhuwenbo1988/nlp
generative_chitchat/keyword_seq2seq/config.py
config.py
py
3,862
python
en
code
3
github-code
21
[ { "api_name": "os.path.exists", "line_number": 33, "usage_type": "call" }, { "api_name": "os.path", "line_number": 33, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": 34, "usage_type": "call" }, { "api_name": "os.path.join", "line_numbe...
37483278072
from django.conf import settings from django.conf.urls.static import static from django.conf.urls import handler404, handler500 from django.contrib import admin from django.contrib.flatpages import views from django.urls import include, path from django.views.static import serve from django.conf.urls import url handle...
kuzminArtur/hw05_final
yatube/urls.py
urls.py
py
2,012
python
en
code
0
github-code
21
[ { "api_name": "django.conf.urls.handler404", "line_number": 10, "usage_type": "name" }, { "api_name": "django.conf.urls.handler500", "line_number": 11, "usage_type": "name" }, { "api_name": "django.urls.path", "line_number": 15, "usage_type": "call" }, { "api_name...
12954671954
import mimetypes import os from email.mime.application import MIMEApplication from email.mime.audio import MIMEAudio from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from Dmail.mixin import MimeBaseMixin class MimeMixin(MimeBaseMixin): de...
hmiladhia/Dmail
Dmail/mixin/mime_mixin.py
mime_mixin.py
py
2,607
python
en
code
7
github-code
21
[ { "api_name": "Dmail.mixin.MimeBaseMixin", "line_number": 13, "usage_type": "name" }, { "api_name": "email.mime.multipart.MIMEMultipart", "line_number": 15, "usage_type": "call" }, { "api_name": "email.mime.text.MIMEText", "line_number": 18, "usage_type": "call" }, { ...
33300882207
################ 手动输入以下内容 ################## ## 用户名 (手机号/邮箱) USER = '' ## 密码 PASSWORD = '' ## 曾经登录的时间戳(若连续登录则取第一天); ## 无内容则提交当前登录时间; ## 可自定义(在输出结果中提取,或自行抓取“Hm_lvt”字样的cookie) PastLoginTime = '' ################################################# from requests import post, get from time import time from re import sub ...
hepsontam/BTBar_Checkin
BTBar.py
BTBar.py
py
6,145
python
en
code
0
github-code
21
[ { "api_name": "urllib3.disable_warnings", "line_number": 20, "usage_type": "call" }, { "api_name": "urllib3.exceptions.InsecureRequestWarning", "line_number": 20, "usage_type": "argument" }, { "api_name": "requests.post", "line_number": 56, "usage_type": "call" }, { ...
33816767895
import uuid from datetime import datetime from sqlalchemy import ForeignKey from sqlalchemy.orm import relationship from sqlalchemy import desc from utils.logger import * from src.models.base import Database import logging logger = logging.getLogger(__name__) class NotifyToken(Database.get().Model): _...
ClearKeep/ck-backend
src/models/notify_token.py
notify_token.py
py
3,338
python
en
code
6
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "src.models.base.Database.get", "line_number": 12, "usage_type": "call" }, { "api_name": "src.models.base.Database", "line_number": 12, "usage_type": "name" }, { "api_name"...
42227109292
# -*- coding: UTF-8 -*- """ :Script: pie.py :Author: Dan.Patterson@carleton.ca :Modified: 2017-02-21 :Purpose: point in extent :Useage: : :References: : :---------------------------------------------------------------------: """ # ---- imports, formats, constants ---- import sys import numpy as np i...
Dan-Patterson/arraytools
arraytools/geometry/Extras/pie.py
pie.py
py
5,310
python
en
code
3
github-code
21
[ { "api_name": "numpy.set_printoptions", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.ma.masked_print_option.set_display", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.ma", "line_number": 24, "usage_type": "attribute" }, { "api...
73966791414
# Starter code for implmenting manifold modeling. # Marc Feldman (mfeldm21) # Jonathan Liu (jliu118) import sklearn.manifold import statsmodels.api as sm # http://statsmodels.sourceforge.net/devel/generated/statsmodels.nonparametric.smoothers_lowess.lowess.html # C is a set of predicted centers (x_i, y_i, z_i) def m...
jonl1096/cell-segmentation-mlfinal
manifold_modeling.py
manifold_modeling.py
py
1,104
python
en
code
0
github-code
21
[ { "api_name": "statsmodels.api.nonparametric", "line_number": 12, "usage_type": "attribute" }, { "api_name": "statsmodels.api", "line_number": 12, "usage_type": "name" } ]
9120324255
import numpy as np import pandas as pd import pytest import xarray as xr from xarray.core.groupby import _consolidate_slices from . import assert_identical def test_consolidate_slices(): assert _consolidate_slices([slice(3), slice(3, 5)]) == [slice(5)] assert _consolidate_slices([slice(2, 3), slice(3, 6)])...
timothyyu/ml_monorepo
xarray/xarray/tests/test_groupby.py
test_groupby.py
py
3,616
python
en
code
59
github-code
21
[ { "api_name": "xarray.core.groupby._consolidate_slices", "line_number": 13, "usage_type": "call" }, { "api_name": "xarray.core.groupby._consolidate_slices", "line_number": 14, "usage_type": "call" }, { "api_name": "xarray.core.groupby._consolidate_slices", "line_number": 15, ...
28431264063
# _*_ coding: utf-8 _*_ import os from numpy.core.records import record from numpy.lib.function_base import _select_dispatcher import pyaudio import threading import wave import time import matplotlib.pyplot as plt import numpy as np import copy from datetime import datetime from denoise import * class Recorder: ...
sanhhuang/signal_system
recordaudio.py
recordaudio.py
py
4,904
python
en
code
0
github-code
21
[ { "api_name": "pyaudio.paInt16", "line_number": 19, "usage_type": "attribute" }, { "api_name": "threading._start_new_thread", "line_number": 54, "usage_type": "call" }, { "api_name": "pyaudio.PyAudio", "line_number": 57, "usage_type": "call" }, { "api_name": "pyau...
22801583643
import boto3 import json # from datetime import datetime def lambda_handler(event, context): app = GetResources() app.main() class GetResources(object): def __init__(self): self.rds = boto3.client('rds') self.s3 = boto3.resource('s3') # self.file_path = '/tmp/instances_informat...
isjin/aws-python3-boto3
lamdba/get_resource/get_rds_resources.py
get_rds_resources.py
py
2,718
python
en
code
0
github-code
21
[ { "api_name": "boto3.client", "line_number": 15, "usage_type": "call" }, { "api_name": "boto3.resource", "line_number": 16, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 32, "usage_type": "call" } ]
12938257482
from ctypes import * import math import random import os import cv2 import numpy as np import time import darknet import matplotlib.pyplot as plt from numpy.linalg import det global Judgment_Processing def convertBack(x, y, w, h): xmin = int(round(x - (w / 2))) xmax = int(round(x + (w / 2))) ymin = int(r...
SunJJ1996/BPU_project
BPUproject.py
BPUproject.py
py
15,380
python
en
code
0
github-code
21
[ { "api_name": "cv2.rectangle", "line_number": 34, "usage_type": "call" }, { "api_name": "cv2.putText", "line_number": 35, "usage_type": "call" }, { "api_name": "cv2.FONT_HERSHEY_SIMPLEX", "line_number": 38, "usage_type": "attribute" }, { "api_name": "cv2.circle", ...
565285063
import sys import os import glob import re import gzip import array import loompy import numpy as np import random import string import subprocess import multiprocessing import csv import itertools from collections import defaultdict import logging import h5py from typing import * import velocyto as vcy def id_genera...
velocyto-team/velocyto.py
velocyto/commands/_run.py
_run.py
py
14,493
python
en
code
148
github-code
21
[ { "api_name": "string.ascii_uppercase", "line_number": 22, "usage_type": "attribute" }, { "api_name": "string.digits", "line_number": 22, "usage_type": "attribute" }, { "api_name": "random.choice", "line_number": 23, "usage_type": "call" }, { "api_name": "logging....
8651016098
import os import argparse from tqdm import tqdm import pandas as pd from PIL import Image from datetime import datetime import imquality.brisque as brisque ACCEPTED_IMAGE_FORMAT = [".jpg", ".png", ".JPG"] # https://github.com/ocampor/image-quality # python compute_image_quality_ter.py -i R:\IMAS\Antarctic_Seafloor\Cl...
charleygros/biigle_scripts
compute_image_quality_ter.py
compute_image_quality_ter.py
py
3,971
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 16, "usage_type": "call" }, { "api_name": "argparse.SUPPRESS", "line_number": 29, "usage_type": "attribute" }, { "api_name": "os.path.isdir", "line_number": 49, "usage_type": "call" }, { "api_name": "os.path"...
31894579971
from typing import List import config import openai import pinecone import tiktoken def init_pinecone(): pinecone.init( api_key = config.PINECONE_API_KEY, environment = config.PINECONE_ENVIRONMENT ) def get_index_pinecone(index_name=config.PINECONE_INDEX_NAME): init_pinecone()...
HuynhTrong18/Flask_Embedding
my_def.py
my_def.py
py
6,358
python
en
code
0
github-code
21
[ { "api_name": "pinecone.init", "line_number": 8, "usage_type": "call" }, { "api_name": "config.PINECONE_API_KEY", "line_number": 9, "usage_type": "attribute" }, { "api_name": "config.PINECONE_ENVIRONMENT", "line_number": 10, "usage_type": "attribute" }, { "api_nam...
19353156977
import logging from logging.handlers import TimedRotatingFileHandler from pathlib import Path log = logging.getLogger('log') try: Path.mkdir(Path(Path.cwd(), './logs/'), exist_ok=True) except Exception as error: print(f'Ошибка при создании папки логов') raise rotation_handler = TimedRotatingFileHandler('....
Hafurfur/MangaNotificationBotTg
src/logger/base_logger.py
base_logger.py
py
812
python
en
code
0
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 5, "usage_type": "call" }, { "api_name": "pathlib.Path.mkdir", "line_number": 7, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 7, "usage_type": "name" }, { "api_name": "pathlib.Path.cwd", ...
35156167141
from matplotlib import pyplot as plt def DrawF(people): y1 = [i[1] for i in people.record_fatigue ] x1 = [i[0] for i in people.record_fatigue ] plt.plot(x1, y1, label='fatigue', linewidth=1, color='r', marker='o', markerfacecolor='blue', markersize=2) plt.xlabel('time') plt.ylabel...
tcjdsg/GA
draw/drawFatigue.py
drawFatigue.py
py
364
python
en
code
0
github-code
21
[ { "api_name": "matplotlib.pyplot.plot", "line_number": 10, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 10, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.xlabel", "line_number": 13, "usage_type": "call" }, { "api_name": "mat...
73034315253
import matplotlib.mlab as mlab from matplotlib.pyplot import figure, show import numpy as np y = np.arange(0.0, 2, 0.01) x1 = np.sin(2*np.pi*y) x2 = 1.2*np.sin(4*np.pi*y) fig = figure() ax1 = fig.add_subplot(311) ax2 = fig.add_subplot(312, sharex=ax1) ax3 = fig.add_subplot(313, sharex=ax1) ax1.fill_betweenx(y, 0, x...
LiuFang816/SALSTM_py_data
python/matplotlib_matplotlib/matplotlib-master/examples/pylab_examples/fill_betweenx_demo.py
fill_betweenx_demo.py
py
1,498
python
en
code
9
github-code
21
[ { "api_name": "numpy.arange", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.sin", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 7, "usage_type": "attribute" }, { "api_name": "numpy.sin", "line_number": 8, ...
17671745491
#!/usr/bin/env python3 # -*- mode:python; coding:utf-8; -*- # author: Eugene Zamriy <ezamriy@almalinux.org> # created: 2021-06-09 """ Submits a Mattermost chat server statistics to an MQTT topic. MQTT topic name format: stats/social/{chat_server} The program uses the JSON format to encode a message: { ...
AlmaLinux/almalinux-witness
bin/mattermost_stats_sensor.py
mattermost_stats_sensor.py
py
3,406
python
en
code
0
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 59, "usage_type": "call" }, { "api_name": "almawitness.sensors.common.add_mqtt_arg_parser_args", "line_number": 67, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 50, "usage_type": "a...
8193562767
import re from ics import Calendar, Event from .fetch import url_for_facility, fetch_next_days_for_branch def calendar_event_for_event(branch, event): return Event( name=event.name, begin=event.start, end=event.end, uid=event.eid, location=event.location, url=even...
streeter/sf-ymca-pools
sfymca/feed/calendar.py
calendar.py
py
1,134
python
en
code
0
github-code
21
[ { "api_name": "ics.Event", "line_number": 9, "usage_type": "call" }, { "api_name": "fetch.fetch_next_days_for_branch", "line_number": 20, "usage_type": "call" }, { "api_name": "ics.Calendar", "line_number": 24, "usage_type": "call" }, { "api_name": "ics.Event", ...
25708782318
import string import random import time import matplotlib.pyplot as plt from typing import Optional from timeit import timeit from time import process_time_ns from lib import LevenshteinFunc, func_description as levenshtein_func_description from lib import ( levenshtein_recurs, levenshtein_recurs_mem, da...
ivaaahn/bmstu-aa
lab_01/analysis.py
analysis.py
py
3,610
python
en
code
0
github-code
21
[ { "api_name": "lib.LevenshteinFunc", "line_number": 22, "usage_type": "name" }, { "api_name": "lib.func_description", "line_number": 22, "usage_type": "name" }, { "api_name": "lib.LevenshteinFunc", "line_number": 23, "usage_type": "name" }, { "api_name": "lib.Leve...
2475954495
from pydantic import BaseModel, Field # from pydantic.types import Decimal class CategoryCreateForm(BaseModel): name: str = Field( title='Category Name', description='Category Name', max_length=64 ) class CategoryDetail(CategoryCreateForm): id: int = Field( title='Categor...
ArtsemDev/prof10fastapi
core/schemas/category.py
category.py
py
431
python
en
code
0
github-code
21
[ { "api_name": "pydantic.BaseModel", "line_number": 5, "usage_type": "name" }, { "api_name": "pydantic.Field", "line_number": 6, "usage_type": "call" }, { "api_name": "pydantic.Field", "line_number": 14, "usage_type": "call" } ]
6758832438
import os import io import requests import boto3 import json from PIL import Image import logging logger = logging.getLogger() logger.setLevel(logging.INFO) logging.getLogger('botocore').setLevel(logging.WARNING) if os.environ.get('AWS_EXECUTION_ENV') is None: session = boto3.Session(profile_name='my-local-aws-pr...
holmberd/unsplash-collector-aws-lambda
unsplash-lambda.py
unsplash-lambda.py
py
4,046
python
en
code
1
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 10, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "logging.WARNING"...
27643010675
import loady import sys import json import time class FakeQueue: def put(self, name): ts = time.strftime('%x %X') print('{}: {}'.format(ts, name)) def fake_trigger(name): ts = time.strftime('%x %X') print('{}: {}'.format(ts, name)) def run(config): with open(config, 'r') as cfg: ...
ManiacalLabs/BiblioPixelTriggers
test.py
test.py
py
597
python
en
code
0
github-code
21
[ { "api_name": "time.strftime", "line_number": 9, "usage_type": "call" }, { "api_name": "time.strftime", "line_number": 14, "usage_type": "call" }, { "api_name": "json.load", "line_number": 20, "usage_type": "call" }, { "api_name": "loady.code.load", "line_numb...
31134566118
from setuptools import setup requirements = [] with open('requirements.txt') as rf: requirements = rf.read().splitlines() setup( author="ibanner56", url="https://github.com/ibanner56/OtherDave", version="2.0.9", packages=["otherdave", "otherdave.commands", "otherdave.util"], test_suite="test", ...
ibanner56/OtherDave
setup.py
setup.py
py
477
python
en
code
0
github-code
21
[ { "api_name": "setuptools.setup", "line_number": 7, "usage_type": "call" } ]
38469884164
import asyncio import discord import psycopg2 from cogs.utility import thingInList, sqlEXE, Owner_id from discord.ext import commands from discord.ext.commands import Cog from string import capwords class Rewards(Cog): def __init__(self, client): self.client = client # Command to add a reward to the ...
Tyrusss/CornBot-Discord
cogs/rewards.py
rewards.py
py
6,417
python
en
code
0
github-code
21
[ { "api_name": "discord.ext.commands.Cog", "line_number": 10, "usage_type": "name" }, { "api_name": "cogs.utility.Owner_id", "line_number": 21, "usage_type": "name" }, { "api_name": "cogs.utility.thingInList", "line_number": 29, "usage_type": "call" }, { "api_name"...
72135557492
from flask import Blueprint, jsonify, request import json, logging, logging.config, sqlite3 with open("logging.json", "r") as logging_file: logging.config.dictConfig(json.load(logging_file)) logger = logging.getLogger("db_service") with open("config.json", "r") as config_file: app_config = json.load(config_fi...
anirudhtomer/NLPImageSearch
liir_image_search/server/db_service.py
db_service.py
py
4,437
python
en
code
0
github-code
21
[ { "api_name": "logging.config.dictConfig", "line_number": 5, "usage_type": "call" }, { "api_name": "logging.config", "line_number": 5, "usage_type": "attribute" }, { "api_name": "json.load", "line_number": 5, "usage_type": "call" }, { "api_name": "logging.getLogge...
23824587867
# -*- coding: utf-8 -*- """ Created on Wed Oct 14 17:35:46 2020 @author: sdhulipa """ ############################################################################### # Surya # NREL # October 2020 # Generate a CSV with mapping information from EIA-860 Solar Plants # to EV SS data acquired recently # Using...
scdhulipala/GeneratorMapping
Scripts/EV-PV-Mapping.py
EV-PV-Mapping.py
py
3,668
python
en
code
1
github-code
21
[ { "api_name": "pandas.read_excel", "line_number": 35, "usage_type": "call" }, { "api_name": "pandas.read_excel", "line_number": 40, "usage_type": "call" }, { "api_name": "geopy.Point", "line_number": 50, "usage_type": "call" }, { "api_name": "geopy.Point", "li...
25632520814
from flask import Flask, render_template, abort,send_from_directory from pymongo import MongoClient import matplotlib.pyplot as plt from nltk.probability import FreqDist from io import BytesIO import base64 import matplotlib matplotlib.use('agg') import os import sys import nltk nltk.download('punkt') app = Flask(__na...
oubaidHL/Breaking-News-Trends-Detection
Flask_mongo/app.py
app.py
py
2,069
python
en
code
2
github-code
21
[ { "api_name": "matplotlib.use", "line_number": 8, "usage_type": "call" }, { "api_name": "nltk.download", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 14, "usage_type": "call" }, { "api_name": "flask.send_from_directory", ...
13588379372
import sys import os sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) import pytest import torch from lib.modules.layers.vit import ( SWINTransformerBlock, SWINTransformerBlockStack, ) from lib.modules.layers.adn_fn import get_adn_fn image_size = [32, 32, 16] patch_size = [4, 4...
CCIG-Champalimaud/adell-mri
testing/test_swin.py
test_swin.py
py
3,576
python
en
code
5
github-code
21
[ { "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": ...
36457172272
from PyQt5.QtWidgets import QDialog from PyQt5.QtWidgets import QLabel from PyQt5.QtWidgets import QPushButton from PyQt5.QtWidgets import QVBoxLayout from PyQt5.QtWidgets import QHBoxLayout from PyQt5.QtCore import Qt from design import Style class DialogMessageBox(QDialog): def __init__(self, text, btnYesOrNo=F...
Choewonyeong/Standard_Project1
component/dialog/DialogMessageBox.py
DialogMessageBox.py
py
2,726
python
en
code
0
github-code
21
[ { "api_name": "PyQt5.QtWidgets.QDialog", "line_number": 10, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QDialog.__init__", "line_number": 12, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QDialog", "line_number": 12, "usage_type": "name" }, { "...
43580085235
import fnmatch import re import logging from dynamo.web.modules._base import WebModule from dynamo.dataformat import Dataset, Group LOG = logging.getLogger(__name__) class ListData(WebModule): """ data listing """ def __init__(self, config): WebModule.__init__(self, config) def run(self...
SmartDataProjects/dynamo
lib/web/modules/inventory/data.py
data.py
py
1,993
python
en
code
1
github-code
21
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "dynamo.web.modules._base.WebModule", "line_number": 10, "usage_type": "name" }, { "api_name": "dynamo.web.modules._base.WebModule.__init__", "line_number": 16, "usage_type": "call"...
32955634334
from parsita import ParserContext, lit, opt, reg, rep class ExpressionParsers(ParserContext, whitespace=r"[ ]*"): number = reg(r"[+-]?\d+(\.\d+)?(e[+-]?\d+)?") > float base = "(" >> expr << ")" | number factor = base & opt("^" >> base) > (lambda x: x[0] ** x[1][0] if x[1] else x[0]) def make_term(a...
drhagen/parsita
examples/expressions.py
expressions.py
py
1,198
python
en
code
89
github-code
21
[ { "api_name": "parsita.ParserContext", "line_number": 4, "usage_type": "name" }, { "api_name": "parsita.reg", "line_number": 5, "usage_type": "call" }, { "api_name": "parsita.opt", "line_number": 9, "usage_type": "call" }, { "api_name": "parsita.rep", "line_nu...
70530446134
import configargparse import os import sys from display import display_pokemon, start_slideshow, InvalidGenerationError import random from lib.constants import GENERATIONS from lib.backend.server import app # Import Flask app from server.py def main(): config_file = os.path.join(os.getcwd(), 'omni-epd.ini') ...
wilks7/pokedexEPD
app.py
app.py
py
1,536
python
en
code
0
github-code
21
[ { "api_name": "os.path.join", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 11, "usage_type": "call" }, { "api_name": "configargparse.ArgParser", "l...
27264570718
import sys, os filename = os.path.join(os.path.dirname(__file__), '..') sys.path.insert(1, filename) from zoomapi import JWTZoomClient import json from configparser import ConfigParser parser = ConfigParser() parser.read("bots/bot.ini") api_key = parser.get("JWT", "api_key") api_secret = parser.get("JWT", "api_secret...
crista/zoomapi
bots/jwtbot.py
jwtbot.py
py
757
python
en
code
4
github-code
21
[ { "api_name": "os.path.join", "line_number": 2, "usage_type": "call" }, { "api_name": "os.path", "line_number": 2, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 2, "usage_type": "call" }, { "api_name": "sys.path.insert", "line_nu...
28034220157
#!/usr/bin/env python3 import glob import numpy import io import qm3 import qm3.data import qm3.utils import qm3.utils.interpolation import qm3.engines.mmres import matplotlib.pyplot as plt lst = sorted( glob.glob( "node.??" ) ) mol = qm3.molecule() mol.pdb_read( open( lst[0] ) ) mol.psf_read( open( "oxy-cope...
sergio-marti/ren-qm3
samples/oxy-cope/mk_setup.py
mk_setup.py
py
2,495
python
en
code
1
github-code
21
[ { "api_name": "glob.glob", "line_number": 12, "usage_type": "call" }, { "api_name": "qm3.molecule", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 22, "usage_type": "call" }, { "api_name": "qm3.molecule", "line_number": ...
13276525071
# -*- coding: utf-8 -*- """ Created on Thu Oct 24 19:36:22 2019 @author: SugarBox """ from json import loads from kafka import KafkaConsumer # To consume latest messages and auto-commit offsets consumer = KafkaConsumer('order_sales', bootstrap_servers='localhost:9092', ...
nikhilsarma/spark_utilities
sales_consumer.py
sales_consumer.py
py
855
python
en
code
0
github-code
21
[ { "api_name": "kafka.KafkaConsumer", "line_number": 11, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 16, "usage_type": "call" } ]
74083923574
import pyautogui import cv2 lista=[] def coordenada_inicial(): pyautogui.moveTo(830, 259, duration=0.25) x,y = pyautogui.position() #print(x,y) return x,y #print(f'--->{type(coordenada_inicial())}') coordenada_final=(830, 259) try: while coordenada_inicial() == coordenada_final: x,y = py...
JuanSebastian07/SayWhisky
saywhisky.py
saywhisky.py
py
731
python
en
code
0
github-code
21
[ { "api_name": "pyautogui.moveTo", "line_number": 7, "usage_type": "call" }, { "api_name": "pyautogui.position", "line_number": 8, "usage_type": "call" }, { "api_name": "pyautogui.position", "line_number": 17, "usage_type": "call" }, { "api_name": "cv2.VideoCapture...
20601591271
from fractions import Fraction as fr def egypt_divide(p:int,q:int)->int: if p<1 or p>1000 or q<=p or q>2000: print("p와 q의 범위를 재확인하시오") return 'error' input=fr(p,q) res=input count=0 while(res!=0): res=res-rev(res) count+=1 return count def rev(a:fr)->fr: ...
hagishil/private_project
Hw1.py
Hw1.py
py
591
python
en
code
0
github-code
21
[ { "api_name": "fractions.Fraction", "line_number": 9, "usage_type": "call" }, { "api_name": "fractions.Fraction", "line_number": 18, "usage_type": "name" }, { "api_name": "fractions.Fraction", "line_number": 22, "usage_type": "call" }, { "api_name": "fractions.Fra...
23971096027
#! /usr/bin/env python3.6 """ server.py Stripe Sample. Python 3.6 or newer required. """ from os import environ from flask import Flask, jsonify, request, url_for, render_template import stripe # This is your real test secret API key. stripe.api_key = environ['STRIPE_API_KEY'] app = Flask(__name__, static_u...
arjunbrara123/Flask_eCommerce
main.py
main.py
py
1,527
python
en
code
0
github-code
21
[ { "api_name": "stripe.api_key", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 11, "usage_type": "name" }, { "api_name": "flask.Flask", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.render_template", ...
15813832516
import copy import numpy as np import scipy.stats # Done by Boychenko Dmytro IB-83 variant print("Variant 302 Boychenko Dmytro IB-83") def get_sum(*args): # take int X or array Xi_values for multiplication args_enc = () # empty tuple for receiving encrypted values encrypt = { # decryption table 4:...
marchiani/MOPELABA5
lab5.py
lab5.py
py
13,796
python
en
code
0
github-code
21
[ { "api_name": "numpy.random.randint", "line_number": 70, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 70, "usage_type": "attribute" }, { "api_name": "numpy.random.randint", "line_number": 108, "usage_type": "call" }, { "api_name": "numpy.ra...
71605638132
""" base class defines the procedure with that the TFrecord data is produced. """ import time import os from typing import Optional from multiprocessing import Pool from functools import partial import tensorflow as tf # from graph_nets import utils_tf from root_gnn.src.datasets import graph import subprocess def lin...
xju2/root_gnn
root_gnn/src/datasets/base.py
base.py
py
4,858
python
en
code
13
github-code
21
[ { "api_name": "typing.Optional", "line_number": 35, "usage_type": "name" }, { "api_name": "os.path.exists", "line_number": 56, "usage_type": "call" }, { "api_name": "os.path", "line_number": 56, "usage_type": "attribute" }, { "api_name": "root_gnn.src.datasets.gra...
86499536194
"""Find the titles of the top visited Vroots. This program will take a CSV data file and output lines of Vroot Title To run: python count_titles_solution.py anonymous-msweb.data """ from mrjob.job import MRJob import csv def csv_readline(line): """Given a sting CSV line, return a list of strings.""" f...
kagamikuro/CMT202-Distributed-and-Cloud-Computing
Labs/Lab2/Lab 2 solutions/count_titles_solution.py
count_titles_solution.py
py
1,270
python
en
code
1
github-code
21
[ { "api_name": "csv.reader", "line_number": 13, "usage_type": "call" }, { "api_name": "mrjob.job.MRJob", "line_number": 16, "usage_type": "name" } ]
35946217453
from flask import Flask,render_template,request,redirect from flask_sqlalchemy import SQLAlchemy from datetime import datetime from pytz import timezone import pytz app=Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI']='sqlite:///test.db' db=SQLAlchemy(app) ind=timezone('Asia/Kolkata') class Todo(db.Model): id...
Vivek2k20/TaskManagerWebApp
app.py
app.py
py
1,735
python
en
code
0
github-code
21
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask_sqlalchemy.SQLAlchemy", "line_number": 8, "usage_type": "call" }, { "api_name": "pytz.timezone", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.request.meth...
30696338128
# -*- coding: utf-8 -*- import datetime import numpy as np import pandas as pd import yfinance as yf import matplotlib.pyplot as plt data = pd.read_csv("..\\resource\\toushou1.csv", header=None, names=['code']) stocks = [str(s) + ".T" for s in data.code] #stocks.append("^N225") print("1") tickers = yf.Tickers(" ".j...
macchimachi/python_sample
sample/main2.py
main2.py
py
4,258
python
ja
code
0
github-code
21
[ { "api_name": "pandas.read_csv", "line_number": 9, "usage_type": "call" }, { "api_name": "yfinance.Tickers", "line_number": 15, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 23, "usage_type": "call" }, { "api_name": "datetime.dateti...
14919574380
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import # disable: accessing protected members, too many methods # pylint: disable=W0212,R0904 from hamcrest import is_ from hamcrest import assert_that import unittest ...
OpenNTI/nti.store
src/nti/store/payments/tests/test_utils.py
test_utils.py
py
2,142
python
en
code
0
github-code
21
[ { "api_name": "unittest.TestCase", "line_number": 25, "usage_type": "attribute" }, { "api_name": "nti.store.tests.SharedConfiguringTestLayer", "line_number": 27, "usage_type": "name" }, { "api_name": "hamcrest.assert_that", "line_number": 30, "usage_type": "call" }, {...
40549369742
import threading from dataclasses import dataclass from http import HTTPStatus from ipaddress import IPv4Address from multiprocessing import get_context from multiprocessing.managers import SyncManager from queue import Queue from typing import List, Tuple, Type from unittest.mock import MagicMock import pytest import...
guardicore/monkey
monkey/tests/unit_tests/infection_monkey/exploit/test_http_agent_binary_server.py
test_http_agent_binary_server.py
py
9,710
python
en
code
6,367
github-code
21
[ { "api_name": "ipaddress.IPv4Address", "line_number": 24, "usage_type": "call" }, { "api_name": "infection_monkey.exploit.agent_binary_request.ReservationID", "line_number": 25, "usage_type": "call" }, { "api_name": "infection_monkey.exploit.http_agent_binary_request_handler.Agen...
10420301819
from django.contrib.staticfiles.testing import LiveServerTestCase from django.urls import reverse from selenium import webdriver from news.models import Post, Topic class TestNewsAppPages(LiveServerTestCase): def setUp(self): topic = Topic.objects.create( name='topic name' ) ...
kermox/schronisko_krakow
functional_tests/test_news_app.py
test_news_app.py
py
1,853
python
en
code
1
github-code
21
[ { "api_name": "django.contrib.staticfiles.testing.LiveServerTestCase", "line_number": 8, "usage_type": "name" }, { "api_name": "news.models.Topic.objects.create", "line_number": 11, "usage_type": "call" }, { "api_name": "news.models.Topic.objects", "line_number": 11, "usa...
18380089741
import glob import json import os import mysql.connector import subprocess as sbp from jsonschema import validate from jsonschema.exceptions import ValidationError from mysql.connector import errorcode import wazuh_testing.tools.migration_tool as migration_tool from wazuh_testing.tools.file import read_json_file, trun...
wazuh/wazuh-qa
deps/wazuh_testing/wazuh_testing/tools/migration_tool/utils.py
utils.py
py
4,971
python
en
code
29
github-code
21
[ { "api_name": "wazuh_testing.tools.logging.Logging", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path", "line_number": 30, "usage_type": "attribute" }, { "api_name": "wazuh...
16894921994
# -*- coding: utf-8 -*- """ Created on Sun Nov 15 19:45:00 2020 learn python @author: wangrui """ ''' import requests # 导入网页请求库 from bs4 import BeautifulSoup # 导入网页解析库 import pprint # 使打印出来的列表更方便看 import json # 用于将列表字典(json格式)转化为相同形式字符串,以便存入文件 # 豆瓣加了反爬 需要加下面这两行 headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; W...
wasdfghjklr/learnpython
python_douban250.py
python_douban250.py
py
5,359
python
zh
code
0
github-code
21
[ { "api_name": "requests.get", "line_number": 129, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 133, "usage_type": "call" } ]
5690453292
import time from GetSoup import find_prices, get_url_string, enter_buyback_price import openpyxl from tkinter import * from tkinter import ttk from tkinter.filedialog import askopenfilename from tkinter.messagebox import showerror # from PIL import Image, ImageTk import os #import six import queue as Queue i...
arnoldjgtorres/GamePricing_Selenium
ReadSheet.py
ReadSheet.py
py
5,877
python
en
code
0
github-code
21
[ { "api_name": "time.time", "line_number": 14, "usage_type": "call" }, { "api_name": "GetSoup.find_prices", "line_number": 52, "usage_type": "call" }, { "api_name": "GetSoup.enter_buyback_price", "line_number": 69, "usage_type": "call" }, { "api_name": "openpyxl.lo...
13509785642
from robot.model import SuiteVisitor class ModelModifier(SuiteVisitor): def __init__(self, *tags, **extra): if extra: tags += tuple('%s-%s' % item for item in extra.items()) self.config = tags or ('visited',) def start_suite(self, suite): config = self.config if c...
robotframework/robotframework
atest/robot/cli/model_modifiers/ModelModifier.py
ModelModifier.py
py
2,237
python
en
code
8,521
github-code
21
[ { "api_name": "robot.model.SuiteVisitor", "line_number": 4, "usage_type": "name" } ]
30748166531
import pygame from pygame import mixer import random pygame.init() health=health1=400 healthh=health2=130 healthbar=5 xscreen,yscreen=1920,1080 linkblnv="katana1.png" linkblnv1='bullet.png' linkbg='bg1.jpg' linknv2='mt1.png' linknv3="mt2.png" linknv4="mt3.png" linknv5="mt4.png" linknv1='right.png' linkbl='suriken.png' ...
hoanglong21/Tomja
main.py
main.py
py
7,109
python
en
code
0
github-code
21
[ { "api_name": "pygame.init", "line_number": 4, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 24, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 24, "usage_type": "attribute" }, { "api_name": "pygame.display...
34843971202
from selenium import webdriver import random import time import os base_url = 'http://sports.news.naver.com/wfootball/vod/index.nhn?category=primera&listType=game' move_game_script = "document.getElementsByClassName('arr prev')[0].click();" def change_game(index): return "document.getElementsByClassName('bx')["...
hknam/livechat
crawler/naver_sports_list.py
naver_sports_list.py
py
984
python
en
code
0
github-code
21
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 17, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 17, "usage_type": "name" }, { "api_name": "os.path.expanduser", "line_number": 21, "usage_type": "call" }, { "api_name": "os.pa...
24702899942
#!/usr/bin/env python import argparse import shutil import subprocess import os parser = argparse.ArgumentParser() parser.add_argument('tumorbam',help='full path to the Tumor BAM file') parser.add_argument('normalbam',help='full path to the Normal BAM file') parser.add_argument('twobitfile',help='full path to 2bit fil...
seandavi/SDST
scripts/runCrestParallel.py
runCrestParallel.py
py
3,217
python
en
code
4
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path.basename", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path", "line_number": 18, "usage_type": "attribute" }, { "api_name": "os.path.basename...
74547581812
#!/usr/bin/python3 import socket, os, re, errno, sys, uuid, logging import traceback class Client(object): def __init__(self, address, port): self.address = address self.port = port def connect(self, empty): self.s = socket.socket() self.s.connect((self.address, self.port)) ...
SibirCTF/2023-service-sibirctf-chef
checker/checker.py
checker.py
py
8,874
python
en
code
0
github-code
21
[ { "api_name": "socket.socket", "line_number": 11, "usage_type": "call" }, { "api_name": "os.urandom", "line_number": 139, "usage_type": "call" }, { "api_name": "os.urandom", "line_number": 154, "usage_type": "call" }, { "api_name": "os.urandom", "line_number":...
39195576047
import smtplib from email.message import EmailMessage from string import Template from pathlib import Path html = Template(Path('index.html').read_text()) email = EmailMessage() email['from'] = 'Taimoor Aftab' email['to'] = 'taimooraftab@ymail.com' email['subject'] = 'You won 1,000,000 dollars' email.set_content(ht...
taimooraftab/email_sender
send_email.py
send_email.py
py
564
python
en
code
0
github-code
21
[ { "api_name": "string.Template", "line_number": 6, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 6, "usage_type": "call" }, { "api_name": "email.message", "line_number": 7, "usage_type": "name" }, { "api_name": "email.message.EmailMessage", ...
11898895195
from django.conf.urls import url from tastypie.authorization import Authorization from tastypie.resources import ModelResource from netAngels.models import Link class CodeLinkResource(ModelResource): class Meta: authorization = Authorization() queryset = Link.objects.all() resource_name =...
ShmakovVA/test_netAngels
netAngels/v1_api/api.py
api.py
py
1,733
python
en
code
0
github-code
21
[ { "api_name": "tastypie.resources.ModelResource", "line_number": 8, "usage_type": "name" }, { "api_name": "tastypie.authorization.Authorization", "line_number": 10, "usage_type": "call" }, { "api_name": "netAngels.models.Link.objects.all", "line_number": 11, "usage_type":...
10922836852
# improved stochastic optimal; transport plan with interpolation import numpy as np import ot as pot from metric import of_uni_cate, similarity_to_dissimilarity from multiprocessing import Pool def multicore_helper(args): func, target, repeat, interpolation = args return func.transform(target, repeat, interp...
marrvolo/SCDA
src/coordinate_ot_adaptation.py
coordinate_ot_adaptation.py
py
5,856
python
en
code
1
github-code
21
[ { "api_name": "multiprocessing.Pool", "line_number": 40, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 43, "usage_type": "call" }, { "api_name": "metric.of_uni_cate", "line_number": 54, "usage_type": "call" }, { "api_name": "metric.similarity...
41784332515
"""Code to only run extraction of statistical fidelity results for the main experiment. """ from pathlib import Path from typing import Dict, Iterable, List, Literal import numpy as np import pandas as pd from application.constants import ( DATA_CENTRIC_THRESHOLDS, DATA_DIR, RESULTS_DIR, SYNTHETIC_MOD...
HLasse/data-centric-synthetic-data
src/application/stat_dist/run_stat_metrics.py
run_stat_metrics.py
py
8,158
python
en
code
1
github-code
21
[ { "api_name": "pandas.DataFrame", "line_number": 45, "usage_type": "attribute" }, { "api_name": "pandas.Series", "line_number": 46, "usage_type": "attribute" }, { "api_name": "typing.Literal", "line_number": 49, "usage_type": "name" }, { "api_name": "data_centric_...
26746648961
import numpy as np import torch import hacman.utils.robosuite_transform_utils as transform_utils import scipy.spatial.transform as spt from transforms3d import quaternions, euler # from torchgeometry.core.conversions import rotation_matrix_to_quaternion from pytorch3d.transforms import matrix_to_quaternion def decompo...
HACMan-2023/HACMan
hacman/utils/transformations.py
transformations.py
py
4,419
python
en
code
28
github-code
21
[ { "api_name": "torch.Tensor", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pytorch3d.transforms.matrix_to_quaternion", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.cat", "line_number": 20, "usage_type": "call" }, { "api_name": "...
70880115254
import os from pathlib import Path import streamlit as st from popt_performance.data import get_data import pandas as pd import plotly.graph_objects as go # Page config st.set_page_config(page_title="Stocks prices dashboard", layout="wide") DATA_DIR = Path('.') / 'data' DATA_DIR.mkdir(parents=True, exist_ok=True) d...
jorivero83/popt_performance
popt_performance/ui.py
ui.py
py
2,915
python
en
code
0
github-code
21
[ { "api_name": "streamlit.set_page_config", "line_number": 9, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 15, "usage_type": "attribute" }, { "api_name": "plotly.gr...
10028242386
import argparse import matplotlib.pyplot as plt import torch import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader from dataset import MyDataset from model import MyModel parser = argparse.ArgumentParser() parser.add_argument("--n_samples", help="amount of samples to train with", ...
upcschool-ai/aidl-2022-winter-hands-on
session-1/main.py
main.py
py
1,706
python
en
code
4
github-code
21
[ { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 22, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 22, "usage_type": "attribute" }, { "api_name": "torch...
70998882292
from flask import Flask, render_template, request, session, redirect, url_for, flash from datetime import datetime, timedelta import mysql.connector import re import db_utils # App initialization: # ====================================================================================== app = Flask(__name__) app.secret...
GavinJin0501/Air-Ticket-Reservation-System
airline/app.py
app.py
py
37,750
python
en
code
1
github-code
21
[ { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "mysql.connector.connector.connect", "line_number": 12, "usage_type": "call" }, { "api_name": "mysql.connector.connector", "line_number": 12, "usage_type": "attribute" }, { "api_n...
30187836751
from sqlalchemy import create_engine, Column, String, Integer, Boolean, Float from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker import re # mgsm_terminals # mgsm_terminals_stage engine = create_engine('postgresql+psycopg2://kamilc:rexmil@localhost:5432/terminals...
kamilciomcia/phoneScrapper
Telepolis.py
Telepolis.py
py
25,464
python
en
code
0
github-code
21
[ { "api_name": "sqlalchemy.create_engine", "line_number": 10, "usage_type": "call" }, { "api_name": "sqlalchemy.ext.declarative.declarative_base", "line_number": 11, "usage_type": "call" }, { "api_name": "sqlalchemy.orm.sessionmaker", "line_number": 12, "usage_type": "call...
11816029925
import torch import torch.autograd as ag import torch.nn as nn import torch.nn.functional as F import pdb import math import functools import random import numpy as np def random_uniform(shape, low, high, cuda): x = torch.rand(*shape) result_cpu = (high - low) * x + low if cuda: return result_cpu....
Vibashan/online-da
detectron2/modeling/meta_arch/memory_bank.py
memory_bank.py
py
5,011
python
en
code
24
github-code
21
[ { "api_name": "torch.rand", "line_number": 13, "usage_type": "call" }, { "api_name": "torch.sqrt", "line_number": 21, "usage_type": "call" }, { "api_name": "torch.cat", "line_number": 27, "usage_type": "call" }, { "api_name": "functools.reduce", "line_number":...
29546021585
from .modules import LV_FiberEstimator, LVClinicalMetricsComputations, LV3DMetricsPlotter import numpy as np # from project_heart.enums import CONTAINER, STATES, LV_SURFS from project_heart.utils.enum_utils import check_enum from project_heart.utils.assertions import assert_iterable import logging logging.basicConfig(...
Nobregaigor/Project-Heart
project_heart/lv/left_ventricle.py
left_ventricle.py
py
35,255
python
en
code
1
github-code
21
[ { "api_name": "logging.basicConfig", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "modules.LV_FiberEstimator", "line_number": 16, "usage_type": "name" }, { "api_name": "modules...
25163358005
import torch.nn as nn import torch def conv_block(in_channels, out_channels): bn = nn.BatchNorm2d(out_channels) nn.init.uniform_(bn.weight) # for pytorch 1.2 or later return nn.Sequential( nn.Conv2d(in_channels, out_channels, 3, padding=1), bn, nn.ReLU(), nn.MaxPoo...
ChengLiangYeh/dlcv_hw4_project
code/Conv_G.py
Conv_G.py
py
1,426
python
en
code
0
github-code
21
[ { "api_name": "torch.nn.BatchNorm2d", "line_number": 5, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 5, "usage_type": "name" }, { "api_name": "torch.nn.init.uniform_", "line_number": 6, "usage_type": "call" }, { "api_name": "torch.nn.init", ...