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
16472178151
import argparse import hashlib import logging import time import spacy import config logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) logger = logging.getLogger(__name__) class MEDLINESpacySents: def __init__(self, medline_abstracts, output_fname): self.medli...
IBM/aihn-ucsd
amil/preprocess/_2_spacy_sents.py
_2_spacy_sents.py
py
1,808
python
en
code
18
github-code
36
[ { "api_name": "logging.basicConfig", "line_number": 10, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 10, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "spacy.load", ...
74494760743
# -*- coding: utf-8 -*- from selenium import webdriver from lxml import etree from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from urllib.parse import quote driver = webdriver.Chrome() def get_list_pa...
xieys/webSpider
bossSpider/crawler.py
crawler.py
py
2,342
python
en
code
0
github-code
36
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 9, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 9, "usage_type": "name" }, { "api_name": "lxml.etree.HTML", "line_number": 16, "usage_type": "call" }, { "api_name": "lxml.etree...
11043698970
import pytest from RiceClassifier.config.configuration import ( ConfigurationManager, YAMLConfigReader, FilesystemDirectoryCreator ) from RiceClassifier.components.prepare_base_model import ( BaseModelLoader, BaseModelUpdater, FullModelPreparer ) from RiceClassifier.logger import logger from RiceClassifier.pipe...
nasserml/End-To-End_Rice-Classification-Project
tests/test_RiceClassifier/test_pipeline/test_stage_02_prepare_base_model.py
test_stage_02_prepare_base_model.py
py
2,303
python
en
code
0
github-code
36
[ { "api_name": "RiceClassifier.config.configuration.ConfigurationManager", "line_number": 15, "usage_type": "call" }, { "api_name": "RiceClassifier.config.configuration.YAMLConfigReader", "line_number": 16, "usage_type": "call" }, { "api_name": "RiceClassifier.config.configuration...
74198666023
"""Example: Message instance conversion.""" from __future__ import annotations import importlib from typing import TYPE_CHECKING import numpy if TYPE_CHECKING: from typing import Any NATIVE_CLASSES: dict[str, Any] = {} def to_native(msg: Any) -> Any: # noqa: ANN401 """Convert rosbags message to native m...
cmrobotics/rosbags
docs/examples/use_with_native.py
use_with_native.py
py
1,573
python
en
code
0
github-code
36
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 10, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 16, "usage_type": "name" }, { "api_name": "importlib.import_module", ...
72167501223
#!/usr/bin/env python3 import sys import subprocess from pathlib import Path from cv19 import CV19ROOT def run_pylint(): """ Run the Pylint test on the module and some other files in the repository. Automatically ran on every pull request via GitHub actions. """ # Messages/warnings/errors to ena...
Queens-Physics/quaboom
test/linters/pylint.py
pylint.py
py
1,985
python
en
code
4
github-code
36
[ { "api_name": "pathlib.Path", "line_number": 28, "usage_type": "call" }, { "api_name": "cv19.CV19ROOT", "line_number": 28, "usage_type": "argument" }, { "api_name": "subprocess.run", "line_number": 54, "usage_type": "call" }, { "api_name": "subprocess.CalledProces...
70268090023
import cv2 # import opencv from PIL import Image,ImageFilter from PIL import ImageEnhance import matplotlib.image as mp import os, sys import http.client import json import ssl import urllib.parse from os.path import expanduser #获取图片清晰度 def getImageVar(imgPath): image = cv2.imread(imgPath); img2gray = cv2.cvtCo...
YukiXueyan/faceUP
testPhoto.py
testPhoto.py
py
3,156
python
en
code
0
github-code
36
[ { "api_name": "cv2.imread", "line_number": 16, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 17, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 17, "usage_type": "attribute" }, { "api_name": "cv2.Laplacian", "...
37900995282
# -*- coding: utf-8 -*- import scrapy import re from copy import deepcopy from biquge.items import BiqugeIndexItem, BiqugeDetailsItem class BookspiderSpider(scrapy.Spider): name = 'bookspider' allowed_domains = ['biquge.com.cn'] start_urls = [ 'http://www.biquge.com.cn/xuanhuan/', 'http://w...
silenterofsea/silenter_read_story
9999_some_tiny_program/biquge/biquge/spiders/bookspider.py
bookspider.py
py
7,200
python
en
code
0
github-code
36
[ { "api_name": "scrapy.Spider", "line_number": 7, "usage_type": "attribute" }, { "api_name": "biquge.items.BiqugeDetailsItem", "line_number": 24, "usage_type": "call" }, { "api_name": "biquge.items.BiqugeIndexItem", "line_number": 44, "usage_type": "call" }, { "api...
15953309425
import os from typing import Dict from aiohttp_retry import Any from flask import Flask, request from langchain import PromptTemplate from twilio.twiml.messaging_response import MessagingResponse import json from langchain.llms import OpenAI from langchain.memory import ConversationSummaryBufferMemory from supabase i...
joseph-mcallister/motivate
flask-app/application.py
application.py
py
2,603
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 15, "usage_type": "call" }, { "api_name": "os.environ.get", "line_number": 17, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 17, "usage_type": "attribute" }, { "api_name": "os.environ.get", "line...
38904370760
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from sklearn import metrics import math from helpers import one_hot_embedding, get_device from MutualInformation import MutualInformation def relu_evidence(y): return F.relu(y) def calc_ece_softmax(softmax, label, bi...
Tom-Liii/PostNet-ESD
metrics.py
metrics.py
py
5,593
python
en
code
0
github-code
36
[ { "api_name": "torch.nn.functional.relu", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.nn.functional", "line_number": 11, "usage_type": "name" }, { "api_name": "torch.linspace", "line_number": 14, "usage_type": "call" }, { "api_name": "torch.ten...
7557787218
import sys import io import os import copy def Run(input, output): readline = io.BytesIO( os.read( input, os.fstat(input).st_size ) ).readline N = int(readline()) grass = [None for _ in range(N)] for i in range(N): grass[i] = [int(i) for i in readline().split()] prefi...
chenant2017/USACO
Silver/2021 Feb/green.py
green.py
py
1,137
python
en
code
2
github-code
36
[ { "api_name": "io.BytesIO", "line_number": 8, "usage_type": "call" }, { "api_name": "os.read", "line_number": 9, "usage_type": "call" }, { "api_name": "os.fstat", "line_number": 11, "usage_type": "call" }, { "api_name": "copy.deepcopy", "line_number": 26, ...
39124528339
import datetime class Comment: def __init__(self,game,userName,description): self.userName = userName self.game = game self.date = str(datetime.datetime.now()) self.description = description def dump(self): return { 'name': self.userName, 'game': ...
eduardomep/SpartanStore-Server
Comment.py
Comment.py
py
416
python
en
code
0
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 6, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 6, "usage_type": "attribute" } ]
1922570776
from problem_000 import * from prime import next_prime class Problem_007(Problem): def __init__(self): self.problem_nr = 7 self.input_format = (InputType.NUMBER_INT, 1, 1000000) self.default_input = 10001 self.description_str ='''By listing the first six prime numbers: 2, 3, 5, 7, ...
Kwasniok/ProjectEuler-Solver
src/problem_007.py
problem_007.py
py
628
python
en
code
1
github-code
36
[ { "api_name": "prime.next_prime", "line_number": 19, "usage_type": "call" } ]
37350115657
import numpy as np import pytest from ase.build import bulk from gpaw import GPAW, PW, Mixer from gpaw.mpi import world @pytest.mark.stress def test_pw_si_stress(in_tmp_dir): xc = 'PBE' si = bulk('Si') si.calc = GPAW(mode=PW(200), mixer=Mixer(0.7, 5, 50.0), xc=xc, ...
f-fathurrahman/ffr-learns-gpaw
my_gpaw/test/pw/test_si_stress.py
test_si_stress.py
py
1,105
python
en
code
0
github-code
36
[ { "api_name": "ase.build.bulk", "line_number": 12, "usage_type": "call" }, { "api_name": "gpaw.GPAW", "line_number": 13, "usage_type": "call" }, { "api_name": "gpaw.PW", "line_number": 13, "usage_type": "call" }, { "api_name": "gpaw.Mixer", "line_number": 14, ...
7024088458
import customtkinter class infoPage: def __init__(self, frame, mainColor, secondColor, thirdColor, fourthColor, textColor, openConvertPage): self.openConvertPage = openConvertPage self.create_page(frame, mainColor, secondColor, thirdColor, fourthColor, textColor) def create_page(self, frame, m...
LukaszButurla/xml-compiler-tkinter
ui/infoPage.py
infoPage.py
py
1,717
python
en
code
0
github-code
36
[ { "api_name": "customtkinter.CTkFrame", "line_number": 10, "usage_type": "call" }, { "api_name": "customtkinter.CTkFrame", "line_number": 17, "usage_type": "call" }, { "api_name": "customtkinter.CTkLabel", "line_number": 23, "usage_type": "call" }, { "api_name": "...
43043002916
import cv2 import numpy as np import face_recognition cap = cv2.VideoCapture(0) success,imgUser = cap.read() imgUser = cv2.cvtColor(imgUser, cv2.COLOR_BGR2RGB) encodeUser = face_recognition.face_encodings(imgUser) cap = cv2.VideoCapture(0) while True: success,img = cap.read() imgS = cv2.resize(i...
SRA-V/Exam-Cheater
Cheater.py
Cheater.py
py
1,623
python
en
code
1
github-code
36
[ { "api_name": "cv2.VideoCapture", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2RGB", "line_number": 8, "usage_type": "attribute" }, { "api_name": "face_recognition.fa...
495566217
import os import time import pytest from dagster.core.engine.child_process_executor import ( ChildProcessCommand, ChildProcessCrashException, ChildProcessDoneEvent, ChildProcessEvent, ChildProcessStartEvent, ChildProcessSystemErrorEvent, execute_child_process_command, ) class DoubleAStri...
helloworld/continuous-dagster
deploy/dagster_modules/dagster/dagster_tests/core_tests/engine_tests/test_child_process_executor.py
test_child_process_executor.py
py
2,339
python
en
code
2
github-code
36
[ { "api_name": "dagster.core.engine.child_process_executor.ChildProcessCommand", "line_number": 17, "usage_type": "name" }, { "api_name": "dagster.core.engine.child_process_executor.ChildProcessCommand", "line_number": 29, "usage_type": "name" }, { "api_name": "dagster.core.engine...
11944953948
# -*- coding: utf-8 -*- """ Created on Mon May 09 08:58:28 2016 @author: Jonatan """ from __future__ import division from spider_plot_2 import * def p2h_spider(): """ Make a spider plot where the different scenarios are compared for different scenarios. """ d = Drawing(400, 400) sp = SpiderC...
GersHub/P2HSweden
Power2Heat/Python/Modules/Plot/plot_spider_2.py
plot_spider_2.py
py
708
python
en
code
0
github-code
36
[ { "api_name": "reportlab.graphics.renderPDF.drawToFile", "line_number": 31, "usage_type": "call" } ]
16032798991
from modeling.resnet import resnet50 import torch.nn as nn import torch.nn.functional as F import torch class fpn_module(nn.Module): def __init__(self, numClass): super(fpn_module, self).__init__() # Top layer self.toplayer = nn.Conv2d(2048, 256, kernel_size=1, stride=1, padding=0) # Reduc...
ShenZheng2000/Semantic-Guided-Low-Light-Image-Enhancement
modeling/fpn.py
fpn.py
py
5,489
python
en
code
76
github-code
36
[ { "api_name": "torch.nn.Module", "line_number": 6, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 6, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.nn", "line_numb...
72664562664
import cv2 import numpy as np from matplotlib import pyplot as plt # loading image #img0 = cv2.imread('SanFrancisco.jpg',) img0 = cv2.imread('segmented_img.jpg') # converting to gray scale img = cv2.cvtColor(img0, cv2.COLOR_BGR2GRAY) # remove noise #img = cv2.GaussianBlur(gray,(3,3),0) # convolute with proper kerne...
kateriska/IBP
sobelExercise.py
sobelExercise.py
py
1,025
python
en
code
1
github-code
36
[ { "api_name": "cv2.imread", "line_number": 7, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 10, "usage_type": "attribute" }, { "api_name": "cv2.Laplacian", "l...
8248770144
"""Provides basic utilities to check status of Discord bot ping() pings the bot and checks Discord latency, message latency and database latency source() gets information on where to find source files and feedback server clearMessages() deletes messages from the last 14 days from a channel setAutoNicknames() true or f...
JoelLucaAdams/aberlink
src/AberLinkDiscord/cogs/utilities.py
utilities.py
py
6,872
python
en
code
0
github-code
36
[ { "api_name": "discord.ext.commands.Cog", "line_number": 34, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 34, "usage_type": "name" }, { "api_name": "discord.ext.commands.Context", "line_number": 45, "usage_type": "name" }, { "a...
18248471298
""" This file contains methods to visualize EKG data, clean EKG data and run EKG analyses. Classes ------- EKG Notes ----- All R peak detections should be manually inspected with EKG.plotpeaks method and false detections manually removed with rm_peak method. After rpeak examination, NaN data can be accounted for by ...
CardioPy/CardioPy
cardiopy/ekg.py
ekg.py
py
87,636
python
en
code
7
github-code
36
[ { "api_name": "os.path.join", "line_number": 100, "usage_type": "call" }, { "api_name": "os.path", "line_number": 100, "usage_type": "attribute" }, { "api_name": "pandas.Series", "line_number": 131, "usage_type": "call" }, { "api_name": "pandas.Series", "line_...
20015190759
import math import datetime # Literal är en konstant värde i koden s = 'This is String' s2 = "This is also another String" # man kan placera text på flera olika rader redan här s3 = '''This is a triple String''' sEmpty = ' ' # problem = 'this won't work' solution = "This os how it´s done" orThatWay = ' "like that"...
yararajjoub/pythonModulo
Modul3/Strings.py
Strings.py
py
2,088
python
sv
code
0
github-code
36
[ { "api_name": "math.pi", "line_number": 25, "usage_type": "attribute" }, { "api_name": "datetime.datetime.now", "line_number": 54, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 54, "usage_type": "attribute" } ]
438511318
# -*- coding: utf_8 -*- #pytho3.5 import csv import urllib.request import lxml from bs4 import BeautifulSoup import re import codecs # -------------------- main -------------------- if __name__ == '__main__': #2014-2016年に東京と中山で行われた全大会・全日数・全ラウンドの勝敗データを取得 #Webページ(HTML)の取得 # for year in [2014]: # for place i...
Ryota819/Data
競馬/20180501/keiba_blood_to_csv.py
keiba_blood_to_csv.py
py
2,462
python
en
code
0
github-code
36
[ { "api_name": "urllib.request.request.urlopen", "line_number": 35, "usage_type": "call" }, { "api_name": "urllib.request.request", "line_number": 35, "usage_type": "attribute" }, { "api_name": "urllib.request", "line_number": 35, "usage_type": "name" }, { "api_nam...
74082781542
# import numpy as np # from sympy import Symbol, Poly, simplify, re, im # from dispersion_relation import longitudinal_disp, transverse_disp # # Number of data points # # N = 10 # k = Symbol('k') # S0 = Symbol('S0') # w = Symbol('w') # S0 = 0.4 # w_array = np.linspace(100,1E7,5) # for w in w_array: # disp_rel =...
tigeryst/alcbl
Numerical Simulation/source/archive/test_solve.py
test_solve.py
py
3,330
python
en
code
0
github-code
36
[ { "api_name": "matplotlib.pyplot.rc", "line_number": 38, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 38, "usage_type": "name" }, { "api_name": "numpy.linspace", "line_number": 49, "usage_type": "call" }, { "api_name": "numpy.logspace"...
36445667629
"""add latest updates Revision ID: 9d2bc5f28130 Revises: 98b564f17b54 Create Date: 2021-02-20 18:07:38.182527 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '9d2bc5f28130' down_revision = '98b564f17b54' branch_labels = None depends_on = None def upgrade(): ...
mhelmetag/mammoth
alembic/versions/9d2bc5f28130_add_latest_updates.py
9d2bc5f28130_add_latest_updates.py
py
898
python
en
code
1
github-code
36
[ { "api_name": "alembic.op.create_table", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy.Integ...
18316291673
import abc import devtools from typing import Any, AsyncIterator, Optional import kubernetes_asyncio.watch from servo.logging import logger class BaseKubernetesHelper(abc.ABC): @classmethod @abc.abstractmethod async def watch_args(cls, api_object: object) -> AsyncIterator[dict[str, Any]]: ... ...
opsani/servox
servo/connectors/kubernetes_helpers/base.py
base.py
py
1,920
python
en
code
6
github-code
36
[ { "api_name": "abc.ABC", "line_number": 10, "usage_type": "attribute" }, { "api_name": "abc.abstractmethod", "line_number": 12, "usage_type": "attribute" }, { "api_name": "typing.AsyncIterator", "line_number": 13, "usage_type": "name" }, { "api_name": "typing.Any"...
14863334950
from argparse import ArgumentParser from screenshot_handler.screen_grabber import ScreenGrabber def read_arguments(): parser = ArgumentParser() parser.add_argument('-d', '--dest-folder', help='Destination folder for the images') parser.add_argument('-m', '--monitor', help='Dimensions for cropped screensho...
Luisetex/HexAI
grab_images.py
grab_images.py
py
799
python
en
code
5
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 6, "usage_type": "call" }, { "api_name": "screenshot_handler.screen_grabber.ScreenGrabber", "line_number": 21, "usage_type": "call" } ]
38659585982
from django.forms.models import model_to_dict from django.http import JsonResponse import re class JsonBaseMixin: json_response_class = JsonResponse response_type = 'text/http' accepted_types = ['text/http', 'application/json'] def dispatch(self, response, *args, **kwargs): accept = response.META.get('HTTP_ACCEP...
niklasmh/it1901-band-booking-project
json_views/views.py
views.py
py
2,002
python
en
code
1
github-code
36
[ { "api_name": "django.http.JsonResponse", "line_number": 6, "usage_type": "name" }, { "api_name": "django.forms.models.model_to_dict", "line_number": 35, "usage_type": "call" }, { "api_name": "django.forms.models.model_to_dict", "line_number": 44, "usage_type": "call" }...
27519507809
from flask import Flask,render_template,request,redirect,url_for import urllib import urllib.request from bs4 import BeautifulSoup import os import json import pandas as pd import numpy as np import matplotlib.pyplot as plt plt.style.use('ggplot') app = Flask(__name__) app.secret_key="flash message" @app.route('/') d...
mousaa32/web-scrapping
expat-coinAfrique.py
expat-coinAfrique.py
py
9,320
python
en
code
0
github-code
36
[ { "api_name": "matplotlib.pyplot.style.use", "line_number": 10, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style", "line_number": 10, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 10, "usage_type": "name" }, { "api_na...
8695805257
from lxml import etree from sys import stdout, stderr def mk_comment(text): return '/*'+text.strip(' ')+'*/\n' header_gen = u"""var wl = require('./build/Release/wayland_client'); var interfaces = {}; exports.interfaces = interfaces; """ interface_template = u"""function %(name)s(proxy) { this.proxy = proxy; ...
cheery/node-wayland
tools/nodeland-scanner.py
nodeland-scanner.py
py
4,464
python
en
code
61
github-code
36
[ { "api_name": "sys.stderr.write", "line_number": 71, "usage_type": "call" }, { "api_name": "sys.stderr", "line_number": 71, "usage_type": "name" }, { "api_name": "sys.stderr.write", "line_number": 72, "usage_type": "call" }, { "api_name": "sys.stderr", "line_n...
11044632470
import numpy as np from scipy.special import expit as sig import matplotlib.pyplot as plt def sigmoid(arr): return sig(arr) def sigmoid_prime(arr): arr = sigmoid(arr) return arr*(1.0-arr) def train(epoches,X,Y,weightHidden,weightOutput,lR): for epoch in range(epoches): hiddenIn = np.dot(X,we...
mars-boy/deeplearning_handson
neuralnet.py
neuralnet.py
py
2,134
python
en
code
0
github-code
36
[ { "api_name": "scipy.special.expit", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.dot", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.dot", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.dot", "line_number":...
43701305099
from tkinter import * from errorMessage import ErrorMessage from asignarMedico import AsignarMedico import connection as con import customtkinter as ct class IngresoMedico: def __init__(self, parent): self.parent = parent self.win = Toplevel(parent) self.win.title("Ingreso Medico") ...
angelcast2002/proyecto2_BD_python
ingresoMedico.py
ingresoMedico.py
py
3,148
python
es
code
0
github-code
36
[ { "api_name": "customtkinter.CTkLabel", "line_number": 12, "usage_type": "call" }, { "api_name": "customtkinter.CTkLabel", "line_number": 14, "usage_type": "call" }, { "api_name": "customtkinter.CTkEntry", "line_number": 15, "usage_type": "call" }, { "api_name": "...
7375849160
#!/usr/bin/python3 import shamir import sqlite3 import rsa_encrypt import time import base64 import settings #Class to hold the database class db: name = "" key = "" def __init__(self): self.name = "" self.key = "" #add user secret to the secrets database def add_secret(username, name,...
sellenth/crow
shamir/code/shamir_gen.py
shamir_gen.py
py
3,462
python
en
code
2
github-code
36
[ { "api_name": "sqlite3.connect", "line_number": 24, "usage_type": "call" }, { "api_name": "settings.DBdir", "line_number": 24, "usage_type": "attribute" }, { "api_name": "rsa_encrypt.get_keys", "line_number": 43, "usage_type": "call" }, { "api_name": "settings.DBS...
29282168130
# encoding=utf-8 import config import datetime import threading import time # 每日删除config中网址宣传的Ip列表 def clear_config_ip_days(interval): config.url_ip_list.clear() threading.Timer(interval, clear_config_ip_days).start() # 开启某个任务,固定每日每时执行 def task_start_day_hour(task, which_hour=0, max_error=10, interval=86400...
gaowenhao/AdProject
tools.py
tools.py
py
757
python
zh
code
0
github-code
36
[ { "api_name": "config.url_ip_list.clear", "line_number": 10, "usage_type": "call" }, { "api_name": "config.url_ip_list", "line_number": 10, "usage_type": "attribute" }, { "api_name": "threading.Timer", "line_number": 11, "usage_type": "call" }, { "api_name": "date...
28248113208
from telebot.types import Message from loader import bot from database.orm import User from states.states import UserStates from keyboards.inline.inline import get_language_keyboard from utils.utils import get_user_state from telebot.callback_data import CallbackData ru_lang = CallbackData('ru_RU', prefix="search") ...
makushatnik/travelbot
handlers/custom_handlers/language.py
language.py
py
1,900
python
en
code
0
github-code
36
[ { "api_name": "telebot.callback_data.CallbackData", "line_number": 9, "usage_type": "call" }, { "api_name": "telebot.types.Message", "line_number": 13, "usage_type": "name" }, { "api_name": "database.orm.User.get_or_none", "line_number": 17, "usage_type": "call" }, { ...
27379695129
import os import numpy as np import tensorflow as tf from flask import Flask, request, jsonify from tensorflow.keras.preprocessing import image import tensorflow_hub as hub from PIL import Image import io import cv2 import uuid import datetime import random import firebase_admin from firebase_admin import credentials,...
nzwhd/wearit_cloud
app.py
app.py
py
4,354
python
en
code
0
github-code
36
[ { "api_name": "firebase_admin.credentials.Certificate", "line_number": 17, "usage_type": "call" }, { "api_name": "firebase_admin.credentials", "line_number": 17, "usage_type": "name" }, { "api_name": "firebase_admin.initialize_app", "line_number": 18, "usage_type": "call"...
1765068678
import numpy as np import matplotlib.pyplot as plt from fact.io import read_h5py import pandas as pd import plotting import click import matplotlib if matplotlib.get_backend() == 'pgf': from matplotlib.backends.backend_pgf import PdfPages else: from matplotlib.backends.backend_pdf import PdfPages columns = [ ...
LukasBeiske/bachelor_thesis_cta
mrk421.py
mrk421.py
py
2,591
python
en
code
0
github-code
36
[ { "api_name": "matplotlib.get_backend", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 41, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 43, "usage_type": "call" }, { "api_name": "fact.io.read_h5p...
36916000678
import sys import random import osmnx as ox from time import sleep from direct.gui.DirectGui import DirectButton, DirectFrame from direct.showbase.ShowBase import ShowBase from direct.showbase.ShowBase import ShowBase from panda3d.core import Geom, GeomNode, GeomVertexFormat, GeomVertexData, GeomTriangles, GeomLines...
stressatoo/OpenPandaMap
main.py
main.py
py
12,224
python
en
code
0
github-code
36
[ { "api_name": "geopy.exc.GeocoderTimedOut", "line_number": 34, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 36, "usage_type": "call" }, { "api_name": "direct.showbase.ShowBase.ShowBase", "line_number": 40, "usage_type": "name" }, { "api_name"...
26721591942
import scrapy from scrapy.http import Request, Response from xdvideo.items import XdvideoItem class CrawlSpider(scrapy.Spider): name = 'xdvideo' allowed_domains = ['sme.xidian.edu.cn'] VIDEOS_PER_PAGE = 15 # start_urls = [f'https://sme.xidian.edu.cn/html/bkjj/zxkt/bdtwl1/list_92_{i}.html' for i in ra...
ttimasdf/XIDIAN-SME-OCW-Crawler
xdvideo/xdvideo/spiders/crawl.py
crawl.py
py
1,554
python
en
code
1
github-code
36
[ { "api_name": "scrapy.Spider", "line_number": 6, "usage_type": "attribute" }, { "api_name": "scrapy.http.Request", "line_number": 19, "usage_type": "call" }, { "api_name": "scrapy.http.Response", "line_number": 21, "usage_type": "name" }, { "api_name": "scrapy.htt...
40507960364
from django import template from apps.carts.models import * from apps.products.models import Category register = template.Library() @register.simple_tag(takes_context=True) def get_user_cart(context): request = context['request'] user = request.user try: cart = Cart.objects.get(client=user, is_or...
MansurSobirjonov/ogani
apps/products/templatetags/cart_tag.py
cart_tag.py
py
817
python
en
code
1
github-code
36
[ { "api_name": "django.template.Library", "line_number": 5, "usage_type": "call" }, { "api_name": "django.template", "line_number": 5, "usage_type": "name" }, { "api_name": "apps.products.models.Category.objects.all", "line_number": 34, "usage_type": "call" }, { "a...
36060935686
import requests url = "https://ngl.link/api/submit" headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36", "X-Requested-With": "XMLHttpRequest", "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", "Or...
zxrby/NGL.Link-Spammer
ok.py
ok.py
py
754
python
en
code
2
github-code
36
[ { "api_name": "requests.post", "line_number": 25, "usage_type": "call" } ]
3182784604
from datetime import datetime from pyquery import PyQuery as pquery import urllib3 urllib3.disable_warnings() import webbrowser def timestamp(): return datetime.now().strftime('%Y-%m-%d %H:%M:%S') def main(): active = 'https://webbtelescope.org/contents/media/images/2022/028/01G77Q8BTTSEB7ZSB2ZEY49HSQ' ...
bmikolaj/WebbScrap
main.py
main.py
py
1,853
python
en
code
0
github-code
36
[ { "api_name": "urllib3.disable_warnings", "line_number": 5, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 10, "usage_type": "name" }, { "api_name": "pyque...
15287690449
from __future__ import print_function import bisect ######################################################################## # official recepi from doc.python.org # # https://docs.python.org/2/library/bisect.html#searching-sorted-lists # ################################################...
MacHu-GWU/Angora
angora/DATA/binarysearch.py
binarysearch.py
py
6,977
python
en
code
0
github-code
36
[ { "api_name": "bisect.bisect_left", "line_number": 11, "usage_type": "call" }, { "api_name": "bisect.bisect_left", "line_number": 18, "usage_type": "call" }, { "api_name": "bisect.bisect_right", "line_number": 25, "usage_type": "call" }, { "api_name": "bisect.bise...
28224928026
from django.urls import path from . import views urlpatterns = [ # API routes path('', views.index, name='index'), path('library', views.library, name='library'), path('library/<int:song_id>', views.song, name='song'), path('setlists', views.setlists, name='setlists'), path('setlists/<int:id>'...
alexboneham/lyric-library
backend/apis/urls.py
urls.py
py
847
python
en
code
0
github-code
36
[ { "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", ...
19197360818
import cv2, os, random, colorsys, onnxruntime, string, time, argparse, uuid, logging import numpy as np from utils import Processing from glob import glob from PIL import Image, ImageDraw, ImageFont import matplotlib.pyplot as plt parser = argparse.ArgumentParser("license") parser.add_argument('-i',"--input", type = s...
Kurmangozhin/plates-recognition-yolo4
module.py
module.py
py
3,557
python
en
code
1
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 8, "usage_type": "call" }, { "api_name": "logging.basicConfig", "line_number": 10, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 10, "usage_type": "attribute" }, { "api_name": "utils.Pr...
35671367197
from django.contrib import admin from import_export import resources from import_export.admin import ImportExportModelAdmin from .models import Product, Inventory, OrderLine from import_export import fields from import_export.widgets import ForeignKeyWidget class ProductResource(resources.ModelResource): class Me...
HirokiShimoi/investoru_app
myapp/admin.py
admin.py
py
1,384
python
en
code
0
github-code
36
[ { "api_name": "import_export.resources.ModelResource", "line_number": 9, "usage_type": "attribute" }, { "api_name": "import_export.resources", "line_number": 9, "usage_type": "name" }, { "api_name": "models.Product", "line_number": 11, "usage_type": "name" }, { "a...
14551216933
from collections import defaultdict from pathlib import Path from typing import DefaultDict, List from jubeatools import song from jubeatools.formats.dump_tools import make_dumper_from_chart_file_dumper from jubeatools.formats.filetypes import ChartFile from jubeatools.utils import group_by from .. import commons as ...
Stepland/jubeatools
jubeatools/formats/konami/jbsq/dump.py
dump.py
py
3,650
python
en
code
4
github-code
36
[ { "api_name": "jubeatools.song.Song", "line_number": 16, "usage_type": "attribute" }, { "api_name": "jubeatools.song", "line_number": 16, "usage_type": "name" }, { "api_name": "jubeatools.song.iter_charts", "line_number": 18, "usage_type": "call" }, { "api_name": ...
10962724593
import base64 import json import requests from cassandra.cqlengine import connection from flask import make_response from flask_restful import Resource from conf.config import CASSANDRA_HOSTS, FRIEND_KEYSPACE from conf.service import USER_INFO_BULK_URL from model.friend import FriendRelation from service.common impor...
glimpseapp/glimpse-service-friend
service/get_friend_list.py
get_friend_list.py
py
1,574
python
en
code
0
github-code
36
[ { "api_name": "flask_restful.Resource", "line_number": 15, "usage_type": "name" }, { "api_name": "service.common.get_user_id_from_jwt", "line_number": 17, "usage_type": "call" }, { "api_name": "flask.make_response", "line_number": 19, "usage_type": "call" }, { "ap...
3051216703
#!/usr/bin/python # tetrous.py import wx #All functions and objects from the basic modules will start with a wx. APP_EXIT = 1 class tetrous(wx.Frame): #tetrous was changed from Example def __init__(self, parent, title, *args, **kwargs): super(tetrous, self).__init__(parent, title=title, ...
Shapez/Tetris_Project
tetrous.py
tetrous.py
py
1,269
python
en
code
0
github-code
36
[ { "api_name": "wx.Frame", "line_number": 9, "usage_type": "attribute" }, { "api_name": "wx.MenuBar", "line_number": 22, "usage_type": "call" }, { "api_name": "wx.Menu", "line_number": 23, "usage_type": "call" }, { "api_name": "wx.MenuItem", "line_number": 24, ...
70934643944
import cv2,os,shutil import numpy as np import argparse ap = argparse.ArgumentParser() ap.add_argument("-i", "--input", required=True,help="directory of the cropped odonates") ap.add_argument("-o", "--output", required=True,\ help="parent directory to which each one be stored") args = vars(ap.parse_args()) ...
robinjacobroy/Odonata_detection
sorting.py
sorting.py
py
2,940
python
en
code
0
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 6, "usage_type": "call" }, { "api_name": "os.mkdir", "line_number": 22, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 28, "usage_type": "call" }, { "api_name": "cv2.imread", "line_num...
29870177823
import sys import copy from collections import deque # Running script: given code can be run with the command: # python file.py, ./path/to/init_state.txt ./output/output.txt # Variable ordering heuristics: Most constrained variable + Most constraining variable # Value ordering heuristics: Least constraining value # I...
cs3243-ay1920s2-g30/sudoku
CS3243_P2_Sudoku_30_1.py
CS3243_P2_Sudoku_30_1.py
py
7,898
python
en
code
0
github-code
36
[ { "api_name": "collections.deque", "line_number": 152, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 214, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 219, "usage_type": "attribute" }, { "api_name": "sys.argv", "line...
830008449
#!/usr/bin/env python import re import lib.analysis.analyse as a import lib.analysis.component as a_comp import lib.dynamic.component as comp import lib.independence.fs as fs import lib.settings as s import lib.ui.menu as menu # The greater purpose of (functions in) this file is to # ask user what results are to be ...
Sebastiaan-Alvarez-Rodriguez/Meizodon
lib/analysis/menu.py
menu.py
py
8,592
python
en
code
4
github-code
36
[ { "api_name": "lib.independence.fs.isdir", "line_number": 28, "usage_type": "call" }, { "api_name": "lib.independence.fs", "line_number": 28, "usage_type": "name" }, { "api_name": "lib.independence.fs.lsonlydir", "line_number": 30, "usage_type": "call" }, { "api_n...
34203818933
import torch import torch.nn.functional as F def R_from_axis_angle(k: torch.tensor, theta: torch.tensor): if torch.norm(k) == 0.: return torch.eye(3) k = F.normalize(k, p=2., dim=0) kx, ky, kz = k[0], k[1], k[2] cos, sin = torch.cos(theta), torch.sin(theta) R = torch.zeros((3, 3)).to(k) ...
3dlg-hcvc/paris
utils/rotation.py
rotation.py
py
6,716
python
en
code
31
github-code
36
[ { "api_name": "torch.tensor", "line_number": 4, "usage_type": "attribute" }, { "api_name": "torch.norm", "line_number": 5, "usage_type": "call" }, { "api_name": "torch.eye", "line_number": 6, "usage_type": "call" }, { "api_name": "torch.nn.functional.normalize", ...
73934948902
# coding=utf-8 # 笑脸弹跳游戏 import pygame pygame.init() screen = pygame.display.set_mode([800,600]) keep_going = True # step1. 载入图像 # smilePic = pygame.image.load("smile.gif") smilePic = pygame.image.load("data/asprite.bmp") # 去除图像的白色背景和边框,貌似对gif无效 colorkey = smilePic.get_at((0,0)) smilePic.set_colorkey(colorkey) # step...
jellier/forPython2.7
SmileBounce.py
SmileBounce.py
py
1,375
python
en
code
0
github-code
36
[ { "api_name": "pygame.init", "line_number": 5, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 6, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 6, "usage_type": "attribute" }, { "api_name": "pygame.image.loa...
41289141746
import itertools from Atom import Atom class Struct: # computes the space when the instance is initialized def __init__(self, name, types): self.name = name self.types = types self.unpackaged = self._calculate_space_unpackaged() self.packaged = self._calculate_space_packaged() self.optimal = s...
mfaria724/ci3641-examen2
pregunta3/Struct.py
Struct.py
py
2,603
python
en
code
0
github-code
36
[ { "api_name": "Atom.Atom", "line_number": 25, "usage_type": "argument" }, { "api_name": "Atom.Atom", "line_number": 41, "usage_type": "argument" }, { "api_name": "Atom.Atom", "line_number": 55, "usage_type": "argument" }, { "api_name": "Atom.Atom", "line_numbe...
5951741639
from pymongo import MongoClient import tiktoken from configsecrets import mongoConnection def upload_to_mongo(data): # connect to mongodb with MongoClient(host=mongoConnection["host"], port=mongoConnection["port"], username=mongoConnection["login"], ...
wyler-m/docubot
load_documents.py
load_documents.py
py
1,704
python
en
code
0
github-code
36
[ { "api_name": "pymongo.MongoClient", "line_number": 7, "usage_type": "call" }, { "api_name": "configsecrets.mongoConnection", "line_number": 7, "usage_type": "name" }, { "api_name": "configsecrets.mongoConnection", "line_number": 8, "usage_type": "name" }, { "api_...
495151957
from collections import namedtuple from enum import Enum from dagster import check from dagster.core.definitions import Materialization, SolidHandle from dagster.core.definitions.events import EventMetadataEntry from dagster.core.serdes import whitelist_for_serdes from dagster.core.types.runtime_type import RuntimeTyp...
helloworld/continuous-dagster
deploy/dagster_modules/dagster/dagster/core/execution/plan/objects.py
objects.py
py
8,359
python
en
code
2
github-code
36
[ { "api_name": "collections.namedtuple", "line_number": 14, "usage_type": "call" }, { "api_name": "dagster.check.inst_param", "line_number": 17, "usage_type": "call" }, { "api_name": "dagster.check", "line_number": 17, "usage_type": "name" }, { "api_name": "dagster...
2786391582
from typing import Any, NoReturn, List from numpy import ndarray import socket import select import xml.etree.ElementTree as ElementTree import logging import errno from base_classes import PostProcessorBase class SocketServerPostProcessor(PostProcessorBase): """ Outputs data to clients as a TCP server. ...
1777TheVikings/FRC1777-Vision
postprocessors/socketserver.py
socketserver.py
py
2,969
python
en
code
1
github-code
36
[ { "api_name": "base_classes.PostProcessorBase", "line_number": 12, "usage_type": "name" }, { "api_name": "xml.etree.ElementTree.Element", "line_number": 25, "usage_type": "attribute" }, { "api_name": "xml.etree.ElementTree", "line_number": 25, "usage_type": "name" }, ...
3678024520
import copy import json import logging import os import pickle import warnings import numpy as np from typing import Any, List, Optional, Text, Dict, Tuple import rasa.utils.io from rasa.core.domain import Domain from rasa.core.featurizers import ( TrackerFeaturizer, FullDialogueTrackerFeaturizer, LabelTo...
msamogh/rasa-frames
rasa/core/policies/embedding_policy.py
embedding_policy.py
py
24,298
python
en
code
4
github-code
36
[ { "api_name": "tensorflow.contrib", "line_number": 27, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 28, "usage_type": "call" }, { "api_name": "rasa.core.policies.policy.Policy", "line_number": 31, "usage_type": "name" }, { "api_na...
6301255873
from flask import current_app, g, Flask, flash, jsonify, redirect, render_template, request, session, Response import logging import sqlite3 import json import requests from db import DB, KeyNotFound, BadRequest import datetime # Configure application app = Flask(__name__) app.config['JSON_SORT_KEYS'] = False # Ensu...
sarikam1/DatabaseModelling
Database Modelling/server/app.py
app.py
py
20,869
python
en
code
0
github-code
36
[ { "api_name": "flask.Flask", "line_number": 10, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 27, "usage_type": "call" }, { "api_name": "flask.jsonify", "line_number": 34, "usage_type": "call" }, { "api_name": "db.DB", "line_num...
36633682423
# I think there can be something cool to come from this eventually, I'm bad at picking colors import json from json import JSONDecoder class ColorSchemaDeserializationError(Exception): """ Exception deserializing color schema from JSON """ pass class ColorSchema: def __init__(self, name: str = None, ser...
picoevent/picoevent
PicoEvent/ColorSchema.py
ColorSchema.py
py
2,536
python
en
code
0
github-code
36
[ { "api_name": "json.loads", "line_number": 15, "usage_type": "call" }, { "api_name": "json.JSONDecoder", "line_number": 20, "usage_type": "name" }, { "api_name": "json.dumps", "line_number": 58, "usage_type": "call" } ]
22815747066
# This figure requires the grackle chemistry and cooling library. # Visit grackle.readthedocs.org for more information. from matplotlib import pyplot from utilities.testing import * from pygrackle.grackle_wrapper import * from pygrackle.fluid_container import FluidContainer from utilities.api import \ setup_fl...
enzo-project/enzo-method-paper-ApJ-2014
test_problems/IonizationBalance/enzo_paper_equilibrium_figure.py
enzo_paper_equilibrium_figure.py
py
7,156
python
en
code
0
github-code
36
[ { "api_name": "utilities.physical_constants.mass_hydrogen_cgs", "line_number": 37, "usage_type": "name" }, { "api_name": "utilities.api.setup_fluid_container", "line_number": 42, "usage_type": "call" }, { "api_name": "utilities.physical_constants.sec_per_Myr", "line_number": ...
12781939308
""" This file contains a function to get the coordinates from the GPS """ import serial import time import string import pynmea2 #GPS gets coordinates #UART communication protocols def getCoordinates(): port="/dev/ttyAMA0" ser=serial.Serial(port, baudrate=9600, timeout=0.5) dataout = pynmea2.NMEAStreamReader() ne...
JanPat/i-dont-know-go
GPS.py
GPS.py
py
481
python
en
code
0
github-code
36
[ { "api_name": "serial.Serial", "line_number": 13, "usage_type": "call" }, { "api_name": "pynmea2.NMEAStreamReader", "line_number": 14, "usage_type": "call" }, { "api_name": "pynmea2.parse", "line_number": 18, "usage_type": "call" } ]
24903490945
# Importing the Pillow library from PIL import Image, ImageDraw, ImageFont import os def text_wrapper(text, font, max_width): # Totally not stolen from eyong kevin https://gist.github.com/Eyongkevin/adbac2334f1355d8045111c264d80621 list_of_lines = [] if font.getlength(text) <= max_width: return te...
maticahacic/transcript_to_ebook
cover.py
cover.py
py
6,794
python
en
code
12
github-code
36
[ { "api_name": "PIL.Image.open", "line_number": 30, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 30, "usage_type": "name" }, { "api_name": "PIL.Image.open", "line_number": 31, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number"...
17140780409
# Creates a basic BLE Advertiser # Check the Advertiser.py class for more info import sys import time from datetime import datetime, timedelta from Advertiser import Advertiser # Advertise def main(): dt = datetime.now() print("Started at: %s" % dt) # Create advertiser adv = Advertiser() #...
horace1024/ble
run_adv.py
run_adv.py
py
900
python
en
code
0
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 13, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 13, "usage_type": "name" }, { "api_name": "Advertiser.Advertiser", "line_number": 17, "usage_type": "call" }, { "api_name": "time.sl...
6797316241
from django.utils.translation import ugettext_lazy as _ from utils.faker_factory import faker from ..mails import BaseMailView class ProjectsMemberRoleChangedMailView(BaseMailView): """ """ template_name = 'mails/projects/member_role_changed.html' mandatory_mail_args = [ 'name', 'us...
tomasgarzon/exo-services
service-exo-mail/mail/mailviews/projects_member_role_changed.py
projects_member_role_changed.py
py
818
python
en
code
0
github-code
36
[ { "api_name": "mails.BaseMailView", "line_number": 8, "usage_type": "name" }, { "api_name": "django.utils.translation.ugettext_lazy", "line_number": 19, "usage_type": "call" }, { "api_name": "utils.faker_factory.faker.uri_path", "line_number": 28, "usage_type": "call" }...
38665630567
import matplotlib.pyplot as plt import numpy as np from sympy import * x = Symbol('x') #! INPUT print(""" Bắt đầu chương trình Đây là phương pháp lặp đơn INPUT f(x) với f(x)=0 khoảng phân li nghiệm (a,b) Và thêm SaiSoE đã cho INPUT """) def Phi(x): # ** là mũ # return 1/(x-1.5) return -1/3*x**3 a = -2 b = ...
buihuyhau/HocLaiGTS
2LapDon/a.py
a.py
py
1,044
python
vi
code
0
github-code
36
[ { "api_name": "numpy.linspace", "line_number": 43, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 51, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 51, "usage_type": "name" }, { "api_name": "matplotlib.py...
36343463761
from django.shortcuts import render,redirect from django.core.paginator import Paginator from siteSettings.models import SiteSettings from django.contrib import messages from users.models import User from carts.models import * from .models import * def courses_page(request): if request.user.is_authenticated: ...
benyaminsh/Logofon
courses/views.py
views.py
py
2,657
python
en
code
0
github-code
36
[ { "api_name": "django.shortcuts.redirect", "line_number": 14, "usage_type": "call" }, { "api_name": "users.models.User.objects.filter", "line_number": 16, "usage_type": "call" }, { "api_name": "users.models.User.objects", "line_number": 16, "usage_type": "attribute" }, ...
40954037620
import nltk.classify.util from nltk.classify import NaiveBayesClassifier from nltk.corpus import movie_reviews def extract_features(word_list): return dict([(word, True) for word in word_list]) if __name__=='__main__': # Load positive and negative reviews positive_fileids = movie_reviews.fileids('pos') n...
pkankariya/CS5560_Knowledge_Discovery_Management
ICP_10/Sentiment_Analysis.py
Sentiment_Analysis.py
py
3,729
python
en
code
0
github-code
36
[ { "api_name": "nltk.corpus.movie_reviews.fileids", "line_number": 10, "usage_type": "call" }, { "api_name": "nltk.corpus.movie_reviews", "line_number": 10, "usage_type": "name" }, { "api_name": "nltk.corpus.movie_reviews.fileids", "line_number": 11, "usage_type": "call" ...
33639010391
''' main driver file. Responsible for handling user inputs and displaying current GameState ''' import pygame as p from PIL import Image import ChessEngine p.init() WIDTH = HEIGHT = 512 # or you can keep it as 512 DIMENSION = 8 # Chess boards are 8x8 SQ_SIZE = HEIGHT // DIMENSION IMAGES = dict.fromkeys(['wR', 'wN',...
aaliixii/Chess-Engine
ChessMain.py
ChessMain.py
py
3,651
python
en
code
0
github-code
36
[ { "api_name": "pygame.init", "line_number": 9, "usage_type": "call" }, { "api_name": "pygame.transform.scale", "line_number": 19, "usage_type": "call" }, { "api_name": "pygame.transform", "line_number": 19, "usage_type": "attribute" }, { "api_name": "pygame.image....
41786469041
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jan 22 20:10:01 2018 @author: Suveen """ from urllib.request import urlopen from bs4 import BeautifulSoup import ssl import re # Ignore SSL certificate errors ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NON...
SuveenMekala/Web_scraping
scrapetest.py
scrapetest.py
py
1,118
python
en
code
0
github-code
36
[ { "api_name": "ssl.create_default_context", "line_number": 15, "usage_type": "call" }, { "api_name": "ssl.CERT_NONE", "line_number": 17, "usage_type": "attribute" }, { "api_name": "urllib.request.urlopen", "line_number": 20, "usage_type": "call" }, { "api_name": "...
21421821259
from flask import Flask,render_template,request from pymongo import MongoClient import subprocess as sp import os mongo_server_url="mongodb://127.0.0.1:27017" client = MongoClient(mongo_server_url) app = Flask("chat app") #here i am going to defind database and collection name db ="lw" collection="flask" #We have to...
MDMOQADDAS/RegistrationApp
app.py
app.py
py
1,857
python
en
code
1
github-code
36
[ { "api_name": "pymongo.MongoClient", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 31, "usage_type": "call" }, { "api_name": "flask.request.for...
11352936054
import pandas as pd from sklearn.ensemble import RandomForestClassifier def train_random_forest(): # ****** Fit a random forest and extract predictions # forest = RandomForestClassifier(n_estimators = 100) # Fitting the forest may take a few minutes print("Fitting a random forest to labeled trai...
electronick1/stairs_examples
bag_of_words/bag_of_words/model.py
model.py
py
644
python
en
code
5
github-code
36
[ { "api_name": "sklearn.ensemble.RandomForestClassifier", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 17, "usage_type": "call" } ]
23944279921
import pyaudio import numpy as np from core.tools.buffer import AudioBuffer class PyAudio(): def __init__(self,verbose=True): """ instantiate pyaudio client and buffer for input stream recording to plot """ self.input_stream = None # on start will beinput stream from mic via pyaudio...
AlexKingsland/GuitarGuru
core/tools/pythonaudio.py
pythonaudio.py
py
1,200
python
en
code
0
github-code
36
[ { "api_name": "pyaudio.PyAudio", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.frombuffer", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.int16", "line_number": 20, "usage_type": "attribute" }, { "api_name": "pyaudio.paInt16", ...
17981838498
#!/usr/bin/python3 import requests import subprocess # to execute bash commands import sys try: check_for_package = subprocess.Popen(("dpkg", "-s", "html2text"), stdout=subprocess.PIPE) output = subprocess.check_output(("grep", "Status"), stdin=check_for_package.stdout) check_for_package.wait() opstr ...
technodict/Parcel_Tracking_CLI
tracking.py
tracking.py
py
1,131
python
en
code
2
github-code
36
[ { "api_name": "subprocess.Popen", "line_number": 7, "usage_type": "call" }, { "api_name": "subprocess.PIPE", "line_number": 7, "usage_type": "attribute" }, { "api_name": "subprocess.check_output", "line_number": 8, "usage_type": "call" }, { "api_name": "subprocess...
74791819944
import click import requests from tabulate import tabulate class github: def __init__(self,ghf): self.ghf=ghf # def repos(self,org): # if self.ghf.debug: click.echo("org:"+org+" token:"+self.ghf.token) # url='https://api.github.com/orgs/'+org+'/repos' # headers=self.ge...
DemandCube/github-flow
src/githubflow/github.py
github.py
py
4,784
python
en
code
5
github-code
36
[ { "api_name": "click.echo", "line_number": 31, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 32, "usage_type": "call" }, { "api_name": "click.echo", "line_number": 47, "usage_type": "call" }, { "api_name": "click.echo", "line_number": 49...
9194485366
# coding: utf-8 """ Lightly API Lightly.ai enables you to do self-supervised learning in an easy and intuitive way. The lightly.ai OpenAPI spec defines how one can interact with our REST API to unleash the full potential of lightly.ai # noqa: E501 OpenAPI spec version: 1.0.0 Contact: support@lightly...
tibe97/thesis-self-supervised-learning
lightly/openapi_generated/swagger_client/models/tag_arithmetics_request.py
tag_arithmetics_request.py
py
6,991
python
en
code
2
github-code
36
[ { "api_name": "lightly.openapi_generated.swagger_client.configuration.Configuration", "line_number": 54, "usage_type": "call" }, { "api_name": "six.iteritems", "line_number": 187, "usage_type": "call" }, { "api_name": "pprint.pformat", "line_number": 212, "usage_type": "c...
15708723931
import numpy as np import cv2 as cv import pandas as pd import random from math import ceil from sklearn.utils import shuffle dt = np.dtype(np.float32) def generator(batch_size=50): while True: for j in range(batch_size): Xs = [] Ys = [] count = 0 ...
JackDrinkwater/traffic_lights_detector
src/data_gen.py
data_gen.py
py
5,719
python
en
code
0
github-code
36
[ { "api_name": "numpy.dtype", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.float32", "line_number": 8, "usage_type": "attribute" }, { "api_name": "random.randint", "line_number": 18, "usage_type": "call" }, { "api_name": "random.randint", "lin...
18444612580
from django.contrib.auth import get_user_model from .models import Chat def create_chat(user_id1, user_id2, room_name): # Get participants participants = get_user_model().objects.filter(id__in=[user_id1, user_id2]) # Get Chat instance chat, _ = Chat.objects.get_or_create(name=room_name) # Add par...
Dosu333/studentity-backend
app/chat/utils.py
utils.py
py
456
python
en
code
0
github-code
36
[ { "api_name": "django.contrib.auth.get_user_model", "line_number": 6, "usage_type": "call" }, { "api_name": "models.Chat.objects.get_or_create", "line_number": 9, "usage_type": "call" }, { "api_name": "models.Chat.objects", "line_number": 9, "usage_type": "attribute" },...
20543918172
from copy import deepcopy from pandas import DataFrame as DF from scipy.spatial.transform import Slerp from scipy.spatial.transform import Rotation as R import pandas as pd import numpy as np import matplotlib.pyplot as plt import os id = 0 USE_SLERP = False class Sample: def __init__( self, source...
Oloqq/activity-recognition
recognizer/samples.py
samples.py
py
7,117
python
en
code
0
github-code
36
[ { "api_name": "pandas.DataFrame", "line_number": 18, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 19, "usage_type": "name" }, { "api_name": "pandas.DataFrame", "line_number": 20, "usage_type": "name" }, { "api_name": "pandas.DataFrame",...
31626287834
import os import bs4 from nltk.corpus.reader.api import CorpusReader from nltk.corpus.reader.api import CategorizedCorpusReader import nltk import time from sklearn.feature_extraction.text import TfidfVectorizer import pandas as pd from sklearn.cluster import DBSCAN import numpy as np from sklearn.metrics import silhou...
kyle1213/data-mining
_old/abstract_clustering_pca.py
abstract_clustering_pca.py
py
12,035
python
en
code
0
github-code
36
[ { "api_name": "nltk.corpus.reader.api.CategorizedCorpusReader", "line_number": 28, "usage_type": "name" }, { "api_name": "nltk.corpus.reader.api.CorpusReader", "line_number": 28, "usage_type": "name" }, { "api_name": "nltk.corpus.reader.api.CategorizedCorpusReader.__init__", ...
35829929249
from django.contrib import admin from .models import Page, Carousel class PageAdmin(admin.ModelAdmin): prepopulated_fields = {"slug": ("title",)} list_display = ( 'pk', 'title', 'slug', 'status', 'updated_at', ) list_filter = ('status', ) list_editable = ( ...
hakanyalcinkaya/kodluyoruz-org-python-ve-django-egitimi
kaft_clone/page/admin.py
admin.py
py
648
python
en
code
81
github-code
36
[ { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 5, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 5, "usage_type": "name" }, { "api_name": "django.contrib.admin.ModelAdmin", "line_number": 21, "usage_type": "attribute" ...
37348679197
from math import pi from collections import defaultdict import numpy as np from my_gpaw.kpt_descriptor import KPointDescriptor from .kpts import RSKPoint, to_real_space def create_symmetry_map(kd: KPointDescriptor): # -> List[List[int]] sym = kd.symmetry U_scc = sym.op_scc nsym = len(U_scc) compcon...
f-fathurrahman/ffr-learns-gpaw
my_gpaw/hybrids/symmetry.py
symmetry.py
py
6,817
python
en
code
0
github-code
36
[ { "api_name": "my_gpaw.kpt_descriptor.KPointDescriptor", "line_number": 10, "usage_type": "name" }, { "api_name": "numpy.zeros", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.concatenate", "line_number": 16, "usage_type": "call" }, { "api_name": ...
4543553383
import numpy as np import cv2 import matplotlib.pyplot as plt pt_1 = './pt_2D_1.txt' pt_2 = './pt_2D_2.txt' f1 = open(pt_1, 'r') f2 = open(pt_2, 'r') pt_1 = [] pt_2 = [] for line in f1.readlines(): x = line.rstrip('\n').split(' ') pt_1.append(x) for line in f2.readlines(): x = line.rstrip('\n').split('...
yehsin/CV_class_hw2
1/hw2-1.py
hw2-1.py
py
5,803
python
en
code
0
github-code
36
[ { "api_name": "numpy.array", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 26, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 28, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 29...
7373532913
from tornado import ioloop, httpclient as hc, gen, escape from . import _compat as _ from .graphite import GraphiteRecord from .utils import convert_to_format, parse_interval, parse_rule, HISTORICAL, interval_to_graphite, gen_log import math from collections import deque, defaultdict from itertools import islice LOG...
lixiaocheng18/testops
graphite/lib/beacon/alerts.py
alerts.py
py
8,351
python
en
code
0
github-code
36
[ { "api_name": "utils.gen_log", "line_number": 11, "usage_type": "name" }, { "api_name": "collections.deque", "line_number": 20, "usage_type": "name" }, { "api_name": "collections.deque.__getitem__", "line_number": 24, "usage_type": "call" }, { "api_name": "collect...
12427469941
import os, sys import logging import numpy as np import pandas as pd import matplotlib.pyplot as plt from collections import defaultdict import multiprocessing from functools import partial import gensim from gensim import models, matutils from gensim.corpora import MmCorpus, Dictionary from scipy.stats import entropy ...
karakayaonurr/Topic-Modelling-with-LDA-at-Twitter
lda_tuna.py
lda_tuna.py
py
8,596
python
en
code
0
github-code
36
[ { "api_name": "nltk.corpus.stopwords.words", "line_number": 19, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords", "line_number": 19, "usage_type": "name" }, { "api_name": "gensim.matutils.ismatrix", "line_number": 29, "usage_type": "call" }, { "api_na...
35219043762
from itertools import product import sys from bs4 import BeautifulSoup from selenium import webdriver import time import json import re sys.path.append('../../..') from lib import excelUtils from lib import httpUtils from lib import textUtil from lib.htmlEleUtils import getNodeText from lib.htmlEleUtils import getInner...
Just-Doing/python-caiji
src/work/Common/arp1/arp1.py
arp1.py
py
2,360
python
en
code
1
github-code
36
[ { "api_name": "sys.path.append", "line_number": 8, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "lib.httpUtils.getHtmlFromUrl", "line_number": 28, "usage_type": "call" }, { "api_name": "lib.httpUtil...
72485988903
import logging import sshpubkeys from django.core.exceptions import ValidationError LOGGER = logging.getLogger(__name__) def ssh_public_key_validator(public_key): ''' validate public key string ''' try: key = sshpubkeys.SSHKey(public_key) key.parse() except (sshpubkeys.InvalidKe...
bpereto/borg-hive
src/borghive/lib/validators.py
validators.py
py
495
python
en
code
35
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "sshpubkeys.SSHKey", "line_number": 15, "usage_type": "call" }, { "api_name": "sshpubkeys.InvalidKeyError", "line_number": 17, "usage_type": "attribute" }, { "api_name": "ss...
26299686956
import mysql.connector from datetime import datetime, timedelta import os import sys from pathlib import Path sql_pass =os.environ["MYSQLPASSWORD"] railway_host =os.environ["MYSQLHOST"] railway_user =os.environ["MYSQLUSER"] railway_database =os.environ["MYSQLDATABASE"] railway_port = int(os.environ["MYSQLPORT"...
uninin3141/task_manage_bot
app/dataset/db.py
db.py
py
2,618
python
en
code
0
github-code
36
[ { "api_name": "os.environ", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.environ", "line_n...
34125354328
import matplotlib.pyplot as pt import math dt = [1e-4, 2e-4, 5e-4, 1e-3, 2e-3, 5e-3, 1e-2] dtl = [math.log(x) for x in dt] dr = [1e-6, 2e-6, 4e-6, 2e-5, 9e-5, 6e-4, 1e-3] dr2 = [2e-2, 7e-2, 1e-1, 5e-1, 1e0, 1e9, 1e9] dr3 = [3e-1, 7e-1, 2e0, 8e0, 1.3e1, 1e9, 1e9] drl = [math.log(x) for x in dr] drl2 = [math.lo...
Platinum-Berlitz/TCCA-CCME
Library/Molecular Simulation/10/10_5.py
10_5.py
py
604
python
en
code
4
github-code
36
[ { "api_name": "math.log", "line_number": 5, "usage_type": "call" }, { "api_name": "math.log", "line_number": 9, "usage_type": "call" }, { "api_name": "math.log", "line_number": 10, "usage_type": "call" }, { "api_name": "math.log", "line_number": 11, "usage...
7813713746
"""add tree_parameters column to groups Create Date: 2022-05-02 21:53:26.704275 """ import enumtables # noqa: F401 import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = "20220502_215324" down_revision = "20220502_171903" branch_...
chanzuckerberg/czgenepi
src/backend/database_migrations/versions/20220502_215324_add_tree_parameters_column_to_groups.py
20220502_215324_add_tree_parameters_column_to_groups.py
py
696
python
en
code
11
github-code
36
[ { "api_name": "alembic.op.add_column", "line_number": 19, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 19, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 21, "usage_type": "call" }, { "api_name": "sqlalchemy.dialect...
69808754346
import numpy as np import matplotlib import matplotlib.pyplot as plt from PIL import Image from scipy import interpolate def floats_to_rgb(x, min=-1, max=1): """ Translates floats in [min, max) to valid RBG integers, in [0, 255]. Values are clamped to min and max. """ x = np.array(x) out = 25...
kr-colab/product-space-FEM
simulation/maps/map_utils.py
map_utils.py
py
9,643
python
en
code
2
github-code
36
[ { "api_name": "numpy.array", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.min", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.max", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 27, ...
4390242213
from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path("",views.index,name="loginmain"), path("login/",views.login,name="login"), path("logout/",views.logout,name="logout"), path("change/",views.change,name="change"), path("sendcode/",views.se...
Hardik01101/BlogSite-1
login/urls.py
urls.py
py
447
python
en
code
null
github-code
36
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "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", ...
26473361587
import cv2 import os import matplotlib.pyplot as plt import numpy as np def show_image(img): plt.imshow(img) plt.show() def show_class(idx): celing = (img[:, :] == [idx, idx, idx]) * 1.0 plt.imshow(celing) plt.show() # input image in order calibration INPUT_DIR = 'data/seg' PATH = os.path.join...
Naxalov/Seg2Dataset
main.py
main.py
py
858
python
en
code
0
github-code
36
[ { "api_name": "matplotlib.pyplot.imshow", "line_number": 8, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 8, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.show", "line_number": 9, "usage_type": "call" }, { "api_name": "matplo...
35029813116
from pyglossary.plugins.formats_common import * from struct import unpack from zlib import decompress from datetime import datetime enable = True lname = "appledict_bin" format = "AppleDictBin" description = "AppleDict Binary" extensions = (".dictionary", ".data",) extensionCreate = "" singleFile = True kind = "binar...
xiuxi/pyglossary
pyglossary/plugins/appledict_bin.py
appledict_bin.py
py
8,315
python
en
code
null
github-code
36
[ { "api_name": "lxml.html.fromstring", "line_number": 57, "usage_type": "call" }, { "api_name": "lxml.html.tostring", "line_number": 82, "usage_type": "call" }, { "api_name": "struct.unpack", "line_number": 128, "usage_type": "call" }, { "api_name": "datetime.datet...
27625090373
"""empty message Revision ID: 187613429bc6 Revises: f493fd2f04fa Create Date: 2023-03-11 20:54:05.004095 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '187613429bc6' down_revision = 'f493fd2f04fa' branch_labels = None depends_on = None def upgrade(): # ...
operatorhs/python-flask
flask-stu/migrations/versions/187613429bc6_.py
187613429bc6_.py
py
2,518
python
en
code
0
github-code
36
[ { "api_name": "alembic.op.create_table", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 22, "usage_type": "call" }, { "api_name": "sqlalchemy.Integ...
30838793023
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Nov 11 18:11:32 2021 @author: mathisagathe """ from pymongo import MongoClient client = MongoClient("10.35.7.4", username = "mathis", password = "MathisM21", authsource = "mathisdb") db=client.mathisdb collection = db["TripAdvisor"] r1 = {"country...
romanelollier/School_Project_BigData
requetes.py
requetes.py
py
1,040
python
fr
code
0
github-code
36
[ { "api_name": "pymongo.MongoClient", "line_number": 12, "usage_type": "call" } ]
25903248374
# -*- coding: utf-8 -*- # @Time : 2018/3/27 8:18 # @Author : glacier # @Email : 2284711614@qq.com # @File : get_plan_to_md.py # @Software: PyCharm import os,time import pymysql import datetime if __name__ == '__main__': # 格式化 # today = time.strftime('%Y-%m-%d',time.localtime(time.time())) today ...
GlacierBo/python_learn
python_base/get_plan_to_md.py
get_plan_to_md.py
py
1,501
python
en
code
0
github-code
36
[ { "api_name": "pymysql.connect", "line_number": 18, "usage_type": "call" } ]
41165592833
# Imported libraries import random as r import time as t import colorama as col # Functions # little helper function that converts an array of numbers into a string def arr_to_string(arr_nums): arr_str = "" for n in arr_nums: arr_str += str(n) + " " return arr_str # color(numb...
habit456/Python3_Projects_msc
bubble_sort.py
bubble_sort.py
py
4,224
python
en
code
1
github-code
36
[ { "api_name": "colorama.Fore", "line_number": 26, "usage_type": "attribute" }, { "api_name": "colorama.Fore", "line_number": 28, "usage_type": "attribute" }, { "api_name": "colorama.Fore", "line_number": 35, "usage_type": "attribute" }, { "api_name": "colorama.For...
42324051999
# schedule_post.py # Author: Daniel Edades # Last Modified: 11/21/2017 # Description: Formats a database row intended to represent a post scheduled # for a future time, then inserts that row into a database table for later # retrieval and posting at that actual time. import sqlite3 def schedule_post(tabl...
edadesd/sunrisebot
schedule_post.py
schedule_post.py
py
661
python
en
code
0
github-code
36
[ { "api_name": "sqlite3.connect", "line_number": 14, "usage_type": "call" } ]