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
72665813758
import requests import os import sys from flask import Flask, jsonify from flask_restful import Resource, Api, reqparse from flask import Flask, render_template, request from flask_uploads import UploadSet, configure_uploads, IMAGES import uuid from flask_cors import CORS from werkzeug.utils import secure_filename im...
zekkelar/ZEK-LIBRARY
helpers_flask/read_book.py
read_book.py
py
1,828
python
en
code
0
github-code
97
[ { "api_name": "helpers.controller.URL", "line_number": 16, "usage_type": "attribute" }, { "api_name": "helpers.controller", "line_number": 16, "usage_type": "name" }, { "api_name": "flask_restful.Resource", "line_number": 19, "usage_type": "name" }, { "api_name": ...
69923233278
""" This is mostly a placeholder for more sophisticated modification but I want it in the flow Things like syncronizing timestamps between multiple gateways (so timestamps appear in order) and better mapping of input RSSI/SNR to output RSSI/SNR, etc """ import json import time import logging import random import da...
Carniverous19/helium-DIY-middleman
src/modify_rxpk.py
modify_rxpk.py
py
3,562
python
en
code
36
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 25, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 39, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 40, "usage_type": "call" }, { "api_name": "datetime.datetime.utc...
28925508073
from xgboost import XGBClassifier from sklearn.multiclass import OneVsRestClassifier # Import the `svm` model from sklearn import svm from sklearn.model_selection import cross_validate from sklearn.metrics import recall_score # Import 'knn' from sklearn.neighbors import KNeighborsClassifier # Import 'random for...
Chenyitong33/NIRScanNano_ML
models_comparison.py
models_comparison.py
py
13,522
python
en
code
2
github-code
97
[ { "api_name": "os.path.realpath", "line_number": 43, "usage_type": "call" }, { "api_name": "os.path", "line_number": 43, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 44, "usage_type": "call" }, { "api_name": "pandas.DataFrame", ...
73748086717
import pygame import sys sys.path.append("../Shared/Python") from Frame import App from System import System class App: def __init__(self,name="Procedural System",winSize=(500,500),tick=60): self.running = True self.clock = pygame.time.Clock() self.tick = tick self.__xdis = winSize...
JacobHutch/Sketches
2020-09-15-ProceduralSpace/Main.py
Main.py
py
1,874
python
en
code
0
github-code
97
[ { "api_name": "sys.path.append", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 3, "usage_type": "attribute" }, { "api_name": "pygame.time.Clock", "line_number": 10, "usage_type": "call" }, { "api_name": "pygame.time", "line...
74983634238
# Plots ccds import matplotlib.pyplot as plt import numpy as np # Plot ccd with accuracy def plotccd(objectid, accuracylist, test_obs, objecttype, targetdir, colorpath): soft = [] hard = [] intens = [] accuracy = [] # Open colorfile and append softness/hardness/intensity/accuracy to lists wi...
JordiTi/int2019
LeaveOneOut/Plotting.py
Plotting.py
py
2,830
python
en
code
2
github-code
97
[ { "api_name": "matplotlib.pyplot.figure", "line_number": 28, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 28, "usage_type": "name" }, { "api_name": "matplotlib.pyplot.title", "line_number": 30, "usage_type": "call" }, { "api_name": "ma...
15738076241
import argparse import torch import numpy as np from skimage import metrics import pytorch_ssim from tqdm import tqdm from torchmetrics.image import StructuralSimilarityIndexMeasure, PeakSignalNoiseRatio from torchmetrics.image.fid import FrechetInceptionDistance def normalize(input_data, norm='centered-norm'): as...
Arksyd96/slice-based-latent-diffusion
evaluate_samples.py
evaluate_samples.py
py
6,966
python
en
code
0
github-code
97
[ { "api_name": "torch.from_numpy", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.load", "line_number": 22, "usage_type": "call" }, { "api_name": "torch.float32", "line_number": 22, "usage_type": "attribute" }, { "api_name": "torch.from_numpy", ...
73408862398
import re from typing import List, Any, Union import ramda as R from psycopg2 import ProgrammingError from psycopg2.extras import execute_values as _ps_execute_values from psycopg2.sql import SQL, Composed from src.database.db_context import ( close_cursor, open_cursor, ) from src.database.types import Cursor...
jakobkolb/python-rest-api
src/database/execute_sql/execute_sql.py
execute_sql.py
py
3,394
python
en
code
0
github-code
97
[ { "api_name": "src.database.types.DBContext", "line_number": 17, "usage_type": "name" }, { "api_name": "typing.Union", "line_number": 17, "usage_type": "name" }, { "api_name": "psycopg2.sql.SQL", "line_number": 17, "usage_type": "name" }, { "api_name": "psycopg2.s...
12502840217
import requests import json from bs4 import BeautifulSoup from uuid import uuid4 def write_json(data,filename='data.json'): with open(filename, 'w', encoding='utf-8') as f: json.dump(data, f, indent=4, ensure_ascii=False) html = requests.get("https://www.filmaffinity.com/es/listtopmovies.php?list_id=200")...
emelcd/chatting-with-a-flamingo
rs.py
rs.py
py
1,331
python
en
code
0
github-code
97
[ { "api_name": "json.dump", "line_number": 8, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 12, "usage_type": "call" }, { "api_name": "uuid.uuid4", "line_number...
40566859678
from datetime import datetime from sqlalchemy.sql import text from templatesandmoe.modules.core.database import insert class AuctionsService: def __init__(self, database): self.database = database def get_bids_for_service(self, service_id): query = ( 'SELECT U.user_id, U.username, ...
PochGee/CMPSC431W_Project
project/src/templatesandmoe/modules/auctions/service.py
service.py
py
2,904
python
en
code
0
github-code
97
[ { "api_name": "sqlalchemy.sql.text", "line_number": 18, "usage_type": "call" }, { "api_name": "sqlalchemy.sql.text", "line_number": 30, "usage_type": "call" }, { "api_name": "templatesandmoe.modules.core.database.insert", "line_number": 37, "usage_type": "call" }, { ...
3809682808
# -*- coding: utf-8 -*- """""" import argparse, os from distutils import spawn # Local import settings # Default configuration DEFAULT_CONFIG = settings.ReadSettings().defaults() class _ShowDefaults(argparse.Action): """""" def __call__(self, parser, namespace, values, option_string=None): print("{:<9...
hv15/pymuco
pymuco/parse.py
parse.py
py
3,050
python
en
code
0
github-code
97
[ { "api_name": "settings.ReadSettings", "line_number": 9, "usage_type": "call" }, { "api_name": "argparse.Action", "line_number": 11, "usage_type": "attribute" }, { "api_name": "argparse.Action", "line_number": 19, "usage_type": "attribute" }, { "api_name": "os.pat...
40778043504
import time import wave import json import azure.cognitiveservices.speech as speechsdk import logging def transcribe(audio_file_path, credentials): # import the credentials from the json file results = [] with open(credentials) as json_file: creds = json.load(json_file) # create the speech co...
Mozartt/Mozartt
STT_Providres/Azure_STT_File.py
Azure_STT_File.py
py
3,337
python
en
code
0
github-code
97
[ { "api_name": "json.load", "line_number": 13, "usage_type": "call" }, { "api_name": "azure.cognitiveservices.speech.SpeechConfig", "line_number": 15, "usage_type": "call" }, { "api_name": "azure.cognitiveservices.speech", "line_number": 15, "usage_type": "name" }, { ...
35763907749
import datetime import os import sys import requests from PIL import Image import qrcode import pyperclip import shutil import webbrowser import subprocess import platform version = "2.1.2" # 通过 GitHub API 获取远端版本号 response = requests.get( "https://api.github.com/repos/007ayong/Picture-processing/releases/latest"...
007ayong/Picture-processing
src/app.py
app.py
py
5,386
python
zh
code
2
github-code
97
[ { "api_name": "requests.get", "line_number": 17, "usage_type": "call" }, { "api_name": "webbrowser.open", "line_number": 29, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 30, "usage_type": "call" }, { "api_name": "os.path.exists", "line_numb...
39939648545
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import networkx as nx from torch_geometric.nn import GCNConv #vfrom torch_geometric.nn import def denormalize(x, min_val, max_val): return x * (max_val - min_val) + min_val class GCN_LSTM_cov...
HJ-Yoo/Covid19_hotspot_prediction
covid_model/models_covid.py
models_covid.py
py
8,941
python
en
code
0
github-code
97
[ { "api_name": "torch.nn.Module", "line_number": 14, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 14, "usage_type": "name" }, { "api_name": "torch_geometric.nn.GCNConv", "line_number": 31, "usage_type": "call" }, { "api_name": "torch.nn.ReL...
27358658347
#!/usr/bin/python3 from typing import List, Optional # https://leetcode.com/problems/range-sum-of-bst/ # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def rangeSum...
mkssri/competitive_programming
leetcode_interns/OtherLeetCodeProblems/Facebook/Top50/EASY/938_range_sum_of_bst.py
938_range_sum_of_bst.py
py
2,720
python
en
code
0
github-code
97
[ { "api_name": "typing.Optional", "line_number": 14, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 39, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 66, "usage_type": "name" }, { "api_name": "typing.Optional", ...
2643035231
import logging from django import template from django.contrib.humanize.templatetags import humanize from django.template.loader import render_to_string from django.utils.safestring import mark_safe from tech.helpers.helpers import getDateTimeFormat, generateJsonSelections, selectorBuilder from tech.models import Jo...
penguinpower80/isqa8210_assignment3
tech/templatetags/techtags.py
techtags.py
py
6,589
python
en
code
0
github-code
97
[ { "api_name": "django.template.Library", "line_number": 12, "usage_type": "call" }, { "api_name": "django.template", "line_number": 12, "usage_type": "name" }, { "api_name": "tech.models.JobLevel.NORMAL", "line_number": 18, "usage_type": "attribute" }, { "api_name...
37334929620
import flask import pickle import pandas as pd from flask import Flask, jsonify, render_template app = flask.Flask(__name__, template_folder='templates') model1 = pickle.load(open("model1.pkl","rb")) model1._make_predict_function() model2 = pickle.load(open("model2.pkl","rb")) model3 = pickle.load(open("mod...
Vijayb023/Final_project
Final_Project/demo.py
demo.py
py
1,950
python
en
code
0
github-code
97
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 8, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 10, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 11...
27761811422
import streamlit as st import streamlit.components.v1 as components from PIL import Image st.set_page_config(layout="wide") menu = ['PORTADA', 'PRESENTACIÓN', 'MOTIVACIÓN', 'CAMINO', 'TECNOLOGÍAS'] choice = st.selectbox('MENU', menu) if choice == 'PORTADA': portada = Image.open('img/Portada.jpg') st.image(p...
as-Solo/Presentacion
main.py
main.py
py
741
python
es
code
0
github-code
97
[ { "api_name": "streamlit.set_page_config", "line_number": 6, "usage_type": "call" }, { "api_name": "streamlit.selectbox", "line_number": 9, "usage_type": "call" }, { "api_name": "PIL.Image.open", "line_number": 12, "usage_type": "call" }, { "api_name": "PIL.Image"...
41465986747
test_list = ["GfG", "", "", "", "", "is", "", "", "best","best","33sumdon","33"] d={} i1=[] for i in test_list: if i.isalpha() or i.isdigit() or i.isalnum(): i1.append(i) for e in i1: d[e]=d.get(e,0)+1 print(d) print('ahy ?jj'.title()) d1={1:2,3:5} d2={1:10} for i in d1: print(i) print(10...
Janardhanpoola/100exercises-carbooking
ex_50.py
ex_50.py
py
1,142
python
en
code
0
github-code
97
[ { "api_name": "collections.defaultdict", "line_number": 57, "usage_type": "call" }, { "api_name": "itertools.chain", "line_number": 59, "usage_type": "call" } ]
41532330298
from __future__ import absolute_import, print_function, unicode_literals import six from six.moves import zip, filter, map, reduce, input, range import contextlib import inspect def _inspect_signature(f): sig = inspect.signature(f) if any(v.kind == v.KEYWORD_ONLY for v in sig.parameters.values()): ra...
nicktimko/multiworm
tests/change_defaults.py
change_defaults.py
py
1,632
python
en
code
1
github-code
97
[ { "api_name": "inspect.signature", "line_number": 10, "usage_type": "call" }, { "api_name": "inspect.getargspec", "line_number": 20, "usage_type": "call" }, { "api_name": "inspect.signature", "line_number": 26, "usage_type": "attribute" }, { "api_name": "six.moves...
38577300739
#!/usr/bin/env python3 from typing import Union import numpy as np import pandas as pd from disdrodb.l0.standards import ( get_field_nchar_dict, get_field_ndigits_decimals_dict, get_field_ndigits_dict, get_field_ndigits_natural_dict, get_l0a_dtype, ) def check_column_names(column_names: list, s...
ltelab/disdrodb
disdrodb/l0/template_tools.py
template_tools.py
py
15,494
python
en
code
13
github-code
97
[ { "api_name": "disdrodb.l0.standards.get_l0a_dtype", "line_number": 36, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 58, "usage_type": "attribute" }, { "api_name": "pandas.DataFrame", "line_number": 80, "usage_type": "attribute" }, { "a...
21615190925
#!/usr/bin/env python # coding: utf-8 # # 1. Loading libraries # In[1]: import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns # Removes the limit from the number of displayed columns and rows. # This is so I can see the entire dataframe when I print it pd.set_option('display...
olawaleadeyemo234/Data-Science-Projects-UTAustin-
FIFA_2019_Data_Preprocessing.py
FIFA_2019_Data_Preprocessing.py
py
29,182
python
en
code
0
github-code
97
[ { "api_name": "pandas.set_option", "line_number": 17, "usage_type": "call" }, { "api_name": "pandas.set_option", "line_number": 19, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.random.seed...
25745287812
import codecs import csv import itertools import json import logging import re from decimal import Decimal from cove.views import explore_data_context, cove_web_input_error from cove.input.models import SuppliedData from django.conf import settings from django.http import HttpResponse, JsonResponse from django.shortc...
ThreeSixtyGiving/dataquality
cove/cove_360/views.py
views.py
py
7,611
python
en
code
1
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 30, "usage_type": "call" }, { "api_name": "cove.input.models.SuppliedData.objects.get", "line_number": 35, "usage_type": "call" }, { "api_name": "cove.input.models.SuppliedData.objects", "line_number": 35, "usage_type": "a...
118766136
import boto3 import json import decimal from boto3.dynamodb.conditions import Key, Attr def build_speechlet_response(title, output, reprompt_text, should_end_session): return { 'outputSpeech': { 'type': 'PlainText', 'text': output }, 'card': { 'type': 'Si...
vibhormishra/HackCU-2017
AlexaVoice/LambdaScript.py
LambdaScript.py
py
7,408
python
en
code
0
github-code
97
[ { "api_name": "boto3.resource", "line_number": 197, "usage_type": "call" } ]
8730338453
import argparse import json import sys import overpy import time from pyproj import CRS, Transformer from shapely.geometry import LineString, MultiLineString, Point import json_utils import matplotlib.pyplot as plt class ObjectCache: def __init__(self, file="query_cache.json"): self.query_cache = None ...
amazingsmash/OSM-LiDAR-Segmenter
overpass_roads.py
overpass_roads.py
py
6,218
python
en
code
1
github-code
97
[ { "api_name": "json.load", "line_number": 22, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 34, "usage_type": "call" }, { "api_name": "overpy.Overpass", "line_number": 74, "usage_type": "call" }, { "api_name": "overpy.exception", "line_numb...
19900523054
import numpy from scipy.stats.distributions import poisson import pandas import matplotlib.pyplot as plt import seaborn as sns def policy_evaluation(V, pi, probabilitiesx, probabilitiesy,gamma = 0.9, sigma = 1, max_lambda = 12): """ Computes the policy evaluation step. It takes a as parameters: -V :set of arbitrary...
angelrure/Reinforcement-Learning
exercices/Jacks' Car Renting/4.5_Iterative_value_estimation.py
4.5_Iterative_value_estimation.py
py
4,666
python
en
code
0
github-code
97
[ { "api_name": "numpy.zeros", "line_number": 39, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 40, "usage_type": "call" }, { "api_name": "scipy.stats.distributions.poisson.pmf", "line_number": 43, "usage_type": "call" }, { "api_name": "scipy.s...
5649769322
""" Test that districts are properly assigned to parsed_instances. """ from django.test import TestCase, Client from datetime import datetime from common_tags import LGA_ID import os PATH_TO_FILE = os.path.realpath(__file__) CURRENT_DIR = os.path.dirname(PATH_TO_FILE) FIXTURES_DIR = os.path.join(CURRENT_DIR, "fixture...
mvpdev/nmis
parsed_xforms/tests/district_assignment.py
district_assignment.py
py
1,626
python
en
code
0
github-code
97
[ { "api_name": "os.path.realpath", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path", "line_num...
39922548137
""" A module for interacting with Tacx Bluetooth smart turbo trainers. This protocol is a variation of the ANT+ FE-C standard (but using BLE instead of ANT+) - Tacx released many of their trainers before the now common FTMS protocol was finalised. The protocol also facilitates the use of the NEO Road Feel feature. S...
zacharyedwardbull/pycycling
pycycling/tacx_trainer_control.py
tacx_trainer_control.py
py
20,849
python
en
code
84
github-code
97
[ { "api_name": "enum.Enum", "line_number": 73, "usage_type": "call" }, { "api_name": "enum.Enum", "line_number": 75, "usage_type": "call" }, { "api_name": "enum.Enum", "line_number": 77, "usage_type": "call" }, { "api_name": "enum.Enum", "line_number": 80, ...
5942804434
#""""""""""""""""" #This module reads contains functions for different color transformations. #"""""""""""""""" #importing necessry libraries from paths import Frames_Paths import numpy as np import matplotlib.pyplot as plt from glob import glob import cv2 from PIL import Image, ImageEnhance import scipy from random i...
rezatorabi13/Video_Augmentation
Transformations/Color.py
Color.py
py
1,586
python
en
code
1
github-code
97
[ { "api_name": "paths.Frames_Paths.TP", "line_number": 17, "usage_type": "attribute" }, { "api_name": "paths.Frames_Paths", "line_number": 17, "usage_type": "name" }, { "api_name": "paths.Frames_Paths.OP", "line_number": 18, "usage_type": "attribute" }, { "api_name...
42759204292
import functools from tkinter import * import os count = 0 def peep(text): os.system('say ' + str(text)) global count count += 1 return count root = Tk(None, "pp", "rr") label_texts = ( "How are you?", "Hello Peter Junior!", "Hallo Peter Senior", "Привет Ольга") for label_text in l...
PeterEdigerSen/tkinter_1
src/gui_for_voice.py
gui_for_voice.py
py
868
python
en
code
0
github-code
97
[ { "api_name": "os.system", "line_number": 9, "usage_type": "call" }, { "api_name": "functools.partial", "line_number": 24, "usage_type": "call" } ]
28320435568
import os from flask import Flask, url_for def create_app(test_config=None): """Create and configure an instance of the Flask application.""" app = Flask(__name__, instance_relative_config=True) app.config.from_mapping( DEBUG=True, SECRET_KEY='dev', DATABASE=os.path.joi...
urbinacity/guap.io
guapio/__init__.py
__init__.py
py
1,506
python
en
code
0
github-code
97
[ { "api_name": "flask.Flask", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number":...
73169827520
import requests, json from functions import url import os from dotenv import load_dotenv def sendEmail(customer_id, amount, item, recipient_org): #Header load_dotenv() serviceName = 'sendEmail' userID = os.getenv('RETAIL_USER_ID') PIN = os.getenv('RETAIL_USER_PIN') OTP = os.getenv('RETAIL_OTP') ...
greggtan/IS444_DBEA
backend/GMS/sendingEmail.py
sendingEmail.py
py
2,056
python
en
code
0
github-code
97
[ { "api_name": "dotenv.load_dotenv", "line_number": 7, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 9, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 10, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 1...
74984766397
from django.shortcuts import render,redirect import requests import json #key: d819766523ae4583bc4bc4f8ac4deaab #https://api.spoonacular.com/recipes/complexSearch?query=pasta base_url = "https://api.spoonacular.com/recipes/" apikey = "d819766523ae4583bc4bc4f8ac4deaab" def home(request): randomRecipeApi = requests.ge...
kartikabuj/Recipedes
Recipe/views.py
views.py
py
3,386
python
en
code
0
github-code
97
[ { "api_name": "requests.get", "line_number": 11, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 12, "usage_type": "call" }, { "api_name": "django.shortcuts.redirect", "line_number": 41, "usage_type": "call" }, { "api_name": "django.shortcuts.re...
8967117590
from tkinter import * from tkinter.ttk import * from tkinter import filedialog from selenium import webdriver import requests fP= "questions.txt" s =[] contents = [] questions = [] hrefs = [] list_of_small_words = ["the","of","is","a","to","by","their"] searchparams = [] #GUI ...
Karalinga/CheggScraper
guiTest.py
guiTest.py
py
2,768
python
en
code
0
github-code
97
[ { "api_name": "tkinter.filedialog.askopenfile", "line_number": 49, "usage_type": "call" }, { "api_name": "tkinter.filedialog", "line_number": 49, "usage_type": "name" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 91, "usage_type": "call" }, { "api_n...
25849097680
# import area csv file import os from sqlalchemy import create_engine, MetaData, Table import pandas as pd engine = create_engine("postgresql://dorowiemann@localhost:5432/power_maps") df_province = pd.read_sql_table("province", engine, columns=['name','id']) dict_province = df_province.set_index('name').to_dict('int...
do6/Learning-Driven-Power-Maps
import_area.py
import_area.py
py
1,715
python
en
code
0
github-code
97
[ { "api_name": "sqlalchemy.create_engine", "line_number": 7, "usage_type": "call" }, { "api_name": "pandas.read_sql_table", "line_number": 9, "usage_type": "call" }, { "api_name": "pandas.read_sql_table", "line_number": 12, "usage_type": "call" }, { "api_name": "pa...
12823888950
import crack_watch import bot import time import logging from threading import Thread class Watcher(Thread): def __init__(self, every, subscribe, cursor): super().__init__() self.every = every self.subscribe = subscribe self.cursor = cursor @staticmethod def send_info_to_...
dmtrbrlkv/CrackWatcherBot
app/main.py
main.py
py
2,179
python
en
code
0
github-code
97
[ { "api_name": "threading.Thread", "line_number": 9, "usage_type": "name" }, { "api_name": "bot.send_game_info", "line_number": 21, "usage_type": "call" }, { "api_name": "logging.info", "line_number": 22, "usage_type": "call" }, { "api_name": "crack_watch.CrackWatc...
30037680542
from Matcher import Matcher from ResumeProcessor import ResumeProcessor from FacadeStub import FacadeStub from ResumeNode import ResumeNode from JobDescNode import JobDescNode from ScorerStub import ScorerStub from Scorer import Scorer import json, re import jsonpickle def openFile(eFile): with open(eFile, encodi...
Dauth/CV-Parser
ControllerStub.py
ControllerStub.py
py
1,221
python
en
code
0
github-code
97
[ { "api_name": "json.load", "line_number": 14, "usage_type": "call" }, { "api_name": "FacadeStub.FacadeStub", "line_number": 19, "usage_type": "call" }, { "api_name": "Matcher.Matcher", "line_number": 20, "usage_type": "call" }, { "api_name": "ResumeNode.ResumeNode...
40484464974
from functools import reduce from math import atan2, sqrt from typing import List import numpy as np from scipy import linalg from mindquantum.core import gates from mindquantum.core.circuit import Circuit from mindquantum.core.gates import QuantumGate from mindquantum.utils.f import is_power_of_two M = np.array([[1...
mindspore-ai/mindquantum
mindquantum/algorithm/compiler/decompose/utils.py
utils.py
py
14,601
python
en
code
48
github-code
97
[ { "api_name": "numpy.array", "line_number": 13, "usage_type": "call" }, { "api_name": "math.sqrt", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.ndarray", "line_number": ...
27380904693
import numpy as np import cv2 cap = cv2.VideoCapture('output.avi') i = 0 while(cap.isOpened()): ret, frame = cap.read() #depth_data = depth.as_frame().get_data() #np_image = np.asanyarray(depth_data) #frame_list.append(np_image) #img = np.zeros([np_image.shape[0],np_image.shape[1],3], dtype=np.uint...
ratmcu/intelrealsencewhatnot
playback.py
playback.py
py
988
python
en
code
0
github-code
97
[ { "api_name": "cv2.VideoCapture", "line_number": 4, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 15, "usage_type": "call" }, { "api_name": "numpy.uint16", "line_number": 15, "usage_type": "attribute" }, { "api_name": "numpy.array", "line...
74974252157
from ray.rllib.env.multi_agent_env import MultiAgentEnv from gym.spaces import Tuple, Discrete class SeparatorEnv(MultiAgentEnv): randomness_space = Tuple((Discrete(2), Discrete(2), Discrete(2), Discrete(2), Discrete(2))) def __init__(self, environment_class, double_antagonist=False, config=None): ...
JoeJBenton/adversarial_env_generator
separator_wrapper.py
separator_wrapper.py
py
6,743
python
en
code
0
github-code
97
[ { "api_name": "ray.rllib.env.multi_agent_env.MultiAgentEnv", "line_number": 5, "usage_type": "name" }, { "api_name": "gym.spaces.Tuple", "line_number": 7, "usage_type": "call" }, { "api_name": "gym.spaces.Discrete", "line_number": 7, "usage_type": "call" }, { "api...
32103409548
import os import flask import pyrebase from bookyrself import user, main, event app = flask.Flask(__name__) config = { "apiKey": os.environ['FIREBASE_API_KEY'], "authDomain": "bookyrself-staging.firebaseapp.com", "databaseURL": "https://bookyrself-staging.firebaseio.com", "storageBucket": "bookyrsel...
manbradcalf/Artie-Flask
bookyrself/__init__.py
__init__.py
py
618
python
en
code
0
github-code
97
[ { "api_name": "flask.Flask", "line_number": 8, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 11, "usage_type": "attribute" }, { "api_name": "pyrebase.initialize_app", "line_number": 18, "usage_type": "call" }, { "api_name": "bookyrself.user.bp...
9009388244
# -*- coding: utf-8 -*- """ Created on Thu Jun 30 10:21:48 2016 @author: Niko """ import os os.chdir('c:/users/prost/projects/flask-app-template-master/app/darknet/') with open("/users/niko_yakovlev/Documents/projects/darknet/data/dog.jpg", "rb") as imageFile: file = imageFile.read() with open("/users/niko_yakovle...
nikodrum/face-recognition-app
test.py
test.py
py
504
python
en
code
0
github-code
97
[ { "api_name": "os.chdir", "line_number": 9, "usage_type": "call" }, { "api_name": "requests.post", "line_number": 18, "usage_type": "call" } ]
40863346089
# downloading region import io import logging import sys from pathlib import PurePath, Path import aiofiles from PIL import Image IMG_JPG='JPEG' IMG_TIF='TIFF' JPG_EXT= 'JPG' TIF_EXT= 'TIF' # The keys are the image file types as extracted from the blob # The values are lists of possible file extension which corres...
buda-base/volume-manifest-builder
v_m_b/image/generateManifest.py
generateManifest.py
py
5,111
python
en
code
0
github-code
97
[ { "api_name": "pathlib.Path", "line_number": 38, "usage_type": "call" }, { "api_name": "pathlib.PurePath", "line_number": 46, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 57, "usage_type": "name" }, { "api_name": "aiofiles.open", "line_...
22938100645
#!/usr/bin/env python import json import codecs from subprocess import Popen, PIPE from urllib.parse import urlparse, urlencode, parse_qs from urllib.request import urlopen, Request serveraddr = '127.0.0.1' authorization_endpoint = 'http://'+serveraddr+'/oauth2/auth' token_endpoint = 'http://'+serveraddr+'/oauth2/to...
laincloud/sso
test.py
test.py
py
2,014
python
en
code
23
github-code
97
[ { "api_name": "codecs.getreader", "line_number": 17, "usage_type": "call" }, { "api_name": "urllib.parse.urlencode", "line_number": 19, "usage_type": "call" }, { "api_name": "subprocess.Popen", "line_number": 34, "usage_type": "call" }, { "api_name": "subprocess.P...
8974442508
from __future__ import annotations from typing import Dict, List from vqpy.obj.vobj.base import VObjBaseInterface, VObjGeneratorType from collections import defaultdict from vqpy.operator.video_reader import FrameStream class Frame: def __init__(self, ctx: FrameStream): self.ctx = ctx # {vobj_ty...
vqpy/vqpy
vqpy/obj/frame.py
frame.py
py
2,812
python
en
code
21
github-code
97
[ { "api_name": "vqpy.operator.video_reader.FrameStream", "line_number": 11, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 14, "usage_type": "name" }, { "api_name": "vqpy.obj.vobj.base.VObjGeneratorType", "line_number": 14, "usage_type": "name" }, ...
30900882624
from django.test import TestCase from django.urls import reverse from faq.models import faq class FAQTest(TestCase): def setUp(self): # set up fake faq quesirons for i in range(2): entry = faq( question=str(i) + "What is Civil Service?", answer=str(i) + ...
gcivil-nyu-org/nycCivilServiceJobs
faq/tests.py
tests.py
py
911
python
en
code
4
github-code
97
[ { "api_name": "django.test.TestCase", "line_number": 6, "usage_type": "name" }, { "api_name": "faq.models.faq", "line_number": 10, "usage_type": "call" }, { "api_name": "django.urls.reverse", "line_number": 18, "usage_type": "call" }, { "api_name": "django.urls.re...
29804815230
import torch from torch import nn from torch.nn import Conv2d from torch.nn import functional as F from complexLayers import ComplexSequential,ComplexConv2d,ComplexBatchNorm2d,ComplexConvTranspose2d,ComplexMaxPool2d,ComplexReLU,ComplexDropout2d from complexFunctions import complex_relu, complex_max_pool2d import net_u...
to314as/bir_tools
complex_end_to_end.py
complex_end_to_end.py
py
11,359
python
en
code
0
github-code
97
[ { "api_name": "torch.nn.Module", "line_number": 11, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 11, "usage_type": "name" }, { "api_name": "complexLayers.ComplexSequential", "line_number": 30, "usage_type": "call" }, { "api_name": "complex...
37256540294
from PySide6 import QtGui from PySide6.QtCore import Qt, Slot, QRectF, QSize, QPoint from PySide6.QtWidgets import (QGraphicsScene, QGraphicsView, QScrollArea, QSizePolicy, QWidget) def clamp(x, min, max): if x < min: return min if x > max: return max return x class DropableGraphicsScene...
QuinnFreedman/isr-gui
image_comparator_widget.py
image_comparator_widget.py
py
8,829
python
en
code
0
github-code
97
[ { "api_name": "PySide6.QtWidgets.QGraphicsScene", "line_number": 14, "usage_type": "name" }, { "api_name": "PySide6.QtWidgets.QGraphicsView", "line_number": 19, "usage_type": "name" }, { "api_name": "PySide6.QtGui.QPen", "line_number": 57, "usage_type": "call" }, { ...
4292785369
#!/usr/bin/env python3 # -*- coding:utf-8 -*- import sys import imageio import numpy as np im = imageio.imread(sys.argv[1]) height, width = im.shape print('<?xml version="1.0" standalone="no"?>') print('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">') print('<svg ...
tinankh/GOD
create_svg.py
create_svg.py
py
1,645
python
en
code
10
github-code
97
[ { "api_name": "imageio.imread", "line_number": 9, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 9, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 16, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number"...
29041438955
#!/usr/bin/env python3 """ use defaultdict for movie database """ import csv from collections import defaultdict, namedtuple, Counter vie_data = 'https://raw.githubusercontent/com/pybites/challenges/' \ 'solutions/13/movie_metadata.csv' vie_csv = 'moves.csv' Movie = namedtuple('Movie', 'title year score')...
johnroge/100days
movie_data.py
movie_data.py
py
1,138
python
en
code
0
github-code
97
[ { "api_name": "collections.namedtuple", "line_number": 13, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 22, "usage_type": "call" }, { "api_name": "csv.DictReader", "line_number": 24, "usage_type": "call" }, { "api_name": "collect...
1148877422
import json from google.cloud import firestore import logging import os logger = logging.getLogger() logger.setLevel(logging.INFO) subscription_key = os.environ["COMPUTER_VISION_SUB_KEY"] endpoint = os.environ["COMPUTER_VISION_ENDPOINT"] s3Bucket = os.environ["S3_BUCKET"] analyze_url = endpoint + "vision/v3.1/analy...
hpfpv/cloudguru-image-recognition-multicloud
backend/aws/service/functions/getAnalysis.py
getAnalysis.py
py
1,355
python
en
code
0
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 7, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 8, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 11, "usage_type": "attribute" }, { "api_name": "os.environ", "l...
1827623609
# coding=utf-8 import logging import cv2 logger = logging.getLogger(__name__) class BoundingBox(object): """ """ def __init__(self, pid, x, y, w, h, W=-1, H=-1): """Constructor Args: pid : x : y : w : h : W : image ...
idiap/person_manager
scripts/misc.py
misc.py
py
4,337
python
en
code
0
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.rectangle", "line_number": 47, "usage_type": "call" }, { "api_name": "cv2.putText", "line_number": 48, "usage_type": "call" }, { "api_name": "cv2.FONT_HERSHEY_SIMPLEX",...
11062993432
from __future__ import annotations import logging from typing import TYPE_CHECKING, Dict, Optional from alaric import AQ from alaric.comparison import EQ from bot_base import NonExistentEntry if TYPE_CHECKING: from suggestions import State log = logging.getLogger(__name__) class GuildConfig: def __init__(...
suggestionsbot/suggestions-bot
suggestions/objects/guild_config.py
guild_config.py
py
3,695
python
en
code
7
github-code
97
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 10, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "typing.Optional", "line_number": 22, "usage_type": "name" }, { "api_name": "typing.Optiona...
74732799679
#!/usr/bin/env python3 import os import sys import click import re @click.command() @click.argument('cosmic_file', type=click.File('r'), required=True) @click.argument('output_file', type=click.File('w'), required=False, default=sys.stdout) def cli(cosmic_file, output_file): """replaces SYMBOL_JUNK with SYMBOL in co...
kotoroshinoto/TCGA_MAF_Analysis
gooch_maf_tools/commands/names/cosmic_name_clipper.py
cosmic_name_clipper.py
py
1,922
python
en
code
0
github-code
97
[ { "api_name": "re.compile", "line_number": 44, "usage_type": "call" }, { "api_name": "click.command", "line_number": 8, "usage_type": "call" }, { "api_name": "click.argument", "line_number": 9, "usage_type": "call" }, { "api_name": "click.File", "line_number":...
940827449
# -*- coding: utf-8 -*- # SERIALIZERS DA API - UNB ALERTA - REST FRAMEWORK # SERIALIZERS: Converter objetos Python para JSON e de JSON para objetos Python from django.contrib.auth.models import Group, User from ocorrencia.models import Categoria, Local, Ocorrencia from rest_framework import serializers from usuari...
victormartorelli/unb-alerta
api/serializers.py
serializers.py
py
3,271
python
pt
code
null
github-code
97
[ { "api_name": "rest_framework.serializers.ModelSerializer", "line_number": 17, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 17, "usage_type": "name" }, { "api_name": "django.contrib.auth.models.User", "line_number": 20, "usage_ty...
33236886696
#! /usr/bin/env python3 # -*- encoding: utf-8 -*- import torch import torch.nn as nn import torch.nn.functional as F """ L.ConvolutionND(3... = nn.Conv3d L.DeconvolutionND(3... = nn.ConvTranspose3d F.concat([]) = torch.cat([],dim=1) F.average_pooling_nd(x) = nn.AvgPool3d(2,2)(x) F.sum(x,axis=1,keepdims=True) = to...
Plusman-LLC/multi-modal
nets/HALF_UDEN.py
HALF_UDEN.py
py
3,693
python
en
code
0
github-code
97
[ { "api_name": "torch.nn.functional.interpolate", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.nn.functional", "line_number": 16, "usage_type": "name" }, { "api_name": "torch.nn.Module", "line_number": 18, "usage_type": "attribute" }, { "api_name...
38658509070
import os import flask from celery import Celery from celery import signals from celery.schedules import crontab from kombu.utils.url import safequote from airq import config BEAT_SCHEDULE = {} if not config.TESTING: BEAT_SCHEDULE["models_sync"] = { "task": "airq.tasks.models_sync", "schedule":...
airq-dev/hazebot
app/airq/celery.py
celery.py
py
2,211
python
en
code
9
github-code
97
[ { "api_name": "airq.config.TESTING", "line_number": 14, "usage_type": "attribute" }, { "api_name": "airq.config", "line_number": 14, "usage_type": "name" }, { "api_name": "celery.schedules.crontab", "line_number": 17, "usage_type": "call" }, { "api_name": "celery....
1001742445
#!/usr/bin/env python # coding: utf-8 # In[9]: #import packages import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # In[10]: #reading data into the jupyter notebook data = pd.read_csv("marketing_data.csv") data.head() # In[11]: #general information about data data....
mugdhaparbat/PortfolioProjects
Marketing Analytics Winter Break Project.py
Marketing Analytics Winter Break Project.py
py
6,864
python
en
code
0
github-code
97
[ { "api_name": "pandas.read_csv", "line_number": 20, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "line_number": 36, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 134, "usage_type": "call" }, { "api_name": "matplotl...
3556284813
import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.cross_validation import cross_val_score from sklearn.model_selection import KFold from sklearn.datasets import make_classification import numpy as np from sklearn.svm import SVC import matplotlib.pyplot as p...
Oussamab21/Machine-Learning-Lab-
SVM/4.py
4.py
py
6,157
python
en
code
1
github-code
97
[ { "api_name": "pandas.read_csv", "line_number": 17, "usage_type": "call" }, { "api_name": "pandas.get_dummies", "line_number": 32, "usage_type": "call" }, { "api_name": "sklearn.preprocessing.StandardScaler", "line_number": 51, "usage_type": "call" }, { "api_name"...
72616642239
#repairORTree.py #Function Purpose: The primary function in this file is repairSchedule(), you can pass a reference schedule to it and repair it to produce a valid, complete schedule. # If you want to generate a valid, complete schedule from scratch, just set "useInspiration" to False so that the tree ...
MackenzieBowal/GeneticAlgorithm_SoccerScheduling
repairORTree.py
repairORTree.py
py
22,638
python
en
code
0
github-code
97
[ { "api_name": "node.RepairNode", "line_number": 18, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 43, "usage_type": "call" }, { "api_name": "queue.PriorityQueue", "line_number": 60, "usage_type": "call" }, { "api_name": "sys.exit", "line_num...
43616596066
# CSCI320 - Toys4Us # Authors: # Nicole Ganung # Chris Renninger # Wegmans UI Database import psycopg2 import datetime conn = psycopg2.connect(host="reddwarf.cs.rit.edu", user="p32002h", password="eigo0oapooj8ENgeGhue", dbname="p32002h") cursor = conn.cursor(); def shoppersClubCustomer(): shoppersClubId = input("P...
nicoleganung/Toys4Us
Wegmans.py
Wegmans.py
py
8,345
python
en
code
0
github-code
97
[ { "api_name": "psycopg2.connect", "line_number": 10, "usage_type": "call" } ]
18321054589
import numpy as np from scipy.special import erf,erfc def asym(x): return -np.exp(-x**2)/np.sqrt(np.pi)/x*(1.-1./(2.*x**2)) def calculate_Gaussian(x, mu, sigma2, low, high): a = (low-mu)/np.sqrt(2*sigma2) b = (high-mu)/np.sqrt(2*sigma2) norm = np.sqrt(sigma2*np.pi/2)*(-erf(a) + erf(b)) # If diff...
tcallister/BBH-spin-q-correlations
code/support.py
support.py
py
3,609
python
en
code
2
github-code
97
[ { "api_name": "numpy.exp", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 5, "usage_type": "attribute" }, { "api_name": "numpy.sqrt", "line_number": 8, ...
31439894117
from django.db import models from django.utils.dateformat import format from django.conf import settings from cached_property import cached_property_with_ttl from core.models import Pair, Market, Currency from core.common.models import IndexTimeStampedModel from decimal import Decimal from payments.utils import money_...
hossamelneily/nexchange
ticker/models.py
models.py
py
6,231
python
en
code
1
github-code
97
[ { "api_name": "nexchange.utils.get_nexchange_logger", "line_number": 15, "usage_type": "call" }, { "api_name": "core.common.models.IndexTimeStampedModel", "line_number": 19, "usage_type": "name" }, { "api_name": "django.db.models.DecimalField", "line_number": 20, "usage_t...
9433275807
from typing import Optional class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def hasCycle(self, head: Optional[ListNode]) -> bool: done = 999999 while head is not None: if head.val == done: return True ...
w40141/LeetCode
0141_Linked_List_Cycle/solution.py
solution.py
py
414
python
en
code
0
github-code
97
[ { "api_name": "typing.Optional", "line_number": 11, "usage_type": "name" } ]
30951949672
import logging import uuid from aiokafka import AIOKafkaProducer from aiokafka.errors import KafkaError from fastapi import APIRouter, Depends from models.progress import MovieWatchProgress, MovieWatchProgressReq, ProgressModel from services.content_service import MovieContentService, get_movie_content_svc from utils...
leks20/UserGeneratedContent
api_service/webapp/v0/api/progress.py
progress.py
py
1,572
python
en
code
0
github-code
97
[ { "api_name": "fastapi.APIRouter", "line_number": 19, "usage_type": "call" }, { "api_name": "models.progress.MovieWatchProgressReq", "line_number": 24, "usage_type": "name" }, { "api_name": "aiokafka.AIOKafkaProducer", "line_number": 25, "usage_type": "name" }, { ...
4466919797
import json from typing import Any, Callable, Literal, Mapping, Optional, Union, overload from urllib.parse import quote import requests from orchestrate.convert import ( ConvertCdaToFhirR4Response, ConvertCdaToPdfResponse, ConvertFhirR4ToCdaResponse, ConvertFhirR4ToOmopResponse, ConvertHl7ToFhirR4...
CareEvolution/OrchestrateSDK
python/orchestrate/_internal/api.py
api.py
py
40,494
python
en
code
0
github-code
97
[ { "api_name": "typing.Optional", "line_number": 59, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 67, "usage_type": "name" }, { "api_name": "typing.Optional", "line_number": 68, "usage_type": "name" }, { "api_name": "typing.Optional", "lin...
75010633280
# This package will contain the spiders of this Scrapy project import os from datetime import datetime as dt import scrapy from redditcrawler.items import RedditItem def get_subs_to_scrape(item): # pulls list of subreddits to scrape from text file subreddits = [] filepath = '/Users/selenacor...
cardosel/Topic-Modeling-In-Event-Driven-Stock-Price-Prediction
redditcrawler/redditcrawler/spiders/__init__.py
__init__.py
py
2,133
python
en
code
2
github-code
97
[ { "api_name": "scrapy.Spider", "line_number": 23, "usage_type": "attribute" }, { "api_name": "redditcrawler.items.RedditItem", "line_number": 48, "usage_type": "call" }, { "api_name": "datetime.datetime.today", "line_number": 50, "usage_type": "call" }, { "api_nam...
24469337460
from selenium import webdriver import time from bs4 import BeautifulSoup import random # start web browse browser = webdriver.Chrome() # putting url into a variable URL =("https://www.youtube.com/live_chat?is_popout=1&v=gh-IsBGAUCY") # creating keywords keyword1 = "hello" keyword2 = "Hello" # creatin...
rahmansahinler1/webScrapingBot
drawingBot.py
drawingBot.py
py
2,036
python
en
code
0
github-code
97
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 7, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 7, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 22, "usage_type": "call" }, { "api_name": "bs4.BeautifulSo...
433106117
import instasent import os import logging from celery import shared_task from redmail import EmailSender from dotenv import load_dotenv load_dotenv() # Logs Config APP_ENV = os.environ.get('APP_ENV', default='') def ConfigEnv(): if APP_ENV == 'DEV': return logging.DEBUG elif APP_ENV == 'PROD': ...
jvncode/test_DRF_Celery
users/tasks.py
tasks.py
py
2,031
python
es
code
0
github-code
97
[ { "api_name": "dotenv.load_dotenv", "line_number": 9, "usage_type": "call" }, { "api_name": "os.environ.get", "line_number": 12, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 12, "usage_type": "attribute" }, { "api_name": "logging.DEBUG", ...
25219844730
from bs4 import BeautifulSoup import urllib.request import re from urllib.parse import urlparse import validators def filter_url(url): url = url.replace("\n", "") url = url.replace(",", "") url = url.replace("\\", "") return url def get_html(url): try: return urllib.request.urlopen(url, t...
perara/Graphing-and-Crawling
Worker.py
Worker.py
py
1,572
python
en
code
0
github-code
97
[ { "api_name": "urllib.request.request.urlopen", "line_number": 16, "usage_type": "call" }, { "api_name": "urllib.request.request", "line_number": 16, "usage_type": "attribute" }, { "api_name": "urllib.request", "line_number": 16, "usage_type": "name" }, { "api_nam...
35224503535
import os import sys import torchvision from torch.utils.data import DataLoader from torchvision.transforms import transforms CUR = os.path.dirname(os.path.abspath(__file__)) PROJECT_ROOT = os.path.dirname(os.path.dirname(CUR)) def get_data_fashion_mnist(batch_size, resize=None): trans = [] # 重新设置size ...
nmszt55/Learn-Pytorch-By-D2DL-Zh-CN
Code/Utils/load_data.py
load_data.py
py
1,370
python
en
code
0
github-code
97
[ { "api_name": "os.path.dirname", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path.dirname", "line...
21937294261
import os import torch.nn as nn import torch.optim as optim import torch.utils.data import torchvision.datasets as dast import torchvision.transforms as transforms import torchvision.utils as vutils import numpy as np import matplotlib.pyplot as plt from base_dcgan_model import BaseDcganGenerator, BaseDcganDiscriminato...
Jayh625/MS-AI-School
Python/0816/base_dcgan_train.py
base_dcgan_train.py
py
6,885
python
ko
code
1
github-code
97
[ { "api_name": "torch.nn.init.normal_", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.nn.init", "line_number": 17, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 17, "usage_type": "name" }, { "api_name": "torch.nn.init.norma...
21745026552
import datetime import time import pygame import serial # inicialização pygame.init() pygame.joystick.init() controle = pygame.joystick.Joystick(0) controle.init() arduino = serial.Serial("COM6", 115200) time.sleep(2) def formatacao(valor): byteint = str(round(((valor + 1) * 127))) return byteint def envi...
cauafroes/arduino-nrf24-controller
Painel/ConDashPy_working.py
ConDashPy_working.py
py
4,772
python
pt
code
0
github-code
97
[ { "api_name": "pygame.init", "line_number": 8, "usage_type": "call" }, { "api_name": "pygame.joystick.init", "line_number": 9, "usage_type": "call" }, { "api_name": "pygame.joystick", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pygame.joystick.Jo...
23699284613
import base64 import logging import json import uuid import ufora.util.ManagedThread as ManagedThread import ufora.native.StringChannel as StringChannelNative import traceback SUPRESSION_COUNT = 1 class Message(object): def __init__(self, channelGroup, channelId, hostId, sequenceNumber, content): assert c...
ufora/ufora
ufora/networking/ChannelDemuxer.py
ChannelDemuxer.py
py
8,809
python
en
code
494
github-code
97
[ { "api_name": "uuid.uuid4", "line_number": 38, "usage_type": "call" }, { "api_name": "logging.debug", "line_number": 50, "usage_type": "call" }, { "api_name": "ufora.native.StringChannel.StringChannel", "line_number": 54, "usage_type": "attribute" }, { "api_name":...
74183115519
import streamlit as st import sqlite3 import pandas as pd import matplotlib.pyplot as plt # Page configuration st.set_page_config( page_title="NBA League Leaders", page_icon=":basketball:" ) st.header("NBA Stat League Leaders") st.write("*With minimum of 10 games played") # Getting top 5 individual stat lead...
PrestonRembis/nba-database-project
pages/leagueLeaders.py
leagueLeaders.py
py
6,335
python
en
code
0
github-code
97
[ { "api_name": "streamlit.set_page_config", "line_number": 7, "usage_type": "call" }, { "api_name": "streamlit.header", "line_number": 12, "usage_type": "call" }, { "api_name": "streamlit.write", "line_number": 13, "usage_type": "call" }, { "api_name": "sqlite3.con...
21851838376
import threading import logging import socket logging.basicConfig(level=logging.INFO) server_address = ('localhost', 8052) # Эмулятор Unity. class DmxPyTry: def __init__(self): self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) logging.info(f"connecting to {server_address[0]} port {ser...
GVarya/SceneP
server/unity_tester.py
unity_tester.py
py
1,073
python
en
code
0
github-code
97
[ { "api_name": "logging.basicConfig", "line_number": 5, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 5, "usage_type": "attribute" }, { "api_name": "socket.socket", "line_number": 12, "usage_type": "call" }, { "api_name": "socket.AF_INET", ...
22079638257
from menace import Menace import logging class FailNetwork(Menace): """ Openstack implementation of Fail Network. Drops a percentage of packets. """ def can_apply(self): return (self.instance != None and self.client.is_owned_instance(self.instance)) def apply(self): ...
balajiiyer-ufl-projects/OpenStackVaccine
openstack/fail_network.py
fail_network.py
py
853
python
en
code
0
github-code
97
[ { "api_name": "menace.Menace", "line_number": 4, "usage_type": "name" }, { "api_name": "logging.error", "line_number": 20, "usage_type": "call" }, { "api_name": "logging.error", "line_number": 30, "usage_type": "call" } ]
6356515671
import os.path import asyncio import multiprocessing import tornado.httpserver import tornado.web import tornado.options from tornado.options import define, options from file_management import UploadPackageHandler from task_management import (AddTaskHandler, CancelTaskHandler, GetTaskHandler, GetCompletedTasksHandle...
Topaz1618/PyImageDetectNet
tests/apps_bak.py
apps_bak.py
py
4,296
python
en
code
0
github-code
97
[ { "api_name": "tornado.options.define", "line_number": 31, "usage_type": "call" }, { "api_name": "asyncio.get_event_loop", "line_number": 37, "usage_type": "call" }, { "api_name": "task_queue_listener.listen_idle_detect_task_workers", "line_number": 38, "usage_type": "cal...
12836696123
from glob import glob # import itertools as it from os.path import basename, splitext, join, abspath import re import subprocess import toolz.curried as z import argparse import yaml fst = z.operator.itemgetter(0) snd = z.operator.itemgetter(1) NOTEBOOK_DIR = '_notebooks' # NOTEBOOK_HTML_DIR = 'ipy_html' NOTEBOOK_HTM...
wcbeard/blog-stage
nb2html.py
nb2html.py
py
2,747
python
en
code
0
github-code
97
[ { "api_name": "toolz.curried.operator.itemgetter", "line_number": 10, "usage_type": "call" }, { "api_name": "toolz.curried.operator", "line_number": 10, "usage_type": "attribute" }, { "api_name": "toolz.curried", "line_number": 10, "usage_type": "name" }, { "api_n...
20386614210
import streamlit as st import altair as alt import plotly.express as px import pandas as pd def main(): df = pd.read_csv('./data/lang_data.csv') st.dataframe( df ) # 멀티셀렉트를 만들어서, # 컬럼이름 중에서 프로그래밍 언어를 보여주고, # 유저가 선택한 언어만 차트로 표시하려 한다. print( df.columns[ 1 : ] ) column_menu = df.c...
blockenters/yh-k5
02_st_강의내용/app10.py
app10.py
py
2,489
python
ko
code
1
github-code
97
[ { "api_name": "pandas.read_csv", "line_number": 10, "usage_type": "call" }, { "api_name": "streamlit.dataframe", "line_number": 12, "usage_type": "call" }, { "api_name": "streamlit.multiselect", "line_number": 22, "usage_type": "call" }, { "api_name": "streamlit.l...
35597770621
import cv2 import torch import torchvision.transforms as transforms import numpy as np from PIL import Image import json # Load the pre-trained model model = torch.hub.load('pytorch/vision:v0.9.0', 'resnet50', pretrained=True) model.eval() # Define the classes of the model #classes = ['airplane', 'automobile', 'bird'...
FancyGentlemen/Learn_Machine_Learning
ml/webcam_main.py
webcam_main.py
py
1,990
python
en
code
0
github-code
97
[ { "api_name": "torch.hub.load", "line_number": 9, "usage_type": "call" }, { "api_name": "torch.hub", "line_number": 9, "usage_type": "attribute" }, { "api_name": "json.load", "line_number": 16, "usage_type": "call" }, { "api_name": "torchvision.transforms.Compose"...
31179792669
import requests import logging import signal from loggingpy.log import JsonFormatter import logging.handlers from .sender import HttpSender class SimpleHttpSink(logging.Handler): """ Sends every log message in series one-by-one. """ def __init__(self, endpoint_uri: str): logging.Handler.__in...
felfel/logging-py
loggingpy/sink.py
sink.py
py
1,958
python
en
code
1
github-code
97
[ { "api_name": "logging.Handler", "line_number": 10, "usage_type": "attribute" }, { "api_name": "logging.Handler.__init__", "line_number": 16, "usage_type": "call" }, { "api_name": "logging.Handler", "line_number": 16, "usage_type": "attribute" }, { "api_name": "lo...
797515007
# -*- coding: utf-8 -*- """ @File : responses.py @Time : 2023/3/23 5:53 下午 @Author : xxlaila @Software: PyCharm """ from django.http import JsonResponse class BaseResponse(JsonResponse): def __init__(self, data, code=None, msg=None, **kwargs): data = { 'code': code if code is not None el...
xxlaila/domainer
common/responses.py
responses.py
py
465
python
en
code
4
github-code
97
[ { "api_name": "django.http.JsonResponse", "line_number": 10, "usage_type": "name" } ]
7660611537
# -*- coding: utf-8 -*- """ Created on Tue May 10 00:22:52 2022 @author: longj """ ''' ************ 3.4 定义一个 reference DEM limit ************ # ref_dem_limit # 使用 SRTM 90 m DEM, TBD = 120 m ''' import sys import numpy as np import csv from osgeo import gdal from gdalconst import * ''' ****** 提取在 ...
VoyagerLong/2022-
output/1/8_De_trend_ref_DEM_limit.py
8_De_trend_ref_DEM_limit.py
py
4,044
python
en
code
7
github-code
97
[ { "api_name": "osgeo.gdal.AllRegister", "line_number": 66, "usage_type": "call" }, { "api_name": "osgeo.gdal", "line_number": 66, "usage_type": "name" }, { "api_name": "osgeo.gdal.Open", "line_number": 69, "usage_type": "call" }, { "api_name": "osgeo.gdal", "l...
2028719931
import random import numpy as np import matplotlib.pyplot as plt import math import time import os import collections.abc container_abcs = collections.abc import scipy.io as sio import numpy.linalg as LA import scipy.spatial.distance as scipy_spatial_dist def intx(x): return(int(x[0]), int(x[1])) def cos_cdis(x...
yanconglin/VanishingPoint_HoughTransform_GaussianSphere
vpd/models/sphere/sphere_utils.py
sphere_utils.py
py
2,575
python
en
code
62
github-code
97
[ { "api_name": "collections.abc.abc", "line_number": 8, "usage_type": "attribute" }, { "api_name": "collections.abc", "line_number": 8, "usage_type": "name" }, { "api_name": "scipy.spatial.distance.cdist", "line_number": 24, "usage_type": "call" }, { "api_name": "s...
22034661542
import hashlib import logging import os LOG = logging.getLogger(__name__) SHARDS = int(os.environ.get("SHARDS", 1)) SHARD_ID = int(os.environ.get("SHARD_ID", 0)) def is_in_shard(value): if SHARDS == 1: return True h = hashlib.new("md5", usedforsecurity=False) h.update(value.encode()) value_...
app-sre/qontract-reconcile
reconcile/utils/sharding.py
sharding.py
py
839
python
en
code
25
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 5, "usage_type": "call" }, { "api_name": "os.environ.get", "line_number": 7, "usage_type": "call" }, { "api_name": "os.environ", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.environ.get", "l...
9991149525
#!/usr/bin/python # Compile the cognate assignment result (JSON) to the LaTeX source file of correspondence pattern (Doug-style) with comparison of two different transducers # Fixed-location files: # source.tsv: lexical data # Standard input: # json containing: # langsUnderStudy: something like ['Maru', 'Old_Burm...
knightss27/capr
server/compare_fst.py
compare_fst.py
py
19,835
python
en
code
2
github-code
97
[ { "api_name": "sys.stderr", "line_number": 42, "usage_type": "attribute" }, { "api_name": "sys.stderr.flush", "line_number": 43, "usage_type": "call" }, { "api_name": "sys.stderr", "line_number": 43, "usage_type": "attribute" }, { "api_name": "re.split", "line...
73528041278
#!/usr/bin/env python ''' TODO add a way to update the shell file instead of overwriting it ''' from argparse import ArgumentParser from datetime import datetime import json import os import sys here = os.path.abspath(os.path.dirname(__file__)) ALIAS_PATH = os.path.join(here, 'aliases.json') EDITOR_CONFIG_PATH = os...
c0lon/env
setup.py
setup.py
py
3,915
python
en
code
1
github-code
97
[ { "api_name": "os.path.abspath", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path.join", "line...
18099718776
import nltk # Import all the libraries need to build the seq2seq model from nltk.stem.lancaster import LancasterStemmer stemmer = LancasterStemmer() import numpy as np import tflearn import tensorflow as tf import random import pickle import json ERROR_THRESHOLD = 0.25 # The error should not be greater than this val...
CoderYashK/Probabilistic_bot
bot.py
bot.py
py
2,468
python
en
code
1
github-code
97
[ { "api_name": "nltk.stem.lancaster.LancasterStemmer", "line_number": 3, "usage_type": "call" }, { "api_name": "nltk.word_tokenize", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 34, "usage_type": "call" }, { "api_name": "pi...
35170867627
import torch import unittest from torch_blade.version import cuda_available from tests.disc.testing_base import DiscTestCase class TestDiscGroupNorm(DiscTestCase): def _test_group_norm(self, groupnorm): test_data = torch.randn([2, 320, 64, 64], device=self.device) annotation = ([-1, -1, -1, -1], t...
alibaba/BladeDISC
pytorch_blade/tests/disc/ops/test_group_norm.py
test_group_norm.py
py
746
python
en
code
707
github-code
97
[ { "api_name": "tests.disc.testing_base.DiscTestCase", "line_number": 7, "usage_type": "name" }, { "api_name": "torch.randn", "line_number": 9, "usage_type": "call" }, { "api_name": "torch.float", "line_number": 10, "usage_type": "attribute" }, { "api_name": "torch...
241015877
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('partner', '0007_auto_20160417_0253'), ] operations = [ migrations.AddField( model_name='shop', name=...
mnzil/marketplace
apps/partner/migrations/0008_auto_20160506_1821.py
0008_auto_20160506_1821.py
py
650
python
en
code
0
github-code
97
[ { "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" }, { ...
29126047574
from collections import deque from copy import deepcopy import time from template import Agent, GameRule import random import heapq from Azul.azul_model import AzulGameRule as GameRule from Azul.azul_model import AzulState as GameState from itertools import count THINKTIME = 0.95 NUM_PLAYERS = 2 class myAgent(Agent...
zimop/MCTSPlayer
agents/t_053/greedyBFS.py
greedyBFS.py
py
2,581
python
en
code
0
github-code
97
[ { "api_name": "template.Agent", "line_number": 14, "usage_type": "name" }, { "api_name": "Azul.azul_model.AzulGameRule", "line_number": 17, "usage_type": "call" }, { "api_name": "Azul.azul_model.AzulState", "line_number": 18, "usage_type": "call" }, { "api_name": ...
5155476361
import os import sys import cv2 import time import numpy as np import easyocr image_dir = sys.argv[1] out_dir = sys.argv[2] debug_dir = None if (len(sys.argv) == 4): print("Debug out on") debug_dir = sys.argv[3] reader = easyocr.Reader(['en']) start_time = time.time() ims = os.listdir(image_dir) im_num = l...
kyleaj/MultimodalHateSpeech
Preprocessing/GetTextMasks.py
GetTextMasks.py
py
1,924
python
en
code
0
github-code
97
[ { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 9, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 12, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number":...
36933231837
import asyncio import grpc import logging import time from payment_pb2 import ( ProcessPaymentRequest, ProcessPaymentReply, ) from payment_pb2_grpc import ( PaymentService, add_PaymentServiceServicer_to_server, ) from tasks import process_payment class PaymentServer(PaymentService): async def Pr...
kumokay/my_learning
09_minikube/example/project/payment/src/server.py
server.py
py
1,479
python
en
code
0
github-code
97
[ { "api_name": "payment_pb2_grpc.PaymentService", "line_number": 17, "usage_type": "name" }, { "api_name": "payment_pb2.ProcessPaymentRequest", "line_number": 21, "usage_type": "name" }, { "api_name": "grpc.aio", "line_number": 22, "usage_type": "attribute" }, { "a...
73434346558
import datetime, numpy, os, sys, pathlib from PyQt5 import QtGui, QtWidgets, QtCore import pyqtgraph as pg import numpy as np smallfont = QtGui.QFont() smallfont.setPointSize(7) verysmallfont = QtGui.QFont() verysmallfont.setPointSize(5) def remove_size_props(o, fcol=False, button=False, image=False): ...
yzerlaut/old_physion
physion/misc/guiparts.py
guiparts.py
py
37,379
python
en
code
0
github-code
97
[ { "api_name": "PyQt5.QtGui.QFont", "line_number": 6, "usage_type": "call" }, { "api_name": "PyQt5.QtGui", "line_number": 6, "usage_type": "name" }, { "api_name": "PyQt5.QtGui.QFont", "line_number": 8, "usage_type": "call" }, { "api_name": "PyQt5.QtGui", "line_...
29579490146
import numpy as np import matplotlib.pyplot as plt from games import NormalFormGame from tools import * import math # %% Player cell class Player: def __init__(self, model, playerIndex, verbose=False, strategy='UCB'): self.verbose = verbose self.strategy = strategy self.model = model ...
alexisthual/Multi-armed-bandit-and-zero-sum-games
player_normalForm.py
player_normalForm.py
py
3,114
python
en
code
0
github-code
97
[ { "api_name": "numpy.random.random", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 19, "usage_type": "attribute" }, { "api_name": "numpy.sum", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.zeros", "li...
18852074118
# Wydruk polskich świąt z datami - z pliku csv. import pandas as pd import numpy as np from tabulate import tabulate path = ('holidays_csv.csv') df = pd.read_csv(path) # kasuj kolumnę province code df.__delitem__('Province Code') #print(df.loc[0:3, lambda x: ['Country Code']]) #print(df.loc[0:3, ['Country Code', 'H...
polmichal/exercises
holidays/holiday.py
holiday.py
py
1,225
python
en
code
0
github-code
97
[ { "api_name": "pandas.read_csv", "line_number": 10, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 36, "usage_type": "call" }, { "api_name": "tabulate.tabulate", "line_number": 39, "usage_type": "call" } ]
6344773856
""" Module containing classes that facilitate the writing of data to file """ import logging import numpy as np from netCDF4 import Dataset from cftime import num2pydate from cftime import date2num import pathlib try: import configparser except ImportError: import ConfigParser as configparser from pylag.data...
pmlmodelling/pylag
pylag/netcdf_logger.py
netcdf_logger.py
py
14,225
python
en
code
10
github-code
97
[ { "api_name": "logging.getLogger", "line_number": 50, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 59, "usage_type": "call" }, { "api_name": "netCDF4.Dataset", "line_number": 62, "usage_type": "call" }, { "api_name": "pylag.exceptions.PyLag...
1334264193
from errors import ParseError from expr import * from stmt import * from tokenclass import * class Parser: __synchronization_tokens: list[TokenType] = [ TokenType.CLASS, TokenType.FUN, TokenType.VAR, TokenType.FOR, TokenType.IF, TokenType.WHILE, TokenType.PR...
MtScience/PyLox
src/parser.py
parser.py
py
13,350
python
en
code
5
github-code
97
[ { "api_name": "errors.ParseError", "line_number": 156, "usage_type": "name" }, { "api_name": "expr.name", "line_number": 196, "usage_type": "attribute" }, { "api_name": "expr.obj", "line_number": 198, "usage_type": "attribute" }, { "api_name": "expr.name", "li...
40564618857
from tkinter import * import tkinter from PIL import Image, ImageTk from tkinter import ttk root = Tk() root.geometry("150x200") w = Label(root, text='GeeksForGeeks', font="50") w.pack() scroll_bar = Scrollbar(root) scroll_bar.pack(side=RIGHT, fill=Y) mylist = Listbox(root, ...
korzinkagribov/02_08_2022
main_folder/new_mama3.py
new_mama3.py
py
791
python
en
code
0
github-code
97
[ { "api_name": "tkinter.Canvas", "line_number": 22, "usage_type": "call" }, { "api_name": "PIL.Image.open", "line_number": 24, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 24, "usage_type": "name" }, { "api_name": "PIL.ImageTk.PhotoImage", ...
26410234369
from collections import deque from .task import Future, Task class AsyncQueue: def __init__(self, maxsize: int = None): self._queue: deque[Task] = deque() self._wait_get: deque[Future] = deque() self._wait_put: deque[Future] = deque() self._maxsize: int = maxsize if maxsize is not...
WolframAlph/asynciyo
asynciyo/queue.py
queue.py
py
1,637
python
en
code
9
github-code
97
[ { "api_name": "collections.deque", "line_number": 8, "usage_type": "name" }, { "api_name": "task.Task", "line_number": 8, "usage_type": "name" }, { "api_name": "collections.deque", "line_number": 9, "usage_type": "name" }, { "api_name": "task.Future", "line_nu...