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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6862975559 | import os
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
import tensorflow as tf
from tensorflow.keras import backend as K
from tensorflow.keras.optimizers import Adam
from losses import triple_loss, euclidean_dist
from generate_dataset import show_image
import numpy as np
import ra... | dwij2212/face-recognition | scripts/siamese_net.py | siamese_net.py | py | 3,920 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.environ",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.keras.backend.set_image_data_format",
"line_number": 18,
"usage_type": "attribute"
},
{
... |
26409258174 | import cv2
import numpy as np
import math
cap = cv2.VideoCapture(0)
def nothing():
pass
cv2.namedWindow('original')
cv2.createTrackbar('h_min', 'original', 0, 180, nothing)
cv2.createTrackbar('h_max', 'original', 0, 180, nothing)
cv2.createTrackbar('s_min', 'original', 0, 255, nothing)
cv2.createTrackbar('s_ma... | dsponer/opencv_lesson_two | color_space_contours.py | color_space_contours.py | py | 3,156 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.namedWindow",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.createTrackbar",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.createTrackbar... |
24645460146 | """
This module should contain your main project pipeline(s).
Whilst the pipeline may change during the analysis phases, any more stable pipeline should be implemented here so
that it can be reused and easily reproduced.
"""
# This must be set in the beggining because in model_util, we import it
logger_name = "FCRN-BI... | aleksei-mashlakov/fcrn-bidding | src/fcrn_bidding/train_models.py | train_models.py | py | 2,246 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "proxy.Proxy",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "yaml.full_load",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "MsgLog.LogInit",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_nu... |
15297298404 | import logging
import psycopg2
from telegram import Update, ForceReply, ReplyKeyboardMarkup, KeyboardButton
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackContext
from fuzzywuzzy import fuzz
from fuzzywuzzy import process
# Инициализация логгера
logging.basicConfig(format='%... | Vadbond007/Bot | ChatBot_TheVaper.py | ChatBot_TheVaper.py | py | 18,477 | python | ru | code | 0 | github-code | 1 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "psycopg2.connect",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "telegram.ext.Upd... |
6550887142 | #!/usr/bin/env python2
import numpy as np
import cv2
import dlib
from imutils import face_utils
class FaceLandmarksFinder(object):
def __init__(self):
# Pre-trained model from dlib, will use this and
# then extract the landmarks we are interested in
p = "../shape_predictor_68_face_landmar... | Aboushady/Intelligent-Interactive-Systems---Computer-Vision | final/cv_group.py | cv_group.py | py | 3,825 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "dlib.get_frontal_face_detector",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "dlib.shape_predictor",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.asanyarray",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "... |
16619218295 | """ logging things """
import logging
logging.basicConfig(
level=logging.INFO,
format="[%(asctime)s - %(levelname)s] - %(name)s - %(message)s",
datefmt="%d-%b-%y %H:%M:%S",
handlers=[
logging.StreamHandler()
]
)
def LOGGER(name: str) -> logging.Logger:
""" get a Logger object """
... | TelegramPlayGround/jw | jw.py | jw.py | py | 3,901 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.basicConfig",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "logging.StreamHandler",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.get... |
29055986749 | from random import randint
from termcolor import cprint
class Сreation:
def __init__(self, name):
self.name = name
self.fullness = 10
self.house = None
class Man(Сreation):
def __init__(self, name):
super().__init__(name=name)
self.happiness = 10
def __str__... | Vladimir-82/code_wars_4 | people_and_cat_live.py | people_and_cat_live.py | py | 4,142 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "termcolor.cprint",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "termcolor.cprint",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "termcolor.cprint",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "random.randint",
... |
33931076345 | # 1001
print('Hello')
# 1002
print('Hello World')
# 1003
print('Hello')
print('World')
# 1004
print("'Hello'")
# 1005
print('"Hello World"')
# 1006
print('"!@#$%^&*()"')
# 1007
print('"C:\Download\hello.cpp"')
# 1008
import io, sys
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding... | progjs/coding_test | codeup100.py | codeup100.py | py | 9,731 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.stdout",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "io.TextIOWrapper",
"line_number": 25,
"usage_type": "call"
}
] |
73373964513 | from flask_shop.user import user_bp, user_api
from flask_shop import db, modles
from flask import request
import re
from flask_restful import Resource, reqparse
from flask_shop.utils.token import generate_token, verify_token, login_required
"""
get() 这是个比较特殊的方法。它用于根据主键来返回查询结果,因此它有个参数就是要查询的对象的主键。如果没有该主键的结果返回 None ,否则返回... | xixuan35/VueFlaskPrograms | Flask_Shop/flask_shop/user/views.py | views.py | py | 7,644 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "flask_shop.user.user_bp.route",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "flask_shop.user.user_bp",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "flask.request.get_json",
"line_number": 27,
"usage_type": "call"
},
{
"api_... |
36368184243 | """Demonstration of read an energy config file saved by
https://github.com/xray-imaging/energy2bm in a dictionary
"""
import pickle
import json
import numpy as np
import yaml # pyyaml package name
import toml
def main():
full_file_name0 = 'energy2bm_18.conf'
full_file_name1 = 'energy2bm_20.conf'
inter... | decarlof/sandbox | json/energy_config_interpolate.py | energy_config_interpolate.py | py | 7,906 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.linspace",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.linspace",
"li... |
73498488672 | import torch
import time
from collections import OrderedDict
from torch import nn, optim
from torchvision import models
from utility_functions import process_image
def create_new_model(arch, hidden_units):
'''Function loads new pretrained CNN model (tourch.modules), freezes its parameters
and creates new cla... | alexlyss/udacity_rep | AIProgrammingWithPythonNanodegre/FinalProject/model_functions.py | model_functions.py | py | 5,191 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "torchvision.models",
"line_number": 23,
"usage_type": "argument"
},
{
"api_name": "torch.nn.Sequential",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "collections.Order... |
15697686246 | from django.urls import path
from . import views
urlpatterns = [
path('client/<str:pk>', views.client , name="client"),
path('about/', views.about),
path('', views.home , name="home"),
path('book/', views.boook , name="book"),
path('create', views.create , name="create"),
path('update/<str... | KHALIL2309/cabinet-medical-modification2 | cabinetMedical/urls.py | urls.py | py | 419 | python | en | code | 0 | 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",
... |
30705952137 | from __future__ import annotations
import numpy as np
from .utilities import vensim_name_to_identifier
from pysd.translators.structures.abstract_model import AbstractModel, AbstractSection
from pysd.translators.structures.abstract_expressions import IntegStructure, LookupsStructure, DataStructure
from pysd.translator... | Data4DM/stanify | stanify/builders/vensim_model.py | vensim_model.py | py | 10,792 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "dataclasses.field",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "dataclasses.field",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "dataclasses.field",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "dataclasses.fie... |
10218524773 | #Import-Anweisungen
import snscrape.modules.twitter as twitterscraper
import pandas as pd
#Twitter-Account und Start-Datum für Scraping festlegen
twitter_account = 'HSGStGallen'
start_date = '2015-01-01'
#Leere Liste für die Tweets erstellen
tweets_list = []
#Loop durch die Tweets mit snscrape und zur erstellten Lis... | ThesisCoacher/Data2DollarFS23 | 04_Abgabe Bonuspunkte/SimonettaFrancesco.py | SimonettaFrancesco.py | py | 813 | python | de | code | 3 | github-code | 1 | [
{
"api_name": "snscrape.modules.twitter.TwitterSearchScraper",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "snscrape.modules.twitter",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "pandas.DataFrame",
"line_number": 22,
"usage_type": "call"
}
] |
25067663712 | import pytest
import os
from pathlib import Path
import config
def test_output_dir_exists():
assert Path(config.OUTPUT_DIR).exists()
def test_output_dir_writable():
assert os.access(config.OUTPUT_DIR, os.W_OK)
def test_output_subdirectory():
"""check if all the sub-dirs exist, if not create them"""
... | regevti/Pogona_Pursuit | Arena/tests/test_output_dir.py | test_output_dir.py | py | 553 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "config.OUTPUT_DIR",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.access",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "config.OUTPUT_DIR",
"... |
30743913243 | from time import time
import scipy.io as sio
import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA as sklearnPCA
from sklearn.decomposition import SparsePCA
import sys,os
from pcp_outliers import pcp
iter =0
os.chdir('/home/niharika-shimona/Documents/Projects/Autism_Network/code/Datas... | Niharika-SD/Dimensionality-Reduction | Connections_PCA.py | Connections_PCA.py | py | 1,673 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.chdir",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "scipy.io.loadmat",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "scipy.io",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "numpy.concatenate",
"line_numb... |
2534236 | import scrapy
from ..items import MlcrawlerItem
class MlSpider(scrapy.Spider):
name = 'ml'
start_urls = ['https://www.mercadolivre.com.br/ofertas?page=1']
def parse(self, response, **kwargs):
url = response.xpath('//a[contains(text(),"Alimentos e Bebidas")]/@href').get()
yield scrapy.Requ... | marciobrandstatterprof/ml-crawler | src/mlcrawler/spiders/ml.py | ml.py | py | 1,794 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "scrapy.Spider",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "scrapy.Request",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "scrapy.Request",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "items.MlcrawlerItem",... |
73577565155 | import requests
from bs4 import BeautifulSoup
import pandas as pd
url="https://www.ptt.cc/bbs/NBA/index.html"
#在headers中加入User-Agent參數模仿瀏覽器搜尋網站
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36'}
response = requests.get(url,headers... | HuangJoseph710/WebCrawler_practice | ptt_nba/ptt_nba_excel.py | ptt_nba_excel.py | py | 1,139 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 38,
"usage_type": "call"
}
] |
42088014549 | #! /usr/bin/env python
import os
import sys
import argparse
import serial
import ctypes
import random
import multiprocessing
import rospy
import numpy as np
import time
import csv
from math import pi
from math import sin, cos
import datetime as dt
from kortex_driver.srv import *
from kortex_driver.msg import *
from se... | kracon7/drive_gen3 | scripts/autonomous_action_pub.py | autonomous_action_pub.py | py | 4,786 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "numpy.array",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.random.choice",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 38,
"usage_type": "attribute"
},
{
"api_name": "numpy.arange",
... |
26482348081 | # -*- coding: utf8 -*-
import telegram
import configparser
from handlers import Handlers
from loguru import logger
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
class ChrisBot:
def __init__(self, configfile):
self.__InitBot(configfile)
self.Addservices()
def __Init... | BourneXu/ChrisBot | ChrisBot.py | ChrisBot.py | py | 1,656 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "configparser.ConfigParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "telegram.ext.Updater",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "loguru.logger.info",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "log... |
39999052014 | import modulefinder
import git
import yaml
import sys
import os
import fnmatch
import pprint
########################################################################
class Versions(object):
""""""
#----------------------------------------------------------------------
def __init__(self, scriptfname):
... | cbernet/heppy | heppy/utils/versions.py | versions.py | py | 1,986 | python | en | code | 9 | github-code | 1 | [
{
"api_name": "sys.path",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "modulefinder.ModuleFinder",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "git.Repo",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "git.InvalidGitReposi... |
69860094434 | #!/usr/bin/python3
import json
import datetime
import uuid
from models import storage
class BaseModel:
def __init__(self, *args, **kwargs):
if kwargs:
for key, value in kwargs:
if key == "__class__":
continue
if key in ["created_at", "updated... | Tboy54321/trials | hbnb/models/base_model.py | base_model.py | py | 1,518 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "datetime.datetime.strftime",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "uuid.uuid4",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "datetime... |
18273570891 | import torch.nn as nn
from torch.hub import load_state_dict_from_url
import torch
from model.utils import Normalize
from torch.nn.parameter import Parameter
from model.se_resnet import se_resnet_18
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152', 'resnext50_32x4d', ... | SJTUBME-QianLab/Dual-transformation | model/resnet.py | resnet.py | py | 20,984 | python | en | code | 6 | github-code | 1 | [
{
"api_name": "torch.nn.Conv2d",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number"... |
8876634332 | """
FILE: reg_test.py
LAST MODIFIED: 17-04-2017
DESCRIPTION:
Radial Basis Function non-rigid registration of point clouds
===============================================================================
This file is part of GIAS2. (https://bitbucket.org/jangle/gias2)
This Source Code Form is subject to the terms of t... | musculoskeletal/gias2 | dev/rbfreg/reg_test.py | reg_test.py | py | 11,191 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "RBF.RBFComponentsField",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "scipy.spatial.cKDTree",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "scipy.spatial.cKDTree",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "nu... |
35876387514 | from django.db import models
from django.contrib.auth.models import User
from PIL import Image
from django.utils.translation import gettext_lazy as _
# Create your models here.
# I'm using "pillow" which is a library for working with images within python
# I can add other additional fields for info like bio and stuff... | PeterMarchev/MedHelp | users/models.py | models.py | py | 2,734 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.db.models.Model",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "django.db.models.OneToOneField",
"line_number": 13,
"usage_type": "call"
},
{
"api_n... |
24797792076 | from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
import csv, os
import pandas as pd
from datetime import datetime as dt
import re
from statistics import mean, median, variance, stdev
import matplotlib.animation as animation
import myErrors
from myUtils import CSVListIn
def ... | isseikz/BitTrader | visualizer.py | visualizer.py | py | 16,360 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "numpy.arange",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "numpy.random.... |
25058272752 | import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
import scipy.io as scio
import os
import cv2
def temporal_pattern_fig_generation(temporal_path, save_fig_path):
basises = os.listdir(temporal_path)
for basis in basises:
sub_id = basis.split('_')[0]
part_id = basis.split(... | Shawey94/Gyral_Sulci_Project | Code/VisualizationInBroswer/temp_figs_generation.py | temp_figs_generation.py | py | 2,787 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.listdir",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
... |
19574236996 | import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import os
import sys
import scipy as sp
from scipy import stats
from scipy.optimize import curve_fit
from scipy import asarray as ar,exp
plt.rcParams["figure.figsize"] = (14,8)
plt.rcParams['font.size'] = 14
purp = '#44015... | yazaazou/6950_project | weekly_temp_dist.py | weekly_temp_dist.py | py | 5,259 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 16,
"usage_type": "attribute"
},
{
... |
31635357894 | import math
from itertools import permutations
def check_prime(number: int) -> bool:
if number == 2:
return True
if number == 1 or number % 2 == 0:
return False
for i in range(3, math.floor(math.sqrt(number))+1, 2):
if number % i == 0:
return False
return True
per... | bentondavidl/ProjectEuler | Python/(41)Pandigital prime.py | (41)Pandigital prime.py | py | 564 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "math.floor",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "itertools.permutations",
"line_number": 20,
"usage_type": "call"
}
] |
73373973793 | """empty message
Revision ID: c6b96b2c1007
Revises: 3c62dfd278cf
Create Date: 2023-05-16 16:27:57.244815
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c6b96b2c1007'
down_revision = '3c62dfd278cf'
branch_labels = None
depends_on = None
def upgrade():
# ... | xixuan35/VueFlaskPrograms | Flask_Shop/migrations/versions/c6b96b2c1007_.py | c6b96b2c1007_.py | py | 1,020 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "alembic.op.create_table",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integ... |
71109773794 | """
Functions to initialize the arkOS Kraken server.
arkOS Kraken
(c) 2016 CitizenWeb
Written by Jacob Cook
Licensed under GPLv3, see LICENSE.md
"""
import eventlet
import logging
import ssl
from logging.handlers import RotatingFileHandler
from kraken import auth, genesis
import arkos
from arkos import logger
from... | arkOScloud/kraken | kraken/application.py | application.py | py | 4,896 | python | en | code | 5 | github-code | 1 | [
{
"api_name": "flask.Flask",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "flask_socketio.SocketIO",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line... |
40282545729 | import os
import spacy
from spacy import displacy
from typing import Optional, Union, List, Dict
class EntityRecognizer:
"""
A class that performs entity recognition using a specified model.
Args:
model_path (Union[str, os.PathLike]): The path to the entity recognition model.
doc (Optional... | yukunzGIT/ubc_cymax_nlp_product_knowledge_graph | src/entity_recognizer/entity_recognizer.py | entity_recognizer.py | py | 2,925 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "typing.Union",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "os.PathLike",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "typing.Optional",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "spacy.load",
"line_... |
43299079454 | # --------------------------------------------------------------
# File: /my_server_app.py
# Project: Flask-Demo
# Author: Adrian Gould <Adrian.Gould@nmtafe.wa.edu.au>
# Created: 14/04/2021
# Purpose: ...
#
# Renamed app.py to my_server_app.py and removed client based
# code, except for some basic details
# --... | AdyGCode/Flask-Demo-2021S1 | my_server_app.py | my_server_app.py | py | 4,490 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "flask.Flask",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.create_engine",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "RainDB.db_filena... |
72840976035 | import polars as pl
# Візуалізувати дані
import matplotlib.pyplot as plt
import numpy as np
import mplcyberpunk
plt.style.use("cyberpunk")
"""
Завдання 3 із завантаження даних
Завантажте дані по вказаному посиланню, відкрийте як csv файл, в параметрах функції
вкажіть що немає заголовка в першому рядку... | VAlduinV/KPI_tasks | HW_1/py_files/third.py | third.py | py | 1,615 | python | uk | code | 0 | github-code | 1 | [
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 7,
"usage_type": "name"
},
{
"api_name"... |
18929231493 | import torch
import torch.nn as nn
from torch.autograd import Variable
import torchvision
import torchvision.datasets as dsets
import torchvision.transforms as transforms
import numpy as np
import matplotlib.pyplot as plt
# Linear Regression:
# Hyper Params:
inputSize = 1
outputSize = 1
numEpochs = ... | RonTeichner/deepLearningCourse | LinearRegression.py | LinearRegression.py | py | 3,189 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.array",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.random.rand",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "numpy.float32",
"... |
27568411284 | from tkinter import *
from tkinter import filedialog
from pytube import YouTube
from moviepy import *
from moviepy.editor import VideoFileClip
# Functions
def select_folder():
"""
Select folder to save files
"""
folder = filedialog.askdirectory()
folder_label.config(text=folder)
def download_bes... | C-distin/python-youtube | download.py | download.py | py | 2,329 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "tkinter.filedialog.askdirectory",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tkinter.filedialog",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "pytube.YouTube",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "mov... |
22549890962 | import requests
from pathlib import Path
def get_picture(url, path):
Path("images").mkdir(parents=True, exist_ok=True)
response = requests.get(url)
response.raise_for_status()
with open(path, 'wb') as file:
file.write(response.content)
| FOURWORDSALLCAPS/Space_for_everyone | get_picture.py | get_picture.py | py | 263 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
}
] |
38258568212 | import xml.etree.ElementTree
import sys
import collections
import os
import fnmatch
import pickle
# adapting http://stackoverflow.com/questions/1912434/how-do-i-parse-xml-in-python (ElementTree)
# Constants
kWindowSize = 4
def main():
'''
Invocation: python process_xml.py <dirname>
'''
#if True: retu... | tosmith97/cs224n | process_xml.py | process_xml.py | py | 4,871 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.argv",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "pickle.dump",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.walk",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "fnmatch.filter",
"line_number":... |
3203854814 | from PyQt5.Qt import (QThread)
from PyQt5.QtCore import QTimer,QEventLoop,pyqtSignal
from PyQt5.QtWidgets import QApplication
from ulitities.base_functions import echoRuntime
from predict import predict
from main_gui import mywindow,Signal
import logging,time
class main_thread(QThread):
main_signal = pyqtSignal()
... | scrssys/SCRS_RS_AI | main_thread.py | main_thread.py | py | 2,433 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "PyQt5.Qt.QThread",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.pyqtSignal",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtCore.pyqtSignal",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "main_... |
32062231307 | from django.shortcuts import render, redirect
from django.db.models import Q
from .forms import ClientForm, ImmobileForm, RegisterLocationForm
from .models import Immobile, ImmobileImage
# Create your views here.
def list_location(request):
immobiles = Immobile.objects.filter(is_locate=False)
context = {'imm... | djangomy/immobile | myapp/views.py | views.py | py | 3,059 | python | en | code | 5 | github-code | 1 | [
{
"api_name": "models.Immobile.objects.filter",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "models.Immobile.objects",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "models.Immobile",
"line_number": 10,
"usage_type": "name"
},
{
"api_n... |
31663756224 | # author: sunshine
# datetime:2022/3/17 下午5:36
# -*- coding: UTF-8 -*-
import re
import sys
import datetime
import subprocess
from Crypto.Cipher import AES
from binascii import a2b_hex
from binascii import b2a_hex
class LicenseEncode:
def __init__(self, mac, license_path, expired_date=None):
self.mac = ma... | fushengwuyu/encrypt_license | app/license_utils.py | license_utils.py | py | 3,832 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "datetime.datetime.now",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "datetime.timedelta",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "Crypt... |
72377919714 | import time
import requests
def get_num():
req = requests.get("https://desafios.cysource.com.br/PYTHON/stage1.php")
for line in req.text.split("<h3"):
if 'class="text-center">' in line:
cont = line.split("h3")[0].split("<")[0].split(">")[1]
try:
return eval(cont... | lvluanvinicius/ITSafe-Python-Scripts | Flask/Ex03/desafios/stage1.py | stage1.py | py | 898 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "requests.session",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 27,
"usage_type": "call"
}
] |
37798513559 | import pytest
import meshio
from . import helpers
h5py = pytest.importorskip("h5py")
@pytest.mark.parametrize(
"mesh",
[
helpers.empty_mesh,
helpers.line_mesh,
helpers.tri_mesh,
helpers.tri_mesh_2d,
helpers.tet_mesh,
],
)
def test_io(mesh, tmp_path):
helpers.... | nschloe/meshio | tests/test_moab.py | test_moab.py | py | 563 | python | en | code | 1,691 | github-code | 1 | [
{
"api_name": "pytest.importorskip",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "meshio.h5m",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "pytest.mark.parametrize",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pytest.mar... |
18291787743 | import pygsheets
import pandas as pd
import tkinter as tk
from tkinter import filedialog
import re
import datetime
from time import time
from DV360_checkedlatecampaign import update_main
today = datetime.datetime.now()
postdate = (str(today.year) + str(today.month).zfill(2))
gc = pygsheets.authorize(service_file=r'C:... | pandemonium0225/PyCharm_Office | DV360_Tracker_Info.py | DV360_Tracker_Info.py | py | 11,713 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "datetime.datetime.now",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pygsheets.authorize",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tkin... |
12994031629 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import tensorflow as tf
import numpy as np
from keras.preprocessing.image import ImageDataGenerator
import pdb
from glimpse import GlimpseNet, EmissionNet, ContextNet
from utils impor... | AthiraJacob/Deep-RAM | dram.py | dram.py | py | 9,330 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.contrib",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "tensorflo... |
29452718616 | #
from timeit import default_timer
from scipy.spatial import distance_matrix as calc_distance_matrix
from verypy.classic_heuristics.parallel_savings import parallel_savings_init, clarke_wright_savings_function
from verypy.classic_heuristics.gaskell_savings import gaskell_lambda_savings_function, gaskell_pi_savings_func... | jokofa/NRR | baselines/savings.py | savings.py | py | 1,426 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "verypy.classic_heuristics.parallel_savings.clarke_wright_savings_function",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "verypy.classic_heuristics.gaskell_savings.gaskell_lambda_savings_function",
"line_number": 12,
"usage_type": "name"
},
{
"api_name"... |
36525627257 | from django.contrib.auth.mixins import UserPassesTestMixin
import xlsxwriter
from django.http import HttpResponse
from openpyxl import load_workbook
from .models import Student, MyUser, UsersData
from .forms import UploadExcelFileForm
import datetime
def read_excel_with_students(request_file):
'''Function to read... | vb1152/school2 | school/utils.py | utils.py | py | 9,081 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "models.Student.objects.filter",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "models.Student.objects",
"line_number": 22,
"usage_type": "attribute"
},
{
"... |
27744834926 | from typing import cast
import pytest
from gmpy2 import mpz
from pvss.asn1 import PreGroupValue
from pvss.zq import ZqGroup
def test_init() -> None:
with pytest.raises(ValueError, match="q is negative"):
ZqGroup(mpz(-13))
with pytest.raises(ValueError, match="q not prime"):
ZqGroup(mpz(12))... | joernheissler/pvss | tests/test_zq.py | test_zq.py | py | 1,976 | python | en | code | 6 | github-code | 1 | [
{
"api_name": "pytest.raises",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pvss.zq.ZqGroup",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "gmpy2.mpz",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pytest.raises",
"line_num... |
24904622636 | import os
import sys
from sys import path
path.append('./modules')
path.append('./templates')
from flask import Flask, request, current_app
from flask.templating import render_template
import logging
import modules
from modules.process_text import ProcessText
from modules.anonymizeText import anonText
from flask_sqlalc... | jillbaggett81/GenderBiasDetector | app.py | app.py | py | 4,214 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.path.append",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "sys.path.append",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 5... |
41618660742 | from flask import Flask, render_template, request
import requests
import json
app = Flask(__name__)
@app.route('/')
def main_page():
return render_template('index.html')
@app.route('/search')
def search():
keyword = request.args.get('keyword')
payload = {'query':{'match_phrase':{'text':keyword}}}
r = reque... | qychen/TwittMap | main.py | main.py | py | 917 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.request.args.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask.request.... |
10991585048 | """aqmsProjectFile URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.1/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')
Cla... | subha9999/Air-Quality-Monitoring-System | aqmsproject/urls.py | urls.py | py | 1,262 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.urls.path",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "django.contrib.admin.site",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "... |
32907596006 | # -*- coding: utf-8 -*-
from sora.iobuffer import IOBuffer
from sora.parser import Uncomplete
class DataHandler(object):
""" parser data and pass to callback """
def __init__(self, parser, callback):
self.parser = parser
self.callback = callback
self.buffer = None
def __call__(self... | mayflaver/sora | sora/datahandler.py | datahandler.py | py | 671 | python | en | code | 18 | github-code | 1 | [
{
"api_name": "sora.iobuffer.IOBuffer",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sora.iobuffer.IOBuffer",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sora.parser.Uncomplete",
"line_number": 19,
"usage_type": "call"
}
] |
69883606114 | """ from django.shortcuts import render
from rest_framework.views import APIView
from rest_framework.decorators import action
# Create your views here.
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.response import Response
from django.http import JsonResponse
from ... | Dhanush3213/Construction-cost-prediction-using-ml | server/APIProject/Prediction/views.py | views.py | py | 11,761 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "joblib.load",
"line_number": 87,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 336,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 337,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number"... |
22495404935 | import requests
import json
def get_temperature_forecast(forecast_days, latitude, longitude):
api_url = f"https://api.open-meteo.com/v1/forecast?latitude={latitude}&longitude={longitude}&hourly=temperature_2m,precipitation_probability&forecast_days={forecast_days}"
# Send the API request
response = reques... | SarvagyaVaish/AI-Climate-Hackathon | backend/weather.py | weather.py | py | 2,645 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 39,
"usage_type": "call"
}
] |
5618393353 | #!/usr/bin/env python
import numpy as np
import rospy
import pyaudio
from std_msgs.msg import Float32, Float32MultiArray
import sys
class ListenMiniMicrophone:
def __init__(self):
# init rospy node
rospy.init_node('listen_mini_microphone', anonymous=True)
self.p = pyaudio.PyAudio()
... | 708yamaguchi/hitting_sound_classification | scripts/listen_mini_microphone.py | listen_mini_microphone.py | py | 3,462 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "rospy.init_node",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pyaudio.PyAudio",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "rospy.get_param",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "rospy.get_param",
... |
410370430 | from __future__ import absolute_import
import datetime
from datetime import date
from tests import util
import time
import transitfeed
class ServicePeriodValidationTestCase(util.ValidationTestCase):
def runTest(self):
# success case
period = transitfeed.ServicePeriod()
repr(period) # shouldn't crash
... | google/transitfeed | tests/transitfeed/testserviceperiod.py | testserviceperiod.py | py | 20,858 | python | en | code | 670 | github-code | 1 | [
{
"api_name": "tests.util.ValidationTestCase",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "tests.util",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "transitfeed.ServicePeriod",
"line_number": 13,
"usage_type": "call"
},
{
"api_name"... |
39993672014 | import matplotlib.pyplot as plt
import numpy as np
angle = [-45, 0, 45]
forwards = [4.41, 0.6745, 3.99]
forwardserr = [0.284, 0.243, 0.264]
backwards = [-2.82, 0.00633, -3.387]
backwardserr = [0.294, 0.523, 0.429]
spinforwards = (forwards[0] - forwards[2])/2.0
spinbackwards = (backwards[0] - backwards[2])/2... | CBermingham/Photonic_Force | spinmomentum.py | spinmomentum.py | py | 2,130 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.cos",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.cos",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.cos",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.cos",
"line_number": 33,
... |
6335152002 | #!/usr/bin/env python
import arrow
from entry_db import EntryDB
from journal_entry import JournalEntry
import urwid
from edit import EditDisplay
from horizontal_menu import horizontal_menu,HorizontalMenu,SubMenu,Choice,EditMenu
from io import StringIO
editor_palette = [
('body','black','light cyan'),
('foot','... | MaxPrehoda/Jourminal | journal_app.py | journal_app.py | py | 4,728 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "entry_db.EntryDB",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "urwid.MainLoop",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "horizontal_menu.HorizontalMenu.palette",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_n... |
23724167253 | import boto3
from langchain.document_loaders import UnstructuredWordDocumentLoader
import logging
from botocore.exceptions import ClientError
import tempfile
from langchain.schema.document import Document
from typing import Tuple, List
def process_docx(s3_client: boto3.client, bucket_name: str, file_key: str) -> Tupl... | Giocrisrai/chatpdfgio | api/app/docx_processing.py | docx_processing.py | py | 1,977 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "boto3.client",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "logging.info",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "tempfile.NamedTemporaryFile",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "logging.in... |
9999830291 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import get_object_or_404
from django.test import TestCase
from directmessages.apps import Inbox
from directmessages.models import Message
from django.contrib.auth.models import User
from django.test import TestCase, RequestFactory, C... | odmoreno/kalaFitnessApp | fisioterapia/tests.py | tests.py | py | 2,814 | python | es | code | 1 | github-code | 1 | [
{
"api_name": "django.test.TestCase",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "django.contrib.auth.models.User.objects.create",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.User.objects",
"line_number": 19,
"usage_t... |
15494922036 | import cv2
import numpy as np
import os
def get_2type_img(root_path):
root=root_path
dirlist = [ item for item in os.listdir(root) if os.path.isfile(os.path.join(root, item)) ]
print(dirlist)
for d in dirlist:
img_path = root + d
print(img_path)
img = cv2.imread(img_path)
h,w,c = img.shape
t... | LINBOOyuan/cell_counter | count_cell2.py | count_cell2.py | py | 1,523 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.listdir",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number":... |
11208025058 | # -*- coding: utf-8 -*-
"""Tests for obfuscation utilities."""
import textwrap
from unittest import TestCase
from ddt import data, ddt, unpack
from mock import MagicMock, patch
import edx.analytics.tasks.util.obfuscate_util as obfuscate_util
from edx.analytics.tasks.util.tests.target import FakeTask
@ddt
class Bac... | openedx/edx-analytics-pipeline | edx/analytics/tasks/util/tests/test_obfuscate_util.py | test_obfuscate_util.py | py | 26,191 | python | en | code | 90 | github-code | 1 | [
{
"api_name": "unittest.TestCase",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "edx.analytics.tasks.util.obfuscate_util.needs_backslash_decoding",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "edx.analytics.tasks.util.obfuscate_util",
"line_number": 2... |
33032831725 | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework.exceptions import NotFound, PermissionDenied
from .serializers.common import ReviewSerializer
from .models import Review
from rest_framework.permissions import IsAuthenticatedOrRe... | florastocks/recipe_book | reviews/views.py | views.py | py | 1,989 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "rest_framework.permissions.IsAuthenticatedOrReadOnly",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "serializers.common.ReviewSerializer",
"line_number": 17,
... |
31386516576 | from lingpy import *
import networkx as nx
import igraph
from sys import argv
from lingpy.thirdparty import linkcomm
# preprocessing, load data, and modify the rimes
wl = Wordlist('O_shijing.tsv', col='shijing', row='stanza')
# define colors for vowels
colors = {
'ə' : ['black', 'red'],
'a' : ['white', 'green... | digling/shijing | C_refine_network.py | C_refine_network.py | py | 7,404 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "networkx.Graph",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "networkx.Graph",
"line_number": 139,
"usage_type": "call"
},
{
"api_name": "igraph.Graph",
"line_number": 170,
"usage_type": "call"
},
{
"api_name": "igraph.Graph",
"line... |
7383920959 | """ """
import numpy as np
import cv2
from time import time
def timeit(func):
def call(*args, **kwargs):
t0 = time()
ret = func(*args, **kwargs)
t1 = time()
print(t1 - t0)
return ret
return call
class Filter:
def __init__(self, size):
pass
class Image:
... | mghmgh1281375/POCS | Resize/Image.py | Image.py | py | 2,463 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "time.time",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "cv2.imshow",
"line_number": 24,
... |
26641848850 | from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler, ThrottledDTPHandler
from pyftpdlib.servers import FTPServer
from pyftpdlib.log import LogFormatter
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
ch = logging.StreamHandler()
fh = logging.Fi... | kinscloud/kinscloud.github.io | Python/DevOps/PyFtpdLibDemo.py | PyFtpdLibDemo.py | py | 994 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "logging.StreamHandler",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.FileHa... |
69850120995 | ########################################################################################
#
# This script converts the trial list of voxceleb2 to the general format.
#
# Author(s): Nik Vaessen
########################################################################################
import pathlib
import click
from dat... | Loes5307/VocalAdversary2022 | data_utility-main/voxceleb/fix_trials.py | fix_trials.py | py | 1,583 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "pathlib.Path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "data_utility.eval.speaker.evaluator.SpeakerTrial",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "data_utility.eval.speaker.evaluator.SpeakerTrial.to_file",
"line_number": ... |
3395724366 | import os
import subprocess
from requests import post
def fetch():
global text
for line in text:
os.mkdir(line.replace("://","-"))
os.chdir(line.replace("://","-"))
mod = line.strip("https://" or "http://")
mod = mod.rstrip("\n")
p1 = subprocess.run(['dig', '+short', mod], capture_output=True, t... | RogueSMG/Scavenger | PortsAndServices.py | PortsAndServices.py | py | 1,796 | python | en | code | 18 | github-code | 1 | [
{
"api_name": "os.mkdir",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
"line_number": ... |
39948665528 | import os
from dotenv import load_dotenv
ROOT_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
def get_abs_path(file_path: str) -> str:
"""append ROOT_DIR for relative path"""
# Already absolute path
if file_path.startswith("/"):
return file_path
else:
return os.path... | pradyumnaym/Champions | app/config.py | config.py | py | 827 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.path.abspath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_nu... |
74338108512 | from solcx import compile_standard, install_solc
import json
from web3 import Web3
from dotenv import load_dotenv
import os
load_dotenv()
with open("./SimpleStorage.sol", "r") as file:
simple_storage_file = file.read()
install_solc("0.8.0")
compiled_sol = compile_standard(
{
"language": "Solidity",
... | jassi-singh/blockChainDevCourse | simplstorage/deploy.py | deploy.py | py | 2,350 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "solcx.install_solc",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "solcx.compile_standard",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.dump... |
3942267886 | from datetime import timedelta
from discord import Color, Embed, Message
from discord.ext import commands
from wavelink import Player, TrackEventType
from exceptions import CurrentNotPlaying
from .utilities import get_wavelink_player
class EmptyNowPlayingManager:
def __init__(self) -> None:
super(NowPla... | GabrielBarros00/Music-Discord-BOT | utils/nowplaying.py | nowplaying.py | py | 5,352 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "wavelink.TrackEventType",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "wavelink.Player",
"line_number": 17,
"usage_type": "argument"
},
{
"api_name": "wavelink.TrackEventType",
"line_number": 19,
"usage_type": "argument"
},
{
"api_name"... |
20962312145 | import atexit
import imp
import glob
import logging
import os
import shutil
import subprocess
import tempfile
import config
import deb
# Last config root directory to cleanup on exit
__last_config_root = None
def __cleanup_last_root():
if should_cleanup() and __last_config_root is not None and \
os.... | endlessm/merge-o-matic | tests/testhelper.py | testhelper.py | py | 10,038 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.path.isdir",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "shutil.rmtree",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "atexit.register",
"line_... |
73866763874 | from mmcv.runner import HOOKS, Hook
from torch.utils.data import DataLoader
from mpa.modules.datasets.samplers.cls_incr_sampler import ClsIncrSampler
from mpa.modules.datasets.samplers.balanced_sampler import BalancedSampler
from mpa.utils.logger import get_logger
logger = get_logger()
@HOOKS.register_module()
clas... | openvinotoolkit/model_preparation_algorithm | mpa/modules/hooks/task_adapt_hook.py | task_adapt_hook.py | py | 2,438 | python | en | code | 20 | github-code | 1 | [
{
"api_name": "mpa.utils.logger.get_logger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "mmcv.runner.Hook",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "mpa.modules.datasets.samplers.balanced_sampler.BalancedSampler",
"line_number": 50,
"usage_ty... |
6950680498 | import torch
import torch.nn as nn
from torch.nn import init
class ConvLSTM(nn.Module):
def __init__(self, input_size, hidden_size, kernel_size):
super(ConvLSTM, self).__init__()
self.input_size = input_size
self.hidden_size = hidden_size
padding = kernel_size // 2
self.... | Flawless1202/tjevents | tjevents/nn/recurrent/conv_rnn.py | conv_rnn.py | py | 2,445 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "torch.nn.Module",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numb... |
21435367392 | import logging
import numpy as np
def read_input(fname="input.txt"):
with open(fname, "r") as f:
return f.readlines()
def construct_paper(text):
instructions = []
dots = []
line_idx = 0
while line_idx < len(text) and text[line_idx] != '\n':
coords = [int(val) for val in text[line_i... | mrdkucher/advent_of_code | 2021/day13/main.py | main.py | py | 2,458 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.debug",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "logging.debug",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.max",
"line_number"... |
31498625020 | from flask import Flask, jsonify, render_template
import jinja2
import datetime
import refine_objects
from connection import get_connection, get_all_from_table, run_sql_command_one_result
app = Flask(__name__)
@app.route("/")
def show_startPage():
# print(refine_objects.refine_location(get_all_from_table("locati... | DHBW-Event-Planner/Event-Planner | app/app.py | app.py | py | 2,024 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.utcnow",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.da... |
6609884216 | import argparse #To get the source directory from command line arguments.
import io # To fix encoding issues in Windows
import os #To find files from the source.
import os.path #To find files from the source and the destination path.
cura_files = {"cura", "fdmprinter.def.json", "fdmextruder.def.json"}
uranium_files = ... | Ultimaker/Cura | scripts/lionbridge_import.py | lionbridge_import.py | py | 9,461 | python | en | code | 5,387 | github-code | 1 | [
{
"api_name": "os.listdir",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number... |
9300648357 | import tweepy
import json
import time
from kafka import KafkaProducer
# Configure the authentication keys for the Twitter API
bearer_token="AAAAAAAAAAAAAAAAAAAAAMxXkAEAAAAAFC3teGdOH64EKRkhCiWANfWxwvk%3DvPTipAtXE0gr2YHUcBTp0MQ8bYz65LAbRyiiGLFIbCTvw4FZiD"
client = tweepy.Client(bearer_token=bearer_token)
# Parameters
... | YasTelecom/Twitter-Data-Stream-Sentimental-Analaysis | ingest-tweets.py | ingest-tweets.py | py | 1,271 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "tweepy.Client",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "kafka.KafkaProducer",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "tweepy.Paginator",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"l... |
75265308833 | from fastapi import FastAPI, Request
from evotekaro import models
from evotekaro.database import engine
from evotekaro.routers import user, authentication, election, votes, candidates
from fastapi.middleware.cors import CORSMiddleware
import logging
logging.basicConfig(level=logging.INFO,
format='... | Theganeshpatil/Evotekaro | main.py | main.py | py | 1,113 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "logging.basicConfig",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "fastapi.FastAPI",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "fastapi.middlewar... |
71016766115 | import torch
import gpytorch
import numpy as np
torch.manual_seed(1)
np.random.seed(3)
class ExactGPModel(gpytorch.models.ExactGP):
def __init__(self, z_train, y_train, likelihood):
super(ExactGPModel, self).__init__(z_train, y_train, likelihood)
self.mean_module = gpytorch.means.ConstantMean()
... | yugaro/LearingETMPCSymbolic | lib/model/gp.py | gp.py | py | 2,053 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "torch.manual_seed",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "gpytorch.models",
... |
2034280475 | from PyQt5.QtWidgets import QApplication, QWidget, QTableWidget
from PyQt5.QtGui import QPainter, QColor, QFont, QBrush, QPen, QPixmap, QTabletEvent
from PyQt5.QtCore import QPoint, pyqtSignal, Qt, QTime
from nav_msgs.msg import Path
import rospy
from Data import Data
SIZE_ROBOT_WRITING = 4.0
DISTANCE_ROBOT_WRITING_T... | asselbor/choose_adaptive_words | nodes/TactileSurfaceArea.py | TactileSurfaceArea.py | py | 5,492 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "PyQt5.QtWidgets.QTableWidget",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.pyqtSignal",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QTableWidget.__init__",
"line_number": 21,
"usage_type": "call"
},... |
8728232324 | import nltk
class MessageHistory:
# Used to track message history to inject back into the queries
def __init__(self, max_tokens=4000):
# nltk IS NOT THE SAME tokenizer used by GPT, in order to use that we must have torch
# to prevent some weird output tokenizer produces when torch isn't install... | JesseDarr/gpt4_shell | modules/message_history.py | message_history.py | py | 2,262 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "nltk.tokenize.TreebankWordTokenizer",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "nltk.tokenize",
"line_number": 10,
"usage_type": "attribute"
}
] |
73033773473 | # -*- coding: utf-8 -*-
'''
OpenStack Cloud Module
======================
OpenStack is an open source project that is in use by a number a cloud
providers, each of which have their own ways of using it.
:depends: libcloud >- 0.13.2
OpenStack provides a number of ways to authenticate. This module uses password-
based... | shineforever/ops | salt/salt/cloud/clouds/openstack.py | openstack.py | py | 30,521 | python | en | code | 9 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 174,
"usage_type": "call"
},
{
"api_name": "salt.utils.namespaced_function",
"line_number": 180,
"usage_type": "call"
},
{
"api_name": "salt.utils.namespaced_function",
"line_number": 181,
"usage_type": "call"
},
{
... |
24621962822 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2022/3/31 18:49
# @Author : yaomy
import cv2
import torch
import torch.nn.functional as F
import numpy as np
def crop_resize_by_warp_affine(img, center, scale, output_size, rot=0, interpolation=cv2.INTER_LINEAR):
"""
output_size: int or (w, h)
N... | yaomy533/pose_estimation | lib/transform/coordinate.py | coordinate.py | py | 4,161 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "cv2.INTER_LINEAR",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "cv2.warpAffine",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
... |
71779727075 | from flask import redirect, render_template, request, session, jsonify, json
from flask_app import app
from flask_app.models.car_models import Car
from flask_app.models.user_models import User
from flask_app.controllers import user_controllers
import os
print( os.environ.get("FLASK_APP_API_KEY") )
@app.route("/dashboa... | rseffens/flip_your_whip | flask_app/controllers/car_controllers.py | car_controllers.py | py | 3,003 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "os.environ.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "flask.session",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "flask.redirect",
"line... |
18569928188 | import pygame
import random
import math
import cv2
import apriltag
import numpy as np
from pygame.locals import (
K_UP,
K_DOWN,
K_LEFT,
K_RIGHT,
K_ESCAPE,
KEYDOWN,
QUIT,
K_s,
K_w,
)
pygame.init()
clock = pygame.time.Clock()
SCREEN_WIDTH = 640
SCREEN_HEIGHT = 480
class P... | aisilva/ar-pong | main.py | main.py | py | 5,994 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pygame.init",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pygame.time.Clock",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pygame.time",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "pygame.sprite",
"l... |
74490089634 | #!/usr/bin/env python3
from faker import Faker
# Local imports
from app import app
from config import db
from models import User, Review, Business
fake = Faker()
with app.app_context():
print("Starting seed...")
# Seed code goes here!
print('Deleting existing data...')
User.query.delete()
Review... | chernandez148/yelp_clone_v2 | server/seed.py | seed.py | py | 1,935 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "faker.Faker",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "app.app.app_context",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "app.app",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "models.User.query.delete",
... |
5916633737 | from dataclasses import dataclass
from typing import Dict, Any, List
import pytest
import typing
import pyfury
from pyfury import Fury, Language
def ser_de(fury, obj):
binary = fury.serialize(obj)
return fury.deserialize(binary)
@dataclass
class SimpleObject:
f1: Dict[pyfury.Int32Type, pyfury.Float64T... | alipay/fury | python/pyfury/tests/test_struct.py | test_struct.py | py | 2,479 | python | en | code | 2,061 | github-code | 1 | [
{
"api_name": "typing.Dict",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "pyfury.Int32Type",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "pyfury.Float64Type",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "dataclasses... |
21734804742 | from xml.dom import minidom
class Node:
def __init__(self, lb, text=None):
self.label = lb
self.children = []
self.text = text
def is_leaf():
return len(self.children) == 0
def children(self):
return self.children
def to_s(self):
... | ManhND27/nlp_100_drill_exercises | 50_59ex/ex59.py | ex59.py | py | 1,473 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "xml.dom.minidom.parse",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "xml.dom.minidom",
"line_number": 52,
"usage_type": "name"
}
] |
23620656221 | from source.helpers.configuration_builder import (DatasetConfigurationBuilder,
NeuralNetworkConfigurationBuilder)
import pytest
@pytest.fixture
def mock_configuration_raw_dataset():
return {
'matlab': {
'file_name': 'matlab_file_test.mat',
... | 12Diego06Martinez/Python-Furuta-Pendulum | test/test_configuration_builder.py | test_configuration_builder.py | py | 2,534 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pytest.fixture",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "pytest.fixture",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "source.helpers.configuration_builder.DatasetConfigurationBuilder",
"line_number": 50,
"usage_type"... |
1593211756 | from django.conf.urls import url
from . import views
urlpatterns = [
#显示添加页面
url(r'^add/$',views.add,name='add'),
#执行添加操作
url(r'^do_add/$',views.do_add,name='do_add'),
#执行显示操作
url(r'^shuju/$',views.shuju,name='shuju'),
url(r'^input_id/$',views.input_id,name='input_id'),
#执行删除操作
ur... | Lousm/Python | 03_web前端/第11周-后端框架/myshop_2 - 副本/blog/urls.py | urls.py | py | 548 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.conf.urls.url",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.c... |
74839925793 | import os
import glob
from openpyxl import load_workbook
from openpyxl.utils import get_column_letter
import csv
asset_tasks = {}
for filepath in glob.glob(os.path.join('C:\\Users\\majona\\Desktop\\AA PMs', '*.xls*')):
wb = load_workbook(filename = filepath)
print(filepath)
ws = wb["Main"]
new_row ... | jonathanmajh/iko-tools | Python/Assets_JobTasks/main.py | main.py | py | 2,073 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "glob.glob",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "openpyxl.load_workbook",
"lin... |
38062510333 | from datetime import date, datetime, timedelta
import copy
from django.shortcuts import redirect, render
from home.models import Product, Profile, Purchase, Tag, application_data, custom_user, user_preference
from home.models import custom_user
from django.apps import apps
from rest_framework.response import Response
i... | development0261/photo_studio | admin_site/views.py | views.py | py | 46,430 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "home.models.custom_user.objects.get",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "home.models.custom_user.objects",
"line_number": 37,
"usage_type": "attribute"
},
{
"api_name": "home.models.custom_user",
"line_number": 37,
"usage_type": "name... |
21004162993 | import json
import logging
from django.conf import settings
from itsdangerous import (
BadSignature,
Signer,
URLSafeSerializer,
)
from protobufs.services.user import containers_pb2 as user_containers
from protobufs.services.organization.containers import sso_pb2
from saml2 import entity
import service.cont... | getcircle/services | users/providers/okta.py | okta.py | py | 6,726 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "service.control.control.get_object",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "service.control.control",
"line_number": 47,
"usage_type": "attribute"
},
{
... |
1772753121 | import requests
import config
import json
flight = 'SKW3871'
aero_api_key = config.AeroAPI
url = 'https://aeroapi.flightaware.com/aeroapi/flights/SCX262'
#payload = {'some': 'data'}
headers = {'x-apikey': aero_api_key}
r = requests.get(url, headers=headers)
aero_json = r.text
def extract_json_fields(aero):
# ... | nryberg/flights | aero_api.py | aero_api.py | py | 1,035 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "config.AeroAPI",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "requests.get",
"line_number": 13,
"usage_type": "call"
}
] |
11866916341 | import http.client
import tkinter as tk
from tkinter import *
import sys
win = tk.Tk()
win.geometry(f"600x370+100+200")
win.title("Task3")
# Функція для отримання або оновлення інформації для 5-ох країн
def update():
conn = http.client.HTTPSConnection("vaccovid-coronavirus-vaccine-and-treatment-tra... | Aragorant/python_tasks | task3/task3.py | task3.py | py | 8,552 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "tkinter.Tk",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "http.client.client.HTTPSConnection",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "http.client.client",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "... |
21144199101 | from flask import Flask, request
import random
import os
import logging
import ctypes
from ctypes import c_char_p, c_int
# Initialize logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
# Initialize the Flask application
app = Flask(__name__)
# Base directory where the... | abadinextsilicon/eli-stream-project | server.py | server.py | py | 3,155 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "flask.Flask",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "ctypes.CDLL",
"li... |
35718167183 | # -*- coding: utf-8 -*-
"""
Course: CS 4365/5354 [Computer Vision]
Author: Jose Perez [ID: 80473954]
Assignment: Lab 1
Instructor: Olac Fuentes
"""
from timeit import default_timer as timer
from PIL import Image
from scipy.ndimage import filters
from numpy import *
from pylab import *
def get_hog_data(im_array, number... | DeveloperJose/Python-CS4363-Computer-Vision | Exercise5/exercise5.py | exercise5.py | py | 5,796 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "scipy.ndimage.filters.convolve",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "scipy.ndimage.filters.convolve",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "timeit.default_timer",
"line_number": 81,
"usage_type": "call"
},
{
... |
23724183393 | from fastapi import FastAPI, File, UploadFile, HTTPException, Query, Body
from fastapi.responses import RedirectResponse
from fastapi.middleware.cors import CORSMiddleware
from app.s3_operations import upload_pdf, check_documents, initialize_s3_client, s3_object_exists, upload_file
from app.pdf_processing import proces... | Giocrisrai/chatpdfgio | api/main.py | main.py | py | 7,084 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "app.chat.initialize_pinecone",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "app.utils.initialize_openai",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "logging.error",
"line_number": 24,
"usage_type": "call"
},
{
"api_name":... |
22390443827 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""K-mean clustering plot functions."""
import matplotlib.pyplot as plt
from random import random as rd
from k_means_types import *
COLORS = [
"red",
"yellow",
"lime",
"orange",
"cyan",
"purple",
"green",
"magenta",
"maroon",
"ol... | tbagrel1/machine_learning | clustering/k_means/k_means_plot.py | k_means_plot.py | py | 4,312 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "random.random",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.ion",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 48,
"usage_type": "name"
},
{
"api_name": "matplotlib.pypl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.