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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
75136417147 | import random
from tgalice.cascade import Pr
from cascade import csc, Turn
from datetime import datetime, timedelta
from uuid import uuid4
from scenarios.exercising import EXERCISES, Exercise
def is_morning_show(turn: Turn) -> bool:
if not turn.ctx.yandex or not turn.ctx.yandex.request:
return False
... | avidale/alice-stretching | scenarios/show.py | show.py | py | 1,066 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "cascade.Turn",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "cascade.Turn",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "scenarios.exercising.Exercise",
"line_number": 22,
"usage_type": "name"
},
{
"api_name": "random.choice... |
73894506107 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from appium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
import logging, time, os
class BaseView:
'''二次封装'''
def __init__(self, driver: webdriver.Remote):
self.driver = driver
self.timeout = 2
self.poll_freque... | inttcc/MyPro | workcoming/baseView/base.py | base.py | py | 3,466 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "appium.webdriver.Remote",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "appium.webdriver",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "logging.error",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "logging.i... |
39262377956 | from collections import namedtuple
from django.conf import settings
from elasticsearch import Elasticsearch
from elasticsearch.helpers import scan
from eums.elasticsearch.delete_records import DeleteRecords
from eums.elasticsearch.mappings import setup_mappings
from eums.elasticsearch.sync_info import SyncInfo
from eu... | unicefuganda/eums | eums/elasticsearch/sync_data_generators.py | sync_data_generators.py | py | 4,471 | python | en | code | 9 | github-code | 6 | [
{
"api_name": "django.conf.settings.ELASTIC_SEARCH",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "eums.elasticsearch.sync_info.SyncInfo.last_successful_sync",
"line_number": 16,... |
27483656200 | import logging
from flask import abort, request, g, Response, make_response, jsonify, current_app
from flask_restplus import Namespace, Resource, fields, marshal_with
from battle.db.dbops import dbops
from battle.db.models import Battle
log = logging.getLogger(__name__)
posts_api = Namespace('postmeta', description='... | mthak/classmojo | battle/api/post.py | post.py | py | 1,214 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask_restplus.Namespace",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask_restplus.fields.Integer",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_n... |
73354334268 | import argparse
import json
import logging
import os
import random
import math
from pprint import pprint
logger = logging.getLogger()
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)-7s - [%(funcName)s] %(message)s')
# uncomment for submission
# logger.disabled = True
ACTIONS = {
-1: 'DoN... | luqmanarifin/2016-Bomberman | Kecewa/bot.py | bot.py | py | 21,742 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.basicConfig",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "logging.DEBUG",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.join... |
33574367695 | import utils
def build(data):
G = dict()
for line in data:
a, b = line.split('-')
if a in G:
G[a].append(b)
else:
G[a] = [b]
if b in G:
G[b].append(a)
else:
G[b] = [a]
return G
def traverse(G, current_cave, current_p... | 742617000027/advent-of-code-2021 | 12/12.py | 12.py | py | 1,386 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "utils.Timer",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "utils.read_str_lines",
"line_number": 51,
"usage_type": "call"
}
] |
21115802122 | #!/usr/bin/env python
from gi.repository import Gtk, Gdk, GtkSource, GObject, Vte, GLib, Pango
from gi.repository.GdkPixbuf import Pixbuf
import os
import stat
import time
import jedi
class Handler:
def onShowCompletion(self, sview):
buffer = sview.get_buffer()
startiter, enditer = buffer.get_b... | superdachs/pyide | pyide.py | pyide.py | py | 18,021 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "jedi.Script",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "gi.repository.Gtk.TextWindowType",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "gi.repository.Gtk",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "g... |
31249185445 | import io
import os
import torch
from torch import nn
from tqdm import tqdm
from torch.utils.data import Dataset, DataLoader
from transformers import (set_seed,
TrainingArguments,
Trainer,
GPT2Config,
GPT2Tokenizer,
... | Vitaliy1234/music_generation | emotion_classification/gpt2_classifier.py | gpt2_classifier.py | py | 6,088 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "transformers.set_seed",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "torch.device",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "torch.cuda... |
74794654268 |
# import urllib library
from urllib.request import urlopen
import json
import random
score = 0
import string
NUMBER_OF_ATTEMPTS = 2
ENTER_ANSWER = 'Hit %s for your answer\n'
TRY_AGAIN = 'Incorrect!!! Try again.'
CORRECT = 'Correct'
NO_MORE_ATTEMPTS = 'Incorrect!!! You ran out of your attempts'
def question(mes... | RoiAtias/Devops_test | test/test.py | test.py | py | 1,321 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "urllib.request.urlopen",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "json.loads",... |
64085434 | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 1 20:30:54 2019
@author: Sunanda
"""
import argparse, re, decimal
parser = argparse.ArgumentParser(
description='''The purpose of this application is to check
the COMP 472/6721 Winter 2019 Projects'''
)
parser.a... | lqw1111/COMP6721-AI-Project | check.py | check.py | py | 2,781 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "argparse.FileType",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "re.split",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "decimal.Decimal",
... |
41169055403 | import argparse
import numpy as np
import os
import torch
import torch.nn as nn
import datetime
import time
import matplotlib.pyplot as plt
from torchinfo import summary
import yaml
import json
import sys
sys.path.append("..")
from lib.utils import (
MaskedMAELoss,
print_log,
seed_everything,
set_cpu_n... | XDZhelheim/GN-RRT | scripts/train.py | train.py | py | 9,502 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "numpy.mean",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "torch.no_grad",
"line_nu... |
12019045259 | from PyQt5.QtWidgets import QTableView, QPushButton, QHeaderView, QDialog, QVBoxLayout
from PyQt5.QtCore import Qt
from PyQt5.QtSql import QSqlDatabase, QSqlTableModel, QSqlQuery
class HistoryWindow(QDialog):
def __init__(self):
super().__init__()
self.setWindowTitle("History")
se... | umraan-xm/Image-Based-Equation-Solver | HistoryWindow.py | HistoryWindow.py | py | 1,767 | python | en | code | 4 | github-code | 6 | [
{
"api_name": "PyQt5.QtWidgets.QDialog",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCore.Qt.WindowContextHelpButtonHint",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtCore.Qt",
"line_number": 10,
"usage_type": "name"
},
... |
17399515937 | from sys import argv
from special.mode import Mode
from special.settings import Settings
class BadMode(Exception):
pass
class BadCommandLineArguments(Exception):
pass
class Run:
def __init__(self, mode: Mode):
if len(argv) > 1:
self.parse_arguments(argv[1:])
else:
... | aaaaaa2493/poker-engine | src/special/run.py | run.py | py | 7,276 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "special.mode.Mode",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "sys.argv",
"line_number": 17,
"usage_type": "argument"
},
{
"api_name": "sys.argv",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "special.settings.Settings.gam... |
71000611389 | import mob
import room
from time import sleep
import pygame
pygame.init()
size = (800, 600)
screen = pygame.display.set_mode(size)
pygame.display.set_caption("Bran's Cool Game")
# Define some colors
BLACK = ( 0, 0, 0)
WHITE = ( 255, 255, 255)
GREEN = ( 0, 255, 0)
RED = ( 255, 0... | heroicbran/games | Bran_s Pygame Engine/main.py | main.py | py | 4,050 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pygame.init",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "pygame.display.set_mode",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pygame.display",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "pygame.display.s... |
69958425789 | """Test delete model
@Author: NguyenKhacThanh
"""
import pytest
from voluptuous import Schema, All, Required
from tests.api import APITestCase
@pytest.mark.usefixtures("inject_client", "inject_params_model_regression")
class DeleteModelTestCase(APITestCase):
def url(self):
return "/regression"
def me... | magiskboy/wipm | tests/api/test_delete_model_regression.py | test_delete_model_regression.py | py | 1,047 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "tests.api.APITestCase",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "voluptuous.Schema",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "voluptuous.Required",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "voluptuou... |
41168902007 | from utils import get_input_lines
from numpy import median
from collections import Counter
lines = get_input_lines("input7.txt")
input_list = [int(x) for x in lines[0].split(",")]
# pt1
print(sum(abs(x - median(input_list)) for x in input_list))
# pt2
mi, mx = min(input_list), max(input_list)
fuel_required = Counte... | sakshaat/aoc | solution7.py | solution7.py | py | 551 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "utils.get_input_lines",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.median",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 13,
"usage_type": "call"
}
] |
6117900800 | import os
import sys
import numpy as np
import pandas as pd
import argparse
import pybedtools
import re
import pyBigWig as pbw
import time
import urllib.request
def main():
start = time.time()
print("Generating consensus peak file...")
args = parse_args()
#for
Input_peaks=pd.read_csv(args.Peaks, ... | xyg123/SNP_enrich_preprocess | scripts/CHEERS_preprocessing/Generate_consensus_peaks.py | Generate_consensus_peaks.py | py | 1,717 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "time.time",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "urllib.request.request.urlretrieve",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "urllib.r... |
10420803323 | from __future__ import annotations
from typing import TYPE_CHECKING
from randovania.game_description.pickup import pickup_category
from randovania.game_description.pickup.pickup_entry import PickupEntry, PickupGeneratorParams, PickupModel
from randovania.game_description.resources.location_category import LocationCat... | randovania/randovania | randovania/games/prime3/generator/pickup_pool/energy_cells.py | energy_cells.py | py | 1,931 | python | en | code | 165 | github-code | 6 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "randovania.game_description.pickup.pickup_category.PickupCategory",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "randovania.game_description.pickup.pickup_category",
"... |
19716184286 | import os, subprocess, datetime, re, shlex
class TortoiseSVNManager:
def __init__(self, tortoisesvn=None):
if tortoisesvn == None:
print("\n\n None Path - TortoiseProc.exe")
os.system("Pause")
sys.exit()
else:
self.tortoisesvn = tortoisesvn
d... | Nohhhhhh/PUBLIC | Project/AutoDeployment/AutoDeployment/tortoisesvnmanager.py | tortoisesvnmanager.py | py | 3,153 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "os.system",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 25,
"... |
29216462786 | from enum import Enum, unique
from sqlalchemy import (
Column, Table, MetaData, Integer, String, ForeignKey, Enum as PgEnum, DateTime,
PrimaryKeyConstraint,
UniqueConstraint
)
convention = {
'all_column_names': lambda constraint, table: '_'.join([
column.name for column in constraint.columns.v... | Dest0re/backend-school2022 | megamarket/db/schema.py | schema.py | py | 1,911 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sqlalchemy.MetaData",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "enum.Enum",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "enum.unique",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Table",
"lin... |
22079658709 |
import numpy as np
from termcolor import colored
import matplotlib.pyplot as plt
filename = 'scan1.txt'
file = open(filename, 'r')
lines = file.readlines()
inittime=lines[0]
endtime=lines[1]
print('# of lines',len(lines))
ADCout=[]
ADCoutstepsMean=[]
ADCoutstepsStd=[]
i=2
data=len(lines)
while i<data:
ADCout.ap... | gpapad14/RPy_CROC | 18bit_ADC_data/analysis.py | analysis.py | py | 568 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.grid",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "matpl... |
5051482507 | import csv
import sys
import getopt
import numpy as np
import pandas as pd
import nltk
def get_dataframe(filename):
return pd.read_table(filename)
def get_hfw():
word_file = open('./picked/pacifier.txt', 'r')
res = list()
for word in word_file.readlines():
word = word.split(" ")[0]
re... | WXM99/DataMiningProject | python_scripts/project/script/text_based_analysis/product_analysis/stat_product_score.py | stat_product_score.py | py | 5,220 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_table",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "nltk.data.load",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "nltk.data",
"line_number": 77,
"usage_type": "attribute"
},
{
"api_name": "nltk.word_tokenize",
... |
23937560939 | import torch
import torch.nn as nn
# Tuple is structured by (filters, kernel_size, stride)
'''
Information about architecture config:
Tuple is structured by (filters, kernel_size, stride)
Every conv is a same convolution.
List is structured by "B" indicating a residual block followed by the number of repeats
"S"... | 1zzc/yolov3_achieve | model.py | model.py | py | 1,917 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "torch.nn.Module",
"line_number": 44,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 44,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_nu... |
38165912553 | import warnings
from typing import List
import numpy as np
from scipy import linalg
class Tensor(np.ndarray):
def __new__(cls, num_modes: int, modes: tuple[int], data: np.ndarray):
obj = np.asarray(data).view(cls)
obj.num_modes = num_modes
obj.modes = np.asarray(modes)
if np.any(ob... | lukbrb/pyTensor | pyTensor/tensorclass.py | tensorclass.py | py | 8,507 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.ndarray",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "numpy.ndarray",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "numpy.asarray",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
... |
14012082445 | import re
import numpy as np
import pickle
import spacy_udpipe
import spacy
import pandas as pd
from nltk.stem.porter import PorterStemmer
from nltk.tokenize import RegexpTokenizer
from tqdm import tqdm
from bs4 import BeautifulSoup
from collections import Counter
class VectorSpaceModel():
'''
Vector space inf... | awmcisaac/charles | winter/npfl103/A2/A1/model.py | model.py | py | 6,816 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "spacy.load",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "spacy_udpipe.load",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "nltk.tokenize.RegexpTo... |
71927421627 | import pymdicator.timeseries as ts
from pymdicator.indicators import Momentum, MACD, RSI
import numpy as np
import datetime
import pytest
import os
from pandas import read_csv
@pytest.fixture(params=[False, True])
def test_data(request, datadir):
if request.param:
pd = read_csv(datadir.join('stock_data.tx... | Cronan/pymdicator | tests/test_indicators.py | test_indicators.py | py | 6,858 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.timedelta",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pymdicator.timeserie... |
13708970511 | #AREA
from database.config import Conexion
from helper import helper
#TABLA AREA
class Area:
def __init__(self, tipoArea=None):
self.tipoArea = tipoArea
def add_Area(self, area, app):
try:
conn = Conexion()
query = f'''
INSERT INTO area(tipoArea... | jesustr20/Reto10_PythonFLASK_Mysql_Empresa | apps/classes/area.py | area.py | py | 3,061 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "database.config.Conexion",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "helper.helper.handler_response",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "helper.helper",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": ... |
70316000189 | from lib.get_endpoint import call_endpoint, endpoints
from lib.utils import format_response, trace
endpoint_inputs = {
"headers": {
"Content-Type": "application/json"
}
}
@trace(text="Delete company tasks")
def delete_tasks(command_args: dict):
"""
Function compiles a list of tasks associated... | dattatembare/pytaf | utilities/delete_all_company_tasks.py | delete_all_company_tasks.py | py | 2,136 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "lib.get_endpoint.call_endpoint",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "lib.get_endpoint.endpoints.company_tasks_svc",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "lib.get_endpoint.endpoints",
"line_number": 25,
"usage_t... |
14162889179 | import pyaudio
import wave
import pydub
import numpy as np
import os
import threading
import random
import time
import sys
freq = 60 #60秒おきに集中力を計算
excert_range = 5 #その5倍の時間の姿勢データを計算に使う
global position
position = [4] * freq*excert_range #####集中力を計算するために姿勢を格納する配列(最初は非集中なので姿勢4を入れてる)
def get_position_seq():
global po... | agridrama/system-project-1 | volume_control.py | volume_control.py | py | 6,822 | python | ja | code | 0 | github-code | 6 | [
{
"api_name": "time.sleep",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 47,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_n... |
41431741975 | from django.forms import ModelForm, TextInput
from django import forms
from .models import List
class ListForm(ModelForm):
class Meta:
model = List
fields = ['list']
widgets = {'task': TextInput(attrs={
'class': 'form-control',
'name': 'list',
... | awpogodin/py-CustomField | django/listvalid/forms.py | forms.py | py | 402 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "models.List",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.forms.TextInput",
"line_number": 9,
"usage_type": "call"
}
] |
74911410428 | import sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import QIcon
from qtasync import AsyncTask, coroutine
from PyQt5.QtCore import QCoreApplication, Qt,QThread
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
import matplotlib.pyplot ... | lupusomniator/paae_kurs | main v2.0.py | main v2.0.py | py | 5,611 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "core.fmaker",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "PyQt5.QtCore.Qt.Vertical",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtCore.Qt",
"line_number": 40,
"usage_type": "name"
},
{
"api_name": "PyQt5.QtCor... |
5259672483 | import csv
import io
import pickle
import proper_noun
import os
import subprocess
import common_nouns
import location
import re
from stop_words import get_stop_words
from nltk.tokenize import TweetTokenizer
from collections import defaultdict
import pickle
from nltk.corpus import wordnet as wn
from itertools import pr... | varun-manjunath/disaster-mitigation | matching/process_both.py | process_both.py | py | 20,459 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "spacy.load",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "stop_words.get_stop_words",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "stop_words.append",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "spacy.load",
... |
6398739491 | from dash import Dash
from dash.dependencies import Input, Output
from dash_core_components import Dropdown, Graph
from dash_html_components import H1, Div, P
from peewee import fn
from src.database import LastPackage, Package, PackageHistory
dash_app = Dash(__name__)
server = dash_app.server
dash_app.layout = Div(
... | dunossauro/cocomo-python | dashboard.py | dashboard.py | py | 9,281 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "dash.Dash",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "dash_html_components.Div",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "dash_html_components.Div",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "dash_html_... |
41603415015 | from phi.flow import *
from phi.geom import Phi
import matplotlib.pyplot as plt
import time, os, sys, argparse
sys.path.append('../')
from functions import *
parser = argparse.ArgumentParser()
parser.add_argument("-res", "--resolution", type = int, default = 128, choices=[64,128,256,512], help = "set resolution")
pars... | Brian-Hsieh/shapeOptim | code/generate_data.py | generate_data.py | py | 4,942 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "argparse.ArgumentParser",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "phi.geom.Phi",
... |
34094783054 | #!/usr/bin/env python3
from plotter import collection, dataset
from plotter import histo, atlas, presets
import ROOT
import logging
logging.basicConfig(
level=logging.INFO, format="%(levelname)s (%(name)s): %(message)s"
)
log = logging.getLogger(__name__)
atlas.SetAtlasStyle()
cData = collection("Data")
cData.a... | fnechans/plotter | test.py | test.py | py | 3,117 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "logging.basicConfig",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "plotter.atlas.S... |
4467004756 | import requests
urls = dict()
urls['http'] = ['gilgil.net']
urls['https'] = [
'google.com',
'naver.com',
'daum.net',
'github.com',
'gitlab.com',
'portal.korea.ac.kr',
'yonsei.ac.kr',
'snu.ac.kr',
'kaist.ac.kr',
'kisa.or.kr',
'kitribob.kr',
'twitter.com',
'youtube.co... | ugonfor/suricata-rule | request_url.py | request_url.py | py | 694 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 34,
"usage_type": "call"
}
] |
17789517633 | from pygost.gost3412 import GOST3412Kuznechik as Kuz
from pygost.utils import hexdec, hexenc
from rich import print
REPLACES = {
",": "ЗПТ",
".": "ТЧК",
"-": "ТИРЕ",
";": "ТЧКИЗПТ",
}
def print_header(text):
print(header(text))
def print_kv(k, v):
print(kv(k, v))
def hea... | VasiliiSkrypnik/PKA_2023 | files/new_lab/lab7/Kuznyechik.py | Kuznyechik.py | py | 3,152 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "rich.print",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "rich.print",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "re.sub",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "string.hexdigits",
"line_number": 60... |
26331405503 | import cv2
import glob
class FrameIterator:
"""
An iterator to iterate over multiple files containing either
images other videos. The files are gathered using pattern matching
and read with the universal cv2.VideoCapture().
...
Attributes
----------
pathpattern : str
input pa... | bunjj/Catadioptric-Stereo | FrameIterator.py | FrameIterator.py | py | 2,894 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "glob.glob",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "cv2.VideoCapture",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "cv2.CAP_PROP_POS_FRAMES",... |
27550279361 | import random
import urllib.request
import os
import openai
openai.api_key = os.getenv("OPENAI_API_KEY")
res = openai.Image.create_variation(
image=open("838.png", "rb"), # kindly replace "838.png" with an image on your local computer
n=2, # no of variations to generate
size="1024x1024",
response_for... | Afeez1131/openAI-image-generation | image_variations.py | image_variations.py | py | 910 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "openai.api_key",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.getenv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "openai.Image.create_variation",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "openai.Image... |
11951628523 | import plotly.express as px
import streamlit as st
from functions import *
st.set_page_config(
page_title="Time series annotations", page_icon="⬇"
)
# @st.cache(allow_output_mutation=True)
@st.cache_data
def load_data(op_data):
# df_despesa = pd.read_csv('https://raw.githubusercontent.com/jsaj/st_forecastin... | jsaj/st_forecasting | st_forecasting.py | st_forecasting.py | py | 10,989 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "streamlit.set_page_config",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "streamlit.cache_data",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "streamlit.sidebar.selectbox",
"line_number": 23,
"usage_type": "call"
},
{
"ap... |
3864065470 | from collections import OrderedDict
""" https://www.scribbr.fr/elements-linguistiques/determinant/
Le déterminant permet de présenter le nom.
Il le précède et compose avec lui le groupe nominal.
Un adjectif ou un autre déterminant peuvent se placer entre le déterminant et le nom.
"""
déterminants = OrderedDict({
"... | Fushy/PythonLib | Francais.py | Francais.py | py | 1,495 | python | fr | code | 0 | github-code | 6 | [
{
"api_name": "collections.OrderedDict",
"line_number": 8,
"usage_type": "call"
}
] |
38254722790 | from django.shortcuts import render
from django.contrib.auth.models import User
from hknweb.utils import login_and_permission
from hknweb.candidate.utils_candportal import CandidatePortalData
@login_and_permission("candidate.change_offchallenge")
def summary(request):
cands = User.objects.filter(groups__name="ca... | Gabe-Mitnick/hknweb | hknweb/candidate/views/summary.py | summary.py | py | 1,635 | python | en | code | null | github-code | 6 | [
{
"api_name": "django.contrib.auth.models.User.objects.filter",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.User.objects",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.auth.models.User",
"line_number": ... |
25228010428 | import numpy as np
import cv2 as cv
from tkinter import *
from tkinter.filedialog import *
#button1 = Button(window,text="Upload",fg="black",bg="gray",command=upload).pack()
img = []
class eye:
def __init__(self,master):
frame = Frame(master)
frame.pack()
button1 = Button(frame,text="Upload... | gods-mack/face-Detection_project | eye.py | eye.py | py | 1,816 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "cv2.imread",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "cv2.CascadeClassifier",
"... |
72627145467 | import inspect
import os
from typing import Any, Dict, List, Optional, Union
import yaml
import pmd
import pmd.core
# These have to be written explicitly for typing
from pmd.core.Builder import Builder
from pmd.core.Job import Job
from pmd.core.Lammps import Lammps
from pmd.core.Procedure import Procedure
from pmd.co... | ritesh001/Polymer-Molecular-Dynamics | pmd/core/Pmd.py | Pmd.py | py | 8,334 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "typing.Union",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "pmd.core.System.System",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "pmd.core.Builder.Builder",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "pmd.core... |
73706490427 | """Image tools interfaces."""
from nilearn.image import resample_to_img
import numpy as np
import nibabel as nb
from nipype.utils.filemanip import fname_presuffix
from nipype import logging
from nipype.interfaces.base import (traits, TraitedSpec,
BaseInterfaceInputSpec, SimpleInterfa... | jerdra/TIGR_PURR | bin/resample.py | resample.py | py | 2,104 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "nipype.logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "nipype.logging",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "nipype.interfaces.base.BaseInterfaceInputSpec",
"line_number": 14,
"usage_type": "name"
},
{
... |
11485777017 | import random
import subprocess
from difflib import SequenceMatcher
from typing import cast
from smellybot.access_control import Everyone, ModPlus
from smellybot.bot_command import BotCommand, SuperCommand
from smellybot.bot_module import BotModule
from smellybot.config.definition import ListConfigDefinition
from smel... | schmarcel02/smellybot | smellybot/modules/owoifier.py | owoifier.py | py | 4,337 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "smellybot.bot_module.BotModule",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "smellybot.config.secure_config.Config",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "smellybot.config.element.ListConfigElement",
"line_number": 22,
"usa... |
9259374186 | from pca import PCA
import numpy as np
import matplotlib.pyplot as plt
from skimage.transform import resize
import scipy.io as scio
from kmeans import KMeans
mat = scio.loadmat('./ExtYaleB10.mat')
Y_test = mat['test']
Y_train = mat['train']
def imageResizing(data):
resizedDatasET = []
for img in data:
... | nancyagrwal/Machine-Learning | Feed FOrward NN/testG.py | testG.py | py | 1,799 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "scipy.io.loadmat",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "scipy.io",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "skimage.transform.resize",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"l... |
21992599596 | import collections
import numpy as np
from scipy.signal import butter
class ButterFilter(object):
""" Implements butterworth low-pass filter.
Based on https://github.com/google-research/motion_imitation/blob/master/motion_imitation/robots/action_filter.py
"""
def __init__(self, sampling_rate, action_... | bit-bots/deep_quintic | deep_quintic/butter_filter.py | butter_filter.py | py | 2,574 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.stack",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "numpy.stack",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"li... |
9180027330 | import argparse
import base64
try:
from http.server import BaseHTTPRequestHandler
except ImportError:
# Python 2.x compatibility hack.
from BaseHTTPServer import BaseHTTPRequestHandler
import os
import os.path
try:
from socketserver import TCPServer
if os.name != 'nt':
from socketserver import UnixStreamS... | bazelbuild/bazel | src/test/shell/bazel/testing_server.py | testing_server.py | py | 3,746 | python | en | code | 21,632 | github-code | 6 | [
{
"api_name": "os.name",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.name",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "BaseHTTPServer.BaseHTTPRequestHandler",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "base6... |
17378765276 | import cv2
import numpy as np
import argparse
import os
from PIL import Image
import matplotlib.pyplot as plt
from scipy.ndimage.filters import gaussian_filter
# condition1dls pixel 검은색 확인
def pixel_is_black(arr,x,y):
if arr[x,y] ==1:
return True
return False
#condtion2 2개에서 6개의 검은 픽셀 가짐?
def pixe... | Leegunmin/RecognizeKorean | zaung_shen.py | zaung_shen.py | py | 5,571 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.listdir",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 62,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number"... |
73036280829 | import pandas as pd
from numpy.random import RandomState
from sklearn import preprocessing
# Read Data
data = pd.read_csv("/Users/yazen/Desktop/datasets/PimaDiabetes/pima.csv")
# Label columns
data.columns = ["pregnancy", "plasma/glucose concentration", "blood pressure","tricep skin fold thickness", "serum insulin", ... | yazsh/PimaDiabetesPrediction | PimaDataCleaning.py | PimaDataCleaning.py | py | 1,208 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.random.RandomState",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.MinMaxScaler",
"line_number": 22,
"usage_type": "call"
},
{
"api_na... |
16376172760 | """ Basic commands and practice of Selenium library."""
import os
import time
from dotenv import load_dotenv
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
load_dotenv()
chrome_driver_path = os.environ.get("DRIVER_PATH")
driver = webdriver.Chrome(executable_path=chrome_driver_path)
#... | FstRms/selenium-basics | example_automation.py | example_automation.py | py | 1,316 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "selenium.webdriver.C... |
37048825490 | #!/usr/bin/env python
# coding: utf-8
import itertools
import os
import re
from io import open
import yaml
from jinja2 import Template
HERE = os.path.abspath(os.path.dirname(__file__))
def read(fname):
with open(os.path.join(HERE, "..", fname), "r") as fd:
return fd.read()
def write(content, fname):
... | itsolutionsfactory/dbcut | scripts/generate-ci-pipelines.py | generate-ci-pipelines.py | py | 1,469 | python | en | code | 20 | github-code | 6 | [
{
"api_name": "os.path.abspath",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "io.open",
"line_numb... |
34407258832 | import torch.nn as nn
import torch.nn.functional as F
class CNN(nn.Module):
def __init__(self):
super(CNN, self).__init__()
self.conv1 = nn.Conv3d(in_channels=1, out_channels=64,
kernel_size=(3, 5, 5), stride=(1, 1, 1), bias=False)
self.max1 = nn.Max... | kishanbala/BrainLesionSegmentation | cmb_3dcnn/build_screening_stage.py | build_screening_stage.py | py | 2,008 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "torch.nn.Module",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv3d",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numbe... |
37126840757 | import matplotlib.pyplot as plt
import numpy as np
import time
def plot_voxel(voxels, filename):
start = time.time()
colors = np.where(voxels, "blue", "red")
fig = plt.figure()
ax = fig.gca(projection='3d')
template = np.ones(voxels.shape, dtype=object)
ax.voxels(template, facecolors=... | born9507/Prediction-of-E-using-CNN | src/data/plot.py | plot.py | py | 782 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "time.time",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.where",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"... |
36062246358 | from django.urls import path
from .views import addtask, mark_as_done, mark_as_undone, edit, delete_task
urlpatterns = [
# adding a task
path('addtask/', addtask, name='addtask'),
# mark as done task
path('mark_as_done/<int:pk>/', mark_as_done, name='mark_as_done'),
# mark as undone task
path(... | shaikmoinuddin/todo_django | todo_app/urls.py | urls.py | py | 530 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.addtask",
"line_number": 7,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "views.mark_as_done",... |
40428611431 | #!/usr/bin/env python3
"""
Name: cluster_create_update_all.py
Description: Create/update clusters defined in ``--yaml`
"""
import argparse
from netbox_tools.common import netbox, load_yaml
from netbox_tools.cluster import Cluster
OUR_VERSION = 101
def get_parser():
"""
return an argparse parser object
""... | allenrobel/netbox-tools | scripts/cluster_create_update_all.py | cluster_create_update_all.py | py | 1,091 | python | en | code | 6 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "netbox_tools.common.netbox",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "netbox_tools.common.load_yaml",
"line_number": 41,
"usage_type": "call"
},
{
"... |
8097009121 | """
Image utility functions.
"""
import PIL.Image
import PIL.ImageChops
import numpy
def equalize(image, levels=256, grayscale=False):
"""
Equalizes an image such that the darkest pixels become black, the lightest become white, and others are based on
their percentile. If a pixel is brighter than 25% of ... | dewiniaid/sigsolve | sigsolve/imageutil.py | imageutil.py | py | 3,598 | python | en | code | 3 | github-code | 6 | [
{
"api_name": "PIL.Image.Image.merge",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "PIL.Image.Image",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "PIL.Image",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "PIL.Image.Image.... |
21367680266 | import serial
import serial.tools.list_ports as lp
class serialPort():
def __init__(self) -> None:
self.ser = serial.Serial()
self.timeout = None # specify timeout when using readline()
self.ports = lp.comports()
def connectPort(self, port_name, baudrate=115200):
sel... | PhysiologicAILab/PhysioKit | utils/devices.py | devices.py | py | 1,003 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "serial.Serial",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "serial.tools.list_ports.comports",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "serial.tools.list_ports",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "s... |
73939813946 |
import mira
assert mira.__file__ == '/liulab/alynch/projects/multiomics/BatchEffect/MIRA/mira/__init__.py'
from scipy import sparse
import shutil
import frankencell as fc
import scanpy as sc
from .utils import read_and_process, plot_umaps
import os
import optuna
def run_mira(dynframe, out_h5, plot_file, threads = 1)... | AllenWLynch/CODA-reproduction | disentangler/frankencell/dimred_methods/disentangler.py | disentangler.py | py | 2,566 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "mira.__file__",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "shutil.copy",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "utils.read_and_process",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "scipy.sparse.csr... |
28672716901 | from trello import TrelloClient, util
from atlassian import Confluence
from os import listdir, path
import pystache
import datetime
import json
from traceback import print_exc
from time import sleep
from re import sub
try:
keys = {}
if path.exists('.keys'):
with open('.keys') as f:
... | iain-neirfeno/trello-to-confluence | create_confluence_page.py | create_confluence_page.py | py | 6,643 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.path.exists",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "json.load",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "atlassian.Confluence",
"line_num... |
2235060581 | import xml.etree.ElementTree as ET
import subprocess
import os
import glob
import time
def clonerep(url):
name = url.split("/")[-1].split(".")[0]
os.system("git"+ " clone " + "https://github.com/" + url + " repos/" + name + "/" )
def insertIntoPom(repdir):
# ET.register_namespace("", "http://maven.apache... | tyheise/402-Course-Project | codecov.py | codecov.py | py | 6,907 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.system",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "subprocess.call",
"line_number": 92,
"usage_type": "call"
},
{
"api_name": "os.chdir",
"line_number": 94,
... |
35704005613 | from django.contrib import admin
from django.urls import path, include
from home import views
urlpatterns = [
path('', views.index, name='home'),
path('gallery', views.gallery, name='gallery'),
path('login', views.login_view, name='login'),
path('pricing', views.price, name='pricing'),
path('signup... | Shivam-08/gymdesign | home/urls.py | urls.py | py | 511 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "home.views.index",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "home.views",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "django.urls.path",
... |
71576276027 | import os
import numpy as np
import torch
from matplotlib import pyplot as plt
from ..experiments.attention.attention import AttentionHookModule, group_by_type, interpolate, low_mem, sum_over_dim, stack_attentions
from .. import util
from ..StableDiffuser import StableDiffuser
def edit_output(activation, name):
a... | JadenFiotto-Kaufman/thesis | thesis/final/cross_attention.py | cross_attention.py | py | 3,146 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "experiments.attention.attention.interpolate",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "experiments.attention.attention.low_mem",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_number": 18,
"usage_... |
34038250008 | import logging
from datetime import timedelta
from aio_proxy.request.search_type import SearchType
from aio_proxy.search.es_index import StructureMapping
from aio_proxy.search.geo_search import build_es_search_geo_query
from aio_proxy.search.helpers.helpers import (
execute_and_agg_total_results_by_identifiant,
... | etalab/annuaire-entreprises-search-api | aio/aio-proxy/aio_proxy/search/es_search_runner.py | es_search_runner.py | py | 5,014 | python | en | code | 13 | github-code | 6 | [
{
"api_name": "datetime.timedelta",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "aio_proxy.search.es_index.StructureMapping.search",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "aio_proxy.search.es_index.StructureMapping",
"line_number": 22,
"usa... |
28521533515 | from sqlalchemy import Column, Float, ForeignKey, Integer, \
String, Text, and_
from sqlalchemy.orm import contains_eager, load_only, relationship
from sqlalchemy.orm.exc import NoResultFound
from Sugar import Dictifiable
from extensions import celery, db
class SixteenPReport(Dictifiable, db.Model):
__tablen... | harveyslash/backend-cleaned | beatest/models/SixteenPReport.py | SixteenPReport.py | py | 2,816 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "Sugar.Dictifiable",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "extensions.db.Model",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "extensions.db",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.C... |
12570928349 | from .strings import Strings
from .actions import Action
from dataclasses import dataclass, field
from telegram import User, InlineKeyboardButton, InlineKeyboardMarkup
import random
from datetime import datetime
REMOVE_ID_INDEX = 13 # в коллбеке для удаления человека передаём айди, начинается с 13 индекса
@datacla... | maxkupetskii/kurwabotV2 | kurwa_bot/tasting.py | tasting.py | py | 3,575 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "telegram.User",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "dataclasses.field",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "telegram.User",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "dataclasses.field",
... |
22762975242 | import cv2
import time
import PoseModule as pm
cap = cv2.VideoCapture('Videos/14.mp4')
ok_flag = False
if cap.isOpened():
ok_flag = cap.isOpened()
else:
print("Cannot open camera")
exit()
pTime = 0
detector = pm.poseDetector()
while ok_flag:
success, img = cap.read()
# if frame is read correctly re... | GabrielaVasileva/ComputerVision | pose_estimation/PoseProject.py | PoseProject.py | py | 1,538 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "cv2.VideoCapture",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "PoseModule.poseDetector",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "cv2.circle",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "cv2.FILLED",
"... |
40694907934 | # coding: utf-8
from fabric.api import local, sudo, lcd, put, cd
from fabric.context_managers import settings
from fabric.contrib.files import exists
from fabric.operations import local as lrun, run
from fabric.api import task
from fabric.state import env
import os
env.user = 'adminbuy'
proj_dir = '/home/user/www... | StasEvseev/adminbuy | fabfile.py | fabfile.py | py | 6,566 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "fabric.state.env.user",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "fabric.state.env",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "fabric.state.env.run",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": ... |
73746980669 | import warnings
import time
import os
import joblib
import json
import pandas as pd
from src.training import hyper_param_tuning, test_models
from src.utils import parse_terminal_arguments, get_repr_model, dict_cartesian_product
warnings.simplefilter(action='ignore', category=FutureWarning)
#%%
start = time.... | boun-tabi/chemboost | src/runner.py | runner.py | py | 2,510 | python | en | code | 7 | github-code | 6 | [
{
"api_name": "warnings.simplefilter",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "src.utils.parse_terminal_arguments",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os... |
32402735389 | #!/usr/bin/env python
# coding: utf-8
#Project Information
# We will create a classifier that can distinguish spam (junk or commercial or bulk) emails from ham (non-spam) emails.
# Spam/Ham Classification
# EDA, Feature Engineering, Classifier
# Dataset Information
# In email classification, our goal is to classify e... | muskaangoyal/data-science-portfolio | spam-ham-master/proj.py | proj.py | py | 19,773 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "seaborn.set",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "utils.fetch_and_cache_gdrive",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "utils.fetch_and_cache_gdrive",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": ... |
73338806587 | import gc
from contextlib import contextmanager
from dataclasses import dataclass
from typing import Any, ContextManager, Iterator
import pytest
from typing_extensions import Protocol, runtime_checkable
from antidote._internal import enforce_subclass_if_possible, Singleton
from antidote._internal.utils import CachedM... | Finistere/antidote | tests/internal/test_utils.py | test_utils.py | py | 2,310 | python | en | code | 88 | github-code | 6 | [
{
"api_name": "contextlib.contextmanager",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typing.Iterator",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "pytest.raises",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "typing_extens... |
43755872386 | '''
Measures the square area of colonies in several image files and exports data as an excel sheet.
Written by George Walters-Marrah
Last updated: 6/26/2019
'''
# import needed packages
import colSizeMeasurer as cm
import numpy as np
import pandas as pd
import os.path
from os import path
import imageio... | gwmarrah/colony-measurer | colSizeAnalyzer.py | colSizeAnalyzer.py | py | 10,361 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "os.path.exists",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 52,
"usage_type": "name"
},
{
"api_name": "imageio.imread",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_numb... |
23699044088 | from datetime import date, timedelta
from bs4 import BeautifulSoup
import pandas as pd
import requests
import os
import warnings
warnings.filterwarnings('ignore')
def is_workday(day: date) -> bool:
"""Функция определяет рабочий день или выходной согласно рабочему календарю.
True - рабочий
False - выходно... | garick161/penalty_calculator | functions.py | functions.py | py | 8,809 | python | ru | code | 1 | github-code | 6 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "datetime.date",
... |
70281340028 | import argparse
from pathlib import Path
import pdb
from bert_score import BERTScorer
import numpy as np
from util import read_test_data, read_generations, match_data
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--pred-path", type=str, required=True)
parser.add_a... | esteng/ambiguous_vqa | models/eval/my_bert_score.py | my_bert_score.py | py | 932 | python | en | code | 5 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "util.read_test_data",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "util.read_ge... |
8967390830 | #!/opt/anaconda3/envs/PECANS-env/bin/python
import argparse
import os
import numpy as np
from pecans.ensembles.api import EnsembleRunner
from pecans.utilities.config import load_config_file
_mydir = os.path.abspath(os.path.realpath(os.path.dirname(__file__)))
config_file = os.path.join(_mydir, 'pecans_config.cfg')
... | ChiLi90/PECANS-PMOx | run_pecans_sims.py | run_pecans_sims.py | py | 5,605 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "os.path.abspath",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"... |
30162915076 | from django import forms
from .models import publishing
class CreateAdForm(forms.ModelForm):
class Meta:
model = publishing
fields = (
'title',
'type',
'brand',
'model',
'category',
'year',
'transmission',
'milage',
'fuel',
... | DenukaSandeepa/Avehiz-Project | publishing/forms.py | forms.py | py | 556 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.forms.ModelForm",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "models.publishing",
"line_number": 6,
"usage_type": "name"
}
] |
8731736072 | import numpy as np
import matplotlib.pyplot as plt
a = np.array([1, 2, 3])
print(a)
plt.plot([1, 2, 3], [2, 4, 6])
plt.show()
for num in [1, 2, 3, 4]:
print(num)
def sqaure(x):
return x**2
| SMaC-3/GitProject_test | hello.py | hello.py | py | 204 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.array",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.s... |
17748417007 | from django.test import TestCase
from .forms import MakeBooking
# Create a test class for the MakeBooking form
class MakeBookingFormTest(TestCase):
# Test when the form is valid
def test_make_booking_form_is_valid(self):
form = MakeBooking(data={
'date': '2022-10-25',
'time':... | JustinFourie1993/tables | website/test_forms.py | test_forms.py | py | 1,209 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "django.test.TestCase",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "forms.MakeBooking",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "forms.MakeBooking",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "forms.MakeBoo... |
38473764222 | from pathlib import Path
import pickle
import pandas as pd
import numpy as np
import json
import torch
import random
import torch
from util.tasksim_args import TaskSimArgs
BASE_RESULTS_PATH = './results'
def get_full_results_dir(args: TaskSimArgs):
run_id = args.get_run_id()
if args.results_dir == None:
... | salemohamedo/tasksim | util/utils.py | utils.py | py | 1,757 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "util.tasksim_args.TaskSimArgs",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pathlib.Path"... |
5693104002 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import requests
city = input("City name: ")
key = 'http://api.openweathermap.org/data/2.5/weather?q={}&appid=2e535070ac9219e3c58f19ac7227c197&q='.format(city)
res = requests.get(key)
data = res.json()
print(res)
print(data)
# In[ ]:
| tkeady/Software-Engineering | weather api.py | weather api.py | py | 293 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "requests.get",
"line_number": 13,
"usage_type": "call"
}
] |
5356434475 | import numpy as np
from scipy.spatial import distance_matrix
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import connected_components
def knn_dist(d_matrix, k):
D_knn = np.zeros(d_matrix.shape)
#get the indices of the k lowest values and set these indices in D_knn to the same values as in D
... | Tobi-r9/assignment1 | isomap.py | isomap.py | py | 2,055 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.zeros",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.copy",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.eye",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "numpy.argmin",
"line_number": 48,... |
16543455717 | import ast
import fnmatch
import os
from nuitka.__past__ import iter_modules
from nuitka.importing.Importing import locateModule
from nuitka.importing.Recursion import decideRecursion
from nuitka.plugins.PluginBase import NuitkaPluginBase
from nuitka.utils.ModuleNames import ModuleName
from nuitka.utils.Utils import i... | Nuitka/Nuitka | nuitka/plugins/standard/ImplicitImports.py | ImplicitImports.py | py | 23,781 | python | en | code | 10,019 | github-code | 6 | [
{
"api_name": "nuitka.plugins.PluginBase.NuitkaPluginBase",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "nuitka.utils.Yaml.getYamlPackageConfiguration",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "nuitka.utils.ModuleNames.ModuleName",
"line_number":... |
74920129787 | from bs4 import BeautifulSoup
import sys
import io
sys.stdout = io.TextIOWrapper(sys.stdout.detach(), encoding = 'utf-8')
sys.stderr = io.TextIOWrapper(sys.stderr.detach(), encoding = 'utf-8')
html = """
<html><body>
<ul>
<li><a href="http://www.naver.com">naver</a></li>
<li><a href="ht... | lcy8417/Python | download2-5-3.py | download2-5-3.py | py | 994 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "sys.stdout",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "io.TextIOWrapper",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.stdout.detach",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
"lin... |
25175601159 | import random
import json
import numpy as np
import torch
# Custom imports
import data
from model_eval import evaluate
class LSTM(torch.nn.Module):
def __init__(self, embedding: torch.FloatTensor):
super().__init__()
# Embedding wrapper
self.__embedding = torch.nn.Embedding.from_pretrai... | ftodoric/fer-du | lab03/rnn.py | rnn.py | py | 5,265 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "torch.nn",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.FloatTensor",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Embedding.from_pretrained",
"line_number": 17,
"usage_type": "call"
},
{
"api_name"... |
34487423583 | import serial
import time
import struct
import logging as trace
import threading
class Communication(object):
data_chars = [b'!', b'"', b'#', b'$', b'%', b'&', b"'", b'(']
response_timeout = 2 #second
_handle = serial.Serial()
_error_counter = 0
_done = False
_thread = None
def __init__(se... | ccucumber/verdeta-lockin | fotonowy/komunikacja.py | komunikacja.py | py | 8,765 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "serial.Serial",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "serial.EIGHTBITS",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "serial.PARITY_NONE",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "serial.ST... |
41854725692 | from absl.testing import parameterized
import dataclasses
import tensorflow as tf
from official.core import config_definitions as cfg
from official.core import input_reader
from official.modeling import hyperparams
from official.vision.beta.dataloaders import tfds_detection_decoders
from official.vision.beta.projects.... | sek788432/Waymo-2D-Object-Detection | input/models/official/vision/beta/projects/yolo/dataloaders/yolo_detection_input_test.py | yolo_detection_input_test.py | py | 3,074 | python | en | code | 79 | github-code | 6 | [
{
"api_name": "official.modeling.hyperparams.Config",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "official.modeling.hyperparams",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "dataclasses.dataclass",
"line_number": 12,
"usage_type": "attribu... |
18194693461 | from rest_framework.routers import DefaultRouter
from messaging import api_view
router = DefaultRouter()
router.register('message', api_view.MessageVewSet, base_name='message')
router.register('chat', api_view.GroupBlogViewSet, base_name='chat')
urlpatterns = [
]
urlpatterns += router.urls
| SivakumarSkr/Movieclub | messaging/api_urls.py | api_urls.py | py | 293 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "rest_framework.routers.DefaultRouter",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "messaging.api_view.MessageVewSet",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "messaging.api_view",
"line_number": 6,
"usage_type": "name"
},... |
3502830678 | """Retreive extracts wrt. previous lexicon update cycle.
Update extracts.json and output cycle extracts as extracts-{cycle}.txt for easy inspection
Example
$ python3 get_extracts.py 4 working_folder
$ python3 get_extracts.py 4 _aroma_NOUN+ADJ
Args:
n (int): number of (CPU Threads) processes to use
w... | ryanbrate/DS_thesis | 5_Process/get_extracts.py | get_extracts.py | py | 9,761 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "sys.path.append",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number... |
40466793180 | #!/home/gabriel/funcam/venv/bin/python3
# ONLY TESTED ON LINUX
# To run using ./run.py [args] on your terminal (without python3)
# point the first line to some python interpreter containing the requirements
# or create a venv inside this project.
# Or delete this to use another method.
from cam import Cam
from vcam im... | biguelito/funcam | funcam.py | funcam.py | py | 1,315 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "vcam.VCam",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "cam.Cam",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "cam.open",
"line_number... |
35951961808 | # -*- coding: utf-8 -*-
import logging
from path import Path
logger = logging.getLogger(__name__)
def get_mipname(fastq_file):
"""Takes a demux fastq file and returns a MIP compatible fastq file
Args:
fastq_file (str): a FQP to a fastq file.
Returns (str): A MIP compatible fastq file.
"""... | Clinical-Genomics/deliver | deliver/utils/files.py | files.py | py | 2,052 | python | en | code | 1 | github-code | 6 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "path.Path",
"line_number": 61,
"usage_type": "call"
},
{
"api_name": "path.Path",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "path.Path",
"line_number": 6... |
1397488728 | from collections import defaultdict
def longestPalindrome(s):
maxlen, maxp, l, dit = 0, "", len(s), defaultdict(list)
for i in range(l):
dit[s[i]].append(i)
for j in dit[s[i][::-1]]:
if s[j:i+1] == s[j:i+1][::-1]:
if len(s[j:i+1]) > maxlen:
maxlen = len(s[j:i+1])
maxp = s[j:i+1]
break
retur... | anjaliugale31/placement_preparation | strongest_palindrome.py | strongest_palindrome.py | py | 368 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "collections.defaultdict",
"line_number": 3,
"usage_type": "call"
}
] |
10010702062 | import numpy as np
import pandas as pd
from flask import Flask, request, jsonify, render_template
import pickle
app = Flask(__name__)
from keras.models import load_model
model = load_model('customer-churn\saved_model (1).pb')
# Importing the dataset
dataset = pd.read_csv('customer_churn_large_dataset.csv')
# Extractin... | meyograj/churn1 | app.py | app.py | py | 2,806 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "keras.models.load_model",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessi... |
29205882969 | import subprocess
import time
import os
import math
from PIL import Image
import psutil
import re
from skyfield.api import Star
import numpy as np
import threading
import select
from pathlib import Path
import fitsio
import Nexus
import Coordinates
import Display
home_path = str(Path.home())
version = "21_7"
#os.syste... | WimDeMeester/eFinder | eFinder.py | eFinder.py | py | 20,522 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "pathlib.Path.home",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "subprocess.run",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "re.findall",
"line_... |
36040524676 | import statistics
from ParadoxTrading.Indicator.IndicatorAbstract import IndicatorAbstract
from ParadoxTrading.Utils import DataStruct
class AdaBBands(IndicatorAbstract):
def __init__(
self, _period: int, _use_key: str,
_init_n: int = 20, _min_n: int = 20, _max_n: int = 60,
_r... | ppaanngggg/ParadoxTrading | ParadoxTrading/Indicator/General/AdaBBands.py | AdaBBands.py | py | 1,870 | python | en | code | 51 | github-code | 6 | [
{
"api_name": "ParadoxTrading.Indicator.IndicatorAbstract.IndicatorAbstract",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "ParadoxTrading.Utils.DataStruct",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "ParadoxTrading.Utils.DataStruct",
"line_number": ... |
19780951486 | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
import os
import argparse
import subprocess
from glob import glob
def translatefolder(src, trg, **kw):
python = kw.get("python", "python3")
translate = kw.get("translate", "./translate/translate.py")
port = int(kw.get("port", 3035))
host = kw.get("host"... | schultet/goa | scripts/translate.py | translate.py | py | 2,582 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "os.path.exists",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number... |
35616591437 | # https://adventofcode.com/2022/day/22
from collections import defaultdict
from aoctk.data import Graph, Unbound2DGrid
from aoctk.input import get_groups
def parse(data):
ps, (ins,) = get_groups(data)
m = Unbound2DGrid(
(
(complex(j, i), c)
for i, r in enumerate(ps)
... | P403n1x87/aoc | 2022/22/code.py | code.py | py | 3,157 | python | en | code | 2 | github-code | 6 | [
{
"api_name": "aoctk.input.get_groups",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "aoctk.data.Unbound2DGrid",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "aoctk.data.Graph",
"line_number": 67,
"usage_type": "name"
},
{
"api_name": "coll... |
32177006845 | import numpy as np
from sentinelhub import BBox, bbox_to_dimensions,CRS
class resolution_image:
def __init__(self,bbox,resolution):
self.bbox = bbox
self.resolution = resolution
self.size=None
def run(self):
our_bbox = list(np.round(self.bbox,2))
our_bbox = BB... | VaclavLamich/Cloud-Detection | resolution.py | resolution.py | py | 454 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "numpy.round",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "sentinelhub.BBox",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sentinelhub.CRS.WGS84",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "sentinelhub.C... |
3647213738 | import heapq
import numpy as np
import itertools
class PQueue:
def __init__(self):
self.pq = [] # list of entries arranged in a heap
self.entry_finder = {} # mapping of tasks to entries
self.REMOVED = '<removed-task>' # placeholder for a removed t... | joedlcolvin/Tugboats | p_queue.py | p_queue.py | py | 2,032 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "itertools.count",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "heapq.heappush",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "heapq.heappop",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_... |
27462814126 | from app import app
from app import db
from app.models import booking
from flask import jsonify, request
@app.route('/get_booking', methods=['GET'])
def get_booking():
date = request.args.get('date')
idTable = request.args.get('idTable')
phone = ['','','','','','','','']
users = booking.query.all()
... | SevaSob/Na-rogah | routes.py | routes.py | py | 2,216 | python | en | code | 0 | github-code | 6 | [
{
"api_name": "flask.request.args.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.request.args",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "flask.reque... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.