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
13895478896
######################################################################################## # Run examples from our paper in RBEF ######################################################################################## import sys import numpy as np import matplotlib.pyplot as plt import multiprocessin...
ViniciusLima94/pyGC
runRBEF.py
runRBEF.py
py
7,302
python
en
code
30
github-code
6
[ { "api_name": "sys.argv", "line_number": 19, "usage_type": "attribute" }, { "api_name": "numpy.array", "line_number": 32, "usage_type": "call" }, { "api_name": "pygc.pySpec.pySpec.compute_freq", "line_number": 35, "usage_type": "call" }, { "api_name": "pygc.pySpec...
10731823816
import torch from torch import nn import torchvision.transforms as T ####################################################################################### ######################################## DRML ######################################## ########################################################################...
girishvn/BigSmall
code/neural_methods/model/literature_models.py
literature_models.py
py
15,138
python
en
code
14
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 11, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 11, "usage_type": "name" }, { "api_name": "torch.nn.Sequential", "line_number": 23, "usage_type": "call" }, { "api_name": "torch.nn", "lin...
13085423175
import json # this will create a tweet, with possiblities of adding medias and replying to other tweets def create_tweet(tas, message, media_ids = None, reply_ids = None): payload = {"status": message} if media_ids != None: payload["media_ids"] = media_ids if reply_ids != None: payload["in_reply_to_status_i...
filming/Twitter
src/Twitter/tweet/tweet.py
tweet.py
py
723
python
en
code
0
github-code
6
[ { "api_name": "json.loads", "line_number": 14, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 25, "usage_type": "call" } ]
15018029353
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Oct 5 16:56:55 2022 @author: josephbriggs """ import pathlib import argparse import cv2 def main(): ''' Converts files to greyscale. ''' parser = argparse.ArgumentParser(description='Convert files to greyscale.') parser.add_argu...
jhb123/enhance_greyscale
imgs_to_gs.py
imgs_to_gs.py
py
1,430
python
en
code
0
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 19, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 30, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 36, "usage_type": "call" }, { "api_name": "cv2.imread", "l...
12598627326
from airflow.hooks.postgres_hook import PostgresHook from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults class DataQualityOperator(BaseOperator): """ Runs data quality check by passing test SQL Parameters redshift_conn_id: Redshift Connection ID test_s...
ljia-ch/airflow_data_pipeline_project
plugins/operators/data_quality.py
data_quality.py
py
1,362
python
en
code
0
github-code
6
[ { "api_name": "airflow.models.BaseOperator", "line_number": 5, "usage_type": "name" }, { "api_name": "airflow.utils.decorators.apply_defaults", "line_number": 18, "usage_type": "name" }, { "api_name": "airflow.hooks.postgres_hook.PostgresHook", "line_number": 32, "usage_t...
21368565276
import numpy as np import time import matplotlib.pyplot as plt a=np.loadtxt('meas2/magnitude_0to40.0mA_freq_sweep.csv', delimiter=',') c=np.loadtxt('meas2/phase_0to40.0mA_freq_sweep.csv', delimiter=',') b=np.loadtxt('meas2/sweep_feq.csv', delimiter=',') cstart=0 #start current cstop=40E-3 # stop current cs...
physikier/magnetometer
src/plot.py
plot.py
py
775
python
en
code
0
github-code
6
[ { "api_name": "numpy.loadtxt", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.loadtxt", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.loadtxt", "line_number": 7, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplots", ...
42656181560
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os.path import argparse import logging from tarfile import TarFile from thirdparty.dagflow import ParallelTask, Task, DAG, do_dag from ontbc.common import mkdir, touch, read_tsv from ontbc.parser import add_barcode_parser from ontbc.config import PORECHO...
FlyPythons/ontbc
ontbc/barcode.py
barcode.py
py
5,174
python
en
code
5
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.path.dirname", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 22, "usage_type": "attribute" }, { "api_name": "os.path", ...
39865467891
from IPython import get_ipython def type_of_script(): """ Detects and returns the type of python kernel :return: string 'jupyter' or 'ipython' or 'terminal' """ try: ipy_str = str(type(get_ipython())) if 'zmqshell' in ipy_str: return 'jupyter' if 'terminal' in i...
syj3514/MissingSat
befo231205/05b_get_involved_cpu.py
05b_get_involved_cpu.py
py
3,847
python
en
code
0
github-code
6
[ { "api_name": "IPython.get_ipython", "line_number": 10, "usage_type": "call" }, { "api_name": "rur.uri.timer", "line_number": 41, "usage_type": "attribute" }, { "api_name": "rur.uri", "line_number": 41, "usage_type": "name" }, { "api_name": "icl_IO.mode2repo", ...
12190600050
# # db.py # import os import sqlite3 import time import datetime from flask import g import db_init def test_db_conn(): dbname = os.environ.get("SEVENS_DB_NAME") try: os.remove(dbname) except OSError: pass """ Check if db connection can open, create and init db if doesn't already exist...
tolkamps1/sevens7
db.py
db.py
py
3,441
python
en
code
0
github-code
6
[ { "api_name": "os.environ.get", "line_number": 12, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.remove", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_n...
11941164377
#!/usr/bin/env python # # fast_mr -> # # Fast molecular replacement in the spirit of fast_dp, starting from coordinate # files and using brute force (and educated guesses) to get everything going. # # fast_mr - main program. import os import sys import time import shutil import math import traceback from multiprocessi...
DiamondLightSource/fast_ep
src/fast_mr.py
fast_mr.py
py
6,927
python
en
code
2
github-code
6
[ { "api_name": "os.environ", "line_number": 25, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path", "line_number": 28, "usage_type": "attribute" }, { "api_name": "os.environ", "line_numb...
40471740091
import os import cv2 import numpy as np import shutil import sys sys.path.insert(0,os.path.realpath('..')) sys.path.insert(0,os.path.join(os.path.realpath('..'),'piano_utils')) from tools.warper import order_points from config import cfg from piano_utils.networks import PSPNet from piano_utils.util import colori...
yxlijun/vision-piano-amt
figures/plt_keyboard.py
plt_keyboard.py
py
7,430
python
en
code
2
github-code
6
[ { "api_name": "sys.path.insert", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_numbe...
1383718733
from .base import metadata from sqlalchemy import Table, Column, BigInteger,\ String, Boolean, DateTime t_users = Table( "users", metadata, Column('u_id', BigInteger), # telegram id Column('name', String), # фамилия c инициалами Column('name_tg', String), # имя по...
oleg-medovikov/eventlog
base/users.py
users.py
py
618
python
ru
code
0
github-code
6
[ { "api_name": "sqlalchemy.Table", "line_number": 6, "usage_type": "call" }, { "api_name": "base.metadata", "line_number": 8, "usage_type": "argument" }, { "api_name": "sqlalchemy.Column", "line_number": 9, "usage_type": "call" }, { "api_name": "sqlalchemy.BigInteg...
5759912904
# -*- coding: utf-8 -*- """ Created on Wed Feb 20 09:17:19 2019 @author: if715029 """ import numpy as np import matplotlib.pyplot as plt import scipy.spatial.distance as sc import pandas as pd #%% data = pd.read_excel('../data/Datos_2015.xlsx',sheet_name='Atemajac') #%% data = data.iloc[:,2:7].dropna() #%% D1 = sc...
OscarFlores-IFi/CDINP19
code/p6.py
p6.py
py
616
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_excel", "line_number": 14, "usage_type": "call" }, { "api_name": "scipy.spatial.distance.squareform", "line_number": 20, "usage_type": "call" }, { "api_name": "scipy.spatial.distance", "line_number": 20, "usage_type": "name" }, { "api_na...
18659651890
import models import typing import sqlite3 import os import sys class Storage: def __init__(self): self._conn = sqlite3.connect('v_store.db') self._cursor = self._conn.cursor() self._queries: dict[str, str] = self.read_queries() def __del__(self): self._cursor.close() s...
Ayon-Bhowmick/Vec4Rec
src/storage.py
storage.py
py
2,150
python
en
code
0
github-code
6
[ { "api_name": "sqlite3.connect", "line_number": 9, "usage_type": "call" }, { "api_name": "models.Point", "line_number": 42, "usage_type": "attribute" }, { "api_name": "models.Vector", "line_number": 54, "usage_type": "attribute" }, { "api_name": "models.Vector", ...
22951595310
#!/usr/bin/env python2.7 """ A tool to update the Product Version and Code of a C# VS2010 setup package (*.vdproj). Intended to be used with an automated build process. """ import re import uuid import argparse import os, shutil import tempfile ##"ProductCode" = "8:{35424778-8534-431B-9492-5CD84B1EDE03}" ...
wfriedl/pvc_changer
pvc_changer.py
pvc_changer.py
py
2,183
python
en
code
0
github-code
6
[ { "api_name": "re.compile", "line_number": 16, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 19, "usage_type": "call" }, { "api_name": "tempfile.mkstemp", "line_number": 23, "usage_type": "call" }, { "api_name": "os.close", "line_number": ...
19882708740
import os import click from guardata.utils import trio_run from guardata.api.protocol import OrganizationID from guardata.logging import configure_logging from guardata.cli_utils import spinner, cli_exception_handler from guardata.client.types import BackendAddr, BackendOrganizationBootstrapAddr from guardata.client.b...
bitlogik/guardata
guardata/client/cli/create_organization.py
create_organization.py
py
1,793
python
en
code
9
github-code
6
[ { "api_name": "guardata.cli_utils.spinner", "line_number": 13, "usage_type": "call" }, { "api_name": "guardata.client.backend_connection.apiv1_backend_administration_cmds_factory", "line_number": 14, "usage_type": "call" }, { "api_name": "guardata.client.types.BackendOrganization...
3345758956
from tkinter import * from tkinter import messagebox import tkinter as tk import time, sys from pygame import mixer from PIL import Image, ImageTk def alarm(): alarm_time=user_input.get() if alarm_time=="": messagebox.askretrycancel("Error Message","Please Enter value") else: ...
shuchi111/Alarm_clockGUI.py
alarm.py
alarm.py
py
1,256
python
en
code
1
github-code
6
[ { "api_name": "tkinter.messagebox.askretrycancel", "line_number": 12, "usage_type": "call" }, { "api_name": "tkinter.messagebox", "line_number": 12, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 15, "usage_type": "call" }, { "api_name": "time....
17345627172
import os import glob import torch from torchvision import transforms as T from torch.utils.data import DataLoader,Dataset from torch.utils.data.distributed import DistributedSampler from codes.utils import img_processing from codes.data import data_utils import math import numpy as np class Load_Data(D...
csxuwu/LRCR_Net
codes/data/data_loader4.py
data_loader4.py
py
5,103
python
en
code
0
github-code
6
[ { "api_name": "torch.utils.data.Dataset", "line_number": 14, "usage_type": "name" }, { "api_name": "glob.glob", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path", "line_n...
33699952990
from django.contrib import admin from django.urls import path from web.views import home_page from django.contrib.auth.views import LoginView, LogoutView from ckt.views import ( CircuitControlView, CircuitStatusView, write_api_view, read_api_view, to_circuit, plot_graph, chartview, grap...
sumansam312/IOT_Platform
iot/urls.py
urls.py
py
1,462
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 24, "usage_type": "call" }, { "api_name": "django.contrib.admin.site", "line_number": 24, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 24, "usage_type": "name" }, { "api_name": "...
38907427149
import tkinter as tk try: import pygame except ImportError: audio = None else: audio = True import sys import random import time ### Stopped Let's code: Tetris episode 19 by TigerhawkT3 at 00:58:42 ### Use score_lines or high_score_lines to increase level and speed etc. class Shape: def __init__(self...
Jack-Evitts/Pythtris
Tetris.py
Tetris.py
py
22,949
python
en
code
0
github-code
6
[ { "api_name": "time.perf_counter", "line_number": 26, "usage_type": "call" }, { "api_name": "time.perf_counter", "line_number": 34, "usage_type": "call" }, { "api_name": "time.perf_counter", "line_number": 41, "usage_type": "call" }, { "api_name": "time.perf_count...
27592948212
import serial inp=input("Enter the port : ") ser=serial.Serial(inp,baudrate=230400,timeout=None) data_old=0 # always the first-fixed bit skipped=0 cntr=0 fl=1 su=0 cx=0 while True: if (skipped!=0): data_old=ser.readline().decode('ascii')[0] data_old=int(data_old) skipped-=1 continue ...
eclubiitk/Li-Fi-E-Club
Old Codes/non-queue implementation/Receiver.py
Receiver.py
py
910
python
en
code
0
github-code
6
[ { "api_name": "serial.Serial", "line_number": 3, "usage_type": "call" } ]
22938524534
import cv2 import numpy as np from model import Model import math as m import time import logging as log class headPoseEstimation(): def __init__(self, MODEL_PATH, DEVICE): self.model_loaded = Model(MODEL_PATH, DEVICE) self.model_loaded.get_unsupported_layer() self.model_name = ...
SamyTahar/Computer-Pointer-Controller
src/headposeestimation.py
headposeestimation.py
py
1,885
python
en
code
0
github-code
6
[ { "api_name": "model.Model", "line_number": 14, "usage_type": "call" }, { "api_name": "time.perf_counter", "line_number": 40, "usage_type": "call" }, { "api_name": "time.perf_counter", "line_number": 47, "usage_type": "call" }, { "api_name": "time.perf_counter", ...
26971894453
import logging import mtcorr import statistics as stats import math import h5py import numpy import sys log = logging.getLogger(__name__) def load_from_hdf5(filename): f = h5py.File(filename,'r') quantiles_dict = {} stats = {} if 'quantiles' in f: quantiles_dict['exp_quantiles'] = f['quanti...
timeu/PyGWAS
pygwas/core/result.py
result.py
py
9,529
python
en
code
20
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "h5py.File", "line_number": 14, "usage_type": "call" }, { "api_name": "math.pow", "line_number": 33, "usage_type": "call" }, { "api_name": "math.pow", "line_number": 57...
40684104940
#!/usr/bin/python3 """ function that queries the Reddit API and returns the number of subscribers """ import requests def number_of_subscribers(subreddit): """initializate""" if (type(subreddit) is not str): return(0) url_api = ("https://www.reddit.com/r/{}/about.json".format(subreddit)) hea...
manosakpujiha/alx-system_engineering-devops
0x16-api_advanced/0-subs.py
0-subs.py
py
539
python
en
code
3
github-code
6
[ { "api_name": "requests.get", "line_number": 15, "usage_type": "call" } ]
7997489923
""" Before executing this script make sure that all packages are installed properly and also select 3 ips from resource pool wiki which are not in use.(check using ping command) purpose: ------- This script is for first time setup of dcs vm which includes accepting eula,changing password,configure the ip and changing ...
Srija-Papinwar/CD
scripts/dcs_fts.py
dcs_fts.py
py
20,662
python
en
code
0
github-code
6
[ { "api_name": "os.path.dirname", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 16, "usage_type": "call" }, { "api_name": "sys.path.append", "l...
30366445741
from traits.api import Bool, Instance, Float, Property # Local relative imports from .abstract_mapper import AbstractMapper from .data_range_1d import DataRange1D class Base1DMapper(AbstractMapper): """Defines an abstract mapping from a 1-D region in input space to a 1-D region in output space. """ ...
enthought/chaco
chaco/base_1d_mapper.py
base_1d_mapper.py
py
4,221
python
en
code
286
github-code
6
[ { "api_name": "abstract_mapper.AbstractMapper", "line_number": 8, "usage_type": "name" }, { "api_name": "traits.api.Instance", "line_number": 14, "usage_type": "call" }, { "api_name": "data_range_1d.DataRange1D", "line_number": 14, "usage_type": "argument" }, { "a...
27103152939
from itertools import product import numpy as np import pytest from dcegm.pre_processing.params import process_params from numpy.testing import assert_array_almost_equal as aaae from scipy.special import roots_sh_legendre from scipy.stats import norm from toy_models.consumption_retirement_model.budget_functions import...
OpenSourceEconomics/dcegm
tests/test_budget_equation.py
test_budget_equation.py
py
2,269
python
en
code
15
github-code
6
[ { "api_name": "itertools.product", "line_number": 20, "usage_type": "call" }, { "api_name": "dcegm.pre_processing.params.process_params", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_number": 40, "usage_type": "call" }, { "api_n...
40546336482
import dlib import os import numpy as np import matplotlib.pyplot as plt """ 此文件为正向人脸检测模块,采用dlib实现 """ def _shape_to_np(shape): xy = [] for i in range(68): xy.append((shape.part(i).x, shape.part(i).y,)) xy = np.asarray(xy, dtype='float32') return xy def get_landmarks(img, detector, predicto...
hamster1963/face-all-in-one-machine-backend
face_irobot_main/facial_feature_detector.py
facial_feature_detector.py
py
1,246
python
en
code
0
github-code
6
[ { "api_name": "numpy.asarray", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.asarray", "line_number": 35, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 47, "usage_type": "call" }, { "api_name": "matplotlib.pyplot"...
2696828667
from collections import Counter from trava.ext.boosting_eval.boosting_logic import CommonBoostingEvalLogic from trava.ext.boosting_eval.eval_steps import EvalFitSteps from trava.fit_predictor import FitPredictConfig, FitPredictConfigUpdateStep, FitPredictorSteps from trava.split.result import SplitResult from trava.tr...
ityutin/trava
trava/ext/grouped/group_steps.py
group_steps.py
py
3,781
python
en
code
2
github-code
6
[ { "api_name": "trava.fit_predictor.FitPredictConfigUpdateStep", "line_number": 10, "usage_type": "name" }, { "api_name": "trava.split.result.SplitResult", "line_number": 14, "usage_type": "name" }, { "api_name": "trava.fit_predictor.FitPredictConfig", "line_number": 14, "...
30031301327
import json import networkx as nx from networkx.drawing.nx_agraph import graphviz_layout import matplotlib import matplotlib.pyplot as plt import networkx as nx def read_details(pd_details): """[summary] Args: pd_details ([type]): [description] Returns: [type]: [description] """ ...
siv2r/kidney-exchange
global_match/hovering.py
hovering.py
py
8,711
python
en
code
45
github-code
6
[ { "api_name": "json.load", "line_number": 19, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplots", "line_number": 117, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 117, "usage_type": "name" }, { "api_name": "networkx.dra...
24270720132
import random import os import glob import cv2 import numpy as np import json from detectron2.structures import BoxMode import itertools import sys # import some common detectron2 utilities import pdb from detectron2.engine import DefaultPredictor from detectron2.config import get_cfg from detectron2.utils.visualizer ...
dhaivat1729/detectron2_CL
experiments/test_duckietown_detectron.py
test_duckietown_detectron.py
py
6,268
python
en
code
0
github-code
6
[ { "api_name": "detectron2.config.get_cfg", "line_number": 25, "usage_type": "call" }, { "api_name": "json.load", "line_number": 39, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 54, "usage_type": "call" }, { "api_name": "detectron2.structures....
8167072903
from keras.callbacks import EarlyStopping, ModelCheckpoint from keras import regularizers import numpy as np import pandas as pd import math as math import sys import os import keras from keras.models import load_model from keras.layers import Dropout , Flatten from keras.layers import BatchNormalization from keras.pre...
muachilin/Machine-Learning
hw5/hw5_test.py
hw5_test.py
py
3,172
python
en
code
0
github-code
6
[ { "api_name": "sys.argv", "line_number": 49, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 51, "usage_type": "attribute" }, { "api_name": "keras.preprocessing.text.text_to_word_sequence", "line_number": 60, "usage_type": "call" }, { "api_na...
31975617255
from django import template from ..models import Page register = template.Library() @register.simple_tag def main_menu(): "Query top-level pages" return Page.objects.with_tree_fields().filter( parent=None, is_active=True)
dnknth/feincms-demo
pages/templatetags/menus.py
menus.py
py
240
python
en
code
1
github-code
6
[ { "api_name": "django.template.Library", "line_number": 4, "usage_type": "call" }, { "api_name": "django.template", "line_number": 4, "usage_type": "name" }, { "api_name": "models.Page.objects.with_tree_fields", "line_number": 9, "usage_type": "call" }, { "api_nam...
23552963573
######################################################################### # File Name: getKmerFromVCF_REF.py # Author: yanbo # mail: liyanbotop@163.com # Created Time: Thu 09 May 2019 10:45:06 AEST ######################################################################### #!/bin/bash import collections from Bio import ...
yanboANU/VariationCalling
libprism/evaluate/getKmerFromVCF_REF.py
getKmerFromVCF_REF.py
py
7,794
python
en
code
1
github-code
6
[ { "api_name": "read.read_vcf", "line_number": 28, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 29, "usage_type": "attribute" }, { "api_name": "tools.get_smaller_pair_kmer", "line_number": 55, "usage_type": "call" }, { "api_name": "read.read_vcf...
4991495509
#!/usr/bin/python3 # enable debugging import cgi, cgitb import json import requests import responses cgitb.enable() class Expense: def __init__(self, exp_name,exp_date,exp_amount,exp_type): self.name = exp_name self.date = exp_date self.amount = exp_amount self.type = exp_type...
eliz-liu/money_site_html
form.py
form.py
py
795
python
en
code
0
github-code
6
[ { "api_name": "cgitb.enable", "line_number": 8, "usage_type": "call" }, { "api_name": "cgi.FieldStorage", "line_number": 17, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 25, "usage_type": "call" } ]
5200586519
""" This module contains the main transmittance/reflectance calculation bits. Users can run the calculations through `model.Model()` and avoid accessing `core` directly. """ import numpy as np import scipy as sp def rt_amp(index, delta, theta, pol): """Calculate the reflected and transmitted amplitudes through t...
anadolski/armmwave
armmwave/core.py
core.py
py
13,897
python
en
code
1
github-code
6
[ { "api_name": "numpy.dot", "line_number": 40, "usage_type": "call" }, { "api_name": "numpy.dot", "line_number": 43, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 66, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 67, ...
70994878268
# -*- coding: utf-8 -*- import PySide2.QtWidgets as qtwidgets import PySide2.QtCore as qtcore import PySide2.QtGui as qtgui import PySide2.QtNetwork as qtnetwork import os.path import signal import socket class HButtonBar(qtwidgets.QWidget): layout=qtwidgets.QHBoxLayout def __init__(self,def_list): ...
chiara-paci/djvueditor
lib/python/djvuedlib/widgets.py
widgets.py
py
9,581
python
en
code
0
github-code
6
[ { "api_name": "PySide2.QtWidgets.QWidget", "line_number": 13, "usage_type": "attribute" }, { "api_name": "PySide2.QtWidgets", "line_number": 13, "usage_type": "name" }, { "api_name": "PySide2.QtWidgets.QHBoxLayout", "line_number": 14, "usage_type": "attribute" }, { ...
36484764773
import cv2 import glob from matplotlib import pyplot as plt faceDet = cv2.CascadeClassifier("haarcascade_frontalface_default.xml") faceDet_two = cv2.CascadeClassifier("haarcascade_frontalface_alt2.xml") faceDet_three = cv2.CascadeClassifier("haarcascade_frontalface_alt.xml") faceDet_four = cv2.CascadeClassifier("...
dishavarshney9/uhack
classi.py
classi.py
py
1,880
python
en
code
0
github-code
6
[ { "api_name": "cv2.CascadeClassifier", "line_number": 4, "usage_type": "call" }, { "api_name": "cv2.CascadeClassifier", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.CascadeClassifier", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.Ca...
20841031996
from sklearn.model_selection import train_test_split from sklearn import svm def svm_classification(X, y, C_in, gamma_in, kernel_in): X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, shuffle=y, random_state=42) classifierSVM = svm.SVC(C=C_in, degree=2, gamma=gamma_in, kernel=kernel_in)...
mfaisalafandi/identification_teks_ulasan_svm
Klasifikasi.py
Klasifikasi.py
py
566
python
en
code
0
github-code
6
[ { "api_name": "sklearn.model_selection.train_test_split", "line_number": 5, "usage_type": "call" }, { "api_name": "sklearn.svm.SVC", "line_number": 7, "usage_type": "call" }, { "api_name": "sklearn.svm", "line_number": 7, "usage_type": "name" } ]
71474372027
# Rotating or flipping an image from PIL import Image def main(): image = Image.open('../lenna.png') image.show('Original') # Rotate 60 degrees counter clockwise rotated_image = image.rotate(60) rotated_image.show('Rotate 60') # Rotate using Image.transpose # Transpose supports these val...
gkostadinov/py-pil-imageprocessing
1-transformations/2.rotate.py
2.rotate.py
py
837
python
en
code
5
github-code
6
[ { "api_name": "PIL.Image.open", "line_number": 6, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 6, "usage_type": "name" }, { "api_name": "PIL.Image.ROTATE_90", "line_number": 20, "usage_type": "attribute" }, { "api_name": "PIL.Image", "line...
43536088674
import re import math import scipy.stats as stats from statsmodels.stats.multitest import multipletests import numpy as np import pandas as pd from tqdm import tqdm # import functools import pprint from mutagene.dna import ( nucleotides, complementary_nucleotide, bases_dict, # comp_dict, extended_nucl...
neksa/mutagene
mutagene/motifs/__init__.py
__init__.py
py
17,419
python
en
code
3
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 21, "usage_type": "call" }, { "api_name": "mutagene.io.motifs.get_known_motifs", "line_number": 48, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 58, "usage_type": "attribute" }, { "api_name...
8502338250
import torch import torch.nn as nn from Descriptor import Descriptor from Recovery_Submodule import R_t, Pyramid_maxout class TR(nn.Module): # translucency recovery(TR) module def __init__(self, input_channel=3, beta=4, gamma=4): super(TR, self).__init__() self.D_t = Descriptor(input_channel, ...
linYDTHU/DesnowNet_Context-Aware_Deep_Network_for_Snow_Removal
network/DesnowNet.py
DesnowNet.py
py
3,956
python
en
code
15
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 7, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 7, "usage_type": "name" }, { "api_name": "Descriptor.Descriptor", "line_number": 11, "usage_type": "call" }, { "api_name": "Recovery_Submodule....
35226084140
from __future__ import division # Our Backend for the App! # Built with Flask # Import Flask import flask import requests import os from flask import send_file import re import sys # Create the application app = flask.Flask(__name__) # serving home.html @app.route('/', methods=['GET']) def serve_page(): return ...
manichandra95151/TTSL
main.py
main.py
py
4,265
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 15, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 20, "usage_type": "call" }, { "api_name": "flask.request", "line_number": 25, "usage_type": "attribute" }, { "api_name": "flask.render_tem...
24312665302
from langdetect import detect def to_sentences(text): text = text.replace("\n", " ") sentences = [s + '.' for s in text.split(".") if s != ""] return sentences def divide(text, input_size=5000): """ Divide text into chunks of input_size Args: text (str): Text to be divided in...
hyunooss/SSUmmary
django-server/ssummary_site/modules/utils.py
utils.py
py
788
python
en
code
0
github-code
6
[ { "api_name": "langdetect.detect", "line_number": 18, "usage_type": "call" } ]
22807898242
# coding: utf8 """锁Lock 用于避免进程间对shared memory的争夺""" import multiprocessing import time def job(val, num, lo): lo.acquire() # 取得锁 for _ in range(10): time.sleep(0.1) val.value += num print(val.value) lo.release() # 释放锁 def multicore(): lo = multiprocessing....
sola1121/practice_code
python3/对于异步的例子/multiprocessing/6 multiprocessing lock锁.py
6 multiprocessing lock锁.py
py
752
python
en
code
0
github-code
6
[ { "api_name": "time.sleep", "line_number": 11, "usage_type": "call" }, { "api_name": "multiprocessing.Lock", "line_number": 17, "usage_type": "call" }, { "api_name": "multiprocessing.Value", "line_number": 19, "usage_type": "call" }, { "api_name": "multiprocessing...
29074159051
from RepSys import Error, config from RepSys.util import execcmd from RepSys.VCS import * from os.path import basename, dirname from os import chdir, getcwd import sys import re import time from xml.etree import cElementTree as ElementTree import subprocess class GITLogEntry(VCSLogEntry): def __init__(self, revisi...
mdkcauldron/proyvinds-repsys
RepSys/git.py
git.py
py
2,133
python
en
code
0
github-code
6
[ { "api_name": "RepSys.config.get", "line_number": 20, "usage_type": "call" }, { "api_name": "RepSys.config", "line_number": 20, "usage_type": "name" }, { "api_name": "RepSys.util.execcmd", "line_number": 31, "usage_type": "call" }, { "api_name": "xml.etree.cElemen...
7422093495
from operator import add from itertools import chain, combinations from functools import reduce import math import numpy as np from scipy import ndimage from tkinter import * class GF2(object): def __init__(self, a=0): self.value = int(a) & 1 def __add__(self, rhs): return GF2(self.val...
ThaumielSparrow/switch-solver
lights_on.py
lights_on.py
py
6,138
python
en
code
0
github-code
6
[ { "api_name": "numpy.vectorize", "line_number": 52, "usage_type": "call" }, { "api_name": "numpy.hstack", "line_number": 77, "usage_type": "call" }, { "api_name": "numpy.eye", "line_number": 77, "usage_type": "call" }, { "api_name": "numpy.int_", "line_number"...
45375013026
""" include packages """ from settings import * import sqlite3 import discord from discord import app_commands import sys import signal import deepl from typing import Optional from lib import vote as vt from lib import deepl as dl """ Global variables """ connection : sqlite3.Connection = sqlite3.connect(D...
GrapeJuicer/GrapeBot
app/main.py
main.py
py
3,637
python
en
code
0
github-code
6
[ { "api_name": "sqlite3.Connection", "line_number": 23, "usage_type": "attribute" }, { "api_name": "sqlite3.connect", "line_number": 23, "usage_type": "call" }, { "api_name": "discord.Intents", "line_number": 24, "usage_type": "attribute" }, { "api_name": "discord....
18801853357
import pytest from base.client_base import TestcaseBase from common import common_func as cf from common import common_type as ct from common.common_type import CaseLabel from utils.util_log import test_log as log # customer rg rg_name_0 = "RG_0" rg_name_1 = "RG_1" # coll name coll_name_1 = "ResourceGroup_111" coll_...
milvus-io/milvus
tests/python_client/chaos/testcases/test_chaos_resource_group.py
test_chaos_resource_group.py
py
9,886
python
en
code
24,190
github-code
6
[ { "api_name": "common.common_type.default_resource_group_name", "line_number": 21, "usage_type": "attribute" }, { "api_name": "common.common_type", "line_number": 21, "usage_type": "name" }, { "api_name": "common.common_type.default_resource_group_capacity", "line_number": 22...
24091654897
from Film import Film from Forgalmazo import Forgalmazo import datetime def fajl_beolvas(): filmek = [] fp = open('nyitohetvege.txt', 'r', encoding='utf-8') lines = fp.readlines() fp.close() for line in lines[1:]: n_line = line.rstrip() (eredetiCim, magyarCim,bemutato,forgalmazo, ...
janos01/esti2020Python
gyakorlo/Nyito/src/OpeningWeekend.py
OpeningWeekend.py
py
3,940
python
hu
code
0
github-code
6
[ { "api_name": "Film.Film", "line_number": 15, "usage_type": "call" }, { "api_name": "Forgalmazo.Forgalmazo", "line_number": 92, "usage_type": "call" }, { "api_name": "datetime.date.fromisoformat", "line_number": 116, "usage_type": "call" }, { "api_name": "datetime...
71119888509
import matplotlib.pyplot as plt import numpy as np # ~~~ DEFINE DATA ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ np.random.seed(1337) n = 1000000 x = np.random.standard_normal(n) y = x + .5 * np.random.standard_normal(n) hist, xedges, yedges = np.histogram2d(x, y, bins=100, density=True) hist[hist =...
braniii/prettypyplot
gallery/comparison_mpl.py
comparison_mpl.py
py
1,505
python
en
code
4
github-code
6
[ { "api_name": "numpy.random.seed", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 5, "usage_type": "attribute" }, { "api_name": "numpy.random.standard_normal", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.r...
19788096058
from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple from uuid import uuid4 import pygame from .clock import Clock, clock from .keyboard import Keyboard from .screen import Screen from .utils.event_dispatcher import EventDispatcher if TYPE_CHECKING: from .application import Application class Scene(Even...
kdeyev/pgz
pgz/scene.py
scene.py
py
9,429
python
en
code
4
github-code
6
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 11, "usage_type": "name" }, { "api_name": "utils.event_dispatcher.EventDispatcher", "line_number": 15, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 126, "usage_type": "name" }, { "api_...
20519832620
"""! @brief CCORE Wrapper for X-Means algorithm. @authors Andrei Novikov (pyclustering@yandex.ru) @date 2014-2020 @copyright BSD-3-Clause """ from ctypes import c_double, c_longlong, c_size_t, c_uint, POINTER from pyclustering.core.wrapper import ccore_library from pyclustering.core.pyclustering_pac...
annoviko/pyclustering
pyclustering/core/xmeans_wrapper.py
xmeans_wrapper.py
py
1,207
python
en
code
1,113
github-code
6
[ { "api_name": "pyclustering.core.pyclustering_package.package_builder", "line_number": 20, "usage_type": "call" }, { "api_name": "ctypes.c_double", "line_number": 20, "usage_type": "argument" }, { "api_name": "pyclustering.core.pyclustering_package.package_builder", "line_num...
7176111759
#!/usr/bin/env python3 import os import sys import re from pathlib import Path def _find_files(project_root): path_exclude_pattern = r"\.git($|\/)|venv|_build|\.tox" file_exclude_pattern = r"fill_template_vars\.py|\.swp$" filepaths = [] for dir_path, _dir_names, file_names in os.walk(project_root): ...
ethereum/py-evm
.project-template/fill_template_vars.py
fill_template_vars.py
py
2,362
python
en
code
2,109
github-code
6
[ { "api_name": "os.walk", "line_number": 13, "usage_type": "call" }, { "api_name": "re.search", "line_number": 14, "usage_type": "call" }, { "api_name": "re.search", "line_number": 16, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 17, ...
44083632675
import gzip import inspect import os from io import StringIO from typing import Optional, List import numpy as np import pandas as pd def time_map(time_a: float, time_b: float, packet_a: int, packet_b: int, time_c: int, window_tolerance: int = 0) -> \ Optional[float]: """ Map an API time into a packet number. T...
llmhyy/malware-traffic
Experiments/exp16_visualisation/api_extraction.py
api_extraction.py
py
7,970
python
en
code
7
github-code
6
[ { "api_name": "typing.Optional", "line_number": 12, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 46, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 77, "usage_type": "attribute" }, { "api_name": "typing.List", ...
39626332335
import numpy as np from flask import Flask, request, render_template import pickle app = Flask(__name__) model = pickle.load(open('model.pkl', 'rb')) @app.route('/') def home(): return render_template("index.html") @app.route('/predict',methods=['POST']) def predict(): label = "" sepallength = re...
Karthicksaga/IRIS
app.py
app.py
py
938
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 5, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.request.form", ...
10422721293
from __future__ import annotations from enum import Enum from typing import TYPE_CHECKING, Any, TypeVar if TYPE_CHECKING: from collections.abc import Iterator T = TypeVar("T", bound=Enum) def iterate_enum(enum_class: type[T]) -> Iterator[T]: assert issubclass(enum_class, Enum) yield from enum_class d...
randovania/randovania
randovania/lib/enum_lib.py
enum_lib.py
py
739
python
en
code
165
github-code
6
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 6, "usage_type": "name" }, { "api_name": "typing.TypeVar", "line_number": 9, "usage_type": "call" }, { "api_name": "enum.Enum", "line_number": 9, "usage_type": "name" }, { "api_name": "enum.Enum", "line_numb...
32043413373
import getpass import datetime import urllib, urllib.request import os, sys from random import randint from shutil import copyfileobj from html.parser import HTMLParser #Time, Right Now. now = datetime.datetime.now() #Get local username UserName = getpass.getuser() #Define End-Of-Script Quit-Action def quitting_time...
milesnielsen/DownloadEpisodesTAL
TAL_Epi_Download.py
TAL_Epi_Download.py
py
13,624
python
en
code
0
github-code
6
[ { "api_name": "datetime.datetime.now", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 10, "usage_type": "attribute" }, { "api_name": "getpass.getuser", "line_number": 13, "usage_type": "call" }, { "api_name": "sys.exit...
19209409927
import re import nltk from nltk.tokenize import word_tokenize from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer # Dictionary mapping word contractions to their full words contractions = { "ain't": "are not","'s":" is","aren't": "are not", "can't": "cannot","can't've": "canno...
kelvinchumbe/Hotel-Review-Mining-and-Web-App
Hotel Review Mining/Web App Deployment/api/preprocessing_utils.py
preprocessing_utils.py
py
4,650
python
en
code
0
github-code
6
[ { "api_name": "nltk.corpus.stopwords.words", "line_number": 49, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords", "line_number": 49, "usage_type": "name" }, { "api_name": "nltk.stem.WordNetLemmatizer", "line_number": 60, "usage_type": "call" }, { "api...
71281284349
# mysql 테이블 생성 및 데이터 추가 import pandas as pd import pymysql xl_file = '/Users/JaehoByun/JB/_School/2021_2 데이터사이언스/과제및시험/score.xlsx' df = pd.read_excel(xl_file) conn = pymysql.connect(host='localhost', user='root', password='chunjay606', db='data_science') curs = conn.cursor(pymysql.cursors.DictCursor) ...
bjho606/python_school-data-science
score_assignment2.py
score_assignment2.py
py
1,130
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_excel", "line_number": 6, "usage_type": "call" }, { "api_name": "pymysql.connect", "line_number": 8, "usage_type": "call" }, { "api_name": "pymysql.cursors", "line_number": 9, "usage_type": "attribute" } ]
17635143913
from collections import Counter import pandas as pd def transform(new_subjects): list_keys = list(Counter(new_subjects).keys()) list_values = list(Counter(new_subjects).values()) df_keys = pd.DataFrame(list_keys, columns=['subject']) df_values = pd.DataFrame(list_values, columns=['frequency']) df...
ThomasKranz/arxiv_ETL
src/transformer.py
transformer.py
py
526
python
en
code
0
github-code
6
[ { "api_name": "collections.Counter", "line_number": 5, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 6, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 8, "usage_type": "call" }, { "api_name": "pandas.DataFram...
17650565567
import nltk from newspaper import Article # nltk.download('punkt') is a Python command that is used to download the "punkt" dataset or resource from the Natural Language Toolkit (NLTK) library. # NLTK is a popular library in Python for working with human language data, including tasks like tokenization, parsing, and...
AnukulSri/summarize-news-article
news.py
news.py
py
1,033
python
en
code
0
github-code
6
[ { "api_name": "nltk.download", "line_number": 10, "usage_type": "call" }, { "api_name": "newspaper.Article", "line_number": 12, "usage_type": "call" } ]
32259974513
### SPDX-License-Identifier: GPL-2.0-or-later """Parse phc2sys log messages""" import re from collections import namedtuple from .parser import (Parser, parse_decimal) class TimeErrorParser(Parser): """Parse time error from a phc2sys log message""" id_ = 'phc2sys/time-error' elems = ('timestamp', 'terr...
redhat-partner-solutions/vse-sync-pp
src/vse_sync_pp/parsers/phc2sys.py
phc2sys.py
py
1,846
python
en
code
0
github-code
6
[ { "api_name": "parser.Parser", "line_number": 11, "usage_type": "name" }, { "api_name": "collections.namedtuple", "line_number": 16, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 35, "usage_type": "call" }, { "api_name": "parser.parse_decimal"...
75275385466
from datetime import datetime from time import process_time # file = open(address, mood) # with open('oi.txt', 'r', encoding='utf-8') as file: # content = file.read() # print(content) with open('log.txt', 'w', encoding='utf-8') as file: file.write('Horários de log dos funcionários') # with open('log...
ewertonpereira/python
test/testing.py
testing.py
py
1,302
python
en
code
2
github-code
6
[ { "api_name": "time.process_time", "line_number": 25, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 28, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 28, "usage_type": "name" }, { "api_name": "time.proces...
38435402089
import json import pandas def read_json(filename: list) -> dict: try: with open(filename, "r") as f: data = json.loads(f.read()) except: raise Exception(f"Reading {filename} file encountered an error") return data def create_dataframe(data: str) -> pandas.Dat...
PrasadWakle/jsontocsv
jsontocsv.py
jsontocsv.py
py
2,340
python
en
code
0
github-code
6
[ { "api_name": "json.loads", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 19, "usage_type": "call" }, { "api_name": "pandas.json_normalize", "line_number": 25, "usage_type": "call" }, { "api_name": "pandas.json_normaliz...
11464353853
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jun 7 13:18:01 2022 @author: sampasmann """ import time import numpy as np from mpi4py import MPI from src.functions.save_data import SaveData from src.solvers.fixed_source.solvers import Picard from src.solvers.eigenvalue.maps import MatVec_data, MatV...
spasmann/iQMC
src/solvers/eigenvalue/solvers.py
solvers.py
py
14,940
python
en
code
2
github-code
6
[ { "api_name": "numpy.linalg.norm", "line_number": 32, "usage_type": "call" }, { "api_name": "numpy.linalg", "line_number": 32, "usage_type": "attribute" }, { "api_name": "mpi4py.MPI.COMM_WORLD", "line_number": 41, "usage_type": "attribute" }, { "api_name": "mpi4py...
27315049620
import facebook from wordcloud import WordCloud, STOPWORDS import matplotlib.pyplot as plt import random token='EAACEdEose0cBAHYBMbXyW9HwyJJIeCFBaWXEcLjsp3N0vB5HZApZCxqm7KQvVxb4fgF2ZA8nh625ZBJR3NzCMGc3ApU1MyZCYBwVF85LWxqdaEdt3cNVaS0y9CYsY4DDUjGcUeDZB0TMZBJwqdEBCZBClU00PeeMqnWmMpZCWCUFGmp12hZBZA3mLilYc45...
aparnamnn/ACM-Project
wordclouds.py
wordclouds.py
py
1,101
python
en
code
0
github-code
6
[ { "api_name": "facebook.GraphAPI", "line_number": 15, "usage_type": "call" }, { "api_name": "wordcloud.WordCloud", "line_number": 62, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.imshow", "line_number": 64, "usage_type": "call" }, { "api_name": "matplo...
35510723799
# Experiment 24 - Tile Movement # # By Chris Herborth (https://github.com/Taffer) # MIT license, see LICENSE.md for details. import base64 import os import pygame import pygame.freetype import pygame.gfxdraw import struct import sys import time import zlib from xml.etree import ElementTree SCREEN_TITLE = 'Experiment...
Taffer/pygame-experiments
24-tile-movement/main.py
main.py
py
14,875
python
en
code
2
github-code
6
[ { "api_name": "pygame.Color", "line_number": 23, "usage_type": "call" }, { "api_name": "pygame.Color", "line_number": 24, "usage_type": "call" }, { "api_name": "pygame.Color", "line_number": 25, "usage_type": "call" }, { "api_name": "xml.etree.ElementTree.parse", ...
4159403258
import math import random import vector3 from rtweekend import random_double import multiprocessing from multiprocessing import Process, Array from ctypes import c_char_p from color import write_color from vector3 import vec3, random_in_hemisphere from ray import ray import rtweekend from hittable import hit_record f...
mk2510/ray_tracing_project
raytracing_in_a_weekend/main.py
main.py
py
4,391
python
en
code
0
github-code
6
[ { "api_name": "vector3.vec3", "line_number": 25, "usage_type": "call" }, { "api_name": "random.random", "line_number": 27, "usage_type": "call" }, { "api_name": "random.random", "line_number": 28, "usage_type": "call" }, { "api_name": "color.write_color", "lin...
39485957424
"""Модуль базы данных хранящей пользователей и их историю""" import datetime as dt from typing import Optional import enum from functools import cached_property import sqlalchemy as sa from sqlalchemy import create_engine, select, ForeignKey from sqlalchemy.orm import ( Session, DeclarativeBase, Mapped, ...
DemidovEvg/async_chat
src/nano_async_chat/async_chat/server/db.py
db.py
py
4,316
python
en
code
0
github-code
6
[ { "api_name": "sqlalchemy.create_engine", "line_number": 19, "usage_type": "call" }, { "api_name": "sqlalchemy.orm.sessionmaker", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy.orm.DeclarativeBase", "line_number": 25, "usage_type": "name" }, { ...
8947958268
from django.db import models import ast class ListField(models.TextField): __metaclass__ = models.SubfieldBase description = "Stores a python list" def __init__(self, *args, **kwargs): super(ListField, self).__init__(*args, **kwargs) def to_python(self, value): if not value: ...
epkugelmass/USG-srv-dev
tigerapps/wintersession/models.py
models.py
py
3,678
python
en
code
null
github-code
6
[ { "api_name": "django.db.models.TextField", "line_number": 4, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 4, "usage_type": "name" }, { "api_name": "django.db.models.SubfieldBase", "line_number": 5, "usage_type": "attribute" }, { "...
70439517629
import pyautogui import cv2 as cv import numpy as np import keyboard import time from math import sqrt from PIL import ImageGrab import win32api, win32con # https://stackoverflow.com/questions/5906693/how-to-reduce-the-number-of-colors-in-an-image-with-opencv def kmeans_color_quantization(image, clusters=8, rounds=1):...
JirkaKlimes/gartic.io_bot
main.py
main.py
py
5,990
python
en
code
0
github-code
6
[ { "api_name": "numpy.zeros", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.float32", "line_number": 13, "usage_type": "attribute" }, { "api_name": "cv2.kmeans", "line_number": 21, "usage_type": "call" }, { "api_name": "cv2.TERM_CRITERIA_EPS", ...
21253145382
from django.shortcuts import render from django.views.generic import View #导入View from django.http import HttpResponse from django.http import HttpResponseRedirect from wanwenyc.settings import DJANGO_SERVER_YUMING,MEDIA_ROOT from .models import RdmAutoStatic,RdmStatic,RdmConfig # Create your views here. #根据数据库内容自动...
wawj901124/shangbaogongju
apps/reportdatas/views.py
views.py
py
4,480
python
en
code
0
github-code
6
[ { "api_name": "models.RdmAutoStatic.objects.get", "line_number": 12, "usage_type": "call" }, { "api_name": "models.RdmAutoStatic.objects", "line_number": 12, "usage_type": "attribute" }, { "api_name": "models.RdmAutoStatic", "line_number": 12, "usage_type": "name" }, ...
39795452637
# coding=utf-8 import requests import re import execjs import json from bs4 import BeautifulSoup import smtplib from email.mime.text import MIMEText from email.utils import formataddr sendAddress = '' emailPsw = '' receiveAddress = '' username = '' psw = '' def loadConfig(): with open('config.json', 'r', encodin...
mawangdan/XMUDaliyReport
src/main.py
main.py
py
6,736
python
en
code
15
github-code
6
[ { "api_name": "json.loads", "line_number": 21, "usage_type": "call" }, { "api_name": "email.mime.text.MIMEText", "line_number": 37, "usage_type": "call" }, { "api_name": "email.utils.formataddr", "line_number": 38, "usage_type": "call" }, { "api_name": "email.util...
17977750270
import asyncio import pickle import unittest from typing import AbstractSet, Any, Mapping, Sequence, Union from testing.types import ( Digits, I32List, Integers, SetI32, StringBucket, StrStrMap, easy, hard, ) from thrift.py3.common import Protocol from thrift.py3.exceptions import Error...
WeilerWebServices/Facebook
fbthrift/thrift/lib/py3/test/serializer.py
serializer.py
py
8,534
python
en
code
3
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 31, "usage_type": "attribute" }, { "api_name": "testing.types.easy", "line_number": 33, "usage_type": "call" }, { "api_name": "thrift.py3.serializer.serialize_with_header", "line_number": 34, "usage_type": "call" }, { ...
31132813401
from abc import ABC from collections import OrderedDict, defaultdict import torch import torch.nn.functional as F from torch import flatten from torch.nn import Module, Conv2d, Dropout, Linear, BatchNorm2d, ReLU, Sequential, MaxPool2d from torch.optim import Optimizer from torch.optim.lr_scheduler import LRScheduler f...
bnwiran/tinyml-benchmark
models/models.py
models.py
py
4,749
python
en
code
0
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 14, "usage_type": "name" }, { "api_name": "abc.ABC", "line_number": 14, "usage_type": "name" }, { "api_name": "torch.optim.Optimizer", "line_number": 23, "usage_type": "argument" }, { "api_name": "torch.optim.lr_sche...
16586269759
from flask import Blueprint, render_template from app.models import Post home = Blueprint('home', __name__) @home.route('/') def index(): posts = Post.query.filter_by(published=True).all() return render_template('home/index.html', posts=posts)
rg3915/flask-masterclass
app/blueprints/home_blueprint.py
home_blueprint.py
py
256
python
en
code
1
github-code
6
[ { "api_name": "flask.Blueprint", "line_number": 5, "usage_type": "call" }, { "api_name": "app.models.Post.query.filter_by", "line_number": 10, "usage_type": "call" }, { "api_name": "app.models.Post.query", "line_number": 10, "usage_type": "attribute" }, { "api_nam...
9411671299
from django.urls import path from . import views as blog_views # import users.views as user_views from .views import ( PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView, UserPostListView ) urlpatterns = [ path('', PostListView.as_view(), name='blog-home'), ...
Coniferish/djangoTutorial
blog/urls.py
urls.py
py
935
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 14, "usage_type": "call" }, { "api_name": "views.PostListView.as_view", "line_number": 14, "usage_type": "call" }, { "api_name": "views.PostListView", "line_number": 14, "usage_type": "name" }, { "api_name": "django...
30085050335
from django.shortcuts import render from django.http import JsonResponse from category.models import Category # Create your views here. def jsons(data = None, errorCode = 0, cookies = ''): if data is None: data = [] return JsonResponse({'errorCode': errorCode, 'data': data, 'cookies': cookies}) d...
jeremyytann/BUAA-SE-LetStudy
Code/backend/category/views.py
views.py
py
456
python
en
code
0
github-code
6
[ { "api_name": "django.http.JsonResponse", "line_number": 10, "usage_type": "call" }, { "api_name": "category.models.Category.objects.all", "line_number": 13, "usage_type": "call" }, { "api_name": "category.models.Category.objects", "line_number": 13, "usage_type": "attrib...
21424331672
''' 1. Парсер однопоточный. 2. Замер времени 3. Multiprocessing Pool 4. Замер времени 5. Экспорт в csv ''' import requests from bs4 import BeautifulSoup from datetime import datetime from multiprocessing import Pool import csv import time def get_html(url): r = requests.get(url) # Response re...
DexterAkaGrich/potential-couscous
first_meet.py
first_meet.py
py
1,849
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 17, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 23, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 37, "usage_type": "call" }, { "api_name": "csv.writer", "li...
29579809040
# -*- coding: utf-8 -*- """ Created on Fri Dec 7 11:04:13 2018 @author: Akitaka """ # 1:ライブラリのインポート-------------------------------- import numpy as np #numpyという行列などを扱うライブラリを利用 import pandas as pd #pandasというデータ分析ライブラリを利用 import matplotlib.pyplot as plt #プロット用のライブラリを利用 from sklearn import linear_model, metr...
nakanishi-akitaka/python2018_backup
1207/ml2b.py
ml2b.py
py
3,157
python
ja
code
5
github-code
6
[ { "api_name": "numpy.random.seed", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 18, "usage_type": "attribute" }, { "api_name": "numpy.random.randn", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.random",...
8629709747
from flask import Flask,request app = Flask(__name__) @app.route('/') def home(): return "Bem-Vindo" @app.route('/calculo') def add(): a = 10 b = 10 return str(a+b) if __name__ == '__main__': app.run()
kaibernu/MLDeploy
API.py
API.py
py
231
python
en
code
2
github-code
6
[ { "api_name": "flask.Flask", "line_number": 3, "usage_type": "call" } ]
39290687517
#!/usr/bin/env python2 from __future__ import print_function from Bio import SeqIO import sys, vcf, getopt __author__ = 'Kumar' sample_number = int(0) vcf_file = '' a = int(0) x = int(0) n = int(0) position = int(0) fold = int() try: myopts, args = getopt.getopt(sys.argv[1:],"f:s:") for o, a in myopts: if o == ...
kumarsaurabh20/NGShelper
PopulationGenomics/vcf2sf.py
vcf2sf.py
py
1,109
python
en
code
0
github-code
6
[ { "api_name": "getopt.getopt", "line_number": 18, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 18, "usage_type": "attribute" }, { "api_name": "getopt.GetoptError", "line_number": 24, "usage_type": "attribute" }, { "api_name": "sys.argv", "l...
71361812987
import sys import mysql.connector from awsglue.utils import getResolvedOptions params = [ 'db_host', 'db_port', 'db_user', 'db_password', 'db_database', 'ticket_id_to_be_updated' ] args = getResolvedOptions(sys.argv, params) cnx = mysql.connector.connect( host=args['db_host'], port=ar...
bhavik161/studio
rds/rds_upsert_data.py
rds_upsert_data.py
py
1,200
python
en
code
0
github-code
6
[ { "api_name": "awsglue.utils.getResolvedOptions", "line_number": 14, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 14, "usage_type": "attribute" }, { "api_name": "mysql.connector.connector.connect", "line_number": 16, "usage_type": "call" }, { "...
22020962951
from pathlib import Path import matplotlib.pyplot as plt import pandas as pd import rich import seaborn as sns import typer from boiling_learning.app.configuration import configure from boiling_learning.app.datasets.bridged.boiling1d import DEFAULT_BOILING_OUTLIER_FILTER from boiling_learning.app.datasets.preprocesse...
ruancomelli/boiling-learning
boiling_learning/app/studies/data_split.py
data_split.py
py
2,677
python
en
code
7
github-code
6
[ { "api_name": "typer.Typer", "line_number": 19, "usage_type": "call" }, { "api_name": "rich.console.Console", "line_number": 20, "usage_type": "call" }, { "api_name": "rich.console", "line_number": 20, "usage_type": "attribute" }, { "api_name": "boiling_learning.a...
22400150737
from PyQt5.QtWidgets import * from PyQt5.QtCore import pyqtSignal, pyqtSlot, QModelIndex,QItemSelectionModel from diz import * import sys from BD import Orm from dialog import Dialog from dizain1_2 import TwoWindow from dialog2 import Dialog2 bd = Orm() class InputDialog(QtWidgets.QDialog): def __init__(self, ro...
Vorlogg/BD
dizain.py
dizain.py
py
5,829
python
ru
code
0
github-code
6
[ { "api_name": "BD.Orm", "line_number": 10, "usage_type": "call" }, { "api_name": "dialog.Dialog", "line_number": 103, "usage_type": "call" }, { "api_name": "dialog2.Dialog2", "line_number": 119, "usage_type": "call" }, { "api_name": "PyQt5.QtCore.QModelIndex", ...
71365190588
import torch from torchvision import transforms from torch.autograd import Variable from dataset import DatasetFromFolder from model import Generator import utils import argparse import os parser = argparse.ArgumentParser() parser.add_argument('--dataset', required=False, default='facades', help='input dataset') parse...
togheppi/pix2pix
pix2pix_test.py
pix2pix_test.py
py
2,081
python
en
code
46
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path", "line_number": 24, "usage_type": "attribute" }, { "api_name": "os.mkdir", "l...
40319402697
from ansible.module_utils.basic import AnsibleModule from ansible_collections.ansibleguy.opnsense.plugins.module_utils.base.api import \ Session from ansible_collections.ansibleguy.opnsense.plugins.module_utils.base.cls import GeneralModule class General(GeneralModule): CMDS = { 'set': 'set', ...
ansibleguy/collection_opnsense
plugins/module_utils/main/frr_bgp_general.py
frr_bgp_general.py
py
1,066
python
en
code
158
github-code
6
[ { "api_name": "ansible_collections.ansibleguy.opnsense.plugins.module_utils.base.cls.GeneralModule", "line_number": 8, "usage_type": "name" }, { "api_name": "ansible.module_utils.basic.AnsibleModule", "line_number": 35, "usage_type": "name" }, { "api_name": "ansible_collections.a...
20861131743
import requests import os import wget import subprocess def update_mindustry(): global response global be_wrapper global current_build download_url = "https://github.com/Anuken/MindustryBuilds/releases/download/" + str(current_build) download_url = download_url + "/Mindustry-BE-Desktop-" + str(cu...
ILiekMelons/MindustryBELauncher
main.py
main.py
py
1,958
python
en
code
0
github-code
6
[ { "api_name": "os.system", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "wget.download", "line_number"...
20656199478
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Create a Milo input file from a frequency calculation. It must be a Gaussian 09 or 16 high-precision frequency calculation. You request this with '# freq=(hpmodes) ... '. """ import argparse import sys from milo_1_0_3 import atom from milo_1_0_3 import containers fr...
DanielEss-lab/milo
milo_1_0_3/tools/parse_frequencies.py
parse_frequencies.py
py
13,885
python
en
code
3
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 22, "usage_type": "call" }, { "api_name": "argparse.FileType", "line_number": 25, "usage_type": "call" }, { "api_name": "sys.stdin", "line_number": 26, "usage_type": "attribute" }, { "api_name": "argparse.Fil...
19250997206
import numpy as np import cv2 from matplotlib import pyplot as plt def SI(img, x, y, p): val = np.sum(img[y-p:y+p, x-p:x+p]) return min(max(val, 0), 255) #Read grayscale image and conversion to float64 img=np.float64(cv2.imread('../Image_Pairs/FlowerGarden2.png',0)) (h,w) = img.shape print("Image dimension:"...
gpspelle/image-mining
TP1/TP_Features_OpenCV/modified_Convolutions.py
modified_Convolutions.py
py
2,273
python
en
code
0
github-code
6
[ { "api_name": "numpy.sum", "line_number": 7, "usage_type": "call" }, { "api_name": "numpy.float64", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.getTickCount", "line_number...
32544533358
import json import glob from flask import Flask , send_file import os from flask_cors import CORS app = Flask (__name__) cors = CORS(app) @app.route('/') def DownloadMergedJson() -> str: result = {} logs = {} node_ids =[] for f in glob.glob(os.path.join("..", "history_*.json")): print(str(f)) ...
SiyiGuo/COMP90020
pythonproxy/getNodeData.py
getNodeData.py
py
648
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 7, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 8, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path.join", "line_number":...
33874326793
# 507/206 Homework 6 Part 2 import requests from bs4 import BeautifulSoup #### Part 2 #### print('\n*********** PART 2 ***********') print('Michigan Daily -- MOST READ\n') ### Your Part 2 solution goes here html = requests.get('https://www.michigandaily.com/').text soup = BeautifulSoup(html, 'html.parser') # searc...
xckou/SI507-HW06-xckou
hw6_part2.py
hw6_part2.py
py
762
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 12, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 13, "usage_type": "call" } ]
25144954100
import requests import collections import csv from bs4 import BeautifulSoup from bs4.element import Tag class ParseAnimals: def __init__(self) -> None: self.animals_names = {} def parse(self) -> None: """ Make a while loop until calegory letter != Я Saves each animal ...
enamsaraev/tetrika-test
task2/solution.py
solution.py
py
2,239
python
en
code
0
github-code
6
[ { "api_name": "collections.deque", "line_number": 26, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 36, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 37, "usage_type": "call" }, { "api_name": "bs4.element.Tag", ...
33273926923
from PDBParseBase import PDBParserBase #get_site_header_seq_info import time, os,datetime,logging,gzip,pickle #get_site_header_seq_info def mkdir(path): #Created uncompress path folder isExists=os.path.exists(path) if not isExists: os.makedirs(path) print(path + " Created folder suce...
Rio56/deeplearning
DTP_deeplearning/0618_新数据处理代码及文件/drug_target_data_0617.py
drug_target_data_0617.py
py
15,010
python
en
code
1
github-code
6
[ { "api_name": "os.path.exists", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number": 9, "usage_type": "call" }, { "api_name": "PDBParseBase.PDBParserBase", ...
20677953442
from django.test import TestCase from django.urls import reverse from apps.shop.models import Product from apps.users.models import CustomUser from .models import Order test_order = {"name": "Django Django", "email": "django@django.some", "paid": True} test_product = { "name": "Test Product", "abbr": "TEPR"...
akundev/akundotdev
apps/orders/tests.py
tests.py
py
2,822
python
en
code
0
github-code
6
[ { "api_name": "django.test.TestCase", "line_number": 23, "usage_type": "name" }, { "api_name": "models.Order.objects.create", "line_number": 29, "usage_type": "call" }, { "api_name": "models.Order.objects", "line_number": 29, "usage_type": "attribute" }, { "api_na...
24363848040
# This script should be executed inside a NetAddiction Odoo 9 shell. import json def remove_duplicate_attributes(product): seen_ids = set() duplicate_list = [] for attr in product.attribute_value_ids: if attr.attribute_id.id not in seen_ids: seen_ids.add(attr.attribute_id.id) ...
suningwz/netaddiction_addons
scripts/remove_duplicates_attribute.py
remove_duplicates_attribute.py
py
1,150
python
en
code
0
github-code
6
[ { "api_name": "json.dump", "line_number": 37, "usage_type": "call" } ]
44938119316
import numpy as np import redis import struct import cv2 import time import curved_paths_coords as pc from threading import Thread r = redis.Redis(host='192.168.0.101', port=6379, db=0) log_sensing_running =\ log_navigation_running =\ log_batterymeter_running =\ log_driving_running =\ log_detect_cam =\ voltages1_and_2...
julianx4/skippycar
test.py
test.py
py
8,784
python
en
code
3
github-code
6
[ { "api_name": "redis.Redis", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.FONT_HERSHEY_SIMPLEX", "line_number": 31, "usage_type": "attribute" }, { "api_name": "numpy.full", "line_number": 35, "usage_type": "call" }, { "api_name": "numpy.uint8", ...
73264679548
from pyglet.text import Label from audio import explosion from fonts.fonts import press_start_2p from interfaces.interface import Interface from system import system import menus.menu import menus.game_over_menu class GameOverInterface(Interface): game_over_label: Label = None game_over_menu: menus.menu.Men...
KimPalao/Headshot
interfaces/game_over_interface.py
game_over_interface.py
py
1,110
python
en
code
0
github-code
6
[ { "api_name": "interfaces.interface.Interface", "line_number": 12, "usage_type": "name" }, { "api_name": "pyglet.text.Label", "line_number": 13, "usage_type": "name" }, { "api_name": "menus.menu.menu", "line_number": 14, "usage_type": "attribute" }, { "api_name": ...
2600836089
# Import thư viện from sklearn.linear_model import LinearRegression import numpy as np import csv from vnstock import* data=[] cp=listing_companies() check='ngân hàng thương mại cổ phần' nh=[] for n in range(len(cp)): if check in cp.loc[n][2].lower(): nh.append(cp.loc[n][0]) print(len(nh)) for ticket in nh:...
vanvy102/code
Code-test/linear.py
linear.py
py
1,070
python
vi
code
0
github-code
6
[ { "api_name": "csv.reader", "line_number": 17, "usage_type": "call" }, { "api_name": "sklearn.linear_model.LinearRegression", "line_number": 28, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 37, "usage_type": "call" } ]