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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6566002246 | # -*- coding: utf-8 -*-
# IEC
import os
os.environ['DJANGO_SETTINGS_MODULE']='settings'
#from iec import iec_input <---- HAS THIS BEEN DONE? (I JUST CHANGED THE NAME)
import webapp2 as webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template
import cgi
imp... | hongtao510/u_tool | iec/iec_output.py | iec_output.py | py | 2,218 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.environ",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "cgitb.enable",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_numb... |
4157944015 | import os
import re
import jwt
from django.http import JsonResponse
from django.conf import settings
from apis.models import User
def login_decorator(func):
"""로그인 데코레이터"""
def wrapper(self, request, *args, **kwargs):
try:
token = request.headers.get("Authorization", None)
... | HyeonWooJo/tts-input-service | backend/core/utils.py | utils.py | py | 2,087 | python | ko | code | 0 | github-code | 1 | [
{
"api_name": "jwt.decode",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_... |
22652081377 | import boto3
import unittest
import lakelayer
from datetime import datetime
from datetime import timedelta
import json
import pytz
#
# Author: Tim Burns
# License: Apache 2.0
#
# A Testing Class to Validate Scraping the KEXP Playlist for the blog
# https://www.owlmountain.net/
# If you like this, donate to KEXP: http... | timowlmtn/bigdataplatforms | src/kexp/pytest/test_kexp_get_historical_1000.py | test_kexp_get_historical_1000.py | py | 2,953 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "unittest.TestCase",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "boto3.Session",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "lakelayer.KexpDataLake",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "lakelayer... |
3480526611 | x = [5, 6, 2, 1, 19, 5]
y = [200, 300, 180, 50, 1100, 580]
import matplotlib.pyplot as plt
from scipy import stats
s, inter, r, p, err = stats.linregress(x, y)
def fun(x):
return s * x + inter
model = list(map(fun, x))
plt.scatter(x, y)
plt.plot(x, model, color='r')
plt.show() | jj8000/kurs-cz.2 | zaj_6/regresja_prow.py | regresja_prow.py | py | 287 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "scipy.stats.linregress",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "scipy.stats",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.scatter",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib... |
71874630115 | """Endpoints of the strava_ingestion_service for metriker."""
from database_utils.activity_handler import StravaActivityHandler, parse_activity
from database_utils.user_handler import StravaUserHandler
from fastapi import APIRouter
from .config import settings
from .strava_handler import StravaHandler
# initiate dat... | christophschaller/metriker | strava_ingestion_service/strava_ingestion_service/endpoints.py | endpoints.py | py | 3,012 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "database_utils.user_handler.StravaUserHandler",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "config.settings.SECRET_KEY.get_secret_value",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "config.settings.SECRET_KEY",
"line_number": 12,
... |
17326080433 | import cv2
class Coordinates:
def __init__(self, video_path: str):
self.cap = cv2.VideoCapture(video_path)
cv2.namedWindow("Frame")
cv2.setMouseCallback("Frame", self.print_coordinates)
self.video()
def print_coordinates(self, event, x, y, flags, params):
if event == ... | FernandoLpz/YouTube | CountCars/coordinates.py | coordinates.py | py | 775 | python | en | code | 5 | github-code | 1 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.namedWindow",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.setMouseCallback",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.EVENT_LBUTTOND... |
70113408995 | from django.db import models
# Create your models here.
class BaseModelTable(models.Model):
id = models.AutoField("id", primary_key=True)
create_time = models.DateTimeField(null=True, verbose_name='创建时间', auto_now_add=True)
modify_time = models.DateTimeField(null=True, verbose_name='修改时间', auto_now=Tru... | jiqialin/AutoCaseManagemantPlatform | AutoCaseInfoManagement/index/models.py | models.py | py | 3,588 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.db.models.Model",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.models.AutoField",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "... |
4851242917 | # -*- coding: utf-8 -*-
from flask import abort, Blueprint, render_template, request
from .partial import send_file_partial
pileup_bp = Blueprint('pileup', __name__, template_folder='templates',
static_folder='static', static_url_path='/pileup/static')
@pileup_bp.route('/remote/static', method... | gitter-badger/scout | scout/server/blueprints/pileup/views.py | views.py | py | 1,343 | python | en | code | null | github-code | 1 | [
{
"api_name": "flask.Blueprint",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "flask.r... |
988098948 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 18 15:21:25 2018
@author: Sergio Balderrama
ULg-UMSS
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.lines as mlines
import enlopy as el
from matplotlib.dates import DateFormatter
#%%
###################... | Slbalderrama/Phd_Thesis_Repository | Demand_Modeling/Scenario_Creation_Demand.py | Scenario_Creation_Demand.py | py | 3,753 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pandas.date_range",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pandas.date_range",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "pandas.Series",
... |
20581591067 | """
多进程多线程抓取案例
"""
from multiprocessing import Process, Queue, Pool, Manager, Lock
import os, time, random, requests, traceback, json, threading
from bs4 import BeautifulSoup
from concurrent.futures import ThreadPoolExecutor
import pymongo
client = pymongo.MongoClient(host='127.0.0.1', port=27017, username="root", p... | qugemingzizhemefeijin/python-study | ylspideraction/chapter09/_020mulitprocessingthreadtxt8.py | _020mulitprocessingthreadtxt8.py | py | 3,463 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "traceback.print_ex... |
39994274479 | from qiskit import QuantumCircuit, execute
from qiskit import IBMQ, Aer
from qiskit.visualization import plot_histogram
from qiskit.providers.aer.noise import NoiseModel
# Build noise model from backend properties
provider = IBMQ.load_account()
print(provider)
backend = provider.get_backend('ibmq_vigo')
noise_model = ... | simonetome/QuantumGeneticAlgorithm | GQA/quantum/prova.py | prova.py | py | 908 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "qiskit.IBMQ.load_account",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "qiskit.IBMQ",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "qiskit.providers.aer.noise.NoiseModel.from_backend",
"line_number": 10,
"usage_type": "call"
},
{
... |
9539235134 | """
Handles retrieving policies from:
ACL/COLING 2014 Dataset Zip File
Policies Directory
Scraped from webpage
"""
from zipfile import ZipFile
import re
import pickle
policy_dict = {
'cbc': './policies/CBC.txt',
'bbc': './policies/BBC.txt',
'nytimes': './policies/NYT.txt',
'thestar': '.... | krishnr/Priv | server/src/get_policies.py | get_policies.py | py | 1,620 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pickle.load",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "zipfile.ZipFile",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number"... |
35566203783 | import os
from os.path import splitext
from subprocess import check_call, Popen
import tempfile
import logging
import urllib.request
import urllib.parse
VOXYGEN_URL_FMT = 'https://www.voxygen.fr/sites/all/modules/voxygen_voices/assets/proxy/index.php?method=redirect&text={message}&voice=Marion'
VOICERSS_URL_FMT = 'ht... | jujumo/conteur | conteur/tts.py | tts.py | py | 2,519 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "tempfile.NamedTemporaryFile",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.name",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "os.path.splitext",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.path.spl... |
15362382953 | import copy
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from functools import partial
from sklearn.metrics import roc_auc_score, f1_score
from torch.utils.data import DataLoader
def collate(block, word_to_ix):
block_size = len(block)
max_words = np.max([len(i[0]) for i in... | bllguo/KSI | KSI_utils.py | KSI_utils.py | py | 12,920 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.max",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.from_numpy",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "torch.FloatTensor",
"line_... |
24837006891 | from PIL import Image, ImageDraw
import io
IMAGE_WIDTH = 38
IMAGE_HEIGHT = 32
N_RESIZE = 64
NUMBER_OF_POSITIONS = 51 # [0;100]
file = open("progressArc.h", "w")
file.write("#ifndef LCD_PROGRESS_ARC_H_\n")
file.write("#define LCD_PROGRESS_ARC_H_\n\n")
file.write("namespace lcd\n{\n\n")
file.write("static const uint8_t... | zukaitis/midi-grid | Misc/image_generation/generateProgressArc.py | generateProgressArc.py | py | 1,781 | python | en | code | 74 | github-code | 1 | [
{
"api_name": "PIL.Image.new",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "PIL.ImageDraw.Draw",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "PIL.ImageDraw",
"line_... |
3757279275 | # -*- coding: utf-8 -*-
from django.conf import settings
from urlparse import parse_qs, urlparse
from datetime import datetime
from celery import task
from twython import Twython
from dashboard.models import SocialSearch, Item
@task(ignore_result=True)
def collect_all_social_searchs():
social_search_list = Socia... | allisson/django-social-monitor-example | dashboard/tasks.py | tasks.py | py | 1,986 | python | en | code | 17 | github-code | 1 | [
{
"api_name": "dashboard.models.SocialSearch.objects.all",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "dashboard.models.SocialSearch.objects",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "dashboard.models.SocialSearch",
"line_number": 13,
"... |
73614605793 | from unittest.mock import Mock
import pytest
import requests
from parking_permit.html_parser import HtmlParser
from parking_permit.queue_service import *
LICENSE_PLATE = "AB-123-C"
CLIENT_NUMBER = "1234567"
URL = (
"https://www.amsterdam.nl/parkeren-verkeer/parkeervergunning/"
+ "parkeervergunning-bewoners/w... | janheindejong/parking-permit | tests/test_queue_service.py | test_queue_service.py | py | 1,976 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.Response",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "pytest.fixture",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "pytest.MonkeyPatch",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "un... |
21840890275 | import sys, itertools
input = sys.stdin.readline
def dfs(start, ls):
visited[start] = True
for i in graph[start]:
if not visited[i]:
if i in j or i in unselect:
ls.append(i)
dfs(i, ls)
N =int(input())
population = [0] +list(map(int, input().split... | pearl313/BOJ | 백준/Gold/17471. 게리맨더링/게리맨더링.py | 게리맨더링.py | py | 1,287 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.stdin",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "itertools.combinations",
"line_number": 23,
"usage_type": "call"
}
] |
28399981836 | """Support for automation and script tracing and debugging."""
from homeassistant.core import callback
from .const import DATA_TRACE
@callback
def get_debug_trace(hass, automation_id, run_id):
"""Return a serializable debug trace."""
return hass.data[DATA_TRACE][automation_id][run_id]
@callback
def get_deb... | robertdelpeut/core | homeassistant/components/trace/trace.py | trace.py | py | 966 | python | en | code | null | github-code | 1 | [
{
"api_name": "const.DATA_TRACE",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "homeassistant.core.callback",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "const.DATA_TRACE",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "homeassi... |
35968078948 | from population import *
from route import *
import config
import NSGAII
class GA:
mutationRate = 0.65
tournamentSize = 10
elitism = True
runningAvg = 0
@classmethod
def evolvePopulation(cls, pop):
newPopulation = Population(2*pop.populationSize, False)
#copy over... | Akshay-Kawlay/MTSP-throughput-max | approach1&2/galogic.py | galogic.py | py | 4,700 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "NSGAII.NSGAII_main",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "config.population",
"line_number": 54,
"usage_type": "attribute"
},
{
"api_name": "config.population",
"line_number": 56,
"usage_type": "attribute"
},
{
"api_name": "rout... |
14919840293 | import os
import sys
from datetime import timedelta
from dotenv.main import load_dotenv
# BASE_DIR = Path(__file__).resolve().parent.parent
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.join(BASE_DIR, 'apps'))
if os.getenv("GITHUB_ACTIONS") == "true":
load_dotenv('... | GaniyevUz/Digital-Ecommerce | root/settings.py | settings.py | py | 7,697 | python | en | code | 6 | github-code | 1 | [
{
"api_name": "os.path.dirname",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sys.path.append",
"line... |
5747429962 | import sys
import tensorflow as tf
import keras
import numpy as np
import matplotlib.pyplot as plt
from PIL import Image
from scipy.io import loadmat
import cv2
from skimage.io import imshow
from keras.models import Sequential
from keras.layers import Conv2D,Conv2DTranspose, Cropping2D, Dense, Activation, Dropout, Flat... | suhaschowdaryj/semantic_segmentation | fcn32.py | fcn32.py | py | 7,416 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.warnoptions",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "warnings.simplefilter",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "keras.models.Sequential",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "ke... |
17291005352 | import boto3
import requests
import os
import smtplib
import paramiko
import time
import schedule
EMAIL_ADDRESS = os.environ.get('EMAIL_ADDRESS')
EMAIL_PASSWORD = os.environ.get('EMAIL_PASSWORD')
instance_id = "i-0c90f5640105608c3"
host_ip = "13.234.116.18"
def send_notification(email_text):
with smtplib.SMTP('... | himanshupant4899/boto3-project | Monitoring_Website/monitor-website.py | monitor-website.py | py | 2,321 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.environ.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_... |
9862990084 | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="agilent-format",
version="0.4.4",
author="Stuart Read",
author_email="stuart.read@lightsource.ca",
description="File reader for Agilent Resolutions Pro FT-IR images",
long_description=... | stuart-cls/python-agilent-file-formats | setup.py | setup.py | py | 710 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 15,
"usage_type": "call"
}
] |
9361751702 | # %%
from matplotlib import pyplot as plt
import numpy as np
file = "log.txt"
def preprocessing(line):
new=line.replace('\n','').replace(',','').replace('=','').replace(':','').replace('/','').replace('(','').replace(')','').replace('%','')
lineData=new.strip().split(' ')
return lineData
def line1(lineData)... | SunZekai-CN/obj3 | benchmark/readlog.py | readlog.py | py | 7,318 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.array",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 103,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number": 104,
"usage_type": "call"
},
{
"api_name": "numpy.median",
"line_number"... |
24398367329 | import logging
import os
import random
from urlparse import urlparse
from bs4 import BeautifulSoup
import pickle
from PIL import Image
import requests
import twitter_oauth
logging.basicConfig(level=logging.DEBUG, filename='cuties.log')
logging.debug('Cuties start')
class Dog(object):
'''
Scrapes the SF SPC... | ecalifornica/CutePetsSF | cuties.py | cuties.py | py | 7,219 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "logging.basicConfig",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "logging.debug",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "logging.debug",
... |
3242822152 | import sys
sys.path('../../../')
import torch
import torch.nn as nn
import Datasets.medutils_torch as medutils_torch
from Datasets.medutils_torch import complex
from Datasets.medutils_torch.fft import fft2, ifft2
from Datasets.medutils_torch.mri import \
adjointSoftSenseOpNoShift, \
forwardSoftSenseOpNoShift
... | YuyangXueEd/MRI_Recon_Tutorial | Models/sigmanet/modules/datalayer.py | datalayer.py | py | 7,826 | python | en | code | 6 | github-code | 1 | [
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "torch.nn.Module",
"line_num... |
40239177456 | #!/usr/bin/env python
"""This script identifies the controller and plots the results."""
# builtin
import os
import argparse
# external
import matplotlib.pyplot as plt
# local
import utils
from gait_landmark_settings import settings
PATHS = utils.config_paths()
def main(event, structure, recompute, normalize):
... | csu-hmc/gait-control-direct-id-paper | src/identify_controller.py | identify_controller.py | py | 3,224 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "utils.config_paths",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "gait_landmark_settings.settings.keys",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "gait_landmark_settings.settings",
"line_number": 21,
"usage_type": "name"
},
... |
20111198660 | # coding: utf-8
from __future__ import print_function, absolute_import, division, unicode_literals
_package_data = dict(
full_package_name='nim_install',
version_info=(0, 6, 0),
__version__='0.6.0',
author='Anthon van der Neut',
author_email='a.van.der.neut@ruamel.eu',
description='install nim... | gitrootside/vokker | venv/Lib/site-packages/nim_install/__init__.py | __init__.py | py | 2,696 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.version_info",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "urllib.request.FancyURLopener",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "sys.argv",
"line_number": 48,
"usage_type": "attribute"
},
{
"api_name": "os.... |
13917637840 | from django.contrib import admin
from .models import Activity
@admin.register(Activity)
class ActivityAdmin(admin.ModelAdmin):
list_display = (
'id',
'created_at',
'activity',
'description',
)
list_filter = ('created_at',)
date_hierarchy = 'created_at' | jafarjtown/Drim | activities/admin.py | admin.py | py | 317 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.contrib.admin.ModelAdmin",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.contrib.admin.register",
"line_number": 6,
"usage_type": "call"
},
{
... |
73221180195 | import datetime
import pytz
class Account:
""" Simple account class with balance """
@staticmethod
def _current_time():
utc_time = datetime.datetime.utcnow()
return pytz.utc.localize(utc_time)
def __init__(self, name, balance):
self.name = name
self.balance = balance
... | chuckwm/PycharmProjects | oop/teacher_accounts.py | teacher_accounts.py | py | 1,578 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "datetime.datetime.utcnow",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "pytz.utc.localize",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pytz.... |
25441538667 | import pygame
from .funcs import *
from .restart_button import Restart_Button
from .resume_button import Resume_Button
from .sfx_disable_button import SFX_Disable_Button
from .music_disable_button import Music_Disable_Button
class Pause_Menu:
def __init__(self, game):
self.game = game
self.image = ... | pratripat/Dungeon-Game | scripts/pause_menu.py | pause_menu.py | py | 1,597 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "restart_button.Restart_Button",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "resume_button.Resume_Button",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sfx_disable_button.SFX_Disable_Button",
"line_number": 21,
"usage_type": "call"... |
11778563292 | from PyQt5.QtWidgets import QLabel, QSizePolicy, QRubberBand
from PyQt5.QtGui import QImage, QPixmap
from PyQt5 import QtCore
from PyQt5.Qt import QSize, QRect, QRectF, QPoint, QPointF
import numpy as np
class ImageWidget(QLabel):
def __init__(self, parent=None):
super().__init__(parent)
self.ima... | hovren/visualsearch | vsearch/gui/image.py | image.py | py | 4,771 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "PyQt5.QtWidgets.QLabel",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QSizePolicy.MinimumExpanding",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWidgets.QSizePolicy",
"line_number": 13,
"usage_type": "n... |
1569004540 | """Provides interface for training the model."""
import os
import pathlib
import numpy as np
import torch
from matplotlib import pyplot as plt
from tqdm import tqdm
from . import models
from .preprocessing import ImageDataPipeline
def save(model, path):
"""
Saves the model's parameter states.
Paramete... | MarxSoul55/cats_vs_dogs | cats_vs_dogs/src/pytorch_impl/src/train.py | train.py | py | 3,279 | python | en | code | 5 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_numb... |
17217608702 | import sys
sys.path.append('../TS2VEC')
from pathlib import Path
import hydra
from omegaconf import OmegaConf, DictConfig
import numpy as np
from base.network import TS2Vec
from task.classification.model import TSC
PROJECT_PATH = Path('.').absolute()
DATA_PATH = Path(PROJECT_PATH, 'data', 'UCRArchive_2018', 'FordA')
... | tae73/TS2Vec-Tensorflow | experiments/classification/FordA/forda.py | forda.py | py | 2,840 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "sys.path.append",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_num... |
12047340102 | import argparse
import os
import numpy as np
import tqdm.auto as tqdm
import math
import torch
import torch.optim as optim
from torch.distributed.fsdp import (
FullyShardedDataParallel as FSDP,
ShardingStrategy,
FullStateDictConfig,
StateDictType,
)
import datasets
import torch.nn.functional as F
from t... | zphang/minimal-llama | minimal_llama/gist/convert_fsdp_checkpoint.py | convert_fsdp_checkpoint.py | py | 2,450 | python | en | code | 447 | github-code | 1 | [
{
"api_name": "torch.distributed.tensor.parallel.fsdp.enable_2d_with_fsdp",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 38,
"usage_type": "attribu... |
70813688993 | from cmd import PROMPT
from lib2to3.pgen2 import driver
import time
import pandas as pd
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium.common.exceptions import... | massiagostini/Tesi | ws_molise.py | ws_molise.py | py | 1,978 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "selenium.webdriver.common.by.By.XPATH",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.common.by.By",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.common.by.By.XPATH",
"line_number": 19,
"us... |
44847088453 | from setuptools import setup
import os
def _get_version():
filename = os.path.join('src', 'cyclone', '__init__.py')
glb = {}
with open(filename) as fp:
for line in fp:
if '__version__' in line:
exec(line, glb)
return glb['__version__']
raise RuntimeE... | IOR88/cyclone | setup.py | setup.py | py | 731 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.path.join",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "setuptools.setup",
"line_number": 15,
"usage_type": "call"
}
] |
6208729995 | import logging
import os
import sentry_sdk
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, RegexHandler, ConversationHandler
from handlers import conversation
from settings import PROXY
logging.basicConfig(format='%(name)s - %(levelname)s - %(message)s',
level=logging.... | KaltakhchyanD/lp_project_orders_tg_bot | bot.py | bot.py | py | 749 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.basicConfig",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sentry_sdk.in... |
71845052193 | from django.core.paginator import Paginator
from django.shortcuts import render, get_object_or_404
from django.db.models import Q, Count
from ..models import Question, Category
def index(request, category_name='qna'):
page = request.GET.get('page', '1')
kw = request.GET.get('kw', '') # 검색어
so = request.... | ShinHyeongcheol/mysite | pybo/views/base_views.py | base_views.py | py | 2,112 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "models.Question.objects.order_by",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "models.Question.objects",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "models.Question",
"line_number": 12,
"usage_type": "name"
},
{
"api... |
23972292939 | from django.shortcuts import render
from rest_framework import viewsets
from .models import ApartmentModel, Comment
from apps.apartment.forms import CommentForm
from apps.apartment.api.serializers import ApartmentSerializers
from apps.contact.models import ContactModel
from apps.hoteInfo.models import HotelInfo
def a... | Strannik1424/Luxen-Hotel | apps/apartment/views.py | views.py | py | 1,778 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "models.Comment.objects.all",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "models.Comment.objects",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "models.Comment",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": ... |
25204853716 | __author__ = "jhurley@gmail.com (James Hurley)"
import cgi
import datetime
from google.appengine.api import users
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.ext.db import djangoforms
from google.appengine.ext.webapp... | JamesHurley/gifty | controllers/helper.py | helper.py | py | 1,835 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "datetime.timedelta",
"line_number": 26,
"usage_type": "call"
}
] |
10100352992 | import pygame
from .base import BaseState
class CustomizeCharacter(BaseState):
def __init__(self):
super().__init__()
self.title = self.font.render("Customize Character", False, 'White')
self.title_rect = self.title.get_rect(center=self.screen_rect.center)
def draw(self, surface):
... | JeffMcCracken/run-escape | code/states/customize_character.py | customize_character.py | py | 411 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "base.BaseState",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "pygame.Color",
"line_number": 12,
"usage_type": "call"
}
] |
37716038335 | import streamlit as st
import time
import torch
import torchvision.transforms as transforms
import torch.nn as nn
from PIL import Image
transform = transforms.Compose([
transforms.Resize((224, 224)),
transforms.ToTensor(),
transforms.Normalize((0.5,), (0.5,))
])
class CNN(nn.Module):
def __init__(se... | waizwafiq/fakeshoe_detection | run.py | run.py | py | 4,940 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "torchvision.transforms.Compose",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "torchvision.transforms.Resize",
"line_number": 11,
"usage_type": "call"
},
{
... |
40808949145 | from torch.nn import Module
import torch.nn as nn
class RNN(Module):
def __init__(self, num_in, num_layers, num_hidden, num_out):
super(RNN, self).__init__()
self.lstm = nn.LSTM(num_in, num_hidden, num_layers, dropout=0.3)
self.body = nn.Sequential(nn.Linear(num_hidden, num_hidden),nn.Dropo... | Aryan187/Music-Recommendation-System | Model/rnn.py | rnn.py | py | 457 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "torch.nn.Module",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "torch.nn.LSTM",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "torch.nn.Sequential",
"line_n... |
75186846753 | import base64
import os
import glob
import tempfile
from time import sleep
import plaid
from dotenv import load_dotenv
from google.cloud import storage
from plaid.api import plaid_api
from plaid.model.institutions_get_request import InstitutionsGetRequest
from plaid.model.country_code import CountryCode
from plaid.mode... | shashwot-acme/wallet_function | plaid/main.py | main.py | py | 3,859 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "tempfile.gettempdir",
"lin... |
21589746404 | import torch.nn as nn
import torch
import numpy as np
def gen_sequential(
channels,
Norm_feature = 0,
force_zero = False,
force_zero_ceiling = 0.01,
**kwargs
):
assert len(channels) > 0
modulist = []
from_channel = channels[0]
mid_layers = channels[1:]
for layer in ra... | TurquoiseKitty/BCGmeta_git | models/block_models.py | block_models.py | py | 1,614 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "torch.nn.Linear",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "torch.no_grad",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "torch.nn.BatchNorm1d",
"li... |
33533072018 | import asyncio
import os
import requests
import time
from PIL import Image
from io import BytesIO
from datetime import datetime
import random
from telethon import events
from userbot.utils import admin_cmd
from userbot import ALIVE_NAME
from telethon.tl.types import ChannelParticipantsAdmins
DEFAULTUSER = s... | RDX-ANONYMOUS/MASTER-MIND-BOT | userbot/plugins/alive.py | alive.py | py | 2,629 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "userbot.ALIVE_NAME",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "asyncio.sleep",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "asyncio.sleep",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "asyncio.sleep",
"l... |
9571528493 | from django.urls import path,include
# from watchlist_app.api.views import movie_list, movie_detail
from watchlist_app.api.views import GamePlatformVS,GamePlatform,ReviewCreate,ReviewDetail,ReviewList,WatchListAV,WatchDetailAV,GamePlatformAV,GamePlatformDetailAV
from rest_framework.routers import DefaultRouter
router=... | hyeonseong0917/smilegate_personal_project | watchmate/watchlist_app/api/urls.py | urls.py | py | 1,098 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "watchlist_app.api.views.GamePlatformVS",
"line_number": 7,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
... |
18801120419 | import numpy as np
import pandas as pd
import pyvista as pv
import sys
import logging
import tetgen
from dragen.utilities.InputInfo import RveInfo
class MeshingHelper:
def __init__(self, rve_shape: tuple = None, rve: pd.DataFrame = None, grains_df: pd.DataFrame = None):
self.rve = rve
self.grains... | ibf-RWTH/DRAGen | dragen/utilities/PvGridGeneration.py | PvGridGeneration.py | py | 8,377 | python | en | code | 10 | github-code | 1 | [
{
"api_name": "pandas.DataFrame",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "pandas.Series",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "dragen.utilities.InputInfo.RveInfo.box_size_y",
"line_number": 30,
"usage_type": "attribute"
}... |
5357527996 | from watson_developer_cloud import ToneAnalyzerV3
import json
import os as os
import config
from watson_developer_cloud import WatsonException
class Tono():
def __init__(self):
self.vTone_analyzer = ToneAnalyzerV3(
username=config.WTAusername,
... | joaquinpunales1992/Python-AIServices | AnalisisComportamiento_JPunales/WatsonToneAnalyzer.py | WatsonToneAnalyzer.py | py | 1,042 | python | es | code | 0 | github-code | 1 | [
{
"api_name": "watson_developer_cloud.ToneAnalyzerV3",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "config.WTAusername",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "config.WTApass",
"line_number": 11,
"usage_type": "attribute"
},
{
"... |
15103968278 | from django.shortcuts import render
from django.shortcuts import redirect
from django.contrib.auth.forms import UserCreationForm
from django.contrib import messages
from django.contrib.auth import authenticate, login
from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
from... | eruzetaien/PBPtugas2 | todolist/views.py | views.py | py | 3,925 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "todolist.models.Task.objects.all",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "todolist.models.Task.objects",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "todolist.models.Task",
"line_number": 26,
"usage_type": "name"
},
... |
42426529533 | import sys
from collections import defaultdict
from copy import deepcopy
input=sys.stdin.readline
n,k=map(int,input().split())
l=[tuple(map(int,input().split())) for _ in range(n)]
dp=[0]*(k+1)
dp_idx=defaultdict(set)
for i in range(1,k+1):
for idx,(w,v) in enumerate(l):
if 0<=i-w<=k and idx not in dp_idx[i... | jhchoy00/baekjoon | 12865.py | 12865.py | py | 515 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.stdin",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "collections.defaultdict",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 14,
"usage_type": "call"
}
] |
43236512740 | from __future__ import print_function
import os
import rospkg
import rospy
from python_qt_binding import loadUi
from python_qt_binding.QtCore import Qt
from python_qt_binding.QtCore import Signal
from python_qt_binding.QtGui import QIcon
from python_qt_binding.QtGui import QGraphicsScene
from python_qt_binding.QtGui... | graziegrazie/my_turtlebot | rocon/src/rqt_capabilities/src/rqt_capabilities/capability_graph.py | capability_graph.py | py | 5,052 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "rqt_gui_py.plugin.Plugin",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "python_qt_binding.QtCore.Signal",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "python_qt_binding.QtCore.Signal",
"line_number": 33,
"usage_type": "call"
},
... |
4912088125 | from django.urls import path, include
from . import views
urlpatterns = [
path('',views.application,name='application'),
path('upload',views.upload,name='upload'),
path('preview', views.preview, name='preview'),
path('modification', views.modification, name='modification'),
path('status', views.sta... | kevalunagar/National-Voter-Service-Portal | nvsp/application/urls.py | urls.py | py | 388 | python | en | code | 2 | github-code | 1 | [
{
"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",
... |
74064928674 | import torch
def initialize_layer(layer, type = "normal", gain=0.02):
classname = layer.__class__.__name__
if hasattr(layer, 'weight') and (classname.find('Conv') != -1 or classname.find('Linear') != -1):
if type == 'normal':
torch.nn.init.normal_(layer.weight.data, 0.0, gain)
elif... | Cli98/tep-repo | Networks/initialization.py | initialization.py | py | 2,198 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "torch.nn.init.normal_",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.init.xavier_normal_",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torch.... |
13042112688 | import pytest
import requests_mock
import datetime
from dateutil.tz import tzutc
from iotile.cloud.cloud import IOTileCloud
from iotile.cloud.config import link_cloud
from iotile.core.dev.config import ConfigManager
from iotile.core.dev.registry import ComponentRegistry
from iotile.core.exceptions import ArgumentError,... | iotile/coretools | iotile_ext_cloud/test/test_login.py | test_login.py | py | 6,110 | python | en | code | 14 | github-code | 1 | [
{
"api_name": "iotile.core.dev.registry.ComponentRegistry",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "iotile.core.dev.config.ConfigManager",
"line_number": 30,
"usage_type": "c... |
10686813347 | from threading import Lock
import grpc
from google.protobuf.empty_pb2 import Empty as EmptyResponse
from kmol.core.logger import LOGGER as logging
from ...configs import ServerConfiguration
from ...exceptions import ClientAuthenticationError
from ...protocol_buffers import mila_pb2, mila_pb2_grpc
from .server_manager... | elix-tech/kmol | src/mila/services/server_manager/grpc_servicer.py | grpc_servicer.py | py | 3,599 | python | en | code | 33 | github-code | 1 | [
{
"api_name": "server_manager.ServerManager",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "protocol_buffers.mila_pb2_grpc.MilaServicer",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "protocol_buffers.mila_pb2_grpc",
"line_number": 13,
"usage_... |
72708313633 |
from functools import reduce
import discord
import linkbot.utils.queries.cmdban as cmdban
import neo4jdb as db
class Command:
"""
A parsed message that looks for the prefix, a command, and args following the command.
:message: (discord.Message) The message that was sent.
:author: (discord.User/dis... | tjbrockmeyer/LinkBot | linkbot/utils/command.py | command.py | py | 6,880 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "discord.Message",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "discord.TextChannel",
"line_number": 39,
"usage_type": "attribute"
},
{
"api_name": "discord.DMChannel",
"line_number": 47,
"usage_type": "attribute"
},
{
"api_name": "... |
24240566551 | import setuptools
import versioneer
DESCRIPTION_FILES = ["pypi-intro.rst"]
long_description = []
import codecs
for filename in DESCRIPTION_FILES:
with codecs.open(filename, 'r', 'utf-8') as f:
long_description.append(f.read())
long_description = "\n".join(long_description)
setuptools.setup(
name = ... | aragilar/root-solver | setup.py | setup.py | py | 1,577 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "codecs.open",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "setuptools.setup",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "versioneer.get_version",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "setuptools.find_p... |
11626599818 | # -*- coding: utf-8 -*-
# @Time : 19-8-5 下午5:31
# @Author : huziying
# @File : half_circle.py
# 半圆形
import cv2
import numpy
import uuid
import base64
import os
from django.db import connection
from .utils_huziying import horizontal_measurements, vertical_measurements
numpy.set_printoptions(threshold=numpy.inf)... | huzing2524/circuit_board | measurement/utils/half_circle.py | half_circle.py | py | 4,641 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "numpy.set_printoptions",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.inf",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "cv2.cvtColor",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2GRAY... |
40463001775 | from bs4 import BeautifulSoup
import requests
from datetime import datetime
# https://amzn.to/3E7V45Y -> Cetus Pro FPV
def cetus_price():
url = 'https://amzn.to/3E7V45Y'
headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'}
... | enriquetecfan11/Telegram-Bot | amazonprice.py | amazonprice.py | py | 583 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 12,
"usage_type": "call"
}
] |
13576462360 | """
Laboratorio de Programación Básica en Python para Manejo de Datos
-----------------------------------------------------------------------------------------
Este archivo contiene las preguntas que se van a realizar en el laboratorio.
No puede utilizar pandas, numpy o scipy. Se debe utilizar solo las funciones de p... | classroom-fundamentos-de-analitica/lab---python-basico-andresmonsalve19 | preguntas.py | preguntas.py | py | 10,852 | python | es | code | 1 | github-code | 1 | [
{
"api_name": "io.open",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "io.open",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "io.open",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "io.open",
"line_number": 73,
"usage_t... |
43482876476 | import asyncio
import logging
import threading
from typing import List
from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware
from starlette.websockets import WebSocket, WebSocketDisconnect
from .saver import Saver
from .transport import Transfer, InputData
logging.basicConfig(level=logging... | coma8765/gorocket-monitoring-backend | app/main.py | main.py | py | 2,255 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.basicConfig",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "fastapi.FastAPI",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "transport.Trans... |
8283091296 | # https://github.com/SwarnadeepGhosh
# Six Days Weather Forecast using Python and MetaWeather API
import requests
import time
API_ROOT = 'https://www.metaweather.com'
API_LOCATION = '/api/location/search/?query=' # + city
API_WEATHER = '/api/location/' # + woeid
def print_pause(printable_data):
tim... | SwarnadeepGhosh/Python-Small-Projects | weather_forecast_by_MetaWeather_API.py | weather_forecast_by_MetaWeather_API.py | py | 2,828 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "time.sleep",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 45... |
5965575419 | # -*- coding: iso-8859-1 -*-
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.cm as mpl_cm
import iris
import iris.quickplot as qplt
import iris.plot as iplt
from iris.util import unify_time_units
import cartopy.crs as ccrs
import cartopy.feature as cfeat
impo... | vpoertge/SatEX | climate_index_calculation/plot_indices/plot_ghcndex_indices.py | plot_ghcndex_indices.py | py | 21,522 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "matplotlib.use",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "iris.Constraint",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "iris.Constraint",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "iris.load",
"line_n... |
28752304494 |
"""
Created on Fri Dec 3 09:10:44 2021
@author: adaskin
"""
import random
import math
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
from sim_tree import generate_tree_elements,sum_of_nonzeropaths
import sklearn.datasets as datasets
import scipy.sparse
def polar2xy(r, t... | adaskin/app_with_schmidt | reduction_of_rings.py | reduction_of_rings.py | py | 2,608 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "math.cos",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "math.sin",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "random.random",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "random.random",
"line_number": 25... |
39285486469 | import cv2 as cv
import matplotlib.pyplot as plt
import matplotlib.patches as patches
import matplotlib.cm as cm
from time import sleep
import numpy as np
face_detector = cv.CascadeClassifier('haarcascade_frontalface_default.xml')
def show_points(room_size,tracked_points,cam_position,pad=2):
room_width = roo... | PrateekMunjal/Face-detection-webcam-opencv | utils.py | utils.py | py | 1,252 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "cv2.CascadeClassifier",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.Rectangle",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "ma... |
42447191423 | import json
import os
from logic.payment_method import PaymentMethod
PATH = os.getcwd()
DIR_DATA = PATH + '{0}data{0}'.format(os.sep)
class PaymentMethodController(object):
def __init__(self):
self.file = '{0}{1}'.format(DIR_DATA, 'payment.json')
def add(self, payment_method: PaymentMethod = PaymentM... | ISCODEVUTB/vms | controller/payment_method_controller.py | payment_method_controller.py | py | 1,038 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.getcwd",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "os.sep",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "logic.payment_method.PaymentMethod",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "json.load",
... |
41146178388 | import pandas as pd
import torch
from src.common.tools import model_device
from src.callback.progressbar import ProgressBar
from configs.basic_config import config
class Generator(object):
def __init__(self, model, tok, logger, n_gpu, input_len=None):
self.model = model
self.tok = tok
... | THU-BPM/CoEP | src/test/generator_CoEP.py | generator_CoEP.py | py | 17,988 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "src.common.tools.model_device",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "src.callback.progressbar.ProgressBar",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "configs.basic_config.config",
"line_number": 43,
"usage_type": "name"
... |
2513105859 | import ape
from ape import Contract, reverts
from utils.checks import check_strategy_totals
from utils.utils import days_to_secs
import pytest
def test__set_uni_fees(
asset,
strategy,
management,
aave,
weth,
):
# Everything should start as 0
assert strategy.uniFees(aave, weth) == 0
ass... | mil0xeth/yearn-v3-AAVE-Delta-Neutral-st-yCRV | tests/test_access.py | test_access.py | py | 2,248 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "ape.reverts",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "ape.reverts",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "ape.reverts",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "utils.checks.check_strategy_total... |
5872705859 | # Вспомогательные функции для получения времени пешего похода до метро и коородинат объекта
import requests
import json
import time
from random import randint
from sklearn import metrics
import numpy as np
def regression_results(y_true, y_pred):
# Regression metrics
explained_variance=metrics.explained_varia... | levchCode/MoscowEstate | processing/metro_coords.py | metro_coords.py | py | 2,075 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "sklearn.metrics.explained_variance_score",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sklearn.metrics",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "sklearn.metrics.mean_absolute_error",
"line_number": 14,
"usage_type": "call"
... |
15571487589 | from urllib.parse import urlsplit
from django.contrib.sites.models import Site
from django.templatetags.static import static
from ..core.utils import build_absolute_uri
def get_email_context():
site: Site = Site.objects.get_current()
logo_url = build_absolute_uri(static("images/logo-light.svg"))
send_em... | croolicjah/saleor-platform | saleor/saleor/core/emails.py | emails.py | py | 779 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "django.contrib.sites.models.Site",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.contrib.sites.models.Site.objects.get_current",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.contrib.sites.models.Site.objects",
"line_number... |
411750400 | # pylint: disable=W0621,C0114,C0116,W0212,W0613
import pathlib
from typing import cast, Optional
import pytest
import pytest_mock
from dae.genotype_storage.genotype_storage_registry import \
get_genotype_storage_factory
from dae.duckdb_storage.duckdb_genotype_storage import \
DuckDbGenotypeStorage
from dae.t... | iossifovlab/gpf | dae/dae/duckdb_storage/tests/test_parquet_layout_scans.py | test_parquet_layout_scans.py | py | 3,959 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "pytest.TempPathFactory",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "dae.genotype_storage.genotype_storage_registry.get_genotype_storage_factory",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "typing.cast",
"line_number": 30,
... |
27772819097 | import lbp_face_recognition
from Tkinter import *
import tkFileDialog
from Tkinter import Label,Tk
from PIL import Image, ImageTk
class home:
def __init__(self,master):
lbp_face_recognition.train()
self.master=master
self.f=Frame(master,width=1000,height=600)
self.f.pro... | sudo-sunil/GUI_LLFR | gui.py | gui.py | py | 1,687 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "lbp_face_recognition.train",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "Tkinter.Label",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "tkFileDialog.askopenfilename",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": ... |
14179302218 | from scripts.helpful_scripts import get_account
from scripts.get_weth import get_weth
from brownie import config, network, interface
from web3 import Web3
amount = Web3.toWei(0.1, "ether")
def main():
account = get_account()
erc20_address = config["networks"][network.show_active()]["weth_token"]
# call g... | Brar-Paul/aave_brownie_py | scripts/aave_borrow.py | aave_borrow.py | py | 4,151 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "web3.Web3.toWei",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "web3.Web3",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "scripts.helpful_scripts.get_account",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "brownie.c... |
13635080325 | import curses
import random
from typing import Tuple, Set
def get_draw_range(
pointer_pos: Tuple[int, int],
map_size: Tuple[int, int],
window_size: Tuple[int, int],
buffer: int
) -> Tuple[range, range]:
# set pointer pos
pointer_y, pointer_x = pointer_pos
# set window... | akibancha/pyaar | src/interface/render_map.py | render_map.py | py | 4,100 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "typing.Tuple",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number":... |
28911695063 | import numpy as np
import plotly.graph_objects as go
import numpy as np
from PIL import Image
from scipy.interpolate import interpn
img = Image.open("Earth_Diffuse_6K.jpg")
imgdata = np.asarray(img)
factor = 30
lats = np.linspace(0, np.pi, int(imgdata.shape[0]/factor)) # this is actually latitude + 90
lons = np.lins... | utat-ss/FINCH-Orbit | earth sphere plotly.py | earth sphere plotly.py | py | 877 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "PIL.Image.open",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "PIL.Image",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "numpy.asarray",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number... |
25484810000 | from typing import overload
from unicodedata import category
from django.core import exceptions
from datetime import datetime
from django.http.response import HttpResponseNotAllowed
from .models import (
FurnitureModels, OrderModels, ReviewModels, ChatTopicModels,
ChatContentModels, OrderModels,ShoppingCartMode... | arif-teguh/jepara-furniture | webapp/user/views.py | views.py | py | 17,655 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "django.shortcuts.render",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.authenticate",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.login",
"line_number": 36,
"usage_type": "call"
},
{
... |
11936950572 | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 11 14:18:28 2018
@author: shuyun
"""
from sklearn.metrics import classification_report
import scikitplot as skplt
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
from sklearn.metrics import confusion_matrix
import os
import re
import matplotlib
impor... | stevenleejun/automl_pred_lily | utils/utils_model_ana.py | utils_model_ana.py | py | 7,746 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "matplotlib.rcParams",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.rcParams",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "pandas.DataFrame",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "nu... |
74532598432 | import openai, sys
openai.api_key = "Your API key"
with open(str(sys.argv[1])) as f:
content = f.read()
completion = openai.ChatCompletion.create(
model = "gpt-3.5-turbo",
temperature = 0.2,
max_tokens = 3333,
messages = [
{"role": "system", "content": "You are a computer programmer"},
... | yefeiw/chatgpt-jiuzhang | api/chatgpt.py | chatgpt.py | py | 419 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "openai.api_key",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "openai.ChatCompletion.create",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "openai.Ch... |
8316907207 | import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
from sklearn.metrics import r2_score
from sklearn.metrics import mean_squared_error
from sklearn.metrics import r2_score
class RF_plotter(object):
def __init__(self,features,target,model):
'''
:param featu... | LLNL/Sedov-ML | sedov_common/plotters/random_forest_plotter.py | random_forest_plotter.py | py | 6,513 | python | en | code | 5 | github-code | 1 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.scatter",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "... |
8076964586 | import tkinter as tk
import matplotlib
from matplotlib.backends.backend_tkagg import (
FigureCanvasTkAgg, NavigationToolbar2Tk)
from matplotlib.figure import Figure
class Application(tk.Frame):
def __init__(self, master=None):
matplotlib.use('TkAgg')
tk.Frame.__init__(self, master)
... | radovan-urban/MeC_python | tools/tkinter_matplot3.py | tkinter_matplot3.py | py | 809 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "tkinter.Frame",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.use",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "tkinter.Frame.__init__",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "tkinter.Frame"... |
33010746822 | from django.urls import include, path
from rest_framework.routers import DefaultRouter
from . import views, viewsets
router = DefaultRouter()
router.register('questions', viewsets.QuestionViewSet, basename='question')
router.register('answers', viewsets.AnswerViewSet, basename='answer')
app_name = 'Questans_API_v1'... | Seth250/qenea-backend | questans/api/v1/urls.py | urls.py | py | 1,100 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.urls.include",
"line_number": 14,
"usage_type": "call"
},
{
"api_name... |
70271059555 | # -*- coding: utf-8 -*-
# This software and supporting documentation are distributed by
# Institut Federatif de Recherche 49
# CEA/NeuroSpin, Batiment 145,
# 91191 Gif-sur-Yvette cedex
# France
#
# This software is governed by the CeCILL license version 2 under
# French law and abiding by the rules... | brainvisa/axon | python/brainvisa/data/qt4gui/databaseCheckGUI.py | databaseCheckGUI.py | py | 17,800 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "brainvisa.processing.qtgui.backwardCompatibleQt.QDialog",
"line_number": 57,
"usage_type": "attribute"
},
{
"api_name": "brainvisa.processing.qtgui.backwardCompatibleQt",
"line_number": 57,
"usage_type": "name"
},
{
"api_name": "brainvisa.processing.qtgui.backwardC... |
73811257633 | import json
import math
import sys
import operator
model_file = sys.argv[1]
test_file = sys.argv[2]
f_test = open(test_file, 'r')
f_model = open(model_file, 'r')
#sys.stdout = open("spam.out", 'w')
Dict = json.load(f_model)
d = {}
P_c = {}
classes = []
N = 0 #total number of documents
correct = 0
k = int(Dict['~_V... | dingyi567/CSCI-544 | hw1/nbclassify.py | nbclassify.py | py | 1,542 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "sys.argv",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "json.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "math.log",
"line_number": 34,... |
32689227188 | from django.conf.urls import patterns, url
from users import views
urlpatterns = patterns('',
url(r'^$',views.index, name='index'),
url(r'^(?P<user_id>\d+)/$', views.detail, name='detail'),
url(r'^attendance/$', views.attendance, name='attendance'),
url(r'^notifications/$', views.notifications, name='n... | dissipator/campsia | users/urls.py | urls.py | py | 432 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.conf.urls.patterns",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "users.views.index",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "us... |
25646973960 | import arxiv
import urllib
import pdfx
import re
import spacy
from spacy.lang.fr.examples import sentences
from xml.sax.saxutils import escape
import sys
def after_references(mypdftext):
keyword1 = 'References'
keyword2 = 'REFERENCES'
keyword3 = 'R EFERENCES'
keyword4 = 'Reference'
keyword5='[1]' ... | Caojerem/Projet_fil_rouge_SIO_2022 | Docker/fil_rouge.py | fil_rouge.py | py | 2,426 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "spacy.load",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "arxiv.Search",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "arxiv.SortCriterion",
"line_number": 52,
"usage_type": "attribute"
},
{
"api_name": "re.sub",
"line_n... |
1857536637 | # -*- coding: utf-8 -*-
"""
Created on Mon Feb 11 14:41:11 2019
@author: Kumail
"""
import pandas
import numpy as np
from sklearn import model_selection
from sklearn.linear_model import LogisticRegression
dataset = pandas.read_csv("../datasets/iris.csv")
array = dataset.values
X = array[:,0:4]
Y = array[:,4]
valida... | KumailP/machine-learning-dsu | linear-models/LogisticRegression.py | LogisticRegression.py | py | 1,257 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection",
"line_number": 21,
"usage_type": "name"
},
{
"... |
27195496579 | import mesa
from agents import TreeAgent, Seed
from model import DispersalModel
from mesa.visualization.modules import CanvasGrid, ChartModule
from pointpats import PointPattern
import pointpats.quadrat_statistics as qs
def get_mean_nnd(self):
coords_seeds = []
for (agents, x, y) in self.grid.coord_ite... | higuchip/density-dependent-mortality | server.py | server.py | py | 2,262 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "agents.Seed",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pointpats.PointPattern",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "agents.Seed",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "pointpats.PointPattern... |
10327528775 | from itertools import product
import networkx as nx
import numpy as np
import pandas as pd
from sklearn.metrics import mean_squared_error
from .tools import transform_ts
from .generator import node_name
class VAR():
def __init__(self, p):
self.p = p
self.is_fitted = False
def fit(self, ts_... | danthe96/CIoTS | CIoTS/simple_var.py | simple_var.py | py | 4,928 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "tools.transform_ts",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.insert",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.linalg.lstsq",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
... |
33277836844 | # -*-coding:utf-8-*-
__author__ = 'hank'
import os
import json
class ReadConfig(object):
def __init__(self):
self.local = os.path.abspath('.')
self.father_path = os.path.dirname(self.local)
self.json_path = self.father_path + "/config/"
def read_json(self, json_name):
json_nam... | hansenzhf/first | lib/read_config.py | read_config.py | py | 486 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.path.abspath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
35360372876 | import cv2
import numpy as np
import dlib
import matplotlib.pyplot as plt
import sys
import face_recognition
import imutils.face_utils
from imutils import face_utils
#import imutils.face_utils
#image read
imq = cv2.imread('C:\\Users\\moham\\Pictures\\cv_DP2jpg.jpg', 0)
#image show
cv2.imshow('image', img)
#image show ... | Ziaf007/Attendance-using-Facial_recognition | Detection.py | Detection.py | py | 2,226 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "cv2.imread",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "cv2.waitKey",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": ... |
6257445976 | from art import logo
def resources_sufficient(order_ingredients):
"""Returns True if the drink can be made, returns False if resources are insufficient"""
for item in order_ingredients:
if order_ingredients[item] > resources[item]:
print(f"Sorry there is not enough {item}. Please make anot... | wintermute111/100DaysOfPython | Day015/coffee-machine/main.py | main.py | py | 2,888 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "art.logo",
"line_number": 79,
"usage_type": "argument"
}
] |
22056165678 | import json
import os
import click
from twarc.decorators2 import FileSizeProgressBar
from twarc.expansions import ensure_flattened
@click.command()
@click.option(
'--granularity',
'-g',
type=click.Choice(
['year', 'month', 'day', 'hour', 'minute', 'second'],
case_sensitive=False
),
... | JoanMassachs/twarc-divide | twarc_divide.py | twarc_divide.py | py | 1,448 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "twarc.decorators2.FileSizeProgressBar",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "twarc.expansions.ensure_flattened",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 43,
"usage_type": "call"
},
{
... |
72322916513 | # -*- coding:utf-8 -*-
from __future__ import print_function
import numpy
import theano.tensor as T
import cv2
import cPickle
numpy.random.seed(1337) # for reproducibility
from PIL import Image
from keras.models import Sequential
from keras.layers import Input, Dense, Dropout, LSTM
from keras.layers.convolutional i... | jsxxj/RBF_DCNN | MCNN/LSTM.py | LSTM.py | py | 3,202 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.random.seed",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "cPickle.load",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "cPickle.load",
"li... |
6661308948 | from django.contrib import admin
from django.urls import path, include
urlpatterns = [
#?sessão de administração padrão do django
path('admin/', admin.site.urls),
#?rotas para os apps
path('', include('Rest_app.urls')),
#?rotas de autentificação do rest_framework
path('api-auth/', include('rest... | Rip4568/veiculo_django_project | Veiculos_project/urls.py | urls.py | py | 405 | python | pt | code | 0 | github-code | 1 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "dja... |
26597490747 | from rest_framework import viewsets, decorators, status
from rest_framework.response import Response
from django.db import transaction
from geoplaces.models import Place
from geoplaces.serializers import PlaceSerializer, PlaceIncreaseRatingSerializer
from geoplaces.filters import GeoPlacesFilter
class PlaceViewSet(v... | marqueewinq/klubok | klubok/geoplaces/views.py | views.py | py | 1,575 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "rest_framework.viewsets.ReadOnlyModelViewSet",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.viewsets",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "geoplaces.models.Place.objects.all",
"line_number": 26,
"usage_... |
40967112979 | from collections import deque
from lib.Intcode2 import Intcode
from lib.utils import print_array
SIZE = 30
xy = [[-1] * SIZE for i in range(SIZE)]
with open("data/19.txt") as f:
_program = list(map(int, f.readline().split(",")))
min_x = 0
max_x = 0
y = 0
count = 0
MIN_SIZE = 100
size_flag = False
arr_y = []
... | szerlak/advent_of_code | 2019/19.py | 19.py | py | 1,242 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "lib.Intcode2.Intcode",
"line_number": 29,
"usage_type": "call"
}
] |
11510553212 | # Released under the MIT License. See LICENSE for details.
#
"""Defines ScoreBoard Actor and related functionality."""
from __future__ import annotations
import weakref
from typing import TYPE_CHECKING
import bascenev1 as bs
if TYPE_CHECKING:
from typing import Any, Sequence
class _Entry:
def __init__(
... | efroemling/ballistica | src/assets/ba_data/python/bascenev1lib/actor/scoreboard.py | scoreboard.py | py | 15,161 | python | en | code | 468 | github-code | 1 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "bascenev1.Team",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "bascenev1.Lstr",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "weakref.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.