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
21289218390
import uuid import thredis import thredis.util import pyramid.renderers from pyramid.config import Configurator from pyramid.request import Request from thredis import UnifiedSession from thredis.util import JsonEncoder import oest.model from oest.service.modelview import ModelViews __VERSION__ = "0.1" __DESCRIP...
adoc/estimate_srv
oest/service/__init__.py
__init__.py
py
2,037
python
en
code
0
github-code
6
[ { "api_name": "pyramid.config.Configurator", "line_number": 27, "usage_type": "call" }, { "api_name": "oest.service.modelview.ModelViews", "line_number": 30, "usage_type": "call" }, { "api_name": "oest.model.model", "line_number": 30, "usage_type": "attribute" }, { ...
70873049149
import re import xlrd from Student import Student def read(path): studentList = [] excel_workbook = xlrd.open_workbook(path) excel_worksheet = excel_workbook.sheet_by_index(0) i = 0 j = 0 while True: try: if len(excel_worksheet.cell_value(i, 2)) == 9: resul...
enginbektas/Zoom-Polls-Analyser-py-
StudentReader.py
StudentReader.py
py
1,294
python
en
code
0
github-code
6
[ { "api_name": "xlrd.open_workbook", "line_number": 9, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 17, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 18, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 19, "...
29806855872
from http import HTTPStatus from fastapi import Depends from MenuApp.src.dependencies import get_menu_service from MenuApp.src.routers.custom_APIRouter import APIRouter from MenuApp.src.schemas import menu_schemas from MenuApp.src.services.menu_service import MenuService router = APIRouter(tags=["Menu"], prefix="/ap...
Aliakseeva/MenuApp
MenuApp/src/routers/menu_router.py
menu_router.py
py
2,356
python
en
code
0
github-code
6
[ { "api_name": "MenuApp.src.routers.custom_APIRouter.APIRouter", "line_number": 10, "usage_type": "call" }, { "api_name": "MenuApp.src.services.menu_service.MenuService", "line_number": 19, "usage_type": "name" }, { "api_name": "fastapi.Depends", "line_number": 19, "usage_...
39359086221
import time import selenium from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.remote.remote_connection import RemoteConnection #driver=webdriver.Chrome('G:\driver\chrom...
Paviterence/Selenium-Python-BasicCodes
selenium_login_practice.py
selenium_login_practice.py
py
3,342
python
en
code
1
github-code
6
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 11, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 11, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 18, "usage_type": "call" }, { "api_name": "selenium.webd...
15667228686
import ast, astor loop_counter = "AZEUS_LOOP_COUNTER" call_counter = "AZEUS_CALL_COUNTER" class PythonCounter(ast.NodeTransformer): def __init__(self): self.counters = ast.parse("{} = 0; {} = 0".format(loop_counter, call_counter)) self.global_ = ast.parse("global {}, {}".format(loop_counter, call_...
Chrishaneus/rabbitmq-server-client-compiler
server/compiler/parser/py_injector.py
py_injector.py
py
1,447
python
en
code
0
github-code
6
[ { "api_name": "ast.NodeTransformer", "line_number": 6, "usage_type": "attribute" }, { "api_name": "ast.parse", "line_number": 8, "usage_type": "call" }, { "api_name": "ast.parse", "line_number": 9, "usage_type": "call" }, { "api_name": "ast.parse", "line_numbe...
27511909268
import leveldb import itertools import logging import pickle logger = logging.getLogger(__name__) SEPARATOR = '::' DEFAULT_PREFIX = 'spo' def _computer_ordered_values_set(ordered_values, pos=0): """ Computes triples with all levels of precision possible. Returns a list of triples in DEFAULT_PREFIX order...
PirosB3/Hexagon
hexagon/core.py
core.py
py
3,807
python
en
code
4
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 6, "usage_type": "call" }, { "api_name": "pickle.dumps", "line_number": 39, "usage_type": "call" }, { "api_name": "itertools.permutations", "line_number": 42, "usage_type": "call" }, { "api_name": "pickle.loads", ...
70513190909
from rest_framework import serializers from rest_framework.reverse import reverse from mentorq_api.models import Ticket, Feedback # returns the relevant fields from a Ticket object class TicketSerializer(serializers.HyperlinkedModelSerializer): feedback = serializers.SerializerMethodField() def get_feedback...
HackRU/mentorq-backend
mentorq_api/serializers.py
serializers.py
py
2,060
python
en
code
0
github-code
6
[ { "api_name": "rest_framework.serializers.HyperlinkedModelSerializer", "line_number": 8, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 8, "usage_type": "name" }, { "api_name": "rest_framework.serializers.SerializerMethodField", "line_...
72064216507
# -*- coding: utf-8 -*- # @Time : 2022/7/27 9:24 # @Author : 4v1d # @File : 中国招标网.py # @Software: PyCharm import requests from lxml import html etree = html.etree def main(): url = 'http://zb.yfb.qianlima.com/yfbsemsite/mesinfo/zbpglist' headers = { 'User-Agent': 'Mozilla/5.0 (Maci...
daweiTech/Spider
爬虫/02-Requests请求/中国招标网.py
中国招标网.py
py
1,405
python
en
code
0
github-code
6
[ { "api_name": "lxml.html.etree", "line_number": 9, "usage_type": "attribute" }, { "api_name": "lxml.html", "line_number": 9, "usage_type": "name" }, { "api_name": "requests.get", "line_number": 23, "usage_type": "call" } ]
72416211069
import cv2 import mediapipe as mp from socket import * import numpy as np import time clientSock = socket(AF_INET, SOCK_STREAM) clientSock.connect(('172.20.10.3', 7777)) rps_gesture = {0:'mute', 5:'unmute', 9:'capture', 10:'fix'} #Define Drawing and Hands mp_drawing = mp.solutions.drawing_utils mp_hands = mp.solutio...
Arc1el/DeepLearning_Jetson_AI
client.py
client.py
py
5,088
python
en
code
4
github-code
6
[ { "api_name": "mediapipe.solutions", "line_number": 13, "usage_type": "attribute" }, { "api_name": "mediapipe.solutions", "line_number": 14, "usage_type": "attribute" }, { "api_name": "numpy.genfromtxt", "line_number": 20, "usage_type": "call" }, { "api_name": "nu...
30763745401
""" This is where the implementation of the plugin code goes. The CostCalculator-class is imported from both run_plugin.py and run_debug.py """ import sys import logging from webgme_bindings import PluginBase # Setup a logger logger = logging.getLogger('CostCalculator') logger.setLevel(logging.INFO) handler...
SKShah36/carproject
src/plugins/CostCalculator/CostCalculator/__init__.py
__init__.py
py
6,798
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 11, "usage_type": "attribute" }, { "api_name": "logging.StreamHandler", "line_number": 12, "usage_type": "call" }, { "api_name": "sys.stdout"...
72777730107
import os import shutil from pytest import approx import pandas as pd from integrators import improved_euler_integrator from surface import calculate_exact_values_at_surface, \ calculate_surface_values, save_surface_values_to_csv, \ surface_values_single_method def test_save_s...
evgenyneu/ASP3162
10_integration_python/src/surface_test.py
surface_test.py
py
5,617
python
en
code
1
github-code
6
[ { "api_name": "os.path.join", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path", "line_number": 18, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 20, "usage_type": "call" }, { "api_name": "os.path", "line_number":...
12432729646
""" ^ importar en color amarillo: # indica módulos/funciones definidos en Django ~ importar en color verde: indica 'clases definidas en Django' q 'heredan de otras clases' """ from django.http import HttpRequest, HttpResponse, JsonResponse """ ! parte d submódulo "http" d Django "manejar solicitudes/respuestas HTTP en...
accesoriotoluca/dj_ds
reports/views.py
views.py
py
28,625
python
es
code
0
github-code
6
[ { "api_name": "django.contrib.auth.mixins.LoginRequiredMixin", "line_number": 101, "usage_type": "name" }, { "api_name": "django.views.generic.ListView", "line_number": 101, "usage_type": "name" }, { "api_name": "django.contrib.auth.mixins.LoginRequiredMixin", "line_number": ...
39748797214
# import requests from redis import Redis from rq import Queue import logging import json from pprint import pprint from GTT.Recognise.Document import Document from GTT.Service import Service logger = logging.getLogger(__name__) class RecogniseService(Service): fileDumpLocation = '/tmp/recognitionDump.json' ...
sieniven/biobert-service
GTT/Recognise/Service.py
Service.py
py
1,545
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "GTT.Service.Service", "line_number": 13, "usage_type": "name" }, { "api_name": "GTT.Service.Service.__init__", "line_number": 18, "usage_type": "call" }, { "api_name": "GT...
72056702588
from typing import List import pay_record def import_pay_records(file: str) -> str: payRecords = [] with open(file, "r") as data: # Skip the first line data.readline() # Read subsequent lines lines = data.readlines() hours_dict = {} rates_dict = {} ...
stiwari977/PythonProject
csv_importer.py
csv_importer.py
py
1,706
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 57, "usage_type": "name" }, { "api_name": "pay_record.ResidentPayRecord", "line_number": 59, "usage_type": "call" }, { "api_name": "pay_record.WorkingHolidayPayRecord", "line_number": 61, "usage_type": "call" } ]
19648538858
import _init_paths from net import Network from config import cfg, update_config from dataset import * import numpy as np import torch import os from torch.utils.data import DataLoader from tqdm import tqdm import argparse from core.evaluate import FusionMatrix, AverageMeterList, accuracy_shot from utils.utils import c...
pengzhiliang/LDA
main/valid.py
valid.py
py
6,393
python
en
code
11
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 19, "usage_type": "call" }, { "api_name": "argparse.REMAINDER", "line_number": 32, "usage_type": "attribute" }, { "api_name": "tqdm.tqdm", "line_number": 41, "usage_type": "call" }, { "api_name": "core.evalua...
14595352336
from PIL import Image import os import tensorflow as tf import cv2 import numpy as np from scipy.misc import imread def batch_norm(input): return tf.contrib.layers.batch_norm(inputs=input, epsilon=1e-5, decay=0.9, updates_collections=None, scale=True, data_format='NCHW') de...
suker80/Collaborative-Stroke-Refinement
ops.py
ops.py
py
5,710
python
en
code
0
github-code
6
[ { "api_name": "tensorflow.contrib.layers.batch_norm", "line_number": 8, "usage_type": "call" }, { "api_name": "tensorflow.contrib", "line_number": 8, "usage_type": "attribute" }, { "api_name": "tensorflow.layers.conv2d", "line_number": 13, "usage_type": "call" }, { ...
11657463526
''' This Script is intended to test YOLOv8 formatting ''' # Imports import pandas as pd import argparse import re import cv2 as cv import os from os import path import shutil from math import floor # Defaults for use as a script dim_dir = "C:\\Users\\dylan\\Documents\\Data\\YOLO_MOTS\\train\\images" d...
dylanjaybaxter/bdd100k_ws
test_yolo_format.py
test_yolo_format.py
py
2,477
python
en
code
0
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 21, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 28, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path.join", "lin...
1317550115
from influxdb import InfluxDBClient import RPi.GPIO as GPIO import paho.mqtt.client as mqtt import datetime broker_address="192.168.1.97" #broker address (your pis ip address) #setup board GPIO.setmode(GPIO.BCM) #setup pin as output GPIO.setup(16, GPIO.OUT) client = mqtt.Client() #create new client instance cli...
ElickC/iot
HW5/broker.py
broker.py
py
1,568
python
en
code
0
github-code
6
[ { "api_name": "RPi.GPIO.setmode", "line_number": 10, "usage_type": "call" }, { "api_name": "RPi.GPIO", "line_number": 10, "usage_type": "name" }, { "api_name": "RPi.GPIO.BCM", "line_number": 10, "usage_type": "attribute" }, { "api_name": "RPi.GPIO.setup", "lin...
40920351502
import os from random import randint import uuid import torch.nn as nn from quinine import QuinineArgumentParser from tqdm import tqdm import torch import yaml from transformers import get_constant_schedule_with_warmup from eval import get_run_metrics from samplers import get_data_sampler from schema import schema from...
lucarossi9/in-context-learning
src/train_tensor_pca.py
train_tensor_pca.py
py
6,164
python
en
code
0
github-code
6
[ { "api_name": "torch.backends", "line_number": 16, "usage_type": "attribute" }, { "api_name": "random.randint", "line_number": 52, "usage_type": "call" }, { "api_name": "torch.optim.Adam", "line_number": 63, "usage_type": "call" }, { "api_name": "torch.optim", ...
18538881577
from django.test import TestCase from books.models import Book class TestModels(TestCase): def setUp(self): self.book1 = Book.objects.create( name = "A Feast for Crows", isbn = "978-0553801507", authors = ["George R. R. Martin"], country = "United Status", ...
ashkaraliae/BooksAPI
mstakx/books/tests/test_models.py
test_models.py
py
573
python
en
code
0
github-code
6
[ { "api_name": "django.test.TestCase", "line_number": 4, "usage_type": "name" }, { "api_name": "books.models.Book.objects.create", "line_number": 7, "usage_type": "call" }, { "api_name": "books.models.Book.objects", "line_number": 7, "usage_type": "attribute" }, { ...
4014256241
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import numpy as np import tensorflow as tf import json from collections import defaultdict, namedtuple from .data import * from .model import * from ...
svetlov/ink-research
ink/train.py
train.py
py
7,824
python
en
code
0
github-code
6
[ { "api_name": "collections.namedtuple", "line_number": 22, "usage_type": "call" }, { "api_name": "collections.defaultdict", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.where", "line_number": 44, "usage_type": "call" }, { "api_name": "node.Unite...
23269685162
import multiprocessing as mp import glob from torch.utils.data import Dataset from string import digits import numpy as np import torch import logging from sklearn.metrics import accuracy_score,confusion_matrix def doMultiProcessing(inFunc,inDir,split,arguments,noJobs=16): processes=[] count=0 inFiles=...
pandanster/impactProject
nn_models/utility.py
utility.py
py
4,409
python
en
code
0
github-code
6
[ { "api_name": "glob.glob", "line_number": 13, "usage_type": "call" }, { "api_name": "multiprocessing.Process", "line_number": 15, "usage_type": "call" }, { "api_name": "string.digits", "line_number": 29, "usage_type": "argument" }, { "api_name": "glob.glob", "...
4322317657
from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import r2_score import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset dataset = pd.read_csv('data/Position_Salaries.csv') X = dataset.iloc[:, 1:-1].values y = dataset.iloc[:, -1].values # Training the Rand...
Lin-Wei-Han/Python-Machine-Learning
01_Regression/6_random_forest_regression.py
6_random_forest_regression.py
py
1,198
python
en
code
0
github-code
6
[ { "api_name": "pandas.read_csv", "line_number": 8, "usage_type": "call" }, { "api_name": "sklearn.ensemble.RandomForestRegressor", "line_number": 13, "usage_type": "call" }, { "api_name": "sklearn.metrics.r2_score", "line_number": 23, "usage_type": "call" }, { "ap...
28436833535
from numpy import random import utils from distributions.BetaDistribution import BetaDistribution from utils import show_all import copy def inference(beta, data): betas = [] size = len(data) window = int(size / 4) batches = [batch for batch in range(0, size, window)] for i in range(1, len(batches...
matsarou/thesis
conjugates/beta_binomial.py
beta_binomial.py
py
1,395
python
en
code
0
github-code
6
[ { "api_name": "copy.copy", "line_number": 18, "usage_type": "call" }, { "api_name": "distributions.BetaDistribution.BetaDistribution", "line_number": 23, "usage_type": "call" }, { "api_name": "utils.data_serial", "line_number": 33, "usage_type": "call" }, { "api_n...
12195358660
# Question # Design and implement a data structure for Least Recently Used (LRU) cache. # It should support the following operations: get and put. # ---------------------------------------------------------------- # Solution # Vedio: https://www.youtube.com/watch?v=7v_mUfpg46E&feature=youtu.be # Double Linked List + ha...
ClaytonStudent/leetcode-
LeetCodePython/146_Last_Recently_Used.py
146_Last_Recently_Used.py
py
2,220
python
en
code
0
github-code
6
[ { "api_name": "collections.OrderedDict", "line_number": 64, "usage_type": "call" } ]
23400074732
import datetime from nextcord import Embed, Interaction, Color, Guild, TextInputStyle from nextcord.ui import Modal, TextInput from nextcord.ext import commands from config.config_handler import ConfigHandler from components.buttons.nuke_buttons import NukeButtons from utils.server_utils import ServerUtils ...
Worcer/ASF
amanecer sin fronteras/src/components/modals/nuke_model.py
nuke_model.py
py
4,190
python
en
code
0
github-code
6
[ { "api_name": "nextcord.ui.Modal", "line_number": 11, "usage_type": "name" }, { "api_name": "config.config_handler.ConfigHandler", "line_number": 13, "usage_type": "call" }, { "api_name": "utils.server_utils", "line_number": 14, "usage_type": "name" }, { "api_name...
38381825354
# 在一个数组 nums 中除一个数字只出现一次之外, # 其他数字都出现了三次。 # 请找出那个只出现一次的数字。 # 示例 1: # 输入:nums = [3,4,3,3] # 输出:4 # 示例 2: # 输入:nums = [9,1,7,9,7,9,7] # 输出:1 # 限制: # 1 <= nums.length <= 10000 # 1 <= nums[i] < 2^31 from typing import List # LeetCode 137 class Solution: def singleNumber(self, nums: List[int]) -> int: bits ...
1lch2/PythonExercise
leetcode/bit_operation/JZ56-2.py
JZ56-2.py
py
1,087
python
zh
code
1
github-code
6
[ { "api_name": "typing.List", "line_number": 21, "usage_type": "name" } ]
18599772535
import sys from PySide2.QtCore import QSize, Qt from PySide2.QtWidgets import QApplication, QMainWindow, QPushButton class MainWindow(QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("My first app") button = QPushButton("clique aqui!") self.setFixedSize(QS...
pytax/Interface-com-Pyside2
aula 02.py
aula 02.py
py
567
python
en
code
7
github-code
6
[ { "api_name": "PySide2.QtWidgets.QMainWindow", "line_number": 5, "usage_type": "name" }, { "api_name": "PySide2.QtWidgets.QPushButton", "line_number": 10, "usage_type": "call" }, { "api_name": "PySide2.QtCore.QSize", "line_number": 12, "usage_type": "call" }, { "a...
18340160588
import json def _(key, values = {}): file = open('locales/en.json', 'r') data = json.loads(file.read()) file.close() try: value = data[key] for key in values: value = value.replace(':' + key, str(values[key])) return value except: return '';
usmannasution80/file-links-manager
_.py
_.py
py
274
python
en
code
0
github-code
6
[ { "api_name": "json.loads", "line_number": 5, "usage_type": "call" } ]
44546630095
import os, time from modelscope.pipelines import pipeline from modelscope.utils.constant import Tasks def audio_to_text(): inference_pipeline = pipeline( task=Tasks.auto_speech_recognition, model='damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch', output_dir...
dalong0514/audio-to-text
audio_to_text.py
audio_to_text.py
py
759
python
en
code
0
github-code
6
[ { "api_name": "modelscope.pipelines.pipeline", "line_number": 7, "usage_type": "call" }, { "api_name": "modelscope.utils.constant.Tasks.auto_speech_recognition", "line_number": 8, "usage_type": "attribute" }, { "api_name": "modelscope.utils.constant.Tasks", "line_number": 8, ...
15966200664
# encoding:utf-8 import requests import base64 import sys import os import re sys.path.append("") from macro.modules.tech.function import window_capture, low_image from macro.config import config import pytesseract from PIL import Image access_token = '24.5df8df24610f4804746a83a527347581.2592000.1622115551.282335-24...
Mister-TT/Macro
macro/modules/tech/image_word.py
image_word.py
py
2,498
python
en
code
0
github-code
6
[ { "api_name": "sys.path.append", "line_number": 8, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "macro.modules.tech.function.window_capture", "line_number": 25, "usage_type": "call" }, { "api_name":...
41961330283
# -*- coding: utf-8 -*- from Sentence import * from nltk.corpus import wordnet as wn def get_raw_count(words,stop_words): """ This function takes in the essay and the stop words and returns the total number of spelling mistakes :param words: :param stop_words: @retur...
kashyap9395/automated_essay_grader
src/Spelling.py
Spelling.py
py
884
python
en
code
3
github-code
6
[ { "api_name": "nltk.corpus.wordnet.synsets", "line_number": 20, "usage_type": "call" }, { "api_name": "nltk.corpus.wordnet", "line_number": 20, "usage_type": "name" } ]
34990752175
# coding: utf-8 from flask import json, request, redirect, jsonify from david.core.db import db, func, sql from david.ext.babel import gettext, lazy_gettext as _ from david.lib.store import redis_store as rs from flask.ext.admin import AdminIndexView, expose, BaseView from flask.ext.admin.contrib.sqla import ModelView...
ktmud/david
david/ext/admin/model.py
model.py
py
5,833
python
en
code
5
github-code
6
[ { "api_name": "wtforms.fields.TextField", "line_number": 40, "usage_type": "call" }, { "api_name": "wtforms.fields", "line_number": 40, "usage_type": "name" }, { "api_name": "flask.ext.security.current_user.has_role", "line_number": 55, "usage_type": "call" }, { "...
17435887429
from typing import List import pytest import pdb """ Try find recurrence Exhaustive search - Timed out! - I'm probably searching too much, we must find out when we can skip a test. - search N^2 pairwise """ class Solution: def largestDivisibleSubset(self, nums: List[int]) -> List[int]: L = len(n...
naubull2/codingtests
leetcode/solved/368_Largest_Divisible_Subset/solution.py
solution.py
py
1,411
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 18, "usage_type": "name" }, { "api_name": "pytest.mark.parametrize", "line_number": 36, "usage_type": "call" }, { "api_name": "pytest.mark", "line_number": 36, "usage_type": "attribute" } ]
40129929924
#!/usr/bin/env python3 import sys sys.setrecursionlimit(10**6) INF = 10 ** 9 + 1 # sys.maxsize # float("inf") MOD = 10 ** 9 + 7 def debug(*x): print(*x, file=sys.stderr) def solve(N, XS): cash = 1000 stock = 0 for i in range(N - 1): price = XS[i] if cash >= price: if XS[...
nishio/atcoder
m-solutions2020/d.py
d.py
py
1,558
python
en
code
1
github-code
6
[ { "api_name": "sys.setrecursionlimit", "line_number": 3, "usage_type": "call" }, { "api_name": "sys.stderr", "line_number": 9, "usage_type": "attribute" }, { "api_name": "doctest.testmod", "line_number": 65, "usage_type": "call" }, { "api_name": "doctest.run_docst...
30354658161
import os import os.path from apptools.persistence import state_pickler from tvtk.api import tvtk from tvtk import messenger from tvtk.tvtk_base import vtk_color_trait from tvtk.common import configure_input from traits.api import HasPrivateTraits, HasTraits, Any, Int, \ Property, Instance, Event, Range, Bool, T...
enthought/mayavi
tvtk/pyface/tvtk_scene.py
tvtk_scene.py
py
34,373
python
en
code
1,177
github-code
6
[ { "api_name": "traits.api.HasPrivateTraits", "line_number": 26, "usage_type": "name" }, { "api_name": "traits.api.Bool", "line_number": 60, "usage_type": "call" }, { "api_name": "traits.api.Bool", "line_number": 65, "usage_type": "call" }, { "api_name": "traits.ap...
32515387273
# -*- coding: utf-8 -*- """ @author: mthh """ import rtree import numpy as np from math import ceil def idx_generator_func(bounds): for i, bound in enumerate(bounds): yield (i, bound, i) def make_index(bounds): return rtree.index.Index([z for z in idx_generator_func(bounds)], ...
riatelab/magrit
magrit_app/helpers/grid_helpers.py
grid_helpers.py
py
3,525
python
en
code
102
github-code
6
[ { "api_name": "rtree.index.Index", "line_number": 16, "usage_type": "call" }, { "api_name": "rtree.index", "line_number": 16, "usage_type": "attribute" }, { "api_name": "numpy.NaN", "line_number": 24, "usage_type": "attribute" }, { "api_name": "math.ceil", "li...
11932521336
"""Adress Urls for users app""" from django.urls import path, include from . import views app_name = 'users' urlpatterns = [ #Default adress URL path('', include('django.contrib.auth.urls')), # page for register path('register/', views.register, name='register'), ]
konradpaszku/BLOG
users/urls.py
urls.py
py
284
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 10, "usage_type": "call" }, { "api_name": "django.urls.include", "line_number": 10, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 12, "usage_type": "call" } ]
34607112444
import os import math import json import pandas as pd import numpy as np def readpro(parent_path): # every_pro_path = os.path.join(parent_path, r'dataset\DIPHumanOntology.xls') every_pro_path = os.path.join(parent_path, r'dataset\secondExperiments\COVID_Node2Vec.csv') # pro_file = pd.read_excel(every_pro_p...
LittleBird120/DiseaseGenePredicition
DiseaseGenePredicition/20210315covering-clustering-algorithm - COVID/evaluate_algorithm/evaluate_core.py
evaluate_core.py
py
5,468
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 9, "usage_type": "call" }, { "api_name": "os.path", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.array", "line_numbe...
2558417521
#!/usr/bin/python # -*- coding:utf-8 -*- import os import os.path import urllib import globalvar as gl import pid_random as pr import xlwt # -- img标签数组保存函数 --- def store_scroll_img_list(brand_name, product_id, img_list): for img in img_list: img_url = img.get('src') img_name = pr.get_random_str(...
tianyu4552/mm
file.py
file.py
py
3,148
python
en
code
0
github-code
6
[ { "api_name": "pid_random.get_random_str", "line_number": 17, "usage_type": "call" }, { "api_name": "pid_random.get_random_str", "line_number": 24, "usage_type": "call" }, { "api_name": "globalvar.root_dir", "line_number": 36, "usage_type": "attribute" }, { "api_n...
36735190323
# Generic imports import numpy as np import h5py import re import importlib import h5py import shutil import toml from os import listdir, mkdir, rename from os.path import join, split, exists, dirname from scipy.io import savemat # Custom libraries spec = importlib.util.find_spec('aniposelib') if spec is None: pr...
davidlee04/MNLE-sleap-anipose
pose_3d.py
pose_3d.py
py
16,677
python
en
code
0
github-code
6
[ { "api_name": "importlib.util.find_spec", "line_number": 17, "usage_type": "call" }, { "api_name": "importlib.util", "line_number": 17, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 95, "usage_type": "call" }, { "api_name": "os.path.e...
12350700780
import numpy as np from copy import deepcopy from math import sqrt, inf import torch from tqdm import tqdm import random class Node(object): def __init__(self, env, policy, c=1): self.env = env self.N = 0 self.N_a_list = [0 for _ in range(6)] # add some random noise self.q_...
EnJiang/colorFlood
alpha_go_utils/mcts.py
mcts.py
py
6,551
python
en
code
0
github-code
6
[ { "api_name": "random.random", "line_number": 15, "usage_type": "call" }, { "api_name": "copy.deepcopy", "line_number": 27, "usage_type": "call" }, { "api_name": "math.sqrt", "line_number": 71, "usage_type": "call" }, { "api_name": "copy.deepcopy", "line_numbe...
26117222280
# This is a sample Python script. from scrapy.selector import Selector import time import json as json import undetected_chromedriver as uc from datetime import datetime import pandas as pd def get_imoveis_terracap(): _date = datetime.today().strftime('%Y-%m-%d') link = 'https://comprasonline.terracap.df.gov.b...
netoluizbezerra/TerracapScraper
main.py
main.py
py
3,164
python
en
code
0
github-code
6
[ { "api_name": "datetime.datetime.today", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 10, "usage_type": "name" }, { "api_name": "undetected_chromedriver.ChromeOptions", "line_number": 12, "usage_type": "call" }, { "a...
35613675414
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 """ Project: ir-fhir App: apps.api.tests FILE: test_fhir_dt Created: 7/24/16 12:45 PM Created by: Mark Scirmshire @ekivemark, Medyear Test FHIR data type construction """ # import json from datetime import datetime # from pytz import timezo...
shihuaxing/hhs_oauth_server
apps/fhir/build_fhir/tests/test_fhir_dt.py
test_fhir_dt.py
py
7,508
python
en
code
null
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 38, "usage_type": "name" }, { "api_name": "apps.fhir.build_fhir.utils.utils_fhir_dt.dt_instant", "line_number": 43, "usage_type": "call" }, { "api_name": "django.utils.timezone.get_current_timezone", "line_number": 53, "us...
32303665451
import matplotlib.pyplot as plt from data_analyzer.get_tags_keys import tags_keys import numpy as np import operator import copy import cycler import matplotlib as mpl def plot(results, ignore_background=True, bar_width=0.3, set_fonts=14, fig_width=10, fig_height=7, plot_weight=False): any_resu...
NareshGuru77/SemanticSegmentation
Dataset/data_augmentation/data_analyzer/plot_results.py
plot_results.py
py
5,016
python
en
code
2
github-code
6
[ { "api_name": "copy.deepcopy", "line_number": 14, "usage_type": "call" }, { "api_name": "data_analyzer.get_tags_keys.tags_keys.data_key", "line_number": 14, "usage_type": "attribute" }, { "api_name": "data_analyzer.get_tags_keys.tags_keys", "line_number": 14, "usage_type"...
8763367892
import pygame import os from Colour import * # Sprite size: width = 48 / height = 64 # Todo: Add more comments class Player(pygame.sprite.Sprite): name = "" life = 100 speed = 4 score = 0 # Set speed vector change_x = 0 change_y = 0 # Silent silent = False; # This is a...
HackTechDev/KomandoPython
package/Player.py
Player.py
py
5,051
python
en
code
0
github-code
6
[ { "api_name": "pygame.sprite", "line_number": 7, "usage_type": "attribute" }, { "api_name": "pygame.sprite.Sprite.__init__", "line_number": 42, "usage_type": "call" }, { "api_name": "pygame.sprite", "line_number": 42, "usage_type": "attribute" }, { "api_name": "py...
10238894762
from time import sleep from csv import reader, DictWriter from json import dumps, loads, dump, load from requests import ConnectionError, HTTPError from requests import get, post from datetime import datetime from requests.exceptions import ConnectionError, HTTPError, Timeout, RequestException from PIL import Image, ...
ductandev/sqlite3
KiosProject-main/3_Test_system/.ipynb_checkpoints/uploadcode-checkpoint.py
uploadcode-checkpoint.py
py
8,449
python
en
code
0
github-code
6
[ { "api_name": "configupload.json_data3", "line_number": 21, "usage_type": "attribute" }, { "api_name": "json.load", "line_number": 22, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 23, "usage_type": "call" }, { "api_name": "os.path", "...
43502264610
#!/usr/bin/python3 """Export data int the CSV format""" import csv import requests from sys import argv if __name__ == "__main__": data = [] arg = int(argv[1]) users_url = "https://jsonplaceholder.typicode.com/users" todos_url = "https://jsonplaceholder.typicode.com/todos" parse_user = requests....
borrell-44/holbertonschool-system_engineering-devops
0x15-api/1-export_to_CSV.py
1-export_to_CSV.py
py
803
python
en
code
0
github-code
6
[ { "api_name": "sys.argv", "line_number": 11, "usage_type": "name" }, { "api_name": "requests.get", "line_number": 15, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 19, "usage_type": "call" }, { "api_name": "csv.writer", "line_number": 21...
71682118267
import math import random from typing import Any import pygame from pygame.sprite import AbstractGroup pygame.init() class Tiros(pygame.sprite.Sprite): def __init__(self, x, y, sobe): pygame.sprite.Sprite.__init__(self) self.image = pygame.transform.scale(pygame.image.load("./assets/tiro.png"), (2...
cl3ber/Space-Pirates
spacePirate.py
spacePirate.py
py
6,921
python
en
code
0
github-code
6
[ { "api_name": "pygame.init", "line_number": 7, "usage_type": "call" }, { "api_name": "pygame.sprite", "line_number": 9, "usage_type": "attribute" }, { "api_name": "pygame.sprite.Sprite.__init__", "line_number": 11, "usage_type": "call" }, { "api_name": "pygame.spr...
22220932175
import requests from bs4 import BeautifulSoup from datetime import datetime import os from selenium import webdriver from selenium.common.exceptions import NoSuchElementException, NoSuchAttributeException from time import sleep import sys def main(argv, get_functions): is_interactive = True if len(argv) > 1: ...
rafael-ribeiro1/tech-price-comparator
price-comparator.py
price-comparator.py
py
11,182
python
en
code
0
github-code
6
[ { "api_name": "selenium.webdriver.Edge", "line_number": 26, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 26, "usage_type": "name" }, { "api_name": "datetime.datetime.today", "line_number": 73, "usage_type": "call" }, { "api_name": "da...
10068849105
# Create your views here. import requests from haystack.inputs import Clean from haystack.query import SearchQuerySet from rest_framework import generics from rest_framework.pagination import PageNumberPagination from hackertrend.settings import XMashapeKey from .models import Story from .serializers import StorySeria...
gokuldh/hacker-trend
backend/trend/views.py
views.py
py
3,364
python
en
code
0
github-code
6
[ { "api_name": "rest_framework.generics.ListAPIView", "line_number": 18, "usage_type": "attribute" }, { "api_name": "rest_framework.generics", "line_number": 18, "usage_type": "name" }, { "api_name": "rest_framework.pagination.PageNumberPagination", "line_number": 19, "usa...
41383214419
from typing import Callable from enum import Enum from inspect import signature from hvac import Quantity from hvac.logging import ModuleLogger from .model import VRFModel from .indoor_unit import IndoorUnit Q_ = Quantity logger = ModuleLogger.get_logger(__name__) class WorkingMode(Enum): COOLING = 'cooling' ...
TomLXXVI/HVAC
hvac/vrf_system/vrf.py
vrf.py
py
10,088
python
en
code
8
github-code
6
[ { "api_name": "hvac.Quantity", "line_number": 10, "usage_type": "name" }, { "api_name": "hvac.logging.ModuleLogger.get_logger", "line_number": 11, "usage_type": "call" }, { "api_name": "hvac.logging.ModuleLogger", "line_number": 11, "usage_type": "name" }, { "api_...
198289530
from model.contact import Contact import random import string import os.path import jsonpickle from random import randint import getopt import sys try: opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of contacts", "file"]) except getopt.GetoptError as err: getopt.usage() sys.exit(2) n = 1 f = "d...
baturov-dev/python_testing
generator/contact.py
contact.py
py
2,015
python
en
code
0
github-code
6
[ { "api_name": "getopt.getopt", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 11, "usage_type": "attribute" }, { "api_name": "getopt.GetoptError", "line_number": 12, "usage_type": "attribute" }, { "api_name": "getopt.usage", ...
5167023454
import vk_api import requests def load_photos_from_vk(offset, count, callback): vk_session = vk_api.VkApi('+79523783991', '8io98IO9') vk_session.auth(reauth=True) vk = vk_session.get_api() data = vk.users.search(sort = 0,group = 91050183, offset = offset, count = count, age_from = 18, age_to = 25, stat...
FoVlaX/face_search_conv_nn
vk_loader.py
vk_loader.py
py
651
python
en
code
0
github-code
6
[ { "api_name": "vk_api.VkApi", "line_number": 5, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 12, "usage_type": "call" } ]
39583276245
# -*- coding: utf-8 -*- from PIL import Image import imagehash from flask import json import cStringIO, urllib2 def clean(imgDir): hashList = list() imgList = list() delete_imglist = list() # 需要删除的imagePath for imagePath in imgDir: # for imagePath in s: # print(imagePath) ...
limingzhang513/lmzrepository
data_module/src/Data_Processing/DataSet/rabbitMQ/pHash.py
pHash.py
py
1,174
python
en
code
0
github-code
6
[ { "api_name": "urllib2.urlopen", "line_number": 16, "usage_type": "call" }, { "api_name": "cStringIO.StringIO", "line_number": 17, "usage_type": "call" }, { "api_name": "imagehash.dhash", "line_number": 18, "usage_type": "call" }, { "api_name": "PIL.Image.open", ...
40686915883
import ipaddress import time import unittest import gpp_types import s1ap_types import s1ap_wrapper from integ_tests.s1aptests.s1ap_utils import SessionManagerUtil from lte.protos.policydb_pb2 import FlowMatch class TestAttachServiceWithMultiPdnsAndBearersMultiUe(unittest.TestCase): def setUp(self): self...
magma/magma
lte/gateway/python/integ_tests/s1aptests/test_attach_service_with_multi_pdns_and_bearers_multi_ue.py
test_attach_service_with_multi_pdns_and_bearers_multi_ue.py
py
12,754
python
en
code
1,605
github-code
6
[ { "api_name": "unittest.TestCase", "line_number": 12, "usage_type": "attribute" }, { "api_name": "s1ap_wrapper.TestWrapper", "line_number": 14, "usage_type": "call" }, { "api_name": "integ_tests.s1aptests.s1ap_utils.SessionManagerUtil", "line_number": 15, "usage_type": "c...
11613697273
#-*- coding: utf-8 -*- """ Created on Sat Jun 9 11:03:15 2018 @author: Coder-Ze """ import os import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.ticker import MultipleLocator from matplotlib.ticker import FormatStrFormatter path1="E:\\wz\\论文\\时域图\\" fault = ("N","I07",...
Coder-WangZe/transfer-learning-on-fault-detection
plot_py/时域图.py
时域图.py
py
3,007
python
en
code
6
github-code
6
[ { "api_name": "numpy.max", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.min", "line_number": 31, "usage_type": "call" }, { "api_name": "matplotlib.rcParams", "line_number": 41, "usage_type": "attribute" }, { "api_name": "matplotlib.rcParams", ...
9388397464
"""View functions for the gtphipsi.rush package. This module exports the following view functions: - rush (request) - rush_phi_psi (request) - schedule (request) - old_schedule (request) - info_card (request) - info_card_thanks (request) - list (request) - show (request[, name]) - a...
will2dye4/gtphipsi
rush/views.py
views.py
py
24,376
python
en
code
2
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 51, "usage_type": "call" }, { "api_name": "gtphipsi.common.log_page_view", "line_number": 63, "usage_type": "call" }, { "api_name": "django.shortcuts.render", "line_number": 64, "usage_type": "call" }, { "api_name"...
40115304445
import traceback from flask import current_app as app from flask import flash, redirect, render_template, request, url_for from flask_wtf.csrf import CSRFError from ...app import csrf from ...tools import get_ip_address, get_user_name from . import actions, view @view.route("/") def index(): data = actions.sele...
paulbuildsthings/lmnop
portal/src/lmnop/portal/blueprints/functions/views.py
views.py
py
3,379
python
en
code
0
github-code
6
[ { "api_name": "flask.render_template", "line_number": 15, "usage_type": "call" }, { "api_name": "tools.get_ip_address", "line_number": 23, "usage_type": "call" }, { "api_name": "tools.get_user_name", "line_number": 24, "usage_type": "call" }, { "api_name": "app.cs...
16252747492
import tensorflow as tf from tensorflow.keras import layers from tensorflow.keras import regularizers from datetime import timedelta, datetime import numpy as np import pickle from os import listdir from os.path import isfile, join from math import floor import time from sklearn.utils import shuffle from sys import get...
dsmaugy/GOES-Weather-ML
neuralnet.py
neuralnet.py
py
29,474
python
en
code
0
github-code
6
[ { "api_name": "os.listdir", "line_number": 40, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 40, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 40, "usage_type": "call" }, { "api_name": "numpy.load", "line_number"...
41556140955
from selenium import webdriver from src.pages.bb_avl_page import BbAvlPage def test_check_bb_availability(): driver = webdriver.Chrome() driver.get("https://www.chorus.co.nz/tools-support/broadband-tools/broadband-map") bb_page = BbAvlPage(driver) bb_page.select_address("19A Woodland Road, Johnsonvill...
rangasgithublogin/PythonSeleniumTestAutomation
test/test_bb.py
test_bb.py
py
633
python
en
code
0
github-code
6
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 6, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 6, "usage_type": "name" }, { "api_name": "src.pages.bb_avl_page.BbAvlPage", "line_number": 8, "usage_type": "call" } ]
35342262595
import streamlit as st import pandas as pd import numpy as np from pycaret.classification import load_model, predict_model model = load_model(r"Model/extree_model_20220727") @st.cache def convert_df(df): return df.to_csv(index=False).encode('utf-8') def handle_file(): with st.expander("...
Hrithik-Kumar/RTA-Streamlit
app.py
app.py
py
12,051
python
en
code
1
github-code
6
[ { "api_name": "pycaret.classification.load_model", "line_number": 6, "usage_type": "call" }, { "api_name": "streamlit.cache", "line_number": 9, "usage_type": "attribute" }, { "api_name": "streamlit.expander", "line_number": 15, "usage_type": "call" }, { "api_name"...
71459967867
import os import glob import scipy import torch import random import numpy as np import torchvision.transforms.functional as F from torch.utils.data import DataLoader from PIL import Image from scipy.misc import imread import cv2 class Dataset(torch.utils.data.Dataset): def __init__(self, args, image_...
Maikouuu/PBHC
dataset_LIP.py
dataset_LIP.py
py
22,964
python
en
code
7
github-code
6
[ { "api_name": "torch.utils", "line_number": 13, "usage_type": "attribute" }, { "api_name": "numpy.array", "line_number": 52, "usage_type": "call" }, { "api_name": "PIL.Image.open", "line_number": 52, "usage_type": "call" }, { "api_name": "PIL.Image", "line_num...
5627543389
# -*- coding: utf-8 -*- from irt.graph import graph from irt.common import helper import json import logging import pathlib from typing import Any from typing import Union from typing import Generator log = logging.getLogger(__name__) # --- | CODEX IMPORTER # https://github.com/tsafavi/codex def load_cod...
lavis-nlp/irt
irt/graph/loader.py
loader.py
py
4,974
python
en
code
7
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 15, "usage_type": "call" }, { "api_name": "typing.Union", "line_number": 24, "usage_type": "name" }, { "api_name": "pathlib.Path", "line_number": 24, "usage_type": "attribute" }, { "api_name": "typing.Union", "...
30843234860
# coding=utf-8 import os from functools import wraps from billiard.exceptions import WorkerLostError from headless.utils import get_headless_logger from safe.test.utilities import standard_data_path dir_path = os.path.dirname(os.path.realpath(__file__)) # Layers earthquake_layer_uri = os.path.join( dir_path, 'd...
inasafe/inasafe-headless
src/headless/tasks/test/helpers.py
helpers.py
py
2,432
python
en
code
5
github-code
6
[ { "api_name": "os.path.dirname", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.path.realpath", "line_number": 10, "usage_type": "call" }, { "api_name": "os.path.join", "lin...
25054147662
#!/usr/bin/python3 #import sys import requests import os import subprocess as ok import argparse parser = argparse.ArgumentParser(description="tool to check if url is accessible") parser.add_argument("-apk", type=str, help="type name of of apk", required=True) a = parser.parse_args() url=ok.getoutput("strings "+a.ap...
AkhileshPande/DB-Exploit
app.py
app.py
py
659
python
en
code
0
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 9, "usage_type": "call" }, { "api_name": "subprocess.getoutput", "line_number": 13, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 15, "usage_type": "call" }, { "api_name": "requests.put...
38051670942
from fastapi import FastAPI from typing import Union import httpx from bs4 import BeautifulSoup app = FastAPI() @app.get('/') def hello(url: Union[str, None] = None): with httpx.Client() as client: print(url) r = client.get(url)#.text c = client.get(url).content soup = BeautifulSoup(r,...
pravar1919/link_preview
main.py
main.py
py
1,125
python
en
code
0
github-code
6
[ { "api_name": "fastapi.FastAPI", "line_number": 6, "usage_type": "call" }, { "api_name": "typing.Union", "line_number": 9, "usage_type": "name" }, { "api_name": "httpx.Client", "line_number": 10, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line...
74052539709
# functionalities to integrate the rgb and sigma(density) along a ray to get the RGB of pixels import torch import math def integrate_ray(batch_size, outputs, sigmas, delta): num_sampled_points = outputs.shape[1] C_out = torch.zeros((batch_size, 3)) for i in range(batch_size): T_exponent = 0 ...
haomengz/AE740_FinalProject_NeRF
ray_int.py
ray_int.py
py
654
python
en
code
0
github-code
6
[ { "api_name": "torch.zeros", "line_number": 8, "usage_type": "call" }, { "api_name": "torch.zeros", "line_number": 12, "usage_type": "call" }, { "api_name": "math.exp", "line_number": 14, "usage_type": "call" }, { "api_name": "math.exp", "line_number": 15, ...
19757876599
# storage.fileDao.py import json import pathlib as pl from abc import ABC from typing import Optional, IO, Union, List import debug.logger as clog from storage.base import Dao, Connectible, Connection, PathCheckMode logger = clog.getLogger(__name__) class FileConnection(Connection): def __init__(self, path: pl...
dbyte/WebtomatorPublicEdition
webtomator/storage/fileDao.py
fileDao.py
py
21,002
python
en
code
0
github-code
6
[ { "api_name": "debug.logger.getLogger", "line_number": 10, "usage_type": "call" }, { "api_name": "debug.logger", "line_number": 10, "usage_type": "name" }, { "api_name": "storage.base.Connection", "line_number": 13, "usage_type": "name" }, { "api_name": "pathlib.P...
8274807406
''' Course: CST205-01_FA22 Title: Target Walmart Project Abstract: Authors: Christopher Raya, Kyle Dowling, Ricardo Perez JR Date: 12/05/2022 ''' from flask import Flask, render_template from flask_bootstrap import Bootstrap5 from flask import request import random import requests import json #API STUFF ~~~~~~~~~~~~~~...
kdowling99/cst205_project_3700
project 2/project2.py
project2.py
py
3,860
python
en
code
0
github-code
6
[ { "api_name": "requests.request", "line_number": 45, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 47, "usage_type": "call" }, { "api_name": "requests.request", "line_number": 67, "usage_type": "call" }, { "api_name": "json.loads", "line_n...
25069679831
#!/usr/bin/python3 from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.common.exceptions import NoSuchElementException from secrets import uri import paho.mqtt.client as mqttClient import time import datetime def send_mqtt(value): from secrets import user, password,...
superm1/fhs_tracker
parse_fhs.py
parse_fhs.py
py
2,060
python
en
code
1
github-code
6
[ { "api_name": "paho.mqtt.client.Client", "line_number": 16, "usage_type": "call" }, { "api_name": "paho.mqtt.client", "line_number": 16, "usage_type": "name" }, { "api_name": "secrets.user", "line_number": 17, "usage_type": "argument" }, { "api_name": "secrets.pas...
8068263781
import torch import torch.nn as nn import torch.nn.functional as F from rigl_torch.models.model_factory import ModelFactory class MnistNet(nn.Module): def __init__(self): super(MnistNet, self).__init__() self.conv1 = nn.Conv2d(1, 32, 3, 1) self.conv2 = nn.Conv2d(32, 64, 3, 1) self...
calgaryml/condensed-sparsity
src/rigl_torch/models/mnist.py
mnist.py
py
1,024
python
en
code
10
github-code
6
[ { "api_name": "torch.nn.Module", "line_number": 8, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 8, "usage_type": "name" }, { "api_name": "torch.nn.Conv2d", "line_number": 11, "usage_type": "call" }, { "api_name": "torch.nn", "line_numb...
21247663274
import os import logging import json import sys sys.path.append(".") import click import mlflow from heart_cleveland.data.make_dataset import ( download_from_gdrive, unzip_downloaded_data, read_data, split_train_test_data, ) from heart_cleveland.enities.train_pipeline_params import read_training_pipel...
made-ml-in-prod-2022/minakovaa
ml_project/heart_cleveland/train_pipeline.py
train_pipeline.py
py
4,890
python
en
code
0
github-code
6
[ { "api_name": "sys.path.append", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "logging.getLogger", "line_number": 32, "usage_type": "call" }, { "api_name": "logging.INFO", "lin...
14946617919
#!/usr/bin/env python """ Monitor and alert based on metrics related to AWS processing. Currently implemented: - Check latest BUFR file timestamp at DMI ftp upload directory - Check latest BUFR file timestamp bufr out path - Check latest BUFR file timestamp bufr backup path - Check aws-l0/tx file update times - Check...
GEUS-Glaciology-and-Climate/aws-monitor-alert
src/alert_processing/check_alerts.py
check_alerts.py
py
9,874
python
en
code
0
github-code
6
[ { "api_name": "logging.handlers.getLogger", "line_number": 32, "usage_type": "call" }, { "api_name": "logging.handlers", "line_number": 32, "usage_type": "name" }, { "api_name": "datetime.datetime", "line_number": 36, "usage_type": "name" }, { "api_name": "alert_p...
2462919791
import sys sys.path.append('/usr/local/python/3.5') # Standard imports import os import cv2 from cv2 import aruco import numpy as np # Load Calibrated Parameters calibrationFile = "calibrationFileName.xml" calibrationParams = cv2.FileStorage(calibrationFile, cv2.FILE_STORAGE_READ) camera_matrix = calibrationParams....
laurarajkowski/ProjetNiche
src_detection_aruco/test1.py
test1.py
py
2,468
python
en
code
0
github-code
6
[ { "api_name": "sys.path.append", "line_number": 2, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 2, "usage_type": "attribute" }, { "api_name": "cv2.FileStorage", "line_number": 14, "usage_type": "call" }, { "api_name": "cv2.FILE_STORAGE_READ", ...
72544609149
from sklearn.neural_network import MLPClassifier from sklearn.preprocessing import Normalizer import pandas as pd import numpy as np from sklearn.feature_extraction.text import TfidfVectorizer from nltk.stem.snowball import SnowballStemmer from nltk.tokenize import RegexpTokenizer def normalize_variable(nn_df,variable...
zacwentzell/BIA660D_Group_1_Project
Recommendation System/Method_4_Neural_Network/Method_4_Neural_Network.py
Method_4_Neural_Network.py
py
3,839
python
en
code
2
github-code
6
[ { "api_name": "sklearn.preprocessing.Normalizer", "line_number": 13, "usage_type": "call" }, { "api_name": "numpy.asarray", "line_number": 14, "usage_type": "call" }, { "api_name": "nltk.stem.snowball.SnowballStemmer", "line_number": 19, "usage_type": "call" }, { ...
17320099072
import torch from torch.utils.data import DataLoader import numpy as np import os import config from models import my_model, densenet121, comp_resnet50, comp_dense, densenet_3stage device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu') print(device) compress_rate = [0]*21 model1 = co...
dhryougit/Multi-Stage-High-rank-pruning
inference_time.py
inference_time.py
py
2,382
python
en
code
0
github-code
6
[ { "api_name": "torch.cuda.is_available", "line_number": 12, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 12, "usage_type": "attribute" }, { "api_name": "torch.device", "line_number": 12, "usage_type": "call" }, { "api_name": "models.comp_resn...
73811431868
from typing import Any import numpy as np import torch from torchvision.transforms import ( Compose, Pad, RandomCrop, RandomHorizontalFlip, RandomVerticalFlip, RandomApply, RandomRotation, RandomErasing, RandomResizedCrop, ColorJitter, Grayscale, ConvertImageD...
somcogo/embedding
utils/ops.py
ops.py
py
10,003
python
en
code
0
github-code
6
[ { "api_name": "torch.Tensor", "line_number": 19, "usage_type": "attribute" }, { "api_name": "torchvision.transforms.Compose", "line_number": 25, "usage_type": "call" }, { "api_name": "torchvision.transforms.Pad", "line_number": 26, "usage_type": "call" }, { "api_n...
70127767549
from email.mime import audio from http import server import pyjokes from time import strftime from tkinter import EXCEPTION from unittest import result import pyttsx3 import datetime import speech_recognition as sr import wikipedia import webbrowser import os import smtplib import pywhatkit from news import * from sele...
bArryAllen6843/Alexa-in-python
personal_assistant.py
personal_assistant.py
py
5,637
python
en
code
0
github-code
6
[ { "api_name": "pyttsx3.init", "line_number": 25, "usage_type": "call" }, { "api_name": "email.mime.audio", "line_number": 39, "usage_type": "argument" }, { "api_name": "datetime.datetime.now", "line_number": 44, "usage_type": "call" }, { "api_name": "datetime.date...
27838321941
import os from flask import Flask, request, jsonify import requests import json from VWB import bot, tools, tg_methods as tg from VWB import tools app = Flask(__name__) @app.route('/') def index(): return 'Get out of my room' @app.route('/webhook', methods=['POST', 'GET']) def webhook(): if request.met...
MikhailResumePython/VWallBot
main.py
main.py
py
914
python
en
code
1
github-code
6
[ { "api_name": "flask.Flask", "line_number": 12, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 22, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 22, "usage_type": "name" }, { "api_name": "flask.request.get...
43627376464
from typing import List class Solution: def decompressRLElist(self, nums: List[int]) -> List[int]: res = [] for i in range(len(nums)//2): t = nums[i*2] num = nums[i*2+1] res += [num]*t return res def test(self): test_cases = [ [1...
MichaelTQ/LeetcodePythonProject
solutions/leetcode_1301_1350/LeetCode1313_DecompressRunLengthEncodedList.py
LeetCode1313_DecompressRunLengthEncodedList.py
py
560
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 5, "usage_type": "name" } ]
10421997683
from __future__ import annotations from typing import TYPE_CHECKING from randovania.generator.filler.filler_library import UncollectedState, find_node_with_resource from randovania.resolver import debug if TYPE_CHECKING: from collections.abc import Iterable from randovania.game_description.db.node_identifie...
randovania/randovania
randovania/generator/filler/filler_logging.py
filler_logging.py
py
3,671
python
en
code
165
github-code
6
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 8, "usage_type": "name" }, { "api_name": "randovania.game_description.db.resource_node.ResourceNode", "line_number": 20, "usage_type": "name" }, { "api_name": "randovania.game_description.game_description.GameDescription", ...
3083884702
import math import numpy as np import random import psychopy.visual import psychopy.event import psychopy.core import gabor_ball from enum import IntEnum save_video = False class ChangeType(IntEnum): Rotation = 0 Shift = 1 AllRotation = 2 change_type = ChangeType.Shift # experiment parameter # 0 o...
ksk-S/DynamicChangeBlindness
experiment/ExpDxCB.py
ExpDxCB.py
py
3,704
python
en
code
0
github-code
6
[ { "api_name": "enum.IntEnum", "line_number": 13, "usage_type": "name" }, { "api_name": "psychopy.visual.core.Clock", "line_number": 32, "usage_type": "call" }, { "api_name": "psychopy.visual.core", "line_number": 32, "usage_type": "attribute" }, { "api_name": "psy...
39170148619
# # # # import cairo import numpy as np import cv2 as cv import svgpathparser from math import pi as M_PI from math import e as M_E # target output video size and length OUT_WIDTH = 1920//3 OUT_HEIGHT = 1080//3 OUT_FPS = 60 FRAME_COUNT = 1*OUT_FPS # the frame buffer that cairo prefers uses ARGB (32 bit / pixel) but ...
jordan-bonecutter/FourierVisualizerII
main.py
main.py
py
5,042
python
en
code
1
github-code
6
[ { "api_name": "numpy.zeros", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.uint8", "line_number": 25, "usage_type": "attribute" }, { "api_name": "svgpathparser.firstpathinfile", "line_number": 48, "usage_type": "call" }, { "api_name": "svgpathpar...
14953189656
# Excel calculator import openpyxl # Create workbook variable to create a excel workbook new_workbook = openpyxl.Workbook() # Accessing the current worksheet current_sheet = new_workbook.active current_sheet.title = "Calculator" # Creating the ranges current_sheet.cell(1,1).value = "First number ==>" current_shee...
nikky110790/pythoncodes
Python/Projects/04 Exercises/J) CSV and Excel/a) Excel calculator.py
a) Excel calculator.py
py
617
python
en
code
0
github-code
6
[ { "api_name": "openpyxl.Workbook", "line_number": 8, "usage_type": "call" } ]
16546105367
import os from torch.utils.data import DataLoader import torch from torch import nn import torch.optim as optim from sampling import FaceDataset import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from utils import offset_iou import numpy as np import time import shutil class Trai...
nuisttlj/AI_study
MyTest01/trainer.py
trainer.py
py
15,381
python
en
code
0
github-code
6
[ { "api_name": "matplotlib.use", "line_number": 9, "usage_type": "call" }, { "api_name": "torch.nn.BCELoss", "line_number": 33, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 33, "usage_type": "name" }, { "api_name": "torch.nn.MSELoss", "line_...
27481079177
import numpy as np import cv2 import torch.utils.data as data import torchvision.transforms as transforms import torch def preprocess1(image1,image3): x1 = cv2.imread(image1) #x1 = x1[0:255,50:550] x1 = np.array(x1) x1 = x1.reshape((-1,225,600)) x3 = cv2.imread(image3) #x3 = x3[0:255,50:550] ...
ljf61/XXXNet2
data.py
data.py
py
1,817
python
en
code
0
github-code
6
[ { "api_name": "cv2.imread", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 10, "usage_type": "call" }, { "api_name": "cv2.imread", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 14,...
14099547677
import re from os import listdir from os.path import isfile, join import numpy as np import seaborn as sns from matplotlib import pyplot as plt import math #This document is solely based on Datenauswerter.ipynb and its only purpose is to offer functions for conciseness to the README file ''' Input: fi...
Chrismw98/Sonnenuntergrang_Projekt
Datenauswertungsfunktionen.py
Datenauswertungsfunktionen.py
py
15,223
python
en
code
0
github-code
6
[ { "api_name": "re.split", "line_number": 19, "usage_type": "call" }, { "api_name": "re.split", "line_number": 43, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 66, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 66, ...
2585632137
import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import streamlit as st sns.set(style='dark') def create_monthly_users_df(df): monthly_users_df = df.resample(rule='M', on='dteday').agg({ "casual": "sum", 'registered': 'sum' }) monthly_users_df = monthly_users_df.r...
fanani03/streamlit-data_analysis
Submission/dashboard/project_akhir.py
project_akhir.py
py
4,136
python
en
code
0
github-code
6
[ { "api_name": "seaborn.set", "line_number": 5, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 45, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "line_number": 54, "usage_type": "call" }, { "api_name": "streamlit.sidebar", ...
72739032508
from django.urls import path from .views import EmailView, VerifyEmailView, DoctorProfileView, DoctorRequestVerificationView, DoctorSetAvailabilityView, DoctorVPAView, DoctorReceivedPaymentsView, DoctorIndividualPayoutListView, InstantFees urlpatterns = [ path('email/', EmailView.as_view(), name="email"), pat...
kothawleprem/MedConnect
core/doctors/urls.py
urls.py
py
964
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "views.EmailView.as_view", "line_number": 6, "usage_type": "call" }, { "api_name": "views.EmailView", "line_number": 6, "usage_type": "name" }, { "api_name": "django.urls.pat...
13721678071
from django.contrib import admin from django.urls import path, include from users.views import CustomUserViewSet from rest_framework import routers router = routers.SimpleRouter() router.register(r'users', CustomUserViewSet) from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, )...
mrqwer/testproj
testproj/urls.py
urls.py
py
777
python
en
code
0
github-code
6
[ { "api_name": "rest_framework.routers.SimpleRouter", "line_number": 6, "usage_type": "call" }, { "api_name": "rest_framework.routers", "line_number": 6, "usage_type": "name" }, { "api_name": "users.views.CustomUserViewSet", "line_number": 7, "usage_type": "argument" }, ...
24576255778
from asyncio import Queue from datetime import datetime as dt import random import discord from discord.ext import commands from .generationworker import GenerationInfo, GenerationTask from .promptvalidator import PromptValidator, PromptValidatorError from .upscalebuttons import UpscaleButtons from .logger import get...
danidsnk/sd-discord-bot
bot/commandhandler.py
commandhandler.py
py
5,382
python
en
code
0
github-code
6
[ { "api_name": "logger.get_logger", "line_number": 13, "usage_type": "call" }, { "api_name": "discord.ext.commands.Bot", "line_number": 16, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 16, "usage_type": "name" }, { "api_name": "...
21546355384
import re from collections import namedtuple from dataclasses import dataclass, field from types import MappingProxyType import numpy as np from helper import load_input class Lights: def __init__(self): self.arr: np.ndarray = np.zeros((1000, 1000), dtype=bool) self.fn_lookup: dict={ ...
rick-62/advent-of-code
advent_of_code_2015/solutions/day06.py
day06.py
py
2,692
python
en
code
0
github-code
6
[ { "api_name": "numpy.ndarray", "line_number": 13, "usage_type": "attribute" }, { "api_name": "numpy.zeros", "line_number": 13, "usage_type": "call" }, { "api_name": "collections.namedtuple", "line_number": 29, "usage_type": "name" }, { "api_name": "numpy.ndarray",...
25175585019
import csv from dataclasses import dataclass from typing import List import numpy as np import torch # PATHS TRAIN_DATASET_PATH = "c:/workspace/fer-dl/lab03/resources/sst_train_raw.csv" VALID_DATASET_PATH = "c:/workspace/fer-dl/lab03/resources/sst_valid_raw.csv" TEST_DATASET_PATH = "c:/workspace/fer-dl/lab03/resourc...
ftodoric/fer-du
lab03/data.py
data.py
py
8,059
python
en
code
1
github-code
6
[ { "api_name": "dataclasses.dataclass", "line_number": 17, "usage_type": "name" }, { "api_name": "torch.LongTensor", "line_number": 85, "usage_type": "call" }, { "api_name": "torch.LongTensor", "line_number": 87, "usage_type": "attribute" }, { "api_name": "torch.ut...
1025225076
import os import requests import csv import pandas as pd import torch import faiss from datasets import Dataset from transformers import AutoTokenizer, AutoModel from flask import Flask, jsonify, request from collections import Counter os.environ['KMP_DUPLICATE_LIB_OK']='True' main = Flask(__name__) tokenizer = AutoTo...
0ever/ScrapedSemanticSearch
main.py
main.py
py
2,360
python
en
code
0
github-code
6
[ { "api_name": "os.environ", "line_number": 11, "usage_type": "attribute" }, { "api_name": "flask.Flask", "line_number": 13, "usage_type": "call" }, { "api_name": "transformers.AutoTokenizer.from_pretrained", "line_number": 14, "usage_type": "call" }, { "api_name":...
9634419435
''' Routines for truncation via self-energy moments. A note on QR decomposition methods: The slowest step in most AGF2 calculations tends to be the QR factorisation of the couplings in the Sigma truncation. For this reason I have tried a number of different QR codes, but I have set...
obackhouse/auxgf
auxgf/aux/setrunc.py
setrunc.py
py
9,065
python
en
code
3
github-code
6
[ { "api_name": "auxgf.util.cholesky_qr", "line_number": 26, "usage_type": "attribute" }, { "api_name": "auxgf.util", "line_number": 26, "usage_type": "name" }, { "api_name": "functools.partial", "line_number": 28, "usage_type": "call" }, { "api_name": "auxgf.util.q...
24442638034
import openai # Replace with your own API key openai.api_key = "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" def analyze_sentiment(article_body): openai.api_key = "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" try: response = openai.Completion.create( engine="text-davinci-0...
novatc/sent-news
chatGPT_api.py
chatGPT_api.py
py
2,108
python
en
code
0
github-code
6
[ { "api_name": "openai.api_key", "line_number": 4, "usage_type": "attribute" }, { "api_name": "openai.api_key", "line_number": 8, "usage_type": "attribute" }, { "api_name": "openai.Completion.create", "line_number": 10, "usage_type": "call" }, { "api_name": "openai...
36635412793
''' 参考了https://blog.csdn.net/fei347795790/article/details/99693076?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161776305816780262563072%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=161776305816780262563072&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog...
JuniorSummer/Banyu_3_KnowledgeGraph
spider.py
spider.py
py
1,936
python
en
code
0
github-code
6
[ { "api_name": "urllib.request.parse.quote", "line_number": 10, "usage_type": "call" }, { "api_name": "urllib.request.parse", "line_number": 10, "usage_type": "attribute" }, { "api_name": "urllib.request", "line_number": 10, "usage_type": "name" }, { "api_name": "u...
8670872244
import SimpleITK import json import numpy as np import argparse def check_census(heatmap_path, census_data, mask_lookup, rng): n_validated = 0 is_bizarre = False heatmap_arr = SimpleITK.GetArrayFromImage( SimpleITK.ReadImage(heatmap_path)) sub_keys = list(census_data.keys()) s...
AllenInstitute/neuroglancer_formatting_scripts
utils/validate_census.py
validate_census.py
py
5,721
python
en
code
2
github-code
6
[ { "api_name": "SimpleITK.GetArrayFromImage", "line_number": 9, "usage_type": "call" }, { "api_name": "SimpleITK.ReadImage", "line_number": 10, "usage_type": "call" }, { "api_name": "SimpleITK.GetArrayFromImage", "line_number": 33, "usage_type": "call" }, { "api_na...
73760847226
import serial from time import sleep ser = serial.Serial('/dev/ttyUSB0', 9600) ser.write(b'k') for i in range(0, 3): for j in range(0, 3): sleep(3) dioda = str(2*i) + str(2*j) + 'b' print(dioda) signal = bytes(dioda, 'utf-8') ser.write(signal) sleep(3) ser.write(b'k')
basicskill/Checkers
pomocni.py
pomocni.py
py
293
python
en
code
0
github-code
6
[ { "api_name": "serial.Serial", "line_number": 4, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 8, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 13, "usage_type": "call" } ]