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
24222566552
from tkinter import* from PIL import Image ,ImageTk from tkinter import ttk from tkinter import messagebox import mysql.connector import urllib.request urllib.request.urlretrieve( 'https://iocl.com/images/indane_1.jpg', "indane1.png") urllib.request.urlretrieve( 'https://cdn5.newsnationtv.com/imag...
anonymouslyfadeditzme/Anonymously-Faded
booking.py
booking.py
py
19,472
python
en
code
0
github-code
6
[ { "api_name": "urllib.request.request.urlretrieve", "line_number": 8, "usage_type": "call" }, { "api_name": "urllib.request.request", "line_number": 8, "usage_type": "attribute" }, { "api_name": "urllib.request", "line_number": 8, "usage_type": "name" }, { "api_na...
2398607314
""" Makes a movie of the previously downloaded GEOS data """ import os import pathlib from typing import List, Tuple, Union import numpy as np import matplotlib.pyplot as plt import DownloadData import ReadNetCDF4 import VideoWriter plt.style.use('myDarkStyle.mplstyle') # ===========================...
dpilger26/GOES
scripts/MakeMovie.py
MakeMovie.py
py
7,699
python
en
code
1
github-code
6
[ { "api_name": "matplotlib.pyplot.style.use", "line_number": 15, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style", "line_number": 15, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 15, "usage_type": "name" }, { "api_na...
9754918030
import click import unittest from click.testing import CliRunner from doodledashboard.notifications import TextNotification from parameterized import parameterized from sketchingdev.console import ConsoleDisplay from tests.sketchingdev.terminal.ascii_terminal import AsciiTerminal class TestConsoleDisplayWithText(uni...
SketchingDev/Doodle-Dashboard-Display-Console
tests/sketchingdev/test_text_notification.py
test_text_notification.py
py
1,699
python
en
code
0
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 11, "usage_type": "attribute" }, { "api_name": "tests.sketchingdev.terminal.ascii_terminal.AsciiTerminal.extract_text", "line_number": 54, "usage_type": "call" }, { "api_name": "tests.sketchingdev.terminal.ascii_terminal.AsciiTerm...
72623372987
#!/usr/bin/python # -*- coding: utf-8 -*- import mock import unittest from cloudshell.networking.brocade.cli.brocade_cli_handler import BrocadeCliHandler from cloudshell.networking.brocade.runners.brocade_state_runner import BrocadeStateRunner class TestBrocadeStateRunner(unittest.TestCase): def setUp(self): ...
QualiSystems/cloudshell-networking-brocade
tests/networking/brocade/runners/test_brocade_state_runner.py
test_brocade_state_runner.py
py
1,123
python
en
code
0
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 11, "usage_type": "attribute" }, { "api_name": "mock.MagicMock", "line_number": 13, "usage_type": "call" }, { "api_name": "mock.MagicMock", "line_number": 14, "usage_type": "call" }, { "api_name": "mock.MagicMock",...
3277704581
import os from playwright.sync_api import sync_playwright key = "2731" os.makedirs(f"res/{key}", exist_ok=True) def main(): with sync_playwright() as p: browser = p.chromium.launch(headless=False, slow_mo= 5000) page = browser.new_page() page.goto("https://mri.cts-mrp.eu/portal/details?pro...
ReCodeRa/MRI_02
MRI/pw_down_sync_single_pdf.py
pw_down_sync_single_pdf.py
py
1,397
python
en
code
0
github-code
6
[ { "api_name": "os.makedirs", "line_number": 5, "usage_type": "call" }, { "api_name": "playwright.sync_api.sync_playwright", "line_number": 8, "usage_type": "call" } ]
33706250276
import sys from PySide2.QtWidgets import QApplication, QMainWindow, QGroupBox, QRadioButton aplicacao = QApplication(sys.argv) janela = QMainWindow() # setGeometry(esquerda, topo, largura, altura) janela.setGeometry( 100, 50, 300, 200 ) janela.setWindowTitle("Primeira Janela") # cria uma instancia de um grupo de sel...
leuribeiru/QtforPhyton
componentes_basicos/radio.py
radio.py
py
865
python
pt
code
1
github-code
6
[ { "api_name": "PySide2.QtWidgets.QApplication", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 4, "usage_type": "attribute" }, { "api_name": "PySide2.QtWidgets.QMainWindow", "line_number": 6, "usage_type": "call" }, { "api_name"...
22241072161
import torch import math import torch.nn as nn import torch.nn.functional as F from typing import List class Convolution(nn.Module): def __init__(self, in_ch, out_ch): super(Convolution, self).__init__() self.conv = nn.Sequential( nn.Conv2d(in_ch, out_ch, 3, 1, 1), nn.Batch...
yezi-66/IFE
unet_github/lib/Network.py
Network.py
py
7,331
python
en
code
26
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 8, "usage_type": "name" }, { "api_name": "torch.nn.Sequential", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.nn", "line_...
8381595021
from os import system import matplotlib import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.collections import PolyCollection from mpl_toolkits.axes_grid import make_axes_locatable ############################################################################## # matplotlib configur...
ngctnnnn/DRL_Traffic-Signal-Control
sumo-rl/sumo/tools/contributed/sumopy/agilepy/lib_misc/matplotlibtools.py
matplotlibtools.py
py
1,749
python
en
code
17
github-code
6
[ { "api_name": "matplotlib.rcParams.update", "line_number": 27, "usage_type": "call" }, { "api_name": "matplotlib.rcParams", "line_number": 27, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot.close", "line_number": 36, "usage_type": "call" }, { "api_n...
31932908131
from pyspark.ml.classification import NaiveBayes from pyspark.ml.evaluation import MulticlassClassificationEvaluator from pyspark.sql import SparkSession spark = SparkSession.builder.getOrCreate() spark.sparkContext.setLogLevel("ERROR") data = spark.read.format("libsvm").load("file:///usr/lib/spark/data/mllib/sample_...
geoffreylink/Projects
07 Machine Learning/SparkML/sparkML_CL_naivebayes.py
sparkML_CL_naivebayes.py
py
789
python
en
code
9
github-code
6
[ { "api_name": "pyspark.sql.SparkSession.builder.getOrCreate", "line_number": 5, "usage_type": "call" }, { "api_name": "pyspark.sql.SparkSession.builder", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pyspark.sql.SparkSession", "line_number": 5, "usage_type...
9736948830
import pickle import numpy as np import tensorflow as tf from sklearn.model_selection import train_test_split from sklearn.metrics import f1_score, accuracy_score from tensorflow import keras import matplotlib.pyplot as plt import tensorflow_addons as tfa import health_doc import matplotlib.pyplot as plt impo...
Szu-Chi/NLP_Final_Hierarchical_Transfer_Learning
BERT_multi_student.py
BERT_multi_student.py
py
4,067
python
en
code
0
github-code
6
[ { "api_name": "imp.reload", "line_number": 16, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 28, "usage_type": "call" }, { "api_name": "health_doc.loading", "line_number": 33, "usage_type": "call" }, { "api_name": "pickle.load", "line_num...
13042124891
# -*- coding: utf-8 -*- """ Created on Wed Dec 5 16:42:07 2018 @author: lud """ import matplotlib #import matplotlib.pyplot as plt matplotlib.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg # implement the default mpl key bindings from matplotlib.backend_bases im...
stevenluda/cuboidPlotter
PlotCuboids.py
PlotCuboids.py
py
4,848
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.use", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 37, "usage_type": "call" }, { "api_name": "numpy.ndarray", "line_numbe...
32713874308
import scrapy class KistaSpider(scrapy.Spider): name = "kista" def start_requests(self): urls = ['https://www.hemnet.se/bostader?location_ids%5B%5D=473377&item_types%5B%5D=bostadsratt', ] for url in urls: yield scrapy.Request(url=url, callback=self.parse) def parse(se...
theone4ever/hemnet
hemnet/spiders/kista_bostadsratt_spider.py
kista_bostadsratt_spider.py
py
547
python
en
code
0
github-code
6
[ { "api_name": "scrapy.Spider", "line_number": 4, "usage_type": "attribute" }, { "api_name": "scrapy.Request", "line_number": 11, "usage_type": "call" } ]
75177510266
import os import string import json from collections import namedtuple from sys import stdout from lex.oed.languagetaxonomy import LanguageTaxonomy from apps.tm.models import Lemma, Wordform, Definition, Language, ProperName from apps.tm.build import buildconfig LEMMA_FIELDS = buildconfig.LEMMA_FIELDS BlockData = nam...
necrop/wordrobot
apps/tm/build/lexicon/populatedb.py
populatedb.py
py
6,316
python
en
code
0
github-code
6
[ { "api_name": "apps.tm.build.buildconfig.LEMMA_FIELDS", "line_number": 11, "usage_type": "attribute" }, { "api_name": "apps.tm.build.buildconfig", "line_number": 11, "usage_type": "name" }, { "api_name": "collections.namedtuple", "line_number": 12, "usage_type": "call" ...
25018394942
import datetime import hashlib import json from urllib.parse import urlparse import requests from cryptography.hazmat.primitives import hashes, serialization from cryptography.hazmat.primitives.asymmetric import padding import config import crypto class Blockchain: def __init__(self, key_path=None): # I...
ivana-dodik/Blockchain
EP -- zadatak 03/bez master key/blockchain.py
blockchain.py
py
6,409
python
en
code
0
github-code
6
[ { "api_name": "crypto.load_private_key", "line_number": 28, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 34, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 34, "usage_type": "attribute" }, { "api_name": "...
33595739631
from flask import Flask, render_template, request, redirect, url_for from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from database_setup import Base, Movie app = Flask(__name__) engine = create_engine('sqlite:///books-collection.db?check_same_thread=False') Base.metadata.bind = engine DB...
mrSlavik22mpeitop/stepik_selenium
flask_app_mpei.py
flask_app_mpei.py
py
2,261
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "sqlalchemy.create_engine", "line_number": 8, "usage_type": "call" }, { "api_name": "database_setup.Base.metadata", "line_number": 9, "usage_type": "attribute" }, { "api_name": "d...
13749339342
import ROOT #from root_numpy import root2array, root2rec, tree2rec import pylab,numpy,pickle import matplotlib pylab.rcParams['font.size'] = 14.0 pylab.rcParams['axes.labelsize']=18.0 pylab.rcParams['axes.titlesize']=20.0 pylab.rcParams['ytick.labelsize']='large' pylab.rcParams['xtick.labelsize']='large' pylab.rcParam...
daughjd/bashscripts
PaperPlotter.py
PaperPlotter.py
py
11,938
python
en
code
0
github-code
6
[ { "api_name": "pylab.rcParams", "line_number": 6, "usage_type": "attribute" }, { "api_name": "pylab.rcParams", "line_number": 7, "usage_type": "attribute" }, { "api_name": "pylab.rcParams", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pylab.rcPara...
1482920507
# 从爬虫生成的Excel表格中读取数据并生成词云图 import os import sys import PIL import jieba import openpyxl import wordcloud import configparser import numpy as np import pandas as pd import matplotlib.pyplot as plt from collections import Counter from multiprocessing import Pool # 定义一些参数,参数的详细介绍见GitHub上的readme.md config_f...
AyaGuang/bilibili-Danmu-Crawler
102101430/generate_Cloud.py
generate_Cloud.py
py
5,425
python
zh
code
0
github-code
6
[ { "api_name": "openpyxl.load_workbook", "line_number": 24, "usage_type": "call" }, { "api_name": "openpyxl.utils", "line_number": 29, "usage_type": "attribute" }, { "api_name": "sys.exc_info", "line_number": 36, "usage_type": "call" }, { "api_name": "jieba.lcut", ...
16439987677
import math from datetime import datetime, timedelta from decimal import Decimal from financial.input import ( FinancialDataInput, FinancialStatisticsInput, NullFinancialDataInput, NullFinancialStatisticsInput, ) from financial.model import FinancialData, db class FinancialDataInputValidationService:...
pevenc12/python_assignment
financial/services.py
services.py
py
8,468
python
en
code
null
github-code
6
[ { "api_name": "datetime.datetime.now", "line_number": 24, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 24, "usage_type": "name" }, { "api_name": "datetime.timedelta", "line_number": 24, "usage_type": "call" }, { "api_name": "datetime.d...
4583110582
from __future__ import division from copy import deepcopy import torch from torch.autograd import Variable import torch.nn.functional as F device = torch.device("cuda" if torch.cuda.is_available() else "cpu") import numpy as np import torch def average_rule(keys, Temp_state_dict, neighbors): aggr_state_dict = {...
cbhowmic/resilient-adaptive-RL
aggregateMethods.py
aggregateMethods.py
py
9,022
python
en
code
0
github-code
6
[ { "api_name": "torch.device", "line_number": 8, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 8, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 8, "usage_type": "attribute" }, { "api_name": "copy.deepcopy", ...
22618188640
# encoding: utf-8 # pylint: disable=redefined-outer-name,missing-docstring import pytest from tests import utils from app import create_app @pytest.yield_fixture(scope='session') def flask_app(): app = create_app(flask_config='testing') from app.extensions import db with app.app_context(): db.c...
DurandA/pokemon-battle-api
tests/conftest.py
conftest.py
py
2,085
python
en
code
3
github-code
6
[ { "api_name": "app.create_app", "line_number": 12, "usage_type": "call" }, { "api_name": "app.app_context", "line_number": 15, "usage_type": "call" }, { "api_name": "app.extensions.db.create_all", "line_number": 16, "usage_type": "call" }, { "api_name": "app.exten...
12611135709
import pytest from utils import * from fireplace.exceptions import GameOver LORD_JARAXXUS = "EX1_323" LORD_JARAXXUS_HERO = "EX1_323h" LORD_JARAXXUS_WEAPON = "EX1_323w" INFERNO = "EX1_tk33" INFERNO_TOKEN = "EX1_tk34" def test_jaraxxus(): game = prepare_game(CardClass.WARRIOR, CardClass.WARRIOR) game.player1.hero....
jleclanche/fireplace
tests/test_jaraxxus.py
test_jaraxxus.py
py
3,302
python
en
code
645
github-code
6
[ { "api_name": "pytest.raises", "line_number": 124, "usage_type": "call" }, { "api_name": "fireplace.exceptions.GameOver", "line_number": 124, "usage_type": "argument" } ]
72474001467
import random import numpy as np from math import sqrt, log import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D x1_list = [] x2_list = [] y_list = [] counter = 0 def drawFunc(minX, minY, maxX, maxY, ax = None): #fig, ax = plt.subplots(subplot_kw={"projection": "3d"}) #ax.set_xlabel('x1') ...
AlexSmirno/Learning
6 Семестр/Оптимизация/Lab_6_grad.py
Lab_6_grad.py
py
7,739
python
en
code
0
github-code
6
[ { "api_name": "numpy.arange", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.arange", "line_numbe...
7357205248
import requests import json import nestConfig #AWS Constants url = nestConfig.get_URL() query = ''' mutation Mutation($id: String!) { checkIn(id: $id) { code message } } ''' def checkIn(nestID): #Ensure nest is connected to the backend content = json.dumps({'id':nestID}) #Assign nest name to be c...
EzequielRosario/ImperiumBinarium-Files
NestFunctions/HourlyCheckIn.py
HourlyCheckIn.py
py
642
python
en
code
0
github-code
6
[ { "api_name": "nestConfig.get_URL", "line_number": 6, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 18, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 20, "usage_type": "call" } ]
34836695873
#!/usr/bin/env python3 """Tools to define Templates. Templates are very similar to plugins, but use jinja to transform `.enbt` template files upon installation. """ __author__ = "Miguel Hernández-Cabronero" __since__ = "2021/08/01" import sys import argparse import inspect import os import glob import shutil import t...
miguelinux314/experiment-notebook
enb/plugins/template.py
template.py
py
9,816
python
en
code
3
github-code
6
[ { "api_name": "installable.InstallableMeta", "line_number": 24, "usage_type": "name" }, { "api_name": "installable.Installable", "line_number": 31, "usage_type": "name" }, { "api_name": "sys.argv", "line_number": 64, "usage_type": "attribute" }, { "api_name": "os....
6679634602
import numpy as np #import pandas as pd import matplotlib.pyplot as plt import argparse, sys import joblib import warnings warnings.filterwarnings('ignore') import torch import torch.nn as nn from torch.autograd import Variable import torchvision import torchvision.transforms as transforms from torch.util...
gdqb233/inm363
baseline.py
baseline.py
py
11,328
python
en
code
0
github-code
6
[ { "api_name": "warnings.filterwarnings", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.backends.cudnn.benchmark", "line_number": 17, "usage_type": "attribute" }, { "api_name": "torch.backends.cudnn", "line_number": 17, "usage_type": "name" }, { "a...
10862974654
""" Run the model end to end """ import argparse import sys import torch from pathlib import Path import pytorch_lightning as pl from pytorch_lightning.callbacks.early_stopping import EarlyStopping from pytorch_lightning.callbacks.model_checkpoint import ModelCheckpoint from smallteacher.data import DataModule, train...
SmallRobotCompany/smallteacher
smallssd/end_to_end.py
end_to_end.py
py
4,407
python
en
code
5
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 28, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 53, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 51, "usage_type": "name" }, { "api_name": "smallteacher.models...
6397362139
import sys from math import sqrt from itertools import compress # 利用byte求质数 def get_primes_3(n): """ Returns a list of primes < n for n > 2 """ sieve = bytearray([True]) * (n // 2) for i in range(3, int(n ** 0.5) + 1, 2): if sieve[i // 2]: sieve[i * i // 2::i] = bytearray((n - i * i -...
YuanG1944/COMP9021_19T3_ALL
9021 Python/review/mid-examples/2017S1_Sol/5.py
5.py
py
1,735
python
en
code
1
github-code
6
[ { "api_name": "itertools.compress", "line_number": 14, "usage_type": "call" }, { "api_name": "math.sqrt", "line_number": 18, "usage_type": "call" }, { "api_name": "doctest.testmod", "line_number": 58, "usage_type": "call" } ]
21480418170
from collections import namedtuple from functools import partial from itertools import count, groupby, zip_longest import bpy import numpy as np import re from .log import log, logd from .helpers import ( ensure_iterable, get_context, get_data_collection, get_layers_recursive, load_pro...
greisane/gret
operator.py
operator.py
py
21,651
python
en
code
298
github-code
6
[ { "api_name": "functools.partial", "line_number": 22, "usage_type": "call" }, { "api_name": "log.log", "line_number": 22, "usage_type": "argument" }, { "api_name": "re.compile", "line_number": 23, "usage_type": "call" }, { "api_name": "re.compile", "line_numbe...
16404587226
from ksz.src import plot import matplotlib.pyplot as plt data_path_list = [ '/data/ycli/dr12/galaxy_DR12v5_LOWZ_North_TOT_wMASS.dat', '/data/ycli/dr12/galaxy_DR12v5_LOWZ_South_TOT_wMASS.dat', '/data/ycli/dr12/galaxy_DR12v5_CMASS_North_TOT_wMASS.dat', '/data/ycli/dr12/galaxy_DR12v5_CMASS...
YichaoLi/pksz
plot_pipe/plot_stellar_mass.py
plot_stellar_mass.py
py
1,401
python
en
code
0
github-code
6
[ { "api_name": "ksz.src.plot.plot_halomass_hist", "line_number": 42, "usage_type": "call" }, { "api_name": "ksz.src.plot", "line_number": 42, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.show", "line_number": 47, "usage_type": "call" }, { "api_name": "m...
28153479584
import src.fileIO as io import src.chris as chris import src.filepaths as fp import src.analysis as anal import src.plotting as plot from pathlib import Path def batch_calculate_peak_wavelength(parent_directory, batch_name, file_paths, ...
jm1261/PeakFinder
batch_peakfinder.py
batch_peakfinder.py
py
4,669
python
en
code
0
github-code
6
[ { "api_name": "src.filepaths.update_batch_dictionary", "line_number": 38, "usage_type": "call" }, { "api_name": "src.filepaths", "line_number": 38, "usage_type": "name" }, { "api_name": "src.fileIO.read_GMR_file", "line_number": 43, "usage_type": "call" }, { "api_...
28610424615
from __future__ import annotations import json import subprocess import collections import concurrent.futures from os import path, system from datetime import datetime root_path = path.abspath("src/test_cases/UI") report_path = path.abspath("src/reports/concurrent_test_logs") def generate_pytest_commands(): conf...
huymapmap40/pytest_automation
src/config/parallel_test/run_parallel_test.py
run_parallel_test.py
py
2,068
python
en
code
1
github-code
6
[ { "api_name": "os.path.abspath", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "name" }, { "api_name": "os.path.abspath", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_number": ...
10528777232
import pygame from pygame.sprite import Sprite class Tiro(Sprite): """Class para manipular os tiros disparados pela nave""" def __init__(self, ik_game): """Cria um disparo na posição atual da nave""" super().__init__() self.screen = ik_game.screen self.configuracoes =...
ruansmachado/Invasao_Klingon
tiro.py
tiro.py
py
1,130
python
pt
code
0
github-code
6
[ { "api_name": "pygame.sprite.Sprite", "line_number": 5, "usage_type": "name" }, { "api_name": "pygame.Rect", "line_number": 15, "usage_type": "call" }, { "api_name": "pygame.draw.rect", "line_number": 33, "usage_type": "call" }, { "api_name": "pygame.draw", "l...
1040065850
import numpy as np import pandas as pd import operator from sklearn import preprocessing data = pd.read_csv("data.csv",header=None) min_max_scaler = preprocessing.MinMaxScaler(feature_range=(0,1)) def classify(v,k,distance): target_values = data.iloc[:,-1] nearest_neighbors = knn(data,k,v,distance) classificat...
egjimenezg/DataAnalysis
knn/knn.py
knn.py
py
2,364
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 6, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.MinMaxScaler", "line_number": 8, "usage_type": "call" }, { "api_name": "sklearn.preprocessing", "line_number": 8, "usage_type": "name" }, { "api_name": ...
25508690525
#!/usr/bin/env python3 import requests import os url = 'http://localhost/upload/' path = os.getcwd() + '/supplier-data/images/' only_jpeg = [] for file in os.listdir(path): name, ext = os.path.splitext(file) if ext == '.jpeg': only_jpeg.append(os.path.join(path,file)) for jpeg in only_jpeg: with open(jpe...
paesgus/AutomationTI_finalproject
supplier_image_upload.py
supplier_image_upload.py
py
393
python
en
code
0
github-code
6
[ { "api_name": "os.getcwd", "line_number": 7, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path.splitext", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12,...
9637017975
from selenium import webdriver from selenium.webdriver.edge.service import Service from selenium.webdriver.common.by import By from time import sleep class InternetSpeed: def __init__(self, edge_driver_path): self.driver = webdriver.Edge(service=Service(edge_driver_path)) self.down = 0 ...
na-lin/100-days-of-Python
Day51_Internet-Speed-Twitter-Complaint-Bot/internet_speed.py
internet_speed.py
py
1,309
python
en
code
0
github-code
6
[ { "api_name": "selenium.webdriver.Edge", "line_number": 9, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 9, "usage_type": "name" }, { "api_name": "selenium.webdriver.edge.service.Service", "line_number": 9, "usage_type": "call" }, { "a...
74432928827
""" This file is part of Candela. Candela is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Candela is distributed in the hope that it will b...
emmettbutler/candela
candela/shell.py
shell.py
py
21,960
python
en
code
71
github-code
6
[ { "api_name": "curses.initscr", "line_number": 50, "usage_type": "call" }, { "api_name": "textwrap.wrap", "line_number": 270, "usage_type": "call" }, { "api_name": "curses.KEY_UP", "line_number": 321, "usage_type": "attribute" }, { "api_name": "curses.KEY_DOWN", ...
15206966945
# -*- coding: utf-8 -*- """ Ventricular tachycardia, ventricular bigeminy, Atrial fibrillation, Atrial fibrillation, Ventricular trigeminy, Ventricular escape , Normal sinus rhythm, Sinus arrhythmia, Ventricular couplet """ import tkinter as tk import scipy.io as sio from PIL import Image, ImageTk class App(...
Sandovaljuan99/INMEDUMG
Cardiac arrhythmia simulator/IGPY.py
IGPY.py
py
4,934
python
es
code
1
github-code
6
[ { "api_name": "tkinter.Tk", "line_number": 20, "usage_type": "call" }, { "api_name": "tkinter.Frame", "line_number": 23, "usage_type": "call" }, { "api_name": "tkinter.Label", "line_number": 29, "usage_type": "call" }, { "api_name": "tkinter.IntVar", "line_num...
28558999835
from helper import is_prime, find_prime_factors, int_list_product def smallest_multiple(n): ls = list() for i in range(2,n): pf = find_prime_factors(i) for l in ls: for f in pf: if(l == f): pf.remove(f) break for f in ...
thejefftrent/ProjectEuler.py
5.py
5.py
py
436
python
en
code
0
github-code
6
[ { "api_name": "helper.find_prime_factors", "line_number": 7, "usage_type": "call" }, { "api_name": "helper.int_list_product", "line_number": 18, "usage_type": "call" } ]
42663501049
import os import torch import datetime import numpy as np import pandas as pd from src.attn_analysis import gradcam from src.attn_analysis import iou_analysis from src.attn_analysis import blue_heatmap from src.attn_analysis import extract_disease_reps from src.attn_analysis import make_2d_plot_and_3d_gif import warn...
rachellea/explainable-ct-ai
src/run_attn_analysis.py
run_attn_analysis.py
py
26,139
python
en
code
3
github-code
6
[ { "api_name": "warnings.filterwarnings", "line_number": 14, "usage_type": "call" }, { "api_name": "torch.device", "line_number": 138, "usage_type": "call" }, { "api_name": "os.path.isdir", "line_number": 146, "usage_type": "call" }, { "api_name": "os.path", "l...
27070910668
import datetime as dt import random import pytest from scheduler import Scheduler, SchedulerError from scheduler.base.definition import JobType from scheduler.threading.job import Job from ...helpers import foo @pytest.mark.parametrize( "empty_set", [ False, True, ], ) @pytest.mark.para...
DigonIO/scheduler
tests/threading/scheduler/test_sch_get_jobs.py
test_sch_get_jobs.py
py
2,720
python
en
code
51
github-code
6
[ { "api_name": "scheduler.Scheduler", "line_number": 39, "usage_type": "call" }, { "api_name": "helpers.foo", "line_number": 43, "usage_type": "argument" }, { "api_name": "datetime.datetime.now", "line_number": 43, "usage_type": "call" }, { "api_name": "datetime.da...
71548544188
import math import torch import numpy as np import torch.nn as nn import torch.nn.functional as F from torch.nn import init from collections import OrderedDict from modules import CompactBasicBlock, BasicBlock, Bottleneck, DAPPM, segmenthead, GhostBottleneck bn_mom = 0.1 BatchNorm2d = nn.BatchNorm2d class CompactDu...
himlen1990/cddrnet
utils/speed_test/cddrnet_eval_speed.py
cddrnet_eval_speed.py
py
8,667
python
en
code
1
github-code
6
[ { "api_name": "torch.nn.BatchNorm2d", "line_number": 11, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 11, "usage_type": "name" }, { "api_name": "torch.nn.Module", "line_number": 14, "usage_type": "attribute" }, { "api_name": "torch.nn", ...
968977222
import pyodbc import pandas as pd # Connection steps to the server from OnlineBankingPortalCSV2_code import Accounts, Customer server = 'LAPTOP-SELQSNPH' database = 'sai' username = 'maram' password = 'dima2k21' cnxn = pyodbc.connect('DRIVER={ODBC Driver 17 for SQL Server};SERVER='+server+';DATABASE='+database+';UID=...
divyamaram/Database-Managment-systems
OnlineBankingPortalCSV3_code.py
OnlineBankingPortalCSV3_code.py
py
4,255
python
en
code
0
github-code
6
[ { "api_name": "pyodbc.connect", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 15, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 18, "usage_type": "call" }, { "api_name": "pandas.merge", "l...
35035790893
import csv import json import numpy as np from tabulate import tabulate import matplotlib.pyplot as plt from math import ceil from wand.image import Image as WImage from subprocess import Popen def make_json(csvFilePath,keyName,alldata): # create a dictionary data = {} # Open a csv re...
miccec/ExomePipeline
interactPlots.py
interactPlots.py
py
4,422
python
en
code
0
github-code
6
[ { "api_name": "csv.DictReader", "line_number": 20, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 33, "usage_type": "call" }, { "api_name": "math.ceil", "line_number": 46, "usage_type": "call" }, { "api_name": "numpy.size", "line_number": 4...
28160427846
import asyncio from time import time from httpx import RequestError from loguru import logger from src.client import IteriosApiClient from src.exceptions import FailedResponseError from src.helpers import ( get_random_country, get_random_dep_city, get_search_start_payload, get_timing_results, setup_logger, ) ...
qwanysh/iterios-stress
start_search.py
start_search.py
py
2,281
python
en
code
0
github-code
6
[ { "api_name": "loguru.logger.info", "line_number": 17, "usage_type": "call" }, { "api_name": "loguru.logger", "line_number": 17, "usage_type": "name" }, { "api_name": "time.time", "line_number": 18, "usage_type": "call" }, { "api_name": "src.client.IteriosApiClien...
5838127346
from datetime import datetime from maico.sensor.stream import Confluence from maico.sensor.targets.human import Human from maico.sensor.targets.human_feature import MoveStatistics from maico.sensor.targets.first_action import FirstActionFeature import maico.sensor.streams.human_stream as hs class OneToManyStream(Conf...
tech-sketch/maico
maico/sensor/streams/one_to_many_stream.py
one_to_many_stream.py
py
2,289
python
en
code
0
github-code
6
[ { "api_name": "maico.sensor.stream.Confluence", "line_number": 9, "usage_type": "name" }, { "api_name": "maico.sensor.streams.human_stream.MoveStream", "line_number": 21, "usage_type": "call" }, { "api_name": "maico.sensor.streams.human_stream", "line_number": 21, "usage_...
11948273979
#!/usr/bin/python3.8 # -*- coding: utf-8 -*- # # SuperDrive # a live processing capable, clean(-ish) implementation of lane & # path detection based on comma.ai's SuperCombo neural network model # # @NamoDev # # ============================================================================ # # Parse arguments import os...
kaishijeng/SuperDrive
drive.py
drive.py
py
8,715
python
en
code
3
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 18, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 31, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 32, "usage_type": "attribute" }, { "api_name": "os.environ", ...
28039146623
#! /usr/bin/env python3 __author__ = 'Amirhossein Kargaran 9429523 ' import os import sys import socket import pickle import select import signal import threading import time from threading import Thread from datetime import datetime # Local modules from APIs.logging import Log from APIs.logging import Color from AP...
kargaranamir/Operating-Systems
Project II/Code/chatServer.py
chatServer.py
py
14,141
python
en
code
0
github-code
6
[ { "api_name": "filelock.FileLock", "line_number": 24, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 71, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 74, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_nu...
73357295548
from .MainDataToICS import MainDataToICS from .WebJWC import WebJWC import time import os from hashlib import md5 import random import json def getData(id,password): web = WebJWC(id,password) print('TOPO1') web.runDriver() time.sleep(1) print('TOPO2') web.loginIn() time.sleep(1) print('...
CQU-CSA/CQUScheduleCalendar
DjangoICS/CQUClassICS/src/MainICS.py
MainICS.py
py
1,500
python
en
code
0
github-code
6
[ { "api_name": "WebJWC.WebJWC", "line_number": 10, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 13, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 16, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 1...
37213848810
from collections import Counter, defaultdict import pandas as pd import os import csv import json # get phoneme features from PHOIBLE # note the path is resolved-phoible.csv that is corrected for mismatches between phonemes in PHOIBLE and the XPF Corpus phoneme_features = pd.read_csv("Data/resolved-phoible.csv") phone...
daniela-wiepert/XPF-soft-constraints
FD/Code/ngram_model_fd.py
ngram_model_fd.py
py
9,512
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 9, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 60, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 129, "usage_type": "call" }, { "api_name": "colle...
25538067967
import streamlit as st import pandas as pd import plotly.express as px import matplotlib.pyplot as plt import seaborn as sns sns.set_style("darkgrid") hide_st_style = """ <style> footer {visibility: hidden;} #MainMenu {visibility: hidden;} header {visi...
Somnathpaul/Olympic-data-analysis
main.py
main.py
py
6,253
python
en
code
0
github-code
6
[ { "api_name": "seaborn.set_style", "line_number": 7, "usage_type": "call" }, { "api_name": "streamlit.markdown", "line_number": 19, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 27, "usage_type": "call" }, { "api_name": "pandas.read_csv",...
29534323943
from scipy.interpolate import Rbf # radial basis functions import matplotlib.pyplot as plt import numpy as np x = [1555,1203,568,1098,397,564,1445,337,1658,1517,948] y = [860,206,1097,425,594,614,553,917,693,469,306] x = [0.9, 0.6, 0.1, 0.5, 0.04, 0.1, 0.82, 0.0, 1.0, 0.89, 0.46] y = [0.73, 0.0, 1.0, 0.24, 0.43, 0.45...
twilly27/DatacomProject
Project/HeatMapping.py
HeatMapping.py
py
795
python
en
code
0
github-code
6
[ { "api_name": "scipy.interpolate.Rbf", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.meshgrid", ...
35914457874
class Solution(object): # @param nestedList a list, each element in the list # can be a list or integer, for example [1,2,[1,2]] # @return {int[]} a list of integer def flatten(self, nestedList: list) -> list: import collections stack = collections.deque([nestedList]) result = [...
Super262/LintCodeSolutions
data_structures/stack/problem0022.py
problem0022.py
py
575
python
en
code
1
github-code
6
[ { "api_name": "collections.deque", "line_number": 8, "usage_type": "call" } ]
14807526088
import time import multiprocessing def work(): for i in range(10): print("工作中...") time.sleep(0.2) if __name__ == '__main__': work_process = multiprocessing.Process(target=work) work_process.daemon=True work_process.start() # 程序等待1秒 time.sleep(1) print("程序结束")
kids0cn/leetcode
Python语法/python多线程多进程/4.守护进程.py
4.守护进程.py
py
333
python
en
code
0
github-code
6
[ { "api_name": "time.sleep", "line_number": 7, "usage_type": "call" }, { "api_name": "multiprocessing.Process", "line_number": 10, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 15, "usage_type": "call" } ]
20495057760
import sys, iptc, re, socket single_options = False predesigned_rules = ['BlockIncomingSSH', 'BlockOutgoingSSH', 'BlockAllSSH', 'BlockIncomingHTTP', 'BlockIncomingHTTPS',\ 'BlockIncomingPing', 'BlockInvalidPackets', 'BlockSYNFlooding', 'BlockXMASAttack', 'ForceSYNPackets'] accepted_protocols = ['ah','egp','esp'...
syerbes/myFirewall
myFirewall.py
myFirewall.py
py
21,668
python
en
code
0
github-code
6
[ { "api_name": "iptc.Chain", "line_number": 30, "usage_type": "call" }, { "api_name": "iptc.Table", "line_number": 30, "usage_type": "call" }, { "api_name": "iptc.Rule", "line_number": 31, "usage_type": "call" }, { "api_name": "iptc.Target", "line_number": 37, ...
2254678822
import urllib from xml.dom import minidom import re def buildResponse(node_list): return_string = "" for i in node_list: return_string = return_string + i + "\n" return return_string.strip() def buildURL(key, word): return "http://www.dictionaryapi.com/api/v1/references/collegiate/xml/" + word + "?key=" + key ...
sarthfrey/Texty
dictionaryDef.py
dictionaryDef.py
py
819
python
en
code
9
github-code
6
[ { "api_name": "urllib.urlopen", "line_number": 16, "usage_type": "call" }, { "api_name": "xml.dom.minidom.parseString", "line_number": 17, "usage_type": "call" }, { "api_name": "xml.dom.minidom", "line_number": 17, "usage_type": "name" } ]
37530932561
from rest_framework.response import Response from rest_framework.decorators import api_view from rest_framework import status from curriculum.serializers.curriculum_serializers import SubjectLevelListSerializer, SubjectLevelSerializer, SubjectLevelWriteSerializer from rest_framework.exceptions import NotFound from rest...
markoco14/student-mgmt
curriculum/views/subject_level_views.py
subject_level_views.py
py
3,238
python
en
code
0
github-code
6
[ { "api_name": "rest_framework.views.APIView", "line_number": 15, "usage_type": "name" }, { "api_name": "curriculum.models.SubjectLevel.objects.all", "line_number": 21, "usage_type": "call" }, { "api_name": "curriculum.models.SubjectLevel.objects", "line_number": 21, "usag...
31484686923
import torch from models.conformer.activation import GLU, Swish class DepthWiseConvolution(torch.nn.Module): def __init__(self, in_channels, kernel_size, stride, padding): super(DepthWiseConvolution, self).__init__() self.conv = torch.nn.Conv1d(in_channels, in_channels, kernel_size, stride, paddin...
m-koichi/ConformerSED
src/models/conformer/convolution.py
convolution.py
py
1,709
python
en
code
25
github-code
6
[ { "api_name": "torch.nn", "line_number": 5, "usage_type": "attribute" }, { "api_name": "torch.nn.Conv1d", "line_number": 8, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number"...
18385696956
# Import the libraries import cv2 import os import numpy as np class Auxiliary(object): """ Class that provides some auxiliary functions. """ def __init__(self, size_x=100, size_y=100, interpolation=cv2.INTER_CUBIC): """ Set the default values for the image size and the interpolation...
kelvins/Reconhecimento-Facial
FaceRecognition/classes/auxiliary.py
auxiliary.py
py
9,896
python
en
code
20
github-code
6
[ { "api_name": "cv2.INTER_CUBIC", "line_number": 13, "usage_type": "attribute" }, { "api_name": "cv2.INTER_CUBIC", "line_number": 50, "usage_type": "attribute" }, { "api_name": "cv2.INTER_AREA", "line_number": 52, "usage_type": "attribute" }, { "api_name": "cv2.INT...
44295661280
import numpy as np from lib import EulerUtils as eu # Problem 36 solution! def checkIfNumberIsPalindromeInBothBases(number): numberString = str(number) baseTwoString = "{0:b}".format(number) if (eu.isPalindrome(numberString) and eu.isPalindrome(baseTwoString)): return True else: return...
Renoh47/ProjectEuler
project euler python/problem36.py
problem36.py
py
426
python
en
code
0
github-code
6
[ { "api_name": "lib.EulerUtils.isPalindrome", "line_number": 11, "usage_type": "call" }, { "api_name": "lib.EulerUtils", "line_number": 11, "usage_type": "name" } ]
70007062267
from typing import Any, Dict import os import json import httpx from odt.config import PipeConfig _TEMPFILENAME = "lgbm_tmp_model.txt" class ODTManager: def __init__(self, server_host: str) -> None: self.server_host = server_host def update_config(self, config: PipeConfig): # serialization...
Tsoubry/fast-lightgbm-inference
rust-transformer/python/odt/manage.py
manage.py
py
1,506
python
en
code
0
github-code
6
[ { "api_name": "odt.config.PipeConfig", "line_number": 16, "usage_type": "name" }, { "api_name": "json.loads", "line_number": 18, "usage_type": "call" }, { "api_name": "httpx.post", "line_number": 19, "usage_type": "call" }, { "api_name": "typing.Any", "line_nu...
36021205025
from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from sendQueries import SendQueriesHandler from ResponseHandler import ResponseHandler class HomeHandler(webapp.RequestHandler): def get(self): self.response.out.write("Hello!") appRoute = webapp.WSGIApplication( ...
stolksdorf/lifetracker
web/home.py
home.py
py
508
python
en
code
1
github-code
6
[ { "api_name": "google.appengine.ext.webapp.RequestHandler", "line_number": 7, "usage_type": "attribute" }, { "api_name": "google.appengine.ext.webapp", "line_number": 7, "usage_type": "name" }, { "api_name": "google.appengine.ext.webapp.WSGIApplication", "line_number": 11, ...
30827683895
import os import logging from novelwriter.enum import nwItemLayout, nwItemClass from novelwriter.error import formatException from novelwriter.common import isHandle, sha256sum logger = logging.getLogger(__name__) class NWDoc(): def __init__(self, theProject, theHandle): self.theProject = theProject ...
vaelue/novelWriter
novelwriter/core/document.py
document.py
py
7,928
python
en
code
null
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 8, "usage_type": "call" }, { "api_name": "novelwriter.common.isHandle", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 62, "usage_type": "call" }, { "api_name": "os.path", ...
12903245570
import faust import uuid app = faust.App( 'greetings', broker='kafka://localhost:9092', ) class Greeting(faust.Record, serializer='json', isodates=True): message: str uuid: str greetings_topic = app.topic('greetings', value_type=Greeting) @app.agent(greetings_topic) async def get_gr...
tyao117/faust-fastapi
faust_hello_world.py
faust_hello_world.py
py
747
python
en
code
0
github-code
6
[ { "api_name": "faust.App", "line_number": 4, "usage_type": "call" }, { "api_name": "faust.Record", "line_number": 10, "usage_type": "attribute" }, { "api_name": "uuid.uuid1", "line_number": 29, "usage_type": "call" } ]
17661406387
from collections import defaultdict, deque from enum import Enum def read(filename): with open(filename) as f: insts = (line.strip().split(' ') for line in f) return [(inst[0], tuple(inst[1:])) for inst in insts] def isint(exp): try: int(exp) return True except ValueError:...
pdhborges/advent-of-code
2017/18.py
18.py
py
2,447
python
en
code
0
github-code
6
[ { "api_name": "enum.Enum", "line_number": 21, "usage_type": "name" }, { "api_name": "collections.defaultdict", "line_number": 28, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 82, "usage_type": "call" }, { "api_name": "collections.deque...
1090949893
from keras.applications import resnet50 from keras.applications import mobilenetv2 from keras.applications import mobilenet from keras.applications import vgg19 # from keras_squeezenet import SqueezeNet import conv.networks.get_vgg16_cifar10 as gvc import conv.networks.gen_conv_net as gcn # import conv.networks.Mobile...
nitthilan/ml_tutorials
conv/networks/get_all_imagenet.py
get_all_imagenet.py
py
11,760
python
en
code
0
github-code
6
[ { "api_name": "keras.applications.resnet50.ResNet101", "line_number": 48, "usage_type": "call" }, { "api_name": "keras.applications.resnet50", "line_number": 48, "usage_type": "name" }, { "api_name": "keras.applications.mobilenetv2.MobileNetV2", "line_number": 53, "usage_...
24423662765
#! /usr/bin/env python3 from typing import Any, Dict import rospy import dynamic_reconfigure.server from example_package_with_dynamic_reconfig.cfg import ExampleDynamicParametersConfig def dynamic_reconfigure_callback(config: Dict[str, Any], level: Any) -> Dict[str, Any]: return config if __name__ == "__main__"...
keivanzavari/dynamic-reconfigure-editor
example/example_package_with_dynamic_reconfig/src/example_package_with_dynamic_reconfig/node.py
node.py
py
710
python
en
code
0
github-code
6
[ { "api_name": "typing.Dict", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 8, "usage_type": "name" }, { "api_name": "rospy.init_node", "line_number": 15, "usage_type": "call" }, { "api_name": "rospy.WARN", "line_number": ...
71971273469
import logging from kubernetes import client from kubernetes.client.models.v1_resource_requirements import V1ResourceRequirements from kubeflow.fairing.constants import constants logger = logging.getLogger(__name__) def get_resource_mutator(cpu=None, memory=None, gpu=None, gpu_vendor='nvidia'): """The mutator for...
kubeflow/fairing
kubeflow/fairing/kubernetes/utils.py
utils.py
py
5,342
python
en
code
336
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "kubernetes.client.models.v1_resource_requirements.V1ResourceRequirements", "line_number": 42, "usage_type": "call" }, { "api_name": "kubeflow.fairing.constants.constants.PVC_DEFAULT_MOUNT_...
20785922085
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('reviews.views', url(r'^$', 'home', name='home'), url(r'^courses/$', 'courses', name='courses'), url(r'^courses/find/$', 'find_course', name='find_course'), url(r'^...
aldeka/ClassShare
classshare/urls.py
urls.py
py
1,746
python
en
code
3
github-code
6
[ { "api_name": "django.contrib.admin.autodiscover", "line_number": 4, "usage_type": "call" }, { "api_name": "django.contrib.admin", "line_number": 4, "usage_type": "name" }, { "api_name": "django.conf.urls.defaults.patterns", "line_number": 6, "usage_type": "call" }, {...
16475584397
import sqlite3 from sqlite3 import Error class Data(): __error = None __result = None def __init__(self, db): try: self.con = sqlite3.connect(db, check_same_thread = False) self.cur = self.con.cursor() except Error as e: print(e) def clean_db(self):...
madePersonal/Android_forensic_tools
Data.py
Data.py
py
6,992
python
en
code
0
github-code
6
[ { "api_name": "sqlite3.connect", "line_number": 10, "usage_type": "call" }, { "api_name": "sqlite3.Error", "line_number": 12, "usage_type": "name" }, { "api_name": "sqlite3.Error", "line_number": 26, "usage_type": "name" }, { "api_name": "sqlite3.Error", "line...
3480167544
import json import boto3 from smart_open import smart_open, codecs from ConfigParser import ConfigParser import psycopg2 def publish_message(producerInstance, topic_name, key, value): "Function to send messages to the specific topic" try: producerInstance.produce(topic_name,key=key,value=value) ...
vikash4281/Corpus-Callosum
Ingestion/Streaming.py
Streaming.py
py
5,581
python
en
code
0
github-code
6
[ { "api_name": "ConfigParser.ConfigParser", "line_number": 20, "usage_type": "call" }, { "api_name": "psycopg2.connect", "line_number": 41, "usage_type": "call" }, { "api_name": "psycopg2.DatabaseError", "line_number": 53, "usage_type": "attribute" }, { "api_name":...
28193366899
from datetime import datetime, time import sys from time import sleep import datefunc def choose_date(now): datefunc.clear_terminal() option = input("Choose counter:\n 1 - time to pay,\n 2 - time to vacation,\n 3 - time to end of working day \n") datefunc.clear_terminal()\ if option == '1...
NikitaTymofeiev-dev/simpleApp
main.py
main.py
py
1,046
python
en
code
0
github-code
6
[ { "api_name": "datefunc.clear_terminal", "line_number": 8, "usage_type": "call" }, { "api_name": "datefunc.clear_terminal", "line_number": 10, "usage_type": "call" }, { "api_name": "datefunc.time_to_pay", "line_number": 14, "usage_type": "call" }, { "api_name": "d...
39620320183
from Folder_de_Testes.base import Fox_HEIGHT, Fox_WIDTH import pygame import random #Parametros gerais WIDTH = 880 HEIGHT = 400 gravity = 1 def randon_sizes_for_walls(xpos): protection = 200 altura = random.randint(200, 400) wall = Wall(False, xpos, altura) inversal_wall = Wall(True, xpos,HEIGHT - ...
RodrigoAnciaes/Flying_Fox_game
Folder_de_Testes/personagens.py
personagens.py
py
7,008
python
en
code
0
github-code
6
[ { "api_name": "random.randint", "line_number": 15, "usage_type": "call" }, { "api_name": "pygame.sprite", "line_number": 20, "usage_type": "attribute" }, { "api_name": "pygame.sprite.Sprite.__init__", "line_number": 24, "usage_type": "call" }, { "api_name": "pygam...
40787987363
## import libraries from tkinter import * from gtts import gTTS from playsound import playsound ################### Initialized window#################### root = Tk() root.geometry('350x300') root.resizable(0,0) root.config(bg = 'light yellow') root.title('DataFlair - TEXT_TO_SPEECH') ##heading ...
program444/HELIGA-TEKST-
Text-to-Speech.py
Text-to-Speech.py
py
1,453
python
en
code
0
github-code
6
[ { "api_name": "gtts.gTTS", "line_number": 42, "usage_type": "call" }, { "api_name": "playsound.playsound", "line_number": 44, "usage_type": "call" } ]
23917961666
from langchain.document_loaders import WebBaseLoader from langchain.document_loaders import PyPDFLoader from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain.embeddings import HuggingFaceEmbeddings from langchain.vectorstores import Chroma import os from langchain.chat_models import JinaChat...
luongthang0105/rag-cla
create_bot.py
create_bot.py
py
2,864
python
en
code
0
github-code
6
[ { "api_name": "langchain.document_loaders.WebBaseLoader", "line_number": 21, "usage_type": "call" }, { "api_name": "langchain.document_loaders.PyPDFLoader", "line_number": 23, "usage_type": "call" }, { "api_name": "langchain.text_splitter.RecursiveCharacterTextSplitter", "lin...
38486654704
from datetime import datetime, timezone, timedelta def stem(label: str, blacklist: list): ''' This function stems a given event label. Inputs: - label: single label to stem - blacklist: list of terms, that should be excluded from the label Return: stemmed label ''' parts = label.split...
bptlab/bpi-challenge-2020
src/util.py
util.py
py
2,829
python
en
code
4
github-code
6
[ { "api_name": "datetime.timedelta", "line_number": 56, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 62, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 77, "usage_type": "call" }, { "api_name": "datetime.datet...
70416777467
from multiprocessing import Value, Queue, Process from config import config from spider.HtmlCrawl import IpCrawl from usable.usable import usable from db.db_select import save_data def startProxyCrawl(queue,db_proxy_num): crawl = IpCrawl(queue,db_proxy_num) crawl.run() def validator(queue1,queue2): pass ...
queenswang/IpProxyPool
proxyspider.py
proxyspider.py
py
703
python
en
code
0
github-code
6
[ { "api_name": "spider.HtmlCrawl.IpCrawl", "line_number": 8, "usage_type": "call" }, { "api_name": "multiprocessing.Value", "line_number": 15, "usage_type": "call" }, { "api_name": "multiprocessing.Queue", "line_number": 16, "usage_type": "call" }, { "api_name": "c...
4495169101
# -*- coding: utf-8 -*- """ Tests for CSV Normalizer """ import csv from io import StringIO from _pytest.capture import CaptureFixture from pytest_mock import MockFixture from src.csv_normalizer import main def test_outputs_normalized_csv(mocker: MockFixture, capsys: CaptureFixture[str]) -> None: with open("tes...
felipe-lee/csv_normalization
tests/test_csv_normalizer.py
test_csv_normalizer.py
py
2,253
python
en
code
0
github-code
6
[ { "api_name": "pytest_mock.MockFixture", "line_number": 14, "usage_type": "name" }, { "api_name": "_pytest.capture.CaptureFixture", "line_number": 14, "usage_type": "name" }, { "api_name": "src.csv_normalizer.main", "line_number": 18, "usage_type": "call" }, { "ap...
29041072051
from flask import Flask, jsonify from datetime import datetime import requests from flask import request app = Flask(__name__) logs = [] @app.route("/list", methods=["POST"]) def list(): r = request.data.decode("utf-8") logs.append(r) return jsonify(success=True) @app.route("/usage.log") def home(): ...
maciejgrosz/containers_network_communication
loggerservice/loggerservice.py
loggerservice.py
py
390
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.request.data.decode", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.request.data", "line_number": 12, "usage_type": "attribute" }, { "api_name": "flask.re...
27215126875
import pytest from hbutils.system import telnet, wait_for_port_online @pytest.mark.unittest class TestSystemNetworkTelnet: def test_telnet(self): assert telnet('127.0.0.1', 35127) assert telnet('127.0.0.1', 35128) assert not telnet('127.0.0.1', 35129, timeout=1.0) def test_wait_for_p...
HansBug/hbutils
test/system/network/test_telnet.py
test_telnet.py
py
559
python
en
code
7
github-code
6
[ { "api_name": "hbutils.system.telnet", "line_number": 9, "usage_type": "call" }, { "api_name": "hbutils.system.telnet", "line_number": 10, "usage_type": "call" }, { "api_name": "hbutils.system.telnet", "line_number": 11, "usage_type": "call" }, { "api_name": "hbut...
43279150633
from django.contrib import admin from django.urls import path from . import views app_name = 'task' urlpatterns=[ # path('', views.index, name='index') path('', views.TasksView.as_view(), name='index'), path('addtask/', views.add_task, name='addtask'), path('remover/', views.remove_all_task, name='...
eh97979/Task-manager
task_project/task/urls.py
urls.py
py
456
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 11, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 12, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 13, "usage_type": "call" }, { "api_name": "django.urls.path",...
3705027331
import bitstring def shift_check( filename ): f = open(filename, 'rb') bits = bitstring.Bits( f ) f.close() bits_array = bitstring.BitArray( bits ) skip =8*3 for k in range(8): start = k + skip stop = start+ 200*8 shifted = bits_array[start:stop] byte_data = sh...
tj-oconnor/spaceheroes_ctf
forensics/forensics-rf-math/solve/shifty.py
shifty.py
py
583
python
en
code
13
github-code
6
[ { "api_name": "bitstring.Bits", "line_number": 5, "usage_type": "call" }, { "api_name": "bitstring.BitArray", "line_number": 7, "usage_type": "call" } ]
3232593391
import logging class LogDB: def __init__(self,fileName): self.fileName = fileName self.loglist = [] self.files = None self.final = {} def log(self, message=None ): FORMAT = '%(asctime)s %(message)s' logging.basicConfig(format=FORMAT, filename=self.fileName) ...
reza2002801/Torrent
logDB.py
logDB.py
py
1,524
python
en
code
0
github-code
6
[ { "api_name": "logging.basicConfig", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.warning", "line_number": 13, "usage_type": "call" } ]
71924390587
from setuptools import setup, find_packages from os.path import join name = 'menhir.simple.livesearch' version = '0.1' readme = open("README.txt").read() history = open(join("docs", "HISTORY.txt")).read() setup(name = name, version = version, description = 'Dolmen simple extension : livesearch', lon...
trollfot/menhir.simple.livesearch
setup.py
setup.py
py
1,479
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 7, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_number": 9, "usage_type": "call" }, { "api_name": "setuptools.find_packages", "line_number": 19, "usage_type": "call" } ]
28339877749
from itertools import product k,m = list(map(int,input().split())) arr = [] cart_prod = [] maxS=0 for _ in range(k): lstN = list(map(int,input().split()[1:])) arr.append(lstN) cart_prod = list(product(*arr)) for elem in cart_prod: sum1=0 for i in elem: sum1+=i**2 if sum1%m>maxS:...
t3chcrazy/Hackerrank
maximize-it.py
maximize-it.py
py
358
python
en
code
0
github-code
6
[ { "api_name": "itertools.product", "line_number": 9, "usage_type": "call" } ]
20538458179
# https://leetcode.com/problems/last-stone-weight/ """ Time complexity:- O(N logN) Space Complexity:- O(N) """ import heapq from typing import List class Solution: def lastStoneWeight(self, stones: List[int]) -> int: # Create a max heap (negate each element to simulate a min heap) h = [-x for x...
Amit258012/100daysofcode
Day60/last_stone_weight.py
last_stone_weight.py
py
844
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 13, "usage_type": "name" }, { "api_name": "heapq.heapify", "line_number": 16, "usage_type": "call" }, { "api_name": "heapq.heappop", "line_number": 21, "usage_type": "call" }, { "api_name": "heapq.heappop", "line_num...
74977721787
import logging import psycopg2 from dipper.sources.Source import Source LOG = logging.getLogger(__name__) class PostgreSQLSource(Source): """ Class for interfacing with remote Postgres databases """ files = {} def __init__( self, graph_type, are_bnodes_skole...
monarch-initiative/dipper
dipper/sources/PostgreSQLSource.py
PostgreSQLSource.py
py
6,689
python
en
code
53
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "dipper.sources.Source.Source", "line_number": 9, "usage_type": "name" }, { "api_name": "psycopg2.connect", "line_number": 63, "usage_type": "call" }, { "api_name": "psycopg...
4785885470
from collections import defaultdict, deque n = int(input()) d = defaultdict(list) for i in range(1, n): l = list(map(int, input().split())) now = 1 for j in range(i+1, n+1): d[i].append((j, l[now-1])) d[j].append((i, l[now-1])) now += 1 print(d) s = set() max = 0 def dfs(now, flg...
K5h1n0/compe_prog_new
abc318/d/main.py
main.py
py
570
python
en
code
0
github-code
6
[ { "api_name": "collections.defaultdict", "line_number": 4, "usage_type": "call" } ]
71992464828
import json # Đọc dữ liệu từ file input1.json và input2.json with open('input1.json', 'r', encoding='utf-8') as file1, open('input2.json', 'r', encoding='utf-8') as file2: data1 = json.load(file1) data2 = json.load(file2) # Tìm các cặp key có cùng giá trị trong cả hai file common_key_value_pairs = [] for key...
mminhlequang/python_tools
key_have_same_value/main.py
main.py
py
1,139
python
vi
code
0
github-code
6
[ { "api_name": "json.load", "line_number": 5, "usage_type": "call" }, { "api_name": "json.load", "line_number": 6, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 32, "usage_type": "call" } ]
8743120221
import pandas as pd #pandas是强大的分析结构化数据的工具集 as是赋予pandas别名 from matplotlib import pyplot as plt #2D绘图库,通过这个库将数据绘制成各种2D图形(直方图,散点图,条形图等) #全国哪一个城市地铁线最多 def subline_count(): df1 = df.iloc[:, :-1] #筛选前三列 df是下面main读取的 df2 = df1.drop_duplicates(subset=['city', 'subwayline']) # 去重 # ...
rlxy/python
爬虫/数据分析/城市地铁数量排行榜/analysis.py
analysis.py
py
1,315
python
zh
code
0
github-code
6
[ { "api_name": "matplotlib.pyplot.savefig", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 12, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.show", "line_number": 13, "usage_type": "call" }, { "api_name": "ma...
71168432827
''' This project is a GUI calculator for a high yield savings account. The GUI will display 4 input boxes. An intial deposit, monthly deposit, APY yield, and years to calculate The result will be a number at the end of the year, as well as a graph that displays the growth of the account. Possible extras could incl...
MaxC1880/HYSAcalculator
HYSAcalculator.py
HYSAcalculator.py
py
6,918
python
en
code
0
github-code
6
[ { "api_name": "tkinter.Tk", "line_number": 16, "usage_type": "call" }, { "api_name": "tkinter.Canvas", "line_number": 20, "usage_type": "call" }, { "api_name": "tkinter.Label", "line_number": 24, "usage_type": "call" }, { "api_name": "tkinter.StringVar", "line...
5469847519
import os import numpy as np from datetime import datetime import time from Utils import _add_loss_summaries from model import * #from augmentation import pre_process_image NUM_EXAMPLES_PER_EPOCH_FOR_TRAIN = 367 NUM_EXAMPLES_PER_EPOCH_FOR_TEST = 101 NUM_EXAMPLES_PER_EPOCH_FOR_EVAL = 1 TEST_ITER = 200 # ceil(NUM_EXAM...
mohbattharani/Segmentation_
SegNet/train.py
train.py
py
7,704
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.colors.Normalize", "line_number": 20, "usage_type": "call" }, { "api_name": "matplotlib.colors", "line_number": 20, "usage_type": "attribute" }, { "api_name": "matplotlib.cm.get_cmap", "line_number": 21, "usage_type": "call" }, { "api_nam...
19580309816
import pytest from torch.optim import RMSprop as _RMSprop from neuralpy.optimizer import RMSprop @pytest.mark.parametrize( "learning_rate, alpha, eps, weight_decay, momentum, centered", [ (-6, 0.001, 0.001, 0.001, 0.001, False), (False, 0.001, 0.001, 0.001, 0.001, False), ("invalid", 0...
imdeepmind/NeuralPy
tests/neuralpy/optimizer/test_rmsprop.py
test_rmsprop.py
py
3,352
python
en
code
78
github-code
6
[ { "api_name": "pytest.raises", "line_number": 28, "usage_type": "call" }, { "api_name": "neuralpy.optimizer.RMSprop", "line_number": 29, "usage_type": "call" }, { "api_name": "pytest.mark.parametrize", "line_number": 6, "usage_type": "call" }, { "api_name": "pytes...
38470272604
import collections def flatten_path(nested, parent_key=()): items = [] for k, v in nested.items(): new_key = parent_key + (k,) if isinstance(v, collections.abc.MutableMapping): items.extend(flatten_path(v, new_key).items()) else: items.append((new_key, v)) r...
BRGM/inept
inept/utils.py
utils.py
py
439
python
en
code
1
github-code
6
[ { "api_name": "collections.abc", "line_number": 8, "usage_type": "attribute" } ]
35945080718
import json import csv filename = 'data/predictions/test_prediction_RD_15_0.00003_4_finnum_5_bertuncase.csv' j = 0 predictions = [] with open(filename, 'r') as csvfile: datareader = csv.reader(csvfile) for row in datareader: j += 1 if j == 1: continue new_row = [] new_...
MikeDoes/ETH_NLP_Project
predictions_to_json.py
predictions_to_json.py
py
1,144
python
en
code
0
github-code
6
[ { "api_name": "csv.reader", "line_number": 8, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 36, "usage_type": "call" } ]
43348614388
from scrabzl import Word, Dictionary import unicodedata def strip_accents(text): try: text = unicode(text, 'utf-8') except NameError: # unicode is a default on python 3 pass text = unicodedata.normalize('NFD', text)\ .encode('ascii', 'ignore')\ .decode("utf-8") ...
charleswilmot/scrabzl
src/create_dictionary.py
create_dictionary.py
py
1,733
python
en
code
0
github-code
6
[ { "api_name": "unicodedata.normalize", "line_number": 11, "usage_type": "call" }, { "api_name": "scrabzl.Word", "line_number": 35, "usage_type": "call" }, { "api_name": "scrabzl.Dictionary", "line_number": 38, "usage_type": "call" }, { "api_name": "argparse.Argume...
36942726510
from PIL import Image myImg = Image.open('Image1.jpg') newImg = myImg.convert('L') print("Do you want your ", myImg, "converted to GRY?") print("Type: y or n") answer = str(input("y or n?: ")) if answer == "y": newImg.show() newImg.save('Image1_Grayscale.jpg') if answer == "n": myImg.show()
Sir-Lance/CS1400
EX7-3.py
EX7-3.py
py
304
python
en
code
0
github-code
6
[ { "api_name": "PIL.Image.open", "line_number": 2, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 2, "usage_type": "name" } ]
13231283002
""" @Author : Hirsi @ Time : 2020/7/3 """ """ 思路(线程池) 1.定义变量,保存源文件夹,目标文件夹所在的路径 2.在目标路径创建新的文件夹 3.获取源文件夹中所有的文件(列表) 4.便利列表,得到所有的文件名 5.定义函数,进行文件拷贝 文件拷贝函数 参数(源文件夹路径,目标文件夹路径,文件名) 1.拼接源文件和目标文件的具体路径 2.打开源文件,创建目标文件 3.读取源文件的内容,写入到目标文件中(while) """ import os import multiprocessing ...
gitHirsi/PythonNotes02
day07-多任务-进程/10-文件夹拷贝器_多进程版.py
10-文件夹拷贝器_多进程版.py
py
2,139
python
zh
code
0
github-code
6
[ { "api_name": "multiprocessing.current_process", "line_number": 24, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 35, "usage_type": "call" }, { "api_name": "os.mkdir", "line_number": 46, "usage_type": "call" }, { "api_name": "os.listdir", ...
23706350056
#!/usr/bin/env python """Plot sky positions onto an Aitoff map of the sky. Usage: %s <filename>... [--racol=<racol>] [--deccol=<deccol>] [--mjdcol=<mjdcol>] [--filtercol=<filtercol>] [--expnamecol=<expnamecol>] [--commentcol=<commentcol>] [--usepatches] [--alpha=<alpha>] [--outfile=<outfile>] [--tight] [--delimiter=...
genghisken/gkplot
gkplot/scripts/skyplot.py
skyplot.py
py
15,360
python
en
code
0
github-code
6
[ { "api_name": "sys.argv", "line_number": 29, "usage_type": "attribute" }, { "api_name": "matplotlib.colors", "line_number": 47, "usage_type": "name" }, { "api_name": "gkutils.commonutils.sexToDec", "line_number": 91, "usage_type": "call" }, { "api_name": "gkutils....
27773482180
import threading from sqlalchemy import Column, UnicodeText, Integer from telepyrobot.db import BASE, SESSION from telepyrobot.utils.msg_types import Types class Notes(BASE): __tablename__ = "self_notes" user_id = Column(Integer, primary_key=True) name = Column(UnicodeText, primary_key=True) value = C...
Divkix/TelePyroBot
telepyrobot/db/notes_db.py
notes_db.py
py
3,140
python
en
code
40
github-code
6
[ { "api_name": "telepyrobot.db.BASE", "line_number": 7, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 9, "usage_type": "call" }, { "api_name": "sqlalchemy.Integer", "line_number": 9, "usage_type": "argument" }, { "api_name": "sqlalchemy....
36339047472
import csv from datetime import datetime import random Header=["Time","Sample number","Temperature","Humidity","Sensor response", "PM response", "Temperature MFC"] dataLine=["","","","","","",""] with open('main.csv','w') as main: csv_writer=csv.writer(main, delimiter=",") csv_writer.writerow(Header) #csv_writer.wr...
Virgile-Colrat/YFA-Project_python_interface
Sources/testcs.py
testcs.py
py
723
python
en
code
0
github-code
6
[ { "api_name": "csv.writer", "line_number": 7, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 12, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 12, "usage_type": "name" }, { "api_name": "random.randint", ...