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
74649258984
#!/usr/bin/env python # -*- coding: UTF-8 -*- from rocketmq.client import Producer,Message from utils.my_logger import logger import time import re def push(num): tt = re.findall('^\d{13}', str(time.time()).replace('.', ''))[0] print(type(tt)) producer = Producer('PID-001') producer.set_namesrv_addr('1...
iospeng/python
pycharm_demo/pythonProject2/test_cases/mqpush.py
mqpush.py
py
1,275
python
en
code
0
github-code
36
[ { "api_name": "re.findall", "line_number": 9, "usage_type": "call" }, { "api_name": "time.time", "line_number": 9, "usage_type": "call" }, { "api_name": "rocketmq.client.Producer", "line_number": 11, "usage_type": "call" }, { "api_name": "rocketmq.client.Message",...
10830099515
import tkinter as tk import json from api import functions class window(tk.Tk): def __init__(self): super().__init__() self.geometry('767x445') self.title('Get daily news') self.funcs = functions() def main_window(self): # Creating required labels and frame title = tk.Label(self, text="Get news", font="...
PingalPie/news-application
gui.py
gui.py
py
3,053
python
en
code
0
github-code
36
[ { "api_name": "tkinter.Tk", "line_number": 5, "usage_type": "attribute" }, { "api_name": "api.functions", "line_number": 10, "usage_type": "call" }, { "api_name": "tkinter.Label", "line_number": 14, "usage_type": "call" }, { "api_name": "tkinter.Frame", "line_...
4703541196
#!/usr/bin/env python3 import rospy import sounddevice as sd import numpy as np import queue import sys import sounddevice as sd from audio_universal.msg import AudioData ''' ~output_device: use `python3 -m sounddevice` to get device list, numerical device ID or case-insensitive substrings is ok. ~channels: 1 ~refresh...
jsbyysheng/ros_audio_universal
scripts/audio_play.py
audio_play.py
py
2,867
python
en
code
0
github-code
36
[ { "api_name": "queue.Queue", "line_number": 24, "usage_type": "call" }, { "api_name": "queue.Queue", "line_number": 25, "usage_type": "call" }, { "api_name": "queue.Queue", "line_number": 26, "usage_type": "call" }, { "api_name": "sounddevice.OutputStream", "l...
5001168268
import json import os import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) dynamodb = boto3.resource("dynamodb") def lambda_handler(event, context): logger.info(f"EVENT: {event}") statistics_table_name = os.environ["STATISTICS_TABLE_NAME"] statistics_table = dynamodb.Ta...
HeNeos/SportsAnalyticsPlatform
services/dynamodb/runtime/lambda_function.py
lambda_function.py
py
4,924
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 7, "usage_type": "attribute" }, { "api_name": "boto3.resource", "line_number": 8, "usage_type": "call" }, { "api_name": "os.environ", "lin...
22398051842
import sys import cv2 import numpy as np from os import listdir PY3 = sys.version_info[0] == 3 #Define the parameters SIZE = 32 CLASS_NUMBER = 6 #Read the traffic sign dataset and store the dataset and labels into a list def load_traffic_dataset(): dataset = [] labels = [] for sign_type in range(CLASS_NU...
nabil053/Bangladeshi-Traffic-Sign-Detection-And-Recognition-System
classification.py
classification.py
py
3,647
python
en
code
0
github-code
36
[ { "api_name": "sys.version_info", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": 17, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 22, "usage_type": "call" }, { "api_name": "cv2.resize", "line_num...
32443531446
import imdb import json from tqdm import tqdm ia = imdb.IMDb() DATA_NEEDED = False with open("./imdb/movie_title-id.json", "r") as data: current_data = json.load(data) with open('./movie_titles_list.json', "r") as movie_list: movies = json.load(movie_list) if DATA_NEEDED: for i in tqdm(range(0, len(mov...
Shreneken/movie-data-getter
imdb/imdb_id.py
imdb_id.py
py
824
python
en
code
0
github-code
36
[ { "api_name": "imdb.IMDb", "line_number": 5, "usage_type": "call" }, { "api_name": "json.load", "line_number": 10, "usage_type": "call" }, { "api_name": "json.load", "line_number": 13, "usage_type": "call" }, { "api_name": "tqdm.tqdm", "line_number": 16, "...
41539002397
#!/usr/bin/python # Imports ### System import os import argparse ### Python import numpy as np import cv2 as cv from tqdm.auto import tqdm import matplotlib.pyplot as plt ### Pytorch import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F ### TODO: Use WandB, Pytorch Lightning...
Aryan-Garg/Image-Forgery-Detection
transfer_learning.py
transfer_learning.py
py
13,826
python
en
code
0
github-code
36
[ { "api_name": "argparse.ArgumentParser", "line_number": 42, "usage_type": "call" }, { "api_name": "timm.create_model", "line_number": 60, "usage_type": "call" }, { "api_name": "timm.create_model", "line_number": 62, "usage_type": "call" }, { "api_name": "timm.crea...
26094620258
import google import firebase_admin from firebase_admin import credentials from firebase_admin import firestore import base64 keyPath = '../firestoreKEY.json' def initializeDb(path): cred = credentials.Certificate(path) firebase_admin.initialize_app(cred) db = firestore.client() return db def strin...
16francej/firestoredemo
RecieveImage.py
RecieveImage.py
py
1,190
python
en
code
0
github-code
36
[ { "api_name": "firebase_admin.credentials.Certificate", "line_number": 11, "usage_type": "call" }, { "api_name": "firebase_admin.credentials", "line_number": 11, "usage_type": "name" }, { "api_name": "firebase_admin.initialize_app", "line_number": 12, "usage_type": "call"...
8373131694
import jwt JWT_SECRET = "this_is_just_for_testing" def create_jwt(payload): token = jwt.encode( payload, JWT_SECRET, algorithm="HS256" ) return token def validate_jwt(token): try: payload = jwt.decode(token, JWT_SECRET, "HS256") except: raise re...
walterbrunetti/playground
auth/core/jwt_utils.py
jwt_utils.py
py
338
python
en
code
0
github-code
36
[ { "api_name": "jwt.encode", "line_number": 11, "usage_type": "call" }, { "api_name": "jwt.decode", "line_number": 21, "usage_type": "call" } ]
27029634669
import copy import logging import os.path as osp import numpy as np import torch from fvcore.common.file_io import PathManager from PIL import Image from pycocotools import mask as maskUtils from detectron2.data import detection_utils as utils from detectron2.data import transforms as T from detectron2.data.dataset_m...
ViTAE-Transformer/DeepSolo
adet/data/dataset_mapper.py
dataset_mapper.py
py
6,846
python
en
code
177
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 27, "usage_type": "call" }, { "api_name": "pycocotools.mask.frPyObjects", "line_number": 35, "usage_type": "call" }, { "api_name": "pycocotools.mask", "line_number": 35, "usage_type": "name" }, { "api_name": "pycoc...
37989827251
""" Steps to run: python insured_info_scraper.py <account number> Eg: python insured_info_scraper.py 20011 Program written in Python 3 Program Output: 1 file: Insured_Info_<account_num>.json - json file that contains the insured info details Program Description: Progam first fetches the ASP login page paramters - _...
tebbythomas/Freelance_Projects
Web_Data_Extraction_Projects/J10_Finance_Pro_Insured_Info_Scraper/Insured_Info/insured_info_scraper.py
insured_info_scraper.py
py
6,297
python
en
code
1
github-code
36
[ { "api_name": "sys.argv", "line_number": 37, "usage_type": "attribute" }, { "api_name": "requests.Session", "line_number": 48, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 51, "usage_type": "call" }, { "api_name": "requests.post", ...
6432536009
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import apps.users.models class Migration(migrations.Migration): dependencies = [ ('users', '0005_auto_20180802_1614'), ] operations = [ migrations.AlterModelManagers( nam...
eashme/Django-backend
Hello_Server/apps/users/migrations/0006_auto_20180802_1723.py
0006_auto_20180802_1723.py
py
449
python
en
code
1
github-code
36
[ { "api_name": "django.db.migrations.Migration", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 8, "usage_type": "name" }, { "api_name": "django.db.migrations.AlterModelManagers", "line_number": 15, "usage_type": "call" ...
70489042024
from unittest.mock import MagicMock from uuid import uuid4 import pytest from pytest import raises from pydantic import ValidationError from api.exceptions import InvalidParameterError from api.schemas.output import ( ConsultaProcessoOutput, ExtractDataOutput, ExtractDataSecondInstanceOutput, StatusS...
BrunoPisaneschi/JusBrasil
tests/unit/api/schemas/test_output.py
test_output.py
py
4,369
python
pt
code
0
github-code
36
[ { "api_name": "uuid.uuid4", "line_number": 20, "usage_type": "call" }, { "api_name": "api.schemas.output.ConsultaProcessoOutput", "line_number": 21, "usage_type": "call" }, { "api_name": "unittest.mock.MagicMock", "line_number": 27, "usage_type": "call" }, { "api_...
9148386910
#coding=utf-8 """ 这是一个关于QQ模拟(QListView的使用)的例子--模型定义! 文章链接:http://www.xdbcb8.com/archives/701.html """ import random import Random_Name from PyQt5.QtCore import QAbstractListModel, Qt, QModelIndex, QVariant, QSize from PyQt5.QtGui import QIcon, QFont class ListModel(QAbstractListModel): ''' 自定义模型 ''' ...
redmorningcn/PyQT5Example
PyQt5All/PyQt535、36、37/ListModel.py
ListModel.py
py
3,281
python
zh
code
1
github-code
36
[ { "api_name": "PyQt5.QtCore.QAbstractListModel", "line_number": 13, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.Qt.DisplayRole", "line_number": 32, "usage_type": "attribute" }, { "api_name": "PyQt5.QtCore.Qt", "line_number": 32, "usage_type": "name" }, { "...
17929378111
#!/usr/bin/python3 import multiprocessing import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button, RadioButtons import math import time def points(): import sys for line in open("input.txt"): line = line.replace("position=", "").replace("velocity=", "").replace(' ', '').replace('...
Easimer/advent-of-code-2018
day10/day10.py
day10.py
py
1,643
python
en
code
0
github-code
36
[ { "api_name": "matplotlib.pyplot.scatter", "line_number": 26, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 26, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.show", "line_number": 27, "usage_type": "call" }, { "api_name": "ma...
25759790506
import os from datetime import datetime dir = os.path.dirname(os.getcwd()+'/users/') print(dir) try: os.stat(dir) except: os.mkdir(dir) print('make directory') all_users = {} for f in os.listdir(os.getcwd()): if f.endswith(".csv"): split = str(f).split('_') code = split[1] pr...
gunarto90/twitter-stream
iterate user id.py
iterate user id.py
py
1,564
python
en
code
1
github-code
36
[ { "api_name": "os.path.dirname", "line_number": 4, "usage_type": "call" }, { "api_name": "os.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 4, "usage_type": "call" }, { "api_name": "os.stat", "line_number": 7, ...
18924218055
from selenium import webdriver from selenium.webdriver.common.by import By import time class SwitchToWindow(): def test(self): baseUrl = "https://letskodeit.teachable.com/pages/practice" driver = webdriver.Firefox() driver.maximize_window() driver.get(baseUrl) # Find paren...
PacktPublishing/-Selenium-WebDriver-With-Python-3.x---Novice-To-Ninja-v-
CODES/S23 - Selenium WebDriver -_ Switch Window And IFrames/1_switch-to-window.py
1_switch-to-window.py
py
847
python
en
code
11
github-code
36
[ { "api_name": "selenium.webdriver.Firefox", "line_number": 9, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 9, "usage_type": "name" }, { "api_name": "selenium.webdriver.common.by.By.ID", "line_number": 18, "usage_type": "attribute" }, { ...
28492416311
from django.shortcuts import render, HttpResponse from django.conf import settings from rest_framework.decorators import api_view from rest_framework.response import Response import random from .models import Planet from .serializers import PlanetSerializer from api.serializers import GenericSerializer from api.vie...
yitchee/The-Clone-Wars-API
api/planets/views.py
views.py
py
1,971
python
en
code
0
github-code
36
[ { "api_name": "models.Planet", "line_number": 17, "usage_type": "name" }, { "api_name": "api.utils.set_options_response", "line_number": 23, "usage_type": "call" }, { "api_name": "api.utils.validate_request", "line_number": 25, "usage_type": "call" }, { "api_name"...
10495517316
from django.test import TestCase, RequestFactory from djlotrek.request_utils import get_host_url class RequestUtilsTestCase(TestCase): def test_get_host_url(self): """ get_host_url function retrieve request object and return host url when request object is not None """ req...
lotrekagency/djlotrek
tests/test_request_utils.py
test_request_utils.py
py
797
python
en
code
7
github-code
36
[ { "api_name": "django.test.TestCase", "line_number": 6, "usage_type": "name" }, { "api_name": "django.test.RequestFactory", "line_number": 12, "usage_type": "call" }, { "api_name": "djlotrek.request_utils.get_host_url", "line_number": 15, "usage_type": "call" }, { ...
2434152222
from funcs import * import numpy as np import matplotlib.pyplot as plt counter = lambda List, isPositive: sum(List) if isPositive else N - sum(List) # Выборка N = 1000 # Class 0 mu_0 = 190 sigma_0 = 10 basketballers = np.random.normal(mu_0, sigma_0, N) # Class 1 mu_1 = 173 sigma_1 = 12 footballers = np.random.norma...
shulayonok/ML4
main.py
main.py
py
2,654
python
en
code
0
github-code
36
[ { "api_name": "numpy.random.normal", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 13, "usage_type": "attribute" }, { "api_name": "numpy.random.normal", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.rando...
29858390178
import time import pickle from pathlib import Path from os.path import splitext import json from tensorflow.keras.wrappers.scikit_learn import KerasClassifier # ASReview dependencies from asreview.review import ReviewSimulate, ReviewOracle, MinimalReview from asreview.utils import text_to_features from asreview.types...
syuanuvt/automated-systematic-review
asreview/review/factory.py
factory.py
py
9,549
python
en
code
null
github-code
36
[ { "api_name": "asreview.config.DEFAULT_MODEL", "line_number": 34, "usage_type": "name" }, { "api_name": "asreview.config.DEFAULT_QUERY_STRATEGY", "line_number": 35, "usage_type": "name" }, { "api_name": "asreview.config.DEFAULT_BALANCE_STRATEGY", "line_number": 36, "usage...
8729618404
#This script will format all images in a given directory to the same size and to gray scale using OpenCV from scipy import ndimage, misc import numpy as np import cv2 as cv from os import listdir #Iterate throuh the training image directory and sub folders img_directory= "/home/paok/Documents/FaceRecognition/trainImage...
PAOK-2001/FaceRecognition
Trainer_auxfiles/imageFormater.py
imageFormater.py
py
1,359
python
en
code
0
github-code
36
[ { "api_name": "os.listdir", "line_number": 10, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 15, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 19,...
70190123945
from tech_news.database import search_news from datetime import datetime # Requisito 6 def search_by_title(title): find = search_news( {"title": {"$regex": f"{title}", "$options": "i"}} ) return [(item["title"], item["url"]) for item in find] # Requisito 7 def search_by_date(date): try: ...
mabiiak/tech-news
tech_news/analyzer/search_engine.py
search_engine.py
py
1,103
python
en
code
0
github-code
36
[ { "api_name": "tech_news.database.search_news", "line_number": 7, "usage_type": "call" }, { "api_name": "datetime.datetime.strptime", "line_number": 18, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 18, "usage_type": "name" }, { "api_na...
7749021941
import sys import os from Bio.Blast import NCBIWWW from Bio.Blast.Applications import NcbiblastxCommandline from Bio.Blast import NCBIXML from Bio import SeqIO E_VALUE_THRESH = 10 RESULTS_XML = "results.xml" PROT_DB = "swissprot" NUC_DB = "nt" if len (sys.argv) != 5: print("Invalid params: 1) In file path - 2) O...
jpalacci/bio
src/ex2.py
ex2.py
py
1,987
python
en
code
0
github-code
36
[ { "api_name": "sys.argv", "line_number": 14, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 16, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 18, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 20...
3300025718
from exif_service import ExifService from ai_service import AiService import base64 import os class ImageService: def __init__(self, app, initial_path, ai_enabled=True): self.directory = initial_path self.app = app self.ai_enabled = ai_enabled self.exif_service = ExifService() ...
tim0-12432/photo-analyzer
backend/image_service.py
image_service.py
py
2,127
python
en
code
0
github-code
36
[ { "api_name": "exif_service.ExifService", "line_number": 13, "usage_type": "call" }, { "api_name": "ai_service.AiService", "line_number": 15, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 25, "usage_type": "call" }, { "api_name": "os.path.isfi...
30540305178
#!/usr/bin/env python3 import requests import pandas as pd import json import logging import sys logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) # Our endpoint URL endpoint = "http://universities.hipolabs.com/search?country=Canada" def report_to_csv(api_url): # Making a GET request to the endpoint ...
samsheriff/seccomp-proj-api
main.py
main.py
py
1,463
python
en
code
0
github-code
36
[ { "api_name": "logging.basicConfig", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.stdout", "line_number": 9, "usage_type": "attribute" }, { "api_name": "logging.DEBUG", "line_number": 9, "usage_type": "attribute" }, { "api_name": "requests.get", ...
71239927463
''' Author - Imanpal Singh <imanpalsingh@gmail.com> GUI application for twitter sentiment analysis Date created : - 02-07-2019 Date modified : - 03-07-2019 ''' #importing requierd libraries import numpy as np import pandas as pd from nltk.corpus import stopwords from nltk.stem.porter import PorterStemmer...
imanpalsingh/twitter-sentiment-analysis
GUI.py
GUI.py
py
3,692
python
en
code
1
github-code
36
[ { "api_name": "nltk.stem.porter.PorterStemmer", "line_number": 14, "usage_type": "call" }, { "api_name": "sklearn.naive_bayes.GaussianNB", "line_number": 17, "usage_type": "call" }, { "api_name": "sklearn.feature_extraction.text.CountVectorizer", "line_number": 20, "usage...
24304392906
import numpy import matplotlib import matplotlib.pyplot as plt from scipy.spatial import distance from copy import deepcopy filename1 = 'normal.txt' filename2 = 'unbalanced.txt' def readData(filename): xc = [] yc = [] coords = [xc, yc] with open(filename,'r') as f: for line in f: x, y = line.split() xc.ap...
nyuseinova/K-Means-Clustering
kMeans.py
kMeans.py
py
3,806
python
en
code
0
github-code
36
[ { "api_name": "numpy.random.randint", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 24, "usage_type": "attribute" }, { "api_name": "scipy.spatial.distance.euclidean", "line_number": 36, "usage_type": "call" }, { "api_name"...
41610031938
import json with open("players.json", 'r') as file: data=json.load(file) p1=data['player'] d={} for wkr in p1: for k,v in wkr.items(): if k=="role" and v=="Wicket-keeper": print("There is one wicket-keeper in a BTeam:", k,v)
tangellamudimanisha/BTeam
wicket-keeper.py
wicket-keeper.py
py
270
python
en
code
0
github-code
36
[ { "api_name": "json.load", "line_number": 3, "usage_type": "call" } ]
25951213667
import streamlit as st import pickle import numpy as np import pandas as pd movies_data = pickle.load(open('./books/movies.pkl','rb')) similarities = pickle.load(open('./books/movie_similarities.pkl','rb')) movies_df = pd.DataFrame(movies_data) movies_title = movies_df['title'].values def recommend(movie): movi...
bheemisme/movie-recommendar-system
app.py
app.py
py
797
python
en
code
0
github-code
36
[ { "api_name": "pickle.load", "line_number": 7, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 8, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.argsort", "line_numbe...
8827399963
from __future__ import absolute_import, division, print_function from collections import OrderedDict import flask from flask import current_app, request class APIEndpoint(object): MIN_API_VERSION = 3 LATEST_API_VERSION = 3 HEADER_PREFIX = "application/vnd.marv.v" def __init__(self, name, func, url_...
ternaris/marv
marv_webapi/tooling.py
tooling.py
py
3,760
python
en
code
3
github-code
36
[ { "api_name": "flask.request.headers.get", "line_number": 22, "usage_type": "call" }, { "api_name": "flask.request.headers", "line_number": 22, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 22, "usage_type": "name" }, { "api_name": "fl...
9645302628
''' Find sum of all primes below N. ''' from datetime import datetime import math import itertools def summationOfPrimes(N): sum = 0 #initialize prime number array, number corresponding to index is a prime if value is True (except first 2) primeArray = [True for i in range(N+1)] number = 2 ...
bikram-gill/code
solutions/projectEuler/python/P0010-SummationOfPrimes.py
P0010-SummationOfPrimes.py
py
1,217
python
en
code
1
github-code
36
[ { "api_name": "datetime.datetime.now", "line_number": 40, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 40, "usage_type": "name" }, { "api_name": "datetime.datetime.now", "line_number": 44, "usage_type": "call" }, { "api_name": "datetim...
27095189897
from django.urls import path from .views import register, login,home, task_edit,task_delete, filter_period_view,logout urlpatterns =[ path("register/", register, name='register'), path('', login, name='login'), path('logout/', logout, name='logout' ), path('home/', home, name='home'), path('task...
cavidanhasanli/Planner_project
planner_app/urls.py
urls.py
py
507
python
en
code
1
github-code
36
[ { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "api_name": "views.register", "line_number": 5, "usage_type": "argument" }, { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "views.login", "...
43380221313
import openai def interact_with_chatgpt_prova(user, system, API_KEY, maxContent, creativita): openai.api_key = API_KEY response = openai.ChatCompletion.create( model="gpt-3.5-turbo-16k", messages=[ {"role": "system", "content": system}, {"role": "user", "cont...
Rfusar/dashboard
dashboard/interazioneGPT/connGPT.py
connGPT.py
py
678
python
it
code
0
github-code
36
[ { "api_name": "openai.api_key", "line_number": 5, "usage_type": "attribute" }, { "api_name": "openai.ChatCompletion.create", "line_number": 7, "usage_type": "call" }, { "api_name": "openai.ChatCompletion", "line_number": 7, "usage_type": "attribute" } ]
74478447143
import random import pygame from pygame.locals import QUIT from pelota import* from Raqueta import* pygame.mixer.init() VENTANA_HORI = 1200 VENTANA_VERT = 600 FPS = 160 BLANCO = (255, 255, 255) NEGRO = (0, 0, 0) fondo= pygame.image.load("fondo.png") pantalla = pygame.display.set_mode((VENTA...
luis10dsn/Pong
Pong/main.py
main.py
py
2,513
python
es
code
0
github-code
36
[ { "api_name": "pygame.mixer.init", "line_number": 6, "usage_type": "call" }, { "api_name": "pygame.mixer", "line_number": 6, "usage_type": "attribute" }, { "api_name": "pygame.image.load", "line_number": 17, "usage_type": "call" }, { "api_name": "pygame.image", ...
19643341301
#! /usr/bin/env python # -*- coding: utf-8 -*- # PyArtForms - Python generative art forms paint algorithms (artificial artist) # experimental 'smears' paint algorithms, v1.0 - core algorithm definitions # (c)2017-2021 MoNsTeR/GDC, Noniewicz.com, Noniewicz.art.pl, Jakub Noniewicz # #01 [...] 'cruel red smears', not on...
monstergdc/pyartforms
playgroud/smears.py
smears.py
py
49,566
python
en
code
4
github-code
36
[ { "api_name": "random.randint", "line_number": 94, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 95, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 96, "usage_type": "call" }, { "api_name": "random.randint", "li...
74713864745
from UM.Application import Application from UM.Logger import Logger from cura.CuraApplication import CuraApplication from cura.PrinterOutputDevice import PrinterOutputDevice, ConnectionState from PyQt5.QtNetwork import QHttpMultiPart, QHttpPart, QNetworkRequest, QNetworkAccessManager, QNetworkReply from PyQt5.QtCore ...
criscola/G-Gen
misc/zip/Cura-master/cura/PrinterOutput/NetworkedPrinterOutputDevice.py
NetworkedPrinterOutputDevice.py
py
14,072
python
en
code
1
github-code
36
[ { "api_name": "enum.IntEnum", "line_number": 17, "usage_type": "name" }, { "api_name": "cura.PrinterOutputDevice.PrinterOutputDevice", "line_number": 25, "usage_type": "name" }, { "api_name": "PyQt5.QtCore.pyqtSignal", "line_number": 26, "usage_type": "call" }, { ...
30129375464
import cv2 face_cascade=cv2.CascadeClassifier(r"C:\Users\KIIT\AppData\Roaming\Python\Python310\site-packages\cv2\data\haarcascade_frontalface_default.xml") cap=cv2.VideoCapture(0) while 1: ret,img=cap.read() color=cv2.cvtColor(img,cv2.COLOR_BGR2RGBA) faces=face_cascade.detectMultiScale(color,1.3,5) fo...
rimo10/object-detection
face.py
face.py
py
520
python
en
code
0
github-code
36
[ { "api_name": "cv2.CascadeClassifier", "line_number": 3, "usage_type": "call" }, { "api_name": "cv2.VideoCapture", "line_number": 4, "usage_type": "call" }, { "api_name": "cv2.cvtColor", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2RGBA",...
29567698176
import requests KIND_SELL = "f3b277728b3fee749481eb3e0b3b48980dbbab78658fc419025cb16eee346775" BALANCE_ERC20 = "5a28e9363bb942b639270062aa6bb295f434bcdfc42c97267bf003f272060dc9" def api_get_sell_fee(sell_token, buy_token, sell_amount, network="mainnet"): fee_url = f"https://api.cow.fi/{network}/api/v1/feeAndQuot...
lidofinance/lido-otc-seller
utils/cow.py
cow.py
py
3,245
python
en
code
1
github-code
36
[ { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 36, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 47, "usage_type": "call" }, { "api_name": "requests.post", "line_num...
36395547481
from selenium import webdriver from selenium.webdriver.common.keys import Keys from datetime import datetime import time class InstagramBot: def __init__(self, username, password): self.username = username self.password = password self.bot = webdriver.Firefox() self.cont =...
matheusleps/InstaBot
instabot.py
instabot.py
py
6,262
python
pt
code
0
github-code
36
[ { "api_name": "selenium.webdriver.Firefox", "line_number": 10, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 10, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 19, "usage_type": "call" }, { "api_name": "selenium.web...
18801922589
from flask import request, json, Response, Blueprint, g, jsonify, make_response from ..models.UserModel import UserModel, UserSchema from ..shared.Authentication import Auth from marshmallow import ValidationError user_api = Blueprint('users', __name__) user_schema = UserSchema() @user_api.after_request # blueprint c...
AnthonyClausing/movie-night-api
src/views/UserView.py
UserView.py
py
3,721
python
en
code
0
github-code
36
[ { "api_name": "flask.Blueprint", "line_number": 6, "usage_type": "call" }, { "api_name": "models.UserModel.UserSchema", "line_number": 7, "usage_type": "call" }, { "api_name": "flask.request.get_json", "line_number": 23, "usage_type": "call" }, { "api_name": "flas...
12366385422
#!/usr/bin/env ccp4-python """ Created on 2 Feb 2015 @author: jmht """ import logging import os import shutil import sys import uuid from ample.util import ample_util, mtz_util try: from mrbump.parsers import parse_shelxe except ImportError: mrbumpd = os.path.join(os.environ['CCP4'], "share", "mrbump", "inc...
rigdenlab/ample
ample/util/shelxe.py
shelxe.py
py
5,172
python
en
code
6
github-code
36
[ { "api_name": "os.path.join", "line_number": 19, "usage_type": "call" }, { "api_name": "os.path", "line_number": 19, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 19, "usage_type": "attribute" }, { "api_name": "sys.path.insert", "line...
70617927783
# Speech Brain Viewer app # to accompany Hamilton, Oganian, Hall, and Chang, Cell 2021 # https://doi.org/10.1016/j.cell.2021.07.019 # # Viewer created by Liberty Hamilton, 2021 # Email liberty.hamilton@austin.utexas.edu with questions # import scipy.io import numpy as np import dash import dash_core_components as dc...
libertyh/SpeechCortex
app.py
app.py
py
24,899
python
en
code
2
github-code
36
[ { "api_name": "dash.Dash", "line_number": 29, "usage_type": "call" }, { "api_name": "flask_caching.Cache", "line_number": 32, "usage_type": "call" }, { "api_name": "os.environ.get", "line_number": 34, "usage_type": "call" }, { "api_name": "os.environ", "line_n...
33109766349
import ctypes import re import os import sys from codegen import clear def extract(): extracts = 0 clear() ctypes.windll.kernel32.SetConsoleTitleW("Loveless.codes | Google Mini Extractor") if not os.path.exists("extracting.txt"): open("extracting.txt", mode='x').close() input(...
pepsi/LovelessGen
modules/extractor.py
extractor.py
py
975
python
en
code
0
github-code
36
[ { "api_name": "codegen.clear", "line_number": 8, "usage_type": "call" }, { "api_name": "ctypes.windll.kernel32.SetConsoleTitleW", "line_number": 9, "usage_type": "call" }, { "api_name": "ctypes.windll", "line_number": 9, "usage_type": "attribute" }, { "api_name": ...
25371860228
from plugins.search_engine_scraping_plugin import SearchEngineScrapingPlugin import requests import re from bs4 import BeautifulSoup class DuckDuckGoPlugin(SearchEngineScrapingPlugin): """ This plugin implements a screen scraping for Duck Duck Go search engine""" _url = None def get_results(self, query)...
willsimoes/projeto-final
plugins/duck_duck_go_plugin.py
duck_duck_go_plugin.py
py
1,675
python
en
code
0
github-code
36
[ { "api_name": "plugins.search_engine_scraping_plugin.SearchEngineScrapingPlugin", "line_number": 7, "usage_type": "name" }, { "api_name": "re.sub", "line_number": 24, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 30, "usage_type": "call" }, { ...
27520193757
from nltk.util import ngrams import nltk f1=open('wsw.txt', 'r') f2=open('posonly.txt', 'w') f3=open('negonly.txt', 'w') for line in f1: if line.split(None, 1)[0] == '+': s=line.split(' ',1)[1] f2.write(s) f1.close() f1=open('wsw.txt', 'r') for line in f1: if line.split(None, 1)[0] == '-': s=line.split(...
koder951/NLP_Project
6/bigram.py
bigram.py
py
1,026
python
en
code
0
github-code
36
[ { "api_name": "nltk.util.ngrams", "line_number": 37, "usage_type": "call" }, { "api_name": "nltk.FreqDist", "line_number": 39, "usage_type": "call" }, { "api_name": "nltk.util.ngrams", "line_number": 54, "usage_type": "call" }, { "api_name": "nltk.FreqDist", "...
70954832424
#!/usr/bin/env python # -*- coding: utf-8 -*- """Contains an interpreter class that takes raw grayscale data from the picarx grayscale module and maps it to a direction value between -1 and 1. The direction value is determined with a psuedo PD controller.""" import picarx_improved import logging import time import nu...
EverardoG/RobotSystems
lib/line_following_interpreter.py
line_following_interpreter.py
py
6,327
python
en
code
0
github-code
36
[ { "api_name": "logging.basicConfig", "line_number": 12, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 12, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.DEBUG...
7755827639
import asyncio import io import logging from abc import ABC, abstractmethod from dataclasses import dataclass from typing import Any, Dict, Generic, List, Optional, Type, TypeVar, Union from urllib.parse import urlsplit import aiohttp import mercantile from funclib.models import RenderOptions from funclib.raster impor...
microsoft/planetary-computer-apis
pcfuncs/funclib/tiles.py
tiles.py
py
7,469
python
en
code
88
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 26, "usage_type": "call" }, { "api_name": "typing.TypeVar", "line_number": 28, "usage_type": "call" }, { "api_name": "funclib.raster.Raster", "line_number": 28, "usage_type": "name" }, { "api_name": "typing.TypeVar...
27941619917
import gc import itertools import multiprocessing as mp from math import ceil import numpy as np import pandas as pd from scipy.sparse import csr_matrix from scipy.sparse import issparse from SEMITONES._utils import _chunk_indices from SEMITONES._utils import _linreg_get_beta from SEMITONES._utils import _permute fro...
ohlerlab/SEMITONES
src/SEMITONES/enrichment_scoring.py
enrichment_scoring.py
py
16,684
python
en
code
8
github-code
36
[ { "api_name": "gc.enable", "line_number": 17, "usage_type": "call" }, { "api_name": "scipy.sparse.issparse", "line_number": 27, "usage_type": "call" }, { "api_name": "SEMITONES._utils._chunk_indices", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy...
27888263770
from django.db import models from django.core.exceptions import ValidationError def validate_thumbnail_size(field_file_obj): file_size = field_file_obj.file.size kilobyte_limit = 256 if file_size >= kilobyte_limit * 1024: raise ValidationError(f"This image is {file_size / 1024}kb. Please make sure it i...
theorangeyakco/sarpanch
content/utils.py
utils.py
py
700
python
en
code
2
github-code
36
[ { "api_name": "django.core.exceptions.ValidationError", "line_number": 10, "usage_type": "call" }, { "api_name": "django.db.models.Model", "line_number": 13, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 13, "usage_type": "name" }, { ...
13097952438
# !/usr/bin/env python # -*- coding: utf-8 -*- """ @author: lishuang @description: 绘制 sigmoid 函数 """ import numpy as np import matplotlib.pyplot as plt def sigmoid(x): """ sigmoid 函数 :param x: :return: """ y = 1 / (1 + np.exp(-x)) return y def derivative_sigmoid(x): """ sigmoi...
TatenLee/machine-learning
bi/core/l7/activation_function/sigmoid.py
sigmoid.py
py
733
python
en
code
1
github-code
36
[ { "api_name": "numpy.exp", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number": 38, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.plot", "line_number": 44, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", ...
22753766688
"""Deep_acsauto package definition""" from setuptools import setup, find_packages from __init__ import __version__ # Read long description from file with open("README.md", "r") as fh: LONG_DESCRIPTION = fh.read() setup( name="DeepACSA", version=__version__, description=( "Anatomical cross-se...
maxull/Sharples-Lab
DeepACSA/DeepACSA-main/setup.py
setup.py
py
1,552
python
en
code
2
github-code
36
[ { "api_name": "setuptools.setup", "line_number": 11, "usage_type": "call" }, { "api_name": "__init__.__version__", "line_number": 13, "usage_type": "name" }, { "api_name": "setuptools.find_packages", "line_number": 49, "usage_type": "call" } ]
30292556243
from mesa import Agent from src.agents import Environment, Food from src.utils import calculate_distance, get_item, random_move FORAGING = 'PROCURANDO' HOMING = 'VOLTANDO' class ForagingAnt(Agent): def __init__(self, current_id, model, pos, color): super().__init__(current_id, model) self....
UnBParadigmas2022-1/2022.1_G3_SMA_Formigueiro
src/agents/foragingAgent.py
foragingAgent.py
py
5,369
python
pt
code
6
github-code
36
[ { "api_name": "mesa.Agent", "line_number": 11, "usage_type": "name" }, { "api_name": "src.agents.Food", "line_number": 25, "usage_type": "call" }, { "api_name": "src.utils.get_item", "line_number": 34, "usage_type": "call" }, { "api_name": "src.agents.Food", "...
70010914665
import urllib.request import ssl import json ssl._create_default_https_context = ssl._create_unverified_context def search(keyword): client_id = "BoqP7ttLY0wDhxvLzawS" client_secret = "ztLCPvpLyO" encText = urllib.parse.quote(keyword) url = "https://openapi.naver.com/v1/search/blog?query=" + encTex...
Kyeongrok/python_yla
com/week7/am/naver_openapi8.py
naver_openapi8.py
py
862
python
en
code
1
github-code
36
[ { "api_name": "ssl._create_default_https_context", "line_number": 5, "usage_type": "attribute" }, { "api_name": "ssl._create_unverified_context", "line_number": 5, "usage_type": "attribute" }, { "api_name": "urllib.request.parse.quote", "line_number": 12, "usage_type": "c...
72514606824
import logging import os import sys import tempfile import warnings from contextlib import contextmanager from collections import defaultdict from datetime import datetime, timedelta, timezone from itertools import chain from subprocess import CalledProcessError from urllib.parse import urljoin, urlsplit, urlunsplit ...
ossobv/keystone-light
keystone_light/__init__.py
__init__.py
py
37,297
python
en
code
0
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 17, "usage_type": "call" }, { "api_name": "logging.NullHandler", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path.expanduser", "line_number": 72, "usage_type": "call" }, { "api_name": "os.path", ...
23563599190
# -*- coding: utf-8 -*- """ Created on Tue Jun 20 07:39:26 2017 @author: mnshr """ from statsmodels.stats.outliers_influence import variance_inflation_factor """ VIF = 1 (Not correlated) 1 < VIF < 5 (Moderately correlated) VIF > 5 to 10 (Highly correlated) VIF is one way to understand whether any two independent va...
mnshr/kgl
stats.py
stats.py
py
2,925
python
en
code
0
github-code
36
[ { "api_name": "statsmodels.stats.outliers_influence.variance_inflation_factor", "line_number": 26, "usage_type": "call" }, { "api_name": "statsmodels.stats.outliers_influence.variance_inflation_factor", "line_number": 67, "usage_type": "call" } ]
42544034746
#!/usr/bin/env python3 import argparse import csv import os import pickle import shutil import time from concurrent import futures import grpc from pysrbup.backup_system_pb2 import (Block, DeleteBackupResponse, GetBackupResponse, GetBlocksResponse, ...
dorchul/pysrbup
pysrbup/server.py
server.py
py
5,900
python
en
code
0
github-code
36
[ { "api_name": "os.path.join", "line_number": 25, "usage_type": "call" }, { "api_name": "os.path", "line_number": 25, "usage_type": "attribute" }, { "api_name": "pickle.load", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path.join", "line_number...
22517487941
from datetime import timedelta from django.utils import timezone from django.contrib.auth.models import User import pytest from typing import List from .. import models EVENT_NAME = "football with friends" MAX_PART = 20 IS_PRIVATE = False DATETIME = timezone.now() + timedelta(days=2) POLL_END_TIME = timezone.now() PO...
redhat-beyond/FitMeet
event/tests/conftest.py
conftest.py
py
6,663
python
en
code
0
github-code
36
[ { "api_name": "django.utils.timezone.now", "line_number": 12, "usage_type": "call" }, { "api_name": "django.utils.timezone", "line_number": 12, "usage_type": "name" }, { "api_name": "datetime.timedelta", "line_number": 12, "usage_type": "call" }, { "api_name": "dj...
2496560289
#!/usr/bin/env python """ photomongo - read and process all tweets possible Usage: photomongo [options] CONFIGFILE Options: -h --help Show this screen. --pickle-to=<picklefile> file to save tweets. --pickle-from=<picklefile> file to read tweets. --max=<number> maximum num...
anielsen001/photomongo
photomongo.py
photomongo.py
py
6,387
python
en
code
1
github-code
36
[ { "api_name": "logging.basicConfig", "line_number": 20, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 23, "usage_type": "attribute" }, { "api_name": "logging.FileHandler", "line_number": 24, "usage_type": "call" }, { "api_name": "logging.ge...
25285589404
''' Find out the relationship between Liquor Sales and Vehicle Accidents ''' import sys import math import uuid from schema import liquor_schema from matplotlib import pyplot as plt import pandas as pd from pyspark.sql import SparkSession, types from pyspark.sql import functions as F assert sys.version_info >= (3, 5)...
libou/Liquor-Sale-Analysis
liquor_vehicle.py
liquor_vehicle.py
py
3,441
python
en
code
0
github-code
36
[ { "api_name": "sys.version_info", "line_number": 14, "usage_type": "attribute" }, { "api_name": "pyspark.sql.SparkSession.builder.appName", "line_number": 18, "usage_type": "call" }, { "api_name": "pyspark.sql.SparkSession.builder", "line_number": 18, "usage_type": "attri...
15576814335
from collections import deque T = int(input()) for _ in range(T): N, M = map(int, input().split()) queue = deque(map(int, input().split())) queue = deque([(i, idx) for idx, i in enumerate(queue)]) count = 0 while True: if queue[0][0] == max(queue, key=lambda x: x[0])[0]: ...
HelloWook/AlgorithmStudy
백준/Silver/1966. 프린터 큐/프린터 큐.py
프린터 큐.py
py
532
python
en
code
0
github-code
36
[ { "api_name": "collections.deque", "line_number": 6, "usage_type": "call" }, { "api_name": "collections.deque", "line_number": 7, "usage_type": "call" } ]
2022880805
import logging as log import math import torch import torch.nn as nn from pytorch_lightning.core.lightning import LightningModule import nltocode.decoder as custom_decoder import nltocode.encoder as custom_encoder class Transformer(LightningModule): def __init__(self, d_model, ...
SmartDataAnalytics/codeCAI
nl2codemodel/src/nltocode/transformerinf.py
transformerinf.py
py
11,778
python
en
code
4
github-code
36
[ { "api_name": "pytorch_lightning.core.lightning.LightningModule", "line_number": 12, "usage_type": "name" }, { "api_name": "torch.nn.Embedding", "line_number": 92, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 92, "usage_type": "name" }, { "api_...
14644417459
from fastapi import FastAPI, Response from starlette.middleware.cors import CORSMiddleware from routes import jobs from logger.log_info import logger app = FastAPI() @app.middleware('http') async def log_request(request, call_next): logger.info(f'{request.method} {request.url}') response = await call_next(r...
Baktybek0312/Log_BloG
main.py
main.py
py
831
python
en
code
0
github-code
36
[ { "api_name": "fastapi.FastAPI", "line_number": 7, "usage_type": "call" }, { "api_name": "logger.log_info.logger.info", "line_number": 12, "usage_type": "call" }, { "api_name": "logger.log_info.logger", "line_number": 12, "usage_type": "name" }, { "api_name": "log...
1938568135
import os import glob import pathlib from io import StringIO from typing import List, Dict, Optional from dataclasses import dataclass import kclvm.compiler.parser.parser as parser import kclvm.compiler.vfs as vfs import kclvm.compiler.extension.plugin.plugin_model as plugin import kclvm.compiler.extension.builtin.bui...
kcl-lang/kcl-py
kclvm/tools/list_attribute/utils.py
utils.py
py
9,943
python
en
code
8
github-code
36
[ { "api_name": "dataclasses.dataclass", "line_number": 17, "usage_type": "name" }, { "api_name": "kclvm.kcl.ast.ast.Module", "line_number": 27, "usage_type": "attribute" }, { "api_name": "kclvm.kcl.ast.ast", "line_number": 27, "usage_type": "name" }, { "api_name": ...
3585569128
import pandas as pd import numpy as np import matplotlib.pyplot as plt master_list = list() with open("../Data_sets/corpus_2_unigram_sorted.txt") as fileobj: for line in fileobj: if line == "" or line == " " or line == "\n": continue l = line.strip(' ') l = l.strip('\n') ...
tarun0409/nlp-assignment-3-4
zipfs.py
zipfs.py
py
705
python
en
code
0
github-code
36
[ { "api_name": "pandas.DataFrame", "line_number": 21, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.show", "line_number": 26, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 26, "usage_type": "name" } ]
71050589225
import streamlit as st from langchain.llms import OpenAI from langchain.prompts import PromptTemplate st.title("💬 Prompt Critic") openai_api_key = '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' def prompt_critic(prompts): # Instantiate LLM model llm = OpenAI(model_name="gpt-4", openai_api_key=open...
shihwesley/CMPE297
Prompt Engineering assignment/pages/1_Prompt Critic.py
1_Prompt Critic.py
py
990
python
en
code
0
github-code
36
[ { "api_name": "streamlit.title", "line_number": 5, "usage_type": "call" }, { "api_name": "langchain.llms.OpenAI", "line_number": 12, "usage_type": "call" }, { "api_name": "langchain.prompts.PromptTemplate", "line_number": 15, "usage_type": "call" }, { "api_name": ...
25376871762
from sklearn.model_selection import cross_val_score from sklearn.model_selection import cross_val_predict from sklearn.metrics import classification_report import numpy as np def get_cv_metrics(text_clf, train_data, train_class, k_split): accuracy_scores = cross_val_score(text_clf, # steps to convert raw messages...
abelsaug/EmpathyPrediction
CV_metrics.py
CV_metrics.py
py
1,078
python
en
code
0
github-code
36
[ { "api_name": "sklearn.model_selection.cross_val_score", "line_number": 7, "usage_type": "call" }, { "api_name": "sklearn.model_selection.cross_val_predict", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 19, "usage_type": "call" }...
16127616120
import os import json from keras.models import load_model import pandas as pd import pickle import numpy as np import shutil from keras.preprocessing import image from tqdm.notebook import tqdm from PIL import ImageFile BASE_MODEL_PATH = os.path.join(os.getcwd(),"model") ...
Abhinav1004/Distracted-Driver-Detection
demo_on_video/driver_prediction.py
driver_prediction.py
py
2,607
python
en
code
37
github-code
36
[ { "api_name": "os.path.join", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "os.getcwd", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.join", "line_number":...
26910125965
#!/usr/bin/python3 import sys import re import string import xml.etree.ElementTree as ET import getopt import math import codecs import time import png # global variables inputFile = "" outputFile = "" parseAll = True timeFrom = "" timeTo = "" objectNames = "" eventTypes = "" actionNames = "" objectClasses = "" pathS...
SindenDev/3dimviewer
applications/3DimViewer/tools/activity_logging/logProcessing.py
logProcessing.py
py
11,807
python
en
code
9
github-code
36
[ { "api_name": "getopt.getopt", "line_number": 83, "usage_type": "call" }, { "api_name": "getopt.GetoptError", "line_number": 84, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 86, "usage_type": "call" }, { "api_name": "sys.exit", "line_n...
14267295600
from typing import Any from data_structures.stacks.stack import Stack, PopEmpty class StackWithBottom(Stack): def __init__(self): self._bottom = None super(StackWithBottom, self).__init__() def push(self, value: Any): super(StackWithBottom, self).push(value) if not self._bot...
goncalossantos/CtCI
chapter_3/stack_of_stacks.py
stack_of_stacks.py
py
2,062
python
en
code
0
github-code
36
[ { "api_name": "data_structures.stacks.stack.Stack", "line_number": 6, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 11, "usage_type": "name" }, { "api_name": "data_structures.stacks.stack.PopEmpty", "line_number": 25, "usage_type": "call" }, { ...
5063097451
from intervaltree import Interval as interval, IntervalTree class OutputExporter(object): def __init__( self, mz_prec ): self.mz_prec = mz_prec self.BG = None def iBG(self, node_type): '''Iterate over all nodes of a given type in the whole big graph **BG** of solved subproblems. ...
MatteoLacki/MassTodonPy
MassTodonPy/Outputting/export_outputs.py
export_outputs.py
py
3,880
python
en
code
1
github-code
36
[ { "api_name": "intervaltree.IntervalTree", "line_number": 28, "usage_type": "call" }, { "api_name": "intervaltree.Interval", "line_number": 28, "usage_type": "call" }, { "api_name": "intervaltree.Interval", "line_number": 38, "usage_type": "call" } ]
5314308477
import plotly.express as px import pandas as pd import numpy as np import plotly.graph_objs as go from numpy.core.fromnumeric import shape def bar_chart(df): df2 = df[(df['homelessness'] == 'Overall Homeless') & (df['state'] == 'Total')] barchart = px.bar(df2, x = 'year' , y = 'number' , title = 'Year wise count of...
MSidda/Plotly-Dashboard
utilities/vis.py
vis.py
py
13,487
python
en
code
0
github-code
36
[ { "api_name": "plotly.express.bar", "line_number": 9, "usage_type": "call" }, { "api_name": "plotly.express", "line_number": 9, "usage_type": "name" }, { "api_name": "plotly.express.line", "line_number": 17, "usage_type": "call" }, { "api_name": "plotly.express", ...
43751035063
from __future__ import unicode_literals import os from collections import OrderedDict, namedtuple from operator import itemgetter from pathlib import Path import six if six.PY2: from collections import MutableSequence, Sized elif six.PY3: from collections.abc import MutableSequence, Sized class Table(Mutab...
turicas/rows
rows/table.py
table.py
py
9,338
python
en
code
851
github-code
36
[ { "api_name": "six.PY2", "line_number": 10, "usage_type": "attribute" }, { "api_name": "six.PY3", "line_number": 12, "usage_type": "attribute" }, { "api_name": "collections.abc.MutableSequence", "line_number": 16, "usage_type": "name" }, { "api_name": "collections...
14719000244
from multiprocessing.sharedctypes import Value from xmlrpc.client import Boolean from source.dataloaders.data_loaders_factory import DataLoaderFactory import torch import torchaudio import os import numpy as np import csv from source.dataloaders.project_2_dataset import Project_2_Dataset from source.utils.config_manage...
Shaveek23/cifar10-computer_vision
source/dataloaders/onevsall_dataloadersfactory.py
onevsall_dataloadersfactory.py
py
4,491
python
en
code
0
github-code
36
[ { "api_name": "source.dataloaders.data_loaders_factory.DataLoaderFactory", "line_number": 15, "usage_type": "name" }, { "api_name": "torch.nn", "line_number": 17, "usage_type": "attribute" }, { "api_name": "source.utils.config_manager.ConfigManager.is_eden", "line_number": 38...
24997436439
"""empty message Revision ID: 60ec815b1cea Revises: e20eb33302a2 Create Date: 2023-01-28 01:32:26.058698 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '60ec815b1cea' down_revision = 'e20eb33302a2' branch_labels = None depends_on = None def upgrade(): # ...
gaelzarco/aihub
flask/migrations/versions/60ec815b1cea_.py
60ec815b1cea_.py
py
1,371
python
en
code
1
github-code
36
[ { "api_name": "alembic.op.batch_alter_table", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.INTEGER", "line_number": 23, "usage_type": "call" }, { "api_name": "sqlalchemy...
30490693575
# encoding: utf-8 from paddlelite.lite import * import cv2 as cv import numpy as np from matplotlib import pyplot as plt from time import time from PIL import Image from PIL import ImageFont from PIL import ImageDraw from PIL import ImageEnhance class PPYOLO_Detector(object): def __init__(self, nb_path=None, #...
Feng1909/PPYOLO-Tiny
Tiny.py
Tiny.py
py
10,384
python
en
code
2
github-code
36
[ { "api_name": "numpy.ndarray", "line_number": 84, "usage_type": "attribute" }, { "api_name": "PIL.Image.open", "line_number": 92, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 92, "usage_type": "name" }, { "api_name": "numpy.ndarray", "line...
31641438007
import requests from bs4 import BeautifulSoup import category site_url = 'https://books.toscrape.com/index.html' # global var def save_all_categories(site_url): """ Save all data of the books of the entire category (it handles pagination) and for each site's category """ global links # reut...
o0nekov0o/OpenClassrooms_P2
main.py
main.py
py
1,351
python
en
code
1
github-code
36
[ { "api_name": "requests.get", "line_number": 16, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 19, "usage_type": "call" }, { "api_name": "category.save_one_category", "line_number": 24, "usage_type": "call" } ]
70295411304
import torch.utils.data from torch.utils.data import DataLoader from torchvision import datasets import torchvision.transforms as T def load_cifar10(): train_data = datasets.CIFAR10( root='../data', train=True, download=True, transform=T.Compose([ T.ToTensor(), ...
simogiovannini/DLA-lab1
utils/data_loader.py
data_loader.py
py
1,311
python
en
code
0
github-code
36
[ { "api_name": "torchvision.datasets.CIFAR10", "line_number": 8, "usage_type": "call" }, { "api_name": "torchvision.datasets", "line_number": 8, "usage_type": "name" }, { "api_name": "torchvision.transforms.Compose", "line_number": 12, "usage_type": "call" }, { "ap...
20456498612
import discum import json import os.path import random import time from rich import print def load_from_data_else_ask(field, message): global data if data is not None and field in data.keys(): return data[field] return input(message) data = None if os.path.exists("data.json"): ...
Apophis52/Python-Mass-DM-Selfbot
index.py
index.py
py
2,499
python
en
code
21
github-code
36
[ { "api_name": "os.path.path.exists", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.path", "line_number": 17, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 17, "usage_type": "name" }, { "api_name": "json.loads", "line_...
34338203362
from p111 import Solution from common.tree import buildTreeFromList test_cases = [ ([3,9,20,None,None,15,7], 2), ([2,None,3,None,4,None,5,None,6], 5), ([], 0), ] def test_minDepth(): s = Solution() for case in test_cases: assert s.minDepth(buildTreeFromList(case[0])) == case[1], case
0x0400/LeetCode
p111_test.py
p111_test.py
py
315
python
en
code
0
github-code
36
[ { "api_name": "p111.Solution", "line_number": 11, "usage_type": "call" }, { "api_name": "common.tree.buildTreeFromList", "line_number": 13, "usage_type": "call" } ]
75310096425
import random import re import socket import uuid from scapy.all import IP, TCP, wrpcap, Raw, Ether from sys import version_info if version_info.major == 2: from BaseHTTPServer import BaseHTTPRequestHandler from StringIO import StringIO else: from http.server import BaseHTTPRequestHandler from io imp...
b40yd/security
http_text_to_pcap.py
http_text_to_pcap.py
py
3,848
python
en
code
96
github-code
36
[ { "api_name": "sys.version_info.major", "line_number": 10, "usage_type": "attribute" }, { "api_name": "sys.version_info", "line_number": 10, "usage_type": "name" }, { "api_name": "http.server.BaseHTTPRequestHandler", "line_number": 18, "usage_type": "name" }, { "a...
12567632552
import torch from torch.utils.data import DataLoader from torchvision import transforms, datasets from torch import nn, optim from ae import AE import visdom from vae import VAE from torchvision import models def main(): vis = visdom.Visdom() tf = transforms.Compose([ transforms.ToTensor(), # 转换成ten...
wy171205/DeepLearning
AutoEncoder/main.py
main.py
py
2,114
python
en
code
0
github-code
36
[ { "api_name": "visdom.Visdom", "line_number": 12, "usage_type": "call" }, { "api_name": "torchvision.transforms.Compose", "line_number": 14, "usage_type": "call" }, { "api_name": "torchvision.transforms", "line_number": 14, "usage_type": "name" }, { "api_name": "t...
30981112855
#!/usr/bin/python # <bitbar.title>Stock Ticker</bitbar.title> # <bitbar.version>1.0</bitbar.version> # <bitbar.author>Robert Kanter</bitbar.author> # <bitbar.author.github>rkanter</bitbar.author.github> # <bitbar.desc>Provides a rotating stock ticker in your menu bar, with color and percentage changes</bitbar.desc> # <...
damncabbage/dotfiles
macOS/BitBar/Plugins/Finance/stock-ticker.30s.py
stock-ticker.30s.py
py
1,981
python
en
code
3
github-code
36
[ { "api_name": "urllib2.urlopen", "line_number": 26, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 27, "usage_type": "call" } ]
16155659298
import json import logging import os import re from pathlib import Path from cdi_forms.forms import BackgroundForm, BackpageBackgroundForm from cdi_forms.models import BackgroundInfo, Instrument_Forms, Zipcode from django.conf import settings from django.http import Http404 from django.utils import translation from re...
langcog/web-cdi
webcdi/cdi_forms/views/utils.py
utils.py
py
13,035
python
en
code
7
github-code
36
[ { "api_name": "logging.getLogger", "line_number": 15, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path.dirname", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path", "line_nu...
14152007415
import requests import json import sys from .ui import print_success from requests.auth import HTTPBasicAuth def find_github_emails(organization,organization_domain,github_api,github_username,github_token): github_emails = [] print_success("[+] Searching GitHub") page_number = 1 while page_number < 2: orgquery ...
highmeh/lure
resources/github.py
github.py
py
1,007
python
en
code
148
github-code
36
[ { "api_name": "ui.print_success", "line_number": 10, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.auth.HTTPBasicAuth", "line_number": 14, "usage_type": "call" }, { "api_name": "json.loads"...
19989138110
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import gallery.models class Migration(migrations.Migration): dependencies = [ ('gallery', '0004_exhibit'), ] operations = [ migrations.AlterField( model_name='exhibit', ...
andrewhead/Gallery-Paths
server/gallery/migrations/0005_auto_20141206_2124.py
0005_auto_20141206_2124.py
py
499
python
en
code
0
github-code
36
[ { "api_name": "django.db.migrations.Migration", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 8, "usage_type": "name" }, { "api_name": "django.db.migrations.AlterField", "line_number": 15, "usage_type": "call" }, {...
4134355956
import pygame import sys import time from RobotLib.Math import * import math import argparse from RobotLib.FrontEnd import * from RobotLib.IO import * import numpy as np class MyFrontEnd(FrontEnd): """ Custom sub-class of FrontEnd You can write custom sub-routines here to respond to UI events and calculat...
jeffherbst/sparki
template.py
template.py
py
6,840
python
en
code
0
github-code
36
[ { "api_name": "pygame.key.get_pressed", "line_number": 42, "usage_type": "call" }, { "api_name": "pygame.key", "line_number": 42, "usage_type": "attribute" }, { "api_name": "pygame.K_UP", "line_number": 42, "usage_type": "attribute" }, { "api_name": "pygame.key.ge...
2725915163
from os import scandir, rename from os.path import splitext, exists from shutil import move from time import sleep import logging from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler src_path = "" #local path to folder source_dir = src_path + "Downloads" dest_dir_docs = src_path +...
zastasja/automate_stuff
moving_from_download.py
moving_from_download.py
py
2,787
python
en
code
0
github-code
36
[ { "api_name": "os.path.splitext", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 32, "usage_type": "call" }, { "api_name": "os.rename", "line_number": 42, "usage_type": "call" }, { "api_name": "shutil.move", "line_num...
20350466819
try: import json except ImportError: import simplejson as json import requests import pandas import datetime import time # Please enter the file's path of the URLs to be checked file_path = str(input('Please Enter The File Path: ')) input_CSV = pandas.read_csv(file_path) Urls = input_CSV['Domain']....
dorintu/VirusTotal
VirusTotal_Assignment.py
VirusTotal_Assignment.py
py
3,484
python
en
code
0
github-code
36
[ { "api_name": "pandas.read_csv", "line_number": 12, "usage_type": "call" }, { "api_name": "datetime.datetime.now", "line_number": 36, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 36, "usage_type": "attribute" }, { "api_name": "pandas.r...
10489171606
# -*- coding: utf-8 -*- from flask import Blueprint, Response, g blueprint = Blueprint('property-tax-assessments-broken-model-scatterplots', __name__) @blueprint.app_template_filter('get_length') def get_length(thing): return len(thing) """ Tarbell project configuration """ # Google spreadsheet key SPREADSHEET...
ryanbmarx/cook-county-property-tax-broken-model
tarbell_config.py
tarbell_config.py
py
1,937
python
en
code
0
github-code
36
[ { "api_name": "flask.Blueprint", "line_number": 5, "usage_type": "call" } ]
24843377512
' Script to for association analysis of clusters. Created by S Brueningk 2023 ' import pandas as pd import numpy as np from IPython.core.display import display, Markdown import os.path from pathlib import Path from sklearn.preprocessing import StandardScaler import matplotlib.pyplot as plt import statsmodels.api as sm...
BorgwardtLab/LongCOVID
associationClusters.py
associationClusters.py
py
9,990
python
en
code
0
github-code
36
[ { "api_name": "numpy.c_", "line_number": 19, "usage_type": "attribute" }, { "api_name": "statsmodels.api.Logit", "line_number": 20, "usage_type": "call" }, { "api_name": "statsmodels.api", "line_number": 20, "usage_type": "name" }, { "api_name": "numpy.c_", "l...
18573856316
import numpy as np import matplotlib.pyplot as plt N = 50 # Nb of steps dt = 0.01 kv = 0.1 tau = 0.05 lamb = 0 ns = 6 ############################### ## Complete the code below #### ############################### A = np.array([[1,0,dt,0,0,0],[0,1,0,dt,0,0],[0,0,1-kv*dt,0,dt,0],[0,0,0,1-kv*dt,0,dt],...
decomiteA/ReachRLToolbox
OFC_2D/OFC2D_Reaching.py
OFC2D_Reaching.py
py
3,838
python
en
code
0
github-code
36
[ { "api_name": "numpy.array", "line_number": 16, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 18, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": ...
2358896940
"""empty message Revision ID: bc7b1dd477a1 Revises: d7ad318a76d9 Create Date: 2021-08-24 19:22:40.497985 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'bc7b1dd477a1' down_revision = 'd7ad318a76d9' branch_labels = None depends_on = None def upgrade(): # ...
nickcao123456/blog
migrations/versions/bc7b1dd477a1_.py
bc7b1dd477a1_.py
py
788
python
en
code
0
github-code
36
[ { "api_name": "alembic.op.add_column", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 21, "usage_type": "call" }, { "api_name": "sqlalchemy.Integer...
3954152863
from PIL import Image img = Image.open("PDI/folha.png").convert('L') adj = 8 # 4 para adj-8, 8 para adj-m visited = [[False for col in range(img.height)] for row in range(img.width)] dx = [0, 0, 1, -1, 1, 1, -1, -1] dy = [1, -1, 0, 0, 1, -1, 1, -1] def isEdge(x, y): for i in range(adj): if(img....
Pedroffda/Digital-Image-Processing
Pratica-01/code/adj_border.py
adj_border.py
py
1,417
python
en
code
0
github-code
36
[ { "api_name": "PIL.Image.open", "line_number": 3, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 3, "usage_type": "name" } ]
14032964317
from django.http import JsonResponse, HttpResponse from .models import Template, Field import re from .utils import check_db def post(request): check_db() form = type_form(request.GET) name = "" for name_f, val in form.items(): res = Field.objects.filter(name_field=name_f, type_field=val).valu...
krlns/forms_template
test_task/app/views.py
views.py
py
924
python
en
code
0
github-code
36
[ { "api_name": "utils.check_db", "line_number": 8, "usage_type": "call" }, { "api_name": "models.Field.objects.filter", "line_number": 12, "usage_type": "call" }, { "api_name": "models.Field.objects", "line_number": 12, "usage_type": "attribute" }, { "api_name": "m...
25107350000
from OpenGL.GL import * from Masks import * from ObjectLoader import ObjectLoader from Model import Model from Shaders.ColoredObjectShader import ColoredObjectShader import pyrr class MazeCore: def __init__(self, shader : ColoredObjectShader): # self.transparentShader = TransparentShader() # ...
VolodymyrVakhniuk/Pacman
src/Core/MazeCore.py
MazeCore.py
py
1,878
python
en
code
1
github-code
36
[ { "api_name": "Shaders.ColoredObjectShader.ColoredObjectShader", "line_number": 10, "usage_type": "name" }, { "api_name": "Shaders.ColoredObjectShader.ColoredObjectShader", "line_number": 20, "usage_type": "name" }, { "api_name": "ObjectLoader.ObjectLoader", "line_number": 22...
17849581957
from .config import np, Vector, Keyword, ParameterName, ZOrderConfig, TextConfig, HorizontalAlignment, \ VerticalAlignment, ColorConfig from .config import BentChevronArrow, ChevronArrow, CompositeFigure, Rectangle, TextBox, RoundRectangle from .config import MIDDiagram, NetworkDiagram, CulturedCell, Mice, Human, C...
LocasaleLab/Automated-MFA-2023
figures/figure_plotting/figure_elements/diagrams/diagrams/noisy_data_diagram.py
noisy_data_diagram.py
py
10,532
python
en
code
0
github-code
36
[ { "api_name": "config.CommonElementConfig.normal_document_size", "line_number": 8, "usage_type": "attribute" }, { "api_name": "config.CommonElementConfig", "line_number": 8, "usage_type": "name" }, { "api_name": "config.CommonElementConfig.text_z_order", "line_number": 12, ...
18521700070
import pandas as pd import pickle import numpy as np from tqdm import tqdm import os, sys, inspect from collections import defaultdict from processing_utils import make_aggregate_df, make_yearly_df, make_class_df, make_df_by_decade, make_parent_df MIN_FREQ = 20 # folders for reading and writing data raw_data_folder = ...
benpry/gender-associations-child-language
code/bootstrap/bootstrap_aggregate_yearly.py
bootstrap_aggregate_yearly.py
py
3,396
python
en
code
0
github-code
36
[ { "api_name": "numpy.random.seed", "line_number": 23, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 23, "usage_type": "attribute" }, { "api_name": "pickle.load", "line_number": 28, "usage_type": "call" }, { "api_name": "pickle.load", "li...
39479742836
# -*- coding: utf-8 -*- from django.urls import path, re_path, include from decks import views from decks.views import TournamentListView urlpatterns = [ re_path(r'^$', views.index, name='index'), re_path(r'^(?P<deck_id>[0-9]+)/$', views.deck, name='deck'), re_path(r'^cluster/(?P<cluster_id>[0-9]+)/$', v...
jcrickmer/mtgdbpy
decks/urls.py
urls.py
py
1,036
python
en
code
0
github-code
36
[ { "api_name": "django.urls.re_path", "line_number": 9, "usage_type": "call" }, { "api_name": "decks.views.index", "line_number": 9, "usage_type": "attribute" }, { "api_name": "decks.views", "line_number": 9, "usage_type": "name" }, { "api_name": "django.urls.re_pa...
28924497501
""" 프로그래머스 Lv2 -뉴스 클러스터링 """ # 아이디어가 맘에 들었음!@ """ 20 Minute :: flood fill """ from collections import Counter import math def make_window_size2(string): windows = [] for i in range(len(string)-1): if string[i].isalpha() and string[i+1].isalpha(): windows.append(string[i:i+2].lower()) ...
GuSangmo/BOJ_practice
programmers/level2/뉴스클러스터링.py
뉴스클러스터링.py
py
1,199
python
en
code
0
github-code
36
[ { "api_name": "collections.Counter", "line_number": 29, "usage_type": "call" }, { "api_name": "collections.Counter", "line_number": 30, "usage_type": "call" }, { "api_name": "math.floor", "line_number": 44, "usage_type": "call" } ]