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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8493230177 | from re import A
from android import python_act
from android.runnable import run_on_ui_thread
from jnius import autoclass, cast
from android_api import activity, SDK_INT
AndroidString = autoclass('java.lang.String')
Context = autoclass('android.content.Context')
NotificationBuilder = autoclass('android.app.Notificati... | tde-nico/Houseki | android_api/notification.py | notification.py | py | 3,872 | python | en | code | 1 | github-code | 69 | [
{
"api_name": "jnius.autoclass",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "jnius.autoclass",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "jnius.autoclass",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "jnius.autoclass",
"... |
14335221544 | import os
from pydub import AudioSegment
import threading
genres = 'blues classical country disco hiphop metal pop reggae rock'
genres = genres.split()
class myThread(threading.Thread):
def __init__(self, genre):
threading.Thread.__init__(self)
self.genre = genre
def run(self):
print... | Modko42/urbansound_classifier | dipterv1/helper_scripts/splitter.py | splitter.py | py | 1,113 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "threading.Thread",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "threading.Thread.__init__",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "... |
73867572701 | import numpy as np
import qoplots.qoplots as qoplots
qoplots.init("rose_pine", doc_type = "presentation")
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
import time
from fractions import Fraction as Frac
def wave(idx, w, x_max, x):
x_local = x + x_max * idx
if idx % 2 ... | pbrookeschambers/Outreach | activities/Sound/animations/wavelength/wavelength.py | wavelength.py | py | 3,286 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "qoplots.qoplots.init",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "qoplots.qoplots",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "numpy.sin",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_num... |
26687478339 | """
Author: Rambod Azimi
This Python code will make use of numpy and scikit-learn libraries to implement and utilize the Logistic Regression
machine learning algorithm.
"""
import numpy as np
from sklearn.linear_model import LogisticRegression
# defining our training set examples
X_train = np.array([[0.5, 1... | rambodazimi/Logistic-Regression | Logistic Regression scikit-learn.py | Logistic Regression scikit-learn.py | py | 892 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "numpy.array",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.LogisticRegression",
"line_number": 14,
"usage_type": "call"
}
] |
7175025274 | from flask import request
from flask_restful import Resource
from app.models import db, Customers, CustomersSchema
customers_schema = CustomersSchema(many=True)
customer_schema = CustomersSchema()
class CustomersResource(Resource):
def get(self):
key = request.args.get('key')
if key:
... | uvinod/flask-web-api | app/resources/Customers.py | Customers.py | py | 577 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "app.models.CustomersSchema",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "app.models.CustomersSchema",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask_restful.Resource",
"line_number": 8,
"usage_type": "name"
},
{
"api_nam... |
7030039771 | # Construct a Trie from a Collection of Patterns
import itertools as it
import sys
from collections import defaultdict
class Trie:
def __init__(self, patterns):
self._node_id_generator = it.count()
self._root = next(self._node_id_generator)
self._adjacency_list = self._build_trie_from_pat... | ghostrider77/BioinformaticsProblems | Python/textbook_track/chapter09/ba9a.py | ba9a.py | py | 1,628 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "itertools.count",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sys.stdin.read",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
... |
34933611574 | import logging
import pandas as pd
from django.core.management.base import BaseCommand
from stk.models import Station
logger = logging.getLogger(__name__)
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument('input_path', type=str, nargs=1)
def handle(self, *args, **op... | napmn/technical-inspections | stk/management/commands/load_stations.py | load_stations.py | py | 996 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "pandas.read_excel",
"line_number": 17,
"usage_type": "call"
},
{
"api_na... |
32039830537 | from tkinter import *
from tkinter import ttk
from tkinter import filedialog
from tkinter import messagebox
from tkcalendar import *
from datetime import datetime
from PIL import ImageTk, Image
from mysql import *
import mysql.connector
import csv
import re
from fpdf import FPDF
import ConnConfig
import ... | W3nce/Manager | ReportTest.py | ReportTest.py | py | 146,978 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "ConnConfig.host",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "ConnConfig.username",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "ConnConfig.password",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name":... |
29868438235 | import numpy as np
import scipy.signal as signal
import scipy.ndimage as ndimg
# import cupyx.scipy.ndimage as cim
# import cupy as cp
from definitions import BITSHIFT
import cv2
shift_left_float = lambda arr: (arr*(2**BITSHIFT)).astype('int64')
shift_left_int = lambda arr: (arr.astype('int64') << BITSHIFT)
shift_righ... | BystrickyK/opencv-realtime | tools/filters.py | filters.py | py | 1,689 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "definitions.BITSHIFT",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "definitions.BITSHIFT",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "definitions.BITSHIFT",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "definit... |
10029712514 | from librec_auto.core.cmd import Cmd
from librec_auto.core.util import Files
from librec_auto.core import ConfigCmd
from librec_auto.core.util import Status, StudyStatus
import optuna
import joblib
import numpy as np
class OptimizationFunction():
def __init__(self, type, new_value, old_value, fairness, acceptable_... | that-recsys-lab/librec-auto | librec_auto/core/cmd/tell_cmd.py | tell_cmd.py | py | 6,090 | python | en | code | 26 | github-code | 69 | [
{
"api_name": "librec_auto.core.cmd.Cmd",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "librec_auto.core.util.StudyStatus",
"line_number": 75,
"usage_type": "call"
},
{
"api_name": "librec_auto.core.util.Status",
"line_number": 86,
"usage_type": "call"
},
... |
33590405750 | """
Скрипт для генерации контента произведения исскуства
"""
from pymongo import MongoClient
DOC_IDS = "_id"
DOC_EXTERNAL_IDS = "external_ids"
DOC_DOCS = "docs"
DOC_NAME = 'name'
DOC_TYPE = 'type'
DOC_AUTHOR = 'author'
DOC_DATE = 'date'
DOC_AUDIO = 'audio'
DOC_IMG = 'img'
DOC_DESCRIPTION = 'description'
CONNECTION = ... | botanhuligan/vk-backend | icaas/generate_arts.py | generate_arts.py | py | 1,778 | python | ru | code | 1 | github-code | 69 | [
{
"api_name": "pymongo.MongoClient",
"line_number": 17,
"usage_type": "call"
}
] |
37311356271 |
import os, sys
import json
methods = ['GET','POST','DELETE','PUT']
print("*"*50+'\n\t'+'WELOCME TO REST CLIENT CLI'+'\n'+'*'*50)
url = input("Enter Url: ")
method = methods[int(input("Method [1]GET [2]POST [3]DELETE [4]PUT :"))-1]
post_data = {}
if (method=="POST"):
key, val = "pre", "pre"
while len(... | shihabuddin413/CliRestClient | rest_client/main.py | main.py | py | 766 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "json.dumps",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.system",
"line_number": 33,
"usage_type": "call"
}
] |
13896791891 | #!/usr/bin/env python
from userdata import USER_INFO
import os
working_dir = os.path.dirname(os.path.realpath(__file__))
activate_this = os.path.join(working_dir, "venv_bottle/bin/activate_this.py")
exec(open(activate_this).read(), {'__file__': activate_this})
from bottle import route, run, template, request, static_... | mitschix/linktree-bottlepy | app.py | app.py | py | 1,454 | python | en | code | 1 | github-code | 69 | [
{
"api_name": "os.path.dirname",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_n... |
1362661654 | import httpx
import logging
from contextlib import suppress
headers = httpx.Headers(
{
b"Accept": b"*/*",
b"Accept-Encoding": b"gzip, deflate",
b"Connection": b"keep-alive",
b"Referer": "https://google.com/",
b"User-Agent": b"animdl/1.4.20",
}
)
def get_safeoverride(f... | Kadantte/animdl | animdl/core/cli/http_client.py | http_client.py | py | 651 | python | en | code | null | github-code | 71 | [
{
"api_name": "httpx.Headers",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "contextlib.suppress",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "httpx.Client",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger"... |
74655004378 | import datetime
import pygame
from constants import TIME
pygame.init()
class Start:
'''Начальная позиция'''
def change_state(self, user):
'''Начало тренировки'''
user.timer = pygame.time.get_ticks()
user.word = ''
user.printed = 0
user.correct = 0
return Write(... | Bakytw/Keyboard-Trainer | src/conditions.py | conditions.py | py | 1,139 | python | ru | code | 0 | github-code | 69 | [
{
"api_name": "pygame.init",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "pygame.time.get_ticks",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pygame.time",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.n... |
214435247 | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
from scrapy import signals
import json
import codecs
from twisted.enterprise import adbapi
from datetime import datetime
from ha... | dongxiaoping1015/something | scrapytest2/scrapytest2/pipelines.py | pipelines.py | py | 3,882 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "json.dumps",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "MySQLdb.cursors",
"line_number": 54,
"usage_type": "attribute"
},
{
"api_name": "twisted.enterprise.adbapi.ConnectionPool",
"line_number": 57,
"usage_type": "call"
},
{
"api_name... |
70402611429 | # Copyright 2022 juanpgarza - Juan Pablo Garza <juanp@juanpgarza.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields, api, _
from odoo.exceptions import ValidationError, UserError
from datetime import datetime
from odoo.osv import expression
from odoo.tools imp... | juanpgarza/account-addons | point_of_payment/models/pop_config.py | pop_config.py | py | 5,210 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "odoo.models.Model",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "odoo.fields.Char",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "odoo.fields",
... |
17524749157 | import gettext
import multiprocessing as MPR
import os
import os.path as osp
import queue
import re
import signal
import tempfile
import time
import traceback
from functools import partial
from glob import glob
from subprocess import PIPE, Popen
import code_aster.Messages
from code_aster.Messages import UTMESS, Messag... | ehmoussi/code_aster | astest/supv002a.py | supv002a.py | py | 15,649 | python | en | code | 3 | github-code | 69 | [
{
"api_name": "code_aster.Messages.MessageLog.default_args.copy",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "code_aster.Messages.MessageLog.default_args",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "code_aster.Messages.MessageLog",
"line_numb... |
29710839209 | import pandas as pd
from rdflib import URIRef, BNode, Literal, Graph
from rdflib.namespace import RDF, RDFS, FOAF, XSD
from rdflib import Namespace
import numpy as np
import math
import sys
import argparse
import json
import html
import requests
from openpyxl import Workbook, load_workbook
from openpyxl.styles import F... | nakamura196/db2 | batch/020_create_excel.py | 020_create_excel.py | py | 6,265 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "json.load",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "openpyxl.styles.Font",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "openpyxl.load_workbook",
... |
25850640910 | import numpy as np
import math
from matplotlib import pyplot as plt
from sklearn.preprocessing import normalize, StandardScaler
from sklearn import datasets
def main2d():
means = (0, 0)
cov = np.array([[1.9, 1.2], [1.2, 1.9]])
A = np.random.multivariate_normal(means, cov, 100).transpose()
C = normalize(A)
eig_va... | SelyankinFyodor/theory-of-economic-decision-making-labs | lab2/index.py | index.py | py | 3,933 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "numpy.array",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.random.multivariate_normal",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "sklear... |
7191805671 | from datetime import timedelta
from typing import Any, Tuple, Optional
from pyflink.table.types import DataType, DataTypes
from feathub.common.exceptions import FeathubException
from feathub.feature_views.feature import Feature
from feathub.feature_views.transforms.agg_func import AggFunc
from feathub.feature_views.t... | alibaba/feathub | python/feathub/processors/flink/table_builder/aggregation_utils.py | aggregation_utils.py | py | 3,372 | python | en | code | 266 | github-code | 71 | [
{
"api_name": "pyflink.table.types.DataType",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "feathub.feature_views.transforms.agg_func.AggFunc",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "datetime.timedelta",
"line_number": 30,
"usage_type": "nam... |
12223967236 | from django.http import JsonResponse
from django.shortcuts import redirect, render
from Shop.form import CustomUserForm,BrandForm,ProductForm
from . models import *
from django.contrib import messages
from django.contrib.auth import authenticate,login,logout
import json
from django.http import HttpResponseRedirect
from... | Nihalamujee/shoe_shopping_app | Shop/views.py | views.py | py | 8,112 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.shortcuts.render",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "Shop.form.CustomUserForm",
"line_number": 21,
"usage_type": "call"
},
{
"api_name... |
14736435307 | import logging
import json
import traceback
from time import sleep
from decimal import Decimal
from django.db import transaction
from django.db.models import Q
from dynamic_preferences.registries import global_preferences_registry
from app.models import ServerMember, AirdropTask
from evosbot.celery import app
from ev... | pavelshmk/evosbot | app/tasks/airdrop.py | airdrop.py | py | 4,463 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "dynamic_preferences.registries.global_preferences_registry.manager",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "dynamic_preferences.registries.global_preferences_registry",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "app.models.ServerMe... |
8260443143 | import json
import csv
from ibm_watson import AssistantV1
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
fold = 1
#----------------------------------------------------------------------
dataset = {}
# with open(f'datasetsCV/noEntityFold{fold}Train.csv') as csv_file:
with open('datasetsCV/EntityTrain.... | JarneDeschacht/Bachelorproef | scripts/trainIBMWatson.py | trainIBMWatson.py | py | 1,380 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "csv.reader",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "ibm_cloud_sdk_core.authenticators.IAMAuthenticator",
"line_number": 29,
"usage_type": "call"
},
{
"api_name"... |
18681314928 | from .astronomy_event_code import AstronomyEventCode
from libtad.datatypes.time import TADDateTimeOffset
import xml.etree.ElementTree as ET
class AstronomyDayEvent:
"""
A class used to store events happening at a given day.
...
Attributes
----------
type : AstronomyEventCode
Indicates... | timeanddate/libtad-python | libtad/datatypes/astro/astronomy_day_event.py | astronomy_day_event.py | py | 2,901 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "xml.etree.ElementTree.Element",
"line_number": 49,
"usage_type": "attribute"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 49,
"usage_type": "name"
},
{
"api_name": "astronomy_event_code.AstronomyEventCode",
"line_number": 50,
"usage_type": "name... |
72940133670 | # The first principal component
# The first principal component of the data is the direction in which the data varies the most. In this exercise, your job is to use PCA to find the first principal component of the length and width measurements of the grain samples, and represent it as an arrow on the scatter plot.
# Th... | CodeInDna/Data_Scientist_With_Python | 15_Unsupervised Learning in Python/08_Intrinsic_Dimension.py | 08_Intrinsic_Dimension.py | py | 1,888 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "sklearn.preprocessing.StandardScaler",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "sklearn.decomposition.PCA",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "sklearn.pipeline.make_pipeline",
"line_number": 42,
"usage_type": "call"
... |
8522266131 | from setuptools import setup
from MAVdataflash.__version__ import __version__ as version
with open('requirements.txt') as req:
install_requires = req.read()
setup(name='MAVdataflash',
version=version,
url='https://github.com/generalaeronautics/MAVdataflash',
description='Read, analyze and visualize *.... | generalaeronautics/MAVdataflash | setup.py | setup.py | py | 664 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "setuptools.setup",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "MAVdataflash.__version__.__version__",
"line_number": 8,
"usage_type": "name"
}
] |
1271032282 | import pandas as pd
import numpy as np
from sklearn.cross_decomposition import PLSRegression as pls
import w2vMods.mBERT as mb
class regressor(mb.axComp):
def __init__(self, decomp_size):
super(regressor, self).__init__()
self.decomp_size = decomp_size
self.target_vocab = {}
self.v... | zaqari/w2v-metaphor | BaroniZamperelli.py | BaroniZamperelli.py | py | 754 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "w2vMods.mBERT.axComp",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "w2vMods.mBERT",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "sklearn.cross_decomposition.PLSRegression",
"line_number": 25,
"usage_type": "call"
}
] |
30884456889 | import abc
import typing
import pydantic
S = typing.TypeVar('S')
T = typing.TypeVar('T')
@pydantic.dataclasses.dataclass(frozen = True, kw_only = True, config = {'arbitrary_types_allowed': True})
class Error(RuntimeError, typing.Generic[S]):
input : S
exception : Exception
@pydantic.dataclasses.dataclass(f... | MentalBlood/conveyor | conveyor/core/Worker/Processor.py | Processor.py | py | 778 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "typing.TypeVar",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "typing.TypeVar",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "typing.Generic",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "pydantic.dataclasses.... |
33027571732 | import random
from dataset_utility import MRFDatasetUtility as mrfdu
from demographic_utils import DemographicUtils
from utils import loadObjectsFromJsonFile
def analyseMRFWorkerStats():
# workers = mrfdu.loadAndCleanMRFDataset('../data/mturk_data/', '../data/mrf_turk_processed.json')
workers = loadObjectsFro... | ashkankzme/perception | src/mrf_analysis.py | mrf_analysis.py | py | 3,938 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "utils.loadObjectsFromJsonFile",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "utils.loadObjectsFromJsonFile",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "demographic_utils.DemographicUtils.extractWorkerId",
"line_number": 85,
"usage... |
29900113109 | import streamlit as st
import pickle
import os
import pandas as pd
import numpy as np
ROOT_DIR = os.getcwd()
SAVED_DIR_PATH = "saved_models"
SAVED_ZERO_FILE="0"
MODEL_FILE_DIR ="model"
MODEL_FILE_NAME = "model.pkl"
TRANSFORMER_FILE_DIR="transformer"
TRANSFORMER_FILE_NAME="transformer.pkl"
# TARGET_ENCODER_FILE_DIR="ta... | Milind-Shende/Iryss | Iryss_app.py | Iryss_app.py | py | 6,010 | python | en | code | 1 | github-code | 69 | [
{
"api_name": "os.getcwd",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": ... |
44203623272 | import sys
import json
import os
from nltk.tokenize import word_tokenize
import nltk
from nltk.corpus import stopwords
import unicodedata
import string
import math
import time
import csv
import collections
from collections import defaultdict
nltk.download('punkt')
LABELS_DIC = ["business" ,"entertainment"... | zqq66/ML_codebase | KNN/knn_create_model.py | knn_create_model.py | py | 5,245 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "nltk.download",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "nltk.tokenize.word_tokenize",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "string.punctuation",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "jso... |
6906625407 | import os
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import time
import random
from tqdm import tqdm
import pickle
import json
from config import *
import utils.nn_utils as nn_utils
from utils.nn_utils import batch_iter
from utils.vocab import Voca... | zkcpku/HGT-HPG | main_forCSN.py | main_forCSN.py | py | 8,190 | python | en | code | 9 | github-code | 71 | [
{
"api_name": "utils.log_utils.logWriter",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "random.seed",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.se... |
6022702079 | #!/usr/bin/env python
# encoding: utf-8
# @version:
# @author: liduo
# @license:
# @file: start.py
# @time: 2018/5/30 下午10:24
from multiprocessing import Pool
import os
def run():
# 发送命令,启动一个爬虫
cmd = "scrapy crawl bilibili_spider"
os.system(cmd)
def main(number):
# 创建进程池
p = Pool(number)
... | Wangler2333/bilibili_video_stat | bilibili/start.py | start.py | py | 666 | python | en | code | 59 | github-code | 71 | [
{
"api_name": "os.system",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Pool",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 31,
"usage_type": "attribute"
}
] |
70109711591 | from typing import List
class CheckIfNAndItsDoubleExist:
def checkIfExist(self, arr: List[int]) -> bool:
mySet = set()
for n in arr:
if (n * 2 in mySet) or (n % 2 == 0 and n / 2 in mySet):
return True
mySet.add(n)
return False
check = CheckIfNAndIt... | egch/helloPython | src/leetcode/2023/CheckIfNAndItsDoubleExist.py | CheckIfNAndItsDoubleExist.py | py | 405 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "typing.List",
"line_number": 5,
"usage_type": "name"
}
] |
8893889722 | from pathlib import Path
root_dir = Path('d:/python/Automation/RestAPI-Example/PathFiles/Example1/files/') #memanggil file yg otomatis akan dilakukan rename
file_paths = root_dir.iterdir() #fungsi iterdir ini mengembalikan nilai true jika file yang dipanggil sebelumnya memang ada disuatu direktori
print(Path.cwd()) #i... | U171N/Learning_AutomationPython | PathFiles/Example1/RenameFile.py | RenameFile.py | py | 740 | python | id | code | 0 | github-code | 71 | [
{
"api_name": "pathlib.Path",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "pathlib.Path.cwd",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 5,
"usage_type": "name"
}
] |
24897501342 | import HBond
from ZMAT import zmatObj,zmatName
from KDTree import KDTree
from PoseScorer import splitAtomsIntoChains,getTargetDict
from BaseWaters import getHBDandHBA,getAcceptorStem,getPlaneStem
import math
import Counter
import multiprocessing
MinDist = 1.0
MaxDist = 2.8
OCbondLength = 1.23
CarbonylAtom = 4
CD = (30... | Dabrill/HaworthLab | EXSAN/Initializer.py | Initializer.py | py | 23,119 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "math.exp",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "multiprocessing.JoinableQueue",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "multiprocessing.Queue",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "Counter.... |
42504775284 | import pandas as pd
import logging
import os
import params
import frtb_lib
import argparse
##############################
# Setup Logging Configuration
##############################
logger = logging.getLogger(os.path.basename(__file__))
if not len(logger.handlers):
logger.setLevel(logging.DEBUG)
ch = logging.... | ivanshuer/FRTB | main.py | main.py | py | 2,233 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "logging.DEBUG",
"... |
73267796391 | import numpy as np
import util
from scipy import stats
from river.base import DriftDetector
from scipy.spatial import distance
import time
class LD3(DriftDetector):
def __init__(self, k=2, window_size = 250, correlation_delta=0.05, relax_threshold=0.2, max_window_size=1000):
super().__init__()
sel... | eldarfin/LD3-Label-Dependency-Drift-Detector | test.py | test.py | py | 5,850 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "river.base.DriftDetector",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "util.recip_rank",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "util.to_numpy_matrix",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "util.rec... |
13719846557 | '''
- Mejorar Button()
- Fondo con estrellas generadas con patrón aleatorio aleatoriamente(#)
- Añadir WASD
- Añadir más sonidos (pygame.mixer)
- Powerups para cambiar velocidad de nave
- Hacer metroids animados (GIF?)
- Ordenar y poner la misma palabra en el mismo tipo de funciones
'''
... | Vikms95/python-space-invaders | space_pirates_main.py | space_pirates_main.py | py | 2,698 | python | es | code | 0 | github-code | 71 | [
{
"api_name": "pygame.init",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "settings.Settings",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "pygame.display"... |
15763630548 | import logging
from ..consts import FormatField, StepField
from ..documents import DocumentFile
from ..templates.steps import create_step, Step, \
FormatStepException
LOG = logging.getLogger(__name__)
class Format:
FORMAT_META_REQUIRED = [FormatField.UUID,
FormatField.NAME,
... | ds-wizard/engine-tools | packages/dsw-document-worker/dsw/document_worker/templates/formats.py | formats.py | py | 2,966 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "consts.FormatField.UUID",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "consts.FormatField",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "cons... |
40778465187 | # 轮询 读取 信息 进行 更新
# 更新 时 标记 正在 工作
# (高级) 可配置 和 指定 什么 分支 需要 执行 的 测试集 需要 一个 文件
# 默认全部
# 系统
## ====================
import os
import sys
import subprocess
## ====================
# Redis
## ====================
import ownlib.redis_manager as rdm
## ====================
# 解析
## ====================
import json
import... | GCYYfun/MengXia | runner.py | runner.py | py | 5,558 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "sys.path",
"line_number": 35,
"usage_type": "attribute"
},
{
"api_name": "ownlib.redis_manager.RedisManager",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "ownlib.redis_manager",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "... |
1389962470 | from sedona.utils.geometry_serde import serialize, deserialize
from shapely.geometry import LineString, Point, Polygon, MultiPoint, MultiLineString, MultiPolygon
from shapely.wkb import dumps, loads
import time
def run_serialize_trial(geom, number_iterations, name):
print(f"{name} serialize trial:")
start_ti... | Kontinuation/sedona-python-serde | experi/bench_doug.py | bench_doug.py | py | 4,697 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "time.perf_counter_ns",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "shapely.wkb.dumps",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "time.perf_counter_ns",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "time.perf... |
72764401189 | # -*- coding: utf-8 -*-
# 函数形为y=kx+b ,leastsq
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import leastsq
def readData(fileName):
xcord=[]
ycord=[]
fr=open(fileName)
for line in fr.readlines():
lineArr = line.strip().split(',')
xcord.append(float(... | njusdp/leastsq | least_square_method.py | least_square_method.py | py | 1,159 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.array",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "scipy.optimize.leastsq",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.scat... |
12765816626 | #!/usr/bin/env python3
import argparse
import sys
from keras.models import Sequential
from keras.layers import Dense, Flatten
from ncaa_predict.data_loader import load_data_multiyear, N_PLAYERS, N_FEATURES
from ncaa_predict.util import list_arg
DEFAULT_BATCH_SIZE = 10000
DEFAULT_STEPS = sys.maxsize
if __name__ ==... | brendanlong/ncaa-predict | train.py | train.py | py | 2,450 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "sys.maxsize",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "ncaa_predict.util.list_arg",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "k... |
35629600660 | from django.shortcuts import render
from django.shortcuts import render,redirect
from django.http import HttpResponse
from django.contrib import messages
from django.core.mail import send_mail
from validate_email import validate_email
from .models import send,resume,contect,certificate,project
import datetime
# impor... | ashish8318/myportfolio | app/views.py | views.py | py | 2,914 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "models.certificate.objects.all",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "models.certificate.objects",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "models.certificate",
"line_number": 14,
"usage_type": "name"
},
{
... |
16332885660 | import torch
from progressbar import *
from Utils.utils import *
class CTCTester(object):
def __init__(self, model, test_dataloader, param):
super(CTCTester, self).__init__()
# ---- initialize
self.p_te = param.test
self.test_dataloader = test_dataloader
self.model = model
... | RuijieJ/DTRN-pytorch | Trainer/CTCTester.py | CTCTester.py | py | 2,369 | python | en | code | 6 | github-code | 71 | [
{
"api_name": "torch.load",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "torch.no_grad",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "torch.from_numpy",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "torch.Tensor",
"line_nu... |
18643829777 | # import torch
# import torch.nn as nn
# import torch.nn.functional as F
# from torch.nn.utils import weight_norm, spectral_norm
import numpy as np
import jax
import jax.numpy as jnp
import flax.linen as nn
from jax.nn.initializers import normal as normal_init
from jax.nn.initializers import constant as constant_init
f... | flyingblackshark/jax-so-vits-svc-5.0 | vits_decoder/mpd.py | mpd.py | py | 2,068 | python | en | code | 8 | github-code | 71 | [
{
"api_name": "flax.linen.Module",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "flax.linen",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "flax.linen.Conv",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "flax.linen",
"l... |
24790016916 | from flask import render_template
from flask.views import MethodView
import requests
import json
from google.cloud import translate
from google.cloud import translate_v2 as translate
import six
import os
class Index(MethodView):
def get(self):
#get weather conditions for Portland city
cur_weather ... | deepa-varghese-88/BubbleTeaStore-GPCAppEngine | index.py | index.py | py | 2,750 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "flask.views.MethodView",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "flask.render_template",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.enviro... |
74662295908 | from typing import List
class Solution:
def maximalRectangle(self, matrix: List[List[str]]) -> int:
if not matrix:
return 0
m = len(matrix)
n = len(matrix[0])
dp_u = [0] * n
dp_l = [0] * n
dp_r = [n] * n
res = 0
cur_left, cur_right = 0, n-1... | XinchaoGou/MyLeetCode | 85. Maximal Rectangle.py | 85. Maximal Rectangle.py | py | 1,969 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "typing.List",
"line_number": 3,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 47,
"usage_type": "name"
}
] |
9774606475 | # import openpyxl and tkinter modules
from tkinter import filedialog
from openpyxl import load_workbook
from tkinter import *
from Main import my_logic
# globally declare wb and sheet variable
# opening the existing excel file
wb = load_workbook('data.xlsx')
# create the sheet object
sheet = wb.active
def excel(... | kasimialam/Meeting_Manager_Bot | Meeting-Manager/tkinterInterface.py | tkinterInterface.py | py | 8,470 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "openpyxl.load_workbook",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "Main.my_logic",
"line_number": 124,
"usage_type": "call"
},
{
"api_name": "tkinter.filedialog.askopenfilename",
"line_number": 139,
"usage_type": "call"
},
{
"api_nam... |
74479398628 | import cv2
import dlib
import matplotlib.pyplot as plt
# Cargar los archivos de predicción
detector = dlib.get_frontal_face_detector()
predictor = dlib.shape_predictor('assets/pretrained_models/shape_predictor_68_face_landmarks.dat')
# Cargar la imagen
imagen = cv2.imread('assets/images/ale.jpg')
# Convertir la imag... | Mateo-Sanchez14/Facilal_Recognition | luis.py | luis.py | py | 962 | python | es | code | 0 | github-code | 71 | [
{
"api_name": "dlib.get_frontal_face_detector",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "dlib.shape_predictor",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "cv2.cvtC... |
3894842050 | import cvxpy as cp
from functools import partial
import math
import pandas as pd
import matplotlib.pyplot as plt
class product:
def __init__(self, price, carb):
self.price = price
self.carb = carb
class agent:
def __init__(self, u, product_l):
self.u = u
self.product_l = produ... | rtran-22/PAF-CarbonTax | lagrange_multiplier.py | lagrange_multiplier.py | py | 5,666 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "cvxpy.Variable",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "cvxpy.Minimize",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "cvxpy.Problem",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "cvxpy.Variable",
"lin... |
6770175157 | from cachecontrol import CacheControl
from cachecontrol.caches import FileCache
from datetime import date
from datetime import datetime
from datetime import timedelta
from enum import IntEnum
from time import sleep
from xml.sax.saxutils import XMLGenerator
import collections
import hashlib
import itertools
import json
... | nomis/sd2xmltv | sd2xmltv.py | sd2xmltv.py | py | 11,666 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "requests.utils.default_user_agent",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "requests.utils",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os... |
2055689229 | from django.shortcuts import render
# Create your views here.
############ MODELS #################
from .models import Accounts
from .models import Members
############ FORMS #################
# Accounts
from main.forms import LoginForm
from main.forms import RegisterForm
from main.forms import MemberForm
from... | azhan10/elder_challenge | website/main/views.py | views.py | py | 11,623 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "django.shortcuts.render",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 87,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 90,
"usage_type": "call"
},
{
"api_name"... |
20740517996 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from marionette_driver.errors import InvalidArgumentException
from marionette_harness import MarionetteTestCase
class... | WaterfoxCo/Waterfox-Classic | testing/marionette/harness/marionette_harness/tests/unit/test_window_rect.py | test_window_rect.py | py | 9,703 | python | en | code | 160 | github-code | 71 | [
{
"api_name": "marionette_harness.MarionetteTestCase",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "marionette_harness.MarionetteTestCase.setUp",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "marionette_harness.MarionetteTestCase",
"line_number": 13,
... |
39726064453 | import numpy as np
import torch
import pytorch_lightning as pl
from pytorch_lightning.strategies import DDPStrategy
import os
import sys
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--max-train-steps', required=True, type=int)
parser.add_argument('--max-samp... | nci/FourCastNeXt | trainer.py | trainer.py | py | 3,911 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath... |
13829523332 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
--------------------------------
@File : cursorFecther.py
@Time : 2019/10/13 18:25
@Author : Bright Chen
@Mail : bright_chen7@163.com
--------------------------------
'''
import pyautogui, sys
print('Press Ctrl-C to quit.')
try:
while True:
x, y =... | brightchen7/PyAutoWorker | src/examples/cursorFecther.py | cursorFecther.py | py | 550 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pyautogui.position",
"line_number": 16,
"usage_type": "call"
}
] |
27951173184 | """
Django management command for creating EnterpriseCourseEnrollment records.
"""
import logging
from django.core.management import BaseCommand
from django.db import connection
from enterprise.models import (
EnterpriseCourseEnrollment,
EnterpriseCustomer,
EnterpriseCustomerUser,
EnterpriseEnrollmen... | openedx/edx-enterprise | enterprise/management/commands/create_enterprise_course_enrollments.py | create_enterprise_course_enrollments.py | py | 7,679 | python | en | code | 42 | github-code | 70 | [
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "django.core.management.BaseCommand",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "enterprise.models.EnterpriseCustomer.objects.get",
"line_number": 60,
"usage_type": ... |
74840282469 | import requests
from bs4 import BeautifulSoup
# Constants like the contest page link and contest data headers
CONTEST_PAGE = "https://www.codechef.com/contests/"
HEADERS = ["CODE", "NAME", "START", "END"]
# Get the output file name
OUTPUT_FILE = input("Please specify the output filename (.txt or .csv): ")
print(f"Scr... | Python-World/Python_and_the_Web | Scripts/Web_Scrappers/CodeChef_Contest_Scraper/codechef_contest_scraper.py | codechef_contest_scraper.py | py | 1,475 | python | en | code | 666 | github-code | 71 | [
{
"api_name": "requests.get",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 14,
"usage_type": "call"
}
] |
70575011109 | import re
from collections import defaultdict
from typing import Union
import radb.parse
from radb.RAParser import RAParser
from radb.ast import RelExpr, ValExprBinaryOp, Select, Rename, AttrRef, RelRef, Cross, Join
import queue
def rule_break_up_selections(ra: RelExpr) -> RelExpr:
"""
split the complex sele... | dhiaeddineTounekti/miniHive | src/raopt.py | raopt.py | py | 10,894 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "radb.ast.RelExpr",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "queue.Queue",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "radb.ast.Select",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "radb.ast.ValExprBinaryOp... |
1803695143 | # Practice Problem : Twitter Sentiment Analysis by Analytics Vidhya
#The objective of this task is to detect hate speech in tweets. Formally, given a training sample of tweets and labels,
#where label ‘1’ denotes the tweet is racist/sexist and label ‘0’ denotes the tweet is not racist/sexist, your objective
# is... | sachink382/Twitter-Sentiment-Analysis---Analytics-Vidhya | code.py | code.py | py | 19,311 | python | en | code | 10 | github-code | 69 | [
{
"api_name": "pandas.read_csv",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number"... |
73458003106 | import os
import json
import uuid
import time
from jsonschema import validate
from eiffellib import BASE_PATH
# We're inheriting 'object' which is unnecessary with python3,
# however since this package shall be usable with both python2
# and python3 we still need to keep these.
# pylint:disable=useless-object-inherita... | eiffel-community/eiffel-pythonlib | src/eiffellib/events/eiffel_base_event.py | eiffel_base_event.py | py | 7,417 | python | en | code | 7 | github-code | 70 | [
{
"api_name": "uuid.uuid4",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 224,
"usage_type": "call"
},
{
"api_name": "eiffellib.BASE_PATH",
"line_nu... |
9613720181 | from nose.tools import assert_equal
class Empty(Exception):
pass
class ThreeStacks:
MAX_SIZE = 10
def __init__(self):
self._data = [None] * (self.MAX_SIZE * 3)
self.stack_size = {0: 0, 1: 0, 2: 0}
def top_index(self, stack_num):
"""
stack1:
:param stack_num:
... | tahir24434/py-ds-algo | CrackingTheCodeInterview/StackAndQueues/3.1_three_in_one.py | 3.1_three_in_one.py | py | 1,522 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "nose.tools.assert_equal",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "nose.tools.assert_equal",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "nose.tools.assert_equal",
"line_number": 49,
"usage_type": "call"
},
{
"api_name"... |
11720482449 | import os
import numpy as np
import rospy
from scipy.spatial.transform import Rotation
import rosbag
import open3d as o3d
bagfile = "/home/ajay/catkin_ws_rmap/coloradar/outdoors_run0.bag"
out_bagfile = "/home/ajay/catkin_ws_rmap/coloradar/outdoor0.bag"
# pcd_folder = "/home/ajay/ARPG/RMap/Grad-PU/output/2... | ajaymopidevi/RMap | utils/ply2ROS_lidar.py | ply2ROS_lidar.py | py | 2,520 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.listdir",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_n... |
18344545554 | # -*- coding: utf-8 -*-
from flask import Blueprint, request, redirect, jsonify, g, render_template
from common.libs.Helper import ops_render, getCurrentDate, iPagination, getDictField
from application import app, db
from common.models.news.News import News
from common.libs.UrlManager import UrlManager
from decimal imp... | yiruizhixing/order | web/controllers/news/News.py | News.py | py | 5,821 | python | en | code | 0 | github-code | 69 | [
{
"api_name": "flask.Blueprint",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask.request.values",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "common.models.... |
35268739849 | import random
from mob_data_anonymizer.measures_methods.MeasuresMethodInterface import MeasuresMethodInterface
from mob_data_anonymizer.entities.Dataset import Dataset
from skmob.tessellation import tilers
import pandas as pd
import numpy as np
from pandas import DateOffset
from datetime import datetime
from sklearn.u... | MobiDataLab/mdl-anonymizer | mob_data_anonymizer/measures_methods/PropensityScore.py | PropensityScore.py | py | 6,592 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "mob_data_anonymizer.measures_methods.MeasuresMethodInterface.MeasuresMethodInterface",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "mob_data_anonymizer.entities.Dataset.Dataset",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "logging.info",
... |
19040421861 | import requests
from bs4 import BeautifulSoup
# import pyrebase
# config ={
# "apiKey": "AIzaSyCY1CKDsoF4frwE9hDv0Cvybc559hUrb70",
# "authDomain": "fstock-9ced2.firebaseapp.com",
# "projectId": "fstock-9ced2",
# "databaseURL": "https://fstock-9ced2-default-rtdb.asia-southeast1.firebasedatabase.app",
#... | Fstockown/fstock | functions.py | functions.py | py | 3,456 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pyrebase.initialize_app",
"line_number": 121,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 125,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 125,
"usage_type": "name"
},
{
"api_name": "da... |
17701248213 | import pygame
import sys
from algorithm import sieve
import os
pygame.init()
clock = pygame.time.Clock()
numbers_font = pygame.font.SysFont("ComicSansMS", 25)
big_font = pygame.font.SysFont("Comic Sans MS", 60)
medium_font = pygame.font.SysFont("Comic Sans MS", 45)
small_font = pygame.font.SysFont("Comic Sans MS", 4... | Viktor-stefanov/Sieve-of-Eratosthenes-Visualization | main.py | main.py | py | 8,441 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pygame.init",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pygame.time.Clock",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pygame.time",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pygame.font.SysFont",
... |
41918296014 | import logging
import moment
import datetime
from exporter import config
from exporter.utils import export_writer
from exporter.sensortower import utils
from exporter.sensortower import export_featured_today
logger = logging.getLogger(__name__)
FEATURED_TODAY_IOS_ENDPOINT = "/ios/featured/apps"
def export_featured_... | freeletics/ASO-collector | exporter/sensortower/export_featured_apps.py | export_featured_apps.py | py | 3,212 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "exporter.sensortower.export_featured_today.FeaturedTodayExecutor",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "exporter.sensortower.export_featured_today",
"line_num... |
22559772981 | # Find euclidean lengths of skeleton segments
import os
import cv2
import numpy as np
from plantcv.plantcv import params
from plantcv.plantcv import outputs
from plantcv.plantcv import plot_image
from plantcv.plantcv import print_image
from plantcv.plantcv import fatal_error
from plantcv.plantcv import find_objects
fr... | Eliserin/plantcv | plantcv/plantcv/morphology/segment_euclidean_length.py | segment_euclidean_length.py | py | 3,279 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "plantcv.plantcv.params.debug",
"line_number": 34,
"usage_type": "attribute"
},
{
"api_name": "plantcv.plantcv.params",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "plantcv.plantcv.params.debug",
"line_number": 35,
"usage_type": "attribute"
},... |
18420527314 | from django.shortcuts import render,redirect
from Book.models import Book,Issue
from django.contrib.auth.models import User
import datetime
# Create your views here.
def home_view(request,*args,**kwargs):
print(request.user)
return render(request,"home.html")
def about_view(request,*args,**kwargs):
print(... | mehulkansal/digital-library | Pages/views.py | views.py | py | 4,990 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "django.shortcuts.render",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 15,
"usage_type": "call"
},
{
"api_name":... |
42352343657 | """
Code to make an exploratory plot of the output of a box extraction.
"""
from lo_tools import Lfun, zfun
from lo_tools import plotting_functions as pfun
import xarray as xr
import matplotlib.pyplot as plt
import numpy as np
import sys
from cmocean import cm
import pandas as pd
Ldir = Lfun.Lstart()
# choose the fi... | parkermac/LO | extract/box/plot_box.py | plot_box.py | py | 3,169 | python | en | code | 9 | github-code | 71 | [
{
"api_name": "lo_tools.Lfun.Lstart",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "lo_tools.Lfun",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "lo_tools.Lfun.choose_item",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "lo_tools... |
8441176168 | import numpy as np
import regex as re
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import nltk
from nltk.corpus import stopwords
from nltk.stem import WordNetLemmatizer
from nltk.sentiment.vader import SentimentIntensityAnalyzer
nltk.download('stopwords', quiet=True)
nltk.download('vader_l... | jamchap/MA5851 | my_functions.py | my_functions.py | py | 4,238 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "nltk.download",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "nltk.download",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "regex.sub",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "regex.sub",
"line_number": ... |
38098676391 | import os
import json
import argparse
import datetime
import pickle
import numpy as np
import torch
from torch.optim import Adam, SGD, RAdam
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler
from tensorboardX import SummaryWriter
from torchvision import transforms
from sklearn.model_selection i... | gevaertlab/RNA-GAN | src/betaVAE_training.py | betaVAE_training.py | py | 6,866 | python | en | code | 10 | github-code | 70 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "datetime.date... |
74809967908 | import sys
import os
import pickle
import argparse
import numpy as np
import pandas as pd
import torch.nn.functional
import torch.optim as optim
from torchvision import transforms
from torch.utils.data import DataLoader
from models.resnet import ResNet101
from data_processing.dataset import ProjectDataSet, CifarValida... | ChaoPang/nndl_final_project | basic_trainer.py | basic_trainer.py | py | 14,992 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "sys.setrecursionlimit",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms.Normalize",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms",
"line_number": 26,
"usage_type": "name"
},
{
"api... |
43019522834 | '''Train Fer2013 with PyTorch.'''
# 10 crop for data enhancement
from __future__ import print_function
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import torchvision
from torchvision import datasets, transforms
import tr... | 597924594/ML_final_project | facial-rec/mainpro_FER.py | mainpro_FER.py | py | 15,751 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "adversarial.pgd",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "adversarial.fgsm",
"line_number": 37,
"usage_type": "name"
},
{
"api_name": "utils.set_lr",
"line_number": 76,
"usage_type": "call"
},
{
"api_name": "tqdm.tqdm",
"line_n... |
26593433446 | import argparse
import logging
import os
import numpy as np
from utils.dataset import *
from utils.voronoi_neighbor import parallel_compute_neighbor
# Define dictionary mapping dataset names to functions
dataset_functions = {
"qm9": process_qm9,
"qm9_std_jctc": process_qm9_std_jctc,
"fullerene": process_... | sinhvt3421/scann-material | preprocess_data.py | preprocess_data.py | py | 2,024 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "os.path.exists",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "utils.voronoi_neighbor.paral... |
27776089167 | from email.message import EmailMessage
import os
import ssl
import smtplib
from datetime import date
from datetime import date
import csv
import datetime
from email_validator import validate_email, EmailNotValidError
print("******Menu********")
def choose():
choice = input('''
Enter your Choice
1.Customer
2.Subsc... | Lalit2055joshi/Billing-Management-System | BMS/BMS.py | BMS.py | py | 13,052 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "datetime.date.today",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 53,
"usage_type": "name"
},
{
"api_name": "csv.DictWriter",
"line_number": 60,
"usage_type": "call"
},
{
"api_name": "csv.DictReader",
... |
2851041496 | import sys
import plotly.offline as py
import plotly.graph_objs as go
import plotly.figure_factory as ff
import pandas as pd
import os
import numpy as np
class DataWrapper:
def __init__(self, data_file):
self.df = self.fetch_data(data_file)
self.compounds = self.get_compounds()
self.sample... | jfizzy/ResistanceDB | pablo/plotly/layout.py | layout.py | py | 9,694 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "pandas.read_csv",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "plotly.graph_objs.Heatmap",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "plotly.graph_objs",
"line_number": 54,
"usage_type": "name"
},
{
"api_name": "plotly.gr... |
22217276888 | '''
Created on 29.05.2013
This modules help increasing the expiry time of the access token and returns
a new one.
:author: heinz-peterlang
'''
from __future__ import print_function
from future import standard_library
standard_library.install_aliases()
import urllib.parse
from eWRT.access.http import Retrieve
from ... | weblyzard/ewrt | src/eWRT/ws/facebook/extend_access_token.py | extend_access_token.py | py | 1,555 | python | en | code | 16 | github-code | 71 | [
{
"api_name": "future.standard_library.install_aliases",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "future.standard_library",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "eWRT.config.FACEBOOK_APPLICATION_ID",
"line_number": 21,
"usage_type": "n... |
8543258979 | from typing import List, Tuple
import torch
import hydra
import gradio as gr
import requests
from omegaconf import DictConfig
# from PIL import Image
from torchvision import transforms
from torch.nn import functional as F
import logging
logger = logging.getLogger(__name__)
# from dl_pkg import utils
# log = utils.get... | u6yuvi/dl-package | dl_pkg/demo.py | demo.py | py | 2,146 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "omegaconf.DictConfig",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "torch.jit.load",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "torch.jit",
... |
31060347806 | import argparse
from pbc.func_decorators import arguments_log
def fibonacci_generator(negative=False):
"""
Get fibonacci generator
:return:
"""
previous_value = 0
current_value = 1
yield previous_value
yield current_value
while True:
tmp_current_value = int(current_value)
... | shitikovkirill/pbc-PythonBootCamp | pbc/tools/fibonacci.py | fibonacci.py | py | 1,419 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "pbc.func_decorators.arguments_log",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 53,
"usage_type": "call"
}
] |
1046312264 | """
Paper: Vision Transformer with Deformable Attention
Link: https://arxiv.org/abs/2201.00520
"""
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import einops
from timm.models.layers import to_2tuple, trunc_normal_
class LayerNormProxy(nn.Module):
def __init__(self, dim):... | HubHop/vit-attention-benchmark | attentions/dat.py | dat.py | py | 7,860 | python | en | code | 16 | github-code | 70 | [
{
"api_name": "torch.nn.Module",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "torch.nn.LayerNorm",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line... |
31759430500 | from collections import deque
plants = set()
inp = open("Resources/input12.txt").readlines()
initial_state = inp[0].split(": ")[1].strip()
for i in range(len(initial_state)):
if initial_state[i] == "#":
plants.add(i)
notes = set()
for j in range(2,len(inp)):
src,dst = inp[j].strip().split(" => ")
i... | andrewfroehlich/AdventOfCode | 2018/problem12.py | problem12.py | py | 1,147 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "collections.deque",
"line_number": 15,
"usage_type": "call"
}
] |
14696343513 | import os
import django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "carValue.settings")
django.setup()
from avg_price_calculator.models import Car
def parse_value(value):
if value == "":
return None
if value == "TRUE":
return True
if value == "FALSE":
return False
ret... | najamF18/VinAudit-test-project | populate.py | populate.py | py | 1,143 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "os.environ.setdefault",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.setup",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "avg_price_calculator.... |
33719203006 | import discord, requests, os
from riotwatcher import LolWatcher
from discord.ext import commands
from functions.func import blacklist, define, champ
from datetime import datetime
from dotenv import load_dotenv
emblems = {
"bronze":"<:bronze:896581593118945300>",
"silver":"<:silver:89658... | Kisrym/LittleCum | cogs/lol.py | lol.py | py | 8,353 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands.Cog",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "discord.ex... |
43063270402 | from transitions import Machine
import random
import itertools
from loggers import dbot_online_logger
from dialogue_state.domain import is_intent_rule
import json
from path_config import *
## non_branched fsa
class buy_tv_state(object):
pass
intents = ["buy_tv","inform_size","inform_resolution","inform... | uclhenry/state_tracker | policy/fsm.py | fsm.py | py | 21,336 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "json.load",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "itertools.permutations",
"line_numb... |
42957835937 | import numpy as np
import trimesh
from scipy.spatial import cKDTree as KDTree
def compute_trimesh_chamfer(
gt_mesh, pred_mesh, offset, scale, num_mesh_samples=30000, verbose=False
):
"""
This function computes a symmetric chamfer distance, i.e. the sum of both chamfers.
gt_mesh: trimesh.base.Trimesh ... | TTimelord/Sim2Real2 | ditto/src/utils/chamfer.py | chamfer.py | py | 1,406 | python | en | code | 10 | github-code | 71 | [
{
"api_name": "numpy.nan",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "trimesh.sample.sample_surface",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "trimesh.sample",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "trim... |
15927720533 | import os
import csv
import numpy as np
from tokenizers import ByteLevelBPETokenizer
from transformers import BartTokenizer, BartForConditionalGeneration, BertTokenizer
path = './custom_pretrain'
os.mkdir(path)
samples = []
with open("../data/raw.csv",'r') as fp:
reader = csv.reader(fp)
sample = [row for row i... | aeeeeeep/2023GAIIC | tools/gen_bart.py | gen_bart.py | py | 1,990 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "os.mkdir",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "transformers.BartTokenizer.from_pretrai... |
2969716147 | from django.core.exceptions import ObjectDoesNotExist
from dsd.models import Alert
def should_send_alert(rule_group_id, org_unit_uid):
try:
return Alert.objects.get(rule_group_id=rule_group_id, org_unit_uid=org_unit_uid).should_alert
except ObjectDoesNotExist:
update_alert_status(rule_group_i... | chai-moz-dsd/chai | dsd/services/alert_service.py | alert_service.py | py | 888 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "dsd.models.Alert.objects.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "dsd.models.Alert.objects",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "dsd.models.Alert",
"line_number": 8,
"usage_type": "name"
},
{
"api_name... |
20521134941 | """TestCase URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | zemmarques/TestCase | forumApp/urls.py | urls.py | py | 1,077 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "django.conf.urls.url",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "django.conf.urls.url",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "django... |
16897005558 | import cv2
import numpy as np
import math
import json
import os
#from config import cfg
from utils.box_overlaps import *
from config import cfg
def process_pointcloud(point_cloud, cfg):
# Input:
# (N, 4)
# Output:
# voxel_dict
scene_size = np.array(cfg.SCENE_SIZE, dtype=np.float32)
voxel_s... | kathy-lee/voxelnet-astyx | utils/utils.py | utils.py | py | 42,498 | python | en | code | 11 | github-code | 71 | [
{
"api_name": "numpy.array",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "config.cfg.SCENE_SIZE",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "config.cfg",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "numpy.float32",
... |
6752703421 | # -*- coding: utf-8 -*-
from setuptools import setup
from os.path import join, dirname
from setuptools import find_packages
def parse_requirements(filename):
""" load requirements from a pip requirements file """
lineiter = (line.strip() for line in open(filename, encoding='utf-8'))
return [line for line... | YukonZhang/test_sql | HtscUtils/setup.py | setup.py | py | 1,256 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "os.path.join",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "setuptools.setup",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "setuptools.find_package... |
27835774884 | """create tables
Revision ID: 190753d7eabf
Revises:
Create Date: 2023-07-04 16:32:23.448688
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '190753d7eabf'
down_revision = None
branch_labels = None
depends_on = None
def upgrade() -> None:
# ### commands a... | bitwopi/Translator | alembic/versions/190753d7eabf_create_tables.py | 190753d7eabf_create_tables.py | py | 1,311 | python | en | code | 0 | github-code | 71 | [
{
"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... |
74805049826 | import logging
import neomodel # type: ignore
from typing import List, Optional
from pydantic import BaseSettings
from fastapi import FastAPI, Depends
from fastapi.responses import RedirectResponse
from fastapi_users import FastAPIUsers
from fastapi_users.authentication import JWTAuthentication
import arcade.models.gr... | IBM/arcade | arcade/api.py | api.py | py | 6,722 | python | en | code | 21 | github-code | 70 | [
{
"api_name": "logging.basicConfig",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pydantic.Base... |
33592261966 |
import asyncio
import traceback
from typing import List
from aardwolf import logger
from aardwolf.keyboard.layoutmanager import KeyboardLayoutManager
from aardwolf.keyboard import KeyboardLayout, VK_MODIFIERS
class DuckyExecutorBase:
def __init__(self, keyboard_layout:KeyboardLayout, key_sender, send_as_char = Fal... | skelsec/aardwolf | aardwolf/utils/ducky/__init__.py | __init__.py | py | 10,894 | python | en | code | 118 | github-code | 70 | [
{
"api_name": "aardwolf.keyboard.KeyboardLayout",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 96,
"usage_type": "name"
},
{
"api_name": "aardwolf.logger.debug",
"line_number": 98,
"usage_type": "call"
},
{
"api_name": "aa... |
13588243741 | from __code import config
import getpass
import glob
import os
import platform
from ipywidgets import widgets
from IPython.core.display import display
from IPython.core.display import HTML
from __code._utilities.time import get_current_time_in_special_file_name_format
from __code import LOGGER_FILE
from __code._utilit... | neutronimaging/python_notebooks | notebooks/__code/system.py | system.py | py | 10,327 | python | en | code | 6 | github-code | 70 | [
{
"api_name": "__code.config.debugging",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "__code.config",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "IPython.core.display.display",
"line_number": 35,
"usage_type": "call"
},
{
"api_name"... |
12440555281 | import numpy as np
from scipy import stats, special
from scipy.fftpack import dct
import logging
from libNeuroDyn import lorentz, gauss
from sconf import create_dir, now
logging.getLogger('simu_lib').addHandler(logging.NullHandler())
__author__ = 'Jose M. Esnaola Acebes'
""" This file contains classes and functions ... | JMED106/QIF-FR | simu_lib.py | simu_lib.py | py | 40,532 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.NullHandler",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",... |
35653606201 | import ConfigParser
import os
import random
import base64
try:
from Crypto.Cipher import AES
SECURED=True
except:
SECURED=False
class Config:
def __init__(self,key=None):
""" Initializes the class. The optional key parameter
is used to encrypt some important data """
self.config=ConfigParser.SafeConfigParser... | Juanvvc/scfs | dfs/utils.py | utils.py | py | 5,590 | python | en | code | 2 | github-code | 70 | [
{
"api_name": "ConfigParser.SafeConfigParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "ConfigParser.DEFAULTSECT",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "ConfigParser.DEFAULTSECT",
"line_number": 82,
"usage_type": "attribute"
},
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.