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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
34349642079 | import requests
from config import DARK_SKY_API_KEY
def get_weather(latitude, longitude):
url = "https://api.darksky.net/forecast/{}/{},{}".format(DARK_SKY_API_KEY, latitude, longitude)
response = requests.get(url)
data = response.json()
current_weather = data['currently']
summary = current_weat... | TaylorFacen/Console-Weather-App | weather_app.py | weather_app.py | py | 597 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "config.DARK_SKY_API_KEY",
"line_number": 6,
"usage_type": "argument"
},
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
}
] |
38611094350 | import pandas as pd
import requests
data = pd.read_csv("C:\\Users\\CodeB\\Documents\\GitHub\\transportation-transformation\\data\\new_york\\uber-tlc-foil-response\\uber-trip-data\\taxi-zone-lookup.csv")
df = pd.DataFrame(data)
overpass_url = "http://overpass-api.de/api/interpreter"
nominatim_url = "https://nominatim.... | hollyyuqizheng/transportation-transformation | scripts/new_york/nyc_taxi_zone_latlon.py | nyc_taxi_zone_latlon.py | py | 1,565 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pandas.read_csv",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"l... |
20830912574 | from typing import List
from app.models import EquipmentBalance, EquipmentPosition
from app.schemas.equipment import (
EquipmentCreate,
EquipmentPositionCreate,
EquipmentPositionUpdate,
)
from fastapi.encoders import jsonable_encoder
from sqlalchemy import and_, select
from sqlalchemy.ext.asyncio import As... | wallseat/MIREA_data-manipulation-software | practice7-8/app/crud/equipment.py | equipment.py | py | 4,171 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "sqlalchemy.ext.asyncio.AsyncSession",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.select",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "app.models.EquipmentPosition",
"line_number": 23,
"usage_type": "argument"
},
{... |
22293013843 | import torch
import torch.nn as nn
from models.fcn import PFCN, FCN
from models.tnet import InputTransformNet, FeatureTransformNet
class PointNetCommon(nn.Module):
'''
common part of point-net
input -> (T-Net) -> SFCN(64) -> SFCN(64) -> (T-Net) -> SFCN(64) -> SFCN(128) -> SFCN(1024) -> MaxPool -> ... | Shiaoming/pointnet-torch | models/pointnet_common.py | pointnet_common.py | py | 2,867 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "torch.nn.Module",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "models.tnet.InputTransformNet",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "models.fcn.... |
2709095607 | __author__ = 'Kalyan'
notes = '''
Implement a left binary search and write exhaustive tests for the same. Left binary search returns the index of left most
element when a search key repeats. For e.g if input is [1,2,3,3,4,4,5] and I search 3, it should return 2 as index 2 is
the left most occurance of 3.
In [1,1,1,1,... | ankitsumitg/mrnd-python | unit5_assignment_04.py | unit5_assignment_04.py | py | 1,600 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "bisect.bisect_left",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pytest.importorskip",
"line_number": 40,
"usage_type": "call"
}
] |
36091481822 | # -*- coding: utf-8 -*-
from pandas import Series
from pandas_ta._typing import DictLike, Int
from pandas_ta.maps import Imports
from pandas_ta.utils import v_offset, v_pos_default, v_series, v_talib
from .sma import sma
def trima(
close: Series, length: Int = None, talib: bool = None,
offset: Int = None, **k... | webclinic017/Project-Killer-Public | Data Aggregation Bot/LAYER_DO_NOT_PUSH/python/lib/python3.9/site-packages/pandas_ta/overlap/trima.py | trima.py | py | 2,187 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pandas.Series",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "pandas_ta._typing.Int",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "pandas_ta._typing.Int",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pandas_ta._... |
11227922018 | import cv2
import numpy as np
img = cv2.imread('IconFaceLv2.png')
def showPanda() :
# cv2.imshow('image',img)
cv2.namedWindow('panda',cv2.WINDOW_NORMAL)
cv2.imshow('panda',img)
cv2.waitKey(0)
| mmihevc/CS510 | cs510tutorials/tutorial00/tutorial00.py | tutorial00.py | py | 215 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "cv2.imread",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.namedWindow",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "cv2.WINDOW_NORMAL",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "cv2.imshow",
"line... |
710051698 | import requests
import streamlit as st
BASE_URL = "https://api.kraken.com/0"
@st.cache(ttl=5, suppress_st_warning=True)
def get_status():
request = BASE_URL + '/public/SystemStatus'
st.code(request)
response = requests.get(request).json()
st.json(response)
return response
| Icasso/Mars | client/KrakenClient.py | KrakenClient.py | py | 296 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "streamlit.code",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "streamlit.json",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "streamlit.cache",
"lin... |
30188774382 | import sys
_module = sys.modules[__name__]
del sys
dataset = _module
layer = _module
lfw_eval = _module
main = _module
net = _module
from _paritybench_helpers import _mock_config, patch_functional
from unittest.mock import mock_open, MagicMock
from torch.autograd import Function
from torch.nn import Module
import abc,... | eladhoffer/pytorch-jit-paritybench | generated/test_MuggleWang_CosFace_pytorch.py | test_MuggleWang_CosFace_pytorch.py | py | 10,502 | python | en | code | null | github-code | 71 | [
{
"api_name": "sys.modules",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "_paritybench_helpers.patch_functional",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "unittest.mock.mock_open",
"line_number": 18,
"usage_type": "call"
},
{
"api... |
33129159482 | import argparse
import importlib
from pyspark.sql import SparkSession
parser = argparse.ArgumentParser()
parser.add_argument('--job', type=str, required=True, help='the job name you want to select')
parser.add_argument("--job-args", action='append', type=str, help='the arguments of the job passed\
one or multiple ... | Senhaji-Rhazi-Hamza/gcp-dataproc-workflow-template-pyspark-migration-example | src/main.py | main.py | py | 899 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.SparkSession.builder.master",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.SparkSession.builder",
"line_number": 24,
"usage_type": "attri... |
37022859165 | import time
import re
import sys
import random
from unittest.util import strclass
import numpy as np
from argparse import ArgumentParser, Namespace
from typing import Callable, List, Optional, Tuple, Union
from PyQt5 import QtGui
from PyQt5 import QtCore
from PyQt5.QtWidgets import (
QMainWindow, QApplic... | zgruba/wdi-python-hex-scrabble | gra_scrabble.py | gra_scrabble.py | py | 35,122 | python | pl | code | 0 | github-code | 71 | [
{
"api_name": "typing.List",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 63,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 64,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_numb... |
14331089790 | """
Contains possible interactions with the Apollo Organisms Module
"""
import json
from apollo.client import Client
from apollo.decorators import raise_error_decorator
class OrganismsClient(Client):
CLIENT_BASE = '/organism/'
@raise_error_decorator
def add_organism(self, common_name, directory, blatdb=... | galaxy-genome-annotation/python-apollo | apollo/organisms/__init__.py | __init__.py | py | 7,334 | python | en | code | 9 | github-code | 71 | [
{
"api_name": "apollo.client.Client",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "json.dumps",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "apollo.decorators.raise_error_decorator",
"line_number": 13,
"usage_type": "name"
}
] |
41800167540 | import requests
def main():
location = input("Enter Your City Name: ")
res = requests.get("http://api.openweathermap.org/data/2.5/weather?q="+location+"&APPID=8daef122aca4c4d9d40408fb5566bb65")
data = res.json()
co = data['main'] ['temp']
temp_max = data['main'] ['temp_max']
temp_min = data['ma... | yashsinghcodes/Ask | used file/api(wht).py | api(wht).py | py | 780 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
}
] |
14188538800 | import pytz
import schedule
import subprocess
from crawling_python.global_utils import get_database_connect
kst = pytz.timezone('Asia/Seoul')
def delete_expired_data(today):
kst = pytz.timezone('Asia/Seoul')
connect = get_database_connect()
cursor = connect.cursor()
query = "DELETE FROM job WHERE ex... | techeer-sv/graphy | crawling_python/scheduler.py | scheduler.py | py | 833 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "pytz.timezone",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "pytz.timezone",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "crawling_python.global_utils.get_database_connect",
"line_number": 11,
"usage_type": "call"
},
{
"api_... |
27132549799 | #!/usr/bin/env python
import math
import sys
import time
from math import sqrt, radians, cos, sin, tan, atan2
import rospy
import numpy as np
import pandas as pd
from ackermann_msgs.msg import AckermannDriveStamped
from geometry_msgs.msg import PoseStamped
from sensor_msgs.msg import LaserScan
from tf.transformations... | ArchieV1/F1Tenth | scripts/purepursuit_improved.py | purepursuit_improved.py | py | 13,353 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "math.radians",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "math.radians",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 76,
"usage_type": "attribute"
},
{
"api_name": "rospy.get_param",
... |
6541188823 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import defaultdict
import numpy as np
class NaiveBayesClassifier(object):
def train(self, dataset, classes):
''' train naive bayes classifier
'''
# sorted by classes
sub_datasets = defaultdict(lambda: [])
cls_cnt = defaultdict(lambda: 0)
f... | floperry/DeepInML | naive_bayes/bayes.py | bayes.py | py | 1,149 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "collections.defaultdict",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.arr... |
26093139090 | #!/usr/bin/env python3
import os
import time
import random
import argparse
import pandas as pd
from langdetect import *
from lxml import etree
from parsers import log
from parsers import utils, config
# def parse_arguments():
# parser = argparse.ArgumentParser()
# parser.add_argument('--own-name', dest='own... | Schnei1811/PythonScripts | WordCloud/Chatistics-master/parsers/messenger.py | messenger.py | py | 5,632 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "lxml.etree.set_default_parser",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "lxml.etree.XMLParser",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.list... |
42392857932 | from django.db import models
from mongoengine import *
from mongoengine import connect
from django.core.paginator import Paginator
connect('djweb', host='127.0.0.1', port=27017)
# Create your models here.
class ArticleInfo(Document):
des = StringField()
title = StringField()
score = StringField()
tags... | zzhang115/DjWeb | django_web/models.py | models.py | py | 767 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "mongoengine.connect",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "django.core.paginator.Paginator",
"line_number": 21,
"usage_type": "call"
}
] |
16125995064 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import abc
from scipy.ndimage import gaussian_filter
import numpy as np
class AffinityRefinementOperation(metaclass=abc.ABCMeta):
def check_input(self, X):
"""Check the input to the refine() metho... | bbrookie/Speaker-Diarization-1 | spectralcluster/refinement.py | refinement.py | py | 3,564 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "abc.ABCMeta",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "numpy.ndarray",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "abc.abstractmethod",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "numpy.cop... |
42516320676 | # %% [markdown]
# # Plots for comparison on ALD dataset with 20% add MAR values
# %%
from pathlib import Path
import matplotlib.pyplot as plt
import pandas as pd
import vaep
plt.rcParams['figure.figsize'] = [4, 2] # [16.0, 7.0] , [4, 3]
vaep.plotting.make_large_descriptors(5)
COLORS_TO_USE_MAPPTING = vaep.plotting.... | RasmussenLab/pimms | project/10_7_ald_reduced_dataset_plots.py | 10_7_ald_reduced_dataset_plots.py | py | 4,816 | python | en | code | 8 | github-code | 71 | [
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "vaep.plotting.make_large_descriptors",
"line_number": 11,
"usage_type": "call"
},
{... |
6547225088 | #!/usr/bin/env python3
from __future__ import annotations
import shlex
import shutil
import subprocess
from abc import ABCMeta, abstractmethod
from .dto import TrackedConfigurationDTO
from ..common.singleton import Singleton
from ..common.utils import get_real_gid, get_real_uid
from ..repository import Repository
fro... | simsekhalit/backup-pro | src/backup_pro/services/configuration_service.py | configuration_service.py | py | 5,856 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "common.singleton.Singleton",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "repository.Repository",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "dto.TrackedConfigurationDTO",
"line_number": 28,
"usage_type": "name"
},
{
"api_... |
17905927721 | import logging
from datetime import datetime, timezone
from django.db import models
logger = logging.getLogger(__name__)
class Task(models.Model):
"""Task model used to define tasks that will be run as cron jobs """
FAILED = 'FAILED'
IN_PROGRESS = 'IN_PROGRESS'
SLEEPING = 'SLEEPING'
SUCCESS = '... | CurrieBen/sidekick | sidekick/models.py | models.py | py | 3,896 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.db.models.Model",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.db... |
28666850478 | #########################################################################
# k-nearest neighbour technique for classifying breast cancer. #
# #
# Author: Jonathan Harper #
########################... | jvh/classifying-breast-cancer | src/k_nearest_neighbour.py | k_nearest_neighbour.py | py | 3,880 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "helper_functions.read_csv_and_prep",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy",
"line_number": 41,
"usage_type": "call"
},
... |
17730867804 |
from inspect import signature
from pathlib import Path
from sympy import sympify
from random import sample
import gym
import numpy as np
from gym import spaces
from scipy.special import softmax
import sentencepiece as spm
from environment.compute_graph import ComputeGraph
from environment.typed_operators import *
from... | joepalermo/dm_math_solvers | environment/envs/math_env.py | math_env.py | py | 12,463 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "hparams.HParams.get_hparams_by_name",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "hparams.HParams",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "gym.Env",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "insp... |
11409642283 | from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect
from django.template import loader
import pandas as pd
import docx, datetime, os
from pytz import timezone
# Create your views here.
def home(request):
template = loader.get_template('index.html')
try:
pd.rea... | psomani4009/Hotel-Management-App | page0/views.py | views.py | py | 6,576 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.template.loader.get_template",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.template.loader",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "pandas.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_na... |
12310383395 | import os
import re
import sys
sys.path.append('.')
import cv2
import math
import time
import scipy
import argparse
import matplotlib
import numpy as np
import pylab as plt
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from collections import OrderedDict
from sci... | yinghanlong/dance_pose_estimation | web_demo.py | web_demo.py | py | 7,426 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "sys.path.append",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "numpy.mean",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number... |
20889896297 | """swaggertest URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-b... | Dongmin-Sim/django_swagger | swaggertest/urls.py | urls.py | py | 2,126 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "drf_yasg.views.get_schema_view",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "drf_yasg.openapi.Info",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "drf_yasg.openapi",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": ... |
2135574157 | import os
from fastapi import FastAPI, Response, status
from .service_types import NewAccountInput, NewAccountOutput, AccountDetails, TransactionDetail
from .data_layer import InMemoryAccountDatastore, Account, UnknownAccountError
from .transaction_service import TransactionService, TransactionServiceException
from .c... | BraveSirRobin/fastapi-demo | accounts/main.py | main.py | py | 2,491 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "config.AccountsServiceConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "fastapi.FastAPI",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "data_layer.InMemoryAccountDatastore",
"line_number": 11,
"usage_type": "call"
},
{
"a... |
39402062129 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
#
#*********************************************************************************************************
#* __ __ __ ______ __ __ _______ _______ *
#* | |--.| |.---.-..----.| |--.| __ \.---.-..-----.| |... | blackPantherOS/parallx | parallx.py | parallx.py | py | 3,403 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "gettext.install",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "parallx.ui_main.Ui_MainWindow",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "dbus.get_default_main_loop",
"line_number": 89,
"usage_type": "call"
},
{
"api_name... |
8827430581 | import sys
import time
import requests
import threading
from queue import Queue
from lxml import etree
picUrl = Queue()
def getUrl():
baseUrl = 'http://172.22.80.212'
url = 'http://172.22.80.212/PHOTO0906CET/'
res = requests.get(url=url)
content = etree.HTML(res.text)
urlList = content.xpath('//p... | riverfjs/bilibili | cetpic.py | cetpic.py | py | 1,272 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "queue.Queue",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "lxml.etree.HTML",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
"line_number... |
70550936231 | from django.db import models
from base.empresas.models import Empresa
class FamiliaProducto(models.Model):
empresa = models.ForeignKey(Empresa, on_delete=models.PROTECT)
descripcion = models.CharField(max_length=50, unique=True)
activo = models.BooleanField(default=True)
class Meta:
db_table =... | okwalluis/Django---CRM | control_stock/familias/models.py | models.py | py | 402 | python | es | code | 0 | github-code | 71 | [
{
"api_name": "django.db.models.Model",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "django.db.models.ForeignKey",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": ... |
6568363203 | import os
import time
from selenium import webdriver
import requests
from bs4 import BeautifulSoup
import credential as c
from selenium.webdriver.common.keys import Keys
import pandas as pd
import numpy as np
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from seleni... | Carissa2000/Deep_Structure | info_fetch/common_references.py | common_references.py | py | 5,815 | python | en | code | null | github-code | 71 | [
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 78,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 78,
"usage_type": "name"
},
{
"api_name": "os.path.dirname",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "o... |
39834412200 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# Created By: Roger IL Grande
# ---------------------------------------------------------------------------
"""EM-623 Final Project"""
import numpy as np
import pandas as pd
import datetime
from... | rilgrande/RNN_Energy_Price_Prediction | main.py | main.py | py | 7,556 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "seaborn.set_context",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "seaborn.set_style",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "warnings.filterwarnings",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "matplot... |
36143361156 | import streamlit as st
import pickle
import pandas as pd
import numpy as np
# Memuat objek StandardScaler dan model MLPClassifier dari file pickle
with open('scaler.pkl', 'rb') as scaler_file:
scaler = pickle.load(scaler_file)
with open('mlp_model.pkl', 'rb') as model_file:
mlp = pickle.load(model_f... | ifaa08/PSD | akurasi.py | akurasi.py | py | 2,267 | python | id | code | 0 | github-code | 71 | [
{
"api_name": "pickle.load",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "streamlit.title",
"line_n... |
22191947849 | #!/usr/bin/python3
"""
This module contains the unit tests for the Rectangle class.
"""
from io import StringIO
import sys
import unittest
from models.rectangle import Rectangle
class TestRectangle(unittest.TestCase):
"""
Defines the test cases for the Rectangle class.
"""
def test_attribute_assign... | aminelamuadni/alx-higher_level_programming | 0x0C-python-almost_a_circle/tests/test_models/test_rectangle.py | test_rectangle.py | py | 7,037 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "unittest.TestCase",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "models.rectangle.Rectangle",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "models.rectangle.Rectangle",
"line_number": 26,
"usage_type": "call"
},
{
"api_... |
30192322492 | import sys
_module = sys.modules[__name__]
del sys
cnn_with_spp = _module
spp_layer = _module
from _paritybench_helpers import _mock_config, patch_functional
from unittest.mock import mock_open, MagicMock
from torch.autograd import Function
from torch.nn import Module
import abc, collections, copy, enum, functools, in... | eladhoffer/pytorch-jit-paritybench | generated/test_yueruchen_sppnet_pytorch.py | test_yueruchen_sppnet_pytorch.py | py | 3,582 | python | en | code | null | github-code | 71 | [
{
"api_name": "sys.modules",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "_paritybench_helpers.patch_functional",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "unittest.mock.mock_open",
"line_number": 15,
"usage_type": "call"
},
{
"api... |
31470871323 | from dataclasses import dataclass
from datetime import datetime, timedelta
from decimal import Decimal
from typing import List
from django import forms
from django.db.models import QuerySet
from service_objects.fields import ModelField
from service_objects.services import Service
from finance_majordomo.stocks.models.... | Unshock/finance_majordomo | finance_majordomo/stocks/services/accrual_services/dividend_view_services.py | dividend_view_services.py | py | 5,403 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "decimal.Decimal",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "decimal.Decimal",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "decimal.Decimal",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.dat... |
38052456758 | # -*- coding: utf-8 -*-
"""
Direct Messages Archiver
Usage:
>>> from dmarchiver.core import Crawler
>>> crawler = Crawler()
>>> crawler.authenticate('username', 'password')
>>> crawler.crawl('conversation_id')
"""
import collections
import datetime
from enum import Enum
impor... | Mincka/DMArchiver | dmarchiver/core.py | core.py | py | 28,782 | python | en | code | 220 | github-code | 71 | [
{
"api_name": "requests.get",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "datetime... |
22240182145 | import numpy as np
from csv import reader
import matplotlib.pyplot as plt
import math
import copy
import DecisionTree
import RFDecisionTree
import abDecisionTree
import bonusDecisionTree
import AdaBoost
import Bagging
import RandomForest
import LMS
# Load data
trainData = DecisionTree.loadCSV('data/bank... | alecnelson22/Machine-Learning-Library | Ensemble Learning/main.py | main.py | py | 14,393 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "DecisionTree.loadCSV",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "DecisionTree.loadCSV",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "DecisionTree.setThreshold",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "D... |
18501415802 | import os
import tensorflow as tf
import tensorflow_datasets as tfds
from tensorflow.keras.callbacks import EarlyStopping, ModelCheckpoint
from tensorflow.keras.layers import Embedding, GlobalAvgPool1D, Dense
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.preprocessing.sequence import p... | vijender412/Tensorflow | code/NLP_news_topic_classification.py | NLP_news_topic_classification.py | py | 3,111 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "os.environ",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "tensorflow_datasets.load",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.array",
... |
71036593830 | from __future__ import print_function
import matplotlib
matplotlib.use('Agg')
import cv2
import matplotlib.pyplot as plt
import numpy as np
from collections import defaultdict
import os
import sys
import tensorflow as tf
import random
import warnings
warnings.filterwarnings('ignore')
from keras import backend as K
fr... | alexshakouri/Rat_Brain_Segmentation | test.py | test.py | py | 9,322 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "matplotlib.use",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "warnings.filterwarnings",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "random.seed",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "random.randint",
... |
3945720796 | import self_organizing_map
# For plotting the images
from matplotlib import pyplot as plt
import numpy as np
# Training inputs for Building a Grid
training_set = np.array(
[[0.2, 0.0],
[0.0, 0.8],
[1.0, 1.4],
[1.125, 1.0],
[1.33, 0.4],
[1.6, 0.5],
[0.0, 1.0],
[1.0, 0.4],
[1... | mmusil25/BICL | VectorizedSP/resources/SelfOrganizingMap/SOM_grid_test.py | SOM_grid_test.py | py | 1,373 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.array",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "self_organizing_map.SOM",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"lin... |
34701927255 | #儲存檔案
# file=open("data.txt",mode="w",encoding="utf-8")
# file.write("""helloworld
# 123
# abc
# 中文成功""")
# file.close()
# with open("data.txt",mode="w",encoding="utf-8") as file:
# file.write("5\n3")
#讀取檔案
# sum=0
# with open("data.txt",mode="r",encoding="utf-8") as file:
# data=file.read()
# for line in ... | chenyuan0922/python-practice | file.py | file.py | py | 700 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "json.load",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 29,
"usage_type": "call"
}
] |
748857457 | import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
years = ['2019', '2020', '2021']
values = [100, 300, 600]
x = np.arange(len(years))
# bar차트 옵션
# width : 막대 너비 (default : 0.8)
# color : 막대 색상
# linewidth : 테두리 두께
# edgecolor : 테두리 색상
# align : tick 기준 막대 위치 조절 {'edge', 'center'... | mingginew88/study-python | matplotlib/11.barChart.py | 11.barChart.py | py | 1,445 | python | ko | code | 2 | github-code | 71 | [
{
"api_name": "numpy.arange",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.bar",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot... |
72858971749 | import random
import re
import sqlite3
import asyncio
import os
import datetime
from telebot.async_telebot import AsyncTeleBot
from telebot import types
from dotenv import load_dotenv, find_dotenv
admin_id = 1900666417
load_dotenv(find_dotenv())
bot = AsyncTeleBot(os.getenv('TOKEN_BOT'))
db = sqlite3.connect('db/fna... | maruvsss/FNaF | bot.py | bot.py | py | 9,454 | python | ru | code | 0 | github-code | 71 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "dotenv.find_dotenv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "telebot.async_telebot.AsyncTeleBot",
"line_number": 14,
"usage_type": "call"
},
{
"api_name... |
36345810468 | import pandas as pd
from selenium import webdriver
# from selenium.webdriver.common.keys import keys
from time import sleep, strftime
# import SMS
from random import randint # sleep random intervals
import SMS
# create class variable
class GPUBot(object):
"""
Create selenium class to navigate to gamestop.com.... | Nnavarr/AvailabilityBot | GPU_Availability.py | GPU_Availability.py | py | 1,248 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "random.randin... |
40435344929 | import os
import tarfile
import argparse
import meta_extract.get_device_id as device
import download_data.download_videos as downloader
from meta_extract.get_highlight_flags import examine_mp4, sec2dtime
from shutil import move
ALL_METAS = [
'ACCL', 'GYRO', 'SHUT', 'WBAL', 'WRGB',
'ISOE', 'UNIF', 'FACE', 'COR... | neuroailab/BabyViewPublic | main.py | main.py | py | 5,293 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.listdir",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number"... |
32490155369 | import logging
import sys
import os
import shutil
import sys
from datetime import datetime
from functools import partial
import tensorflow as tf
from absl import flags
from actorcritic.agent import ActorCriticAgent, ACMode
from actorcritic.runner import Runner, PPORunParams
from common.multienv import SubprocVecEnv, ma... | pekaalto/sc2aibot | run_agent.py | run_agent.py | py | 5,865 | python | en | code | 90 | github-code | 71 | [
{
"api_name": "absl.flags.FLAGS",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "absl.flags",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "absl.flags.DEFINE_bool",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "absl.flags",
... |
4874055850 | """
中国国家统计局数据模块
作者:gansaihua
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pandas as pd
from datetime import date
from calendar import monthrange
from .base import get_page_response, friendly_download
HOST_URL = "http://data.stats.gov.cn/easyqu... | liudengfeng/cnswd | cnswd/websource/nbsc.py | nbsc.py | py | 5,687 | python | en | code | 7 | github-code | 71 | [
{
"api_name": "calendar.monthrange",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pandas.Timestamp",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "base.get_page_resp... |
36467879888 | from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QWidget
from personale_medico.login_personale_medico.controller import controller_lista_personale_medico
class ViewLoginPersonaleMedico(QWidget):
def __init__(self):
"""
Costruttore della classe ViewLoginPersonaleMedico, nell... | RoccoAnzivino/Clinica-Privata-Casa-Alfredo | 14.4. Codice sorgente/personale_medico/login_personale_medico/view/view_login_personale_medico.py | view_login_personale_medico.py | py | 18,097 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QLabel",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "PyQt5.Q... |
70539653031 | import os
import sys
import logging
import asyncio
from aiogram import Bot, Dispatcher, Router, F
from aiogram.fsm.context import FSMContext
from aiogram.fsm.state import State, StatesGroup
from aiogram.filters import CommandStart
from aiogram.types import ErrorEvent, Message, CallbackQuery
from gpt_connector import ... | metravod/gptishka | bot.py | bot.py | py | 6,693 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "logging.basicConfig",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "sys.stdout",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogg... |
42361231418 | import os
import sys
import numpy as np
import tensorflow as tf
from tqdm import tqdm
from utils import get_batch_data
from config import cfg
from CapsNet import CapsNet
tf.logging.set_verbosity(tf.logging.INFO)
def save_to():
if not os.path.exists(cfg.results):
os.mkdir(cfg.results)
if cfg.is_train... | LADYHR/CapsNet_for_ADNI | main.py | main.py | py | 5,384 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "tensorflow.logging.set_verbosity",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "tensorflow.logging",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 15,
"usage_type": "call"
},
{
"api_name"... |
30371417397 | # Test cloud photos
import pytest
import osxphotos
PHOTOS_DB_CLOUD = "./tests/Test-Cloud-10.15.1.photoslibrary/database/photos.db"
PHOTOS_DB_NOT_CLOUD = "./tests/Test-10.15.1.photoslibrary/database/photos.db"
UUID_DICT = {
"incloud": "37210110-E940-4227-92D3-45C40F68EB0A",
"not_incloud": "63048B89-158C-4BA7... | RhetTbull/osxphotos | tests/test_incloud_catalina_10_15_1.py | test_incloud_catalina_10_15_1.py | py | 1,327 | python | en | code | 1,417 | github-code | 71 | [
{
"api_name": "osxphotos.PhotosDB",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "osxphotos.PhotosDB",
"line_number": 51,
"usage_type": "call"
}
] |
71117363430 | # Function: utils functions
import torch
from torch import nn
import math
def time_embedding(timesteps, dim, max_period=10000):
"""
Create sinusoidal timestep embeddings.
:param timesteps: a 1-D Tensor of N indices, one per batch element.
These may be fractional.
:param dim: the... | lmn-ning/ImageFusion | FusionDiff/Condition_Noise_Predictor/__init__.py | __init__.py | py | 1,455 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "torch.exp",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "math.log",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.arange",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.float32",
"line_number": 20... |
72794339111 | """ Utility functions for data manipulation """
import pandas as pd
import numpy as np
from functools import reduce
import datetime
from sklearn.metrics.pairwise import cosine_similarity
import scipy.stats
def space_stripper(df):
df_obj = df.select_dtypes(['object'])
df[df_obj.columns] = df_obj.apply(lambda x: x.s... | CowPussy/Recommendation | src/rec_utils.py | rec_utils.py | py | 6,830 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pandas.Series",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "numpy.std",
"line_number": 90,
"usage_type": "call"
},
{
"api_name": "numpy.digitize",
"line_number"... |
42533786845 | import gym
import torch
import numpy as np
from typing import Any, Callable, Dict, List, Union, Tuple
from syllabus.curricula.plr import TaskSampler
from syllabus.core import Curriculum, UsageError, enumerate_axes
from syllabus.task_space import TaskSpace
class RolloutStorage(object):
def __init__(self, num_step... | RyanNavillus/Syllabus | syllabus/curricula/plr/plr_wrapper.py | plr_wrapper.py | py | 9,230 | python | en | code | 10 | github-code | 71 | [
{
"api_name": "gym.Space",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.zeros",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "torch.int",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "torch.ones",
"line_numb... |
33608485302 | """
The sensor module contains classes to define point or camera sensors
that can either be stationary and mobile.
.. rubric:: Contents
.. autosummary::
Sensor
Position
Stationary
Mobile
Detector
Point
Camera
"""
from __future__ import print_function, division
import pandas as pd
import n... | sandialabs/chama | chama/sensors.py | sensors.py | py | 27,551 | python | en | code | 52 | github-code | 71 | [
{
"api_name": "numpy.array",
"line_number": 146,
"usage_type": "call"
},
{
"api_name": "numpy.linalg.norm",
"line_number": 153,
"usage_type": "call"
},
{
"api_name": "numpy.linalg",
"line_number": 153,
"usage_type": "attribute"
},
{
"api_name": "pandas.Series",
... |
34569694933 | # -*- coding: utf-8 -*-
"""
Created on Fri Apr 5 19:05:53 2019
@author: User
"""
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 19 15:25:50 2019
@author: Joan
This program adds all the words in an Amazon review to 2 dictionaries (Good and Bad).
"""
import time
import csv
import json
import re
from collections imp... | JoanJong/CE9010-Project | create_and_clean_dicts.py | create_and_clean_dicts.py | py | 2,420 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "time.time",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"l... |
15058839789 | import math
import cv2
import time
import numpy
import numpy as np
import HandsTracking as ht
from ctypes import cast, POINTER
from comtypes import CLSCTX_ALL
from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume
videocap=cv2.VideoCapture(0)
prevtime=0
detector=ht.HandDetection()
devices = AudioUtilit... | piyushkp03/VolumeControl | VolumeControl.py | VolumeControl.py | py | 1,589 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "HandsTracking.HandDetection",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pycaw.pycaw.AudioUtilities.GetSpeakers",
"line_number": 24,
"usage_type": "call"
},
{
... |
75133907749 | from botocore.exceptions import BotoCoreError, ClientError
from fastapi.requests import Request
from fastapi.responses import JSONResponse
from sqlalchemy.exc import DBAPIError, SQLAlchemyError
from .crud import database_logger
class NoSuchBucket(Exception):
"""Custom exception that will be raised if minio bucke... | DSkrubber/Async_FastAPI_webpage_info_parser_with_minio | web/app/errors.py | errors.py | py | 1,513 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "fastapi.requests.Request",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.exc.SQLAlchemyError",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "crud.database_logger.error",
"line_number": 19,
"usage_type": "call"
},
{
... |
72658200871 | from django.urls import path
from . import views
app_name = 'blog'
urlpatterns = [
path('', views.post_list, name='post_list'),
# path('', views.PostListView.as_view(), name='post_list'),
path('<int:year>/<int:month>/<int:day>/<slug:post>/', views.post_detail, name='post_detail'),
path('category/<int:... | freewalker1985/mysite | blog/urls.py | urls.py | py | 537 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
37507088752 | from Volley.genetics import SuperGene
import matplotlib.pyplot as plt
class FitnessFunction:
def __init__(self, function, super_genes: list[SuperGene], start_kill=1, kill_percent_reduce = .1):
self.start_kill = start_kill
self.function = function
self.super_genes = super_genes
... | dadukhankevin/Volley | fitness.py | fitness.py | py | 1,068 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "Volley.genetics.SuperGene",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "mat... |
10906789815 | #Importa a biblioteca
import folium
#Cria o mapa base
map = folium.Map(location=[-20.807382,-49.360453], zoom_start = 10)
#Multiplos marcadores
for coordinates in [[-20.800385, -49.367797],[-20.800154, -49.368665]]:
folium.Marker(location=coordinates, icon=folium.Icon(color = 'green')).add_to(map)
#Salva o mapa
... | technotebrasil/mapa_folium | geo.py | geo.py | py | 342 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "folium.Map",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "folium.Marker",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "folium.Icon",
"line_number": 9,
"usage_type": "call"
}
] |
29352528695 | from fastapi import APIRouter, HTTPException, Depends
from utils.mongo_utils import register_user
from utils.enums import Register
from validations.register_validator import UserRegistrationRequest
from utils.rate_limiter import register_limiter, init_rate_limiter
router = APIRouter()
@router.post("/user-register", s... | chamuditharav/Fast-api-basic-backend | routers/user/register.py | register.py | py | 1,190 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "validations.register_validator.UserRegistrationRequest",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "utils.mongo_utils.register_user",
"line_number": 12,
"usage_type"... |
22415911684 | from typing import Tuple
import click
from pipelime.pipes.piper import Piper, PiperCommand
@click.command("smart_converter", help="Converts Subfolders to Underfolder")
@click.option("-i", "--input_folder", required=True, type=str, help="Input H5 Filename")
@click.option(
"-o", "--output_folder", required=True, ty... | eyecan-ai/pipelime | pipelime/cli/conversions/smart_converter.py | smart_converter.py | py | 1,066 | python | en | code | 9 | github-code | 71 | [
{
"api_name": "pipelime.converters.smartconverter.SmartConverter",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "rich.print",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "click.command",
"line_number": 6,
"usage_type": "call"
},
{
"api_nam... |
24583992603 | from typing import List
class Solution:
def flipAndInvertImage(self, image: List[List[int]]) -> List[List[int]]:
row_size = len(image)
col_size = len(image[0])
for r in range(row_size):
for c in range(col_size // 2):
image[r][c], image[r][col_size - c - 1] = ima... | brandoneng000/LeetCode | easy/832.py | 832.py | py | 724 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
}
] |
40050161143 | from django.db import models
from cloudinary.models import CloudinaryField
class Category(models.Model):
class Meta(object):
db_table = 'category'
verbose_name_plural = "Categories"
name = models.CharField(
'Name', blank=False, null=False, max_length=200, db_index=True
)
image ... | ekrishnakishor/hivetechwear-project-ecommerce | backend/apps/categories/models.py | models.py | py | 635 | python | en | code | 8 | github-code | 71 | [
{
"api_name": "django.db.models.Model",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "... |
29909778334 | import matplotlib.pyplot as plt
import matplotlib as mpl
import matplotlib.gridspec as gridspec
def setup_axes(m=4, n=5, colorbar=True, title='', figsize=(15, 7)):
fig = plt.figure(figsize=figsize)
gs = gridspec.GridSpec(m, n, left=0.05, bottom=0.1, top=0.95, right=0.98,
figure=fig, wspac... | TianlaiProject/fpipe | fpipe/utils/axes_utils.py | axes_utils.py | py | 1,233 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "matplotlib.gridspec.GridSpec",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "... |
70981650790 | # Programmer: limodou
# E-mail: limodou@gmail.coms
#
# Copyleft 2006 limodou
#
# Distributed under the terms of the GPL (GNU Public License)
#
# UliPad is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Fou... | limodou/ulipad | mixins/mDirBrowser.py | mDirBrowser.py | py | 6,129 | python | en | code | 242 | github-code | 71 | [
{
"api_name": "wx.ITEM_CHECK",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "modules.Mixin.setPlugin",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "modules.Mixin",
"line_number": 39,
"usage_type": "name"
},
{
"api_name": "wx.EVT_UPDAT... |
1439098010 | import datetime
import os
import time
import cv2
import ffmpeg
import numpy as np
# filepath = "vtest.avi"
# cap = cv2.VideoCapture(filepath)
# Webカメラを使うときはこちら
cap = cv2.VideoCapture(0)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1280)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 720)
avg = None
_, frame = cap.read()
# 動体検知参考資料
# htt... | Takahiro55555/motion-recorder-playground | recorder.py | recorder.py | py | 3,098 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_PROP_FRAME_WIDTH",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "cv2.CAP_PROP_FRAME_HEIGHT",
"line_number": 13,
"usage_type": "attribute"
},
{
"api... |
75058731749 | import numpy as np
import time
import torch
import torch.nn as nn
import torch.optim as optim
from .expt_template import Base
from .utilities import MaxPool1dFixed
device = "cuda" if torch.cuda.is_available() else "cpu"
class MLP_1_hidden(nn.Module):
def __init__(self, input_size = 1024, hidden_size = 512):
... | bdevnani3/vis_lang | efficient_finetuning/prompt_engineer/models/mlp.py | mlp.py | py | 6,205 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "torch.cuda.is_available",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Module",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.nn... |
11768781576 | import pandas as pd
from car import Car
from selenium import webdriver
from selenium.webdriver.common.by import By
from time import *
from utils import only_numbers
from xpath import Xpath
def main():
xpath=Xpath()
webd_path = 'chromedriver.exe'
driver = webdriver.Chrome(webd_path)
driver.get('https:... | XDesiek/cars_scrap | main.py | main.py | py | 3,427 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "xpath.Xpath",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "selenium.web... |
11250450863 | from typing import List, Optional, Tuple, Iterable
from dataclasses import dataclass
__pdoc__ = {
"EntitieErrorInfo.__init__": False,
"GetEntitiesError.__init__": False,
}
@dataclass(init=False)
class EntityErrorInfo:
"""
Represents a failed entity retrieval.
"""
__slots__ = ("name", "error_... | macrobond/macrobond-data-api | macrobond_data_api/common/types/get_entity_error.py | get_entity_error.py | py | 1,436 | python | en | code | 7 | github-code | 71 | [
{
"api_name": "dataclasses.dataclass",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "typing.Iterable",
"... |
11395928747 | #-*- coding:utf-8 -*-
#CREATER: ShenAo
from concurrent.futures import thread
from numpy import percentile
import CORE_download
from CORE_upload import Upload
import NTG_base
import Total_Seeting
import func_other
import func_ui
import time
import re
import json
import base64
import os
import random... | shenao1100/Baidu_Netdisk_thirdpart | code/CORE_GetInfo.py | CORE_GetInfo.py | py | 73,164 | python | en | code | 9 | github-code | 71 | [
{
"api_name": "os.popen",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 67,
"usage_type": "call"
},
{
"api_name": "re.I",
"line_number": 67,
"usage_type": "attribute"
},
{
"api_name": "time.time",
"line_number": 70,
... |
36730811430 | from django import template
from django.db.models import Max
register = template.Library()
@register.simple_tag
def get_primary_item(order):
"""
Find the most expensive item in an order for
displaying in user account order history
"""
highest_price = order.lineitems.all().aggregate(Max("lineitem_t... | cjcon90/the_rhythm_box | accounts/templatetags/account_tags.py | account_tags.py | py | 834 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.template.Library",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "django.template",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "django.db.models.Max",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.db.... |
27350775863 | import sys
import os
import logging
import math
from functools import wraps
from flask import request, jsonify
from os import path
from datetime import datetime
from pathlib import Path
import uuid
import logging
from .model_file_manager import load_for_shared_mem, get_model_file_info, load_model, store_model
from .db_... | lenskit/lk-rec-server | lkweb/model_manager.py | model_manager.py | py | 7,441 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "os.path.exists",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "logging.info",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.utcfromtimestam... |
42522938079 | # coding: utf-8
import os
import sys
import re
import glob
import fnmatch
from subprocess import Popen, PIPE
thisdir = os.path.dirname(os.path.abspath(__file__))
dcache_mount = "/pnfs/desy.de/cms/tier2/store/user/{user}/hbt_resonant_run2/HHNtuples"
sample_kinds = {
"background": {"user": "tokramer", "campaign_... | skeshri/KLUBAnalysis | scripts/makeListOnStorage_uhh.py | makeListOnStorage_uhh.py | py | 5,583 | python | en | code | null | github-code | 71 | [
{
"api_name": "os.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_n... |
34626564216 | import simplejson as json
from flask import Response, url_for
from flask import render_template, request, current_app
from flask_babel import gettext
from flask_security import login_required
from pgadmin.browser.server_groups.servers.utils import parse_priv_to_db
from pgadmin.utils import PgAdminModule
from pgadmin.ut... | luvres/armhf | pgadmin/pgadmin4/web/pgadmin/tools/grant_wizard/__init__.py | __init__.py | py | 14,734 | python | en | code | 8 | github-code | 71 | [
{
"api_name": "pgadmin.utils.PgAdminModule",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "flask.url_for",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "flask.url_for",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "flask.url_for... |
748897807 | import requests
import pandas as pd
from bs4 import BeautifulSoup
import openpyxl
from datetime import datetime
## 크롤링 할 페이지
req = requests.get('https://finance.naver.com/sise/sise_market_sum.nhn?&page=1')
## HTML 코드 저장
html = req.text
## BeautifulSoup으로 html소스를 python 객체로 변환
## 첫 인자 : html소스코드
## 두 번째 인자 : parser 종... | mingginew88/study-python | stock/crawlingStockData.py | crawlingStockData.py | py | 1,424 | python | ko | code | 2 | github-code | 71 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.toda... |
74605468708 | import numpy as np
from sklearn import metrics
from ogb.nodeproppred import Evaluator as Evaluator_n
from ogb.linkproppred import Evaluator as Evaluator_l
import warnings
from sklearn.exceptions import UndefinedMetricWarning
warnings.filterwarnings(action='ignore', category=UndefinedMetricWarning)
METRICS = {
'f1... | facebookresearch/shaDow_GNN | shaDow/metric.py | metric.py | py | 6,110 | python | en | code | 129 | github-code | 71 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sklearn.exceptions.UndefinedMetricWarning",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "ogb.nodeproppred.Evaluator",
"line_number": 41,
"usage_type": "call"
},... |
30192419332 | import sys
_module = sys.modules[__name__]
del sys
SRPN = _module
axis = _module
data_otb = _module
download = _module
test_otb = _module
train = _module
video2pic = _module
from _paritybench_helpers import _mock_config, patch_functional
from unittest.mock import mock_open, MagicMock
from torch.autograd import Functio... | eladhoffer/pytorch-jit-paritybench | generated/test_zkisthebest_Siamese_RPN.py | test_zkisthebest_Siamese_RPN.py | py | 5,339 | python | en | code | null | github-code | 71 | [
{
"api_name": "sys.modules",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "_paritybench_helpers.patch_functional",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "unittest.mock.mock_open",
"line_number": 20,
"usage_type": "call"
},
{
"api... |
7323545725 | from django.db import models
from backend.coremodels.article import Article
from backend.coremodels.order import Order
from backend.operations.enumerator import OrderedUnitOperator
class OrderedArticle(models.Model):
'''Order.'''
id = models.AutoField(primary_key=True)
quantity = models.PositiveIntegerFie... | AxelJnsson/TDDC88-Software-Engineering | Web/backend/coremodels/ordered_article.py | ordered_article.py | py | 788 | python | en | code | 0 | github-code | 71 | [
{
"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": 9,
"usage_type": "call"
},
{
"api_name": "... |
1520596936 |
from typing import BinaryIO, List, Optional, Tuple, Union
from pathlib import Path
from PIL import Image
import cv2
IMAGE_FILE_EXTENSIONS = {".jpg", ".png"}
def parse_path(path: str) -> Tuple[str, List[int]]:
"""Parse data path which is a path to a .jpg/.png file
Args:
path (str): ... | nlpdl/fairseq | fairseq/data/image_utils.py | image_utils.py | py | 1,055 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pathlib.Path",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "typing.Tuple",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "cv2.resize",
"line_number":... |
6009303283 | import pytest
from ephios.core.forms.users import MANAGEMENT_PERMISSIONS
from ephios.extra.permissions import get_groups_with_perms
def test_querying_get_groups_with_perms(groups, event):
managers, planners, volunteers = groups
groups_with_any_perm = get_groups_with_perms(
event,
only_with_p... | ephios-dev/ephios | tests/extra/test_permissions.py | test_permissions.py | py | 1,285 | python | en | code | 20 | github-code | 71 | [
{
"api_name": "ephios.extra.permissions.get_groups_with_perms",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "ephios.extra.permissions.get_groups_with_perms",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "ephios.extra.permissions.get_groups_with_perms",
... |
44398941478 | # -*- coding: utf-8 -*-
import json
import datetime
import pytz
__version__ = '0.0.1'
__all__ = [
'dumps', 'loads',
]
__author__ = 'KAWASAKI Yasukazu <kawasaki@dev.kawa1128.jp>'
class _NNE4FineJsonEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, datetime.datetime):
if obj.tzinf... | Python3pkg/PyJSONConfigParser | src/JSONConfigParser.py | JSONConfigParser.py | py | 1,151 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "json.JSONEncoder",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "pytz.utc",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "pytz.utc",... |
10964909865 | import numpy as np
from collections import defaultdict
class RecommenderEvaluator(object):
def __init__(self, rating_data_test, predicted_ratings, dataset):
self._prepare_results_data(dataset, rating_data_test, predicted_ratings)
def _prepare_results_data(self, dataset, rating_data_test, predicted_ra... | lovro14/RecommenderSystems | evaluator/recommender_evaluator.py | recommender_evaluator.py | py | 2,463 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "numpy.round",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.mean",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.power",
"line_number": 21... |
31329837503 | #!/usr/bin/env python3
import argparse
import os
import queue
import sounddevice as sd
import vosk
import sys
#import socket
#import ssl
q = queue.Queue()
def int_or_str(text):
"""Helper function for argument parsing."""
try:
return int(text)
except ValueError:
return text
def callback(i... | Cyborgscode/Personal-Voice-Assistent | pva.py | pva.py | py | 3,771 | python | en | code | 136 | github-code | 71 | [
{
"api_name": "queue.Queue",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "sounddevice.query... |
72886642789 | import cv2
import os
import pandas as pd
import matplotlib.pyplot as plt
import tqdm
from tqdm import tqdm
import numpy as np
import pytesseract
import subprocess
# useful objects
directory = '/Users/IvanK/NFL/VideoData'
os.chdir(directory)
pytesseract.pytesseract.tesseract_cmd = (r'/Users/IvanK/tesseract/tesseract... | ikleni/sample_codes | using_tesseract_to_extract_digits.py | using_tesseract_to_extract_digits.py | py | 11,594 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.chdir",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pytesseract.pytesseract",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "cv2.imread",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "cv2.IMREAD_UNCHANGED... |
28441094740 | from bs4 import BeautifulSoup
from elasticsearch import Elasticsearch
from pdfminer.converter import PDFPageAggregator
from pdfminer.layout import LAParams, LTTextBox, LTTextLine
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.pdfparser import PDFParser, PDFDocument
import datetime
i... | NokeCodes/community-minutes | community_minutes/sync_minutes.py | sync_minutes.py | py | 5,344 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "requests.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pdfminer.pdfparser.PDFParser",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "pdfminer.... |
7522613797 | import dash
from dash import html
from dash import dcc
from dash.dependencies import Input, Output
import plotly.graph_objects as go
import plotly.express as px
import pandas as pd
from pathlib import Path
app = dash.Dash(__name__, external_stylesheets=["https://codepen.io/chriddyp/pen/bWLwgP.css"])
server = app.serve... | LanaTch/dash-tchobanou | games_market_dash_Svetlana_Tchobanou.py | games_market_dash_Svetlana_Tchobanou.py | py | 5,791 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "dash.Dash",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "dash.dcc.RangeSlider",
"li... |
26056393782 | """Execution code for address processing."""
import argparse
import datetime
import logging
import os
import arcetl
from etlassist.pipeline import Job, execute_pipeline
from helper.communicate import send_email
from helper import dataset
from helper.misc import address_intid_to_uuid_map
from helper import... | denkide/ColumbiaCarto | Library/CPA_ETL/scripts/exec_address_datasets.py | exec_address_datasets.py | py | 41,531 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "arcetl.attributes.as_iters",
"line_number": 113,
"usage_type": "call"
},
{
"api_name": "arcetl.attributes",
"line_number": 113,
"usage_type": "attribute"
},
{
"api_name": ... |
5511077439 | from TAScheduler.models import Course, User, UserType
from typing import Optional, Union, Type, Iterable
import more_itertools
class CourseAPI:
@staticmethod
def create_course(code: str, name: str) -> Union[int, TypeError]:
"""
Creates a course by taking a code and name with admin log, raises... | tzortzos/361proj | TAScheduler/ClassDesign/CourseAPI.py | CourseAPI.py | py | 1,873 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "TAScheduler.models.Course.objects.create",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "TAScheduler.models.Course.objects",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "TAScheduler.models.Course",
"line_number": 16,
"usage_typ... |
27956953994 | """
The File Upload application is designed to allow the management of files
associated with submissions. This can be used to upload new files, manage
URLs of existing files, and delete files.
"""
from collections import namedtuple
import json
import logging
from django.db import IntegrityError
from django.utils.func... | openedx/edx-ora2 | openassessment/fileupload/api.py | api.py | py | 23,578 | python | en | code | 57 | github-code | 70 | [
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "openassessment.assessment.models.base.SharedFileUpload.by_key",
"line_number": 89,
"usage_type": "call"
},
{
"api_name": "openassessment.assessment.models.base.SharedFileUpload",
"lin... |
753331015 | """ Boyuan Chen:
This file quickly trims a data file to your desired data range. You can use it either on raw data file, or processed
data file.
"""
import pandas as pd
import argparse
parser = argparse.ArgumentParser(description='Semantic Scan args parser')
parser.add_argument('--input_file', type=str, default="../... | danielbneill/pre-syndromic-surveillance | MUSES Open Source Software Code/preprocessing/data_compressor.py | data_compressor.py | py | 2,575 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pandas.to_datetime",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "pandas.set_... |
33997349098 | from .models import Lista
from rest_framework import serializers
from .models import Item
class ItemSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Item
fields = ['name', 'list', 'comprado', 'url']
class ListaSerializer(serializers.HyperlinkedModelSerializer):
item_se... | Rodrigodante11/django-react-backend | core/serializers.py | serializers.py | py | 447 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "rest_framework.serializers.HyperlinkedModelSerializer",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "models.Item",
"line_number": 8,
"usage_type": "name"
... |
29731162315 | # 로그 남기기
import logging
from datetime import datetime
# logging.basicConfig(level=logging.DEBUG, format="%(asctime)s [%(levelname)s] %(message)s")
#
# logging.debug("아 이거 누가 짠거야~~")
# logging.info("자동화 수행 준비")
# logging.warning("이 스크립트는 오래 되었습니다.")
# logging.error("에러 발생")
# logging.critical("치명적인 문제")
# 터미널과 파일에 함께 ... | MeisterTJ/nadocoding-python | rpa_basic/2_desktop/10_log.py | 10_log.py | py | 1,155 | python | ko | code | 0 | github-code | 70 | [
{
"api_name": "logging.Formatter",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "logging.Stream... |
21968190961 | from statistics import mode
from unittest import result
from flask import Flask, render_template, request
import pickle
import numpy as np
import sys
app = Flask(__name__)
model = pickle.load(open('model.tflite', 'rb'))
@app.route("/")
def home():
return render_template("index.html")
@app.route("/predict", me... | shaahu1/0dayAttackDetector | app.py | app.py | py | 872 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pickle.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "flask.request.form.value... |
73983423589 | from datetime import datetime
from uuid import uuid4
from sqlalchemy import Column, DateTime, String
from sqlalchemy.sql import expression as sql
from db import Base
class User(Base):
__tablename__ = "users"
id = Column(String, primary_key=True)
full_name = Column(String)
created_at = Column(DateTim... | nf1s/fastapi_sqlalchemy2.0 | models.py | models.py | py | 1,975 | python | en | code | 5 | github-code | 71 | [
{
"api_name": "db.Base",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.String",
"line_number": 12,
"usage_type": "argument"
},
{
"api_name": "sqlalchemy.Column",
... |
16724105866 | from flask import Blueprint
from project import db
from project.Categories.models import Categories
"""
in this file we are defining the Categories blue print setting & wrote all the end points that related to Categories
"""
categories = Blueprint('categories', __name__, static_folder='static')
#display Categories:
... | shirepsh/store_rest_api_flask | project/Categories/views.py | views.py | py | 968 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "flask.Blueprint",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "project.Categories.models.Categories.query.all",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "project.Categories.models.Categories.query",
"line_number": 16,
"usage_type... |
14918099080 | from flask import request
from xivo_dao.alchemy.callfiltermember import Callfiltermember as CallFilterMember
from xivo_dao.helpers import errors
from xivo_dao.helpers.exception import NotFoundError
from wazo_confd.auth import required_acl
from wazo_confd.helpers.restful import ConfdResource
from .schema import CallF... | wazo-platform/wazo-confd | wazo_confd/plugins/call_filter_user/resource.py | resource.py | py | 3,081 | python | en | code | 9 | github-code | 71 | [
{
"api_name": "wazo_confd.helpers.restful.ConfdResource",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "schema.CallFilterRecipientUsersSchema",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "flask.request.get_json",
"line_number": 28,
"usage_type": ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.