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
28461310050
import json import requests from tkinter import * from tkinter import scrolledtext def zapros(): repo = txt.get() #переменная через которую мы получаем значение от пользователя url = f"https://api.github.com/repos/{repo}" rep = requests.get(url).json() #переменная в которую делается запрос request и преобразует в...
ShiroShinigam1/PL-Litovchenko
пр 11/import json.py
import json.py
py
1,511
python
en
code
2
github-code
7
[ { "api_name": "requests.get", "line_number": 10, "usage_type": "call" }, { "api_name": "tkinter.scrolledtext.ScrolledText", "line_number": 45, "usage_type": "call" }, { "api_name": "tkinter.scrolledtext", "line_number": 45, "usage_type": "name" } ]
29460370820
# coding: utf-8 import types import numpy as np from numpy.linalg import solve from scipy.misc import comb from .system import AbstractSystem class StateSpace(AbstractSystem): '''state space F: transition matrix G: noise transition matrix H: observation matrix Q: transition covariance R: obs...
KojiOchiai/pyforecast
pyforecast/system/statespace.py
statespace.py
py
6,680
python
en
code
0
github-code
7
[ { "api_name": "system.AbstractSystem", "line_number": 10, "usage_type": "name" }, { "api_name": "numpy.ones", "line_number": 20, "usage_type": "attribute" }, { "api_name": "numpy.zeros", "line_number": 20, "usage_type": "attribute" }, { "api_name": "numpy.zeros", ...
24395485487
import requests, json import wikipediaapi wiki_wiki = wikipediaapi.Wikipedia('en') page_py = wiki_wiki.page('paracetamol') print("Page - Exists: %s" % page_py.exists()) print("Page - Title: %s" % page_py.title) # Page - Title: Python (programming language) print("Page - Summary: %s" % page_py.summary[0:60]) # Page...
joofio/WikipediaGet
wikipediaapi.py
wikipediaapi.py
py
2,274
python
en
code
0
github-code
7
[ { "api_name": "wikipediaapi.Wikipedia", "line_number": 5, "usage_type": "call" }, { "api_name": "wikipediaapi.Wikipedia", "line_number": 22, "usage_type": "call" }, { "api_name": "wikipediaapi.ExtractFormat", "line_number": 24, "usage_type": "attribute" }, { "api_...
38796690860
from keras.layers.convolutional import Conv2D from keras.layers import BatchNormalization, Activation from keras import initializers def conv2d_block(input_tensor, n_filters, kernel_size=3, batchnorm = True, seed = 0): initializer = initializers.he_normal(seed = seed) # First layer x = Conv2D(filters = n_...
fj23eslaonda/Wave_by_Wave_Identification
U-Net Architecture/conv2d_block.py
conv2d_block.py
py
801
python
en
code
5
github-code
7
[ { "api_name": "keras.initializers.he_normal", "line_number": 6, "usage_type": "call" }, { "api_name": "keras.initializers", "line_number": 6, "usage_type": "name" }, { "api_name": "keras.layers.convolutional.Conv2D", "line_number": 9, "usage_type": "call" }, { "ap...
40351943949
from typing import Any, Dict, Optional import getml.communication as comm from .connection import Connection def execute(query: str, conn: Optional[Connection] = None): """ Executes an SQL query on the database. Please note that this is not meant to return results. If you want to get results, use d...
getml/getml-community
src/python-api/getml/database/execute.py
execute.py
py
978
python
en
code
46
github-code
7
[ { "api_name": "typing.Optional", "line_number": 8, "usage_type": "name" }, { "api_name": "connection.Connection", "line_number": 8, "usage_type": "name" }, { "api_name": "connection.Connection", "line_number": 25, "usage_type": "call" }, { "api_name": "typing.Dict...
34914848753
#!/usr/bin/env python3 from termcolor import colored from telnetlib import Telnet from ast import arg from sys import exit import threading import argparse import socket import time def Good(msg): print(colored('[', 'cyan', attrs=['bold']) + colored("+", "white", attrs=['bold']) + colored('] ', "cyan", attrs=['bo...
0xSojalSec/-CVE-2011-2523
exploit.py
exploit.py
py
1,987
python
en
code
1
github-code
7
[ { "api_name": "termcolor.colored", "line_number": 13, "usage_type": "call" }, { "api_name": "termcolor.colored", "line_number": 15, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 23, "usage_type": "call" }, { "api_name": "socket.socket", "lin...
6311521922
from typing import List, Tuple, Union import numpy as np def check_data(data: Union[np.ndarray, List[np.ndarray]]) -> Tuple[np.ndarray, np.ndarray]: if isinstance(data, list): if len(data) == 0: return np.array([]), np.array([0]) bounds = [] start = 0 for seq in data: ...
AntoinePassemiers/ArchMM
archmm/utils.py
utils.py
py
545
python
en
code
33
github-code
7
[ { "api_name": "typing.Union", "line_number": 6, "usage_type": "name" }, { "api_name": "numpy.ndarray", "line_number": 6, "usage_type": "attribute" }, { "api_name": "typing.List", "line_number": 6, "usage_type": "name" }, { "api_name": "numpy.array", "line_numb...
6820720099
from typing import List import csv import os import struct import argparse import logging from pathlib import Path from io import IOBase from sllib.frame import Frame from sllib import Reader logger = logging.getLogger(__name__) # root = logging.getLogger('root') """ This was used to figure out valid...
opensounder/python-sllib
utils/offsets.py
offsets.py
py
3,513
python
en
code
11
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "csv.DictWriter", "line_number": 29, "usage_type": "call" }, { "api_name": "csv.DictWriter", "line_number": 28, "usage_type": "attribute" }, { "api_name": "io.IOBase", ...
38302640134
import re import wikipedia from paragraph import Paragraph class Wikipage: """Representation of wikipedia article""" def __init__(self, subject): """ subject (string) : subject of desired wikipedia article """ self.subject = subject self.page = wikipedia.page(self.subject) self.sections =...
helenmfoster/MLProject
wikipage.py
wikipage.py
py
2,295
python
en
code
0
github-code
7
[ { "api_name": "wikipedia.page", "line_number": 12, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 18, "usage_type": "call" }, { "api_name": "paragraph.Paragraph", "line_number": 32, "usage_type": "call" }, { "api_name": "paragraph.content", "li...
30657251349
#!/usr/bin/python3 """Tests for the Rectangle module.""" import unittest from models.base import Base from models.rectangle import Rectangle import io import sys import os class TestRectangle(unittest.TestCase): def setUp(self): self.saved_output = sys.stdout sys.stdout = io.StringIO() def...
Wangui-quinnie/alx-higher_level_programming
0x0C-python-almost_a_circle/tests/test_models/test_rectangle.py
test_rectangle.py
py
2,950
python
en
code
0
github-code
7
[ { "api_name": "unittest.TestCase", "line_number": 13, "usage_type": "attribute" }, { "api_name": "sys.stdout", "line_number": 16, "usage_type": "attribute" }, { "api_name": "sys.stdout", "line_number": 17, "usage_type": "attribute" }, { "api_name": "io.StringIO", ...
29543217290
import pygame import random import time pygame.init() # Colores black = (0, 0, 0) white = (255, 255, 255) red = (255, 0, 0) blue = (0, 0, 255) screen_size = (800, 600) player_width = 15 player_height = 90 screen = pygame.display.set_mode(screen_size) clock = pygame.time.Clock() # cordena...
franco954/Pong-Game
pong.py
pong.py
py
4,488
python
en
code
0
github-code
7
[ { "api_name": "pygame.init", "line_number": 6, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 20, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 20, "usage_type": "attribute" }, { "api_name": "pygame.time.Cl...
9250849958
"""Definitions for specifying how to start a component.""" from enum import Enum from pathlib import Path from typing import cast, Dict, List, Optional, Union from ruamel import yaml import yatiml from ymmsl.identity import Reference class KeepsStateForNextUse(Enum): """Describes whether an implementation keeps...
multiscale/ymmsl-python
ymmsl/execution.py
execution.py
py
13,477
python
en
code
2
github-code
7
[ { "api_name": "enum.Enum", "line_number": 12, "usage_type": "name" }, { "api_name": "yatiml.Node", "line_number": 29, "usage_type": "attribute" }, { "api_name": "typing.cast", "line_number": 31, "usage_type": "call" }, { "api_name": "yatiml.Node", "line_number...
9890507685
# coding: utf-8 """ Logic module for management of action translations Action translations contain all language-dependent attributes of an action for a specific language. """ import dataclasses import typing from flask_babel import _ from .. import db from . import errors, actions, languages from .languages import L...
sciapp/sampledb
sampledb/logic/action_translations.py
action_translations.py
py
7,430
python
en
code
21
github-code
7
[ { "api_name": "typing.List", "line_number": 29, "usage_type": "attribute" }, { "api_name": "languages.Language", "line_number": 29, "usage_type": "attribute" }, { "api_name": "dataclasses.field", "line_number": 29, "usage_type": "call" }, { "api_name": "languages....
24561601057
"""Test AzureML Endpoint wrapper.""" import json import os from pathlib import Path from typing import Dict from urllib.request import HTTPError import pytest from langchain_community.llms.azureml_endpoint import ( AzureMLOnlineEndpoint, ContentFormatterBase, DollyContentFormatter, HFContentFormatter...
langchain-ai/langchain
libs/community/tests/integration_tests/llms/test_azureml_endpoint.py
test_azureml_endpoint.py
py
4,963
python
en
code
68,990
github-code
7
[ { "api_name": "langchain_community.llms.azureml_endpoint.AzureMLOnlineEndpoint", "line_number": 23, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 24, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 25, "usage_type": "call" }, { ...
20490466290
import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import random mpl.rcParams['legend.fontsize'] = 10 fig = plt.figure() ax = fig.gca(projection='3d') xyz = [] cur = [0, 0, 0] for _ in range(20): axis = random.randrange(0, 3) cur[axis] += random.c...
CodeDem/mlprac
Practical8.py
Practical8.py
py
511
python
en
code
0
github-code
7
[ { "api_name": "matplotlib.rcParams", "line_number": 6, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot.figure", "line_number": 8, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 8, "usage_type": "name" }, { "api_name": "rand...
72870365022
import argparse import glob import os from shutil import copy import h5py import soundfile as sf import numpy as np import torch from torch import nn import tqdm from fairseq.models.wav2vec import Wav2VecModel def read_audio(fname): """ Load an audio file and return PCM along with the sample rate """ wav, ...
Ascend/ModelZoo-PyTorch
PyTorch/dev/nlp/FairSeq_Transformer_ID0496_for_PyTorch/scripts/wav2vec_featurize.py
wav2vec_featurize.py
py
6,825
python
en
code
31
github-code
7
[ { "api_name": "soundfile.read", "line_number": 19, "usage_type": "call" }, { "api_name": "torch.nn.Module", "line_number": 25, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 25, "usage_type": "name" }, { "api_name": "torch.load", "line_n...
3235332170
"""added details to user Revision ID: 411094f6b709 Revises: 0615faca43b1 Create Date: 2022-09-27 20:55:12.280567 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '411094f6b709' down_revision = '0615faca43b1' branch_label...
Kraken-CI/kraken
server/kraken/migrations/versions/411094f6b709_added_details_to_user.py
411094f6b709_added_details_to_user.py
py
527
python
en
code
107
github-code
7
[ { "api_name": "alembic.op.add_column", "line_number": 20, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 20, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 20, "usage_type": "call" }, { "api_name": "sqlalchemy.dialect...
6957996270
from __future__ import print_function from ortools.sat.python import cp_model as cp import math, sys # from cp_sat_utils import * class SolutionPrinter(cp.CpSolverSolutionCallback): """SolutionPrinter""" def __init__(self, x1, x2): cp.CpSolverSolutionCallback.__init__(self) self.__x1 = x1 ...
hakank/hakank
google_or_tools/sicherman_dice_sat.py
sicherman_dice_sat.py
py
2,306
python
en
code
339
github-code
7
[ { "api_name": "ortools.sat.python.cp_model.CpSolverSolutionCallback", "line_number": 6, "usage_type": "attribute" }, { "api_name": "ortools.sat.python.cp_model", "line_number": 6, "usage_type": "name" }, { "api_name": "ortools.sat.python.cp_model.CpSolverSolutionCallback.__init__...
12160539570
# -*- coding: utf8 -*- # Programa: Examen II Parcial // clase vehiculo # Autor: Akdiel Callejas Amador # Fecha 13/03/20 import datetime ultimo_id = 0 class Vehiculo: """ se encarga de la cración de un objeto tipo Vehículo """ def __init__(self, numero_placa, marca="", model="",tipo_vehiculo="" ): """...
ACallejas21/ExamenProgramaci-nMultiplataforma
vehiculo.py
vehiculo.py
py
930
python
es
code
0
github-code
7
[ { "api_name": "datetime.datetime.now", "line_number": 24, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 24, "usage_type": "attribute" } ]
14841990693
"""Utility functions for plotting.""" import plotnine as pn import pandas as pd from misc.util import encoder_columns def numeric_col_to_categorical(df: pd.DataFrame, col: str) -> pd.DataFrame: """Change a float valued column (e.g. run or round) to Categorical for visualization.""" # adjust values to Categor...
nathimel/ibsg
src/misc/vis.py
vis.py
py
6,363
python
en
code
1
github-code
7
[ { "api_name": "pandas.DataFrame", "line_number": 8, "usage_type": "attribute" }, { "api_name": "pandas.Categorical", "line_number": 13, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 18, "usage_type": "attribute" }, { "api_name": "pandas....
3091075540
from __future__ import unicode_literals from django.db import models import datetime # Create your models here. class Notices(models.Model): sender_name=models.CharField(max_length=30) sender_department=models.CharField(max_length=30) post_on=models.DateTimeField() content=models.CharField(max_length=250) class...
shakarbhattarai/TheKuApp
KUApp/Notice/models.py
models.py
py
1,228
python
en
code
0
github-code
7
[ { "api_name": "django.db.models.Model", "line_number": 7, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 7, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 8, "usage_type": "call" }, { "api_name": "...
5928605811
import numpy as np import matplotlib.pyplot as plt from scipy.optimize import curve_fit # 線形関数の定義 def linear_func(x, a, b): return a * x + b # データ数 n = 100 # xの範囲 x_min, x_max = 0, 10 # 誤差の範囲 error_range = 0.5 # xの配列を生成 x_values = np.linspace(x_min, x_max, n) # 2つのランダムな誤差を含むyの配列を生成 y1_values = 3 * x_values + ...
kuntaro0524/gemmi
03.scaled_cc/test2.py
test2.py
py
1,558
python
ja
code
0
github-code
7
[ { "api_name": "numpy.linspace", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.random.uniform", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 22, "usage_type": "attribute" }, { "api_name": "numpy.random.un...
44130944868
from typing import List, Any from unittest.mock import patch import torch import pytest from torchsim.core import get_float, SMALL_CONSTANT from torchsim.core.memory.tensor_creator import AllocatingCreator from torchsim.core.models.expert_params import ExpertParams, DEFAULT_CONTEXT_PRIOR, NUMBER_OF_CONTEXT_TYPES from...
GoodAI/torchsim
tests/core/models/temporal_pooler/test_temporal_pooler.py
test_temporal_pooler.py
py
22,840
python
en
code
9
github-code
7
[ { "api_name": "torchsim.core.models.expert_params.DEFAULT_CONTEXT_PRIOR", "line_number": 19, "usage_type": "name" }, { "api_name": "torchsim.core.models.expert_params.ExpertParams", "line_number": 22, "usage_type": "call" }, { "api_name": "torchsim.core.models.temporal_pooler.TPF...
37288889364
import torch import numpy as np import sys sys.path.append('..') from utils.sample_action import sample_a_from_q, sample_a_from_pi from model.ac import ActorCritic from model.dqn import QnetM from utils.settings import get_noisy_from_obs def exec_for_coll(env, model_tag, model, epsilon, opp_policy, device): obs ...
znnby1997/magent_workspace
interaction/exec.py
exec.py
py
3,797
python
en
code
0
github-code
7
[ { "api_name": "sys.path.append", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "torch.from_numpy", "line_number": 24, "usage_type": "call" }, { "api_name": "model.ac", "line_num...
11909013810
import requests import secrets nyt_key = 'ce642fbdc5234cbb9a549483edf4af2f' # gets stories from a particular section of NY times #constructing our query def get_stories(section): baseurl = 'https://api.nytimes.com/svc/topstories/v2/' #from NYT documentation extendedurl = baseurl + section + '.json' params...
sofialo14/nyt-example2
nyt.py
nyt.py
py
503
python
en
code
0
github-code
7
[ { "api_name": "secrets.nyt_key", "line_number": 11, "usage_type": "attribute" }, { "api_name": "requests.get", "line_number": 12, "usage_type": "call" } ]
2457766056
from discord.ext import commands import discord from utils import get_config, guild_exists import time class Client(commands.Bot): def __init__(self, prefix): super().__init__(command_prefix=prefix) self.help_command = None async def on_ready(self): print(f'{self.user} is connected and...
3than0ls/Imperical
client.py
client.py
py
1,442
python
en
code
0
github-code
7
[ { "api_name": "discord.ext.commands.Bot", "line_number": 6, "usage_type": "attribute" }, { "api_name": "discord.ext.commands", "line_number": 6, "usage_type": "name" }, { "api_name": "time.time", "line_number": 12, "usage_type": "call" }, { "api_name": "discord.Ga...
18819284807
# %% import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import Recursos import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg from scipy import linalg from sklearn import mixture from astropy.io import fits dirImg = "f:\\GITHUB_TRABAJOS\\proy...
midusi/spectrogram
old/Etapa_2b/plot_gmm_v3.py
plot_gmm_v3.py
py
8,193
python
en
code
2
github-code
7
[ { "api_name": "sys.path.append", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 4, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 4, "usage_type": "call" }, { "api_name": "os.path", "line_number...
70334445344
from itertools import groupby from operator import itemgetter import copy import json from django.conf import settings from django.contrib.auth.decorators import login_required from django.db import transaction from django.utils.decorators import method_decorator from django.views.generic import TemplateView from res...
catalyst/powerdns-zone-editor
powerdns_zone_editor/client/views.py
views.py
py
6,694
python
en
code
0
github-code
7
[ { "api_name": "client.pdns.PowerDnsClient", "line_number": 22, "usage_type": "call" }, { "api_name": "django.conf.settings.POWERDNS", "line_number": 24, "usage_type": "attribute" }, { "api_name": "django.conf.settings", "line_number": 24, "usage_type": "name" }, { ...
72223545503
import json as _json import datetime import dateutil.parser import decimal import sys __all__ = ['json', 'instead_json'] CONVERTERS = { 'datetime': { 'type': datetime.datetime, 'parser': dateutil.parser.parse, 'format': lambda x: x.isoformat(), }, 'date': { 'type': datetim...
algo2019/algorithm
AlgorithmEngine/ExternalProgramma/DataService/ds_tools.py
ds_tools.py
py
1,714
python
en
code
0
github-code
7
[ { "api_name": "datetime.datetime", "line_number": 12, "usage_type": "attribute" }, { "api_name": "dateutil.parser.parser", "line_number": 13, "usage_type": "attribute" }, { "api_name": "dateutil.parser", "line_number": 13, "usage_type": "name" }, { "api_name": "da...
22804409578
import geometry import torchvision import util from pytorch_prototyping import pytorch_prototyping import torch from torch import nn def init_recurrent_weights(self): for m in self.modules(): if type(m) in [nn.GRU, nn.LSTM, nn.RNN]: for name, param in m.named_parameters(): if...
vsitzmann/scene-representation-networks
custom_layers.py
custom_layers.py
py
7,153
python
en
code
399
github-code
7
[ { "api_name": "torch.nn.GRU", "line_number": 13, "usage_type": "attribute" }, { "api_name": "torch.nn", "line_number": 13, "usage_type": "name" }, { "api_name": "torch.nn.LSTM", "line_number": 13, "usage_type": "attribute" }, { "api_name": "torch.nn.RNN", "lin...
10374479185
#!/usr/bin/python3 """Stabilizer streaming receiver and parsers""" import argparse import asyncio import logging import struct from collections import namedtuple from dataclasses import dataclass import numpy as np from . import DAC_VOLTS_PER_LSB logger = logging.getLogger(__name__) Trace = namedtuple("Trace", "va...
svrotter/stabilizer
py/stabilizer/stream.py
stream.py
py
5,347
python
en
code
null
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 15, "usage_type": "call" }, { "api_name": "collections.namedtuple", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.frombuffer", "line_number": 43, "usage_type": "call" }, { "api_name": "numpy.int16...
1794998422
from django.conf.urls import url, include from .views import HomeView, BookingListView, BookingDetailView, CreateAgreementView, OccupancyView, StatsView urlpatterns = [ url(r'^$', HomeView.as_view(), name='home'), url(r'^booking/$', BookingListView.as_view(), name='booking_list'), url(r'^booking/(?P<pk>\d...
eedf/becours
booking/urls.py
urls.py
py
585
python
en
code
0
github-code
7
[ { "api_name": "django.conf.urls.url", "line_number": 6, "usage_type": "call" }, { "api_name": "views.HomeView.as_view", "line_number": 6, "usage_type": "call" }, { "api_name": "views.HomeView", "line_number": 6, "usage_type": "name" }, { "api_name": "django.conf.u...
30173731827
import yt_dlp import urllib import json def yt_dlp_version(): return yt_dlp.version.__version__ def query_video(page_url): ''' query_video: queries metadata for the video in page_url using yt_dlp Returns 'None' on error ''' ydl_opts = {'nocheckcertificate' : True, 'quiet': True...
frostwire/frostwire
android/src/main/python/telluride.py
telluride.py
py
771
python
en
code
452
github-code
7
[ { "api_name": "yt_dlp.version", "line_number": 6, "usage_type": "attribute" }, { "api_name": "yt_dlp.YoutubeDL", "line_number": 18, "usage_type": "call" }, { "api_name": "urllib.parse.unquote", "line_number": 20, "usage_type": "call" }, { "api_name": "urllib.parse...
7499197273
from flask import Flask, jsonify, render_template, request import os import training import chatbot app = Flask(__name__) @app.route("/") def home(): return render_template("index.html") @app.route("/get") def get_bot_response(): userText = request.args.get('msg') ints = chatbot.predict_class(userText...
ariarub/railway-chat
main.py
main.py
py
468
python
en
code
0
github-code
7
[ { "api_name": "flask.Flask", "line_number": 6, "usage_type": "call" }, { "api_name": "flask.render_template", "line_number": 11, "usage_type": "call" }, { "api_name": "flask.request.args.get", "line_number": 15, "usage_type": "call" }, { "api_name": "flask.request...
10798649148
import os import maya.OpenMaya as OpenMaya import maya.OpenMayaMPx as OpenMayaMPx import maya.OpenMayaAnim as OpenMayaAnim import maya.cmds as cmds import maya.mel as mel kPluginCmdName = 'manageSkinCluster' # -------------------------------------------------------------------------------- # argument flags # ------...
adbrower/maya_script
Adbrower/plug-ins/adbSkinCluster__Command.py
adbSkinCluster__Command.py
py
17,261
python
en
code
1
github-code
7
[ { "api_name": "maya.OpenMayaMPx.MPxCommand", "line_number": 48, "usage_type": "attribute" }, { "api_name": "maya.OpenMayaMPx", "line_number": 48, "usage_type": "name" }, { "api_name": "maya.OpenMayaMPx.MPxCommand.__init__", "line_number": 51, "usage_type": "call" }, {...
73375701344
# -*- coding:utf-8 -*- import sys import numpy as np import pandas as pd import seaborn as sns from hmmlearn.hmm import GaussianHMM from matplotlib import pyplot as plt import tushare as tu import seaborn as sns n = 6 # 六个隐藏状态 beginTime = '2015-1-1' endTime = '2018-12-1' data = tu.get_hist_data('sh', beginTime, endTi...
DanLongChen/DataAnalyze
HMM/HmmModel.py
HmmModel.py
py
1,337
python
en
code
0
github-code
7
[ { "api_name": "tushare.get_hist_data", "line_number": 14, "usage_type": "call" }, { "api_name": "pandas.to_datetime", "line_number": 20, "usage_type": "call" }, { "api_name": "numpy.log", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.array", ...
32627033286
import smtplib import os from email.message import EmailMessage from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import __init__ # Username = os.environ['GMAIL'] Password = os.environ['GMAIL_PASSWORD'] server = smtplib.SMTP('smtp.gmail.com', 587) server.starttls() server.login(Use...
mhbakus/Class-Files
dict.py
dict.py
py
2,887
python
en
code
0
github-code
7
[ { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 11, "usage_type": "attribute" }, { "api_name": "smtplib.SMTP", "line_number": 14, "usage_type": "call" }, { "api_name": "email.message", "lin...
73268363423
import sys import os from PIL import Image, ImageEnhance, ImageDraw, ImageFilter import numpy as np from shapes import Punto, Triangulo from delaunay import triangular USAGE = "error: Espicifique un archivo imagen para realizar triangulación de delaunay" MIN_PUNTO_DISTANCIA = 5 GRIS_CLARO = 20 def main(): if len...
carolinardlc/delaunay-triangulation
main.py
main.py
py
2,062
python
es
code
0
github-code
7
[ { "api_name": "sys.argv", "line_number": 14, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 18, "usage_type": "attribute" }, { "api_name": "PIL.Image.open", "line_number": 21, "usage_type": "call" }, { "api_name": "PIL.Image", "line_numb...
4634554497
from typing import List from fastapi import APIRouter, Depends, status, HTTPException from sqlalchemy.orm import Session from app.database.models import Deliveryman as DeliverymanModel from app.database.connection import get_db from app.schemas.deliveryman import DeliverymanResponse from app.schemas.deliveryman impor...
eduardomatoss/cybersecurity-fiap
app/routers/deliveryman.py
deliveryman.py
py
1,786
python
en
code
0
github-code
7
[ { "api_name": "fastapi.APIRouter", "line_number": 12, "usage_type": "call" }, { "api_name": "sqlalchemy.orm.Session", "line_number": 17, "usage_type": "name" }, { "api_name": "fastapi.Depends", "line_number": 17, "usage_type": "call" }, { "api_name": "app.database...
41801127646
#!/usr/bin/env python import sqlite3 import os import database as gemini_db import gemini_utils as util def append_variant_info(main_curr, chunk_db): """ Append the variant and variant_info data from a chunk_db to the main database. """ cmd = "attach ? as toMerge" main_curr.execute(cmd, (chun...
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/gemini-0.10.0-py2.7.egg/gemini/gemini_merge_chunks.py
gemini_merge_chunks.py
py
5,343
python
en
code
1
github-code
7
[ { "api_name": "sqlite3.connect", "line_number": 126, "usage_type": "call" }, { "api_name": "sqlite3.Row", "line_number": 128, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 153, "usage_type": "call" }, { "api_name": "os.path", "lin...
5950123119
from __future__ import print_function from time import time from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer from sklearn.decomposition import NMF, LatentDirichletAllocation from sklearn.datasets import fetch_20newsgroups import pickle import collections import numpy as np import pandas as p...
lmeier/moral-reasoning
lda.py
lda.py
py
3,357
python
en
code
0
github-code
7
[ { "api_name": "numpy.array", "line_number": 39, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 39, "usage_type": "call" }, { "api_name": "nltk.stem.WordNetLemmatizer", "line_number": 69, "usage_type": "call" }, { "api_name": "nltk.word_tokeniz...
37239422960
import base64 import io import json import numpy as np import pandas as pd from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization, hashes from cryptography.hazmat.primitives.asymmetric import padding from django.contrib.auth.models import User from django.db i...
noatgnu/curtainbe
curtain/utils.py
utils.py
py
2,958
python
en
code
0
github-code
7
[ { "api_name": "rest_framework_simplejwt.tokens.AccessToken", "line_number": 19, "usage_type": "call" }, { "api_name": "django.contrib.auth.models.User.objects.filter", "line_number": 20, "usage_type": "call" }, { "api_name": "django.contrib.auth.models.User.objects", "line_nu...
70994369502
import json import os EXCEPTIONS_KYUJITAI = { '缺缺': '欠缺', '共倭國': '共和國', } EXCEPTIONS_SHINJITAI = { '欠欠': '欠缺', } class BasicConverter(object): """ Basic converter, only converting Shinjitai to Kyujitai, and vice versa (WITHOUT kakikae) """ def __init__(self): # Determine Shinjit...
elizagamedev/anki-hanziweb
kyujipy/__init__.py
__init__.py
py
6,460
python
en
code
5
github-code
7
[ { "api_name": "os.path.abspath", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path", "line_number": 21, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 21, "usage_type": "call" }, { "api_name": "os.path.join", "line...
74587755741
import pghistory import model_utils.fields import mptt.fields import django.utils.timezone from django.contrib.auth.models import Group from django.db import models from model_utils.models import SoftDeletableModel, TimeStampedModel from mptt.models import MPTTModel, TreeForeignKey from attendees.whereabouts.models im...
xjlin0/attendees32
attendees/users/models/menu.py
menu.py
py
6,395
python
en
code
1
github-code
7
[ { "api_name": "mptt.models.MPTTModel", "line_number": 13, "usage_type": "name" }, { "api_name": "model_utils.models.TimeStampedModel", "line_number": 13, "usage_type": "name" }, { "api_name": "model_utils.models.SoftDeletableModel", "line_number": 13, "usage_type": "name"...
72289102304
import pygame import random import math # Initialize the game engine pygame.init() BLACK = [0, 0, 0] WHITE = [255, 255, 255] WIDTH = 500 HEIGHT = 500 # Set the height and width of the screen SIZE = [WIDTH, HEIGHT] screen = pygame.display.set_mode(SIZE) pygame.display.set_caption("Ball Animation") BLACK = ( 0, 0...
alpercanberk/pygame-projects-acanberk
2D_Kinematics_with_Friction.py
2D_Kinematics_with_Friction.py
py
3,596
python
en
code
0
github-code
7
[ { "api_name": "pygame.init", "line_number": 6, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 16, "usage_type": "call" }, { "api_name": "pygame.display", "line_number": 16, "usage_type": "attribute" }, { "api_name": "pygame.display...
71935760223
import argparse import logging import os import shutil import sys import tempfile import traceback import yaml from cros.factory.test.env import paths from cros.factory.utils import file_utils from cros.factory.utils.process_utils import Spawn DESCRIPTION = ''' Audits source hashes logged during system finalization...
arccode/factory
py/tools/audit_source_hashes.py
audit_source_hashes.py
py
5,798
python
en
code
3
github-code
7
[ { "api_name": "os.path.isdir", "line_number": 50, "usage_type": "call" }, { "api_name": "os.path", "line_number": 50, "usage_type": "attribute" }, { "api_name": "os.path.basename", "line_number": 51, "usage_type": "call" }, { "api_name": "os.path", "line_numbe...
15641176384
#!/usr/bin/env python import csv import os import re import sys import yaml import copy signs = { r'\(f\)': "female", r'\(m\)': "male", r'\(v\)': "verb", r'\(adj\.\)': "adjective", r'\(adj\.': "adjective", r'\(adv\.\)': "adverb", r'\(adv\)': "adverb", r'\(prep\.\)': "preposition", ...
kantoniko/ladino-diksionaryo-data
original/export_words_from_ladinokomunita.py
export_words_from_ladinokomunita.py
py
8,726
python
en
code
2
github-code
7
[ { "api_name": "re.sub", "line_number": 35, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 36, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 37, "usage_type": "call" }, { "api_name": "re.sub", "line_number": 38, "usage_type"...
70962824862
#!/usr/bin/python import time import subprocess import concurrent.futures import numpy as np from decimal import * from threading import Event from sense_hat import SenseHat from MotorDriver import * from ConnectionSenseHat import * from modules.PCA9685 import PCA9685 from multiprocessing import Value, Array, Process ...
nekonabesan/connectionScript
ver2ev3lmotor_local.py
ver2ev3lmotor_local.py
py
7,209
python
en
code
0
github-code
7
[ { "api_name": "subprocess.run", "line_number": 82, "usage_type": "call" }, { "api_name": "subprocess.PIPE", "line_number": 82, "usage_type": "attribute" }, { "api_name": "gpiozero.pins.pigpio.PiGPIOFactory", "line_number": 91, "usage_type": "call" }, { "api_name":...
72850600862
import math import os import tempfile from copy import deepcopy from unittest import TestCase import torch from mmcv.runner import load_checkpoint, save_checkpoint from mmcls.models.backbones import DistilledVisionTransformer from .utils import timm_resize_pos_embed class TestDeiT(TestCase): def setUp(self): ...
Ascend/ModelZoo-PyTorch
PyTorch/built-in/cv/classification/Resnet50_Cifar_for_PyTorch/tests/test_models/test_backbones/test_deit.py
test_deit.py
py
4,955
python
en
code
31
github-code
7
[ { "api_name": "unittest.TestCase", "line_number": 14, "usage_type": "name" }, { "api_name": "copy.deepcopy", "line_number": 22, "usage_type": "call" }, { "api_name": "mmcls.models.backbones.DistilledVisionTransformer", "line_number": 30, "usage_type": "call" }, { ...
5534631092
import re import pathlib from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand BASE_PATH = pathlib.Path(__file__).parent try: version = re.findall(r"""^__version__ = "([^']+)"\r?$""", (BASE_PATH / "aioftp" / "__init__.py").read_text(), ...
michalc/aioftp
setup.py
setup.py
py
1,678
python
en
code
null
github-code
7
[ { "api_name": "pathlib.Path", "line_number": 7, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 9, "usage_type": "call" }, { "api_name": "re.M", "line_number": 11, "usage_type": "attribute" }, { "api_name": "setuptools.command.test.test", "l...
36572806047
#!/usr/bin/env python3 import argparse import concurrent.futures import os import time import random from concurrent.futures import ThreadPoolExecutor import requests from tqdm import tqdm user_agents = [ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3...
vscofor2ch/vscofor2ch
vscoscrape.py
vscoscrape.py
py
24,198
python
en
code
3
github-code
7
[ { "api_name": "random.choice", "line_number": 45, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 55, "usage_type": "call" }, { "api_name": "random.choice", "line_number": 65, "usage_type": "call" }, { "api_name": "requests.Session", "lin...
72866982622
import torch def qrot(q, v): """ Rotate vector(s) v about the rotation described by quaternion(s) q. Expects a tensor of shape (*, 4) for q and a tensor of shape (*, 3) for v, where * denotes any number of dimensions. Returns a tensor of shape (*, 3). """ assert q.shape[-1] == 4 assert ...
Ascend/ModelZoo-PyTorch
PyTorch/contrib/cv/video/VideoPose3D/common/quaternion.py
quaternion.py
py
808
python
en
code
31
github-code
7
[ { "api_name": "torch.cross", "line_number": 15, "usage_type": "call" }, { "api_name": "torch.cross", "line_number": 16, "usage_type": "call" }, { "api_name": "torch.cat", "line_number": 28, "usage_type": "call" } ]
74132836384
from typing import Optional, List, Any from langchain.llms.base import LLM import torch from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig class HuggingFaceLoraPipeline(LLM): model: Any tokenizer: Any def _llm_type(self) -> str: return 'rinna-ppo' def _gen_promp...
if001/llm_docs
llm_lora.py
llm_lora.py
py
1,916
python
en
code
0
github-code
7
[ { "api_name": "langchain.llms.base.LLM", "line_number": 7, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 8, "usage_type": "name" }, { "api_name": "typing.Any", "line_number": 9, "usage_type": "name" }, { "api_name": "typing.Optional", "lin...
24962448625
"""Class definition for kwarg from command line parser""" __author__ = "Guido Boehm" __filename__ = "ParseKwargs.py" __credits__ = [""] __license__ = "" __version__ = "0.0.1" __maintainer__ = "Guido Boehm" __email__ = "olb@family-boehm.de" __status__ = "Prototype" __copyright__ = """ Copyright 2022, Guido Boehm All Ri...
boehmgui/JTL-PayPalRefund
src/utils/ParseKwargs.py
ParseKwargs.py
py
1,182
python
en
code
0
github-code
7
[ { "api_name": "argparse.Action", "line_number": 28, "usage_type": "attribute" } ]
33332141472
""" Retrieve images from the web """ import shutil import requests from tools.system_tools import img_dir from PIL import Image, ImageTk, ImageGrab ##################################### # # # Saved URLs for updating plots # # # ################...
rmclare445/WxFrame
wxframe/get_img.py
get_img.py
py
5,452
python
en
code
0
github-code
7
[ { "api_name": "tools.system_tools.img_dir", "line_number": 50, "usage_type": "name" }, { "api_name": "tools.system_tools.img_dir", "line_number": 51, "usage_type": "name" }, { "api_name": "tools.system_tools.img_dir", "line_number": 52, "usage_type": "name" }, { "...
13035860276
#!/usr/bin/python import os import requests import json import subprocess from time import sleep def getextensions(cookie, number): headers = {'Cookie': cookie} URL = 'https://chrome.google.com/webstore/ajax/item?hl=en-US&gl=US&pv=20170206&mce=atf%2Ceed%2Cpii%2Crtr%2Crlb%2Cgtc%2Chcn%2Csvp%2Cwtd%2Cctm%2Cac%2Ch...
PossibleSloth/extensions
extensions.py
extensions.py
py
1,942
python
en
code
1
github-code
7
[ { "api_name": "requests.post", "line_number": 16, "usage_type": "call" }, { "api_name": "json.loads", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.exists", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path", "line_number": ...
4284953880
''' Created on Jan 14, 2017 @author: User ''' import string import itertools import operator #word = input("Enter text: ") def most_common(word): keyVal = {} if len(word) > 3 and len(word) < 10000: for i in word: keyVal[i] = word.count(i) sortedKeyVal = sorted(keyVal.items(), key = ...
timolinn/algorithms
100_days_of_coding_slack_andela/mostCommon.py
mostCommon.py
py
1,546
python
en
code
0
github-code
7
[ { "api_name": "itertools.islice", "line_number": 18, "usage_type": "call" }, { "api_name": "operator.itemgetter", "line_number": 60, "usage_type": "call" } ]
26485147334
from bs4 import BeautifulSoup as Soup, Tag import requests response = requests.get("https://guide.wisc.edu/courses/#text") soup = Soup(response.content, "html.parser") index = soup.find("div", {"id": "atozindex"}) f = open("../data/subjectpaths.csv", "w") for item in index.find_all('li'): if isinstance(item, Ta...
dyerai/madatlas-scraper
src/utils/getSubjectPaths.py
getSubjectPaths.py
py
401
python
en
code
0
github-code
7
[ { "api_name": "requests.get", "line_number": 5, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 6, "usage_type": "call" }, { "api_name": "bs4.Tag", "line_number": 12, "usage_type": "argument" } ]
21247671606
import sys from PyQt5.QtWidgets import QApplication from PyQt5.QtCore import QTimer, QCoreApplication from splash import SplashScreen from wordle import MainWindow # base_path = os.path.abspath(os.path.dirname(__file__)) try: from ctypes import windll myappid = "soundwave.wordle.1.0" windll.shell32.SetCurrentP...
Nishant-Karlupia/wordle
main.py
main.py
py
1,289
python
en
code
0
github-code
7
[ { "api_name": "ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID", "line_number": 13, "usage_type": "call" }, { "api_name": "ctypes.windll.shell32", "line_number": 13, "usage_type": "attribute" }, { "api_name": "ctypes.windll", "line_number": 13, "usage_type":...
8977602534
import logging import os import pickle import collections from src.storage.AbstractStorage import AbstractStorage class BinaryFileStorage(AbstractStorage): def __init__(self, base_dir): self.base_dir = base_dir def store(self, source, texts): if not os.path.exists(self.base_dir): ...
demidovakatya/markov-chains
src/storage/BinaryFileStorage.py
BinaryFileStorage.py
py
1,164
python
en
code
18
github-code
7
[ { "api_name": "src.storage.AbstractStorage.AbstractStorage", "line_number": 9, "usage_type": "name" }, { "api_name": "os.path.exists", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_number": 15, "usage_type": "attribute" }, { "api_name":...
39171816887
#importando aa bibliotecas e funções import sqlalchemy from sqlalchemy.orm import declarative_base from sqlalchemy.orm import relationship from sqlalchemy.orm import Session from sqlalchemy import create_engine from sqlalchemy import inspect from sqlalchemy import select from sqlalchemy import func from sqlalchemy impo...
guilhermemroth/Python-Database-Integration
integrationWithSQL/SQLAlchemyApplication.py
SQLAlchemyApplication.py
py
3,558
python
en
code
0
github-code
7
[ { "api_name": "sqlalchemy.orm.declarative_base", "line_number": 15, "usage_type": "call" }, { "api_name": "sqlalchemy.Column", "line_number": 20, "usage_type": "call" }, { "api_name": "sqlalchemy.Integer", "line_number": 20, "usage_type": "argument" }, { "api_name...
36863742998
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri May 27 13:47:15 2022 @author: tomasnotenson """ from scipy.fft import fft, ifft, fftfreq, fft2, ifft2 import numpy as np from numba import jit import matplotlib.pyplot as plt from qutip import * from time import time from tqdm import tqdm # customisabl...
tnotenson/quantum-chaos
rutinas_Nacho.py
rutinas_Nacho.py
py
16,006
python
en
code
0
github-code
7
[ { "api_name": "seaborn.set_theme", "line_number": 17, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.rcParams.update", "line_number": 18, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.rcParams", "line_number": 18, "usage_type": "attribute" }, { ...
39032633598
from fastapi import APIRouter, status, HTTPException from pydantic import BaseModel #Objects class Subject(BaseModel): idsubject: int name: str numberStudents: int subjects_list= [ Subject(idsubject=1, name="Math", numberStudents=23), Subject(idsubject=2, name="English", numberStudents=34), Su...
AbdielPerezB/Routers
allRouters/router10.py
router10.py
py
949
python
en
code
0
github-code
7
[ { "api_name": "pydantic.BaseModel", "line_number": 5, "usage_type": "name" }, { "api_name": "fastapi.APIRouter", "line_number": 19, "usage_type": "call" }, { "api_name": "fastapi.status.HTTP_200_OK", "line_number": 21, "usage_type": "attribute" }, { "api_name": "f...
41817216542
from SSD import SSD import matplotlib.pyplot as plt import numpy as np plt.style.use('classic') def get_delta(point1, point2, main_image, second_image): fig1, plts1 = plt.subplots() plts1.set_title('gra ssd') delta = 0 x_offset = 0 r_ssd = [] g_ssd = [] b_ssd = [] min_ssd = SSD(main_im...
Kostanios/determination-of-distance-from-stereo-image
getDelta.py
getDelta.py
py
1,665
python
en
code
1
github-code
7
[ { "api_name": "matplotlib.pyplot.style.use", "line_number": 5, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.style", "line_number": 5, "usage_type": "attribute" }, { "api_name": "matplotlib.pyplot", "line_number": 5, "usage_type": "name" }, { "api_name"...
31492759878
#Test V import pygame from pygame.sprite import Sprite class Target(Sprite): """ The Targets! """ def __init__(self, screen, game_settings): super(Target, self).__init__() self.screen = screen self.game_settings = game_settings #Target Image self...
Kudorosa/kudorosa.github.io
python_projects/Alien Invasion + Others/Others/Target Practice/targets.py
targets.py
py
1,360
python
en
code
0
github-code
7
[ { "api_name": "pygame.sprite.Sprite", "line_number": 5, "usage_type": "name" }, { "api_name": "pygame.image.load", "line_number": 13, "usage_type": "call" }, { "api_name": "pygame.image", "line_number": 13, "usage_type": "attribute" } ]
33331697770
"""Replica of icanhazepoch.com - HTTP Style""" from time import time from wsgiref.simple_server import BaseHTTPRequestHandler, HTTPServer # Dirty import, but works both on Python 2 and Python 3 class EpochHandler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header(...
aseeon/py-http-serving-examples
epoch_http.py
epoch_http.py
py
550
python
en
code
0
github-code
7
[ { "api_name": "wsgiref.simple_server.BaseHTTPRequestHandler", "line_number": 8, "usage_type": "name" }, { "api_name": "time.time", "line_number": 13, "usage_type": "call" }, { "api_name": "wsgiref.simple_server.HTTPServer", "line_number": 16, "usage_type": "call" } ]
16452248957
import pathlib,datetime,re,subprocess,os import tkinter as tk from tkinter import simpledialog programfiles = pathlib.Path(os.getenv("ProgramFiles")) _VIM_PATH = programfiles / "vim" / "vim90" / "gvim.exe" badchars= re.compile(r'[^A-Za-z0-9_. ]+|^\.|\.$|^ | $|^$') badnames= re.compile(r'(aux|com[1-9]|con|lpt[1-9]|pr...
dustractor/dustractor.github.io
newpost.py
newpost.py
py
779
python
en
code
0
github-code
7
[ { "api_name": "pathlib.Path", "line_number": 5, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 5, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 9, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 10, ...
19904005937
from __future__ import division import copy import logging from openfisca_core.baremes import BaremeDict, scaleBaremes from openfisca_core.enumerations import Enum from openfisca_core.legislations import CompactNode CAT = Enum(['prive_non_cadre', 'prive_cadre', 'public_titulaire_etat', ...
stanislasrybak/openfisca-france
openfisca_france/model/cotisations_sociales/preprocessing.py
preprocessing.py
py
5,816
python
en
code
null
github-code
7
[ { "api_name": "openfisca_core.enumerations.Enum", "line_number": 11, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 25, "usage_type": "call" }, { "api_name": "openfisca_core.baremes.scaleBaremes", "line_number": 39, "usage_type": "call" }, {...
3041054892
from datetime import datetime, time, timedelta from typing import Tuple from wakeapp.utils.regex_utils import check_string class TimeController: def __init__(self, arrival:datetime=None, depature:datetime=None) -> None: if arrival is None: self.arrival = datetime.now() if depature is ...
Lockee/WakeApp
wakeapp/controller/time_controller.py
time_controller.py
py
1,409
python
en
code
2
github-code
7
[ { "api_name": "datetime.datetime", "line_number": 8, "usage_type": "name" }, { "api_name": "datetime.datetime.now", "line_number": 10, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 10, "usage_type": "name" }, { "api_name": "datetime.dat...
17441300178
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django_pgjson.fields class Migration(migrations.Migration): dependencies = [ ('audit_logs', '0002_auditlog_user'), ] operations = [ migrations.AlterField( model_na...
wanghp18/seed_timeseries
seed/audit_logs/migrations/0003_auto_20151105_1539.py
0003_auto_20151105_1539.py
py
525
python
en
code
1
github-code
7
[ { "api_name": "django.db.migrations.Migration", "line_number": 8, "usage_type": "attribute" }, { "api_name": "django.db.migrations", "line_number": 8, "usage_type": "name" }, { "api_name": "django.db.migrations.AlterField", "line_number": 15, "usage_type": "call" }, {...
25017354215
'''dbclient''' import json import base64 import time import urllib3 import requests from core.logging_utils import LoggingUtils from core import parser as pars import msal urllib3.disable_warnings(category = urllib3.exceptions.InsecureRequestWarning) LOGGR=None if LOGGR is None: LOGGR = LoggingUtils.get_logger()...
databricks-industry-solutions/security-analysis-tool
src/securityanalysistoolproject/core/dbclient.py
dbclient.py
py
18,524
python
en
code
29
github-code
7
[ { "api_name": "urllib3.disable_warnings", "line_number": 11, "usage_type": "call" }, { "api_name": "urllib3.exceptions", "line_number": 11, "usage_type": "attribute" }, { "api_name": "core.logging_utils.LoggingUtils.get_logger", "line_number": 16, "usage_type": "call" }...
13485741164
import acc import csv import dateutil.parser ## Parsing InvalidInputError = acc.UserDataError ACCOUNTS = ( "cash", "elevations-checking", "elevations-savings", "roth-ira", "vanguard-brokerage", "inherited-ira", "claremont-cash", "us-treasury-bonds", ) HEADER_ROWS = 3 FOOTER_ROWS = 1...
raxod502/acc
acc/importers/radon_csv.py
radon_csv.py
py
5,211
python
en
code
1
github-code
7
[ { "api_name": "acc.UserDataError", "line_number": 8, "usage_type": "attribute" }, { "api_name": "dateutil.parser.parser.parse", "line_number": 49, "usage_type": "call" }, { "api_name": "dateutil.parser.parser", "line_number": 49, "usage_type": "attribute" }, { "ap...
46108541403
from flask import Flask,request,render_template import os app = Flask(__name__) @app.route('/',methods=['POST','GET']) def home(): # 遍历文件夹,获取所有的文件名,返回一个列表 bookList = os.listdir('static/book/') data = '' if request.method == 'POST': # 提取传递进服务器的文件名 book = request.form['book']...
kidabner/bookshelf
main.py
main.py
py
767
python
en
code
0
github-code
7
[ { "api_name": "flask.Flask", "line_number": 4, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 9, "usage_type": "call" }, { "api_name": "flask.request.method", "line_number": 11, "usage_type": "attribute" }, { "api_name": "flask.request", "l...
9389449459
import speech_recognition as sr import os import time import subprocess #vocie command def listen_micro(): #micro on microfone = sr.Recognizer() #micron using with sr.Microphone() as source: #reduce ambient noise microfone.adjust_for_ambient_noise(source) print("Diga alguma coi...
JFJoao/voice_commander
voicer.py
voicer.py
py
1,173
python
en
code
0
github-code
7
[ { "api_name": "speech_recognition.Recognizer", "line_number": 9, "usage_type": "call" }, { "api_name": "speech_recognition.Microphone", "line_number": 12, "usage_type": "call" }, { "api_name": "os.system", "line_number": 21, "usage_type": "call" }, { "api_name": "...
24731210845
import argparse from typing import Optional import numpy as np import pandas as pd import tensorflow as tf import gpx_stats import utils from config import data_preparation_config from prepare_data import extract_segment_data parser = argparse.ArgumentParser( description="Estimate walking time for GPX track of h...
ae137/HikingTimePredictor
inference.py
inference.py
py
4,068
python
en
code
6
github-code
7
[ { "api_name": "argparse.ArgumentParser", "line_number": 13, "usage_type": "call" }, { "api_name": "prepare_data.extract_segment_data", "line_number": 34, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 37, "usage_type": "call" }, { "api_name": ...
71793758945
import datetime import simplejson as json from cornice import Service default_cors_policy = {'origins': ('*', )} class RService(Service): def __init__(self, name, path, description=None, cors_policy=default_cors_policy, renderer='jsonwithdate', **kw): # To work properly with venusian, we have to specify ...
openrosetta/openrosetta
openrosetta/config.py
config.py
py
1,907
python
en
code
2
github-code
7
[ { "api_name": "cornice.Service", "line_number": 8, "usage_type": "name" }, { "api_name": "simplejson.dumps", "line_number": 31, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 46, "usage_type": "attribute" } ]
20207335630
import argparse import random import sys import traceback import trimesh import torch import open3d as o3d import numpy as np from evaluate_3d_reconstruction import run_evaluation sys.path.append('.') def normalize(x): return x / np.linalg.norm(x) def get_align_transformation(rec_meshfile, gt_meshfile): """...
eriksandstroem/Point-SLAM
src/tools/eval_recon.py
eval_recon.py
py
7,428
python
en
code
221
github-code
7
[ { "api_name": "sys.path.append", "line_number": 10, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "numpy.linalg.norm", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.linalg", "l...
15964734964
import psycopg2 from config import config from catalog import catalog from loader import Loader def insert_table(tablename=None): """ insert multiple rows of the csv into the table :return: """ conn = None with open(catalog[f"to_ingest/{tablename}"], 'r') as t: try: # deter...
mbsuraj/postgresql_ingestion_script
src/insert_tables.py
insert_tables.py
py
1,480
python
en
code
1
github-code
7
[ { "api_name": "catalog.catalog", "line_number": 13, "usage_type": "name" }, { "api_name": "config.config", "line_number": 19, "usage_type": "call" }, { "api_name": "psycopg2.connect", "line_number": 21, "usage_type": "call" }, { "api_name": "loader.Loader", "l...
31394744344
from typing import Dict, List from pyquery import PyQuery class Ascii2DItem: def __init__(self, data: PyQuery): self.origin: PyQuery = data # 原始数据 info = self._get_info(data("div.detail-box.gray-link")) # 原图长宽,类型,大小 self.detail: str = data("small").eq(0).text() self.thumb...
samttoo22-MewCat/Neko-discord-bot
PicImageSearch/model/ascii2d.py
ascii2d.py
py
1,781
python
en
code
0
github-code
7
[ { "api_name": "pyquery.PyQuery", "line_number": 7, "usage_type": "name" }, { "api_name": "pyquery.PyQuery", "line_number": 8, "usage_type": "name" }, { "api_name": "pyquery.PyQuery", "line_number": 20, "usage_type": "name" }, { "api_name": "typing.Dict", "line...
70059950945
import pymysql import datetime import socket from Base import BaseClass class DB(BaseClass): def __init__(self, **kwargs): self.conn = 0 self.cursor = 0 self.last_time = 0 self.update_server = socket.gethostname() return super().__init__(**kwargs) def close...
zylerk/ApexFund
ABL_F00429/ABL_F00429/Database.py
Database.py
py
7,403
python
en
code
0
github-code
7
[ { "api_name": "Base.BaseClass", "line_number": 6, "usage_type": "name" }, { "api_name": "socket.gethostname", "line_number": 12, "usage_type": "call" }, { "api_name": "pymysql.connect", "line_number": 23, "usage_type": "call" }, { "api_name": "datetime.datetime.ut...
72477118303
import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.utils import shuffle from sklearn.preprocessing import MinMaxScaler def read_data_n_preproc(dataframe=None, data_csv_path=None, test_split=0.1, validation_split=0.3, validation_split_seed=42, verbose=False): ...
AsuosOnurb/physical-activity-recognition
model/deepl_data_preproc.py
deepl_data_preproc.py
py
7,343
python
en
code
0
github-code
7
[ { "api_name": "pandas.read_csv", "line_number": 19, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 30, "usage_type": "call" }, { "api_name": "pandas.get_dummies", "line_number": 33, "usage_type": "call" }, { "api_name": "sklearn.preproces...
14540691860
import sys try: from osgeo import gdal from osgeo.gdalconst import * gdal.TermProgress = gdal.TermProgress_nocb from osgeo import ogr from osgeo import osr except ImportError: import gdal import ogr from gdalconst import * import osr try: import numpy except ImportError: imp...
FloodRiskGroup/floodrisk
calcolodanno/CalcoloDannoInondazione.py
CalcoloDannoInondazione.py
py
16,599
python
en
code
22
github-code
7
[ { "api_name": "osgeo.gdal.TermProgress", "line_number": 5, "usage_type": "attribute" }, { "api_name": "osgeo.gdal", "line_number": 5, "usage_type": "name" }, { "api_name": "osgeo.gdal.TermProgress_nocb", "line_number": 5, "usage_type": "attribute" }, { "api_name":...
1449212366
import pathlib import sys import warnings current_dir = pathlib.Path(__file__).resolve().parent sys.path.append(str(current_dir) + "/../") warnings.filterwarnings("ignore") import json import random from pathlib import Path import cv2 import imagehash import numpy as np import pandas as pd from imagehash import phas...
a5chin/AMED
amed/dataset/reshaper.py
reshaper.py
py
6,832
python
en
code
5
github-code
7
[ { "api_name": "pathlib.Path", "line_number": 5, "usage_type": "call" }, { "api_name": "sys.path.append", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "warnings.filterwarnings", ...
28770608991
"""Helper for discovering audio files.""" # Standard library: import logging import os from typing import Any, Dict, List, Sequence, Union # Third party: import attr # module-level logger, named differently so there's no confusion between which # logger is being used. module_log = logging.getLogger(__name__) def _...
blthayer/disquip-bot
disquip/discover.py
discover.py
py
6,006
python
en
code
3
github-code
7
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.split", "line_number": 33, "usage_type": "call" }, { "api_name": "os.path", "line_number": 33, "usage_type": "attribute" }, { "api_name": "logging.getLogger", ...
24649607095
from enum import Enum class Page(Enum): pg1 = "profile with eligibilty strip incomplete - type1" pg2 = "profile with eligibilty strip incomplete - type2" pg3 = "profile with eligibilty strip complete" pg4 = "settings" class ResponseStruct(Enum): id = "ph" type = "type" val = "v...
anviti00/Backend
userprofile/constant.py
constant.py
py
2,651
python
en
code
0
github-code
7
[ { "api_name": "enum.Enum", "line_number": 4, "usage_type": "name" }, { "api_name": "enum.Enum", "line_number": 12, "usage_type": "name" }, { "api_name": "enum.Enum", "line_number": 24, "usage_type": "name" }, { "api_name": "enum.Enum", "line_number": 37, "...
12902199555
from flask import Flask, render_template, request, url_for, make_response import operator as op app2 = Flask(__name__) application = app2 operations = ['+', '-', '*', '/'] operations_function = { '+' : op.add, '-' : op.sub, '*' : op.mul, '/' : op.truediv } @app2.route('/') def index(): return render_template('i...
lSenichl/mospolytech-education-web-dev-2020-2
Lab_02/app2/app2.py
app2.py
py
4,677
python
en
code
0
github-code
7
[ { "api_name": "flask.Flask", "line_number": 4, "usage_type": "call" }, { "api_name": "operator.add", "line_number": 8, "usage_type": "attribute" }, { "api_name": "operator.sub", "line_number": 8, "usage_type": "attribute" }, { "api_name": "operator.mul", "line...
74265297822
# -*- coding: utf-8 -*- """ Created on Thu Mar 2 13:43:24 2023 @author: tomkeen """ import streamlit as st import os import azure.cognitiveservices.speech as speechsdk from azure.cognitiveservices.speech.audio import AudioOutputConfig import base64 import openai from streamlit_webrtc import WebRtcMode, ...
tomzhu0225/oral_practice_web_dev
test1.py
test1.py
py
11,637
python
en
code
111
github-code
7
[ { "api_name": "pathlib.Path", "line_number": 23, "usage_type": "call" }, { "api_name": "logging.getLogger", "line_number": 25, "usage_type": "call" }, { "api_name": "openai.api_key", "line_number": 27, "usage_type": "attribute" }, { "api_name": "streamlit.secrets"...
31577349558
import numpy as np import matplotlib.pyplot as plt import seaborn as sns sns.set_style('darkgrid') x = np.linspace(0,10, 100) plt.xlabel('x') y= x + np.random.randn(100) plt.ylabel('y') plt.scatter(x,y) M = np.array([x, np.ones(x.shape)]); print(M, M.shape) plt.hist(x)
AliAlkadhim/RandomCourses
Scientific_Computing_1_Spicklemire/.virtual_documents/PowerLaws_LinearLeastSquares.ipynb.py
PowerLaws_LinearLeastSquares.ipynb.py
py
280
python
en
code
0
github-code
7
[ { "api_name": "seaborn.set_style", "line_number": 4, "usage_type": "call" }, { "api_name": "numpy.linspace", "line_number": 7, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.xlabel", "line_number": 8, "usage_type": "call" }, { "api_name": "matplotlib.pyp...
71353339104
import os from flask_login import LoginManager, current_user from flask import Flask, render_template, session, request, redirect # from flask_sqlalchemy import SQLAlchemy from flask_mongoengine import MongoEngine from flask_script import Manager import models app = Flask(__name__) app.secret_key = 'flasky' app.config...
MUMT-IT/mis2017
webapp/app/main.py
main.py
py
1,707
python
en
code
0
github-code
7
[ { "api_name": "flask.Flask", "line_number": 9, "usage_type": "call" }, { "api_name": "flask_script.Manager", "line_number": 18, "usage_type": "call" }, { "api_name": "flask_mongoengine.MongoEngine", "line_number": 20, "usage_type": "call" }, { "api_name": "flask_l...
36937064264
from __future__ import division, print_function, absolute_import import tflearn from tflearn.layers.core import dropout,activation,input_data,utils,fully_connected from tflearn.layers.estimator import regression import json import numpy as np def predict(data): input_layer = tflearn.input_data(shape=[None, 20]) de...
uddish/HINT
backend/src/job_hell/utlis/nn.py
nn.py
py
1,074
python
en
code
1
github-code
7
[ { "api_name": "tflearn.input_data", "line_number": 10, "usage_type": "call" }, { "api_name": "tflearn.fully_connected", "line_number": 11, "usage_type": "call" }, { "api_name": "tflearn.dropout", "line_number": 12, "usage_type": "call" }, { "api_name": "tflearn.fu...
39453497396
from customer_api.models import Customer from customer_api.serializers import CustomerSerializer, CustomerListSerializer from rest_framework import generics from rest_framework.response import Response from rest_framework import status from django.http import Http404 class CustomerList(generics.ListAPIView): quer...
dadasoz/plot-booking
wsgi/plots/customer_api/views.py
views.py
py
2,231
python
en
code
0
github-code
7
[ { "api_name": "rest_framework.generics.ListAPIView", "line_number": 9, "usage_type": "attribute" }, { "api_name": "rest_framework.generics", "line_number": 9, "usage_type": "name" }, { "api_name": "customer_api.models.Customer.objects.all", "line_number": 10, "usage_type"...
34502767595
from django.conf.urls import url, include from django.contrib import admin from foodtaskerapp import views, apis from django.contrib.auth import views as auth_views from django.conf.urls.static import static from django.conf import settings urlpatterns = [ # Restaurant Methods url(r'^admin/', admin.site.urls...
happylukas/django_restaurant_app
foodtasker/urls.py
urls.py
py
5,566
python
en
code
0
github-code
7
[ { "api_name": "django.conf.urls.url", "line_number": 12, "usage_type": "call" }, { "api_name": "django.contrib.admin.site", "line_number": 12, "usage_type": "attribute" }, { "api_name": "django.contrib.admin", "line_number": 12, "usage_type": "name" }, { "api_name...
8892254069
import numpy as np import imutils import cv2 image = cv2.imread('Test_Images/V2/img1.jpeg') ret,thresh1 = cv2.threshold(image,thr,255,cv2.THRESH_BINARY) gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) gray = cv2.bilateralFilter(gray, 11, 17, 17) gray = thresh1 cv2.imshow("gray", gray) # Setup SimpleBlobDetector para...
ta275/RadEye-Pi
Vision/blob.py
blob.py
py
1,286
python
en
code
0
github-code
7
[ { "api_name": "cv2.imread", "line_number": 6, "usage_type": "call" }, { "api_name": "cv2.threshold", "line_number": 8, "usage_type": "call" }, { "api_name": "cv2.THRESH_BINARY", "line_number": 8, "usage_type": "attribute" }, { "api_name": "cv2.cvtColor", "line...
75107117023
#!/usr/bin/env python3 import asyncio, websockets import ssl, pathlib import json import time from smbus2 import SMBus, SMBusWrapper bus_no = 0 iic = SMBus(bus_no) address = 0x04 board_voltage = 5000 # Example list of sources for testing purposes sources = \ { "rBMC Demo Machine": { "hostnam...
beanfacts/rbmc
controller/main_python35.py
main_python35.py
py
6,376
python
en
code
0
github-code
7
[ { "api_name": "smbus2.SMBus", "line_number": 10, "usage_type": "call" }, { "api_name": "asyncio.coroutine", "line_number": 96, "usage_type": "attribute" }, { "api_name": "json.loads", "line_number": 106, "usage_type": "call" }, { "api_name": "json.decoder", "l...
26062693599
import numpy as np from PIL import Image import cv2 import math img = Image.open("Mandrill.png") arr = np.array(img) def conv(X, H): # make sure both X and H are 2-D assert( X.ndim == 2) assert( H.ndim == 2) # get the horizontal and vertical size of X and H imageColumns = X.shape[1] imageRow...
rashmi05pathak/ImageSignalProcessing
PA(4)_EE20S051/Assignment4.py
Assignment4.py
py
2,272
python
en
code
0
github-code
7
[ { "api_name": "PIL.Image.open", "line_number": 6, "usage_type": "call" }, { "api_name": "PIL.Image", "line_number": 6, "usage_type": "name" }, { "api_name": "numpy.array", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 26...
30364737962
import numpy as np from sillyQuotes import getMsg import matplotlib.pyplot as plt def checkEx01(y): corr = False try: t = np.linspace(0, 2*np.pi,100) x = np.sin(t) err = np.average((y-x)**2) corr = err<1e-6 getMsg(corr) except: getMsg(corr) return corr ...
hrtlacek/Elak_Exercises
checkLib.py
checkLib.py
py
1,683
python
en
code
0
github-code
7
[ { "api_name": "numpy.linspace", "line_number": 8, "usage_type": "call" }, { "api_name": "numpy.pi", "line_number": 8, "usage_type": "attribute" }, { "api_name": "numpy.sin", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.average", "line_number"...
71726314145
import prefpy_io import math import os import itertools # from .preference import Preference from numpy import * from profile import Profile from mechanism import * import glob import mov # from mov import * from preference import Preference import matplotlib.pyplot as plt from sklearn.neural_network import * from skle...
farhadmohsin/AxiomVerification
smoothed_complexity_codes/codes/exp3.py
exp3.py
py
5,003
python
en
code
0
github-code
7
[ { "api_name": "warnings.filterwarnings", "line_number": 20, "usage_type": "call" }, { "api_name": "os.chdir", "line_number": 68, "usage_type": "call" }, { "api_name": "sklearn.svm.LinearSVC", "line_number": 90, "usage_type": "call" }, { "api_name": "sklearn.svm", ...
29369879071
"""empty message Revision ID: a52190d958cf Revises: d7cd8fa96963 Create Date: 2019-08-21 09:41:36.268797 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'a52190d958cf' down_revision = 'd7cd8fa96963' branch_labels = None depends_on = None def upgrade(): # ...
tiilt-lab/chemistry-dashboard
server/migrations/versions/a52190d958cf_.py
a52190d958cf_.py
py
1,102
python
en
code
4
github-code
7
[ { "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.Strin...
15750532810
import argparse import logging import os from time import time from osgeo import gdal, ogr class Extractor(object): def __init__(self, statement, raster, output, basename=None, format='GTiff', nodata=None, datatype=gdal.GDT_Float32, bands=1, server="localhost", dbname="eba", user="eba", password...
ebaccst/pyLiDARForest
stuff/extract_raster.py
extract_raster.py
py
4,905
python
en
code
2
github-code
7
[ { "api_name": "osgeo.gdal.GDT_Float32", "line_number": 10, "usage_type": "attribute" }, { "api_name": "osgeo.gdal", "line_number": 10, "usage_type": "name" }, { "api_name": "os.path.isfile", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "...
14625327333
"""empty message Revision ID: c3880377ac48 Revises: 8dc5999a5c74 Create Date: 2020-02-04 15:44:28.982771 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'c3880377ac48' down_revision = '8dc5999a5c74' branch_labels = None depends_on = None def upgrade(): # ...
nkatwesigye/Music-Venue-Booking-Site-Furry
starter_code/migrations/versions/c3880377ac48_.py
c3880377ac48_.py
py
777
python
en
code
0
github-code
7
[ { "api_name": "alembic.op.add_column", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 21, "usage_type": "call" }, { "api_name": "sqlalchemy.String"...