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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12808474110 | import os
import random
import time
import re
from collections import Counter
from tqdm import tqdm
import pickle
import torch
import numpy as np
from sklearn.metrics import accuracy_score, precision_score, confusion_matrix
from nltk.translate.bleu_score import corpus_bleu
from nltk.tokenize import word_tokenize
from... | seq-to-mind/semi-style-transfer | main.py | main.py | py | 14,982 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "os.environ",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "global_config.gpu_id",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "random.randint",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.manual... |
43229549724 | import PySimpleGUI as sg
import math
import GUI_JoyStick
js = GUI_JoyStick.JoyStick()
sg.theme('DarkAmber')
layout = [
[sg.Graph(canvas_size=(750, 750),
graph_bottom_left=(0, 0),
graph_top_right=(750, 750),
change_submits=True,
drag_submits=True,
... | AiueoABC/To_Understand_Joystick_Control | example.py | example.py | py | 7,946 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "GUI_JoyStick.JoyStick",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.theme",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Graph",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.B... |
4254567431 | import sys
import glob
import scipy.io as sio
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
from torch.autograd import Variable
import torch.nn.functional as F
import torchvision.models as models
from matplotlib import pyplot as plt
import numpy as np
import h5py
from PIL import Image
from sklearn.... | raymondwmng/audioemotion | triple_oldattention_1024_scalarTime.py | triple_oldattention_1024_scalarTime.py | py | 22,526 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "torch.manual_seed",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "torch.cuda.manual_seed",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "numpy.random... |
21554807357 | from keras.datasets import mnist, cifar10
from keras.models import load_model
import keras
import numpy as np
import matplotlib.pyplot as plt
def load_mnist():
(rawtrain, ytrain), (rawtest, ytest) = mnist.load_data()
Ntrain = rawtrain.shape[0]
Ntest = rawtest.shape[0]
# zero-pad 28*28 img into 32*32 f... | Lifulifu/art_inpaint | util.py | util.py | py | 3,501 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "keras.datasets.mnist.load_data",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "keras.datasets.mnist",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "numpy.pad",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.pad... |
8363254486 | #Used to plot and determine any correlations between battery parameters
import sqlite3 as sql
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
database = sql.connect("components.db")
cursor = database.cursor()
cursor.execute("SELECT * FROM Batteries")
batteryTable = cursor.fetchall()... | corygoates/PropulsionOptimization | Database/batteryCorrelations.py | batteryCorrelations.py | py | 2,656 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"line_number... |
71281852989 | # from django.http import HttpResponse, JsonResponse
# # Sample employee data with IDs
# employees = [
# {
# "id": 2532,
# "name": "Asma",
# "designation": "Software Engineer",
# "department": "Engineering",
# "salary": 75000,
# },
# {
# "id": 2533,
# ... | Asma235/Django | myapp/views.py | views.py | py | 3,845 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.http.JsonResponse",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "django.http.JsonResponse",
"line_number": 80,
"usage_type": "call"
},
{
"api_name": "django.h... |
1916717911 | import pytest
from django.urls import reverse
def test_home_page(client):
url = reverse('index')
response = client.get(url)
assert response.status_code == 302
@pytest.mark.django_db(transaction=True)
def test_calc_index_page(client):
url = reverse('calc:index', kwargs={'a': 2, 'b': 3})
response... | hexlet-components/hexlet-python-django | tests/test_views.py | test_views.py | py | 558 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "django.urls.reverse",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.reverse",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pytest.mark.django_db",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pytest.m... |
9028709451 | #!/usr/bin/env python
# coding=utf-8
import json
import torch
import random
import argparse
import numpy as np
from tqdm import tqdm
from transformers import GPT2LMHeadModel, GPT2Tokenizer, AutoConfig
from generation import CustomizedGenerationMixin
device = torch.device("cuda" if torch.cuda.is_available() else "c... | mcao516/rectification-lm | src/decoding.py | decoding.py | py | 8,549 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "torch.device",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "random.seed",
... |
86581531473 | # -*- coding: utf-8 -*-
from plone import api
from plone.api.content import get_uuid
import logging
import transaction
logger = logging.getLogger(__name__)
def fix_internal_link_field(context):
""" Parte della migrazione collective.smartlink to version 1100.
Serve per togliere il contenuto del campo 'inter... | RedTurtle/collective.smartlink | src/collective/smartlink/upgrades/remove_internal_link.py | remove_internal_link.py | py | 2,509 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "plone.api.portal.get",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "plone.api.portal",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "plone.api... |
42842821762 | from decimal import *
import json
import codecs
getcontext().prec = 60
poolsAfterData = json.load(codecs.open('pools-after.json', 'r', 'utf-8-sig'))
poolsBeforeData = json.load(codecs.open('pools-before.json', 'r', 'utf-8-sig'))
lpAfterData = json.load(codecs.open('lp-after.json', 'r', 'utf-8-sig'))
lpBeforeData = json... | Sifchain/sifnode | test/integration/src/py/upgrade_test_table.py | upgrade_test_table.py | py | 1,970 | python | en | code | 106 | github-code | 6 | [
{
"api_name": "json.load",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "codecs.open",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "codecs.open",
"line_number": 6,
... |
17719273615 | import time
import selenium
from selenium import webdriver
#参数定义
loginname='#####' #账户名
password='######' #密码
date='2020-10-08' #处理数据的日期
def main():
opt=webdriver.ChromeOptions()
driver=webdriver.Chrome(options=opt)
driver.get('http://10.18.30.14:7001/aml_v2/login')
driver.maximize_windo... | KeenDuang/duang-work-tasks | 反洗钱监测报送自动化脚本/main.py | main.py | py | 1,837 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 12,
"usage_type": "call"
},
{
"api... |
12114464985 | import argparse
from logging import INFO, basicConfig, getLogger
from pathlib import Path
from .. import DATASET_VERSION
from ..download._helpers import download_openpack_from_zenodo
LATEST_VERSION_ON_ZENODO = DATASET_VERSION
AVAILABLE_STREAMS_IN_ZENODO = [
"activity-1s",
"atr-qags",
"kinect-2d-kpt",
... | open-pack/openpack-toolkit | openpack_toolkit/bin/download.py | download.py | py | 1,909 | python | en | code | 6 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "logging.getLogger",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentP... |
20105427362 | import mediacloud, datetime
import configparser
import matplotlib.pyplot as plt
import numpy as np
import logging
# sources for all logging stuff: http://fangpenlin.com/posts/2012/08/26/good-logging-practice-in-python/
# AND https://docs.python.org/3/howto/logging.html
logging.basicConfig(filename="logs.txt", level=lo... | freeeal/MAS.500 | hw2/main.py | main.py | py | 3,007 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "configparser.Co... |
19886738360 | import pytest
import trio
from hypothesis import strategies as st
from hypothesis_trio.stateful import (
Bundle,
initialize,
rule,
invariant,
run_state_machine_as_test,
TrioAsyncioRuleBasedStateMachine,
multiple,
)
from unittest.mock import ANY
from pendulum import now as pendulum_now
from ... | bitlogik/guardata | tests/backend/realm/test_shuffle_roles.py | test_shuffle_roles.py | py | 6,281 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "hypothesis_trio.stateful.TrioAsyncioRuleBasedStateMachine",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "hypothesis.strategies.one_of",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "hypothesis.strategies",
"line_number": 38,
"usage_... |
43574679365 | import cffi
import os
'''gffi is the global FFI object used by all geopm python modules
'''
gffi = cffi.FFI()
def get_dl_geopmd():
'''Get the FFILibrary instance for libgeopmd.so
Returns:
FFILibrary: Object used to call functions defined in
libgeopmd.so
'''
global _dl_ge... | geopm/geopm | service/geopmdpy/gffi.py | gffi.py | py | 1,516 | python | en | code | 79 | github-code | 6 | [
{
"api_name": "cffi.FFI",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number"... |
27576030795 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# @File : Master.py
# @Author: Liaop
# @Date : 2019-06-25
# @Desc : 获取服务领袖
from kazoo.client import KazooClient
from utility.Logger import getLogger
from utility.Global import Global
import os
class Master(object):
def __init__(self):
self._logger = getLogger... | sunyea/zookeeperTest | zk/Master.py | Master.py | py | 1,969 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "utility.Logger.getLogger",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "utility.Global.Global.config",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "utility.Global.Global",
"line_number": 17,
"usage_type": "name"
},
{
"... |
22720252615 | # -*- coding: utf-8 -*-
# Time: 2020-08-09 17:50
# Author: Landers1037
# Mail: liaorenj@gmail.com
# File: develop.py
from . import mypage
# from running_data import bloglist,musiclist,problemslist,thoughtslist
from db_transfer import *
import json
from app.models import Blog,Zan,Dbmessage,Music,Problems,Thou... | JJApplication/MySite | app/views/develop.py | develop.py | py | 7,306 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "app.models.Blog.query.all",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "app.models.Blog.query",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "app.models.Blog",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "... |
30570030323 |
import pandas as pd
def std_column_name(df):
'''function that lower cases and removes redundant words of column names'''
df_copy = df.copy()
col = list(df.columns)
new_col = []
for c in col:
c = c.lower().replace('alg_','')
new_col.append(c)
df_copy.columns = new_col
... | joanafloresc/Childhood_allergies | 02_notebooks/functions.py | functions.py | py | 6,611 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "math.ceil",
"line_number": 99,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 109,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 109,
"usage_type": "name"
},
{
"api_name": "seaborn.hist... |
26986853476 | # -*- coding: utf-8 -*-
import sys
import threading
from importlib import import_module
import grpc
import zmq
from grpc._cython.cygrpc import CompressionAlgorithm, CompressionLevel
from nameko_grpc.constants import Cardinality
from nameko_grpc.errors import GrpcError
from helpers import Command, RemoteClientTranspo... | nameko/nameko-grpc | test/grpc_indirect_client.py | grpc_indirect_client.py | py | 3,199 | python | en | code | 57 | github-code | 6 | [
{
"api_name": "nameko_grpc.constants.Cardinality.STREAM_UNARY",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "nameko_grpc.constants.Cardinality",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "nameko_grpc.constants.Cardinality.UNARY_UNARY",
"line_n... |
27642134788 | import telebot
import pyowm
bot = telebot.TeleBot("the api of your bot")
owm = pyowm.OWM('your weather api', language="es" )
@bot.message_handler(content_types=['text'])
def send_echo(message):
observation = owm.weather_at_place(message.text)
w = observation.get_weather()
answ ="Քաղաքի ջերմաստ... | mher2004/PythonTelegramBot | TeleBot.py | TeleBot.py | py | 854 | python | hy | code | 1 | github-code | 6 | [
{
"api_name": "telebot.TeleBot",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pyowm.OWM",
"line_number": 5,
"usage_type": "call"
}
] |
17953639867 | # -*- coding: utf-8 -*-
import logging
import torch
from lichee import config
from lichee.utils import common
from lichee import plugin
from lichee.utils.convertor import convertor_base
@plugin.register_plugin(plugin.PluginType.UTILS_CONVERTOR, "onnx")
class ONNXConvertor(convertor_base.BaseConvertor):
@classme... | Tencent/Lichee | lichee/utils/convertor/onnx_convertor.py | onnx_convertor.py | py | 2,394 | python | en | code | 295 | github-code | 6 | [
{
"api_name": "lichee.utils.convertor.convertor_base.BaseConvertor",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "lichee.utils.convertor.convertor_base",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "torch.nn",
"line_number": 16,
"usage_type"... |
11691021210 | import config
from Broly import BrolyBot
from apscheduler.schedulers.blocking import BlockingScheduler
print("Starting schedulers")
org_name = config.ORG_NAME
projects = config.PROJECTS
bot = BrolyBot(team_id = config.TEAM_ID, token = config.BOT_API_KEY)
sched = BlockingScheduler()
@sched.scheduled_job('interval',... | MuLx10/Broly | Cron.py | Cron.py | py | 1,536 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "config.ORG_NAME",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "config.PROJECTS",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "Broly.BrolyBot",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "config.TEAM_ID... |
22739884173 | from flask import Flask,jsonify
app=Flask(__name__)
courses=[{'name':"Course on APIs",'course_id':"0",'Description': "API development using Python witH Flask framework ",'price':"$100"},
{'name':"Automation Testing using Python and Selenium",'course_id':"1",'Description':"Learn more on Selenium Automation ... | reshmanair4567/RESTful_API | app.py | app.py | py | 1,509 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "flask.jsonify",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "flask.jsonify",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "flask.jsonify",
"line_numb... |
26040038036 | from __future__ import annotations
import logging
from dataclasses import dataclass
from pants.backend.helm.check.kubeconform import common, extra_fields
from pants.backend.helm.check.kubeconform.common import (
KubeconformCheckRequest,
RunKubeconformRequest,
)
from pants.backend.helm.check.kubeconform.extra_... | pantsbuild/pants | src/python/pants/backend/helm/check/kubeconform/deployment.py | deployment.py | py | 2,795 | python | en | code | 2,896 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pants.backend.helm.target_types.HelmDeploymentFieldSet",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "pants.backend.helm.check.kubeconform.extra_fields.KubeconformFieldSet",
... |
21396847939 | from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse
from racetrack_client.log.errors import EntityNotFound, AlreadyExists, ValidationError
from racetrack_commons.api.tracing import log_request_exception_with_tracing
from racetrack_commons.auth.auth import UnauthorizedError
def register_er... | TheRacetrack/racetrack | racetrack_commons/racetrack_commons/api/asgi/error_handler.py | error_handler.py | py | 2,860 | python | en | code | 27 | github-code | 6 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "fastapi.Request",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "racetrack_commons.api.tracing.log_request_exception_with_tracing",
"line_number": 14,
"usage_type": "call"... |
10712714004 | from airflow.hooks.postgres_hook import PostgresHook
from airflow.models import BaseOperator
from airflow.utils.decorators import apply_defaults
from helpers import SqlQueries
class DataQualityOperator(BaseOperator):
"""
Operator checks that the count of rows of a table is at least <min_number_of_rows>.
... | akkuplus/DatEng_Data_Pipeline_Apache_Airflow | airflow/plugins/operators/data_quality.py | data_quality.py | py | 2,225 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "airflow.models.BaseOperator",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "airflow.utils.decorators.apply_defaults",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "airflow.hooks.postgres_hook.PostgresHook",
"line_number": 37,
"usage_t... |
7110569975 | from django.urls import path, include, re_path
from courses.views import CourseListView, CourseDetailView, CourseInfoView, CommentsView, AddCommentView, VideoPlayView
app_name = "course"
urlpatterns = [
# 课程列表页
path('list/', CourseListView.as_view(), name="course_list"),
# 课程详情页
re_path('detail/(?P<... | vinson0616/EduOnline | apps/courses/urls.py | urls.py | py | 827 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "courses.views.CourseListView.as_view",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "courses.views.CourseListView",
"line_number": 10,
"usage_type": "name"
},
{
... |
4677152937 | import os
import logging
import rstcloth
logger = logging.getLogger(__name__)
def _indent_ok_for_table(content, indent):
"""
:param content:
:param indent:
:return:
"""
if indent == 0:
return content
else:
indent = " " * indent
if isinstance(content, list):
... | NASA-PDS/pds-github-util | pds_github_util/utils/RstClothReferenceable.py | RstClothReferenceable.py | py | 2,948 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "rstcloth.rstcloth",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "rstcloth.RstCloth",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "os.pat... |
16179627953 | import os
import torch
import numpy as np
import pandas as pd
from sklearn.experimental import enable_iterative_imputer
from sklearn.impute import IterativeImputer
from sklearn.preprocessing import StandardScaler
from imblearn.under_sampling import RandomUnderSampler
from VDP_Layers import VDP_FullyConnected, VDP_Relu,... | jrepifano/mortality-tool | training_scripts/s_train.py | s_train.py | py | 5,969 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.nn",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "VDP_Layers.VDP_FullyConnected",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "VDP_Layers.VDP_FullyConnected",
"line_number": 17,
"usage_type": "call"
},
{
"api_nam... |
2855651718 | from conans.errors import ConanException
from conans.model.settings import Settings
import os
class CMake(object):
def __init__(self, settings):
assert isinstance(settings, Settings)
self._settings = settings
@staticmethod
def options_cmd_line(options, option_upper=True, value_upper=True... | AversivePlusPlus/AversivePlusPlus | tools/conan/conans/client/cmake.py | cmake.py | py | 5,260 | python | en | code | 31 | github-code | 6 | [
{
"api_name": "conans.model.settings.Settings",
"line_number": 9,
"usage_type": "argument"
},
{
"api_name": "conans.errors.ConanException",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 34,
"usage_type": "attribute"
},
{
"ap... |
44614138406 | # coding=utf-8
import os
import time
import datetime
import gensim
import data_help_profile
import tensorflow as tf
from data_helper import *
from model import MTANet
# TF log level
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
# Parameters
# ===============================================================================... | anonymous-2018-COLING/pan11 | train.py | train.py | py | 23,011 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "os.environ",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.flags",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.logging",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "gensim.... |
7237293118 | import magic
import scrapy
import os
import pathlib
from abc import ABC
class BaseSpider(scrapy.Spider, ABC):
name = None
parser = None
storage_path = None
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.mime = magic.Magic(mime=True)
def download_atta... | virgodarth/image-spider | spider_app/spider_app/spiders/__init__.py | __init__.py | py | 974 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "scrapy.Spider",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "abc.ABC",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "magic.Magic",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number"... |
11677130051 | # importing speech recognition package from google api
import datetime
import webbrowser
import speech_recognition as sr
import playsound # to play saved mp3 file
from gtts import gTTS # google text to speech
import os # to save/open files
import wolframalpha # to calculate strings into formula
from sele... | aayushkanakia/KASAM_Assistant | Virtual_Assistant.py | Virtual_Assistant.py | py | 3,618 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "datetime.datetime.now",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "speech_recognition.Recognizer",
"line_number": 15,
"usage_type": "call"
},
{
"api_na... |
75282129786 | from flask import Flask, redirect, url_for, render_template, request
from filter import filter_data
from flask_sqlalchemy import SQLAlchemy
import database
import random
app = Flask(__name__)
#app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///gift.sqlite3'
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://findagi... | CybeastFalzar/FindAGift | app.py | app.py | py | 4,563 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "database.db.init_app",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "database.db",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "filter.filter_data",... |
23428147685 | # https://github.com/Reecepbcups/minecraft-panel/blob/main/src/utils/notifications.py
from discord_webhook import DiscordWebhook, DiscordEmbed
def discord_notification(url="", title="", description="", color="ffffff", values={}, imageLink="", footerText=""):
webhook = DiscordWebhook(url=url)
embed = Disc... | Reecepbcups/validator-stats-notifs | src/utils/notifications.py | notifications.py | py | 2,244 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "discord_webhook.DiscordWebhook",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "discord_webhook.DiscordEmbed",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "discord_webhook.DiscordWebhook",
"line_number": 29,
"usage_type": "call"
},
... |
42580070629 | import os
import random
import time
import subprocess
import pickle
import sys
import xml.etree.ElementTree as ET
from getch import getch
# Function to rearrange the caught Pokémon names according to the Pokedex order
def load_dex_numbers():
dex_numbers = {}
tree = ET.parse('pokedex.xml')
root = tree.getr... | thewindgods/pokepy | poke.py | poke.py | py | 10,718 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "subprocess.call",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "sys... |
16887590177 | #coding:utf-8
#all_data.xlsx把3个工作表合在一起了,但是打开很慢,主要因为fullevents比较大,
#所以还是拆成了三个xlsx文件
import xlrd
##################一、excel的读取操作xlrd######################
data =xlrd.open_workbook(r"matches.xlsx")
#0.打开excel操作
table = data.sheets()[0] #通过索引顺序获取
table = data.sheet_by_index(0) #通过索引顺序获取
table = data.sheet_by_name(u'ma... | WeixiongLin/MCM-Mathematical-Contest-in-Modeling- | 2020/data/read_xlsx.py | read_xlsx.py | py | 1,015 | python | zh | code | 1 | github-code | 6 | [
{
"api_name": "xlrd.open_workbook",
"line_number": 6,
"usage_type": "call"
}
] |
8765170147 | import bpy
import csv
import os
from bpy import context
import builtins as __builtin__
def console_print(*args, **kwargs):
for a in context.screen.areas:
if a.type == 'CONSOLE':
c = {}
c['area'] = a
c['space_data'] = a.spaces.active
c['region'] = a.regions[-1... | baehs1989/blender-script | EPL_Ranking_1819.py | EPL_Ranking_1819.py | py | 13,604 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "bpy.context.screen",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "bpy.context",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "bpy.context.window",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "bpy.context... |
33720308151 | from __future__ import print_function
import json
import logging
import os
import sys
import time
import h5py
import numpy as np
import tensorflow as tf
import zarr
import gunpowder as gp
logger = logging.getLogger(__name__)
class NoOp(gp.BatchFilter):
def __init__(self):
pass
def process(self, ba... | Kainmueller-Lab/aux_cpv_loss | auxcpvloss/l1/02_setups/setup_l1_06_gauss/train.py | train.py | py | 9,275 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "gunpowder.BatchFilter",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "gunpowder.BatchFilter",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name"... |
27562774411 | import sqlite3
import csv
class CsvToDatabase:
"""
This class add csv files into the database
......
def create_table() create the columns in our database
def load_data() read data from the csv file and add them into the database
def all_student_result() returns all the students... | Afeezagbaje/week-6-task-python-Working-with-Postgres-and-Sqlite | csv_sql/csv_to_database.py | csv_to_database.py | py | 3,461 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 36,
"usage_type": "call"
}
] |
31064737532 | import sys
import os
import time
import json
import math
import numpy as np
import multiprocessing as mp
import nidaqmx.system as nisys
import tkinter as tk
import tkinter.ttk as ttk
from tkinter.filedialog import askdirectory, asksaveasfilename, askopenfilename
from tkinter.messagebox import showinfo, showwarning
impo... | GoldbergLab/PyVAQ | PyVAQ.py | PyVAQ.py | py | 208,558 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "ctypes.windll",
"line_number": 60,
"usage_type": "attribute"
},
{
"api_name": "tkinter.GROOVE",
"line_number": 79,
"usage_type": "attri... |
36667886525 | # -*- coding: utf-8 -*-
import os
import re
import tempfile
import sh
from lxml import objectify
from py3o.template import Template
from erpbrasil.edoc.pdf import parser
# cte_namespace = lookup.get_namespace('http://www.portalfiscal.inf.br/cte')
class VoidElement(object):
def __getattr__(self, item):
... | erpbrasil/erpbrasil.edoc.pdf | src/erpbrasil/edoc/pdf/base.py | base.py | py | 4,421 | python | pt | code | 19 | github-code | 6 | [
{
"api_name": "lxml.objectify.fromstring",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "lxml.objectify",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "erpbrasil.edoc.pdf.parser",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "re... |
29564640125 | #!/usr/bin/python
# -*- encoding: utf-8 -*-
from api.thanos_http import xtthanos_user_http, request_data
from api.http_api import ResultBase
from common.logger import logger
from common.get_signature import generate_auth_info
def get_adl():
'''获取ADL信息'''
result = ResultBase()
position_adl = request_data.g... | shiqilouyang/thanos_test | operation/contract/client/position/get_adl.py | get_adl.py | py | 775 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "api.http_api.ResultBase",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "api.thanos_http.request_data.get",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "api.thanos_http.request_data",
"line_number": 12,
"usage_type": "name"
},
{
... |
32691706018 | import os
os.system("pip install tgcalls")
from telethon.tl.functions.channels import GetFullChannelRequest as getchat
from telethon.tl.functions.phone import CreateGroupCallRequest as startvc
from telethon.tl.functions.phone import DiscardGroupCallRequest as stopvc
from telethon.tl.functions.phone import GetGroupCall... | TheOksigen/2 | userbot/modules/call.py | call.py | py | 2,978 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.system",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "telethon.tl.functions.phone.CreateGroupCallRequest",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "userbot.events.register",
"line_number": 18,
"usage_type": "call"
},
{
... |
22417904621 | from flask import request, jsonify, Response
from application import app
import db
import utils
@app.route("/api/comments", methods=["GET"])
def comments_get():
return_data = []
tweet_id = request.args.get("tweetId")
if tweet_id:
#
# first check if tweetId is valid
#
success, tweet = db.get_one("SELECT id ... | dericf/twitter-clone-api | application/routes/comments.py | comments.py | py | 4,598 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.request.args.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "db.get_o... |
24475364638 | from aiogram.dispatcher import FSMContext # используется для хендлера машиносостояния, то бишь говорю хендлеру, что управляю состоянием
from aiogram.dispatcher.filters import Text
from aiogram.dispatcher.filters.state import State, StatesGroup # класс State необходим для того, чтобы бот переходил между состояниями
fro... | RinatStar420/telegramm_pizza_bot | handlers/admin.py | admin.py | py | 5,781 | python | ru | code | 0 | github-code | 6 | [
{
"api_name": "aiogram.dispatcher.filters.state.StatesGroup",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "aiogram.dispatcher.filters.state.State",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "aiogram.dispatcher.filters.state.State",
"line_number": 1... |
26002587925 | # imports
from flask import render_template, url_for, flash, redirect, request, session, send_file
from hello import app
from hello.forms import RegistrationForm, LoginForm, CandidateForm, SearchForm, ProgessTrack, JobVacancy
import pypyodbc
import secrets
import os
from passlib.hash import sha256_crypt
conne... | rajat1116/FlaskProject | Flask_C/hello/routes.py | routes.py | py | 15,368 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pypyodbc.connect",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "hello.app.route",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "hello.app",
... |
70778099388 | import os
import random
from itertools import count
import numpy as np
import librosa
import librosa.display
import pywt
from sklearn.preprocessing import MinMaxScaler, StandardScaler
import matplotlib
from tqdm import tnrange, tqdm_notebook, tqdm
import matplotlib.pyplot as plt
import soundfile as sf
def plot_mel_spe... | stefanos50/Language-Technology | Preprocessing.py | Preprocessing.py | py | 6,293 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "librosa.display.specshow",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": ... |
17856592735 | from flask import Flask, redirect, render_template, request, Response
from flask_cors import CORS
import base64
import EntradasXML as xml
import listasinteractivas
import os
from flask import jsonify
salida=None
alterado=None
retornousuario=None
retornoerror=None
app = Flask(__name__)
cors = CORS(app, resourse={r"/*":... | BrayanPradoMarroquin/IPC2_Proyecto3_-201801369 | Main.py | Main.py | py | 3,677 | python | es | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.redirect",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
... |
27236862079 | from homeassistant.const import CONF_DEVICES, CONF_NAME, CONF_TYPE
from homeassistant.core import HomeAssistant
from pytest_homeassistant_custom_component.common import (
MockConfigEntry
)
from custom_components.maxcul import (
CONF_DEVICE_PATH,
DOMAIN,
async_setup_entry
)
from maxcul import (
EVENT... | powerpaul17/maxcul | tests/test_init.py | test_init.py | py | 2,257 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "custom_components.maxcul.CONF_DEVICE_PATH",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "homeassistant.const.CONF_DEVICES",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "homeassistant.const.CONF_NAME",
"line_number": 35,
"usage_type... |
70234297469 | import os
import pymongo
import json
import time
def dummy(request):
"""Responds to any HTTP request.
Args:
request (flask.Request): HTTP request object.
Returns:
The response text or any set of values that can be turned into a
Response object using
`make_response <http://fl... | ebtesam25/LINKsurance | app/linksurance-gcp.py | linksurance-gcp.py | py | 5,557 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.environ.get",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "pymongo.MongoClient",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"... |
39986235510 | import requests
import time
import os
from GLOBAL_VARS import countries
base_url = "https://www.desinventar.net/DesInventar/download/DI_export_"
if __name__ == '__main__':
CURRENT_DIRECTORY = os.path.dirname(os.path.realpath(__file__))
directory = f"{CURRENT_DIRECTORY}/XMLdatabase"
if not os.path.exists(d... | DekunZhang/UCL_IFRC_IXN_PUBLIC | DesInventar/XMLdatabase_downloader/get_xml_database.py | get_xml_database.py | py | 739 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line... |
71189613 | import boto3
from boto3.dynamodb.conditions import Key, Attr
import jinja2
import json
DDB_RESOURCE = boto3.resource('dynamodb')
S3_CLIENT = boto3.client('s3', region_name="eu-west-1")
ddb_device_table_name = "iowt-devices"
ddb_event_table_name = "iowt-events"
ddb_device_table = DDB_RESOURCE.Table(ddb_device_table_na... | wilsonc101/iowt | www/db_query.py | db_query.py | py | 2,498 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "boto3.resource",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "boto3.client",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "boto3.dynamodb.conditions.Attr",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "boto3.dynamo... |
25066276939 | from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class User(AbstractUser):
email = models.EmailField(
'email addres',
unique = True,
error_messages = {
'unique': 'Un usuario con ese correo ya existe'
}
)
... | asmartinez/elastic-search-legmex | elastic/applications/persona/models.py | models.py | py | 722 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.contrib.auth.models.AbstractUser",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.db.models.EmailField",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.db.models",
"line_number": 6,
"usage_type": "name"
},
{
... |
7022569254 | from pyspark.sql.types import StructType, StructField, StringType, IntegerType, DoubleType
from pyspark import SparkContext
# GENERAL FUNCTION
def transform_Skyscanner_RDD(spark, data):
dfSpark = map_DF_to_Spark(spark, data)
data["arrival_time"] = calculate_ArrivalTime(dfSpark)
return data
# SCHEMA TO MA... | ds22m013/DSI_Project | transformationSkyscanner.py | transformationSkyscanner.py | py | 2,136 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pyspark.sql.types.StructType",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.types.StructField",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pyspark.sql.types.StringType",
"line_number": 14,
"usage_type": "call"
},
... |
14711353320 | # -*- coding: utf-8 -*-
"""
Created on Wed May 1 11:30:38 2019
@author: taylor
"""
import csv
import matplotlib.pyplot as plt
from pathlib import Path
import os
import tkinter as tk
import numpy as np
from accessimpactfiles import OpenCsvFile, LoadImpactTesterFolder, OpenExcelFile
from impactbutt import yesno_windo... | XOnanoSmartfoam/XOnano---Arduino-Impact | read_arduino_impact.py | read_arduino_impact.py | py | 4,188 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pathlib.Path",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line... |
42053411783 | # PROJECT: make a to-do list for middle-aged students and workers. OPTIONAL: use html to make more appealling to the eyes
# required imports
import sqlite3
from bottle import route, run, debug, template, request, redirect
# separating these for organization
@route("/")
@route("/todo")
def todo_list():
# shows the curr... | ks20146/Major-Project | todo.py | todo.py | py | 1,828 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sqlite3.connect",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "bottle.template",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "bottle.route",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "bottle.route",
"line_... |
16920270922 | # needed to be able to import protos code
import json
import sys
from datetime import datetime, timedelta
from itertools import count
from pathlib import Path
import grpc
from . import _iam, _mysql, _postgres
from ._iam import (
assume_role,
get_local_arn,
obtain_claimed_arn,
obtain_credentials,
o... | cyralinc/approzium | sdk/python/approzium/_authenticator.py | _authenticator.py | py | 9,393 | python | en | code | 57 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "itertools.count",
"lin... |
717642409 | """
This module represents what we believe *should* be in .graph.graph().
"""
from django.conf import settings
from rdflib import Graph, URIRef, Literal
from rdf.ns import *
from rdf.utils import graph_from_triples
from . import namespace as my
APP_URI = URIRef(settings.RDF_NAMESPACE_ROOT)
def triples():
"""... | UUDigitalHumanitieslab/readit-interface | backend/vocab/fixture.py | fixture.py | py | 2,008 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "rdflib.URIRef",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.conf.settings.RDF_NAMESPACE_ROOT",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 14,
"usage_type": "name"
},
{
"a... |
8024516354 | import psycopg2
import matplotlib.pyplot as plt
import pandas as pd
from pandas import DataFrame
import re
import os
conn = psycopg2.connect("host = localhost dbname = fakenews_1m user = postgres password =12PRu7dh56")
cur = conn.cursor()
#query 2
cur.execute("""SELECT t.type_name, COUNT(DISTINCT d.domain_id)
... | kbern/Fake-News | new_transaction.py | new_transaction.py | py | 3,294 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "psycopg2.connect",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.title",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "matplotlib.p... |
1628113306 | from functools import reduce
from operator import mul
def interpolate(data):
x_data = data['x']
y_data = data['y']
li_x = lambda x, index: {
reduce(mul, [
x - x_data[i]
if i != index
else 1
for i in range(len(x_data))
])
}
return la... | kkkooolllyyyaaa/computational_math | comp-math-5/lagrange_pol.py | lagrange_pol.py | py | 474 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "functools.reduce",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "operator.mul",
"line_number": 10,
"usage_type": "argument"
}
] |
38388020426 | # web driver and html parsing
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from bs4 import BeautifulSoup
import re
# utilities
import requests
import csv
from tqdm import tqdm
# user defined
from helper_functions import *
# Get all URLs and remove NoneType values
cat_... | SarahAmiraslani/zara-scrape | outerknown.py | outerknown.py | py | 7,590 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "selenium.webdriver.ChromeOptions",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 44,
"usage_type": "call"
},
{
"api... |
14125113512 | import numpy as np
import pandas as pd
from sklearn import tree
from IPython.display import Image
from sklearn.externals.six import StringIO
import pydotplus
input_file = "PastHires.csv"
df = pd.read_csv(input_file, header = 0)
d = {'Y': 1, 'N': 0}
df['Hired'] = df['Hired'].map(d)
df['Employed?'] = df['... | sca-nit-jsr/Hactoberfest-2k19 | coding/DecisionTree.py | DecisionTree.py | py | 1,211 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sklearn.tree.DecisionTreeClassifier",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "sklearn.tree",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "skle... |
29198103420 |
import sys
import logging
from logging.handlers import SysLogHandler
LOG_SERVER_ADDR = '<putyoursitenameher>'
LOG_SERVER_PORT = 569 #default can be customized
logger = logging.getLogger('Manthis')
# LOCAL5 --> manthis.log
# LOCAL6 --> logserver.log
handler = SysLogHandler((LOG_SERVER_ADDR, LOG_SERVER_PORT), facili... | stacywebb/manthis | logger/BasicLogging.py | BasicLogging.py | py | 613 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.handlers.SysLogHandler",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "logging.handlers.SysLogHandler.LOG_LOCAL5",
"line_number": 14,
"usage_type": "attribute"... |
31629855351 | from datetime import datetime
from sqlalchemy import (
Integer,
Float,
Column,
String,
ForeignKey,
Boolean,
DateTime,
BigInteger,
)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, backref
import pandas as pd
import numpy as np
from .mappi... | jabrell/pyeutl | pyeutl/orm/model.py | model.py | py | 22,792 | python | en | code | 13 | github-code | 6 | [
{
"api_name": "sqlalchemy.ext.declarative.declarative_base",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integer",
"line_number": 43,
"usage_type": "argument"
},
{
... |
74309727547 | import requests
import os
from twilio.rest import Client
import random
def calc_pecent(yesterday_data,day_before_yest_data):
yesterday_data = float(yesterday_data)
day_before_yest_data = float(day_before_yest_data)
data_percentage = float("{:.2f}".format((abs(yesterday_data-day_before_yest_data)*100)/yeste... | shuklaritvik06/PythonProjects | Day - 36/Stock_Alert/main.py | main.py | py | 2,367 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.environ.get",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "os.environ.get",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_... |
37735641630 | import sys
import os
import numpy as np
import matplotlib.pyplot as plt
import synergia
import math
import matplotlib
import options
########################################### Plotting Functions ###############################################
def lf_plot(lf_info, opts):
'''
Plot lattice functions on sa... | lynch829/beamsim | synergia/base_diagnostics/lfplot.py | lfplot.py | py | 5,941 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "matplotlib.rcParams",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "matplot... |
38050511552 | import tkinter as tk
from tkinter import ttk
import requests
from tkinter import messagebox
from PIL import Image, ImageTk
from datetime import datetime, timedelta
# Initialize Window
root = tk.Tk()
root.title("Weather App")
# Create a themed ttk style
style = ttk.Style(root)
style.theme_use("clam")
#... | archie-s/simple-weather-app | WeatherApp.py | WeatherApp.py | py | 4,566 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "tkinter.Tk",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "tkinter.ttk.Style",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tkinter.ttk",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_numb... |
10034140033 | import pandas as pd
import plotly.express as px
import csv
import operator
import ntpath
import matplotlib.pyplot as plt
import numpy as np
filename1='/Users/geerd/data/cases/helmond/drive test/4G network test helmond/latencies-2.csv'
def path_leaf(path):
head, tail = ntpath.split(path)
return tail or ntpat... | geerdkakes/graph-csv | graph-csv.py | graph-csv.py | py | 2,517 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "ntpath.split",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "ntpath.basename",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "csv.QUOTE_NONNUMERIC",
"l... |
21486532540 | from flask import Flask, redirect, request, session, json, jsonify, render_template
import ConfigParser, requests, re, os, time, sets
config_file = ConfigParser.RawConfigParser()
config_file.read('config.cfg')
app = Flask(__name__)
CONFIG = {
'APP_ID': config_file.get('deezer-api', 'APP_ID'),
'APP_SECRET': confi... | greird/deezpy | deez.py | deez.py | py | 12,034 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "ConfigParser.RawConfigParser",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "flask.re... |
30071847814 | """
we have added new properties in the 'case' and 'imaging_study' nodes, 'age_at_index_gt89' and 'age_at_imaging_gt89', respectively. All ages "greater than 89" must be replaced with NaN
"""
########################
import pandas as pd
import numpy as np
import sys
import gen3
from gen3.submission import Gen3Submissi... | uc-cdis/midrc-etl | misc/midrc_ingestion_TEMPLATE.py | midrc_ingestion_TEMPLATE.py | py | 19,272 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.insert",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "gen3.auth.Gen3Auth",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "gen3.submission.Gen3... |
8561553220 | import numpy as np
import cv2
import collections
from scipy import stats
import time
from filterpy.kalman import KalmanFilter
import pyautogui
# Haar-like features
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_default.xml')
# General kernel shape
kernel = np.ones((5,5),np.uint8... | pso91399/assistive-technology-cursor-control | hand_tracking/image_processing.py | image_processing.py | py | 6,402 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "cv2.CascadeClassifier",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.data",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "numpy.ones",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"lin... |
29171695759 | #This is the eleventh draft of my analysis.py file which will include comments, funtions and loops
#Author: Enda Lynch
#See README.md for Citations
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
irisCsv = pd.read_csv('IrisdataCSV.csv')
irisCsv.columns = ['sepal length'... | Lynch08/Pands-Project2021 | analysis.py | analysis.py | py | 10,389 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.melt",
"line_number": 83,
"usage_type": "call"
},
{
"api_name": "seaborn.catplot",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "seaborn.pairplot",
"l... |
73707641789 | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('post/<str:pk>', views.post, name='post'),
path('login', views.login_view, name='login'),
path('register', views.register_view, name='register'),
path('logout', v... | kirtondavid53/Django-Blog | posts/urls.py | urls.py | py | 583 | python | en | code | 0 | github-code | 6 | [
{
"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",
... |
39250162740 | import collections
import tabi.parallel.helpers
from tabi.parallel.core import InternalMessage
# Internal element
TableDumpV2Element = collections.namedtuple("TableDumpV2Element",
["asn",
"as_path",
... | ANSSI-FR/tabi | tabi/parallel/input/mabo.py | mabo.py | py | 4,463 | python | en | code | 104 | github-code | 6 | [
{
"api_name": "collections.namedtuple",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "collections.OrderedDict",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "tabi.parallel.helpers.parallel.helpers.get_as_origin",
"line_number": 35,
"usage_type": "ca... |
18996369952 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import redis
import global_list
from spiders import broadcast_douyu, broadcast_huya, broadcast_panda, broadcast_zhanqi
from apscheduler.schedulers.blocking import BlockingScheduler
# 将爬出的该游戏在所有平台上的房间放入redis
def put_data_in_redis(game, live_list):
r = redis.Redis(host='1... | CoooderSan/LGL | LGL/main.py | main.py | py | 1,282 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "redis.Redis",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "global_list.GLOBAL_GAME",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "spiders.broadcast_zhanqi.get_room_info",
"line_number": 23,
"usage_type": "call"
},
{
"a... |
10422936381 | #-*- coding: utf-8 -*-
"""Defines the `SingleValueIndex` class.
.. moduleauthor:: Martí Congost <marti.congost@whads.com>
"""
from BTrees.OOBTree import OOBTree
from cocktail.modeling import overrides
from .index import Index, undefined, Descending
class SingleValueIndex(Index):
"""An `index <Index>` where each ... | marticongost/cocktail | cocktail/persistence/singlevalueindex.py | singlevalueindex.py | py | 3,879 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "index.Index",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "BTrees.OOBTree.OOBTree",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "BTrees.OOBTree.OOBTree",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "index.Index... |
70674891069 | import logging
import string
import webapp2
from google.appengine.api import users
from blog.handlers import BlogHandler
from site.handlers import UserHandler, ErrorHandlers
urlconf = [
webapp2.Route(r'/0xadmin',
UserHandler, handler_method='admin', name='admin'),
webapp2.Route(r'/', BlogHandler, ha... | karmadonov/0xblog | start.py | start.py | py | 885 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "webapp2.Route",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "site.handlers.UserHandler",
"line_number": 13,
"usage_type": "argument"
},
{
"api_name": "webapp2.Route",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "blog.handle... |
9422269899 | import sys
import pandas as pd
from PyQt5.QtWidgets import QApplication, QMainWindow, QPushButton, QDateEdit, \
QVBoxLayout, QWidget, QComboBox
from matplotlib.backends.backend_qt5agg import \
FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
import matplotlib.pyplot as plt
import numpy as ... | joshuamoses926/Temperature-Predition-ChatGPT | main.py | main.py | py | 2,579 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "PyQt5.QtWidgets.QMainWindow",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtWidgets.QVBoxLayout",
"line_number": 21,
"usage_type": "call"
},
{
"a... |
36004435637 | # Standard libraries
import socket
import select
import threading
import logging
class Connection():
'''
Represents a connection with a server's client.
Besides the methods described in this class, some methods
can be added to instances according to the type of connection.
Fo... | echebbi/dnc_chat | server/tcp.py | tcp.py | py | 9,393 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "threading.Event",
"line_number": 114,
"usage_type": "call"
},
{
"api_name": "socket.socket",
"line_number": 129,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 129,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_STRE... |
30217056704 | #Used Methods: class, def__init__, def(), urllib.parse (zur Anzeige von Bildern durch crawlen) html.parser, p.attrs, select_one (CSS-Selector), .text, csv- Import
import time
from urllib.parse import urljoin # verwenden für einen relativen Pfad. Abfrage von Bildern
import requests
from bs4 import BeautifulSoup
url... | ThePeziBear/MyPythonLibrary | Crawler/Crawler_mehrere Seiten.py | Crawler_mehrere Seiten.py | py | 3,480 | python | de | code | 0 | github-code | 6 | [
{
"api_name": "urllib.parse.urljoin",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "time.sleep",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_n... |
74731707388 | from django.db import models
import uuid as uuid_lib
from django.core.validators import MinValueValidator, MaxValueValidator
from django.utils.timezone import now
class Tank(models.Model):
id = models.UUIDField(
default=uuid_lib.uuid4,
unique=True,
primary_key=True,
editable=False,... | LuannMateus/gas-station-backend | gas_station_api/app/models.py | models.py | py | 1,932 | python | en | code | 0 | github-code | 6 | [
{
"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.UUIDField",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "... |
49976271 | from typing import List
class Solution:
def nextGreaterElement(self, nums1: List[int], nums2: List[int]) -> List[int]:
nextGreatInd = [-1] * len(nums2)
# stack
st = []
st.append(0)
for i in range(1, len(nums2)):
if nums2[st[-1]] < nums2[i]:
while... | code-cp/leetcode | solutions/496/main.py | main.py | py | 835 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
}
] |
44309154279 | # A simple method for making nouns plural
def plural (word):
if word.endswith('y'):
return word[:-1] + 'ies'
elif word[-1] in 'sx' or word[-2:] in ['sh', 'ch']:
return word + 'es'
elif word.endswith('an'):
return word[:-2] + 'en'
else:
return word + 's'
def unusual_word... | nephiw/nltk-book-notes | text_proc.py | text_proc.py | py | 744 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "nltk.corpus.words.words",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "nltk.corpus",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "nltk.corpus.stopwords.words",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "... |
34990682235 | """add event table
Revision ID: cce89c1368
Revises: 543ce7d10ffa
Create Date: 2013-09-16 12:13:12.141385
"""
# revision identifiers, used by Alembic.
revision = 'cce89c1368'
down_revision = '543ce7d10ffa'
from alembic import op
import sqlalchemy as sa
from datetime import datetime
def upgrade():
op.create_ta... | ktmud/david | alembic/versions/cce89c1368_add_event_table.py | cce89c1368_add_event_table.py | py | 693 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "alembic.op.create_table",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integ... |
74976770426 | import sys
import pygame
import random
from pygame.locals import QUIT, KEYDOWN
class Block:
def __init__(self):
self.position = {
'x': 5,
'y': 2
}
self.bricks = []
def init_position(self):
self.position = {
'x': 5,
'y': 2
... | ssoxong/Brick_out | tetris.py | tetris.py | py | 7,065 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.draw.rect",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "pygame.draw",
"line_number": 62,
"usage_type": "attribute"
},
{
"api_name": "pygame.draw.rect",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "pygame.draw",
... |
2803589455 | from yolo_detection_multi import multi_object_detect
import yolo_detection_multi
import cv2
import time
from math import sqrt
class Object():
def __init__(self,number_obj):
self.coordinates = [width//2+30*(number_obj-1), height//2]
self.id_obj = number_obj
self.find = False
self.c... | slavic67/CAM-Based-Object-Detection-Identification | soft/python/probe.py | probe.py | py | 2,799 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "math.sqrt",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 54,
... |
3037788970 | from collections import deque
def solution(priorities, location):
answer, i = 0, 0
queue = deque()
for p in priorities:
queue.append((i, p))
i+=1
while queue:
cur = queue.popleft()
if any(cur[1] < q[1] for q in queue):
queue.append((cur))
else:
... | sunyeongchoi/sydsyd_challenge | argorithm/printer_re.py | printer_re.py | py | 498 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "collections.deque",
"line_number": 5,
"usage_type": "call"
}
] |
42909724750 | # -*- coding: utf-8 -*-
"""
Created on Tue Feb 16 14:00:41 2016
@author: EvgenyKashin
"""
import requests
import pandas as pd
import json
from pandas import DataFrame
import time
import os
import private
def get_JSON_data(url):
d = requests.get(url)
return json.loads(d.text)
def loa... | EvgenyKashin/VkChecker | scraper.py | scraper.py | py | 3,691 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line... |
19643747966 | import unittest
import sys
from pathlib import Path
sys.path.append(str(Path(__file__).parent.parent))
import rule # type: ignore # noqa: E402
from utils import IPair
data = ['J[0.5]->JJ', 'A<F[0.5]->FF',
'A<B>A->FB', '!A<K>!B->KBAA',
'A<F>!A->FF', 'J->F+-A']
grwb = lambda val: rule.get_rul... | LogosITO/LSystem | core/test/test_rule.py | test_rule.py | py | 3,229 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "rule.get_rules_with_base",
... |
28912468571 | import cv2
import numpy as np
img = cv2.imread('page.jpg')
cv2.namedWindow('Frame',cv2.WINDOW_NORMAL)
x1,y1,w1,h1 = cv2.getWindowImageRect('Frame')
resize = cv2.resize(img, (w1,h1))
cv2.namedWindow('Contour',cv2.WINDOW_NORMAL)
img_gray = cv2.cvtColor(resize,cv2.COLOR_BGR2GRAY)
kernel = np.ones((5,5))
dilate = cv2.d... | niddhhii/ImageProcessing_Nidhi | Assignment_7/Q2.py | Q2.py | py | 1,098 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cv2.imread",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "cv2.namedWindow",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.WINDOW_NORMAL",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "cv2.getWindowImageRect... |
22428974081 | import sys
import subprocess
from lib import services_patch
from lib import adb_patch
from lib import pm_patch
def main():
# check device
if not adb_patch.adb_devices():
print("Please Connect device to PC and Retry")
sys.exit()
else:
print("adb_device end \n")
# check root
... | uwol1116/FCS_IoT | lib/patch_test.py | patch_test.py | py | 2,591 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "lib.adb_patch.adb_devices",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "lib.adb_patch",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "sys.exit",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "lib.adb_patch.auth_c... |
6058761196 | import argparse
import os
import tweepy
import markovify
import secrets
import news
def create_markov(filename):
with open(filename) as f:
data = f.read()
return markovify.NewlineText(data, state_size=3)
def tweet(message):
auth = tweepy.OAuthHandler(secrets.consumer_key, secrets.consumer_secret)
a... | jgbarcos/botnews | bot.py | bot.py | py | 1,253 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "markovify.NewlineText",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "tweepy.OAuthHandler",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "secrets.consumer_key",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "s... |
13648970105 | from django.contrib import admin
from django.urls import path, include, re_path
from drf_yasg import openapi
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from rest_framework_simplejwt.views import (
TokenObtainPairView,
TokenRefreshView,
TokenVerifyView,
)
def openapi_... | MohammadrezaAmani/BitPinTask | commentive/urls.py | urls.py | py | 1,860 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "drf_yasg.openapi.Info",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "drf_yasg.openapi",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "drf_yasg.openapi.Contact",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "drf_y... |
12997080838 | # encoding: utf-8
from itertools import product
from math import floor, ceil
from plotly.subplots import make_subplots
import plotly.graph_objects as go
import pandas as pd
def non_aligned_count(a_sequence, k, lambda_value=1):
'''
:param a_sequence: a poisson.Sequence object
:param k:
:param lamb... | kapow-dc-uba-ar/poisson | poisson/analysis/poisson.py | poisson.py | py | 5,387 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "math.floor",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "math.floor",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "itertools.product",
"line_number": 83,
"usage_type": "call"
},
{
"api_name": "math.floor",
"line_number... |
19363476868 | # Importing Libraries
import os
import pandas as pd
from pydub import AudioSegment
from gtts import gTTS
# Function to convert text to speech
def textToSpeech(text,fileName):
myText = str(text)
language = 'hi'
myObj = gTTS(text = myText, lang = language, slow = False)
myObj.save(fileName)
# Returns p... | AnkitM18-tech/Railways-Announcement-System | main.py | main.py | py | 2,693 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "gtts.gTTS",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "pydub.AudioSegment.empty",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pydub.AudioSegment",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "pydub.AudioSegm... |
75316055546 | import os
import wx
from ..model.project import Project
from ..textbox import LayoutDimensions
from ..textbox.textbox import TextSmartBox, TextInputLayout
from ..textbox.pathbox import PathSmartBox, PathInputLayout, SmartPathInputLayout
from ..textbox.smart import SmartComboBox
from ..textbox.combobox import ComboBox... | JoenyBui/boa-gui | boaui/form/file.py | file.py | py | 9,885 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "wx.Dialog",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "wx.OK",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "wx.CANCEL",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "wx.Dialog.__init__",
"li... |
12605462499 | # -*- coding: utf-8 -*-
import upyun, random, uuid, hashlib, pymysql, time
import hashlib, requests, re, logging
from datetime import datetime, timedelta
from faker import Faker
logging.basicConfig(filename="/var/www/namephoto/userssss/log.txt", filemode="a",
format="%(asctime)s %(name)s:%(levelna... | tong-yao/userss | download.py | download.py | py | 3,139 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "upyun.UpYun",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pymysql.connect",
... |
7317608447 | from imutils.video import VideoStream
from pyzbar import pyzbar
import datetime
import imutils
import time
import cv2
import re
import requests
import pandas as pd
from NFCeDecode import NFCeDecode
import warnings
warnings.filterwarnings("ignore")
found = set()
regex_chave = "p=(\\d{44})"
path_csv_cupons = "./data/cu... | rrpronaldo/NFCe_Sefaz | WebCamZBar.py | WebCamZBar.py | py | 3,405 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "NFCeDecode.NFCeDecode",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pandas... |
9533988331 | from django.shortcuts import render
from .models import Opportunity, Shelter
import os
from dotenv import load_dotenv
load_dotenv()
from geopy.geocoders import GoogleV3
from geopy import distance
from pprint import pprint
# Create your views here.
API_KEY = os.getenv('MAP_API')
geo = GoogleV3(api_key=API_KEY)
def geoc... | sqwatato/HomeBound | main/views.py | views.py | py | 3,120 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "geopy.geocoders.GoogleV3",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.shortcuts... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.