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
2819034093
# py -m pip install pygame # py -m pip install pywin32 import pygame, sys, random import win32api import win32con import win32gui def hide_console(): window = win32gui.GetForegroundWindow() win32gui.ShowWindow(window, win32con.SW_HIDE) if __name__ == "__main__": hide_console() pygame.init() c...
SicerBrito/Scripts
Etica/bb/ssss.py
ssss.py
py
1,028
python
es
code
13
github-code
1
[ { "api_name": "win32gui.GetForegroundWindow", "line_number": 11, "usage_type": "call" }, { "api_name": "win32gui.ShowWindow", "line_number": 12, "usage_type": "call" }, { "api_name": "win32con.SW_HIDE", "line_number": 12, "usage_type": "attribute" }, { "api_name":...
35947567604
# -*- coding: utf-8 -*- import os import csv import matplotlib.pyplot as plt """ This script is for plotting each data (force/RMSE & TC(300K) diff from 112.1) with classified color by normalized distance """ if __name__ == '__main__': root=os.getcwd() tdata=["40"] node=["50","100","200","300","500"] ...
s-okugawa/HDNNP-tools
tools/Lmps-MD/plotRMSETCdata-d20L.py
plotRMSETCdata-d20L.py
py
2,726
python
en
code
0
github-code
1
[ { "api_name": "os.getcwd", "line_number": 12, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 28, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 51, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", ...
165943487
# Read the introduction about garden path sentences and study a few of the examples on Wikipedia. # Create a new Python file called garden.py. # Find at least 2 garden path sentences from the web or create them. # Store the sentences you have identified or created in a list called gardenpathSentences # Add the followin...
marianklo/natural_language_processing
garden.py
garden.py
py
2,916
python
en
code
0
github-code
1
[ { "api_name": "spacy.load", "line_number": 21, "usage_type": "call" }, { "api_name": "spacy.explain", "line_number": 50, "usage_type": "call" }, { "api_name": "spacy.explain", "line_number": 55, "usage_type": "call" } ]
29695897405
import scrapy from imdbtutorial.items import MovieItem, CastItem class ImdbSpider(scrapy.Spider): name = "imdb" allowed_domains = ["imdb.com"] base_url = "https://imdb.com" start_urls = ['https://www.imdb.com/chart/top' ,] def parse(self, response): # table coloums of all the movies ...
SIDDHANT9281/ImdbsCraper
imdbtutorial/imdbtutorial/spiders/imdb_spider.py
imdb_spider.py
py
2,013
python
en
code
0
github-code
1
[ { "api_name": "scrapy.Spider", "line_number": 3, "usage_type": "attribute" }, { "api_name": "scrapy.Request", "line_number": 20, "usage_type": "call" }, { "api_name": "imdbtutorial.items.MovieItem", "line_number": 25, "usage_type": "call" }, { "api_name": "imdbtut...
71187679394
from functools import lru_cache from typing import List, Dict import csv @lru_cache def read(path: str) -> List[Dict]: try: with open(path, encoding="utf-8") as file: fields, *jobs = csv.reader(file, delimiter=",", quotechar='"') list_jobs = [dict(zip(fields, job)) for job in jobs]...
FP-Coding/project-job-insights
src/insights/jobs.py
jobs.py
py
749
python
en
code
0
github-code
1
[ { "api_name": "csv.reader", "line_number": 10, "usage_type": "call" }, { "api_name": "functools.lru_cache", "line_number": 6, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 7, "usage_type": "name" }, { "api_name": "typing.Dict", "line_numb...
74390609314
import numpy as np import torch from torch import nn from torch.utils import data # 生成数据集 def synthetic_data(w, b, num_examples): """生成 y = Xw + b + 噪声。""" X = torch.normal(0, 1, (num_examples, len(w))) y = torch.matmul(X, w) + b y += torch.normal(0, 0.01, y.shape) return X, y.reshape((-1, 1)) i...
hello2mao/Learn-MachineLearning
DeepLearning/DiveIntoDeepLearning/3.LinearNetwork/3.3.LinearRegressionConcise.py
3.3.LinearRegressionConcise.py
py
1,623
python
en
code
1
github-code
1
[ { "api_name": "torch.normal", "line_number": 10, "usage_type": "call" }, { "api_name": "torch.matmul", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.normal", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.tensor", "line_numbe...
21382837069
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on: 2021/06/28 17:51 @Author: Merc2 ''' import numpy as np from pathlib import Path import openml import torch from torch.utils.data import Dataset class OPML(Dataset): def __init__(self, task=None, cv=0, train=True):# volkert # _, self.CV_NUM, _ ...
mhh0318/KDRVFL
data/opml.py
opml.py
py
1,110
python
en
code
0
github-code
1
[ { "api_name": "torch.utils.data.Dataset", "line_number": 13, "usage_type": "name" }, { "api_name": "torch.tensor", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.isnan", "line_number": 21, "usage_type": "call" } ]
71747047394
import urllib.request from django.http import response from django.http.response import HttpResponse from django.shortcuts import render from accounts.models import Order, Customer from humanitary_gift_shop.utils import checkout_session, random_string_generator, cookieCart from django.views.decorators.csrf import csrf_...
Code-Institute-Submissions/humanitary
checkout/views.py
views.py
py
2,101
python
en
code
0
github-code
1
[ { "api_name": "os.environ.get", "line_number": 11, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 11, "usage_type": "attribute" }, { "api_name": "stripe.api_key", "line_number": 12, "usage_type": "attribute" }, { "api_name": "accounts.models.Or...
12984950288
#!/usr/bin/env python import logging from urllib.parse import urljoin from atomic_utils import ( PYCON_TW_ROOT_URL, query_text, parse_out_href_gen, is_relative_href, is_visited_or_mark, ) # https://docs.python.org/3.6/library/logging.html#logrecord-attributes logging.basicConfig( format=( ...
moskytw/elegant-concurrency-lab
channel_operators.py
channel_operators.py
py
2,366
python
en
code
43
github-code
1
[ { "api_name": "logging.basicConfig", "line_number": 17, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 28, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 30, "usage_type": "call" }, { "api_name": "atomic_utils...
38256631414
import cv2 import face_recognition from django.conf import settings from .faceRecognition import findEncodings import os, numpy as np from .attendance import mark_attendance, get_Remarks from .models import Schedule import time class VideoCamera(object): t = Schedule.objects.get(is_active=True) def __init__(se...
coder-val/AMSFR
amsfr/employees/camera.py
camera.py
py
3,616
python
en
code
1
github-code
1
[ { "api_name": "models.Schedule.objects.get", "line_number": 11, "usage_type": "call" }, { "api_name": "models.Schedule.objects", "line_number": 11, "usage_type": "attribute" }, { "api_name": "models.Schedule", "line_number": 11, "usage_type": "name" }, { "api_name...
29389482192
from flask import Flask from flask import render_template, request, make_response, redirect, url_for import requests import random import json app = Flask(__name__) @app.route("/") def hello_world(): #retun 'hello' + home return "<p>Hello, App!</p>" @app.route('/home', methods=['GET']) def getTicTacToe(): ...
nkitanand/tictactoe_FrontEnd
app.py
app.py
py
4,499
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.make_response", "line_number": 18, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 18, "usage_type": "call" }, { "api_name": "json.dumps", ...
13330534487
from collections import deque class Solution: def minJumps(self, arr: List[int]) -> int: N = len(arr) common_vals = defaultdict(list) for idx, val in enumerate(arr): common_vals[val].append(idx) q = deque([N - 1]) min_jumps = {N - 1: 0} ...
edorado93/leetadaykeepsrustaway
January-Challenge-2022/[Day-15] Jump Game IV/bfs_dp_solution.py
bfs_dp_solution.py
py
1,123
python
en
code
1
github-code
1
[ { "api_name": "collections.deque", "line_number": 11, "usage_type": "call" } ]
39840653963
import argparse import sys from constants import ( IMPL_DEP_FILE_STR, OUTPUT_FILE_STR, ) from parser import Parser def main(): arg_parser = argparse.ArgumentParser( description="Control module for tracking implicit dependencies" ) arg_parser.add_argument( "-f", "--file", default=IM...
illumos/illumos-gate
usr/src/tools/smatch/src/smatch_scripts/implicit_dependencies/main.py
main.py
py
1,051
python
en
code
1,466
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 11, "usage_type": "call" }, { "api_name": "constants.IMPL_DEP_FILE_STR", "line_number": 15, "usage_type": "name" }, { "api_name": "constants.OUTPUT_FILE_STR", "line_number": 19, "usage_type": "name" }, { "api...
15959651810
from flask_app.config.mysqlconnection import connectToMySQL from flask_app import app from flask_app.models.user import User from flask import flash, session DB = "coding_dojo_wall" class Post: def __init__( self , data ): self.id = data['id'] self.user_id = data['user_id'] self.content = da...
tndodge/Python
coding_dojo_wall/flask_app/models/post.py
post.py
py
3,205
python
en
code
0
github-code
1
[ { "api_name": "flask_app.config.mysqlconnection.connectToMySQL", "line_number": 20, "usage_type": "call" }, { "api_name": "flask_app.config.mysqlconnection.connectToMySQL", "line_number": 29, "usage_type": "call" }, { "api_name": "flask_app.models.user.User", "line_number": 4...
279625670
from PIL import Image, ImageDraw from .hilbert import HilbertContext, hilbert_sequence COLOR_WHITE = (255, 255, 255) COLOR_BLACK = (0, 0, 0) COLOR_RED = (255, 0, 0) COLOR_GREEN = (0, 255, 0) COLOR_BLUE = (0, 0, 255) def draw_grid(image_draw, grid_size, square_size): for x in range(0, grid_size, square_size): ...
jtremesay/hilbert
hilbert/drawing.py
drawing.py
py
1,497
python
en
code
0
github-code
1
[ { "api_name": "PIL.Image.new", "line_number": 34, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 34, "usage_type": "name" }, { "api_name": "hilbert.HilbertContext", "line_number": 38, "usage_type": "call" }, { "api_name": "PIL.ImageDraw.Draw", ...
19546605494
import json import requests from loguru import logger from wb.services.tools import get_date class JWTApiClient: """Get Marketplace Statistics.""" def __init__(self, new_api_key: str): self.token = new_api_key self.base = "https://suppliers-api.wildberries.ru/public/api/" def build_hea...
prog1ckg/wildberries-rest-api
wb/services/rest_client/jwt_client.py
jwt_client.py
py
3,451
python
en
code
null
github-code
1
[ { "api_name": "requests.post", "line_number": 27, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 28, "usage_type": "call" }, { "api_name": "loguru.logger.info", "line_number": 30, "usage_type": "call" }, { "api_name": "loguru.logger", "line...
21646634617
import numpy as np import joblib from nltk.tokenize import RegexpTokenizer import tldextract import pandas as pd from urllib.parse import urlparse from typing import * # predict def predict(url): def parse_url(url: str) -> Optional[Dict[str, str]]: try: no_scheme = not u...
skiraz/cloud_project
predictor.py
predictor.py
py
2,848
python
en
code
0
github-code
1
[ { "api_name": "urllib.parse.urlparse", "line_number": 22, "usage_type": "call" }, { "api_name": "urllib.parse.urlparse", "line_number": 33, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 45, "usage_type": "call" }, { "api_name": "tldextra...
74917146594
__author__ = "Domen Gorjup" import os import glob import cv2 import time import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from tqdm import tqdm, tqdm_notebook import tools # IZBIRA SLIK IN NAČINA REKONSTRUKCIJE ############################################################### p...
domengorjup/pySfM
SfM_test_run.py
SfM_test_run.py
py
4,597
python
en
code
0
github-code
1
[ { "api_name": "os.path.dirname", "line_number": 37, "usage_type": "call" }, { "api_name": "os.path", "line_number": 37, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 37, "usage_type": "call" }, { "api_name": "glob.glob", "line_n...
10712107494
import numpy as np import matplotlib.pyplot as plt #extract values Jacobi1_10n,Jacobi2_10n,Jacobi3_10n,analytic1_10n,analytic2_10n,analytic3_10n = np.loadtxt("solution_10n.txt", usecols=(0,1,2,3,4,5), unpack=True) Jacobi1_100n,Jacobi2_100n,Jacobi3_100n,analytic1_100n,analytic2_100n,analytic3_100n = np.loadtxt("so...
raggsokker/fys3150
project2/solution.py
solution.py
py
2,800
python
en
code
0
github-code
1
[ { "api_name": "numpy.loadtxt", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.loadtxt", "line_number": 6, "usage_type": "call" }, { "api_name": "numpy.concatenate", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.concatenate", "l...
4516356754
import PIL.ImageDraw as ImageDraw import PIL.Image as Image import numpy as np import random WIDTH = 800 HEIGHT = int(3 * WIDTH / 4) image = Image.new("RGB", (WIDTH, HEIGHT)) draw = ImageDraw.Draw(image) # Attempt to use 2nd image to draw just the boundary by following orbit of boundary point image_2 =...
stschaef/LoG_M
Cones.py
Cones.py
py
4,617
python
en
code
1
github-code
1
[ { "api_name": "PIL.Image.new", "line_number": 10, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 10, "usage_type": "name" }, { "api_name": "PIL.ImageDraw.Draw", "line_number": 11, "usage_type": "call" }, { "api_name": "PIL.ImageDraw", "line_...
73263358115
import firebase_admin from firebase_admin import credentials from firebase_admin import db cred = credentials.Certificate("serviceAccountKey.json") firebase_admin.initialize_app(cred,{ "databaseURL" :"https://face-recognition-attenda-5a0b4-default-rtdb.firebaseio.com/" } ) ref = db.r...
pingDiablo/attendance-system
AddDataToDataBase.py
AddDataToDataBase.py
py
2,139
python
en
code
0
github-code
1
[ { "api_name": "firebase_admin.credentials.Certificate", "line_number": 4, "usage_type": "call" }, { "api_name": "firebase_admin.credentials", "line_number": 4, "usage_type": "name" }, { "api_name": "firebase_admin.initialize_app", "line_number": 5, "usage_type": "call" ...
8428176367
""" This script uses the classes implemented in make_tables.py to create the tables used in PISAM simulations. The data loaded to make the tables are in the form of fit parameters or data points for reactions rates and cross sections. The data is stored in the directory "Collision data for tables". I you add a reaction...
kristofferkvist/PISAM-HESEL
PISAM/make_tables_main.py
make_tables_main.py
py
7,111
python
en
code
0
github-code
1
[ { "api_name": "os.path.exists", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path", "line_number": 29, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number": 31, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_nu...
21334524678
import tweepy from tweepy import OAuthHandler from tweepy import Stream import sys consumer_key= 'hi' # Don't have these in the final consumer_secret= 'hi'# Don't have these in the final access_token= 'hi'# Don't have these in the final access_token_secret= 'hi' authorization = tweepy.OAuthHandler(consumer_key, consu...
amcurley/ContentGen-heroku
gpt/src/cursor.py
cursor.py
py
837
python
en
code
2
github-code
1
[ { "api_name": "tweepy.OAuthHandler", "line_number": 11, "usage_type": "call" }, { "api_name": "tweepy.API", "line_number": 14, "usage_type": "call" }, { "api_name": "tweepy.Cursor", "line_number": 18, "usage_type": "call" } ]
72430038754
"""Index view.""" from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator from django.shortcuts import redirect, render from later42.models.article import Article from later42.models.urls import URL def get(request): """Index view."""...
dntsk/later42
later42/views/index.py
index.py
py
1,503
python
en
code
0
github-code
1
[ { "api_name": "later42.models.urls.URL.objects.filter", "line_number": 15, "usage_type": "call" }, { "api_name": "later42.models.urls.URL.objects", "line_number": 15, "usage_type": "attribute" }, { "api_name": "later42.models.urls.URL", "line_number": 15, "usage_type": "n...
11807230528
import threading import time from functools import partial from queue import Empty import msgpack import zmq import infupy.backends.fresenius as fresenius zmqhost = '127.0.0.1' zmqport = 4201 freseniusport = 'COM6' def stateWorker(stopevent): context = zmq.Context() zmqsocket = context.socket(zmq.PUB) z...
jaj42/phystream
python/FresStream.py
FresStream.py
py
2,719
python
en
code
0
github-code
1
[ { "api_name": "zmq.Context", "line_number": 16, "usage_type": "call" }, { "api_name": "zmq.PUB", "line_number": 17, "usage_type": "attribute" }, { "api_name": "infupy.backends.fresenius.FreseniusComm", "line_number": 19, "usage_type": "call" }, { "api_name": "infu...
42370577435
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Nov 8 00:38:09 2023 @author: guangdafei """ import tushare as ts import pandas as pd import numpy as np import matplotlib.pyplot as plt plt.rcParams['font.sans-serif'] = ['SimHei'] token = "13bb0841c8a377221b39d9142f42bae2e2e9a897b9f692c75dd90d65" ...
akaGD-13/trove_bt2
main.py
main.py
py
1,493
python
en
code
0
github-code
1
[ { "api_name": "matplotlib.pyplot.rcParams", "line_number": 14, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 14, "usage_type": "name" }, { "api_name": "tushare.set_token", "line_number": 18, "usage_type": "call" }, { "api_name": "t...
1541036519
# -*- coding: utf-8 -*- """ Grabs 5 second chunks of voltage data being sampled at 100 Hz """ import serial import time import matplotlib.pyplot as plt import numpy as np from datetime import datetime import os from scipy import fftpack from scipy import signal ser = serial.Serial('COM3', 9600) time.s...
MCKersting12/EEG_DIY
python/grab_voltage_chunk.py
grab_voltage_chunk.py
py
1,842
python
en
code
1
github-code
1
[ { "api_name": "serial.Serial", "line_number": 16, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 17, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.subplot", "line_number": 38, "usage_type": "call" }, { "api_name": "matplotlib.pyplot"...
13741501932
import cv2 import os import os import sys import time import pickle import random import numpy as np os.environ["CUDA_VISIBLE_DEVICES"] = "0" # 读取数据集 总共8类 32, 64, 128 , 256尺寸 # os opencv 训练数据集 image_size = 32 def readImage(dir): totalImage = [] totalFlag = [] totalImageTemp = [] totalFlagTemp = [] ...
tchennech/graduateDesign
preperData.py
preperData.py
py
3,197
python
en
code
0
github-code
1
[ { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": 29, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 30, "usage_type": "call" }, { "api_name": "random.shuffle", "line_numb...
40363479768
__author__ = 'M_Nour' import numpy as np from scipy import stats from sklearn.semi_supervised import label_propagation from sklearn.metrics import classification_report, confusion_matrix,accuracy_score, f1_score, recall_score from collections import Counter # import marjan_dataset import dataset from imblearn...
marjan-nourollahi/PALS
My_Active_Learning.py
My_Active_Learning.py
py
10,383
python
en
code
0
github-code
1
[ { "api_name": "dataset.load_data", "line_number": 18, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.random.RandomState", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy....
42830860654
import speech_recognition as sr import pyttsx3 def recognize_speech_from_mic(recognizer, microphone): if not isinstance(recognizer, sr.Recognizer): raise TypeError("`recognizer` must be `Recognizer` instance") if not isinstance(microphone, sr.Microphone): raise TypeError("`microphone` must be...
Elysian01/AI-Chatbot
aichatbot/speech2text.py
speech2text.py
py
1,373
python
en
code
7
github-code
1
[ { "api_name": "speech_recognition.Recognizer", "line_number": 6, "usage_type": "attribute" }, { "api_name": "speech_recognition.Microphone", "line_number": 9, "usage_type": "attribute" }, { "api_name": "speech_recognition.RequestError", "line_number": 22, "usage_type": "a...
2628218849
import os import json import csv import datetime import requests from util import download_file def main(): #愛媛県のopendata url="https://www.pref.ehime.jp/opendata-catalog/dataset/2174/resource/7072/380008_ehime_covid19_patients.csv" file_name=download_file(url) #日付とその日の陽性者数をセットしていく d...
tamitami5c/corona-ehime-data
main.py
main.py
py
1,909
python
ja
code
0
github-code
1
[ { "api_name": "util.download_file", "line_number": 13, "usage_type": "call" }, { "api_name": "csv.reader", "line_number": 17, "usage_type": "call" }, { "api_name": "datetime.date.fromisoformat", "line_number": 29, "usage_type": "call" }, { "api_name": "datetime.da...
36909495555
from django.shortcuts import render from django.http import HttpResponse, JsonResponse from django.template import loader from appprueba.forms import ContactoForm from datetime import datetime from django.contrib import messages from django.core.mail import send_mail from django.conf import settings # Create your ...
nicofe88/DjangoB
appprueba/views.py
views.py
py
6,053
python
es
code
1
github-code
1
[ { "api_name": "appprueba.forms.ContactoForm", "line_number": 17, "usage_type": "call" }, { "api_name": "django.contrib.messages.success", "line_number": 19, "usage_type": "call" }, { "api_name": "django.contrib.messages", "line_number": 19, "usage_type": "name" }, { ...
7084636942
import pygame import socket from effects import * import json from random import randint import sys pygame.init() s = socket.socket() port = 5555 s.bind(('',port)) s.listen(5) def main(): number_client = "" while type(number_client) != int: try: number_client = int(input("Combien de joueur...
Alexander7474/Sky_Shooter_Online
server.py
server.py
py
3,349
python
en
code
1
github-code
1
[ { "api_name": "pygame.init", "line_number": 8, "usage_type": "call" }, { "api_name": "socket.socket", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 23, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 52, ...
27394954701
# Create your views here. from django.contrib import messages from django.contrib.auth import authenticate from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth import login as auth_login from django.http import HttpResponseRedirect, HttpResponseForbidden from django.sh...
AliVillegas/Wisapp
Wisapp/app/views.py
views.py
py
23,656
python
en
code
0
github-code
1
[ { "api_name": "django.contrib.auth.authenticate", "line_number": 29, "usage_type": "call" }, { "api_name": "django.contrib.auth.login", "line_number": 32, "usage_type": "call" }, { "api_name": "django.shortcuts.redirect", "line_number": 33, "usage_type": "call" }, { ...
10277790770
import csv_reader from datetime import datetime, timedelta import time class Bus: def __init__(self, route_id, direction, trip_id): bus_id = f"bus-{route_id}-{direction}-{trip_id}" self.bus_id = bus_id self.route_id = route_id self.direction = direction self.trip_id = trip_i...
jovanovicm/genetic-bus-charging-network
Testing/bus_integration_v1.py
bus_integration_v1.py
py
3,987
python
en
code
0
github-code
1
[ { "api_name": "datetime.datetime.strptime", "line_number": 39, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 39, "usage_type": "name" }, { "api_name": "csv_reader.routes.items", "line_number": 47, "usage_type": "call" }, { "api_name": "...
38126545610
import mediapipe as mp import numpy as np import cv2 from draw_landmarks import draw_landmarks_on_image model_path = 'pose_landmarker_full.task' BaseOptions = mp.tasks.BaseOptions PoseLandmarker = mp.tasks.vision.PoseLandmarker PoseLandmarkerOptions = mp.tasks.vision.PoseLandmarkerOptions PoseLandmarkerResult = mp.ta...
napongps/Muay-Thai-pose-similarity
Detector_video.py
Detector_video.py
py
2,023
python
en
code
0
github-code
1
[ { "api_name": "mediapipe.tasks", "line_number": 8, "usage_type": "attribute" }, { "api_name": "mediapipe.tasks", "line_number": 9, "usage_type": "attribute" }, { "api_name": "mediapipe.tasks", "line_number": 10, "usage_type": "attribute" }, { "api_name": "mediapip...
21973052666
import collections def TransformToArray(data, reverse): keys = list(data.keys()) for key in keys: data[key] = collections.OrderedDict(sorted(data[key].items(),reverse=reverse)) auxData = list(data.values()) data = [] for index in range(len(auxData)): data.append({'na...
augusto-roct/ExportModel
src/app/utils/documentToArray.py
documentToArray.py
py
683
python
en
code
0
github-code
1
[ { "api_name": "collections.OrderedDict", "line_number": 7, "usage_type": "call" } ]
71793787233
import re from lib.core.settings import WAF_ATTACK_VECTORS __product__ = "KONA Security Solutions (Akamai Technologies)" def detect(get_page): retval = False for vector in WAF_ATTACK_VECTORS: page, headers, code = get_page(get=vector) retval = code == 501 and re.search(r"Reference #[0-9A-Fa-...
pwnieexpress/raspberry_pwn
src/pentest/sqlmap/waf/kona.py
kona.py
py
407
python
en
code
1,000
github-code
1
[ { "api_name": "lib.core.settings.WAF_ATTACK_VECTORS", "line_number": 10, "usage_type": "name" }, { "api_name": "re.search", "line_number": 12, "usage_type": "call" }, { "api_name": "re.I", "line_number": 12, "usage_type": "attribute" } ]
74692226594
import os import django os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'calendar_base.settings') django.setup() import unittest from calendarapp import models from calendarapp.models import Year, Month, Day class CalendarTest(unittest.TestCase): def year_tester(self, year_object, year, start_day, start_day_str, d...
broden-wanner/colmanegancalendar
calendar_validation_tests.py
calendar_validation_tests.py
py
5,515
python
en
code
0
github-code
1
[ { "api_name": "os.environ.setdefault", "line_number": 3, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 3, "usage_type": "attribute" }, { "api_name": "django.setup", "line_number": 4, "usage_type": "call" }, { "api_name": "unittest.TestCase", ...
18152152452
import torch.nn as nn class YOLO_V1_Model(nn.Module): def __init__(self,params): self.dropout_prob= params["dropout"] self.num_classes= params["num_class"] super(YOLO_V1_Model,self).__init__() # LAYER 1 self.layer1 = nn.Sequential( nn.Conv2d(3, 64, kernel_size=...
Alibhji/python_training
4_YOLO_1/YOLO_V1_A/package_1/YOLO_V1_Model.py
YOLO_V1_Model.py
py
9,382
python
en
code
0
github-code
1
[ { "api_name": "torch.nn.Module", "line_number": 3, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 3, "usage_type": "name" }, { "api_name": "torch.nn.Sequential", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.nn", "line_...
27723210016
from django.shortcuts import render, redirect from .models import * from .forms import UsuarioForm, PescadoForm, PescariaForm, CriarUsuarioForm from .filters import OrderFilter, UsuarioFilter, PescariaFilter from django.contrib.auth.forms import UserCreationForm from django.contrib import messages from django.contrib.a...
sergioroberto15/Pescaria_Django
accounts/views.py
views.py
py
7,022
python
en
code
0
github-code
1
[ { "api_name": "django.shortcuts.redirect", "line_number": 16, "usage_type": "call" }, { "api_name": "forms.CriarUsuarioForm", "line_number": 18, "usage_type": "call" }, { "api_name": "forms.CriarUsuarioForm", "line_number": 21, "usage_type": "call" }, { "api_name"...
6561066196
from django.http import HttpResponse from django.shortcuts import render import datetime def hello(request): try: ua = request.META['REMOTE_ADDR'] except KeyError: ua = 'unknown' return HttpResponse("Hello world, you are visiting %s, %s" % (request.path, ua )) def meta_data(request): ...
RobertFloor/mysite
mysite/views.py
views.py
py
860
python
en
code
0
github-code
1
[ { "api_name": "django.http.HttpResponse", "line_number": 10, "usage_type": "call" }, { "api_name": "django.http.HttpResponse", "line_number": 17, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 26, "usage_type": "call" }, { "api_name"...
10124597966
import json import requests if __name__ == '__main__': url='https://oapi.dingtalk.com/robot/send?access_token=e88a5dfb80118f073ddae0534d9daa4ea0d5049917d7768b12753e2e9ef649c3' headers = {'Content-Type': 'application/json;charset=utf-8'} # data={ # "msgtype": "text", # "text": { # ...
WilliamFWG/Warehouse
python/PycharmProjects/py03/day01/dingtalk.py
dingtalk.py
py
2,054
python
en
code
0
github-code
1
[ { "api_name": "requests.post", "line_number": 46, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 46, "usage_type": "call" } ]
34504054424
from unittest import mock from fastapi.responses import Response from fastapi.testclient import TestClient from apps.main import app client = TestClient(app) def test_read_main_success(): response = client.get("/") assert response.status_code == 200 def test_read_main_template_not_found(): with mock....
Alexvjunior/challenge
tests/test_translator_view.py
test_translator_view.py
py
2,950
python
en
code
0
github-code
1
[ { "api_name": "fastapi.testclient.TestClient", "line_number": 8, "usage_type": "call" }, { "api_name": "apps.main.app", "line_number": 8, "usage_type": "argument" }, { "api_name": "unittest.mock.patch", "line_number": 17, "usage_type": "call" }, { "api_name": "uni...
12380996944
import pandas as pd data = pd.read_csv('C:/Users/Rakesh/Desktop/DataScience/Lohith code/Naive Bayes/spam.csv', encoding='latin-1') data.head() # Drop column and name change data = data.drop(["V3", "Unnamed: 3", "Unnamed: 4"], axis=1) #data2 = data.drop([3,4],axis=0) #print(data2) data = data.rename(columns={"v1": "l...
gswathinair/SwathiWS
Naive Bayes/naive_bayes_spam_or_not.py
naive_bayes_spam_or_not.py
py
2,342
python
en
code
0
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 3, "usage_type": "call" }, { "api_name": "sklearn.model_selection.train_test_split", "line_number": 19, "usage_type": "call" }, { "api_name": "sklearn.feature_extraction.text.CountVectorizer", "line_number": 26, "usage_type"...
26481879926
from osgeo import ogr import warnings from typing import Union from gdalhelpers.checks import layer_checks, values_checks from gdalhelpers.classes.DEM import DEM import losanalyst.functions.los_field_names as field_names from losanalyst.functions import helpers def check_los_layer(layer: ogr.Layer) -> None: """ ...
JanCaha/los_analyst
losanalyst/functions/checks.py
checks.py
py
7,122
python
en
code
0
github-code
1
[ { "api_name": "osgeo.ogr.Layer", "line_number": 10, "usage_type": "attribute" }, { "api_name": "osgeo.ogr", "line_number": 10, "usage_type": "name" }, { "api_name": "osgeo.ogr.Layer", "line_number": 29, "usage_type": "attribute" }, { "api_name": "osgeo.ogr", "...
33854572922
""" Taken from pyro tutorial """ import argparse from os.path import exists import numpy as np import torch import torch.nn as nn import pyro import pyro.distributions as dist import pyro.poutine as poutine from pyro.distributions import TransformedDistribution from pyro.distributions.transforms import affine_autore...
CJHJ/convolutional-neural-markov-model
models/convdmm.py
convdmm.py
py
25,613
python
en
code
1
github-code
1
[ { "api_name": "torch.nn.Module", "line_number": 28, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 28, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 38, "usage_type": "call" }, { "api_name": "torch.nn", "line_nu...
15848455280
import pyautogui, time amount = input("How many comments to do you want to make?") amount = int(amount) comment = input("What do you want to comment?") print("The program is starting in 5 seconds.") time.sleep(5) pyautogui.scroll(100) pyautogui.scroll(-7) time.sleep(2) for i in range(amount): pyautogui.moveTo...
IAMACAR10/yt-spam
yt-spam.py
yt-spam.py
py
455
python
en
code
0
github-code
1
[ { "api_name": "time.sleep", "line_number": 8, "usage_type": "call" }, { "api_name": "pyautogui.scroll", "line_number": 10, "usage_type": "call" }, { "api_name": "pyautogui.scroll", "line_number": 11, "usage_type": "call" }, { "api_name": "time.sleep", "line_nu...
43788559826
import colour from IPython.display import Video from datetime import datetime class ishow_config(): def __init__(self, # file_writer_config write_to_movie=True, break_into_partial_movies=False, save_last_frame=False, save_pngs=Fa...
Kexin-Zhang-UCAS/imanim
imanim/__init__.py
__init__.py
py
4,527
python
en
code
0
github-code
1
[ { "api_name": "colour.Color", "line_number": 61, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 100, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 100, "usage_type": "name" }, { "api_name": "IPython.displa...
2909345465
import cv2 import requests import sys import os from PIL import Image import json import numpy as np from . import error_score from . import face_pp URL = 'https://api-us.faceplusplus.com/facepp/v1/face/thousandlandmark' API_KEY = ['-D9lXEJg0Z0MMuSHKtmKxetMLqYkZp2c', 'eORdjUCXMFgW-RahCeWAzZM-huNDakIi', '5Ak...
cubalys/tmp
faceshape_carrick/shape.py
shape.py
py
9,358
python
en
code
0
github-code
1
[ { "api_name": "cv2.imread", "line_number": 18, "usage_type": "call" }, { "api_name": "cv2.imencode", "line_number": 19, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 23, "usage_type": "call" }, { "api_name": "json.dump", "line_number": ...
2852118483
from django.urls import path from django.contrib.auth import views as auth_views from . import views urlpatterns = [ path('', views.index, name='index'), # path('login/', auth_views.LoginView.as_view(template_name='pybo/login.html'), name='login'), path('logout/', auth_views.LogoutView.as_view(), name='log...
ischar/pillMe2
pybo/urls.py
urls.py
py
782
python
en
code
0
github-code
1
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "django.contrib.auth.views.LogoutView.as_view", "line_number": 8, "usage_type": "call" }, { "api_n...
31532664375
from flask import Flask, request from flask.templating import render_template from model import summariser app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.route('/results', methods=["POST"]) def summary(): if request.method == "POST": data = request.form.t...
UnpredictablePrashant/MachineLearninginFlask
summariserAI/app.py
app.py
py
574
python
en
code
4
github-code
1
[ { "api_name": "flask.Flask", "line_number": 5, "usage_type": "call" }, { "api_name": "flask.templating.render_template", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 13, "usage_type": "attribute" }, { "api_name": "...
71483143075
from django.utils.translation import gettext_lazy try: from pretix.base.plugins import PluginConfig except ImportError: raise RuntimeError("Please use pretix 2.7 or above to run this plugin!") __version__ = "1.0.1" class PluginApp(PluginConfig): name = "pretix_batch_emailer" verbose_name = "Batch Em...
bockstaller/pretix-batch-emailer
pretix_batch_emailer/__init__.py
__init__.py
py
789
python
en
code
0
github-code
1
[ { "api_name": "pretix.base.plugins.PluginConfig", "line_number": 11, "usage_type": "name" }, { "api_name": "django.utils.translation.gettext_lazy", "line_number": 16, "usage_type": "call" }, { "api_name": "django.utils.translation.gettext_lazy", "line_number": 18, "usage_...
70735149474
import os import warnings from setuptools import setup, find_packages def read(fname): with open(os.path.join(os.path.dirname(__file__), fname), "rb") as f: reqs = f.read().decode("utf-8") return reqs from pkg_resources import require, DistributionNotFound, parse_version def check_provided(distributi...
bouralab/Prop3D
setup.py
setup.py
py
3,734
python
en
code
16
github-code
1
[ { "api_name": "os.path.join", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 6, "usage_type": "call" }, { "api_name": "pkg_resources.parse_version", ...
4149696396
import cv2 import numpy as np import matplotlib.pyplot as plt def conv2d(ori,kernal): dimension = ori.shape # ori = np.pad(ori,1,'constant',constant_values = 0) result = np.zeros((dimension[0],dimension[1])) for i in range(0,dimension[0]-2): for j in range(0,dimension[1]-2): ori_1 =...
ch3coch3/opencv_dl_hw
P3/P3.py
P3.py
py
2,279
python
en
code
0
github-code
1
[ { "api_name": "numpy.zeros", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.abs", "line_number": 13, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.mgrid", "line_number": 20, ...
38701721413
''' A simple python calculation question generator usg: python calculator.py -d "+,-" -c 3 -l 200 -t 30 usg: python calculator.py --op_type="+,-" --op_count=3 --limit=20 --total=30 ''' import sys, getopt, random, json def auto_cal_generator(limit=100, op_count=1, op_type=["+"], total=100): res = {} if limit>99...
jessychen1984/MiniProj
src/api/miniproj/calculator.py
calculator.py
py
1,634
python
en
code
0
github-code
1
[ { "api_name": "json.dumps", "line_number": 13, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 23, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 29, "usage_type": "call" }, { "api_name": "random.randint", "line_n...
25258282499
from __future__ import absolute_import, division, unicode_literals import logging import uuid from flask_restful.reqparse import RequestParser from sqlalchemy.orm import subqueryload_all from changes.utils.diff_parser import DiffParser from werkzeug.datastructures import FileStorage from changes.api.base import APIV...
harrisonfeng/changes
changes/api/phabricator_notify_diff.py
phabricator_notify_diff.py
py
6,390
python
en
code
null
github-code
1
[ { "api_name": "changes.config.db.session.query", "line_number": 30, "usage_type": "call" }, { "api_name": "changes.config.db.session", "line_number": 30, "usage_type": "attribute" }, { "api_name": "changes.config.db", "line_number": 30, "usage_type": "name" }, { "...
12934808687
from typing import Callable, Tuple, Union from scipy.integrate import quad # type: ignore from .context import Context from .tree import BaseValue, Resolveable from .utils import aslist quad: Callable[..., Tuple[float, float]] class Integral(Resolveable): def __init__( self, integrand: Callabl...
Telofy/SquigglyPy
squigglypy/resolvers.py
resolvers.py
py
986
python
en
code
2
github-code
1
[ { "api_name": "scipy.integrate.quad", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.Callable", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.Tuple", "line_number": 9, "usage_type": "name" }, { "api_name": "tree.Resolveable", ...
28276419372
import os import re import ast import pandas as pd import numpy as np import datetime from typing import List, Union, Any, Tuple import httplib2 import apiclient.discovery from oauth2client.service_account import ServiceAccountCredentials CREDENTIALS_FILE = os.getenv("CREDENTIALS_FILE") gsheetId = os.getenv("gsheetId"...
pchlq/plaid_to_gsheets
df_to_sheet.py
df_to_sheet.py
py
9,717
python
en
code
0
github-code
1
[ { "api_name": "os.getenv", "line_number": 12, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 13, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 14, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 15, ...
71492290593
import os import requests import csv import tqdm def download_img(url, name): if not os.path.exists("./images/"): os.mkdir("./images/") name = name.replace("/", "_").replace('"', '“') if os.path.exists("./images/" + name + '.jpg'): return req = requests.get(url=url) try: wi...
xucong053/arsenal_spider
img_download.py
img_download.py
py
747
python
en
code
0
github-code
1
[ { "api_name": "os.path.exists", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.mkdir", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number":...
72373797155
# -*- coding: utf-8 -*- import tensorflow as tf import numpy as np import torch import torchvision as tv from torchvision import transforms, datasets import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import matplotlib.pyplot as plt print(tf.__version__) # 3 models to implement various...
hruday48/CPSC-8430
1a.py
1a.py
py
8,092
python
en
code
1
github-code
1
[ { "api_name": "tensorflow.__version__", "line_number": 12, "usage_type": "attribute" }, { "api_name": "torch.nn.Module", "line_number": 16, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 16, "usage_type": "name" }, { "api_name": "torch.nn.Li...
22725518291
from scipy.ndimage import label as bwlabel from computeNsSystem import computeNsSystem from computeLinesDC import computeLinesDC, compute_lines_data_cost from computeLinesLabelCost import computeLineLabelCost import numpy as np from LineExtraction_GC_MRFminimization import LineExtraction_GC_MRFminimization, line_extrac...
mishanius/handwriten-multi-skew-line-extraction
PostProcessByMRF.py
PostProcessByMRF.py
py
2,758
python
en
code
3
github-code
1
[ { "api_name": "computeNsSystem.computeNsSystem", "line_number": 10, "usage_type": "call" }, { "api_name": "scipy.ndimage.label", "line_number": 21, "usage_type": "call" }, { "api_name": "numpy.ones", "line_number": 21, "usage_type": "call" }, { "api_name": "comput...
12111496524
#!/usr/bin/env python 3.8 # -*- coding: UTF-8 -*- # @date: 2022.01.14 下午 11:46 # @name: demo2 # @author:Ads-Ryen # @webside:www.prlrr.com # @software: PyCharm import requests import re url_1 = "https://www.demo.net/XiuRen/485_4.html" response = requests.get(url=url_1) try: htmls = response.text.encode('ISO-8859-1...
Adsryen/ImageCrawlingManage
python/main/demo2.py
demo2.py
py
1,797
python
en
code
0
github-code
1
[ { "api_name": "requests.get", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.utils.get_encodings_from_content", "line_number": 15, "usage_type": "call" }, { "api_name": "requests.utils", "line_number": 15, "usage_type": "attribute" }, { "api_na...
8997009046
from flask import request, Flask, jsonify from search.Searchengine import Searchengine from flask_cors import * app = Flask(__name__) CORS(app, supports_credentials=True) searchengine = Searchengine() @app.route("/") def main(): return "hello world" @app.route("/search", methods=["GET","POST"]) def search():...
wp931120/Seach_engine
web/app.py
app.py
py
595
python
en
code
6
github-code
1
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "search.Searchengine.Searchengine", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.request.form.get", "line_number": 20, "usage_type": "call" }, { "api_name": "fla...
10722851178
import sys from flask import Flask, render_template, request, flash, url_for, redirect from config import SQLITE_DATABASE_NAME from model import db, db_init, Post app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + SQLITE_DATABASE_NAME app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] ...
Tozarin/Personal-site
main.py
main.py
py
1,878
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "config.SQLITE_DATABASE_NAME", "line_number": 10, "usage_type": "name" }, { "api_name": "model.db.app", "line_number": 13, "usage_type": "attribute" }, { "api_name": "model.db", ...
2554886757
from flask import Flask app = Flask(__name__) @app.route("/") def home(): name = 'Lisa' city_names = ['Paris', 'London', 'Rome', 'Tahiti'] city = "" for i in city_names: city += f'<li>{i}</li>' return f''' <html> <body> <h1>Welcome {name}!</h...
AroraPranav/Hw3_flask
home.py
home.py
py
526
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 4, "usage_type": "call" } ]
31223384313
'''Crie um pg que leia a idade de 7 pessoas. no final mostre quantas pessoas são maiores de idade e quantas são menores.''' from datetime import date maior = 0 menor = 0 ano = date.today().year for lista in range(1,8): nasc = int(input('Digite seu ano de nascimento da {}ª pessoa: '.format(lista))) if ano - nasc...
FrancisPaull/CursoemvideoPython
exercicios/ex054 repetição for grupo da maioridade.py
ex054 repetição for grupo da maioridade.py
py
459
python
pt
code
0
github-code
1
[ { "api_name": "datetime.date.today", "line_number": 5, "usage_type": "call" }, { "api_name": "datetime.date", "line_number": 5, "usage_type": "name" } ]
11296103632
from rest_framework import generics, status from rest_framework.response import Response from rest_framework.permissions import IsAuthenticated from API.serializers import ( ContainerSerializer, ContainerCreateOnlySerializer ) from API.models import Container, Device from django.db.models import Q class Conta...
AmbientELab-Group/Medbox-server
app/API/views/container.py
container.py
py
6,622
python
en
code
0
github-code
1
[ { "api_name": "rest_framework.generics.ListCreateAPIView", "line_number": 12, "usage_type": "attribute" }, { "api_name": "rest_framework.generics", "line_number": 12, "usage_type": "name" }, { "api_name": "API.serializers.ContainerCreateOnlySerializer", "line_number": 16, ...
12297714547
import json import csv import os import boto3 import gspread from oauth2client.service_account import ServiceAccountCredentials def create_keyfile_dict(): variables_keys = { "type": os.environ.get("TYPE"), "project_id": os.environ.get("PROJECT_ID"), "private_key_id": os.environ.get("PRIVATE_KEY_ID")...
tbarringer/Google-Sheets-to-Redshift
GoogleSheets-to-S3_Lambda/lambda_function.py
lambda_function.py
py
1,566
python
en
code
1
github-code
1
[ { "api_name": "os.environ.get", "line_number": 10, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.environ.get", "line_number": 11, "usage_type": "call" }, { "api_name": "os.environ", "line_...
70556971235
from glob import glob from itertools import repeat from matplotlib import gridspec as gs from matplotlib import pyplot as plt from matplotlib.patches import Rectangle from matplotlib.ticker import MultipleLocator import json import numpy as np import seaborn as sns from copy import copy from os import path from six imp...
BrainsOnBoard/procedural_paper
scripts/plot_multi_area.py
plot_multi_area.py
py
10,715
python
en
code
22
github-code
1
[ { "api_name": "numpy.empty", "line_number": 18, "usage_type": "call" }, { "api_name": "seaborn.despine", "line_number": 27, "usage_type": "call" }, { "api_name": "glob.glob", "line_number": 36, "usage_type": "call" }, { "api_name": "os.path.join", "line_number...
25562295539
import csv import random from os import path from zipfile import ZipFile from lxml import etree ZIPS_DIR = path.join(path.realpath('.'), 'race-zips') zips_num = 50 xmls_per_zip = 100 def test_csv1(): total_ids_expected = zips_num * xmls_per_zip csv1_realpath = path.join(ZIPS_DIR, 'csv1.csv') ids = set()...
jackalissimo/multicore
race_csv/tests/test_race_csv.py
test_race_csv.py
py
1,893
python
en
code
0
github-code
1
[ { "api_name": "os.path.join", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "name" }, { "api_name": "os.path.realpath", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": ...
16708399772
from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path('' , views.register), path('show', views.show), path('send', views.send), path('delete', views.delete), path('edit', views.edit), path('RecordEdited', views.RecordEdited) ]
priyanka51195/student-management
management/urls.py
urls.py
py
300
python
en
code
0
github-code
1
[ { "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", ...
43708317307
from hello_world import app as hello_world_app import hello_world import pytest @pytest.fixture def client(): with hello_world_app.test_client() as client: yield client def test_service_reply_to_root_path(client): response = client.get("/") assert 'world' in response.data.decode(response.charset...
JustM57/MADE_python_hw
test_flask.py
test_flask.py
py
2,146
python
en
code
0
github-code
1
[ { "api_name": "hello_world.app.test_client", "line_number": 8, "usage_type": "call" }, { "api_name": "hello_world.app", "line_number": 8, "usage_type": "name" }, { "api_name": "pytest.fixture", "line_number": 6, "usage_type": "attribute" }, { "api_name": "hello_wo...
15219280424
import webbrowser import re import requests from bs4 import BeautifulSoup from urllib import request def list_url(sorted_url): urls = [] for a in sorted_url: if a.has_attr('href'): urls.append(a['href']) return urls def main(): plugin = input("Podaj nazwę wtyczki: ") headers ...
JobbyJabber/WordPress-scraper
wp_scraper_v0.2.py
wp_scraper_v0.2.py
py
1,337
python
en
code
0
github-code
1
[ { "api_name": "urllib.request.urlopen", "line_number": 24, "usage_type": "call" }, { "api_name": "urllib.request", "line_number": 24, "usage_type": "name" }, { "api_name": "bs4.BeautifulSoup", "line_number": 25, "usage_type": "call" }, { "api_name": "re.compile", ...
2144088888
import numpy as np import matplotlib.pyplot as plt from helpers import * def svm_train_brute(training_data): # convert data to np array just in case training_data = np.asarray(training_data) positive = training_data[training_data[:, 2] == 1] negative = training_data[training_data[:, 2] == -...
quanghuy2002/huyyeutrang
svm2.py
svm2.py
py
6,074
python
en
code
1
github-code
1
[ { "api_name": "numpy.asarray", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": ...
9213758492
import numpy as np import pandas as pd from imblearn.base import SamplerMixin from imblearn.pipeline import make_pipeline import collections import copy import random # parent submodules import os, sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from preprocessors import IndicatorTr...
mazmazz/SkepticSystem
python/skepticsys/preprocessors/multi_sampler.py
multi_sampler.py
py
7,860
python
en
code
1
github-code
1
[ { "api_name": "sys.path.insert", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_num...
18475202709
from flask import Blueprint, render_template, request, session, redirect, Response, make_response from twilio.twiml.voice_response import Dial, VoiceResponse, Say from twilio_client import sid, auth voice = Blueprint("voice", __name__, template_folder="templates", static_folder="static") @voice.route("/voice/", metho...
R-Ligier/AiHackathon
voice.py
voice.py
py
517
python
en
code
0
github-code
1
[ { "api_name": "flask.Blueprint", "line_number": 5, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.request.args", "line_number": 9, "usage_type": "attribute" }, { "api_name": "flask.req...
4620091398
from flask import Blueprint, render_template, session, redirect, request from app.db import mysql from app.Main import allevent_len import requests from serpapi import GoogleSearch user = Blueprint("User", __name__, url_prefix="/user", template_folder="templates") @user.route('/') def home(): if...
Rbcoder1/EMS_WEB
app/User/views.py
views.py
py
3,436
python
en
code
2
github-code
1
[ { "api_name": "flask.Blueprint", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.session", "line_number": 13, "usage_type": "name" }, { "api_name": "flask.session", "line_number": 14, "usage_type": "name" }, { "api_name": "app.db.mysql.connection.cu...
70711738913
import base64 import json import pickle from django_redis import get_redis_connection from utils.cookiesecret import CookieSecret # def merge_cart_cookie_to_redis(request, user, response): # """ # 登录后合并cookie购物车数据到Redis # :param request: 本次请求对象,获取cookie中的数据 # :param response: 本次响应对象,清除cookie中的数据 # ...
libin-c/Meiduo
meiduo/apps/carts/utils.py
utils.py
py
2,909
python
en
code
0
github-code
1
[ { "api_name": "utils.cookiesecret.CookieSecret.loads", "line_number": 70, "usage_type": "call" }, { "api_name": "utils.cookiesecret.CookieSecret", "line_number": 70, "usage_type": "name" }, { "api_name": "django_redis.get_redis_connection", "line_number": 73, "usage_type"...
10546935939
from PyQt5.QtWidgets import QWidget, QApplication from PyQt5.QtCore import Qt, QPoint, QRect, pyqtSignal from PyQt5.QtGui import QMouseEvent, QPixmap, QPainter, QBrush, QColor class RectangleSelectionBackground(QWidget): left_clicked = pyqtSignal() right_clicked = pyqtSignal(QMouseEvent) rectangle_select ...
Snaiel/dbx-interface
package/ui/widgets/explorers/base/selection_background.py
selection_background.py
py
2,055
python
en
code
2
github-code
1
[ { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 5, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.pyqtSignal", "line_number": 7, "usage_type": "call" }, { "api_name": "PyQt5.QtCore.pyqtSignal", "line_number": 8, "usage_type": "call" }, { "api_name": "...
71968485153
#!/usr/bin/env python3 """ Li battery discharge rate logger -------------------------------- This project discharges a Li battery through a resistive load and logs the voltage and current at a set interval to a CSV file. You can set the battery voltage which the test ends at. Start with the battery full...
Footleg/power-monitoring
li-cell_logger.py
li-cell_logger.py
py
4,339
python
en
code
0
github-code
1
[ { "api_name": "logging.basicConfig", "line_number": 69, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 69, "usage_type": "attribute" }, { "api_name": "gpiozero.LED", "line_number": 71, "usage_type": "call" }, { "api_name": "gpiozero.LED", ...
4892480619
import numpy as np from scipy.io.wavfile import write import matplotlib.pyplot as plt # Set the parameters for the sine wave frequency = 440 # Hz duration = 2.0 # seconds amplitude = 0.5 # amplitude of the sine wave # Generate the time points for the sine wave t = np.linspace(0, duration, int(duration * 44100))...
axeldav/synth
sine.py
sine.py
py
635
python
en
code
0
github-code
1
[ { "api_name": "numpy.linspace", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.sin", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 16, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot.subplots", ...
3408655101
import requests from datetime import datetime import smtplib import time MY_EMAIL = "XXXXXXXXXXX@gmail.com" MY_PASSWORD = "XXXXXXXXXXXXX" MY_LAT = 38.548330 MY_LONG = -90.326280 def is_iss_overhead(): response = requests.get(url="http://api.open-notify.org/iss-now.json") response.raise_for_status() data = respons...
christinichka/iss_overhead
main.py
main.py
py
1,805
python
en
code
0
github-code
1
[ { "api_name": "requests.get", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 36, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 41, "usage_type": "call" }, { "api_name": "datetime.datetime", ...
72930184995
import numpy as np import torch import random from typing import Optional, Tuple def fourier_shift(u: torch.Tensor, eps: float=0., dim: int=-1, order: int=0) -> torch.Tensor: """ Shift in Fourier space. Args: u (torch.Tensor): input tensor, usually of shape [batch, t, x] eps (float): shift...
brandstetter-johannes/LPSDA
common/augmentation.py
augmentation.py
py
11,079
python
en
code
35
github-code
1
[ { "api_name": "torch.Tensor", "line_number": 7, "usage_type": "attribute" }, { "api_name": "torch.fft.rfft", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.fft", "line_number": 20, "usage_type": "attribute" }, { "api_name": "torch.arange", "li...
41283693798
from typing import Iterable import pytest from zepben.evolve import assign_equipment_to_feeders, Equipment, TestNetworkBuilder, Feeder, BaseVoltage def validate_equipment(equipment: Iterable[Equipment], *expected_mrids: str): equip_mrids = [e.mrid for e in equipment] for mrid in expected_mrids: asser...
zepben/evolve-sdk-python
test/services/network/tracing/test_assign_to_feeders.py
test_assign_to_feeders.py
py
3,820
python
en
code
3
github-code
1
[ { "api_name": "typing.Iterable", "line_number": 7, "usage_type": "name" }, { "api_name": "zepben.evolve.Equipment", "line_number": 7, "usage_type": "name" }, { "api_name": "zepben.evolve.assign_equipment_to_feeders", "line_number": 19, "usage_type": "call" }, { "a...
23737668358
import dask.dataframe as dd from lightgbm import LGBMClassifier import joblib import json import pandas as pd from sklearn.metrics import accuracy_score def lightgbm_model(X_train_file, y_train_file, X_validation_file, y_validation_file, params_file, col_names, model_output_file): # Read from parquet file X_tr...
Asad1287/AutoML-for-Predictive-Maintenance
src/Data_Modeling/model_creation_lightgbm.py
model_creation_lightgbm.py
py
1,823
python
en
code
1
github-code
1
[ { "api_name": "dask.dataframe.read_parquet", "line_number": 10, "usage_type": "call" }, { "api_name": "dask.dataframe", "line_number": 10, "usage_type": "name" }, { "api_name": "dask.dataframe.read_parquet", "line_number": 11, "usage_type": "call" }, { "api_name":...
21196188643
from flask import Flask,redirect,render_template,url_for,request app = Flask(__name__) @app.route('/') def Home(): return render_template('index.html') @app.route('/report/<float:marks>') def report(marks): if marks >= 35 : return render_template('pass.html',result = marks) else: ...
BHARATH970438/RasultChecker_API
Result_API/main.py
main.py
py
904
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 3, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.render_te...
35298556855
from fastapi import FastAPI, Request, Response, BackgroundTasks from fastapi.responses import JSONResponse, StreamingResponse, RedirectResponse from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates from pathlib import Path import os import cv2 import time import subprocess app = Fa...
prabal01pathak/directory_video_player
app.py
app.py
py
2,900
python
en
code
0
github-code
1
[ { "api_name": "fastapi.FastAPI", "line_number": 11, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 13, "usage_type": "call" }, { "api_name": "fastapi.staticfiles.StaticFiles", "line_number": 14, "usage_type": "call" }, { "api_name": "fastapi....
44385920232
import logging import re from JsonReplace import JsonReplace def Position_strController(json_data): list_length = len(json_data) count = 0 for i in range(0, list_length): if re.search(JsonReplace().init_date, str(json_data[i].get('position_str'))): count = count + 1 if count == 0:...
SmallSky7/JsonReplace
Function/Position_strController.py
Position_strController.py
py
1,018
python
en
code
0
github-code
1
[ { "api_name": "re.search", "line_number": 11, "usage_type": "call" }, { "api_name": "JsonReplace.JsonReplace", "line_number": 11, "usage_type": "call" }, { "api_name": "logging.debug", "line_number": 16, "usage_type": "call" }, { "api_name": "re.search", "line...
2325252310
import os import shutil from flask import request, jsonify from flask_restful import Resource from flask_uploads import UploadNotAllowed from db import db from libs import image_helper from models.category import CategoryModel from models.subcategory import SubCategoryModel, SubCategoryImageModel from schemas.catego...
Emir99/city-service
resources/subcategory.py
subcategory.py
py
7,847
python
en
code
0
github-code
1
[ { "api_name": "schemas.category_subcategory.SubCategorySchema", "line_number": 15, "usage_type": "call" }, { "api_name": "schemas.category_subcategory.SubCategorySchema", "line_number": 16, "usage_type": "call" }, { "api_name": "schemas.category_subcategory.CategoryImageSchema", ...
39434606704
from django.shortcuts import render, get_object_or_404 from .models import Download, Item # Create your views here. def list_page(request): queryset = Download.objects.all() context = { 'object_list': queryset } return render(request, 'downloads/list.html', context) def detail_page(request, ...
pramod0021a/proutj
src/downloads/views.py
views.py
py
483
python
en
code
0
github-code
1
[ { "api_name": "models.Download.objects.all", "line_number": 7, "usage_type": "call" }, { "api_name": "models.Download.objects", "line_number": 7, "usage_type": "attribute" }, { "api_name": "models.Download", "line_number": 7, "usage_type": "name" }, { "api_name": ...
36360318683
""" Unit tests for optimization routines from minpack.py. """ from numpy.testing import * import numpy as np from numpy import array, float64 from scipy import optimize from scipy.optimize.minpack import fsolve, leastsq, curve_fit class TestFSolve(TestCase): def pressure_network(self, flow_rates, Qtot, k): ...
decarlin/stuartlab-scripts
python/scipy-0.8.0/scipy/optimize/tests/test_minpack.py
test_minpack.py
py
5,138
python
en
code
6
github-code
1
[ { "api_name": "numpy.hstack", "line_number": 40, "usage_type": "call" }, { "api_name": "numpy.diag", "line_number": 56, "usage_type": "call" }, { "api_name": "numpy.empty", "line_number": 58, "usage_type": "call" }, { "api_name": "numpy.ones", "line_number": 6...
44494706441
#!/usr/bin/env python # -*- coding:utf-8 -*- # @Time : 2018/5/23 14:15 # @Author : zhouyuyao # @File : demon1.py import multiprocessing import os import time from datetime import datetime def subprocess(number): # 子进程 print('这是第{0}个子进程'.format(number)) pid = os.getpid() # 得到当前进程号 pr...
zyyxydwl/Python-Learning
LIVE_PYTHON/2018-05-22/demon1.py
demon1.py
py
1,049
python
en
code
0
github-code
1
[ { "api_name": "os.getpid", "line_number": 14, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 15, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 15, "usage_type": "name" }, { "api_name": "time.sleep", "l...
4444628072
from rasa.core.policies import KerasPolicy, MemoizationPolicy, FallbackPolicy, FormPolicy, MappingPolicy from rasa.core.agent import Agent import asyncio async def main(): # there is a threshold for the NLU predictions as well as the action predictions agent = Agent('domain.yml', policies=[KerasPolicy(epochs=...
jupiterbak/RASA
DialogEngineService/train_core.py
train_core.py
py
1,017
python
en
code
2
github-code
1
[ { "api_name": "rasa.core.agent.Agent", "line_number": 8, "usage_type": "call" }, { "api_name": "rasa.core.policies.KerasPolicy", "line_number": 8, "usage_type": "call" }, { "api_name": "rasa.core.policies.FallbackPolicy", "line_number": 9, "usage_type": "call" }, { ...
31097782837
""" Hold the functionality of Image Recognition and Verification """ import face_recognition import numpy as np from PIL import Image, ImageDraw class Image_recog: """ Holds the functionality of testing similarity between two images """ def __init__(self, im1, im_smiling, im_not_smiling): self.im_kn...
yohanguez/Hackathon_2018
image_recognition/image_recog.py
image_recog.py
py
8,201
python
en
code
1
github-code
1
[ { "api_name": "face_recognition.load_image_file", "line_number": 25, "usage_type": "call" }, { "api_name": "face_recognition.load_image_file", "line_number": 26, "usage_type": "call" }, { "api_name": "face_recognition.face_encodings", "line_number": 28, "usage_type": "cal...
11367251439
# Menu drive banking app # PAN number is considered as Primary key for all banking operations # Customer Name,Account Number,Balance, Date of Birth, Phone Number, Address are stored as customer details import datetime import os,sys import re import random import csv import pandas as pd def create_acc(): ...
aravind51097/Menu_Driven_Bank_management_system
BankingApp.py
BankingApp.py
py
6,395
python
en
code
0
github-code
1
[ { "api_name": "datetime.datetime.strptime", "line_number": 19, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 19, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 22, "usage_type": "call" }, { "api_name": "re.match",...
12092507814
# 导入若干工具包 import torch import torch.nn as nn import torch.nn.functional as F # 定义一个简单的网络类 class Net(nn.Module): def __init__(self): super(Net, self).__init__() # 定义第一层卷积神经网络, 输入通道维度=1, 输出通道维度=6, 卷积核大小3*3 self.conv1 = nn.Conv2d(1, 6, 3) # 定义第二层卷积神经网络, 输入通道维度=6, 输出通道维度=16, 卷积核大小3*3 ...
Eye-Wuppertal/NLP_Learning
test/t_01pytorch_base/torchnn.py
torchnn.py
py
1,761
python
en
code
1
github-code
1
[ { "api_name": "torch.nn.Module", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 8, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 13, "usage_type": "call" }, { "api_name": "torch.nn", "line_numb...
33594433609
#This file is designed to have all the functions for preprocess data in both the product df and the review data frames #It will act as the library to import from functions needed in the preprocess_data.py import pandas as pd import numpy as np from collections import Counter ##########################################...
stuartong/amazon-product-prediction
preprocess_data_module.py
preprocess_data_module.py
py
11,042
python
en
code
0
github-code
1
[ { "api_name": "yaml.safe_load", "line_number": 30, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 36, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords.words", "line_number": 52, "usage_type": "call" }, { "api_name": "nltk.c...
41303685951
from pickle import GET from flask import Flask, render_template, request, redirect, url_for, session import requests from bs4 import BeautifulSoup import datetime app = Flask(__name__) @app.route('/' , methods=['GET', 'POST']) def index(): return render_template('index.html') # Create route that displays t...
davidbardales17/music_traveler
music_traveler/webapp.py
webapp.py
py
1,478
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 17, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 23, "usage_type": "attribute" }, { "api_name": "flask.req...
34763790059
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('algo', '0002_auto_20170629_1511'), ] operations = [ migrations.AddField( model_name='results', name=...
HSISeg/HSISeg
algo/migrations/0003_results_status_text.py
0003_results_status_text.py
py
426
python
en
code
4
github-code
1
[ { "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.AddField", "line_number": 14, "usage_type": "call" }, { ...