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
21931579875
# -*- coding: utf-8 -*- import scrapy import requests import os class TukuspiderSpider(scrapy.Spider): name = 'tukuspider' allowed_domains = ['www.tuku.cc'] custom_settings = { "USER_AGENT": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36", ...
gabcga/tuku
tuku/spiders/tukuspider.py
tukuspider.py
py
1,844
python
en
code
0
github-code
71
[ { "api_name": "scrapy.Spider", "line_number": 8, "usage_type": "attribute" }, { "api_name": "scrapy.Request", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 38, "usage_type": "call" }, { "api_name": "os.path", "line_n...
73620162791
import pygame from Block import Block from settings import * from typing import Tuple class Sudoku: board = [ [7, 8, 0, 4, 0, 0, 1, 2, 0], [6, 0, 0, 0, 7, 5, 0, 0, 9], [0, 0, 0, 6, 0, 1, 0, 7, 8], [0, 0, 7, 0, 4, 0, 2, 6, 0], [0, 0, 1, 0, 5, 0, 9, 3, 0], [9, 0, 4, 0...
Deadshot96/Sudoku-Solver-GUI
Grid.py
Grid.py
py
7,966
python
en
code
0
github-code
71
[ { "api_name": "pygame.init", "line_number": 38, "usage_type": "call" }, { "api_name": "pygame.font.init", "line_number": 39, "usage_type": "call" }, { "api_name": "pygame.font", "line_number": 39, "usage_type": "attribute" }, { "api_name": "pygame.display.set_mode...
71086611751
#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from util import get_data100k,read_process,get_edgelist,pa_index import networkx as nx from networkx.algorithms import bipartite import numpy as np import pandas as pd import ti...
dxlabskku/iMovieRec
graphrec_image.py
graphrec_image.py
py
11,043
python
en
code
1
github-code
71
[ { "api_name": "util.get_data100k", "line_number": 29, "usage_type": "call" }, { "api_name": "util.pa_index", "line_number": 32, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 36, "usage_type": "call" }, { "api_name": "numpy.arange", "l...
73263864228
import hashlib import json from http import HTTPStatus from fastapi import Request from fastapi.param_functions import Query from lnurl.types import LnurlPayMetadata from fastapi.exceptions import HTTPException from fastapi.responses import HTMLResponse from lnbits.core.services import create_invoice from . import d...
arcbtc/donations
lnurl.py
lnurl.py
py
2,332
python
en
code
0
github-code
71
[ { "api_name": "fastapi.Request", "line_number": 20, "usage_type": "name" }, { "api_name": "crud.get_donation", "line_number": 21, "usage_type": "call" }, { "api_name": "fastapi.exceptions.HTTPException", "line_number": 23, "usage_type": "call" }, { "api_name": "ht...
18175293649
# CoC Discord Bot. # Mainly created to improve API/Discord Bot knowledge. Improving python alongside. # imports for coc scripts import coc import os # imports for discord bot from discord.ext import commands # imports for data handling and gathering import pandas as pd from datetime import datetime, timedelta from ...
Blackiecat12/CoC-Discord-Bot
CoC-Discord-Bot.py
CoC-Discord-Bot.py
py
5,079
python
en
code
1
github-code
71
[ { "api_name": "dotenv.load_dotenv", "line_number": 17, "usage_type": "call" }, { "api_name": "coc.login", "line_number": 18, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 19, "usage_type": "call" }, { "api_name": "os.getenv", "line_number":...
5779945623
import pandas as pd from nltk.tokenize import NLTKWordTokenizer from nltk.stem import WordNetLemmatizer import nltk from nltk.corpus import wordnet from nltk.corpus import stopwords import json import string from math import floor # naming convention: preprocessing_<W|C>[L][S][P][H<cutoff>] # W: with words # C: wi...
kobutri/pg_knowledge_discovery_ml
preprocessing.py
preprocessing.py
py
6,535
python
en
code
0
github-code
71
[ { "api_name": "json.load", "line_number": 97, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 98, "usage_type": "call" }, { "api_name": "pandas.Series", "line_number": 100, "usage_type": "attribute" }, { "api_name": "pandas.Series", "l...
72954413670
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('triumph_app', '0003_auto_20171115_0403'), ] operations = [ migrations.AlterField( model_name='challenge', ...
askarpenko7/triumph
triumph_project/triumph_app/migrations/0004_auto_20171115_0420.py
0004_auto_20171115_0420.py
py
537
python
en
code
0
github-code
71
[ { "api_name": "django.db.migrations.Migration", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.migrations.AlterField", "line_number": 14, "usage_type": "call" }, {...
71535100070
import requests from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.select import Select...
JrReubinJr/igFollowersScrapper
proxies.py
proxies.py
py
1,551
python
en
code
0
github-code
71
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 11, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 11, "usage_type": "name" }, { "api_name": "selenium.webdriver.support.ui.WebDriverWait", "line_number": 18, "usage_type": "call" }, ...
34816174160
import os from typing import Dict, Optional, Union, Tuple import torch import torch.nn as nn import torch.optim as optim def get_device( device_type: str, device_index: Optional[Union[int, Tuple[int, ...]]] = None ) -> torch.device: if device_type == "cpu": return torch.device(device_type) elif...
aysaac/twitter_news
utils/factories.py
factories.py
py
1,340
python
en
code
1
github-code
71
[ { "api_name": "typing.Optional", "line_number": 12, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 12, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 12, "usage_type": "name" }, { "api_name": "torch.device", "line_nu...
17842239279
from django.shortcuts import render, redirect from .models import * from authapp.models import Master_Table, Service_Provider, User from userapp.models import Request_Details, User_Query from .util import * # Page rendering def Index(request): return My_Request(request) # Adding garage details def AddGarageDetail...
mcbiswas24/garage_finder
providerapp/views.py
views.py
py
4,534
python
en
code
0
github-code
71
[ { "api_name": "authapp.models.Master_Table.objects.get", "line_number": 19, "usage_type": "call" }, { "api_name": "authapp.models.Master_Table.objects", "line_number": 19, "usage_type": "attribute" }, { "api_name": "authapp.models.Master_Table", "line_number": 19, "usage_...
31867694750
#!/usr/bin/env python # coding: utf-8 # In[ ]: #Libraries importing: import findspark findspark.init() findspark.find() import pyspark findspark.find() from operator import add from pyspark import SparkContext, SparkConf from pyspark.sql import SparkSession import pandas as pd #Opening PySpark Session: conf = pyspa...
MirkoGaslini/InformationRetrieval-PageRank
PageRankFinal.py
PageRankFinal.py
py
8,164
python
en
code
0
github-code
71
[ { "api_name": "findspark.init", "line_number": 9, "usage_type": "call" }, { "api_name": "findspark.find", "line_number": 10, "usage_type": "call" }, { "api_name": "findspark.find", "line_number": 12, "usage_type": "call" }, { "api_name": "pyspark.SparkConf", "...
13333175110
# -*- coding: utf-8 -*- # nn_benchmark # author - Quentin Ducasse # https://github.com/QDucasse # quentin.ducasse@ensta-bretagne.org import sys import torch from nn_benchmark.core import Exporter from nn_benchmark.networks import QuantTFC if __name__ == "__main__": acq_list = [2, 3, 4, 5, 6, 7, 8, 16, 32] we...
QDucasse/nn_benchmark
nn_benchmark/export_experiments.py
export_experiments.py
py
1,489
python
en
code
23
github-code
71
[ { "api_name": "nn_benchmark.core.Exporter", "line_number": 18, "usage_type": "call" }, { "api_name": "nn_benchmark.networks.QuantTFC", "line_number": 28, "usage_type": "call" }, { "api_name": "torch.load", "line_number": 30, "usage_type": "call" } ]
10998206775
from typing import List from topsdk.client import BaseRequest from topsdk.util import convert_struct_list,convert_basic_list,convert_struct,convert_basic from datetime import datetime class TaobaoWlbWmsInventoryQueryRequest(BaseRequest): def __init__( self, page_size: int = None, page_no:...
LIANGCYRUS/TopApiSite
apps/topsdk/ability232/request/taobao_wlb_wms_inventory_query_request.py
taobao_wlb_wms_inventory_query_request.py
py
6,334
python
en
code
0
github-code
71
[ { "api_name": "topsdk.client.BaseRequest", "line_number": 7, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 14, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 15, "usage_type": "name" }, { "api_name": "datetime...
18732693842
import openpyxl import datetime from openpyxl.utils.cell import get_column_letter workbook = openpyxl.load_workbook(filename="testMKTCAPCashBalanceCPJAN18.xlsx") sheet = workbook["CashBalanceJAN18"] number_rows = sheet.max_row number_columns = sheet.max_column CURRENTDATE = "03/09/2021" ####################### def f...
mickyngub/stockCashBalanceData
findPrice.py
findPrice.py
py
22,923
python
en
code
0
github-code
71
[ { "api_name": "openpyxl.load_workbook", "line_number": 6, "usage_type": "call" }, { "api_name": "datetime.datetime.strptime", "line_number": 20, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 20, "usage_type": "attribute" }, { "api_name"...
34871725439
import os import logging import string import platform import csv from io import TextIOWrapper from glycan_profiling import serialize from glycan_profiling.serialize import ( Protein, Glycopeptide, IdentifiedGlycopeptide, func, MSScan, GlycopeptideSpectrumMatch) from glycan_profiling.task import TaskBase from...
mobiusklein/glycresoft
src/glycan_profiling/output/annotate_spectra.py
annotate_spectra.py
py
7,604
python
en
code
7
github-code
71
[ { "api_name": "logging.getLogger", "line_number": 30, "usage_type": "call" }, { "api_name": "string.ascii_letters", "line_number": 38, "usage_type": "attribute" }, { "api_name": "string.digits", "line_number": 38, "usage_type": "attribute" }, { "api_name": "glycan...
42552135340
import logging from logging.handlers import RotatingFileHandler import groupy import forecastio import giphypop import requests import bs4 from geopy.geocoders import Nominatim from flask import Flask, request application = Flask(__name__) application.config.from_object('settings') WEATHER_ICONS = { 'clear-day': '...
tonydalemorris/pancakebot
pancakebot.py
pancakebot.py
py
3,581
python
en
code
0
github-code
71
[ { "api_name": "flask.Flask", "line_number": 12, "usage_type": "call" }, { "api_name": "geopy.geocoders.Nominatim", "line_number": 47, "usage_type": "call" }, { "api_name": "forecastio.load_forecast", "line_number": 49, "usage_type": "call" }, { "api_name": "giphyp...
41477386190
#!/usr/bin/env python # encoding: utf-8 ''' #------------------------------------------------------------------- # CONFIDENTIAL --- CUSTOM STUDIOS #------------------------------------------------------------------- # # @Project Name : 高级图片转换特效之毛玻璃 # # @File Name ...
GraceQAQ/python-special-efficiency
picture_effects_conversion_pro/effects_1.py
effects_1.py
py
2,145
python
en
code
12
github-code
71
[ { "api_name": "cv2.imread", "line_number": 47, "usage_type": "call" }, { "api_name": "numpy.zeros_like", "line_number": 49, "usage_type": "call" }, { "api_name": "numpy.random.randint", "line_number": 58, "usage_type": "call" }, { "api_name": "numpy.random", "...
31779242164
import wx from mdbutton import MDButton class DirPicker(wx.Panel): def __init__ (self, parent, style = wx.TAB_TRAVERSAL, labelText = 'Folder Path:', initValue = '', buttonText = 'Browse', dialogTitle = 'Choose a folder', ...
erik-morgan/code
Python/pypub/dirpicker.py
dirpicker.py
py
2,985
python
en
code
0
github-code
71
[ { "api_name": "wx.Panel", "line_number": 4, "usage_type": "attribute" }, { "api_name": "wx.TAB_TRAVERSAL", "line_number": 6, "usage_type": "attribute" }, { "api_name": "wx.BoxSizer", "line_number": 25, "usage_type": "call" }, { "api_name": "wx.VERTICAL", "line...
33618457037
import requests import bs4 #beautiful soup #요청 url = 'https://www.naver.com/' # response = requests.get(url) # html = response.text # # url을 텍스트로 변환 # soup = bs4.BeautifulSoup(html, 'html.parser') # keywords = soup.select('.ah_l .ah_item .ah_a .ah_k') # # soup중에서 불러오기/parser했기에 가능 # print(keywords) selector = '.ah_...
paik11012/TIL
StartCamp/02_DAY/01_naver_rank.py
01_naver_rank.py
py
557
python
en
code
0
github-code
71
[ { "api_name": "requests.get", "line_number": 16, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 17, "usage_type": "call" } ]
6919701503
import argparse import gc import os import time import numpy as np import torch import torch.backends.cudnn as cudnn import torch.distributed as dist import torch.nn as nn import torch.optim as optim from tensorboardX import SummaryWriter from torch.utils.data import DataLoader from data_loader.pose_check_dataset imp...
touristCheng/Learning2Regrasp
pose_check/train_multi_task_var_impl.py
train_multi_task_var_impl.py
py
9,388
python
en
code
18
github-code
71
[ { "api_name": "torch.backends.cudnn.benchmark", "line_number": 20, "usage_type": "attribute" }, { "api_name": "torch.backends.cudnn", "line_number": 20, "usage_type": "name" }, { "api_name": "argparse.ArgumentParser", "line_number": 22, "usage_type": "call" }, { "...
6077946703
from django.contrib.auth import get_user_model from django.db.models import Count from django import forms from django.utils.encoding import force_text from ads.models import LineItem User = get_user_model() COUNTRIES_CHOICES = [(x[0], x[1]) for x in User.objects.exclude(country_code__isnull=True).values_list('count...
5CORNERS/www.le-francais.ru
ads/forms.py
forms.py
py
1,474
python
en
code
4
github-code
71
[ { "api_name": "django.contrib.auth.get_user_model", "line_number": 8, "usage_type": "call" }, { "api_name": "django.db.models.Count", "line_number": 10, "usage_type": "call" }, { "api_name": "django.db.models.Count", "line_number": 11, "usage_type": "call" }, { "a...
69902443430
"""empty message Revision ID: da5815fb47ef Revises: 462e5f0b6353 Create Date: 2020-04-28 12:37:28.619048 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic. revision = 'da5815fb47ef' down_revision = '462e5f0b6353' branch_labels = None depe...
Gang-bb/Job-back-end
migrations/versions/da5815fb47ef_.py
da5815fb47ef_.py
py
934
python
en
code
52
github-code
71
[ { "api_name": "alembic.op.create_table", "line_number": 25, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 25, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 26, "usage_type": "call" }, { "api_name": "sqlalchemy.diale...
73252473191
import yfinance as yf import sys, os file = open("stonks.txt",'r') list_of_stonks = [] ticker_objs = {} i = 0 for line in file: if len(line)>1: list_of_stonks.append(line.strip('\n')) for ticker in list_of_stonks: i = i + 1 try: ticker_objs[ticker] = yf.Ticker(ticker) print(str(i)...
linpawsz/scratch
001_02_yfinance_get_industry_sectors.py
001_02_yfinance_get_industry_sectors.py
py
824
python
en
code
0
github-code
71
[ { "api_name": "yfinance.Ticker", "line_number": 16, "usage_type": "call" } ]
8900630769
from __future__ import unicode_literals import codecs import json import os import sys from textwrap import dedent from compat import unittest from distlib import __version__ from distlib.compat import StringIO from distlib.metadata import (LegacyMetadata, Metadata, METADATA_FILENAME, L...
pypa/distlib
tests/test_metadata.py
test_metadata.py
py
26,431
python
en
code
39
github-code
71
[ { "api_name": "os.path.abspath", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path", "line_number": 21, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 21, "usage_type": "call" }, { "api_name": "support.in_github_workfl...
17211506816
from collections import namedtuple from enum import Enum MyStruct = namedtuple("MyStruct", ("field1", "field2")) m = MyStruct("foo", "bar") class Room(Enum): Description = 1 North = 2 West = 3 South = 4 East = 5 Up = 6 Down = 7 def LydiaRoom(op): return { Room.Description: "Yo...
Grimkey/Python4Kids
kittygame.py
kittygame.py
py
750
python
en
code
0
github-code
71
[ { "api_name": "collections.namedtuple", "line_number": 4, "usage_type": "call" }, { "api_name": "enum.Enum", "line_number": 7, "usage_type": "name" } ]
6320866972
from allennlp.commands.elmo import ElmoEmbedder from argparse import ArgumentParser from collections import Counter from joblib import Parallel, delayed import json from multiprocessing import Pool import numpy as np import os import pickle import random import re from tqdm import tqdm from utils.spacy import bulk_tok...
qipeng/stay-hungry-stay-focused
utils/preprocess_quac.py
preprocess_quac.py
py
15,272
python
en
code
26
github-code
71
[ { "api_name": "utils.constants.UNK", "line_number": 18, "usage_type": "name" }, { "api_name": "re.match", "line_number": 48, "usage_type": "call" }, { "api_name": "utils.spacy.bulk_tokenize", "line_number": 58, "usage_type": "call" }, { "api_name": "multiprocessin...
4277879313
import string from math import ceil, floor from .eds import EDS from .utilities import FailedValidationError, get_name, decode, format_bytes from ..can import MessageType PDO1_TX = 0x1A00 PDO1_RX = 0x1600 PDO2_TX = 0x1A01 PDO2_RX = 0x1601 PDO3_TX = 0x1A02 PDO3_RX = 0x1602 PDO4_TX = 0x1A03 PDO4_RX = 0x1603 def parse(...
oresat/CANopen-monitor
canopen_monitor/parse/pdo.py
pdo.py
py
8,904
python
en
code
25
github-code
71
[ { "api_name": "eds.EDS", "line_number": 17, "usage_type": "name" }, { "api_name": "can.MessageType.cob_id_to_type", "line_number": 26, "usage_type": "call" }, { "api_name": "can.MessageType", "line_number": 26, "usage_type": "name" }, { "api_name": "can.MessageTyp...
30598006673
# -*- coding: utf-8 -*- """ Created on Thu Dec 19 20:45:25 2019 @author: ar1 """ import gc import time import numpy as np import pandas as pd from multiprocessing import Pool from functools import partial import os for dirname, _, filenames in os.walk('C:/Personal/Kaggle/ASHRAE/ashrae-energy-prediction/input'): ...
Abirami-R59/Kaggle-ASHRAE
test_preprocessing.py
test_preprocessing.py
py
9,505
python
en
code
0
github-code
71
[ { "api_name": "os.walk", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path", "line_number": 17, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", "line_number"...
33392204011
from urllib import request from urllib.request import Request from bs4 import BeautifulSoup from app.twitter_learning_journal.cachers.webpage_cacher import WebpageCacher from app.twitter_learning_journal.services.logging_service import LoggingService from app.twitter_learning_journal.transformers.transform_str import...
DEV3L/twitter-learning-journal
scripts/blogs.py
blogs.py
py
7,960
python
en
code
1
github-code
71
[ { "api_name": "app.twitter_learning_journal.services.logging_service.LoggingService", "line_number": 10, "usage_type": "call" }, { "api_name": "app.twitter_learning_journal.cachers.webpage_cacher.WebpageCacher", "line_number": 49, "usage_type": "call" }, { "api_name": "urllib.req...
21474169591
import pygame as pg import Button import Options import CRUD import Player as PL import MapNavigation import screens pg.init() clock = pg.time.Clock() fps = 60 # background = pg.image.load("market.png") #game window bottom_panel = 150 screen_width = 800 screen_height = 400 + bottom_panel gameSetting...
nikiyyy/PyGladiator
PyGladiator V3 (thesis)/Menu.py
Menu.py
py
2,643
python
en
code
0
github-code
71
[ { "api_name": "pygame.init", "line_number": 9, "usage_type": "call" }, { "api_name": "pygame.time.Clock", "line_number": 10, "usage_type": "call" }, { "api_name": "pygame.time", "line_number": 10, "usage_type": "attribute" }, { "api_name": "Options.Gameoptions", ...
17151466198
import cv2 import os vidcap = cv2.VideoCapture(r'yourpath.avi') success, image = vidcap.read() count = 0 success = True while success: cv2.imwrite("frame%d.png" % count, image) # save frame as JPEG file success, image = vidcap.read() count += 1 vidcap = cv2.VideoCapture(r'yourpath2') success, image = vid...
Fifu352/Converter
main.py
main.py
py
1,013
python
en
code
0
github-code
71
[ { "api_name": "cv2.VideoCapture", "line_number": 4, "usage_type": "call" }, { "api_name": "cv2.imwrite", "line_number": 9, "usage_type": "call" }, { "api_name": "cv2.VideoCapture", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.imwrite", "line_n...
36395126234
import requests from flask import request, flash, render_template, redirect, url_for from flask_login import current_user from flask_wtf import FlaskForm from wtforms import StringField, validators from app import email_utils, config from app.auth.base import auth_bp from app.config import CONNECT_WITH_PROTON from app...
simple-login/app
app/auth/views/register.py
register.py
py
4,898
python
en
code
4,235
github-code
71
[ { "api_name": "flask_wtf.FlaskForm", "line_number": 23, "usage_type": "name" }, { "api_name": "wtforms.StringField", "line_number": 24, "usage_type": "call" }, { "api_name": "wtforms.validators.DataRequired", "line_number": 24, "usage_type": "call" }, { "api_name"...
7934321078
import numpy as np import scipy.sparse from sklearn.linear_model import SGDRegressor from recpack.algorithms.base import ItemSimilarityMatrixAlgorithm from recpack.matrix import Matrix, to_csr_matrix class SLIM(ItemSimilarityMatrixAlgorithm): """Implementation of the SLIM model. SLIM Model described in Nin...
LienM/recpack
recpack/algorithms/slim.py
slim.py
py
3,315
python
en
code
13
github-code
71
[ { "api_name": "recpack.algorithms.base.ItemSimilarityMatrixAlgorithm", "line_number": 10, "usage_type": "name" }, { "api_name": "sklearn.linear_model.SGDRegressor", "line_number": 45, "usage_type": "call" }, { "api_name": "numpy.where", "line_number": 55, "usage_type": "c...
22977618745
from collections import defaultdict, deque def bfs(p, q, n): adj = defaultdict(list) for i in range(len(p)): adj[p[i]].append(q[i]) adj[q[i]].append(p[i]) bfslist = [] vis = [False] * (n) for i in range(1, n+1, 1): if vis[i-1] == False: q = deque() ...
rajat844/Python-OOPs-and-DS
Graph/bfs.py
bfs.py
py
1,254
python
en
code
0
github-code
71
[ { "api_name": "collections.defaultdict", "line_number": 5, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 14, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 30, "usage_type": "call" } ]
39635333550
from django.db import models from django.forms import CheckboxSelectMultiple from django.utils import timezone from wagtail.fields import StreamField, RichTextField from wagtail.models import Page, Orderable from wagtail.admin.panels import FieldPanel, InlinePanel, MultiFieldPanel from wagtail.search import index fro...
wharton/wagtailgridder
wagtailgridder/models.py
models.py
py
8,968
python
en
code
62
github-code
71
[ { "api_name": "taggit.models.TaggedItemBase", "line_number": 18, "usage_type": "name" }, { "api_name": "modelcluster.fields.ParentalKey", "line_number": 23, "usage_type": "call" }, { "api_name": "django.db.models.CASCADE", "line_number": 26, "usage_type": "attribute" },...
20567978525
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^update_db/', views.update_db, name='update database'), url(r'^functions/', views.functions, name='functions'), url(r'^hilg_attack/', views.hilg_attack, name='hilg attack') ]
bgould96/django_proj
groupme/urls.py
urls.py
py
306
python
en
code
0
github-code
71
[ { "api_name": "django.conf.urls.url", "line_number": 6, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 7, "usage_type": "call" }, { "api_name": "django.conf.urls.url", "line_number": 8, "usage_type": "call" }, { "api_name": "django.co...
17455831628
import numpy as np from pyglet import gl import pyglet.graphics from earcut.earcut import earcut from pymunk import Poly from .geom import SPACE_SCALE from .physics import space class RockPoly: batch = pyglet.graphics.Batch() TEX = pyglet.resource.texture('textures/rock.jpg') group = pyglet.sprite.Sprite...
lordmauve/what-the-frog
wtf/poly.py
poly.py
py
1,503
python
en
code
3
github-code
71
[ { "api_name": "pyglet.graphics.Batch", "line_number": 12, "usage_type": "call" }, { "api_name": "pyglet.graphics", "line_number": 12, "usage_type": "attribute" }, { "api_name": "pyglet.resource.texture", "line_number": 13, "usage_type": "call" }, { "api_name": "py...
37297158646
# ----------------------------------------------------------- # # # # # # ----------------------------------------------------------- import tkinter as tk from tkinter import * from tkinter import filedialog from PIL import Image, ImageTk from tkcalendar import DateEntry import datebase_process import fee import num...
Pheggo/LPC
GUI2.py
GUI2.py
py
5,580
python
en
code
0
github-code
71
[ { "api_name": "tkinter.Tk", "line_number": 23, "usage_type": "call" }, { "api_name": "tkinter.Label", "line_number": 33, "usage_type": "call" }, { "api_name": "tkinter.Button", "line_number": 37, "usage_type": "call" }, { "api_name": "tkcalendar.DateEntry", "l...
22179339639
#!/usr/bin/env python3.6 # -*- coding: utf-8 -*- import hashlib import os import requests from . import cli from .configurator import configurator args = cli.args() cfg = configurator(args.cfg_path) def show_logo(name): print('\033c') print(' _/ _/ _/_/_/_/ _/ _/_/ _/\n'+ ...
szee/birch
birch/utils.py
utils.py
py
1,158
python
en
code
0
github-code
71
[ { "api_name": "configurator.configurator", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 30, "usage_type": "call" }, { "api_name": "hashlib.sha3_512", "line_number": 38, "usage_type": "call" } ]
21136310965
import inspect from typing import Optional, Union, Callable def make_all_optional_or_suite_input(fn: Callable): from inspect import signature, Parameter from giskard.core.suite import SuiteInput sig = signature(fn) sig = sig.replace( parameters=[ Parameter( name=pa...
Giskard-AI/giskard
giskard/ml_worker/testing/registry/decorators_utils.py
decorators_utils.py
py
2,356
python
en
code
2,258
github-code
71
[ { "api_name": "typing.Callable", "line_number": 5, "usage_type": "name" }, { "api_name": "inspect.signature", "line_number": 9, "usage_type": "call" }, { "api_name": "inspect.Parameter", "line_number": 12, "usage_type": "call" }, { "api_name": "inspect.Signature",...
22501166043
#! /usr/bin/env python3 import networkx as nx import gurobipy as grb import numpy as np import argparse import itertools from pcst_fast import pcst_fast from stp import load_stp DESCRIPTION = """ Solves an instance of the PCSTP using Gurobi Python. """ BIG_INT = np.iinfo(np.int64).max BIG_FLOAT = np.finfo(np.flo...
wsprent/thesis-code
python_gurobi/pcstp/main.py
main.py
py
6,642
python
en
code
0
github-code
71
[ { "api_name": "numpy.iinfo", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.int64", "line_number": 18, "usage_type": "attribute" }, { "api_name": "numpy.finfo", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.float64", "line_nu...
37692419180
from django.http import HttpResponse, JsonResponse from django.shortcuts import render from .apps import KneeAppConfig from django.contrib import messages import cv2, numpy as np, json from django.views.generic.base import TemplateView def class_result(result): class_names = "" if result == 0: class_na...
Vicolas11/Osteoarthritis
knee_app/views.py
views.py
py
1,848
python
en
code
0
github-code
71
[ { "api_name": "numpy.fromstring", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 31, "usage_type": "attribute" }, { "api_name": "cv2.imdecode", "line_number": 33, "usage_type": "call" }, { "api_name": "cv2.IMREAD_GRAYSCALE",...
39611239129
from nltk.corpus import stopwords from collections import Counter import sys import pprint import csv 'Argument List:', str(sys.argv) path=str(sys.argv[1]) print(sys.argv[1]) #path="sloh.txt" #path="rocnikovka.txt" file=open(path, "r") obsah=file.read().decode("utf-8", "ignore").encode("utf-8") #print(obsah) words=...
evahoralikova/python
DS/analytika.py
analytika.py
py
994
python
en
code
0
github-code
71
[ { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 9, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 10, "usage_type": "attribute" }, { "api_name": "nltk.corpus.stopwords.words",...
73552818788
import numpy as np import imageio, util import os import matplotlib.pyplot as plt plt.rc('font', size=30) def histogram(filedir): imagestack, TE = imageio.loadImages2(os.path.join('..', 'data', filedir)) channels = ['red', 'green', 'blue'] save_dir = os.path.join('..', 'result', filedir, 'hist') if ...
GUG11/HDR
python/experiment.py
experiment.py
py
1,134
python
en
code
16
github-code
71
[ { "api_name": "matplotlib.pyplot.rc", "line_number": 6, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 6, "usage_type": "name" }, { "api_name": "imageio.loadImages2", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.join...
33617580097
import openai import discord from discord import Intents from discord.commands import slash_command, option from discord.ext import commands import re import os import asyncio import logging import datetime import base64 import requests import zipfile from zipfile import ZipFile from dotenv import load_dotenv load_dote...
Paillat-dev/presentator
main.py
main.py
py
12,159
python
en
code
22
github-code
71
[ { "api_name": "dotenv.load_dotenv", "line_number": 16, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 17, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 18, "usage_type": "call" }, { "api_name": "logging.basicConfig", "lin...
26032051874
"""A helper script to download ATT&CK releases in STIX/JSON format.""" import pathlib from typing import List import pooch import typer from loguru import logger from mitreattack import release_info app = typer.Typer(add_completion=False) def download_stix(stix_version: str, domain: str, download_dir: str, releas...
mitre-attack/mitreattack-python
mitreattack/download_stix.py
download_stix.py
py
4,822
python
en
code
293
github-code
71
[ { "api_name": "typer.Typer", "line_number": 12, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 31, "usage_type": "call" }, { "api_name": "pooch.retrieve", "line_number": 40, "usage_type": "call" }, { "api_name": "typing.List", "line_numbe...
11945829310
import uuid from tempest.api.image import base from tempest.lib import exceptions as lib_exc from tempest import test class ImagesNegativeTest(base.BaseV2ImageTest): """here we have -ve tests for show_image and delete_image api Tests ** get non-existent image ** get image with image_id=NULL...
microsoft/LIS-Tempest
tempest/api/image/v2/test_images_negative.py
test_images_negative.py
py
3,277
python
en
code
3
github-code
71
[ { "api_name": "tempest.api.image.base.BaseV2ImageTest", "line_number": 8, "usage_type": "attribute" }, { "api_name": "tempest.api.image.base", "line_number": 8, "usage_type": "name" }, { "api_name": "uuid.uuid4", "line_number": 25, "usage_type": "call" }, { "api_n...
30000756741
''' \file dataset_ProtFunct.py \brief pytorch geometric Dataset object for ProtFunct finetuning tasks. \author MinGyu Choi chemgyu98@snu.ac.kr ''' import os import numpy as np from tqdm import tqdm import torch from torch_geometric.data import Data, Dataset, DataLoader from torch.utils.data.sampler i...
ProteinNet/ProteinNet
ProteinNet/datasets/dataset_ProtFunct.py
dataset_ProtFunct.py
py
9,046
python
en
code
1
github-code
71
[ { "api_name": "torch_geometric.data.Dataset", "line_number": 17, "usage_type": "name" }, { "api_name": "torch_geometric.data.Dataset", "line_number": 25, "usage_type": "argument" }, { "api_name": "os.path.exists", "line_number": 36, "usage_type": "call" }, { "api_...
29175106968
import copy import os, sys import json import numpy as np import torch.utils.data as data import cv2 import scipy.misc sys.path.append("..") from utils import (bbox_clip_xyxy, bbox_xywh_to_xyxy, draw_origin_joints, cam2pixel, draw_origin_joints_index) from transform import SimpleTransform3D class ...
XiaoYuhao/SinglePose
datasets/mirror.py
mirror.py
py
8,657
python
en
code
0
github-code
71
[ { "api_name": "sys.path.append", "line_number": 8, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.utils.data.Dataset", "line_number": 15, "usage_type": "attribute" }, { "api_name": "torch.utils...
7935778965
import telebot import Debug botKey = "1659365904:AAGioE7u7tLsIaq4lpk6aaGKGcJiGhddSs8" bot = "" try: bot = telebot.TeleBot(botKey) except: print("Wrong telegram bot key") #Get logs from Debug script and send it to user def SendLogs(message, bot): logType = message.text.split(" ") answ = "Logs:\n" ...
unknwn-dev/KreDpUaRasp
TgBot.py
TgBot.py
py
736
python
en
code
0
github-code
71
[ { "api_name": "telebot.TeleBot", "line_number": 8, "usage_type": "call" }, { "api_name": "Debug.ReadLogsByType", "line_number": 19, "usage_type": "call" }, { "api_name": "Debug.ReadAllLogs", "line_number": 23, "usage_type": "call" } ]
33440462612
from tabulate import tabulate from Processo import Processo class Escalonador : def first_come_first_served(self, fila) : fila_de_prontos = []; numero_bursts = 3; soma_burst = 0; for processo in fila : soma_burst = soma_burst + processo['burst_time'] ...
wpdcastro/Sistemas-Operacionais-II
Escalonador.py
Escalonador.py
py
3,986
python
pt
code
0
github-code
71
[ { "api_name": "tabulate.tabulate", "line_number": 72, "usage_type": "call" }, { "api_name": "tabulate.tabulate", "line_number": 103, "usage_type": "call" } ]
15743673441
from abc import abstractmethod import tensorflow as tf from tensorflow.contrib.tensorboard.plugins import projector import includes.dataset_helper as dsf import numpy import includes.debug as dbg import os import math from operator import mul from functools import reduce class Experiment: """ Core class for ...
apatsekin/patterns-identification-tensorflow
includes/experiment_class.py
experiment_class.py
py
12,810
python
en
code
0
github-code
71
[ { "api_name": "tensorflow.variable_scope", "line_number": 35, "usage_type": "call" }, { "api_name": "tensorflow.contrib.tensorboard.plugins.projector.ProjectorConfig", "line_number": 40, "usage_type": "call" }, { "api_name": "tensorflow.contrib.tensorboard.plugins.projector", ...
74915829989
# coding: utf-8 # # FinanceDataReader 사용자 안내서 # # <img src="https://i.imgur.com/r0YE5Xs.png"> # # 한국 주식 가격, 미국주식 가격, 지수, 환율, 암호화폐 가격, 종목 리스팅 등 금융 데이터 수집 라이브러리 # # <!-- TEASER_END --> # ### 2018 FinanceData.KR # In[9]: # 차트 설정 get_ipython().run_line_magic('matplotlib', 'inline') import matplotlib.pyplot as plt pl...
c-choi/Python
빅데이터 수집 강의/Finance/FinanceDataReader_Data.py
FinanceDataReader_Data.py
py
8,351
python
ko
code
0
github-code
71
[ { "api_name": "matplotlib.pyplot.rcParams", "line_number": 20, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 20, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 21, "usage_type": "attribute" }, { ...
13270516933
import pygame from gameobject import BaseMapObject import json class JsonMapDecoder: def __init__(self) -> None: self.ground = BaseMapObject((50, 50)) self.object_mapping = { "ground" : BaseMapObject((50, 50)) } self.mapdata = None self.decode(f"{__file__}/m...
simanglam/map_editor
decoder.py
decoder.py
py
649
python
en
code
0
github-code
71
[ { "api_name": "gameobject.BaseMapObject", "line_number": 9, "usage_type": "call" }, { "api_name": "gameobject.BaseMapObject", "line_number": 12, "usage_type": "call" }, { "api_name": "json.load", "line_number": 21, "usage_type": "call" }, { "api_name": "gameobject...
40495942558
import logging import requests, json from kalliope.core.NeuronModule import (NeuronModule, MissingParameterException, InvalidParameterException) logging.basicConfig() logger = logging.getLogger("kalliope") class Cryptocurrency(NeuronModu...
royto/kalliope_neuron_cryptocurrency
cryptocurrency.py
cryptocurrency.py
py
1,739
python
en
code
0
github-code
71
[ { "api_name": "logging.basicConfig", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "kalliope.core.NeuronModule.NeuronModule", "line_number": 11, "usage_type": "name" }, { "api_n...
18696607583
import random as rd import csv import argparse rd.seed(2020) def read_txt(filename): dataset = [] with open(filename, 'r', encoding="utf-8", newline='') as f: for line in f.readlines(): label = line[0] doc = line[1:].strip() dataset.append((label, doc)) ...
toriving/text-classification-transformers
utils/sst_preprocess.py
sst_preprocess.py
py
1,573
python
en
code
39
github-code
71
[ { "api_name": "random.seed", "line_number": 6, "usage_type": "call" }, { "api_name": "csv.writer", "line_number": 24, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 30, "usage_type": "call" } ]
37645134269
from math import log from typing import List FILE_PATH = '/path/to/p099_base_exp.txt' def parse_file() -> List: with open(file_path) as f: lines = f.readlines() nums_as_str = [line.strip('\n').split(',') for line in lines] return [(int(a), int(b)) for a, b in [line for line in nums_as_str]] de...
stevenschmatz/project-euler
problem-099.py
problem-099.py
py
600
python
en
code
0
github-code
71
[ { "api_name": "typing.List", "line_number": 7, "usage_type": "name" }, { "api_name": "math.log", "line_number": 18, "usage_type": "call" } ]
21610235351
### Diffusion Map Wrapper/Diffuse Function -- Python Implementation ### import numpy as np from scipy.sparse import csc_matrix from scipy.sparse.linalg import eigsh # Class to format the output of the diffuse function for the diffusion map class Dmap(object): def __init__(self, X, phi0, eigenvals, eigenmult, ...
pefreeman/ltst
Python/diffusionMap.py
diffusionMap.py
py
2,763
python
en
code
1
github-code
71
[ { "api_name": "numpy.exp", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.outer", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.outer", "line_number": 33, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 35...
70343808230
import cv2 import math import pandas as pd import gc import torch from sklearn.utils import shuffle from albumentations import Compose, Resize, Transpose, HorizontalFlip, \ VerticalFlip, ShiftScaleRotate, HueSaturationValue, \ RandomBrightnessContrast, Normalize...
freedom1810/kaggle-cassava
main.py
main.py
py
4,682
python
en
code
14
github-code
71
[ { "api_name": "pandas.read_csv", "line_number": 28, "usage_type": "call" }, { "api_name": "config.path_params", "line_number": 28, "usage_type": "name" }, { "api_name": "sklearn.utils.shuffle", "line_number": 34, "usage_type": "call" }, { "api_name": "sklearn.util...
27549938269
import collections.abc import json import string import subprocess import time import typing from multiprocessing import current_process from sys import platform from libnmap.parser import NmapParser import constants from handler.DatabaseHandler import DatabaseHandler from handler.HostInformation import HostInformati...
Ric1234567/DigitalTwinsForIoTSecurityManagement
flask-backend/handler/NmapHandler.py
NmapHandler.py
py
9,333
python
en
code
1
github-code
71
[ { "api_name": "sys.platform", "line_number": 22, "usage_type": "name" }, { "api_name": "constants.SUDO", "line_number": 23, "usage_type": "attribute" }, { "api_name": "constants.NMAP_STANDARD_COMMAND_PREFIX", "line_number": 23, "usage_type": "attribute" }, { "api_...
10161097522
""" Guitar Subset For a list of integers S and a target number G, a subset of S that adds up to G is called a guitar subset. For example: Input: 24 [12, 1, 61, 5, 9, 2] Output: [12, 9, 2, 1] (G=24, S=[12, 1, 61, 5, 9, 2], there is a guitar subset [12, 9, 2, 1] that adds up to 24). Integers can appear mo...
rustamlinabi/Python---SoloLearn-Assignments
guitar.py
guitar.py
py
1,207
python
en
code
0
github-code
71
[ { "api_name": "itertools.permutations", "line_number": 26, "usage_type": "call" } ]
14957814243
""" Check hypothesis using the one-sided SMIRNOV homogeneity test. from scipy.stats import ks_2samp """ import numpy as np from const import gamma from scipy.special import kolmogi from scipy.stats import expon def smirnov(alpha): """ Compute the Kolmogorov-Smirnov statistic on 2 samples. :param alpha:...
popryho/risk-theory
lab2/task4_smirnov.py
task4_smirnov.py
py
1,646
python
en
code
0
github-code
71
[ { "api_name": "numpy.sort", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.random.exponential", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 20, "usage_type": "attribute" }, { "api_name": "numpy.sort", ...
36423298521
import unittest import decimal import random import json from src.fuber_core.customer_actions import CustomerAction from src.models.location import Location from src.registry.cab_registry import CabRegistry from src.registry.customer_registry import CustomerRegistry from src.registry.trip_registry import TripRegistry ...
kousiknath/fuber
test/test_trips.py
test_trips.py
py
3,729
python
en
code
0
github-code
71
[ { "api_name": "unittest.TestCase", "line_number": 16, "usage_type": "attribute" }, { "api_name": "src.registry.cab_registry.CabRegistry", "line_number": 18, "usage_type": "call" }, { "api_name": "src.registry.customer_registry.CustomerRegistry", "line_number": 19, "usage_...
41569903539
from django.forms.widgets import DateInput, TextInput, CheckboxSelectMultiple from django_filters import FilterSet, DateFilter, CharFilter, MultipleChoiceFilter from .models import Post class PostFilter(FilterSet): datetime_create = DateFilter( field_name='datetime_create', lookup_expr='gt', ...
Ant-on-git/SF-news_portal
NewsPaper/news/filters.py
filters.py
py
1,452
python
en
code
0
github-code
71
[ { "api_name": "django_filters.FilterSet", "line_number": 6, "usage_type": "name" }, { "api_name": "django_filters.DateFilter", "line_number": 7, "usage_type": "call" }, { "api_name": "django.forms.widgets.DateInput", "line_number": 11, "usage_type": "call" }, { "a...
72512031590
# sets up database for tests import pytest import testing.postgresql from sqlalchemy import create_engine, text from sqlalchemy.orm import sessionmaker from sqlalchemy_sqlschema import maintain_schema # test data and formatting functions from sample_data import WAT1, WAT2, WAT3, BAS1, make_region from sample_data im...
pacificclimate/scip-backend
tests/conftest.py
conftest.py
py
2,942
python
en
code
0
github-code
71
[ { "api_name": "testing.postgresql.postgresql.Postgresql", "line_number": 22, "usage_type": "call" }, { "api_name": "testing.postgresql.postgresql", "line_number": 22, "usage_type": "attribute" }, { "api_name": "testing.postgresql", "line_number": 22, "usage_type": "name" ...
33170835652
#! /usr/bin/env python3 import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name = "BrownBat", version = "0.0b2", author = "Douglas RAILLARD", author_email = "public.douglas.raillard@gmail.com", description = "A laz...
DouglasRaillard/BrownBat
setup.py
setup.py
py
973
python
en
code
1
github-code
71
[ { "api_name": "os.path.join", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 7, "usage_type": "call" }, { "api_name": "setuptools.setup", "line_n...
32699235705
#does a bunch of pandas import pandas as pd import numpy as np from astropy.coordinates import SkyCoord from astropy import units as u def astrometry_table(data): # missing_dist = 0 astrometry = pd.DataFrame(columns=['Object', 'Category', 'Spectral_class', 'magnitudes', ...
coderXmachina2/protostellar_disk_visualization
functions/sort_functions_astrometry.py
sort_functions_astrometry.py
py
4,660
python
en
code
1
github-code
71
[ { "api_name": "pandas.DataFrame", "line_number": 11, "usage_type": "call" }, { "api_name": "astropy.coordinates.SkyCoord", "line_number": 51, "usage_type": "call" }, { "api_name": "astropy.units.degree", "line_number": 51, "usage_type": "attribute" }, { "api_name"...
3319615231
# -*- coding: utf-8 -*- """ Created on Thu May 19 10:15:19 2022 @author: lenovo """ import pandas as pd from arch import arch_model, univariate import datetime as dt import numpy as np import math import time from arch.unitroot import ADF from statsmodels.tsa import stattools # 白噪声检验:Ljung-Box检验 from ...
Steve-Selite/THU_Byte
Model/时间序列分析.py
时间序列分析.py
py
5,637
python
en
code
0
github-code
71
[ { "api_name": "rpy2.robjects.pandas2ri.activate", "line_number": 21, "usage_type": "call" }, { "api_name": "rpy2.robjects.pandas2ri", "line_number": 21, "usage_type": "name" }, { "api_name": "rpy2.robjects.packages.importr", "line_number": 23, "usage_type": "call" }, ...
11626900035
import json from tornado.web import RequestHandler, HTTPError, gen import logging import app.settings as st from os_tornado.decorators.json_response import jsonify import tornado from urllib import unquote from app.common.sender import UrlSender import time _logger = logging.getLogger('CrawlHandler') @jsonify class ...
comeonweina/crawler_portal
crawler_portal/app/request_handlers/crawl_handler.py
crawl_handler.py
py
2,397
python
en
code
0
github-code
71
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "tornado.web.RequestHandler", "line_number": 15, "usage_type": "name" }, { "api_name": "app.settings.BATCH_ID", "line_number": 20, "usage_type": "attribute" }, { "api_name"...
36343623587
import keras import math import numpy as np from typing import List, Callable, Dict, Tuple, Optional, Collection class DataSequence(keras.utils.Sequence): x: List batch_size: int length: int shuffle: bool keep_remainder: bool map_fn: Callable batches: List[Tuple[int, int]] indices: np...
willsaak/vrd-kaggle
data/data_sequence.py
data_sequence.py
py
1,849
python
en
code
0
github-code
71
[ { "api_name": "keras.utils", "line_number": 8, "usage_type": "attribute" }, { "api_name": "typing.List", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.Callable", "line_number": 14, "usage_type": "name" }, { "api_name": "typing.List", "line_nu...
35708379905
"""Contains functions which provide corresponding name and remedy of ICP numbers.""" from collections import namedtuple from importlib.resources import files from pathlib import PurePath from functools import lru_cache import csv from edcon.utils.logging import Logging @lru_cache def read_icp_map_file(icp_map_file: s...
Festo-se/festo-edcon
src/edcon/edrive/diagnosis.py
diagnosis.py
py
2,780
python
en
code
4
github-code
71
[ { "api_name": "pathlib.PurePath", "line_number": 21, "usage_type": "call" }, { "api_name": "importlib.resources.files", "line_number": 21, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 24, "usage_type": "call" }, { "api_name": "collections.nam...
72565764389
#!/usr/bin/env python # coding:utf-8 import json import requests import os import threading import time import datetime ''' 使用最原始的60S下载接口 此文件会使用多线程下载数据 目前已被废弃 ''' Token = '' every_hour_data = [] class DownloadDataFromVCloud: def __init__(self,write_path,app_id,Universal_log): self.write_path = write_pat...
LonelyWise/VivaLNKTool
Vivalnk/network/Download_Universal.py
Download_Universal.py
py
5,810
python
en
code
0
github-code
71
[ { "api_name": "datetime.datetime.fromtimestamp", "line_number": 53, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 53, "usage_type": "attribute" }, { "api_name": "datetime.datetime.fromtimestamp", "line_number": 54, "usage_type": "call" }, {...
2506713369
# -*- coding: utf-8 -*- import logging import pymysql from openpyxl import load_workbook, Workbook import time import os logging.basicConfig(format="%(asctime)s %(levelname)s %(message)s", level=logging.INFO) connection = pymysql.connect(host="hk-cdb-aumsfh1d.sql.tencentcdb.com", user="root", password="wvqhthpbd!Wv$...
imvg/20211007
机型匹配/手机上报.py
手机上报.py
py
3,904
python
en
code
0
github-code
71
[ { "api_name": "logging.basicConfig", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pymysql.connect", "line_number": 11, "usage_type": "call" }, { "api_name": "logging.info", ...
2350281710
import cv2 import os import glob import numpy import tensorflow IMAGES_TO_EXAMINE_FOLDER_PATH = r'images-to-examine/' MARKED_IMAGES_FOLDER_PATH = r'marked-images/' CLASSIFIER_PATH = r'classifier-simplified.h5' IMAGE_SIZE = (24, 22) DETECTOR_SCALE_FACTOR = 1.2 DETECTOR_MIN_NEIGHBORS = 5 # test function used to calib...
smutkiewicz/face-mask-detection
detector/face-detector.py
face-detector.py
py
2,669
python
en
code
0
github-code
71
[ { "api_name": "cv2.imread", "line_number": 18, "usage_type": "call" }, { "api_name": "cv2.CascadeClassifier", "line_number": 19, "usage_type": "call" }, { "api_name": "cv2.data", "line_number": 19, "usage_type": "attribute" }, { "api_name": "cv2.rectangle", "l...
74120475749
from django.conf.urls import url,include from django.urls import path import django.contrib.auth.views from . import views from .models import CS096 from rest_framework import routers router = routers.DefaultRouter() router.register(r'product', views.ProductViewSet) urlpatterns = [ path('', views.CS096List...
hopkinss/access_request_tracker
trackapp/urls.py
urls.py
py
1,094
python
en
code
0
github-code
71
[ { "api_name": "rest_framework.routers.DefaultRouter", "line_number": 8, "usage_type": "call" }, { "api_name": "rest_framework.routers", "line_number": 8, "usage_type": "name" }, { "api_name": "django.urls.path", "line_number": 15, "usage_type": "call" }, { "api_na...
33464392665
from openpyxl import load_workbook import os.path from openpyxl.styles import NamedStyle, Font, colors from ProjVar.var import * from Util.fromattime import * class Excel: def __init__(self, excel_file_path): self.sheet = None self.column_num = None self.row_num = None if os.path.e...
gaicommon/autowork
Util/excel.py
excel.py
py
4,113
python
en
code
0
github-code
71
[ { "api_name": "os.path.path.exists", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 13, "usage_type": "name" }, { "api_name": "openpyxl.load_workbook"...
10441748003
# -*- coding: utf-8 -*- """ Created on Sat Nov 21 14:52:12 2015 @author: Ilia """ from matplotlib import pyplot as plt, gridspec import numpy as np class _Direction(object): horizontal = 'H' vertical = 'V' transposed = 'T' normal = 'N' class _Plottable(object): def __init__(self,value,direction,...
iliar1987/RealTimeRecurrentLearning2
RTRL_plot.py
RTRL_plot.py
py
9,354
python
en
code
2
github-code
71
[ { "api_name": "numpy.copy", "line_number": 23, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 51, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 51, "usage_type": "name" }, { "api_name": "matplotlib.pypl...
6079856418
from pathlib import Path from bokeh.io import export_png from bokeh.layouts import gridplot import permutandis from permutandis.evaluation.rearrange_evaluation import RearrangeEvaluation from permutandis.solvers.mcts import MCTSSolver from permutandis.solvers.baseline import BaselineSolver from distributed import Cl...
ylabbe/permutandis
permutandis/examples/evaluate_solvers.py
evaluate_solvers.py
py
1,953
python
en
code
8
github-code
71
[ { "api_name": "distributed.LocalCluster", "line_number": 16, "usage_type": "call" }, { "api_name": "distributed.Client", "line_number": 17, "usage_type": "call" }, { "api_name": "permutandis.evaluation.rearrange_evaluation.RearrangeEvaluation", "line_number": 20, "usage_t...
42058566062
import torch from torch.utils import data from torch import nn from torch.optim import lr_scheduler import os import time from tqdm import tqdm import numpy as np from PIL import Image, ImageDraw import argparse import os from datasets.cifar10_noise import get_datasets import random import torch.backends.cudnn as cudnn...
weijiawu/Classification_with_Cleanlab
Train_CIFAR.py
Train_CIFAR.py
py
10,834
python
en
code
9
github-code
71
[ { "api_name": "os.environ", "line_number": 22, "usage_type": "attribute" }, { "api_name": "argparse.ArgumentParser", "line_number": 24, "usage_type": "call" }, { "api_name": "logging.info", "line_number": 74, "usage_type": "call" }, { "api_name": "datasets.cifar10...
31352274593
# [ Plague Dr. ] # - - - - - - - - - - - - - - - - - - - - - - - - - - - # from bs4 import BeautifulSoup as bs import requests as rq from .plPlugins import Counter # - - - - - - - - - - - - - - - - - - - - - - - - - - - # coinmarketcap = 'https://coinmarketcap.com' pages = '/?page=' # - - -...
arefmokhtari/plself
scripts/coinmarketcap.py
coinmarketcap.py
py
2,449
python
en
code
12
github-code
70
[ { "api_name": "requests.get", "line_number": 26, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 27, "usage_type": "call" }, { "api_name": "plPlugins.Counter", "line_number": 48, "usage_type": "call" } ]
16783770009
import pyautogui,cv2,numpy as np,time,tkinter from tkinter import simpledialog def ask_for_field_status(): return "sow" root=tkinter.Tk() root.withdraw() return simpledialog.askstring("Input","If fields are already sown enter: sow\nelse enter: harvest") def check_ad(last_time): if last_tim...
aditya-garg-09-01-2002/game_automation
control_ops.py
control_ops.py
py
3,797
python
en
code
0
github-code
71
[ { "api_name": "tkinter.Tk", "line_number": 5, "usage_type": "call" }, { "api_name": "tkinter.simpledialog.askstring", "line_number": 7, "usage_type": "call" }, { "api_name": "tkinter.simpledialog", "line_number": 7, "usage_type": "name" }, { "api_name": "time.time...
74269956388
from django.conf.urls import patterns, include, url from DAS_core.views import * from django.contrib import admin from django.views.generic import TemplateView admin.autodiscover() urlpatterns = patterns('', url('^', include('django.contrib.auth.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^h...
jefbsi20111/DAS
src_DAS/urls.py
urls.py
py
1,048
python
en
code
0
github-code
71
[ { "api_name": "django.contrib.admin.autodiscover", "line_number": 6, "usage_type": "call" }, { "api_name": "django.contrib.admin", "line_number": 6, "usage_type": "name" }, { "api_name": "django.conf.urls.patterns", "line_number": 8, "usage_type": "call" }, { "api...
20575868481
import numpy as np import matplotlib.pyplot as plt plt.rcParams['font.size'] = '20' # helper functions def getXY(matrix, type): try: x_data = [] y_data = [] if type == 1: for val in matrix: x_data.append(val[0]) y_data.append(val[1]) elif...
bshumin/Projects
Python/Tracking Systems/Lab1/lab1.py
lab1.py
py
4,280
python
en
code
0
github-code
71
[ { "api_name": "matplotlib.pyplot.rcParams", "line_number": 3, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 3, "usage_type": "name" }, { "api_name": "numpy.empty", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.app...
24702352496
#!/usr/bin/env python3 import numpy as np import matplotlib.pyplot as plt from functions import read_hier path = 'cosmo_sim_1d/gaussian_ICs/' folder_name = '/hierarchy/' plots_folder = 'spectra' j = 0 for j in range(11): # j = 0 moments_filename = 'output_hierarchy_{0:04d}.txt'.format(j) moments_file = ...
mandarmk9/eft_code
moment_an.py
moment_an.py
py
1,361
python
en
code
0
github-code
70
[ { "api_name": "numpy.genfromtxt", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.fft.fft", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.fft", "line_numbe...
12443379594
from PyQt5 import QtWidgets from telleUI import Ui as telle from followUp_CC import Ui as followup from followUp_PL import Ui as followupPL class Ui(QtWidgets.QWidget): def __init__(self, priv, parentWin, mycursor, result, user, product, recontact=None): #super(Ui, self).__init__() #uic.loadUi('ass...
NathanielClarence/telemarketingdb
mainFiles/searchResult.py
searchResult.py
py
10,221
python
en
code
0
github-code
71
[ { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 6, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWidgets", "line_number": 6, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QVBoxLayout", "line_number": 27, "usage_type": "call" }, { "api_name":...
36763771996
from PIL import Image from PIL import ImageDraw from PIL import ImageFont import re import sys imgw=0 imgh=0 scalex=0 scaley=0 #img = Image.new("RGB",(300,300),"red") #img.save("./test.jpg") def getScale(width, height, lines): wordnum=0 for line in lines: words = re.split(":", line) if (len(wo...
takenoko564/app_tool
logic/tchart_gen/bin/tchart_gen.py
tchart_gen.py
py
4,752
python
en
code
0
github-code
71
[ { "api_name": "re.split", "line_number": 17, "usage_type": "call" }, { "api_name": "PIL.ImageDraw.Draw", "line_number": 29, "usage_type": "call" }, { "api_name": "PIL.ImageDraw", "line_number": 29, "usage_type": "name" }, { "api_name": "PIL.ImageFont.truetype", ...
72037027750
from .forms import UserRegistrationForm from django.shortcuts import render, redirect def register(request): if request.method == 'POST': form = UserRegistrationForm(request.POST) if form.is_valid(): print("Form is valid") form.save() return redirect('login') ...
quingo99/Job_Portal
final project/job_portal/users/views.py
views.py
py
483
python
en
code
0
github-code
71
[ { "api_name": "forms.UserRegistrationForm", "line_number": 7, "usage_type": "call" }, { "api_name": "django.shortcuts.redirect", "line_number": 11, "usage_type": "call" }, { "api_name": "forms.UserRegistrationForm", "line_number": 16, "usage_type": "call" }, { "ap...
22094230724
from . import views from django.urls import path app_name = 'release' urlpatterns = [ path('addAlbumRelease', views.AlbumView.as_view(), name='addNewAlbumRelease'), path('addSinglesRelease', views.SinglesView.as_view(), name='addNewSinglesRelease'), path('displayAlbum', views.DisplayAlbumView.as_view(), n...
charamirez05/ArtistManagementSystem
Artist/release/urls.py
urls.py
py
427
python
en
code
0
github-code
71
[ { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "django.urls.path", ...
26706924369
# Counting Sundays # Problem 19 # You are given the following information, but you may prefer to do some research for yourself. # # 1 Jan 1900 was a Monday. # Thirty days has September, # April, June and November. # All the rest have thirty-one, # Saving February alone, # Which has twenty-eight, rain or shine. # And on...
chjdev/euler
python/problem19.py
problem19.py
py
1,695
python
en
code
0
github-code
71
[ { "api_name": "itertools.takewhile", "line_number": 37, "usage_type": "call" } ]
36614320793
import logging import os import yaml import appdirs from mail_sender_daemon import app, APP_NAME logger = logging.getLogger(APP_NAME) os.environ["XDG_CONFIG_DIRS"] = "/etc" CONFIG_DIRS = ( appdirs.user_config_dir(APP_NAME), appdirs.site_config_dir(APP_NAME), os.path.abspath(os.path.join(app.root_path,...
aruhier/mail-sender-daemon
mail_sender_daemon/config.py
config.py
py
1,295
python
en
code
0
github-code
71
[ { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "mail_sender_daemon.APP_NAME", "line_number": 9, "usage_type": "argument" }, { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "appdi...
11351748193
from __future__ import division import torch import torch.nn as nn import torch.autograd as autograd class Jacobian(nn.Module): ''' Loss criterion that computes the trace of the square of the Jacobian. Arguments: n (int, optional): determines the number of random projections. If n=-1, ...
mebooster/mebooster
mebooster/synthetic_active/jacobian_augmentation.py
jacobian_augmentation.py
py
4,037
python
en
code
0
github-code
71
[ { "api_name": "torch.nn.Module", "line_number": 7, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 7, "usage_type": "name" }, { "api_name": "torch.zeros", "line_number": 36, "usage_type": "call" }, { "api_name": "torch.norm", "line_number...
18855045709
"""Creates an image from a numpy array of floating point depth data. Taken from https://github.com/ahundt/robotics_setup/blob/master/datasets/google_brain_robot_data/depth_image_encoding.py Examples: depth_array is a 2D numpy array of floating point depth data in meters. depth_rgb = FloatArrayToRgbImage(depth_a...
stepjam/RLBench
rlbench/backend/utils.py
utils.py
py
7,963
python
en
code
839
github-code
71
[ { "api_name": "numpy.clip", "line_number": 58, "usage_type": "call" }, { "api_name": "numpy.floor", "line_number": 91, "usage_type": "call" }, { "api_name": "numpy.uint32", "line_number": 96, "usage_type": "attribute" }, { "api_name": "numpy.divide", "line_num...
73097557029
#!/usr/bin/python3 import argparse import logging import slackclient import json import datetime class UserMap: def __init__(self, user_id_to_name): self._user_id_to_name = user_id_to_name def get_username(self, message): if message.get("user"): return self._user_id_to_name[messa...
k-stanislawek/slack_history_saver
main.py
main.py
py
3,867
python
en
code
0
github-code
71
[ { "api_name": "slackclient.SlackClient", "line_number": 23, "usage_type": "call" }, { "api_name": "datetime.datetime.fromtimestamp", "line_number": 62, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 62, "usage_type": "attribute" }, { "ap...
40681033391
from __future__ import annotations import dataclasses import typing from retro_data_structures.formats.mlvl import Mlvl from retro_data_structures.formats.script_object import InstanceId from retro_data_structures.properties import field_reflection from retro_data_structures.properties.base_property import BaseObject...
henriquegemignani/pwime
src/pwime/operations/script_instance.py
script_instance.py
py
5,659
python
en
code
1
github-code
71
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 14, "usage_type": "attribute" }, { "api_name": "retro_data_structures.formats.script_object.InstanceId", "line_number": 26, "usage_type": "name" }, { "api_name": "pwime.util.json_lib.JsonObject", "line_number": 28, "usa...
73677119270
import sys from discord.ext.commands import Cog, command, check from discord.utils import find from typing import List from bot.settings import CHANNEL_ID, FIELDS, TOPICS, STAGE_3_MODULES, PRONOUNS, SERVER_2020, SERVER_2022_CHANNEL_ID from bot.cogs.name import Name def is_in_guild(guild_id): async def predicate(...
LukeBriggsDev/Dave-The-Robot
bot/cogs/role_chooser.py
role_chooser.py
py
4,560
python
en
code
0
github-code
71
[ { "api_name": "discord.ext.commands.check", "line_number": 14, "usage_type": "call" }, { "api_name": "bot.settings.SERVER_2020", "line_number": 22, "usage_type": "name" }, { "api_name": "bot.settings.CHANNEL_ID", "line_number": 21, "usage_type": "argument" }, { "a...
72907729191
#!/usr/bin/python3 from requests import get def top_ten(subreddit): url = "https://api.reddit.com/r/{}?sort=hot&limit=10".format(subreddit) user_agent = "application/x-www-form-urlencoded" response = get(url, headers={'User-Agent': user_agent}) if response.status_code == 200: data = response....
jhudaz/holberton-system_engineering-devops
0x16-api_advanced/1-top_ten.py
1-top_ten.py
py
504
python
en
code
0
github-code
71
[ { "api_name": "requests.get", "line_number": 8, "usage_type": "call" } ]
14957004371
from typing import Dict, List from torch import Tensor, nn from modules.modeling.dynamic_blocks.base_dynamic_block import BaseDynamicBlock from modules.modeling.ops import ( DynamicQConvNormActivation, DynamicQSE4ResNet ) from modules.modeling.blocks import ( FusedMBConvResBlock, FusedMBConvSEResBlock ) from ...
microsoft/Moonlit
SpaceEvo/modules/modeling/dynamic_blocks/dynamic_efficientnetv2_block.py
dynamic_efficientnetv2_block.py
py
6,162
python
en
code
35
github-code
71
[ { "api_name": "modules.modeling.dynamic_blocks.base_dynamic_block.BaseDynamicBlock", "line_number": 15, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 17, "usage_type": "name" }, { "api_name": "torch.nn.ReLU", "line_number": 17, "usage_type": "attribu...
5077691628
import discord from discord.ext import commands from Helpers import EmbedHelper as embed import urbandictionary as ud class CMD_UrbanDictionary: def __init__ (self, client): self.client = client @commands.command(pass_context = True) async def urban (self, ctx, *searchItem): author = ctx.m...
Dmunch04/sam-search-bot
Commands/Search/UrbanDictionaryCommand.py
UrbanDictionaryCommand.py
py
1,497
python
en
code
1
github-code
71
[ { "api_name": "Helpers.EmbedHelper.SpecifyErrorEmbed", "line_number": 21, "usage_type": "call" }, { "api_name": "Helpers.EmbedHelper", "line_number": 21, "usage_type": "name" }, { "api_name": "urbandictionary.define", "line_number": 27, "usage_type": "call" }, { "...
11503579772
import torch, torch.nn as nn, torch.nn.functional as F, numpy as np ''' Two implementations, chosen at bottom of file. functorch based PNP solver. Requires a decent initial estimate. Actually opencv solvePnP is not very good unless you use the iterative method with an initial estimate, which is about as good as my...
steplee/steplee.github.io
extraPages/xray/pysrc/solver/pnp.py
pnp.py
py
6,967
python
en
code
2
github-code
71
[ { "api_name": "numpy.arccos", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.trace", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.linalg.norm", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.linalg", "line_n...
21136356695
from typing import Iterable, Optional import numpy as np import pandas as pd from ..core.core import ModelType from ..datasets.base import Dataset from .base import BaseModel, ModelPredictionResults class PrecookedModel(BaseModel): """A dummy model for internal usage.""" def __init__( self, ...
Giskard-AI/giskard
giskard/models/_precooked.py
_precooked.py
py
2,473
python
en
code
2,258
github-code
71
[ { "api_name": "base.BaseModel", "line_number": 11, "usage_type": "name" }, { "api_name": "datasets.base.Dataset", "line_number": 16, "usage_type": "name" }, { "api_name": "base.ModelPredictionResults", "line_number": 17, "usage_type": "name" }, { "api_name": "core...