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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
34340454231 | import numpy as np
import pandas as pd
import pytest
from darts import TimeSeries, concatenate
from darts.dataprocessing.transformers import Scaler
from darts.logging import get_logger
from darts.tests.conftest import tfm_kwargs
from darts.utils import timeseries_generation as tg
logger = get_logger(__name__)
try:
... | unit8co/darts | darts/tests/models/forecasting/test_TFT.py | test_TFT.py | py | 16,344 | python | en | code | 6,665 | github-code | 21 | [
{
"api_name": "darts.logging.get_logger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "darts.models.forecasting.tft_model.TFTModel",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "darts.utils.likelihood_models.QuantileRegression",
"line_number": 25,
... |
9097131075 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from queue import Queue, Empty
from ..event.event import EventType
from threading import Thread
from collections import defaultdict
class BacktestEventEngine(object):
"""
Event queue + a while loop to dispatch events
"""
def __init__(self, datafeed):
... | timothyyu/ml_monorepo | EliteQuant_Python/source/event/backtest_event_engine.py | backtest_event_engine.py | py | 2,994 | python | en | code | 59 | github-code | 21 | [
{
"api_name": "queue.Queue",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "event.event",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "queue.Empty",
"li... |
13614442702 | import wandb
import pytorch_lightning as pl
import torch
from torchmetrics.functional import mean_squared_error
import numpy as np
import matplotlib.pyplot as plt
import io
from PIL import Image
from teamtrack.transforms import SportSpecificTransform, Resample
from mplsoccer import Pitch
class BaseMotionModule(pl.Lig... | AtomScott/TeamTrack | teamtrack/base_module.py | base_module.py | py | 7,030 | python | en | code | 6 | github-code | 21 | [
{
"api_name": "pytorch_lightning.LightningModule",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "teamtrack.transforms.SportSpecificTransform",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "teamtrack.transforms.Resample",
"line_number": 23,
"us... |
33105402684 | # -*- coding: utf-8 -*-
import json
import logging
import base64
from collections import defaultdict
from tempfile import NamedTemporaryFile
import requests
from .connector import Connector, ConnectorError, should_connect
from .registry import image_dict_to_str
from .utils import timestr2dtime, extract_host_from_url... | nuvla/job-engine | code/src/nuvla/connector/docker_service.py | docker_service.py | py | 15,017 | python | en | code | 4 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "connector.Connec... |
37106656545 | import os
import unittest
import uuid
from pathlib import Path
from pdfrw import PdfReader
from tests.utils import get_resource_absolute_path
from pdf_filler import PdfFiller
current_path = Path(os.path.dirname(os.path.realpath(__file__)))
ANNOT_KEY = '/Annots' # key for all annotations within a page
ANNOT_FIELD_K... | neboduus/pdf-filler | tests/test_pdf_filler.py | test_pdf_filler.py | py | 3,581 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pathlib.Path",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"lin... |
73824981812 | import pygame
from chunks.dynamic_chunk import DynamicChunk
from config.config import read_config
from mechanics.camera import Camera
from mechanics.debugger import Debugger
from player.player import Player
from utils.utils import singleton
@singleton
class Renderer:
def __init__(self):
self._window_size... | hrdasdominik/nautical-nightmares | mechanics/renderer.py | renderer.py | py | 3,392 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "config.config.read_config",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "chunks.dynamic_chunk.DynamicChunk",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "player.player.Player",
"line_number": 17,
"usage_type": "name"
},
{
"... |
6396973813 | ''' Fitter_test_tool
Author: Tim Hucko
Used for testing fitting routines using fake data
'''
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from iminuit import Minuit
from scipy.special import wofz
import random as rd
'''def lorentzian(x, p):
# Here we use:(gamma/2)^2/((... | thucko/FrCode | Tools_and_plotters/Fitting_test_tool.py | Fitting_test_tool.py | py | 3,186 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.sqrt",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.log",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "numpy.sqrt",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line_number": 37,
... |
23163480193 | from asyncio import sleep
from aiogram.dispatcher import FSMContext
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from filters import IsPrivate
from loader import dp
from aiogram import types
from utils.db_api import quick_commands as commands
from states import BotMailing
from data.config im... | klishchov-bohdan/aiogram-learning | handlers/users/admin/bot_mailing.py | bot_mailing.py | py | 4,285 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "aiogram.types.Message",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "aiogram.types",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "states.BotMailing.text.set",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "s... |
82467727 | # -*- coding:utf-8 _*-
"""
"""
import logging
import logging.handlers
import os
from common import contants
from common.config import ReadConfig
config = ReadConfig()
def get_logger(logger_name):
logger = logging.getLogger(logger_name)
logger.setLevel('DEBUG')
fmt = "%(asctime)s - %(name)s - %(lev... | tudou8728/ZQ | common/logger.py | logger.py | py | 1,004 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "common.config.ReadConfig",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "logging.Formatter",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path.... |
40945289328 | # -*- coding: utf-8 -*-
from odoo import models, fields, api, _
from datetime import datetime, timedelta
import urllib
import requests
class LpeSunatTc(models.Model):
_name = 'lpesunat.tc'
_description = 'TC Sunat'
@api.model
def run_cron_job(self):
print("Job RSF")
headers = requests... | rsanchezfloresx/pos01 | AutomaticTC/models/sunat_tc.py | sunat_tc.py | py | 2,213 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "odoo.models.Model",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "requests.utils.default_headers",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "reque... |
17617504416 | import requests
import base64
import modules.EACSettings as eas
import modules.EAParser as eap
## Confluence page
class Page(object):
def __init__(self) -> None:
self.body = str
self.version = int
self.title = str
self.id = str
self.parent = str
# Write i... | Sense-a-nonsense/EA2Confluence | modules/EACPublisher.py | EACPublisher.py | py | 3,462 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "modules.EAParser.EADocument",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "modules.EAParser",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "base64.b64encode",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "mo... |
24610011550 | import argparse
from botTools import *
parser = argparse.ArgumentParser(description='A Twitter bot for sending \
messages to your followers. ')
parser.add_argument('messageText', help='Required: File with your message text')
parser.add_argument('--SN', help='Optional: Tells MessageBot ... | elantrianApps/botsFaBW | MessageBot.py | MessageBot.py | py | 666 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 5,
"usage_type": "call"
}
] |
73365799734 | import datetime
import requests
from shinobi.parser.producer import ProducerParser
from shinobi.utilities.session import session
def get_producer_res_given_mal_id(mal_id: int) -> requests.Response:
return session.get(f"https://myanimelist.net/anime/producer/{mal_id}")
def test_first_producer_parser():
res... | baseplate-admin/CoreProject | backend/shinobi/test/parser/test_producer_parser.py | test_producer_parser.py | py | 619 | python | en | code | 99 | github-code | 21 | [
{
"api_name": "shinobi.utilities.session.session.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "shinobi.utilities.session.session",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "requests.Response",
"line_number": 9,
"usage_type": "attribute"
... |
16017739891 | import os
import civis
from common import yes_no
from services import Postgres
from dotenv import load_dotenv
def main():
with Postgres(**postgres_args) as cursor:
with open('projection_schema.sql') as f:
cursor.execute(f.read())
if prod:
query = (
'SELECT * '
... | mcculleydj/ballot-cure | upload_to_civis.py | upload_to_civis.py | py | 1,582 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "services.Postgres",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "services.Postgres",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "civis.io.csv_to_civis",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "civis.io",
... |
6387308640 | from utils import *
import pyomo.environ as env
def createPyomoModel(capacity,demand,cost):
#numero de fornecedores
N = len(capacity)
#numero de clientes
M = len(demand)
capDic = vectorToDic(capacity)
demDic = vectorToDic(demand)
costDic = matrixToDic(cost)
model = env.ConcreteModel()
... | spideryzarc/logistica | transporte.py | transporte.py | py | 1,446 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pyomo.environ.ConcreteModel",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pyomo.environ",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "pyomo.environ.Set",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pyomo.env... |
74206539894 | import os
import re
import sys
import math
import random
from pyspark import SparkConf, SparkContext
def preprocessing(line,sw):
line = set([word.lower() for word in re.split('[^a-zA-Z]',line) if word.lower() not in sw and word])
# if len(line)==0:
# print("Set is empty")
# print(line)
# line =... | VibhanshuRanjan/Big-Data-Processing | Assgn3/assignment-3-18EE35032.py | assignment-3-18EE35032.py | py | 3,246 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "re.split",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "math.log2",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "pyspark.SparkConf",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "pyspark.SparkContext",
"line_... |
3027614315 | import json
import threading
from typing import Optional
from pydantic import BaseModel
from prowler.lib.logger import logger
from prowler.lib.scan_filters.scan_filters import is_resource_filtered
from prowler.providers.aws.aws_provider import generate_regional_clients
################## VPC
class VPC:
def __in... | gopikrishna72/prowl | prowler/providers/aws/services/vpc/vpc_service.py | vpc_service.py | py | 10,997 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "prowler.providers.aws.aws_provider.generate_regional_clients",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "prowler.lib.logger.logger.info",
"line_number": 45,
"usage_... |
31905929083 | import requests
import re
header = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36'
}
url = 'https://movie.douban.com/j/chart/top_list?type=11&interval_id=100%3A90&action=&start=0&limit=20'
res = requests.get(url, headers=h... | Gsl201600/XYPythonTest | XYSpiderDouBan.py | XYSpiderDouBan.py | py | 717 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "re.I",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "re.compile",
"line_number": 16,... |
18853763767 | from functools import partial
import functools
from collections import OrderedDict
import torch
def nonlinearity(x):
# swish
return x*torch.sigmoid(x)
def get_forward_calls_enc_block(block, prefix=""):
if prefix == "":
pass
else:
prefix = prefix + "-"
calls = []
layer_na... | paola-md/music-project | notebooks/jukebox/utils/jukebox_utils.py | jukebox_utils.py | py | 4,489 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.sigmoid",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "functools.reduce",
"line_number": 86,
"usage_type": "call"
},
{
"api_name": "torch.nn.Sequential",
"line_number": 100,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"l... |
41882576696 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('query', '0018_merge'),
]
operations = [
migrations.AlterModelOptions(
name='query',
options={'verbos... | UUDigitalHumanitieslab/texcavator | query/migrations/0019_auto_20160610_1637.py | 0019_auto_20160610_1637.py | py | 512 | python | en | code | 12 | github-code | 21 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AlterModelOptions",
"line_number": 14,
"usage_type": "call"
... |
35905404850 | import logging
from logging.handlers import RotatingFileHandler
from pathlib import Path
from recormotion.config import Configuration
def setup_logger():
"""Helper function to setup file and stream logging for the applicationk"""
cfg = Configuration().config.logging
level = logging.getLevelName(cfg.level... | scheckmedia/recormotion | recormotion/helper.py | helper.py | py | 1,027 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "recormotion.config.Configuration",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.getLevelName",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "logging.StreamHandler",
"line_number": 13,
"usage_type": "call"
},
{
"api_n... |
6726221747 | # -*- coding: utf-8 -*
import numpy as np
from loguru import logger
TARGET_DURATION = 10.0 # seconds
class Seg:
def __init__(self, words, start_time_s, end_time_s, speech_dur_s=None, splits=None, segid=''):
self.segid = segid
if isinstance(words, list):
self.words = words
els... | RuABraun/universal-aligner | universal-aligner/ctm2seg.py | ctm2seg.py | py | 6,843 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "numpy.argmax",
"line_number": 139,
"usage_type": "call"
},
{
"api_name": "numpy.argmax",
"line_number": 146,
"usage_type": "call"
},
{
"api_name": "loguru.logger.info",
"line_number": 163,
"usage_type": "call"
},
{
"api_name": "loguru.logger",
"... |
44051381218 | # -*- coding: utf-8 -*-
# @Author: Wangchuanli
# @Date: 2018-12-27 16:26:58
# @Last Modified by: Wangchuanli
# @Last Modified time: 2018-12-27 16:27:34
import scrapy
# run scrapy crawl argsSpider -a tag=励志
class ArgsspiderSpider(scrapy.Spider):
name = "argsSpider"
def start_requests(self):
url = ... | iwangchuanli/Project-experience | python/python-Scrapy爬虫框架Demo/mingyan/mingyan/spiders/argsSpider.py | argsSpider.py | py | 1,546 | python | en | code | 32 | github-code | 21 | [
{
"api_name": "scrapy.Spider",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "scrapy.Request",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "scrapy.Request",
"line_number": 39,
"usage_type": "call"
}
] |
35943922875 | import json
from rest_framework.renderers import JSONRenderer
class UserRenderer(JSONRenderer):
charset='utf-8'
# def renderer(self,data,media_type=None,renderer_context=None):
# token=data.get('token',None)
# if token is not None and isinstance(token,bytes):
# data['token']=token... | nadeesha1997/athlete_workload_backend | authentication/renderers.py | renderers.py | py | 667 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rest_framework.renderers.JSONRenderer",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "json.dumps",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 21,
"usage_type": "call"
}
] |
21129549676 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
d = np.zeros(100)
# algos = [tspsom, Mtspsom, Stspsom, Ctspsom, Dtspsom, ICtspsom, IDtspsom]
for i in range(100):
d[i] = i + 1
print(np.min((-1, 2)))
fig = plt.figure()
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_mi... | Sherhang/MyStudy | Python/匈牙利算法/求最大优势/test.py | test.py | py | 494 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "numpy.zeros",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.min",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
... |
15190909213 | import copy
from typing import Dict, Sequence, Tuple, Union
import cv2
import mmcv
import numpy as np
from mmcv.transforms.base import BaseTransform
from mmcv.transforms.utils import cache_randomness
from mmengine.utils import is_tuple_of
from numpy import random
from mmseg.datasets.dataset_wrappers import MultiImage... | gongyan1/LIA-CAM | mmseg/datasets/transforms/transforms.py | transforms.py | py | 40,572 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "mmcv.transforms.base.BaseTransform",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "mmcv.imresize_to_multiple",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "mmcv.imresize_to_multiple",
"line_number": 68,
"usage_type": "call"
},
{... |
5431653774 | from collections import Counter
def solution(k, tangerine):
answer = 0
c = Counter(tangerine)
c = sorted(list(c.items()), key = lambda x : x[1], reverse = True)
for 크기, 개수 in c:
k -= 개수
answer += 1
if k <= 0:
break
return answer | hanwool77/codingtest | 프로그래머스/unrated/138476. 귤 고르기/귤 고르기.py | 귤 고르기.py | py | 321 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.Counter",
"line_number": 6,
"usage_type": "call"
}
] |
18447003666 | from __future__ import absolute_import
import re
import time
import threading
import math
from kodi_six import xbmc
from kodi_six import xbmcgui
from collections import OrderedDict
from . import kodigui
from . import playersettings
from . import dropdown
from . import busy
from plexnet import plexapp
from lib import... | royfel/royfel.github.io | p4k/script.plexmod/lib/windows/seekdialog.py | seekdialog.py | py | 89,357 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "kodi_six.xbmcgui.ACTION_MOVE_LEFT",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "kodi_six.xbmcgui",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "kodi_six.xbmcgui.ACTION_MOVE_RIGHT",
"line_number": 30,
"usage_type": "attribute"... |
71234978292 | """
Tests donut/modules/editor/
"""
from datetime import date
import flask
import pytest
from donut.testing.fixtures import client
from donut import app
import donut.modules.core.helpers as core_helpers
from donut.modules.calendar import helpers
from donut.modules.calendar import routes
import os
def test_plain_cale... | ASCIT/donut | tests/modules/calendar/test_calendar.py | test_calendar.py | py | 6,463 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "donut.testing.fixtures.client.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "donut.testing.fixtures.client",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "flask.url_for",
"line_number": 17,
"usage_type": "call"
},
{
"api... |
33790849745 | import cv2
import numpy as np
import matplotlib.pyplot as plt
from local_utils import detect_lp
from os.path import splitext,basename
from keras.models import model_from_json,load_model
import glob
import time
import tensorflow as tf
from keras import backend as K
config = tf.ConfigProto()
config.gpu_options.allow_gr... | MassSkt/js-licence-plate-recognition | pyscripts/test.py | test.py | py | 2,766 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "tensorflow.ConfigProto",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "tensorflow.Session",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "keras.backend.set_session",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "k... |
32217016734 | from django.shortcuts import render
from django.http import HttpResponse
import json
from django.views.decorators.csrf import csrf_exempt
import random
import requests
from random import randint
from time import sleep
import warnings
import urllib
import pdfkit
from django.template.loader import get_template
warnings... | NilanshBansal/Crunchbase_Scraped_Django_Api | generate_pdf/views.py | views.py | py | 11,157 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "random.SystemRandom",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "r... |
8673249036 | import numpy as np
from scipy.interpolate import interp1d
from numba import njit
import time
import os
from joblib import Parallel, delayed
from typing import Union
import matplotlib.pyplot as plt
import matplotlib
import random
def generate_function(n_points, f0, f1, max_offsets=(1.3, 0.5, 0.3, 0.05)):
... | maticdeb/Machine-learning | Neural_netowrks/generacija_podatkov.py | generacija_podatkov.py | py | 4,919 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.linspace",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.arange",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.sort",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "numpy.random.randint",
"li... |
71976405494 | #encoding: utf-8
from django.core.urlresolvers import reverse
from libs.common import jsonify
from libs.forms import Form
from libs.permissions import hasPermissionProject
import inspect
import logging
class PostRequiredMiddleware(object):
"""
检查是否是POST请求
"""
def process_request(self, request):
... | honglongwei/pj-job | job_server/libs/middlewares.py | middlewares.py | py | 3,220 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "libs.common.jsonify",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "inspect.getargspec",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "libs.common.jsonify",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "django.cor... |
22859996991 | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 26 19:29:35 2020
@author: Nandini senghani
"""
import pandas as pd
from mlxtend.frequent_patterns import apriori,association_rules
from collections import Counter
import matplotlib.pyplot as plt
import numpy as np
#####################################################Gr... | NandiniSenghani/Association-Rules-Market-Analysis | Association_Rules.py | Association_Rules.py | py | 6,402 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.Counter",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.bar",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 35,
"usage_type": "name"
},
{
"api_name": "matplotli... |
21667116583 | from __future__ import print_function
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
# If modifying these scopes, delete the file token.pickle.
SCOPES = ['https://www.googleapis.com/auth/... | acozzi/classroomCalendarApi | getCourseDetails.py | getCourseDetails.py | py | 2,018 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.path.exists",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "pickle.load",
"line... |
7232931493 | """
Wrote by Yokoo-arch 2023 (https://github.com/Yokoo-arch).
Github repository: https://github.com/Yokoo-arch/PyMacChanger.
If you have any issues, please feel free to open an issue on the Github repository.
"""
import subprocess
import argparse
import random
import uuid
import re
import pyperclip
def connect_to_wif... | Yokoo-arch/PyMacChanger | src/main.py | main.py | py | 9,217 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "subprocess.Popen",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "subprocess.PIPE",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "re.match",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "subprocess.run",
"... |
43353904480 | from PyQt5 import uic,QtWidgets # Importando o módulo do PyQt5 uic para ler o arquivo ui e
# QtWidgets para montar os elementos na tela
import mysql.connector
from reportlab.pdfgen import canvas
numero_id = 0 # Global
#criando variável para receber uma instância do mysql connector do ... | NefiTS/Cadastro-de-Produtos | controle.py | controle.py | py | 9,385 | python | pt | code | 1 | github-code | 21 | [
{
"api_name": "mysql.connector.connector.connect",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "mysql.connector.connector",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "mysql.connector",
"line_number": 9,
"usage_type": "name"
},
{
"api... |
5789305328 | from collections import defaultdict
class Graph:
def __init__(self, vertices):
self.graph = defaultdict(list)
self.vertices = vertices
def addEdge(self, u, v):
self.graph[u].append(v)
def topologicalSortDfs(self):
visited = [False]*self.vertices
stack = []
... | thebbyo/data-structure-and-algorithm | topologicalsort.py | topologicalsort.py | py | 1,549 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.defaultdict",
"line_number": 5,
"usage_type": "call"
}
] |
41269870016 | import os
import yaml
class EnvConfig():
def environment_config_for(key):
# read production url.
# get the full path for this file.
full_file_path = os.path.realpath(__file__)
# print(full_file_path)
file_dirname = os.path.dirname(full_file_path)
# print(file_dirname... | magicalcarpet/bdd_ui_framework_selenium | lib/helpers/env_config.py | env_config.py | py | 875 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.realpath",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numbe... |
73628509812 | import pandas as pd
import matplotlib.pyplot as plt
def calcularPromedioPorCiudad(dataFrame,rangos,columnaInteres,columnaPromediar,nombreGrafica):
plt.figure()
#Crear una columna nueva para rangos de veredas
dataFrame['rangosArboles']=pd.cut(dataFrame[columnaInteres],bins=rangos)
#Calcular la suma... | miguelmarmol21/AnalisisConPythonMomento3 | helpers/crearTorta.py | crearTorta.py | py | 697 | python | es | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "pandas.cut",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.... |
16365000067 | import pyautogui
import time
# Funzione per verificare se un pixel è simile al bianco
def is_similar_to_white(pixel_color, tolerance=20):
r, g, b = pixel_color
return r > 255 - tolerance and g > 255 - tolerance and b > 255 - tolerance
def is_box_white(coords):
for x, y in coords:
pixel_color = pya... | Ethan295/python | python/sequenceMemory.py | sequenceMemory.py | py | 1,006 | python | it | code | 0 | github-code | 21 | [
{
"api_name": "pyautogui.pixel",
"line_number": 11,
"usage_type": "call"
}
] |
6504035813 | import subprocess
from datetime import datetime
import json
def get_data():
p = subprocess.Popen(["jsonperfmon", "-A", "1"], stdout=subprocess.PIPE)
for c in iter(p.stdout.readline, ""):
data = json.loads(c)
with open("data/" + datetime.now().strftime("%Y-%m-%dT%H:%M:%S") + ".json", "w") as f... | ZoutigeWolf/server-metrics | collector.py | collector.py | py | 406 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "subprocess.Popen",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "subprocess.PIPE",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now"... |
70226441653 | import numpy as np
import matplotlib.pylab as plt
d = 0.1
ds = np.array([150,200,210,220,230])
L = 0.334
P = 0.02
HI = -L*(ds*d-P*d*1000)/(ds*d)
plt.plot(HI)
plt.show()
H = sum(HI)/5
print (H)
print (HI) | fengqiaobeihang/Python_tools | HH.py | HH.py | py | 214 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.array",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "matplotlib.pylab.plot",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pylab",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "matplotlib.pylab.show... |
10450548172 | #1697 숨바꼭질
import sys
from collections import deque
# N: 수빈 , M : 동생
N ,M = map(int,sys.stdin.readline().split())
Max = 100001
time =[0]*Max
def bfs():
queue = deque()
queue.append(N)
while queue:
start = queue.popleft()
if start == M:
print(time[start])
return
... | inkyu0103/BOJ | DFS , BFS/1697.py | 1697.py | py | 519 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.stdin.readline",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 11,
"usage_type": "call"
}
] |
73247484534 | from dateutil.relativedelta import relativedelta
from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT as DT
class WizardRenewTenancy(models.TransientModel):
"""Wizard Renew Tenancy."""
_name = "renew.tenancy"
... | JayVora-SerpentCS/fleet_management | fleet_rent/wizard/renew_tenancy.py | renew_tenancy.py | py | 4,325 | python | en | code | 20 | github-code | 21 | [
{
"api_name": "odoo.models.TransientModel",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "dateutil.relativedelta.relativedelta",
"line_number": 19,
"usage_type": "call"
},
{
"ap... |
28819904591 | import importlib
from ConfigParser import ConfigParser
defaults = {'parse': 'defaultparse',
'clean': 'True',
'consolidate': 'True',
'datadir': '/data/patentdata/patents/2013',
'grantregex': 'ipg\d{6}.xml',
'applicationregex': 'ipa\d{6}.xml',
'year... | PatentsView/PatentsProcessor | lib/config_parser.py | config_parser.py | py | 3,490 | python | en | code | 16 | github-code | 21 | [
{
"api_name": "ConfigParser.ConfigParser",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "ConfigParser.ConfigParser",
"line_number": 84,
"usage_type": "call"
},
{
"api_name": "importlib.import_module",
"line_number": 92,
"usage_type": "call"
},
{
"api_n... |
25945897831 | import aiohttp
from oauthlib.oauth2 import WebApplicationClient
from herre.grants.oauth2.session import OAuth2Session
import logging
from herre.grants.oauth2.utils import (
build_authorize_url,
build_token_url,
wait_for_redirect,
)
from .base import BaseOauth2Grant
from typing import Awaitable
from herre.ty... | jhnnsrs/herre | herre/grants/oauth2/authorization_code_server.py | authorization_code_server.py | py | 2,239 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "typing.Protocol",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "typing.Awaitable",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "typing.runtime_che... |
35323224213 | from django.shortcuts import render, redirect, get_object_or_404
from django.views import View
from sales.forms import SaleForm, ItemForm
from sales.models import Sale, Item
from django.contrib.auth.decorators import login_required
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.p... | leandrocunha526/client-manager | sales/views.py | views.py | py | 6,573 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "sales.models.Sale.objects.get",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sales.models.Sale.objects",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "sales.models.Sale",
"line_number": 14,
"usage_type": "name"
},
{
"ap... |
26560958261 | import numpy as np
import sys
import csv
import matplotlib.pyplot as plt
import dateutil.parser
import os
class ExploreDependencies:
def __init__(self, cPath):
self.cat = self._load_catalog(cPath)
return
def filter(self, type='flash'):
"""
This method filters the catalog to on... | mshumko/ac6_microburst_scale_sizes | rabbit_holes/explore_ss_dependencies.py | explore_ss_dependencies.py | py | 1,447 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.where",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "csv.reader",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 3... |
24244123043 | """Home for discriminator code."""
import torch
from torch import nn
def conv4x4(
in_channels: int,
out_channels: int,
stride: int,
padding: int
) -> nn.Conv2d:
"""Construct regular DCGAN discriminator 4x4 convolution."""
return nn.Conv2d(in_channels, out_channels, 4, stride, p... | xevolesi/DCGAN | dcgan/discriminator.py | discriminator.py | py | 2,072 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.nn.Conv2d",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_nu... |
33165803861 | from io import BytesIO, BufferedReader
import streamlit as st
import CartoonifyImage
import numpy as np
import cv2
import PencilSketch
import ImageColorization
st.title("Open CV Projects")
def Catroonify():
cartoon = CartoonifyImage.output(cv2_img, blur=blur, edge=edge, bFilter=bFilter)
color_img = cv2.cvtCol... | SolomonJesurathinam/OpenCVProjects | HomePage.py | HomePage.py | py | 2,620 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "streamlit.title",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "CartoonifyImage.output",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.cvtColor",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.COLOR_BGR2RGB"... |
33000758913 | import json
import falcon
import pytest
import requests
import requests_mock
from mock import Mock
from falcon import testing
from domain.app import domain_reader, api
class Usina:
def __init__(self, id, nome, descricao):
self.id = id
self.nome = nome
self.descricao = descricao
@pytest.... | Forked-ONS/domain_reader | domain/tests/test_app.py | test_app.py | py | 1,364 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "falcon.testing.TestClient",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "domain.app.api",
"line_number": 21,
"usage_type": "argument"
},
{
"api_name": "falcon.testing",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "pytest.fi... |
10464116533 | # -*- coding: utf-8 -*-
import os
import re
import json
import pytest
import pandas as pd
from twstock.tasker import get_stock_info, get_top_stock
@pytest.fixture(scope="module")
def test_get_stock_info():
today = "20220601"
stock_info_df = get_stock_info(today=today)
assert type(stock_info_df) == pd.... | yuchio8156/twstock | tests/test_tasker.py | test_tasker.py | py | 1,751 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "twstock.tasker.get_stock_info",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "os.path.isfile",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os... |
15474655708 | from typing import List
Grid = List[List[int]]
class Determinant:
def __init__(self, matrix: Grid) -> None:
self.data = matrix
self.value = self.calculate(self.data)
def __repr__(self) -> None:
res = []
for row in self.data:
s_row = [str(e) for e in row]
res.append((" ".join... | ejdam87/web-math | linear_back/determinant.py | determinant.py | py | 1,638 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
}
] |
23923289346 | import logging
import os
import re
import string
import sys
import unicodedata
import urllib
import enforce
import gunicorn.app.base
import lxml.etree
from werkzeug.wrappers import Request, Response
from werkzeug.exceptions import BadRequest, NotFound
import seclay_xmlsig_proxy_config
from seclay_xmlsig_proxy_config im... | identinetics/seclay_xmlsig_proxy | sig_proxy_server.py | sig_proxy_server.py | py | 12,324 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "enforce.config",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "werkzeug.wrappers.Request",
"line_number": 41,
"usage_type": "name"
},
{
"api_name": "seclay_xmlsig_proxy_config.SigProxyConfig.loadsigproxyclient_path",
"line_number": 43,
"usage_ty... |
41401612768 | #!python
# -*- coding: utf-8 -*-
#
# This software and supporting documentation are distributed by
# Institut Federatif de Recherche 49
# CEA/NeuroSpin, Batiment 145,
# 91191 Gif-sur-Yvette cedex
# France
#
# This software is governed by the CeCILL license version 2 under
# French law and abiding b... | neurospin/deep_folding | deep_folding/utils/split_train_test.py | split_train_test.py | py | 5,217 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "deep_folding.config.logs.set_file_logger",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 62,
"usage_type": "attribute"
},
{
"api_name":... |
20451301054 |
from __future__ import division, print_function
import sys
sys.path.append("../")
import logging
import numpy
import theano
from theano import tensor
from collections import OrderedDict
from blocks.bricks.base import application, Brick, lazy
from blocks.select import Selector
from . import HelmholtzMachine
from ... | jbornschein/bihm | src/helmholtz/rws.py | rws.py | py | 6,710 | python | en | code | 41 | github-code | 21 | [
{
"api_name": "sys.path.append",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "theano.config",
"li... |
26884750782 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('clients', '0002_auto_20141107_1933'),
]
operations = [
migrations.AlterField(
model_name='client',
n... | RumorIO/healersource | apps/clients/migrations/0003_auto_20150119_1136.py | 0003_auto_20150119_1136.py | py | 710 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.AlterField",
"line_number": 14,
"usage_type": "call"
},
{... |
11772287832 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: Donny You(youansheng@gmail.com)
# Single Shot Detector data loader
import os
import json
import random
import torch.utils.data as data
from lib.parallel.data_container import DataContainer
from lib.tools.helper.image_helper import ImageHelper
from lib.tools.util... | donnyyou/torchcv | data/gan/datasets/default_facegan_dataset.py | default_facegan_dataset.py | py | 4,393 | python | en | code | 2,235 | github-code | 21 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "torch.utils.data",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "lib.tools.helper.image_helper.ImageHelper.read_image",
"line_number": 28,
"usage_type": "c... |
13381160696 | import csv
import time
from credentials import *
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
from selenium.commo... | ulyssecrn/linkedin-extractor | v2.py | v2.py | py | 2,266 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "selenium.webdriver.support.ui.WebDriverWait",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.support.expected_conditions.presence_of_element_located",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver.support... |
4527555539 | import sqlite3
def create_db():
conn = sqlite3.connect('students.db')
curs = conn.cursor()
curs.execute('''create table if not exists students
(id integer primary key autoincrement, name text, grade integer)''')
conn.commit()
conn.close()
def add_student():
name... | Seantix/rrrRrrr | db.py | db.py | py | 2,178 | python | ru | code | 0 | github-code | 21 | [
{
"api_name": "sqlite3.connect",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "sqlite3.connect",
... |
23584556483 | import argparse
import tensorflow as tf
import tensorflow_compression as tfc
import CNN_img
import load
import gc
import MVP_network
import time
from matplotlib import pyplot as plt
from MFE_Net import *
os.environ['CUDA_VISIBLE_DEVICES']='4'
config = tf.ConfigProto(allow_soft_placement=True)
sess = tf.Sess... | fwz1021/JCEVC | main.py | main.py | py | 13,433 | python | en | code | 6 | github-code | 21 | [
{
"api_name": "tensorflow.ConfigProto",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "tensorflow.Session",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "arg... |
18850899004 | from django.test import TestCase
from .clustal_omega import *
class SequenceAlignmentTestCase(TestCase):
def setUp(self):
pass
def test_simple_sequence_alignment(self):
sequences = ">seq1\nACDEFGHIKLMNPQRSTVWY\n>seq2\nXXXXACDEFGHIMNXXXPQR\n>seq3\nACDEFGHILMNXXXXXPQRS\n>seq4\nXXXACDEFGHIKLMNPQ... | parv112281/CSCI-E-33A | Final_Project/finalproject/epitope_extraction_tool/tests.py | tests.py | py | 1,902 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.test.TestCase",
"line_number": 4,
"usage_type": "name"
}
] |
39370888904 | import tkinter as tk
import customtkinter as ctk
from PIL import Image
from .panel import Panel
#####################################################
# Clase que contiene el panel de ayuda del simulador
# con el que el usuario puede obtener información
# sobre su uso y manejo.
######################################... | Francisco-Miguel-Ruiz-Ibanez-1997/simulador_reducciones_polinomicas | interfaz_grafica/interfaz_app/paneles/panel_ayuda.py | panel_ayuda.py | py | 13,529 | python | es | code | 0 | github-code | 21 | [
{
"api_name": "panel.Panel",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "customtkinter.CTkFrame",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "customtkinter.CTkTabview",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "customtki... |
22789960242 | import os
import numpy as np
import pandas as pd
from glob import glob
from utils.data_preprocessing import get_df
from utils.setting import Setting
from utils.trainer import Trainer
def main():
args, logger = Setting().run()
df = get_df(args)
if args.output_path_list:
model_list = []
... | raki-1203/2022_Tourism_Data_AI_Contest | inference.py | inference.py | py | 1,496 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "utils.setting.Setting",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "utils.data_preprocessing.get_df",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.pa... |
33898976813 | from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
if TYPE_CHECKING:
from ..models.address import Address
T = TypeVar("T", bound="OrderAddress")
@attr.s(auto_attribs=True)
class OrderAddress:
r"""The shipping address for the order.
At... | milyord/sp-api | sp/orders_v0/models/order_address.py | order_address.py | py | 2,447 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "typing.TypeVar",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "typing.Union",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "types.Unset",
"li... |
38124735645 | import numpy as np
import matplotlib.pyplot as plt
from scipy import interpolate
x = np.arange(0, 10)
y = np.exp(-x/3.0)
f = interpolate.interp1d(x, y)
print("El valor interpolado en x=", 5, "es", f(5))
#interpolamos muchos puntos!
xnew = np.arange(0, 9, 0.1)
ynew = f(xnew)
plt.plot(x, y, 'o', xnew, ynew, '--')
plt.... | NicasioSirvent/halvorsen | interpolate_scipy.py | interpolate_scipy.py | py | 326 | python | es | code | 0 | github-code | 21 | [
{
"api_name": "numpy.arange",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "scipy.interpolate.interp1d",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "scipy.interpolate",
... |
17056967593 | import datetime
import decimal
import logging
import nmea_util
import os
import pynmea2
import re
from messaging import EventDrivenMessageClient, msg_pack as _msg_pack
from pynmea2 import nmea_utils
from parsing import _parse_dict
from common_util import dict_key_by_value
log = logging.getLogger(__name__)
client = ... | autopi-io/autopi-core | src/salt/base/ext/_modules/ec2x.py | ec2x.py | py | 39,381 | python | en | code | 142 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "messaging.EventDrivenMessageClient",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "messaging.msg_pack",
"line_number": 53,
"usage_type": "call"
},
{
"api_name"... |
74768471733 | #!/usr/bin/env python3
import jwt
from flask import Blueprint, request
from peewee import DoesNotExist
import spotipy
from tools.db import needs_db
from tools.env import SERV_URL, SPOTIFY_CLIENT_ID, SPOTIFY_CLIENT_SECRET, JWT_SECRET
from tools.tokens import verify_jwt
from tools.fomarting import close_window
from mode... | luannbertaud/YEP-Area | api/controllers/oauth/spotify.py | spotify.py | py | 2,083 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "flask.Blueprint",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.request.headers",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "jwt.decode",... |
74807724532 | import sys
import zmq
import _thread
import netifaces
import ipaddress
import time
from threading import Lock, Thread
import zmq_api_zkclient as zk
# Socket to talk to server
context = zmq.Context()
pub_dict = dict()
pub_topic_dict = dict()
sub_dict = dict()
sub_topic_dict = dict()
sub_port_dict = dict()
pub_socke... | jdunn-git/Pub-Sub-Load-Balancing | assignment2/zmq_api.py | zmq_api.py | py | 26,394 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "zmq.Context",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "zmq.PUB",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "zmq.SUB",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "zmq.REQ",
"line_number": 22... |
45461785964 | from django.db import models
from uuid import uuid4
from companies.models import Company
from recruiters.models import Recruiter
from interns.models import Intern
class Job(models.Model):
jobId = models.UUIDField(primary_key=True, default=uuid4, editable=False)
company = models.ForeignKey(Company, on_delete=... | ozemin/internity-rest | jobs/models.py | models.py | py | 1,749 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.db.models.Model",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.db.models.UUIDField",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": ... |
36070686521 | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 26 06:21:42 2019
@author: Adonis-Note
"""
# Artificial Neural Network
# Installing Theano
# pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
# Installing Tensorflow
# Install Tensorflow from the website: https://www.tensorflow.org/versions/r0.12/g... | adonisDias/Machine-Learning-Basic---A-Z | Part 8 - Deep Learning/Section 39 - Artificial Neural Networks (ANN)/ann - ADONIS.py | ann - ADONIS.py | py | 4,203 | python | pt | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.LabelEncoder",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.LabelEncoder",
"line_number": 39,
"usage_type": "call"
},
{
... |
38460232446 | """Test for Compute Resource UI
:Requirement: Computeresource
:CaseAutomation: Automated
:CaseLevel: Acceptance
:CaseComponent: UI
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
import requests
from nailgun import entities
from robottelo.datafactory import gen_string
from robottelo.decorators imp... | sghai/robottelo | tests/foreman/ui_airgun/test_computeresource.py | test_computeresource.py | py | 7,327 | python | en | code | null | github-code | 21 | [
{
"api_name": "robottelo.config.settings.rhev",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "robottelo.config.settings",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 31,
"usage_type": "call"
},
{
"api_na... |
32709461497 | import json
from django.shortcuts import get_object_or_404
from django.http import JsonResponse
from django.core.mail import send_mail
from django.template.loader import render_to_string
from apps.cart.cart import Cart
from .models import Product
from apps.order.models import Order
from apps.order.utils import check... | paudelgaurav/ecom | apps/store/api.py | api.py | py | 1,971 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "json.loads",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "apps.cart.cart.Cart",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.get_object_or_404",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "mod... |
19951797648 | #! ptyhon3
# Chapter 8 Practice Project
# Extend the Multiclipboard project to include a delete option
# Loads and saves clipboard text based on a key word from the command line
# Usage: py.exe mcb.pyw save <keyword> - Saves to clipboard
# py.exe mcb.pyw <keyword> - Loads keyword to clipboard
# ... | dennisnderitu254/Automate-the-boring-stuff-in-Python | chapter8/Chap8PracMcbDelete.pyw | Chap8PracMcbDelete.pyw | pyw | 1,127 | python | en | code | 14 | github-code | 21 | [
{
"api_name": "shelve.open",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "pyperclip.paste",
"line_n... |
18405499569 | from itertools import accumulate; from math import floor,ceil; import operator; import random; import string; from bisect import *; from collections import deque, defaultdict, Counter, OrderedDict; from functools import reduce,cache; from heapq import *; import unittest; from typing import List,Optional; from functools... | afzalsiddique/problem-solving | Problem_Solving_Python/leetcode/lc26.py | lc26.py | py | 2,197 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 3... |
72789157173 | import random
from itertools import count
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
plt.style.use('fivethirtyeight')
x_vals = []
y_vals = []
index = count()
def animate(i,x):
r = random.randint(0,5)
z = x*r
print(r,x,z)
x_vals.append(next(index))
y_vals.appe... | dajoariando/WMPMRI_PCBv11_HDLv2_2022_PyDev | GNRL_basic_test/animate.py | animate.py | py | 473 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 6,
"usage_type": "name"
},
{
"api_name"... |
26399041782 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import find_packages
from setuptools import setup
with open('README.rst', 'rt') as readme_file:
readme = readme_file.read()
def prerelease_local_scheme(version):
"""
Return local scheme version unless building on master in Circle... | SarderLab/Multi-Compartment-Segmentation | setup.py | setup.py | py | 2,904 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "os.getenv",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "setuptools_scm.version.get_local_node_and_date",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "setuptools.setup",
"line_number": 31,
"usage_type": "call"
},
{
"api_nam... |
39792013784 | import discord
from discord.ext import commands
import os
import format
bot = commands.Bot(command_prefix='!@#$%^&*()')
bot.remove_command('help')
async def get_server_count():
all=online=robot=0
for member in bot.get_all_members():
if member.bot:
robot += 1
else:
all +... | ChemicallyAwake/Discord-Server-Stats-Display | bot.py | bot.py | py | 1,483 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "discord.ext.commands.Bot",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "discord.ext.commands",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "discord.Status",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.ge... |
7783367444 | import copy
import numpy as np
import scipy.sparse as sp
import pytest
from gust import SparseGraph, GraphCollection, DistanceMatrix
class TestGraphCollection:
def setup(self):
A = sp.csr_matrix(np.array(
[[1. , 0. , 0.5, 0. , 0. ],
[0. , 1. , 1. , 0. , 0. ],
... | richtertill/node_embeddings | gust/tests/test_graphcollection.py | test_graphcollection.py | py | 8,386 | python | en | code | 6 | github-code | 21 | [
{
"api_name": "scipy.sparse.csr_matrix",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "scipy.sparse",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "numpy.array",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"l... |
3786869334 |
# coding: utf-8
# In[11]:
import sympy #imports the Sympy library
from sympy.interactive import printing #imports basicn functions that allow sympy to unteract with python
printing.init_printing(use_latex=True) #makes the output look pretty.
from sympy import Eq, solve_linear_system, Matrix #imports the equation a... | grantezra/IT105-Rough-Draft | Grant- IT105 Project For Sub.py | Grant- IT105 Project For Sub.py | py | 2,161 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sympy.interactive.printing.init_printing",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sympy.interactive.printing",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "sympy.Function",
"line_number": 43,
"usage_type": "name"
},
{
"... |
5611574424 | from flask import Flask
from control import running
import flask
from sqlalchemy.orm import Session
from sqlalchemy import select
from Databases import Links_point
from connect import engine
session = Session(bind=engine)
#Do a query searching for link
def QR_query(link):
statement = select(Links_point).where(Link... | anh-dz/greenlive | control/Website.py | Website.py | py | 942 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "sqlalchemy.orm.Session",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "connect.engine",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.select",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "Databases.Links... |
12690720906 | #!/usr/bin/env python
# coding: utf-8
# In[2]:
import os
import numpy as np
import pandas as pd
from tqdm import tqdm
from rdkit import Chem, DataStructs
from rdkit.Chem import AllChem
from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier
from sklearn.model_selection import cross_val_score, trai... | srijitseal/JUMPCP_Exploration | 04_structural_models/Structural_models_v4.py | Structural_models_v4.py | py | 8,020 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.path.append",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "rdkit.Chem.MolFromSmiles",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "rdkit.Chem",
... |
38963630974 | """
Tests common to list and UserList.UserList
"""
from yp import *
import sys
import os
from python_test import yp_unittest
from functools import cmp_to_key
from python_test import support, seq_tests
from python_test.support import ALWAYS_EQ, NEVER_EQ
# Extra assurance that we're not accidentally testing Python's t... | Syeberman/nohtyP | Lib/python_test/list_tests.py | list_tests.py | py | 18,848 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "python_test.seq_tests.CommonTest",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "python_test.seq_tests",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "python_test.yp_unittest.skip_not_applicable",
"line_number": 21,
"usage_type"... |
32828211634 | from filterpy.kalman import KalmanFilter
import numpy as np
class IP_KF():
def __init__(self, init_x, init_y):
# System and Measurement model
# x = [x_postition, x_velocity, y_position, y_velocity] : system states
# x = [x_postition, y_position] : Measurement states
... | cdbharath/rubiks_cube_3dcv | kalman_filter.py | kalman_filter.py | py | 1,667 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "numpy.array",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.float",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "numpy.array",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "numpy.eye",
"line_number... |
3057075016 | import sys
from typing import List, Tuple
class Solution:
"""
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0?
Find all unique triplets in the array which gives the sum of zero.
:param nums: int list
:return: triplets such as a + b + c = 0
"""
... | fbokovikov/leetcode | solutions/sum_3sum.py | sum_3sum.py | py | 2,553 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "typing.Tuple",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number":... |
1452554661 | from sklearn.tree import DecisionTreeClassifier
import numpy as np
import pandas as pd
def optimal_binning_boundary(df_name, col, target):
"""
决策树分箱
:param df_name: dataframe
:param col: column name
:param target: y
:return:
"""
boundary = []
x = df_name[col].values
y = df_name... | nexusme/data_process_tools | Tools/FeatureEngineering/original_methods/TranserFeatures/bin_decision_tree.py | bin_decision_tree.py | py | 2,230 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "sklearn.tree.DecisionTreeClassifier",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "pandas.cut",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "numpy.lo... |
29744836887 | import json
import os
import base64
import time
import calendar
from functools import wraps
from defusedxml import ElementTree
from flask import redirect, request, Blueprint, abort, g, session, url_for, flash
import requests
auth = Blueprint("auth", __name__, template_folder="templates")
state = "TiTEveWebV1"
user_ag... | tritanium-industries/TITDev | views/auth.py | auth.py | py | 27,636 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Blueprint",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line... |
38613258387 | import logging
import logging.config
import PIL
import json
from os.path import join, exists, split, realpath
import time
from os import mkdir, getcwd
import torch
import matplotlib.pyplot as plt
import numpy as np
import torch.nn.functional as F
from torchvision import transforms
import torch.nn as nn
imp... | yolish/spectral-RPR | util/utils.py | utils.py | py | 5,175 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "torch.nn.Sequential",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "copy.deepcopy",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "torch.norm",
"line_num... |
18728479708 | import requests
import os
from datetime import datetime, timedelta
class GithubCommitExtractor:
def __init__(self, repo_url, ):
self.repo_url = repo_url
self.api_url = self._create_api_url()
self.git_token = os.environ.get("GITHUB_TOKEN")
def _create_api_url(self):
api_url = ... | ganguvamshi/commit_etl | ETL/Github.py | Github.py | py | 1,793 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.environ.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.now",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "datetime.datetime"... |
41798665016 | from typing import List, Optional
import numpy as np
import srl
import srl.rl.random_play
from srl.base.env.env_run import EnvRun
from srl.base.rl.base import RLTrainer
from srl.base.rl.worker_run import WorkerRun
from srl.utils import common
# --- env & algorithm load
from srl.envs import ox # isort: skip # noqa F... | pocokhc/simple_distributed_rl | examples/raw/play_multiplay.py | play_multiplay.py | py | 4,067 | python | en | code | 25 | github-code | 21 | [
{
"api_name": "srl.base.env.env_run.EnvRun",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "srl.base.rl.worker_run.WorkerRun",
"line_number": 19,
"usage_type": "name"
},
{
"api_name... |
9097063825 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import numpy as np
import pandas as pd
from datetime import datetime, date
import yaml
from source.event.event import EventType
from source.event.backtest_event_engine import BacktestEventEngine
from source.data.backtest_data_feed_quandl import BacktestDataFeedQu... | timothyyu/ml_monorepo | EliteQuant_Python/source/backtest_engine.py | backtest_engine.py | py | 7,956 | python | en | code | 59 | github-code | 21 | [
{
"api_name": "source.data.backtest_data_feed_local_single_symbol.BacktestDataFeedLocalSingleSymbol",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "source.data.backtest_data_feed_local_multiple_symbols.BacktestDataFeedLocalMultipleSymbols",
"line_number": 64,
"usage_type": "c... |
5033366913 | from flask import request, Request, jsonify
from db import db
from models.commits import Commits, commit_schema, commits_schema
from models.repositories import repo_schema
from models.repositories import Repositories
from util.reflection import populate_obj
from lib.authenticate import *
@auth
def add_commit(req: Re... | Jamesh431/Cyclone | controllers/commits_controller.py | commits_controller.py | py | 2,987 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Request",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "flask.request.form",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "flask.request.jso... |
28485586011 | import torch
from torch.nn import functional as f
from torch import nn
from models import Encoder, Decoder
from data import main_data
data = main_data()
max, vocab_enc, vocab_dec = data.len_all()
class Encoder(nn.Module):
def __init__(self, input_size, embedding_size, hidden_size, num_layers, p):
super... | MimansaSharma15/Animo | src/load_chatmodel.py | load_chatmodel.py | py | 2,133 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "data.main_data",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "data.len_all",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.nn.Module",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_n... |
1325691489 | import os
import gc
import sys
import json
import torch
import random
import subprocess
from werkzeug.utils import secure_filename
from flask import Flask, render_template, request, send_from_directory, url_for, jsonify
from flask_cors import CORS, cross_origin
from flaskwebgui import FlaskUI
from deepfake.inference... | wladradchenko/wunjo.wladradchenko.ru | portable/src/wunjo/app.py | app.py | py | 51,262 | python | en | code | 404 | github-code | 21 | [
{
"api_name": "diffusers.inference.create_diffusion_instruction",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 39,
"usage_type": "call"
},
{
"api_... |
21256186710 | import sqlite3
from datetime import date
from django.urls import reverse
from django.shortcuts import render, redirect
from django.contrib.auth.decorators import login_required
from hrapp.models import Computer
from hrapp.models import Employee
from ..connection import Connection
def get_computer(computer_id):
wi... | nss-day-cohort-33/bangazon-workforce-management-vendacien-caliphate | hrapp/views/computers/details.py | details.py | py | 2,941 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sqlite3.connect",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "connection.Connection.db_path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "connection.Connection",
"line_number": 12,
"usage_type": "name"
},
{
"api_name... |
73280797491 | from flask import Flask, jsonify, request
from flask_mysqldb import MySQL
app = Flask(__name__)
conexion = MySQL(app)
def registar_curso():
try:
cursor=conexion.connection.cursor()
sql= """INSERT INTO cursos (codigo, nombre, clase)
VALUES ('{0}', '{1}', '{2}')""... | braleehn09/api-rest-python-flask-mysql | src/SMS/POST.py | POST.py | py | 751 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "flask_mysqldb.MySQL",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "flask.request.json",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "flask.request",... |
16932600914 | # -*- coding: utf-8 -*-
# @Time : 2022/7/21 16:10
# @Author : Bingshuai Liu
import pandas as pd
import os
import logging
from tqdm import tqdm
logging.basicConfig(format='%(asctime)s - %(levelname)s - %(name)s - %(message)s',
datefmt='%m/%d/%Y %H:%M:%S',
level=logging.INFO)
lo... | bingshuailiu/BERT_SENTIMENT_CLASSIFICATION | preprocess/preprocess.py | preprocess.py | py | 3,698 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.basicConfig",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "pandas.read_cs... |
32125069936 | import torch
import json
from transformers import BertTokenizerFast
import functools
from torch.utils.data import Dataset, DataLoader
import random
lab={'M':0,'R':1,'P':2,'F':3,'ELE':4,'CA':5,'CO2':6,'RE':7,'BM':8,'BR':9,'BP':10,'BF':11,'O':12}
# BIO_lab={'B-M':0,'I-M':1,'B-R':2,'I-R':3,'B-P':4,'I-P':5,'B-F':6... | Xzaohui/chemical_ner | model_bertcrf/bert_data_manage.py | bert_data_manage.py | py | 3,990 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "transformers.BertTokenizerFast.from_pretrained",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "transformers.BertTokenizerFast",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "json.loads",
"line_number": 23,
"usage_type": "call"
},
... |
23298367382 | from django.urls import path, include
from rest_framework.routers import DefaultRouter
from post.views import PostViewSet, PostByIdViewSet
app_name = 'post'
router = DefaultRouter()
router.register('', PostViewSet, basename='posts')
router.register('', PostByIdViewSet, basename='post')
urlpatterns = [
path('... | rakhovetski/momentio | backend/post/urls.py | urls.py | py | 347 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "post.views.PostViewSet",
"line_number": 11,
"usage_type": "argument"
},
{
"api_name": "post.views.PostByIdViewSet",
"line_number": 12,
"usage_type": "argument"
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.