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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
26044089499 | from django import forms
from lunch.models import LunchObject
from django.utils.translation import ugettext_lazy as _
class LunchObjectAdminForm(forms.ModelForm):
class Meta:
model = LunchObject
def clean(self):
""" Validates end date period """
start_date = self.cleaned_data.get('sta... | modamania/otdohni | apps/lunch/forms.py | forms.py | py | 631 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "lunch.models.LunchObject",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "django... |
1109500393 | """
Train dataloader
"""
from data.base_dataset import BaseDataset
import os
import glob
import pandas as pd
import numpy as np
import nibabel as nib
import torch
from util.util import seg_body, mkdir
class TrainDataset(BaseDataset):
"""A Train dataset class for training model."""
@staticmethod
def modify... | cyiheng/Dynagan | data/train_dataset.py | train_dataset.py | py | 6,153 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "data.base_dataset.BaseDataset",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "data.base_dataset.BaseDataset.__init__",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "data.base_dataset.BaseDataset",
"line_number": 39,
"usage_type": "na... |
6339379512 | import os
import socket
import threading
import asyncio
from motor.motor_tornado import MotorClient
from dotenv import load_dotenv
load_dotenv()
collection = None
connected_clients = set()
change_stream = None
def send_message(message):
print(f"broadcasting message: {message}")
for client in connected_clients... | Silas7373/Hecdor | server.py | server.py | py | 1,643 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "motor.motor_tornado.MotorClient",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "socket.so... |
70342407902 | from dotenv import load_dotenv
import pandas as pd
from supabase import create_client, Client
import os
import streamlit as st
import datapane as dp
import streamlit.components.v1 as components
load_dotenv()
dp.login(token="8a6aa6da0365af22aa8b58e103a9532e12af9dc3")
url: str = os.getenv("SUPABASE_URL")
key: str = os.... | manishc22/zipdata-final1 | src/files/4_Strategy_&_Planning.py | 4_Strategy_&_Planning.py | py | 4,439 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datapane.login",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_numb... |
22274716297 | import numpy
from collections import Counter
from keras.preprocessing.sequence import pad_sequences
import pickle
import platform
import numpy as np
def load_data():
train = _parse_data(open('data/train_data.data', 'rb'))
test = _parse_data(open('data/test_data.data', 'rb'))
print(np.array(train).sha... | jackliaoall/5th-cv-nlp-camp | 第二十二章 知识图谱实战系列/第8节:医学糖尿病数据命名实体识别/eclipse-命名实体识别/process_data.py | process_data.py | py | 1,853 | python | en | code | 8 | github-code | 7 | [
{
"api_name": "numpy.array",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pickle.dump",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "keras.preprocessing.seque... |
6587354472 | import io
import os
from os.path import dirname, join
from setuptools import setup, Command
# read the contents of your README file
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
def ... | sternp/CMRdb | setup.py | setup.py | py | 1,452 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.path.abspath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number"... |
72014816862 | """ gidFramework.settings
This module contains the Django settings for the GIDFramework project.
"""
import os
import dj_database_url
from gidFramework.shared.lib.settingsImporter import SettingsImporter
#############################################################################
# The base directory for our ... | erikwestra/global-id-framework | gidFramework/settings.py | settings.py | py | 3,069 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "os.path.dirname",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "gidFramework.shared.lib.... |
8947003636 | #from elementService import ElementService
import selenium
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.support.select import Select
from selenium.webdriver.common.action_chains import ActionChains
from sel... | sumanthg-ml/AutomateQAPy | utilities/Factory/WebElement.py | WebElement.py | py | 25,308 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "selenium.webdriver.common.by.By.ID",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.common.by.By",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.CLASS_NAME",
"line_number": 18,
"... |
25642991668 | import os
import cv2
import csv
import json
import natsort
import numpy as np
import xml.dom.minidom as minidom
import xml.etree.ElementTree as ET
from PIL import Image
from datetime import date
from anylabeling.app_info import __version__
class LabelConverter:
def __init__(self, classes_file=None, mapping_file... | CVHub520/X-AnyLabeling | anylabeling/views/labeling/label_converter.py | label_converter.py | py | 20,567 | python | en | code | 929 | github-code | 7 | [
{
"api_name": "json.load",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "anylabeling.app_info.__version__",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "numpy.abs",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "numpy.dot",
... |
29532430536 | from bs4 import BeautifulSoup
import re, json, pickle, glob, csv, time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium import webdriver
url = 'http://catalog.ucf.edu/content.php?catoid=3&navoid=174&returnto=portfolio&in_portfolio=1'
driver = webdriver.Chrome()
driver.get(u... | jordanstarkey95/COP4331-18Fall | programListScraper.py | programListScraper.py | py | 1,382 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "re.searc... |
37018611765 | import cv2
video_input = ""
cap = cv2.VideoCapture(video_input)
while True:
ret, frame = cap.read()
if not ret:
break
# show frame
cv2.imshow("frame", frame)
# wait break
key = cv2.waitKey(1)
if key == 27:
break
# destroy
cap.release()
cv2.destroyAllWindows()
| hainguyenvan/computer-vision | opencv/pysource/02.load_video.py | 02.load_video.py | py | 309 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.waitKey",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "cv2.destroyAllWindows",
"l... |
28977440494 |
import telebot
from bd import *
from keyboard import *
token = '2017410421:AAFmIJPHvet56Cs356kn7HN_ECH4NbFKkmQ'
bot = telebot.TeleBot(token)
admin = 1933108157
@bot.message_handler(commands=['start'])
def start(message):
if message.chat.id == admin:
bot.send_message(message.chat.id, t... | dsfssfs/vhhvg | main.py | main.py | py | 1,500 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "telebot.TeleBot",
"line_number": 8,
"usage_type": "call"
}
] |
40916946230 | import kmeans as km
import numpy as np
import matplotlib.pyplot as plt
import scipy.io as spio
import random as rand
import math as math
import sys
import os
def myFind(a, func):
return [i for (i, val) in enumerate(a) if func(val)]
def main():
try:
inputFile = datFile = sys.argv[1]
k = sys.argv[2]
... | mendola/k-means | main.py | main.py | py | 1,001 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sys.argv",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "scipy.io.loadmat",
"line_num... |
790993638 | import asyncpg
from aiogram import types
from amplitude import register_user, user_changed_char
async def get_connect():
""" Создаем клавиатуру с функциями бота. """
connection = await asyncpg.connect(host='127.0.0.1',
port=5432,
us... | s1ntecs/celebrity_chat | psql_db/insert_data.py | insert_data.py | py | 3,781 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "asyncpg.connect",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "aiogram.types.Message",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "aiogram.types",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "asyncpg.Conne... |
5644399232 | import argparse
from utils import data, common, attack, models, train
import os
from tqdm import tqdm
import pickle
from utils import compare_data as cdata
import torch
if __name__ == '__main__':
parser = argparse.ArgumentParser()
#parser.add_argument('--mode', default='get_adv')
parser.add_argument('--mod... | shanicky4ever/Generating-Adversarial-Examples-with-Controllable-Non-transferability | defense_model.py | defense_model.py | py | 3,194 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "utils.common.get_device",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "utils... |
19889490546 | from flask import Blueprint
from .auth.views import ViewSignUp, ViewLogin, ViewLogOut, ViewProfile
api = Blueprint("api", __name__, url_prefix="/api")
# Routing starts from here.
api.add_url_rule("/signup/", view_func=ViewSignUp.as_view("signup"))
api.add_url_rule("/signin/", view_func=ViewLogin.as_view("login"))
... | hasibomi/netflikz | netflikz/api/settings.py | settings.py | py | 457 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Blueprint",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "auth.views.ViewSignUp.as_view",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "auth.views.ViewSignUp",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "au... |
8048409289 | from __future__ import absolute_import, division, unicode_literals
from re import sub
from resources.lib.database.db_utils import TABLE_SESSION
from resources.lib.globals import G
from .logging import LOG
# 25/11/2020 - Follow Android ESN generator is changed (current method not yet known)
# First NF identifies the... | masQelec/repository.masqelec | plugin.video.netflix/resources/lib/utils/esn.py | esn.py | py | 5,121 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "resources.lib.globals.G.ADDON.getSetting",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "resources.lib.globals.G.ADDON",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "resources.lib.globals.G",
"line_number": 45,
"usage_type": "n... |
5148917467 | import telebot
from libgen_api import LibgenSearch
API_KEY = "5693826777:AAFzUhCVbeREiq4zSj5L-dhh3h5Eps5q70k"
global msg
msg = ""
bot = telebot.TeleBot(API_KEY)
# SEARCH TOOL
start_message = "This is a book finding bot. Simply select whether you want to find the book by the Title or by Author's name. Kindl... | abhi2112001/coding_workshop_AIIMS_Rishikesh | Coding Workshop/new_book_bot.py | new_book_bot.py | py | 1,805 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "telebot.TeleBot",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "libgen_api.LibgenSearch",
"line_number": 25,
"usage_type": "call"
}
] |
72698262624 | import heapq
from typing import List
class Solution:
"""
https://leetcode.com/problems/last-stone-weight/solutions/575336/official-solution/
"""
def lastStoneWeight(self, stones: List[int]) -> int:
stones = list(map(lambda x: x * -1, stones)) # Convert to max heap
heapq.heapify(stones)
... | RobGThai/refresher | stones.py | stones.py | py | 1,208 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "typing.List",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "heapq.heapify",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "heapq.heappop",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "heapq.heappop",
"line_numb... |
12547662934 | from django.urls import path
from . import views
#{% url 'people:people_index' %}
app_name= 'people'
urlpatterns= [
#groups
path("",views.index,name='people_index'),
path("newperson/",views.create_person, name='create_person'),
path("<int:my_id>/",views.edit_person, name='edit_person'),
] | rtanubra/fam_finance2.0 | mysite/people/urls.py | urls.py | py | 306 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
}
] |
19198714693 | from newspaper import Article
def getArticle(url):
try:
article = Article(url)
article.download()
article.parse()
article.nlp()
return 0, article.text
except Exception as e:
print(e)
return -1, None
| JeffC25/smart-document-analyzer | app/nfi.py | nfi.py | py | 265 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "newspaper.Article",
"line_number": 5,
"usage_type": "call"
}
] |
30080846125 | import torchvision.transforms as transforms
from torch.utils.data import Dataset, DataLoader
from torchvision.datasets import CIFAR10
def cifar10():
transform_train = transforms.Compose([transforms.RandomCrop(32, padding=4), transforms.RandomHorizontalFlip(),transforms.ToTensor()])
transform_test = tr... | putshua/SNN-RAT | data_loaders.py | data_loaders.py | py | 772 | python | en | code | 6 | github-code | 7 | [
{
"api_name": "torchvision.transforms.Compose",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "torchvision.transforms.RandomCrop",
"line_number": 7,
"usage_type": "call"
},
{
... |
22247722148 | from decimal import Decimal
from bs4 import BeautifulSoup
import json
import requests
from currency.models import Rate
from currency import model_choices as mch
def _vkurse():
url = 'http://vkurse.dp.ua/course.json'
response_vkurse = requests.get(url)
soup = BeautifulSoup(response_vkurse.content, 'htm... | VadimNedojnov/currency_exhange | src/currency/banks/vkurse_site.py | vkurse_site.py | py | 1,020 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "currency.models",
"line... |
36589467851 | """INI-file Parsing Module."""
import configparser
from dataclasses import dataclass
@dataclass
class Config:
api_id: str
api_hash: str
ozon_channel_id: str
yandex_channel_id: str
post_count: int
def load_config(path: str):
parser = configparser.ConfigParser()
parser.read(path)
con... | mrgolubeff/techer | config_reader.py | config_reader.py | py | 590 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "dataclasses.dataclass",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "configparser.ConfigParser",
"line_number": 17,
"usage_type": "call"
}
] |
3626947744 | import time
import json
import hashlib
class BlockChain():
def __init__(self) -> None:
self.chain = []
self.current_transactions = []
self.new_block(previous_hash=1, proof=100)
def new_block(self, proof, previous_hash=None):
"""Creates a new block and adds to the existing chai... | shaunnnorton/blockchain_tutorial | blockchain.py | blockchain.py | py | 2,102 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "json.dumps",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "hashlib.sha256",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "hashlib.sha256",
"line_number": 67,
"usage_type": "call"
}
] |
74787424224 | from django.shortcuts import render, redirect
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from config.settings import BASE_DIR
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
from .spotify import Song
import os
spotify_secret_data = {'CLIENT... | Yasin-Dev81/django_spotify_downloader_project | spotify_web/views.py | views.py | py | 3,947 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "spotipy.Spotify",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "spotipy.oauth2.SpotifyClientCredentials",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 27,
"usage_type": "call"
},
{
"a... |
34869522349 | import csv
import json
import logging
import os
import pathlib
logger = logging.getLogger(__name__)
class JSONDataset:
"""Generic multi-protocol/subset filelist dataset that yields samples.
To create a new dataset, you need to provide one or more JSON formatted
filelists (one per protocol) with the foll... | bioidiap/bob.ip.binseg | src/deepdraw/data/dataset.py | dataset.py | py | 9,626 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.splitext",
"line_number": 70,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 70,
"usage_type": "attribute"
},
{
"api_name": "os.path.basename",
... |
1163980913 | import sys
import os
import argparse
import subprocess
import sysconfig
import shutil
import glob
from .version import __version__
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
MODULE_SRC = '''\
#include <Python.h>
extern PyMODINIT_FUNC PyInit_{module_name}(void);
PyMODINIT_FUNC pyfuzzer_module_init(vo... | eerimoq/pyfuzzer | pyfuzzer/__init__.py | __init__.py | py | 7,509 | python | en | code | 24 | github-code | 7 | [
{
"api_name": "os.path.dirname",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"l... |
18419262980 | import numpy as np
import scipy.stats
from scipy.stats.stats import _euclidean_dist
from noise import gaussian_noise
from math import inf, sqrt
from config import *
from utils import draw_sphere_marker
class Particle:
def __init__(self, param: list):
self.sample_times = param['particle_sample_times']
... | WanHanxi/EECS498-Algo.Robotics-Project | particle.py | particle.py | py | 3,218 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "noise.gaussian_noise",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "noise.gaussian_noise",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.random.rand",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "numpy.ran... |
20945966590 | import logging
from platform import system
from serial import *
from utils.logger import create_logger
logger = create_logger(name=__name__, level=logging.DEBUG)
# COMMON_BAUD_RATES = (
# 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200,
# 38400, 57600, 115200
# )
COMMON_BAUD_RATES... | UnsignedArduino/sercom | src/utils/serial_config.py | serial_config.py | py | 3,116 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "utils.logger.create_logger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "platform.system",
"line_number": 112,
"usage_type": "call"
}
] |
12303359679 | import os
import random
import torch
import numpy as np
from torch.utils.data import Dataset, DataLoader
from data.data_processor import preprocess_image, preprocess_voxels
class Paired2D3DDataset(Dataset):
def __init__(self, dataset_path, image_size, voxel_resolution):
self.dataset_path = dataset_path
... | Nishanth-works/U-Net_GAN_Next-Gen_3D_Synthesis | data/data_loader.py | data_loader.py | py | 1,720 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "os.listdir",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_n... |
2101566956 | # CH11 Data Scraping
#在网络有系统的自动收集资料,必须将网站的网页内容或档案撷取下来
# 一 requests requests 模组:
# (1) requeats.get()
# test 1: requests.get(url) ---------------------------------------------------
#get(url) 浏览器输入网址-> 送出,指定网站服务器接收到要求后回复内容,可以在浏览器看到网页内容,这个方式称get
#回应内容包括: text(网页source code) content(网站2进位档案资料)status_code: HTTP 状态码
import... | chihhua-liu/PythonBible | ch11_Data_Scraping/CH11.py | CH11.py | py | 11,249 | python | zh | code | 2 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "requests.codes",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "requests.codes",
"l... |
40219168383 | # Logic: the same process extra is that at each step we will get the new words formed and their path to that word
import collections
def printladders(begin, end, wordlist):
wordlist = set(wordlist)
res=[]
layer={}
layer[begin] = [[begin]]
while layer:
newlayer = collections.defaultdict(li... | BJV-git/amazon_6 | amazon_6/word_ladder_II.py | word_ladder_II.py | py | 896 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "collections.defaultdict",
"line_number": 11,
"usage_type": "call"
}
] |
34116381528 | import os
import random
from torchvision import transforms
import cv2
import time
import numpy as np
import matplotlib.pyplot as plt
import torch
from thop import profile
import models_c
import ObjectDetect0412
from torchvision import models
from tensorboard.backend.event_processing import event_accumulator
import my_n... | gaoer777/bigwhite | test.py | test.py | py | 13,047 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "torchvision.models.resnet18",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torchvision.models",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "torchvision.models.densenet121",
"line_number": 21,
"usage_type": "call"
},
{
"api... |
40778604997 | import numpy as np
import matplotlib.pyplot as plt
def loadDataSet(fileName):
datamat=[]
with open(fileName,'r+') as f:
content=f.readlines()
for line in content:
line_arr=line.strip().split('\t')
datamat.append(list(map(float,line_arr)))
return datamat
def plotData... | whyang78/machineLearning-base | TreesReg/散点回归.py | 散点回归.py | py | 2,552 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "numpy.array",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.scatter",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "matplotlib.py... |
7281732294 |
import os
import pandas as pd
import chardet
with open('D:\\Recommender System\\Raw Data\\Cleaned_WithSpace\\Batch 3\\get large method name\\cleaned_operaprestodriver.csv', 'rb') as f:
result = chardet.detect(f.read()) # or readline if the file is large
def getFileNames():
dir = os.listdir("D:\\Recommender... | srishti77/sampleRecom | src/Merge_CSV_files.py | Merge_CSV_files.py | py | 1,342 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "chardet.detect",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line... |
72428503263 | from rest_framework import serializers
from finance_advisor.cash_flows.models import (
Expense,
ExpenseCategory,
ExpenseType,
Income,
IncomeCategory,
IncomeType,
)
class IncomeTypeSerializer(serializers.ModelSerializer):
class Meta:
model = IncomeType
fields = (
... | swakeert/finance_advisor_backend | finance_advisor/cash_flows/serializers.py | serializers.py | py | 1,683 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "rest_framework.serializers.ModelSerializer",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "finance_advisor.cash_flows.models.IncomeType",
"line_number": 15,
... |
24567979047 | """Test the loading function for evaluators."""
from typing import List
import pytest
from langchain.embeddings.fake import FakeEmbeddings
from langchain.evaluation.loading import EvaluatorType, load_evaluators
from langchain.evaluation.schema import PairwiseStringEvaluator, StringEvaluator
from tests.unit_tests.llms... | langchain-ai/langchain | libs/langchain/tests/unit_tests/evaluation/test_loading.py | test_loading.py | py | 2,077 | python | en | code | 68,990 | github-code | 7 | [
{
"api_name": "langchain.evaluation.loading.EvaluatorType",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "tests.unit_tests.llms.fake_chat_model.FakeChatModel",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "langchain.embeddings.fake.FakeEmbeddings",
"li... |
12556429501 | import cv2
import sys
import imageio
import os
import string
import random
#time to clean this up for server use
def getTracker(frame, bbox):
tracker = cv2.Tracker_create("MEDIANFLOW")
tracker.init(frame, bbox)
return tracker
def main():
#args = get_args()
id = sys.argv[1]
# alternative algo... | ytulsiani/Trump-WWE | trumpwwe.py | trumpwwe.py | py | 2,692 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cv2.Tracker_create",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "cv2.Tracker_create",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
... |
12298420987 | import sys
import signal
import numpy as np
from datetime import datetime
import atomize.general_modules.general_functions as general
import atomize.device_modules.Keysight_3000_Xseries as key
import atomize.device_modules.SR_860 as sr
import atomize.general_modules.csv_opener_saver_tk_kinter as openfile
sr860 = sr.SR... | Anatoly1010/Atomize_ITC | atomize/tests/freq_scan_pyrodetector.py | freq_scan_pyrodetector.py | py | 2,508 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "atomize.device_modules.SR_860.SR_860",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "atomize.device_modules.SR_860",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "atomize.device_modules.Keysight_3000_Xseries.Keysight_3000_Xseries",
"line... |
70272515744 | __author__ = 'srevg'
import pytest
import datetime
import logging
import pytz
from pytz import timezone
from tests_framework.ve_tests.ve_test import VeTestApi
from tests_framework.ui_building_blocks.KD.main_hub import EventViewPosition
' Global constants '
TIMEOUT = 5
status_bar_date_format = "%A %d. %B"
event_time_f... | anshsaikia/GSSDeliverables-YesProject | VE-Tests/tests/WIP/Old_Android - ask mifrach/test_utc_time_synchronization.py | test_utc_time_synchronization.py | py | 3,495 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.info",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "logging.info",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pytz.timezone",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.fromtimesta... |
13554481516 | # SPDX-License-Identifier: LGPL-2.1+
import shutil
import urllib.request
import xml.etree.ElementTree as ElementTree
from collections.abc import Sequence
from mkosi.architecture import Architecture
from mkosi.distributions import Distribution, DistributionInstaller, PackageType
from mkosi.installer.dnf import Repo, i... | systemd/mkosi | mkosi/distributions/opensuse.py | opensuse.py | py | 5,428 | python | en | code | 937 | github-code | 7 | [
{
"api_name": "mkosi.distributions.DistributionInstaller",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "mkosi.distributions.PackageType.rpm",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "mkosi.distributions.PackageType",
"line_number": 27,
"... |
7555017468 | from markdown import Markdown
from django.shortcuts import render
from .models import IndexPicture, Project, News
from django.core.paginator import PageNotAnInteger, Paginator, EmptyPage
def getSecondLasts(i):
indexAllPictures = IndexPicture.objects.all()
try:
secondLasts = indexAllPictures.filter(pk=... | seekun/LawOffice | web/views.py | views.py | py | 3,976 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "models.IndexPicture.objects.all",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "models.IndexPicture.objects",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "models.IndexPicture",
"line_number": 8,
"usage_type": "name"
},
{
... |
23756863200 | # #!/usr/bin/python
# # -*- coding: utf-8 -*-
import json
import copy
import requests
import config
import logging as log
import consts as cnst
api_ver = config.api_ver
def send_message(user_id, text):
"""
Send VK message
"""
data = {
'message': text,
'user_id': user_id,
'a... | RegularPrincess/universal_bot | utils/chat_libs/vklib.py | vklib.py | py | 4,239 | python | ru | code | 0 | github-code | 7 | [
{
"api_name": "config.api_ver",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "config.token",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "requests.post",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "config.vk_api_url... |
34025386899 | import re
from flucoma.doc.rst.html import FluidHTMLWriter, rst_filter
from .. transformers import default_transform
from docutils import nodes
'''
CLI driver file
'''
def buffer_reference_role(role, rawtext, text, lineno, inliner,
options={}, content=[]):
'''
Not yet used
... | flucoma/flucoma-docs | flucoma/doc/cli/driver.py | driver.py | py | 3,339 | python | en | code | 5 | github-code | 7 | [
{
"api_name": "docutils.nodes.raw",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "docutils.nodes",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "transformers.default_transform",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "re.m... |
41661847517 | # -*- coding: utf8 -*-
# !/usr/bin/python
# 根据周几进行分析
import pymysql
import sys
import datetime
import numpy as np
import decimal
#在 B 出现的条件下A出现的概率
#B出现的概率
#B且A出现的概率
#P(A|B)=P(AB)/P(B)
conn=pymysql.connect(host='127.0.0.1',user='root',passwd='Qd@#$mo658',db='jc',port=3306,charset='utf8', cursorclass = pymysql.cursors... | redrockhorse/python | gambling/ssq_albyweek_20181101.py | ssq_albyweek_20181101.py | py | 2,348 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "pymysql.connect",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pymysql.cursors",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "collections.Counter",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "collections.... |
15755565801 | #!/usr/bin/env python3
import requests
#检查代理是否有效
def checkIpValid(ip, port, protocol):
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36'}
proxies = {protocol: "{}://{}:{}".format(protocol, ip, port)}
try:
req = requests.get... | ka1n4t/PythonProxy | UtilFunction.py | UtilFunction.py | py | 617 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
}
] |
24567763847 | from langchain.agents import create_sql_agent
from langchain.agents.agent_toolkits import SQLDatabaseToolkit
from langchain.utilities.sql_database import SQLDatabase
from tests.unit_tests.llms.fake_llm import FakeLLM
def test_create_sql_agent() -> None:
db = SQLDatabase.from_uri("sqlite:///:memory:")
queries ... | langchain-ai/langchain | libs/langchain/tests/unit_tests/agents/test_sql.py | test_sql.py | py | 599 | python | en | code | 68,990 | github-code | 7 | [
{
"api_name": "langchain.utilities.sql_database.SQLDatabase.from_uri",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "langchain.utilities.sql_database.SQLDatabase",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "tests.unit_tests.llms.fake_llm.FakeLLM",
"li... |
72862936222 | import multiprocessing
import torch
import mmcv
from .checkpoint import load_checkpoint
def worker_func(model_cls, model_kwargs, checkpoint, dataset, data_func,
gpu_id, idx_queue, result_queue):
model = model_cls(**model_kwargs)
load_checkpoint(model, checkpoint, map_location='cpu')
torc... | Ascend/ModelZoo-PyTorch | PyTorch/contrib/cv/detection/SOLOv2/mmcv/mmcv/runner/parallel_test.py | parallel_test.py | py | 2,207 | python | en | code | 31 | github-code | 7 | [
{
"api_name": "checkpoint.load_checkpoint",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.cuda.set_device",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torc... |
10994018317 | from pathlib import Path
import os
import pandas as pd
def by_condition(*args, dataset=None, output=None):
import math
import pandas as pd
# Create condition name list
condition_names = [arg.name for arg in args]
# Use condition names to create a condition:level dataframe
... | JoelPatchitt/scripts | cdr/bin/sickdef.py | sickdef.py | py | 1,815 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.DataFrame",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "math.isnan",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_... |
38086310337 | from selenium import webdriver
import time
import yagmail
import os
def get_driver():
#set options to make browsing easier
options = webdriver.ChromeOptions()
options.add_argument("disable-infobars")
options.add_argument("start-maximized")
options.add_argument("disable-dev-shm-usage")
options.add_argume... | aryangoel49/Project-Stock-price-Notifier | main.py | main.py | py | 1,386 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 17,
"usage_type": "call"
},
{
"api_n... |
72900613342 | """
https://leetcode.com/problems/third-maximum-number/
"""
from typing import List
class Solution:
def thirdMax(self, nums: List[int]) -> int:
top3 = set()
for num in nums:
top3.add(num)
if len(top3) > 3:
top3.remove(min(top3))
if len(top3) < 3:
... | eronekogin/leetcode | 2020/third_maximum_number.py | third_maximum_number.py | py | 415 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "typing.List",
"line_number": 10,
"usage_type": "name"
}
] |
11514226805 | import requests
from bs4 import BeautifulSoup
import json
interests = [
'Content Writing',
'Digital Marketing',
'UI/UX Design',
'SEO',
'Social Media Marketing',
'Web Development',
'Data Analytics',
'Mobile App Development',
'Full Stack Development',
'Front End Development'
]
'''
... | AmitPhaujdar/Hazel-Assistant | scraper.py | scraper.py | py | 6,249 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.get",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 31,
"usage_type": "call"
}
] |
9019830161 | #####################################################################################
#extract.py
#Authors: Revanth Pobala and Hussain Mucklai.
#This project is about the Testing of Lilac(Lightweight low latency anonymous chat)
#This program will provide the graph for cdf(Cumulative Distribution function)
#############... | revanthpobala/lilac-testing | src/Results/extract.py | extract.py | py | 2,993 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "bisect.bisect_left",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 71,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot... |
5018533171 | from cafle import Account
from functools import partial
from astn0_index import idx
from astn1_account import acc
loan = Account(idx)
with loan as l:
l.mtrt = idx.mtrt
l.idxfn = idx.loan
l.is_wtdrbl = False
l.is_repaid = False
loan.ntnl = loan.subacc('ntnl')
with loan.ntnl as l:
l.amt = 65_000
... | kphong16/cafle | tests/FS model sample1/astn3_loan.py | astn3_loan.py | py | 2,493 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "cafle.Account",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "astn0_index.idx",
"line_number": 7,
"usage_type": "argument"
},
{
"api_name": "astn0_index.idx.mtrt",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "astn0_index.... |
2569027085 | # Temporary, for test purposes
import os
os.environ['APP_CONFIG'] = '/brum/dev/sharp_eye/src/resources/cam1.yaml'
from sharp_eye import RtspCamera
from time import sleep
from datetime import datetime
import numpy
from lib.quicklock import lock
lock()
DELAY = 1.0
cam = RtspCamera()
images = 0
times = []
def get... | funnybrum/sharp_eye_V2 | src/test/cam_test.py | cam_test.py | py | 1,270 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "os.environ",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "lib.quicklock.lock",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sharp_eye.RtspCamera",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.datet... |
35968667107 | from django.urls import path, include, re_path
from rest_framework.routers import DefaultRouter
from .views import ProfileViewSet
router = DefaultRouter()
router.register(
r'profile',
ProfileViewSet,
basename="profile"
)
urlpatterns = [
re_path(r'', include(router.urls))
] | MatRos-sf/Image_dj | user_api/urls.py | urls.py | py | 310 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.ProfileViewSet",
"line_number": 11,
"usage_type": "argument"
},
{
"api_name": "django.urls.re_path",
"line_number": 16,
"usage_type": "call"
},
{
"... |
74271054942 | import os
from copy import deepcopy
from typing import List
from to_typescript.core.filter import FilterAbstract
from to_typescript.core.transform.extra_rules import ClassInheritance
from to_typescript.filters.function_save import FilterFunctionSave
class FilterOOPSave(FilterAbstract):
FILE_STARTER = FilterFunct... | mtasa-typescript/mtasa-wiki-parser | to_typescript/filters/oop_save.py | oop_save.py | py | 3,942 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "to_typescript.core.filter.FilterAbstract",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "to_typescript.filters.function_save.FilterFunctionSave.FILE_STARTER",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "to_typescript.filters.function_... |
44131248838 | import os
import pickle
import torch
import numpy
NUM_SNIPPETS = 50
class DatasetConverter:
@staticmethod
def convert_pickles(path: str):
dir_list = os.listdir(path)
for dir_file in dir_list:
if '.pkl' in dir_file:
print("Opening {0}".format(dir_file))
... | GoodAI/torchsim | torchsim/core/datasets/convert_dataset.py | convert_dataset.py | py | 3,320 | python | en | code | 9 | github-code | 7 | [
{
"api_name": "os.listdir",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.Tensor",
"line_number": ... |
37523944317 | from models.user.decorator import require_admin
from flask import Blueprint, render_template, request, redirect, url_for
from werkzeug.utils import redirect
from models.store import Store
from models.user import require_admin
import json
store_blueprint = Blueprint("stores", __name__)
@store_blueprint.route("/")
def... | zhaoyufrank8825/item_alert | views/stores.py | stores.py | py | 1,910 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "flask.Blueprint",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "models.store.Store.all",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "models.store.Store",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "flask.render... |
23811257748 | import socket
import multiprocessing as mp
def handle_connection(connection, address, max_packet_size, forward_address, forward_port):
while True:
data = connection.recv(max_packet_size)
if data:
print('Data received:', data)
new_sock = socket.socket(socket.AF_INET, socket... | tkuye/cmput-404-lab2 | proxy_server.py | proxy_server.py | py | 1,407 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "socket.socket",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_STREAM",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "socket.socket"... |
15300323708 | import pandas as pd
import yfinance as yf
import matplotlib.pyplot as plt
#Bringing in sentiment data
df = pd.read_csv('pfizer_dated_sentiments_prices.csv')
print(df.head())
#Bringing in stock data
historical_pfe = yf.download('PFE')
print(historical_pfe.head())
#Aligning indices before merging
historical_pfe.reset... | JKilkenny4/pharma-sentiment | Importing_analyzing_stock.py | Importing_analyzing_stock.py | py | 1,372 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "yfinance.download",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.merge",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.S... |
5778097710 | #!/usr/local/bin/python3
# -*- coding: utf-8 -*-
#
#main class
########Make snp sequences
#
#Description: program receives as input snp name and size, process the information
#and return as output sequences
# with snps in middle position
#com as combinações das snps se necessário. Está modificado para python3
#snps as... | suzanaporto/DRSCAN_sequence | DRSCAN_sequence/main3.py | main3.py | py | 15,635 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "snpDAO.SnpDAO",
"line_number": 97,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 109,
"usage_type": "call"
},
{
"api_name": "snp.Snp",
"line_number": 133,
"usage_type": "call"
},
{
"api_name": "snp.Snp",
"line_number":... |
2502172666 | import torch
from torch import nn
from torchvision.transforms import InterpolationMode
import torchvision.transforms.functional as TF
import timm
from .layers import AttentionRefinementModule, FeatureFusionModule, ASPPv2, Spade, C3Blk, ResBlk, SPP, Conv, SpatialAttentionRefinementModule, PyramidPoolAgg, SIM, SegHead
fr... | tersekmatija/eWaSR | wasr/decoders.py | decoders.py | py | 9,430 | python | en | code | 11 | github-code | 7 | [
{
"api_name": "torch.nn.Module",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "layers.AttentionRefinementModule",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.nn... |
80661418 | from sentence_transformers import SentenceTransformer
import scipy.spatial
from datetime import datetime
def cal_sim(wn_des_list, wiki_des_list, model_path, batch_size):
start = datetime.now()
print('start time:', start.strftime("%Y-%m-%d %H:%M:%S"), '\n==================')
print('model path:', model_path... | NEUljw/WN2WD | EM/Model_Combination2/Contextual_Models/model_use.py | model_use.py | py | 1,714 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "datetime.datetime.now",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "sentence_transformers.SentenceTransformer",
"line_number": 11,
"usage_type": "call"
},
{
"a... |
17244451266 | """SPADE Localizer Class."""
import logging
from typing import Optional, Tuple, Union
import numpy as np
from pyscf import dft, gto
from scipy import linalg
from .base import Localizer
logger = logging.getLogger(__name__)
class SPADELocalizer(Localizer):
"""Object used to localise molecular orbitals (MOs) usi... | UCL-CCS/Nbed | nbed/localizers/spade.py | spade.py | py | 4,778 | python | en | code | 7 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "base.Localizer",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "pyscf.gto.Mole",
"line_number": 47,
"usage_type": "attribute"
},
{
"api_name": "pyscf.gto",
... |
10867911117 | import numpy as np
from utils.params import AgentActionType, UserActionType
def deco(cls):
cls._define_function()
return cls
@deco
class UserFeatures(object):
dimensions = 0
_function = {}
@classmethod
def get_vector(cls, state, action):
"""Returns the feature vector for a state-ac... | shobhit6993/inverse-reinforcement-learning | user/user_features.py | user_features.py | py | 1,539 | python | en | code | 12 | github-code | 7 | [
{
"api_name": "utils.params.AgentActionType",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "utils.params.UserActionType",
"line_number": 42,
"usage_type": "name"
},
{
"api_name": "utils.params.AgentActionType",
"line_number": 48,
"usage_type": "name"
},
{
... |
18867118392 | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.distributions as D
import pytorch_ssim
import torchvision
from GQN.core import LSTMCore, GRUCore
from util.datasets import get_buffer_length
import copy
"""
Implementation of the generator used in the GQN paper
can also replace... | jonathangranskog/shading-scene-representations | code/GQN/generator.py | generator.py | py | 24,980 | python | en | code | 21 | github-code | 7 | [
{
"api_name": "torch.nn.Module",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "util.datasets.get_buffer_length",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "util.da... |
26846005543 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: Xiaobo Yang
@contact: hal_42@zju.edu.cn
@software: PyCharm
@file: server.py
@time: 2019/4/27 7:26
@desc:
"""
from functools import wraps
from flask import Flask
from flask import request, jsonify, make_response
from solve_multi import Solve
app = Flask(__name_... | HAL-42/HTML5-Tic-Tac-Toe | 后端/server.py | server.py | py | 1,524 | python | en | code | 2 | github-code | 7 | [
{
"api_name": "flask.Flask",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "flask.make_response",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "flask.make_response",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "flask.request.met... |
38539965390 | from django import template
import matplotlib.pyplot as plt
import numpy as np
plt.rcParams.update({'font.size':14})
register = template.Library()
@register.filter
def conta_respostas(valor1):
contador = 0
for valor in valor1:
contador +=1
return contador
@register.filter
def porcentagem(total_r... | Brunodrc/meu-nps-version1 | resposta/templatetag/filtros_respostas.py | filtros_respostas.py | py | 817 | python | pt | code | 0 | github-code | 7 | [
{
"api_name": "matplotlib.pyplot.rcParams.update",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 5,
"usage_type": "name"
},
{
"... |
7305452808 | import time
from django.contrib.contenttypes.fields import GenericRelation
from django.core.validators import FileExtensionValidator
from django.db import models
from likes.models import Like
from mutagen.mp3 import MP3
def podcasts_directory_path(instance, filename):
return f'podcasts/{instance.podcast_name}/im... | OPSRv/man-gust.fm | backend/podcast/models.py | models.py | py | 3,306 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.db.models.Model",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 15,
"usage_type": "call"
},
{
"api_name"... |
22448487547 | import datetime
############################################################################################ printMonitorResults ######
def printMonitorResults(monitorResults):
""" Prints the Monitor results
"""
liveResults = monitorResults.totalMonitors-monitorResults.ScrappedMonitors-monitorResults.Fail... | keleven-uk/pyBarcoAudit | src/utils/monitor_utils.py | monitor_utils.py | py | 3,374 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "datetime.datetime.now",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.now",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "da... |
1180710081 | #this is a program that records my invoices from sri
import sqlite3
from load_databases import load_databases
def main():
#create a connection to db or create it
connection = sqlite3.Connection("sri.db")
#load or create databases
load_databases(connection)
#load gui
#perform operations
if ... | eljayan/SRI | main.py | main.py | py | 355 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sqlite3.Connection",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "load_databases.load_databases",
"line_number": 11,
"usage_type": "call"
}
] |
25981259317 | from __future__ import absolute_import, division, print_function
import cmarkgfm
from .clean import clean
variants = {
"GFM": cmarkgfm.github_flavored_markdown_to_html,
"CommonMark": cmarkgfm.markdown_to_html,
}
def render(raw, variant="GFM", **kwargs):
renderer = variants.get(variant)
if rendere... | VonBluebaugh/readme_renderer | readme_renderer/markdown.py | markdown.py | py | 430 | python | en | code | null | github-code | 7 | [
{
"api_name": "cmarkgfm.github_flavored_markdown_to_html",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "cmarkgfm.markdown_to_html",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "clean.clean",
"line_number": 21,
"usage_type": "call"
}
] |
73305357344 | from image_generation import print_image
from config import death
def check_input(enter_choose):
while not enter_choose.isdigit():
print("...\nдевочки я в шоке\n\nПопросилже ЦИФРУ")
enter_choose = input("> Напиши цифру варианта: ")
return enter_choose
def wrong_death(string, chapter):
print... | Er1ckR1ck0/Project1 | check.py | check.py | py | 1,829 | python | ru | code | 0 | github-code | 7 | [
{
"api_name": "image_generation.print_image",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "config.death",
"line_number": 22,
"usage_type": "argument"
}
] |
14639952914 | import urllib3 as ul3
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.chrome.options import Options
from tqdm import tqdm
import sys
import copy
import time
from redeem2... | Xaekk/Fund | 基金v1/基金.py | 基金.py | py | 12,236 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "redeem2DB.FundDB",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.chrome.options.Options",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 34,
"usage_type": "call"
},
{
... |
13516791837 | import requests
import base64
import json
import os
from time import time
import vk_api
def auth_handler():
key = input("Enter authentication code: ")
remember_device = True
return key, remember_device
vk_session = vk_api.VkApi('login', 'password', auth_handler=auth_handler)
vk_session.auth()
vk = vk_se... | PenguinGrape/spotify-to-telegram | vk.py | vk.py | py | 2,359 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "vk_api.VkApi",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.realpath",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "json.load",
"line_numb... |
41662229497 | # -*- coding:utf-8 -*-
#@Time : 2021/3/8 下午4:25
#@Author: kkkkibj@163.com
#@File : nankai_datahandle.py
#处理天津南开数据
import json
nankai_data = []
result = {}
result['data'] = []
with open('/Users/hongyanma/Desktop/chinaall.json','r') as gpsfile:
rawdata = json.load(gpsfile)
print(rawdata['data'])
for cood in r... | redrockhorse/python | palmgo3.5/nankai_datahandle.py | nankai_datahandle.py | py | 783 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "json.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 22,
"usage_type": "call"
}
] |
27975412712 | import asyncio
from collections import defaultdict, OrderedDict
import bottom
import re
import time
from runner import Runner
host = 'irc.chat.twitch.tv'
port = 6667
ssl = False
NICK = 'csawtv'
CHANNEL = '#csawtv'
PASS = ''
class Brain:
type_table = OrderedDict()
type_table['rounds'] = (
"the number... | osirislab/CSAW-CTF-2019-Quals | pwn/twitch_plays_shellcode/bot.py | bot.py | py | 8,031 | python | en | code | 57 | github-code | 7 | [
{
"api_name": "collections.OrderedDict",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "runner.Runner",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "re.full... |
73040589344 | from typing import List, Optional, Union
import math
from fastapi import APIRouter, Security, Query
from pydantic import BaseModel
from app.commons import logger
from app.commons.exceptions import AppErrorCode, AppErrorMessage
from app.interfaces.http.lib.auth import no_auth
from app.interfaces.http.lib.context impor... | Ethenalee/nfl-rushing-service | nfl-rushing-backend/mount/app/interfaces/http/v1/rushing.py | rushing.py | py | 1,979 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pydantic.BaseModel",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "typing.Optional"... |
38173929110 | # References:
# https://www.codearmo.com/python-tutorial/merton-jump-diffusion-model-python
import numpy as np
from scipy.stats import norm
from scipy.optimize import minimize_scalar
from tqdm import trange
class MertonJumpCall():
def __init__(self, S=None, sigma=None, T=None, risk_free=None, strike=None,
... | lara2302/deep_hedging | instruments/MertonJumpCall.py | MertonJumpCall.py | py | 3,218 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "numpy.zeros",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.shape",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.shape",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.maximum",
"line_number"... |
34716200268 | from crypt import methods
from app import db
from app.models.dog_model import Dog
from app.routes.routes_helper import error_message, get_record_by_id
from flask import Blueprint, jsonify, make_response, request
dogs_bp = Blueprint('dogs_bp', __name__, url_prefix='/dogs')
# ADD Post to Request
# ADD Get to Request
# ... | avivagars/flasky | app/routes/dogs.py | dogs.py | py | 3,745 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Blueprint",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "app.models.dog_model.Dog.query",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "app.models.dog_model.Dog",
"line_number": 15,
"usage_type": "name"
},
{
"api_n... |
74741132062 | # encoding: utf-8
from __future__ import absolute_import, unicode_literals
import re
from pathvalidate import unprintable_ascii_chars
from pathvalidate.error import (
InvalidCharError,
InvalidReservedNameError,
NullNameError,
ValidReservedNameError,
)
__SQLITE_VALID_RESERVED_KEYWORDS = [
"ABORT... | bestmethod/tcconfig-ubuntu-venv | lib/python3.6/site-packages/simplesqlite/_validator.py | _validator.py | py | 4,469 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "re.compile",
"line_number": 150,
"usage_type": "call"
},
{
"api_name": "re.escape",
"line_number": 151,
"usage_type": "call"
},
{
"api_name": "pathvalidate.unprintable_ascii_chars",
"line_number": 151,
"usage_type": "argument"
},
{
"api_name": "re.U... |
40442408649 | """12:04pm - 12:12pm"""
from typing import List
class Solution:
def numOfSubarrays(self, arr: List[int], k: int, threshold: int) -> int:
curr_sum = 0
left, right = 0, 0
num_valid = 0
for num in arr:
# add curr num
right += 1
curr_sum += num
... | darren-huang/leetcode-grind | neetcode433/3.sliding_window/m1.num_subarrays.py | m1.num_subarrays.py | py | 683 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "typing.List",
"line_number": 7,
"usage_type": "name"
}
] |
15150775939 | """
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A fast Mandelbrot set wallpaper renderer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
reddit discussion:
"https://www.reddit.com/r/math/comments/2abwyt/smooth_colour_mandelbrot"
"""
import numpy as np
from numba import jit
from PIL import Image
MAXITERS = 200
RADIUS = 10... | neozhaoliang/pywonderland | src/misc/mandelbrot.py | mandelbrot.py | py | 1,102 | python | en | code | 4,155 | github-code | 7 | [
{
"api_name": "numpy.log2",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numba.jit",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "numba.jit",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "numpy.ogrid",
"line_number": 40,
... |
4423071933 | import argparse
from dictionaryminer.wordnet import collect_all_data
from dictionaryminer.webster import get_webster_definitions
from halo import Halo
import json
from pathlib import Path
ROOT_DIR = Path(__file__).parent
COMPLETE_DICTIONARY = Path.joinpath(ROOT_DIR, 'assets/complete_dictionary.json')
WEBSTER_DIRECTORY... | Vocaby/dictionaryminer | make_dictionary.py | make_dictionary.py | py | 3,472 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "pathlib.Path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pathlib.Path.joinpath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "pathlib.Path.joinpath",
... |
40985161881 | from queue import Queue
from collections import defaultdict
class Solution(object):
def ifNear(self,word1,word2):
n = len(word1)
diff =filter(lambda x: word1[x]!= word2[x],range(n))
return len(list(diff)) ==1
def findLadders(self, beginWord, endWord, wordList):
"""
:type... | wherby/code | hard/126/t1.py | t1.py | py | 1,834 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "collections.defaultdict",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "queue.Queue",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "queue.Queue",
"line_number": 33,
"usage_type": "call"
}
] |
21016294033 | #!/usr/bin/env python
# coding: utf-8
# In[109]:
# imports
import pickle
import numpy as np
import mne
import matplotlib.pyplot as plt
# get_ipython().run_line_magic('matplotlib', 'inline')
import os
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
import torch
from torch imp... | etiennegalea/ssl_generic_eeg | temp_ssl.py | temp_ssl.py | py | 9,827 | python | en | code | 3 | github-code | 7 | [
{
"api_name": "braindecode.datasets.sleep_physionet.SleepPhysionet",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "mne.io.read_raw_fif",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "mne.io",
"line_number": 63,
"usage_type": "attribute"
},
{
... |
4345468115 | import requests
SPOTIFY_CREATE_PLAYLIST_URL = 'https://api.spotify.com/v1/users/adrianmorales2635/playlists'
ACCESS_TOKEN = "BQBJD-hln7Br5khw9oAC8Q2KZytd-puvHmH5TV6GIVCSRMPkx2ZeVr79v7uDeG6n17GqAjbb3W510_UVsUsny7nNuNO74Zz6_DS1aT4i0H5MsiPb138soahpQYCpABxh__9VLexZngg3kAmSeNH-pQHqT7cc13ykxTxnLfrKR-kSiDr1g9y_tVBfuT3qqW1MO1... | Adrianmorales1/spotify-create-playlist | spotfiy_API/create_playlist.py | create_playlist.py | py | 892 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "requests.post",
"line_number": 7,
"usage_type": "call"
}
] |
20433209491 | from fastapi import FastAPI, HTTPException, Depends
from pydantic import BaseModel
import psycopg2
from psycopg2.extras import RealDictCursor
app = FastAPI()
# взяли из прошлого задания
def get_db():
with psycopg2.connect(
dbname="startml",
host="postgres.lab.karpov.courses",
... | Wran9ler/start_ML | python/9 lesson/app.py | app.py | py | 1,803 | python | ru | code | 0 | github-code | 7 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "psycopg2.connect",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "psycopg2.extras.RealDictCursor",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "pydant... |
29316762330 | import os
import sys
import json
from spacewalk.server import rhnSQL
from spacewalk.server.importlib.backendOracle import SQLBackend
from spacewalk.server.importlib.contentSourcesImport import ContentSourcesImport
from spacewalk.satellite_tools.satCerts import verify_certificate_dates
from spacewalk.satellite_tools.sy... | spacewalkproject/spacewalk | backend/cdn_tools/repository.py | repository.py | py | 19,782 | python | en | code | 640 | github-code | 7 | [
{
"api_name": "spacewalk.server.rhnSQL.initDB",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "spacewalk.server.rhnSQL",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "constants.CONTENT_SOURCE_MAPPING_PATH",
"line_number": 29,
"usage_type": "attribut... |
23352844089 | from django.urls import path,include
from . import views
urlpatterns = [
#===== Condidate Side and Company Side url =====#
path('', views.homePage, name="homepage"),
path('signup/', views.signupPage, name="signup"),
path('register/', views.registerUser, name="register"),
path('otppage/', views.otpPa... | anishsharma0000/Job-Portal | myapp/urls.py | urls.py | py | 2,533 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "django.urls.path",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
13696319834 | import os, subprocess
import scipy.io.wavfile as wav
# Script for listing the sample rate of files
path = 'Sounds'
vowels = os.listdir(path)
for vowel in vowels:
(rate, signal) = wav.read("Sounds/{!s}".format(vowel))
print(rate, vowel.replace('.wav', ''))
print()
RESAMPLE = input("Would you like to resample... | jareddrayton/Speech-Scripts | tools/samplerate_checker.py | samplerate_checker.py | py | 933 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "os.listdir",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "scipy.io.wavfile.read",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "scipy.io.wavfile",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "subprocess.run",
... |
3472049390 | import numpy as np
from datetime import datetime
from netCDF4 import date2num
# This function gets the requisite data from the simulation results in order to incorporate them to the online model
# Inputs:
# - data_path: path to the simulated data
# - starting_day: day the offline model starts
# - first_year;... | charlesrouge/UpperSnakeRiver_reservoirs_WBM | code/offline_util.py | offline_util.py | py | 4,271 | python | en | code | 1 | github-code | 7 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "netCDF4.date2num",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "netCDF4... |
13906198930 | import lxml.etree as et
import ninfile1
import os
import requests
import struct
import zipfile
"""Pack integers to specific type."""
# Unsigned integers
def u8(data):
if not 0 <= data <= 255:
log("u8 out of range: %s" % data, "INFO")
data = 0
return struct.pack(">B", data)
def u16(data):
... | RiiConnect24/File-Maker | Channels/Nintendo_Channel/ninfile2.py | ninfile2.py | py | 20,182 | python | en | code | 65 | github-code | 7 | [
{
"api_name": "struct.pack",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "struct.pack",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "struct.pack",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "struct.pack",
"line_number": ... |
30695145375 | """Streaming video with face recognition."""
# ----------------------------------------------
# --- Author : Hani YOUSFI
# --- Mail : haniyousfi@gmail.com
# --- Date : 10th May 2018
# ----------------------------------------------
import cv2
recognizer = cv2.face.LBPHFaceRecognizer_create... | maky-hnou/Video_Face_Recognition | camera.py | camera.py | py | 2,711 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "cv2.face.LBPHFaceRecognizer_create",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.face",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "cv2.CascadeClassifier",
"line_number": 14,
"usage_type": "call"
},
{
"api_name":... |
17246810393 | from main import *
from flask import Blueprint, render_template
from flask import request, redirect
from main.service import openAI_input, key, local_IO, tistory_post
import datetime
## 선언부 ===================================================================================
var_blue = Blueprint("blue", __name__, templa... | sangsang99/toyGPT | main/blue/bluefile.py | bluefile.py | py | 2,823 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "flask.Blueprint",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.request.form",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "main.service.ope... |
22903011472 | import logging
from typing import List
from tests.testing_utils.testing_classes import TestResult, NodeOutput
logger = logging.getLogger("Common Checks")
def common_checks(
test_name: str,
*args
):
"""
Parses through the *args (should all be nodes) and "sorts" them such that the first return ... | openfheorg/openfhe-network-examples | tests/testing_utils/test_utils.py | test_utils.py | py | 1,689 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "tests.testing_utils.testing_classes.NodeOutput",
"line_number": 26,
"usage_type": "argument"
},
{
"api_name": "tests.testing_utils.testing_classes.TestResult",
"line_number": 37,
"... |
41158830971 | #Head Material
#leftPorts=1
#rightPorts=1
#type=inputInterface
#done
#Block Description
'''
Author: Kyle Norland
Date: 10/13/20
Description: General signal reader from CSV
'''
#---------------------------------
#-------------Imports---------
#---------------------------------
import zmq
import json
import time
import... | kylenorland/casa | CASArchitect/blockLibrary/readFromCSV.py | readFromCSV.py | py | 2,803 | python | en | code | 0 | github-code | 7 | [
{
"api_name": "sys.argv",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 42,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 43,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number... |
72951823903 | """Contiene clases que representan los actores comunes que pueden ser presentados en los diferentes tipos de escenas.
"""
from __future__ import annotations
from functools import cached_property, partial, wraps
from typing import Optional, Union, Tuple, Sequence, TYPE_CHECKING, Callable, Any
import numpy as np
impor... | efdiloreto/ZondaPro | zonda/graficos/actores.py | actores.py | py | 19,646 | python | es | code | 9 | github-code | 7 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "vtkmodules.all.vtkNamedColors",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "vtkmodules.all",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "typ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.