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
9339680077
# -*- coding: utf-8 -*- from odoo import fields, models, api, _ from odoo.exceptions import UserError try: from pysimplesoap.client import SoapFault except ImportError: SoapFault = None import logging _logger = logging.getLogger(__name__) class ResPartner(models.Model): _inherit = "res.partner" #arba...
codize-app/odoo-argentina
l10n_ar_withholding/models/res_partner.py
res_partner.py
py
16,227
python
es
code
10
github-code
1
[ { "api_name": "pysimplesoap.client.SoapFault", "line_number": 7, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 9, "usage_type": "call" }, { "api_name": "odoo.models.Model", "line_number": 12, "usage_type": "attribute" }, { "api_name": "...
14277710480
import numpy from obspy.core import read,Trace,Stream,UTCDateTime import Queue from threading import Thread import os.path import subprocess import time from scipy import signal from scipy.interpolate import interp1d import Adafruit_ADS1x15 sps = 250 #samples per second adc = Adafruit_ADS1x15.ADS1115() #create...
SpinaCianetti/RASP_ADC
leggi_dati_coda.py
leggi_dati_coda.py
py
5,153
python
en
code
0
github-code
1
[ { "api_name": "Adafruit_ADS1x15.ADS1115", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path.system", "line_number": 28, "usage_type": "call" }, { "api_name": "os.path", "line_number": 28, "usage_type": "name" }, { "api_name": "Queue.Queue", "li...
21232514403
import sys from PySide6.QtWidgets import QApplication, QPushButton, QGridLayout, QWidget, QBoxLayout, QMainWindow app = QApplication(sys.argv) window = QMainWindow() central_widget = QWidget() window.setCentralWidget(central_widget) window.setWindowTitle('Minha janela bonita') button_1 = QPushButton('Button 1') butto...
RossettiBR/curso-python-atualizado
pyside6/04_qmaiwindow_centralwidget.py
04_qmaiwindow_centralwidget.py
py
1,155
python
en
code
0
github-code
1
[ { "api_name": "PySide6.QtWidgets.QApplication", "line_number": 4, "usage_type": "call" }, { "api_name": "sys.argv", "line_number": 4, "usage_type": "attribute" }, { "api_name": "PySide6.QtWidgets.QMainWindow", "line_number": 5, "usage_type": "call" }, { "api_name"...
40255581254
#!/usr/bin/env python import rospy from flexbe_core import EventState, Logger from bosdyn.client.util import * from bosdyn.client.lease import LeaseClient, LeaseKeepAlive from bosdyn.client.frame_helpers import get_odom_tform_body from bosdyn.api.graph_nav import nav_pb2, graph_nav_pb2 from bosdyn.client.robot_state ...
yashpatel1392/spot_nav_behaviors
spot_nav_flexbe_states/src/spot_nav_flexbe_states/swap_lease.py
swap_lease.py
py
4,565
python
en
code
0
github-code
1
[ { "api_name": "flexbe_core.EventState", "line_number": 19, "usage_type": "name" }, { "api_name": "bosdyn.client.robot_command.blocking_stand", "line_number": 44, "usage_type": "call" }, { "api_name": "bosdyn.client.robot_command", "line_number": 44, "usage_type": "name" ...
74659052512
import argparse import re from datetime import datetime from cli.models.models import CliData, PHONE, LOGIN, PASSWORD, SIP_DEVICE, \ SIP_ENABLED, IDENTIFY_LINE from cli.utils.help_message import * CHOICE_FILTER = ['all', 'activate', 'deactivate'] CHOICE_ACTION = ['a', 'd'] CHOICE_VIEW = [PHONE, LOGIN, PASSWORD, S...
Kotletta-TT/cbot-cm-trunk-producer-mts
cli/utils/arg_parse.py
arg_parse.py
py
2,873
python
en
code
0
github-code
1
[ { "api_name": "cli.models.models.PHONE", "line_number": 11, "usage_type": "name" }, { "api_name": "cli.models.models.LOGIN", "line_number": 11, "usage_type": "name" }, { "api_name": "cli.models.models.PASSWORD", "line_number": 11, "usage_type": "name" }, { "api_na...
39483432719
import json from datetime import datetime, timedelta from app import app, db, models from flask import render_template, jsonify, request @app.route('/') @app.route('/index') def index(): username = request.args.get('username') if username is None: return 'user name must be specified as ?username=xxx' retur...
laofeizhu/reward_chart
app/routes.py
routes.py
py
1,765
python
en
code
0
github-code
1
[ { "api_name": "flask.request.args.get", "line_number": 11, "usage_type": "call" }, { "api_name": "flask.request.args", "line_number": 11, "usage_type": "attribute" }, { "api_name": "flask.request", "line_number": 11, "usage_type": "name" }, { "api_name": "flask.re...
72040607393
""" This entire file is deprecated and will be deleted when MVC is working """ # import something for getting error codes import validators import re import logging logger = logging.getLogger(__name__) # now we use logger.debug, etc. logger.setLevel(logging.DEBUG) formatter = logging.Formatter(style="{", fmt="{asc...
fromCharCode/YouTube-Downloader
url_validator.py
url_validator.py
py
1,000
python
en
code
0
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 11, "usage_type": "call" }, { "api_name": "logging.DEBUG", "line_number": 12, "usage_type": "attribute" }, { "api_name": "logging.Formatter", "line_number": 14, "usage_type": "call" }, { "api_name": "logging.FileHa...
22586754727
import commentjson as json import os class Config: def __init__(self, dictfile): self.dictfile = dictfile if not os.path.exists(self.dictfile): with open(self.dictfile, 'w', encoding='utf-8') as file: json.dump({ "users": { ...
timoxa0/Reshala
server/configctl.py
configctl.py
py
815
python
en
code
0
github-code
1
[ { "api_name": "os.path.exists", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "attribute" }, { "api_name": "commentjson.dump", "line_number": 10, "usage_type": "call" }, { "api_name": "commentjson.load", "li...
71442561313
from ursina import * from ursina.prefabs.first_person_controller import FirstPersonController app = Ursina() grass_texture = load_texture('assets/grass_block.png') stone_texture = load_texture('assets/stone_block.png') brick_texture = load_texture('assests/brick_block.png') dirt_texture = load_texture('assets/...
Heroic234/my_mini_minecraft
Mini_craft_code.py
Mini_craft_code.py
py
3,203
python
en
code
0
github-code
1
[ { "api_name": "ursina.prefabs.first_person_controller.FirstPersonController", "line_number": 90, "usage_type": "call" } ]
17635193634
from ..scrabTask import ReportTask from utils import containedStructure from datetime import datetime, timezone from math import log2, pow from dateutil import parser name = "ImpactCalculator" version = "1.1.1" class ImpactData(): """ Helper class that stores all information about a single project that is ...
Eyenseo/gitScrabber
gitScrabber/scrabTasks/report/impactCalculator.py
impactCalculator.py
py
8,015
python
en
code
0
github-code
1
[ { "api_name": "datetime.datetime.now", "line_number": 66, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 66, "usage_type": "name" }, { "api_name": "datetime.timezone.utc", "line_number": 66, "usage_type": "attribute" }, { "api_name": "da...
74768151392
import pygame import random import math from constants import * class Paddle: """ Base class for a paddle """ def __init__(self, x_pos, width, height, speed, color): self.rect = pygame.Rect((x_pos, (SCREEN_HEIGHT - height) / 2), (width, height)) self.color = color self.speed = speed ...
delhoyo31415/Pygame-Ping-Pong
entities.py
entities.py
py
4,472
python
en
code
0
github-code
1
[ { "api_name": "pygame.Rect", "line_number": 11, "usage_type": "call" }, { "api_name": "pygame.math.Vector2", "line_number": 14, "usage_type": "call" }, { "api_name": "pygame.math", "line_number": 14, "usage_type": "attribute" }, { "api_name": "pygame.draw.rect", ...
70975829473
import torch def cosine_metric(novels, bases): """ Args: novel (tensor): [dim] -> [batch_size,dim] bases (tensro): [batch_size,dim] Returns: """ # batch_size = bases.shape[0] # novels = novel.unsqueeze(0).expand(batch_size, -1) n = novels.shape[0] # [25...
ChunpingQiu/SSL-Features-for-RS-Scene-Classification-Few-Samples
util/similarity.py
similarity.py
py
1,971
python
en
code
0
github-code
1
[ { "api_name": "torch.nn.CosineSimilarity", "line_number": 22, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 22, "usage_type": "attribute" }, { "api_name": "torch.pow", "line_number": 34, "usage_type": "call" } ]
70071534753
from core import services from django.http import HttpResponse from openpyxl.writer.excel import save_virtual_workbook from rest_framework import viewsets from rest_framework.decorators import action from rest_framework.response import Response class DetailedListViewSetMixin(viewsets.ModelViewSet): serializer_act...
berkaymizrak/Immfly-Media-Platform-Project
core/mixins.py
mixins.py
py
3,096
python
en
code
0
github-code
1
[ { "api_name": "rest_framework.viewsets.ModelViewSet", "line_number": 9, "usage_type": "attribute" }, { "api_name": "rest_framework.viewsets", "line_number": 9, "usage_type": "name" }, { "api_name": "rest_framework.response.Response", "line_number": 48, "usage_type": "call...
27051971804
from dtat.api.guild import guildprint from dtat.services.list import guildWithId from dtat.services.update import guildObj from flask import jsonify from dtat.models import Player from dtat.services.remove import removeGuild from dtat.exceptions import DTATException @guildprint.route('/id/<int:id>/data', met...
deeptownadmintools/main-server
dtat/api/guild/data.py
data.py
py
1,139
python
en
code
3
github-code
1
[ { "api_name": "dtat.services.list.guildWithId", "line_number": 16, "usage_type": "call" }, { "api_name": "dtat.services.update.guildObj", "line_number": 19, "usage_type": "call" }, { "api_name": "dtat.exceptions.DTATException", "line_number": 20, "usage_type": "name" },...
38326493487
import torch import pandas as pd import numpy as np import matplotlib.pyplot as plt from torch.utils.data import Dataset, DataLoader import glob from pathlib import Path import os class TickerDataset(Dataset): def __init__(self, root_dir, series_length, lookback, min_sequence_length, template='*.csv', transform=...
pwmorrison/trading
mlbootcamp/vae/dataset.py
dataset.py
py
6,419
python
en
code
1
github-code
1
[ { "api_name": "torch.utils.data.Dataset", "line_number": 11, "usage_type": "name" }, { "api_name": "glob.glob", "line_number": 26, "usage_type": "call" }, { "api_name": "pathlib.Path", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path.basename", ...
6345239505
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2017/3/3 16:31 # @Author : Vincent.G.Woo # @Site : # @File : blogtest2.py # @Software: PyCharm Community Edition # @Python_Version: # @Software_Version: import sys from blog import Ui_MainWindow from PyQt5 import QtWidgets class mywind...
Vingent/HydrologySoftware_Code
blogtest2.py
blogtest2.py
py
923
python
en
code
1
github-code
1
[ { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 16, "usage_type": "attribute" }, { "api_name": "PyQt5.QtWidgets", "line_number": 16, "usage_type": "name" }, { "api_name": "blog.Ui_MainWindow", "line_number": 16, "usage_type": "name" }, { "api_name": "PyQt5...
72506183395
import asyncio import os from .utils import * from .exceptions import * # -------------------------------------------------------------------- class Shell: limiter = asyncio.BoundedSemaphore(CPU_CORES) def __init__(self, config=None): self.log = get_logger("bakery.shell.Shell") self.env = {} ...
lainproliant/bakery
bakery/shell.py
shell.py
py
2,831
python
en
code
0
github-code
1
[ { "api_name": "asyncio.BoundedSemaphore", "line_number": 9, "usage_type": "call" }, { "api_name": "asyncio.subprocess", "line_number": 23, "usage_type": "attribute" }, { "api_name": "asyncio.subprocess", "line_number": 24, "usage_type": "attribute" }, { "api_name"...
17028867718
# helper functions import time import datetime import requests import pickle import sys import itertools import glob # add things to this list that need to be closed when the program ends things_to_close = [] # load the github api tokens into an itertools.cycle github_tokens = [] for file_str in glob.glob("github_to...
millsjustin/gitSecrets
utils.py
utils.py
py
2,403
python
en
code
0
github-code
1
[ { "api_name": "glob.glob", "line_number": 16, "usage_type": "call" }, { "api_name": "itertools.cycle", "line_number": 19, "usage_type": "call" }, { "api_name": "datetime.datetime.fromtimestamp", "line_number": 52, "usage_type": "call" }, { "api_name": "datetime.da...
19012266500
from email.quoprimime import quote import pandas as pd import requests from bs4 import BeautifulSoup from time import sleep import csv def request(msg, slp=1): '''A wrapper to make robust https requests.''' status_code = 500 # Want to get a status-code of 200 while status_code != 200: sleep(slp) ...
lucasccpp/bgwebscrapping
001_scrapping/ludopediaDetalhes.py
ludopediaDetalhes.py
py
5,321
python
pt
code
0
github-code
1
[ { "api_name": "time.sleep", "line_number": 12, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 14, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 20, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_numb...
20506069143
#MODULOS import os import sys import time import smtplib from sympy.crypto.crypto import encipher_affine, decipher_affine from sympy.crypto.crypto import encipher_shift, decipher_shift #COLORES ve = "\033[1;32;40m" #Ve az = "\033[1;34;40m" #A ro = "\033[1;31;40m" #Ro #FUNCI...
jhondoeelmisterio/SocialHacks
SocialHacks.py
SocialHacks.py
py
3,622
python
en
code
0
github-code
1
[ { "api_name": "sys.stdout.write", "line_number": 17, "usage_type": "call" }, { "api_name": "sys.stdout", "line_number": 17, "usage_type": "attribute" }, { "api_name": "sys.stdout.flush", "line_number": 18, "usage_type": "call" }, { "api_name": "sys.stdout", "l...
29614366198
from colorama import Fore, Style from typing import Tuple import numpy as np from colorama import Fore, Style import time print(Fore.BLUE + "\nLoading tensorflow..." + Style.RESET_ALL) start = time.perf_counter() from tensorflow import keras from keras import Model, Sequential, layers, regularizers, optimizers, mode...
rsmassey/mcats
mcats/ml_logic/model_cnn.py
model_cnn.py
py
3,987
python
en
code
0
github-code
1
[ { "api_name": "colorama.Fore.BLUE", "line_number": 8, "usage_type": "attribute" }, { "api_name": "colorama.Fore", "line_number": 8, "usage_type": "name" }, { "api_name": "colorama.Style.RESET_ALL", "line_number": 8, "usage_type": "attribute" }, { "api_name": "colo...
21016222260
import matplotlib.pyplot as pl import numpy as np import pickle from random import randint import pandas as pd """ x = np.linspace(0,10,20) # 20 points entre 0 et 10 y1 = x*x + 2*x # la fonction a tracer y2 = np.sqrt(x) # la fonction a tracer pl.figure() # creation d'une figur...
Eastkap/uni
L2/2i013/graphe.py
graphe.py
py
6,014
python
en
code
0
github-code
1
[ { "api_name": "pandas.read_csv", "line_number": 25, "usage_type": "call" }, { "api_name": "pickle.load", "line_number": 60, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_number": 61, "usage_type": "call" }, { "api_name": "pickle.load", "line_n...
34536369385
import requests from urllib.parse import urlencode import re from requests import codes import os from hashlib import md5 headers = { 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3', 'Accept-Encoding': 'gzip, deflate', 'Acce...
ZhouYuanZZZZ/pythonStudy
spider/toutiao/toutiao_jiepai.py
toutiao_jiepai.py
py
3,035
python
en
code
0
github-code
1
[ { "api_name": "urllib.parse.urlencode", "line_number": 33, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 35, "usage_type": "call" }, { "api_name": "requests.ConnectionError", "line_number": 40, "usage_type": "attribute" }, { "api_name": "re....
34533830120
import numpy as np from scipy import stats # from expon_cusum import Lv,F1 # import matplotlib.pyplot as plt ### This script is used to compare the thresholds for CuSum & WL-Cusum ## From first commit class F1(object): def __init__(self,c,mu_1=1,sig_1=1): self.c = c self.mu_1 = mu_1 self.d...
jacksonliang35/Quickest-Change-Detection
Non-Stationary/ns_wl_thr.py
ns_wl_thr.py
py
4,956
python
en
code
1
github-code
1
[ { "api_name": "scipy.stats.norm", "line_number": 13, "usage_type": "call" }, { "api_name": "scipy.stats", "line_number": 13, "usage_type": "name" }, { "api_name": "numpy.ndarray", "line_number": 16, "usage_type": "attribute" }, { "api_name": "numpy.exp", "line...
41120383892
import torch import torch.nn as nn import torch.nn.functional as F from mmcv.runner import force_fp32, BaseModule, auto_fp16 from mmcv.ops.roi_align import roi_align from mmdet.core import (bbox_cxcywh_to_xyxy, bbox_xyxy_to_cxcywh, build_assigner, build_sampler, multi_apply, ...
paperwave/AiT
ait/code/model/detection/insseg_head.py
insseg_head.py
py
31,161
python
en
code
null
github-code
1
[ { "api_name": "mmcv.runner.BaseModule", "line_number": 29, "usage_type": "name" }, { "api_name": "model.build_model", "line_number": 96, "usage_type": "call" }, { "api_name": "torch.ones", "line_number": 106, "usage_type": "call" }, { "api_name": "torch.nn.CrossEn...
20578247223
import numpy as np import pandas as pd import statsmodels.api as sm from pandas.tseries.offsets import MonthEnd from prettytable import PrettyTable, MARKDOWN from sklearn.kernel_ridge import KernelRidge from sklearn.linear_model import LassoCV, RidgeCV from sklearn.metrics import mean_squared_error from sklearn.model_s...
n3d1117/airqino-calibration
regression/regression_summary.py
regression_summary.py
py
8,833
python
en
code
1
github-code
1
[ { "api_name": "sklearn.model_selection.train_test_split", "line_number": 59, "usage_type": "call" }, { "api_name": "sklearn.metrics.mean_squared_error", "line_number": 62, "usage_type": "call" }, { "api_name": "statsmodels.api.OLS", "line_number": 71, "usage_type": "call"...
70352039714
from data_objects.random_cycler import RandomCycler from data_objects.utterance import Utterance from pathlib import Path """Minimally altered code from https://github.com/Trebolium/Real-Time-Voice-Cloning/tree/master/encoder/data_objects""" # Contains the set of utterances of a single speaker class Speaker: def...
Trebolium/singer_id_encoder
data_objects/speaker.py
speaker.py
py
2,155
python
en
code
0
github-code
1
[ { "api_name": "pathlib.Path", "line_number": 10, "usage_type": "name" }, { "api_name": "data_objects.utterance.Utterance", "line_number": 19, "usage_type": "call" }, { "api_name": "data_objects.random_cycler.RandomCycler", "line_number": 20, "usage_type": "call" } ]
27510683969
""" Author: alberto.suarez@uam.es Coauthors: joseantonio.alvarezo@estudiante.uam.es franciscojavier.saez@estudiante.uam.es """ import warnings from abc import ABC, abstractmethod from typing import Callable, Optional, Union, Type from sklearn.gaussian_process.kernels import RBF import matplotlib.pypl...
fjsaezm/mcd-mf
HW_02/kernel_approximation.py
kernel_approximation.py
py
12,959
python
en
code
0
github-code
1
[ { "api_name": "abc.ABC", "line_number": 23, "usage_type": "name" }, { "api_name": "sklearn.base.BaseEstimator", "line_number": 23, "usage_type": "name" }, { "api_name": "sklearn.base.TransformerMixin", "line_number": 23, "usage_type": "name" }, { "api_name": "nump...
71904356193
from selenium import webdriver from selenium.webdriver.common.keys import Keys import string import random import time path = "D:\chromedriver.exe" driver = webdriver.Chrome(path) print("Opening up the browser") driver.get("https://prnt.sc/") print("Preparing cookies...") driver.find_element_by_css_selector('.css-47seh...
Zeunig/py.prntscraper
prntscr.py
prntscr.py
py
1,102
python
en
code
1
github-code
1
[ { "api_name": "selenium.webdriver.Chrome", "line_number": 7, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 7, "usage_type": "name" }, { "api_name": "time.sleep", "line_number": 12, "usage_type": "call" }, { "api_name": "random.choices"...
1187043277
from sklearn.svm import LinearSVC import metodos as m def ObtenerHiperParametros(x_train, y_train, x_test, y_test): parametros = [ { 'penalty': ['l1'], 'C': [1, 10, 100], 'dual': [False], 'class_weight': [{1:4}, {1:5}] } ] medida = 'recall' return m.GridSearch(LinearSVC(), parametros, medida, ...
erichuizapucp/credit-card-fraud-detection
notebooks/SVM.py
SVM.py
py
675
python
en
code
0
github-code
1
[ { "api_name": "metodos.GridSearch", "line_number": 10, "usage_type": "call" }, { "api_name": "sklearn.svm.LinearSVC", "line_number": 10, "usage_type": "call" }, { "api_name": "sklearn.svm.LinearSVC", "line_number": 16, "usage_type": "call" } ]
347104407
from graphviz import Digraph as DotGraph MAX_EDGES = 2000 def gshow(g, attr=None, file_name=None, view=False): if g is None: return """ shows a networx DiGraph g using graphviz it could become slow on large graphs (above MAX_EDGES) """ ecount = g.number_of_edges() if ecount > MAX...
ptarau/StanzaGraphs
logic/visualizer.py
visualizer.py
py
1,657
python
en
code
8
github-code
1
[ { "api_name": "graphviz.Digraph", "line_number": 17, "usage_type": "call" }, { "api_name": "graphviz.Digraph", "line_number": 45, "usage_type": "call" } ]
37691349335
import os from PIL import Image import torchvision import torch, cv2, math, random import numpy as np device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') device_id = [0] IMG_EXTENSIONS = ['jpg', 'jpeg', 'png', 'ppm', 'bmp', 'pgm'] def mkdir(path): if not os.path.exists(path): os.maked...
painfulloop/Fingerprinting_IR_DNNs
ModelZoo/utils.py
utils.py
py
10,291
python
en
code
3
github-code
1
[ { "api_name": "torch.device", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.cuda.is_available", "line_number": 7, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.exists", ...
6398213595
from random import randint, choice from datetime import datetime now = datetime.now() current_time = now.strftime("%d/%m/%Y") file_name = "math_game_log.txt" # Functions def append_wrong_answer(answer,operation,file_name=file_name): with open(file_name, 'a') as f: f.write(f'\tExpression: {operation}, User...
Tjlhut/basic_math_game
basic_math_game.py
basic_math_game.py
py
4,818
python
en
code
0
github-code
1
[ { "api_name": "datetime.datetime.now", "line_number": 3, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 3, "usage_type": "name" }, { "api_name": "random.randint", "line_number": 44, "usage_type": "call" }, { "api_name": "random.randint",...
37639002029
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import re import sys import argparse import numpy as np from collections import defaultdict,Counter __author__ = 'menghao' __mail__ = 'haomeng@genome.cn' bindir = os.path.abspath(os.path.dirname(__file__)) pat1 = re.compile('^\s*$') def parser_fasta(fasta): ...
whenfree/Rosalind
Consensus_and_Profile/Consensus_and_Profile.py
Consensus_and_Profile.py
py
1,521
python
en
code
0
github-code
1
[ { "api_name": "os.path.abspath", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 12, "usage_type": "call" }, { "api_name": "re.compile", "line_n...
26922251758
from flask import Flask, request, jsonify from models.db import db from models.User_model import User from backend.controller.extensions import bcrypt, jwt_manager, session from datetime import datetime, timezone, timedelta from flask_jwt_extended import get_jwt, create_access_token, get_jwt_identity from flask_cors im...
abhirambsn/stuniq-web-desktop
backend/app.py
app.py
py
2,415
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 12, "usage_type": "call" }, { "api_name": "flask_cors.CORS", "line_number": 19, "usage_type": "call" }, { "api_name": "models.db.db.init_app", "line_number": 22, "usage_type": "call" }, { "api_name": "models.db.db", ...
14905473093
import sys from time import sleep import pygame from settings import Settings import game_functions as gf # from tetrominos import IShape from tetrominos import IShape def run_game(): pygame.init() # Load game settings. settings = Settings() screen = pygame.display.set_mode( (settings.screen...
DeepWalter/python-projects
tetris/tetris.py
tetris.py
py
1,057
python
en
code
0
github-code
1
[ { "api_name": "pygame.init", "line_number": 13, "usage_type": "call" }, { "api_name": "settings.Settings", "line_number": 15, "usage_type": "call" }, { "api_name": "pygame.display.set_mode", "line_number": 16, "usage_type": "call" }, { "api_name": "pygame.display"...
32304885265
import matplotlib import matplotlib.pyplot as plt import pandas as pd import sys import matplotlib.dates as mdates fin = sys.argv[1] fin_raw = sys.argv[2] font = {'size': 14} matplotlib.rc('font', **font) data = pd.read_csv(fin, parse_dates=True, index_col=0) data_raw = pd.read_csv(fin_raw, parse_dates=True, index_co...
Peruz/load_data
plot_raw_and_processed.py
plot_raw_and_processed.py
py
1,070
python
en
code
0
github-code
1
[ { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 9, "usage_type": "attribute" }, { "api_name": "matplotlib.rc", "line_number": 11, "usage_type": "call" }, { "api_name": "pandas.read_csv", "line_n...
20407001822
#!/usr/bin/python import argparse import json import os from os import listdir, path import copy from pathlib import Path import re import pandas as pd import numpy as np from bidict import bidict from scipy import sparse from sklearn.model_selection import cross_validate, StratifiedKFold from sklearn.preprocessing imp...
echr-od/ECHR-OD_predictions
multiclass_experiments.py
multiclass_experiments.py
py
11,588
python
en
code
7
github-code
1
[ { "api_name": "echr_experiments.config.SEED", "line_number": 49, "usage_type": "name" }, { "api_name": "echr_experiments.config.MULTICLASS_OUTPUT_FILE", "line_number": 50, "usage_type": "name" }, { "api_name": "echr_experiments.config.MULTICLASS_ARTICLES", "line_number": 51, ...
27559044703
import urllib3 urllib3.disable_warnings() import os.path import json import requests import uservoice import time from config import * def send_ticket_to_freshdesk(ticket, ticket_number): _url = "https://%s.freshdesk.com/api/v2/tickets" % FD_SUBDOMAIN _headers = { 'Content-Type': 'application/json' } _data = ...
melalj/uservoice-to-freshdesk
main.py
main.py
py
3,071
python
en
code
0
github-code
1
[ { "api_name": "urllib3.disable_warnings", "line_number": 2, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 18, "usage_type": "call" }, { "api_name": "time.sleep", "line_number": 20, "usage_type": "call" }, { "api_name": "requests.post", "li...
43063771699
from typing import TYPE_CHECKING, Optional from nonebot import Bot from nonebot.internal.adapter import Event from nonebot_plugin_access_control_api.subject.model import SubjectModel from nonebot_plugin_access_control_api.subject.manager import SubjectManager if TYPE_CHECKING: from nonebot.adapters.kaiheila.even...
bot-ssttkkl/nonebot-plugin-access-control
src/nonebot_plugin_access_control/subject/extractor/builtin/kaiheila.py
kaiheila.py
py
1,158
python
en
code
30
github-code
1
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 9, "usage_type": "name" }, { "api_name": "nonebot.Bot", "line_number": 16, "usage_type": "name" }, { "api_name": "nonebot.internal.adapter.Event", "line_number": 16, "usage_type": "name" }, { "api_name": "nonebo...
17038581303
import lightgbm as lgb import numpy as np import pandas as pd from sklearn.model_selection import train_test_split def rmsle(y_true, y_pred): assert len(y_true) == len(y_pred) return np.sqrt(np.mean(np.power(np.log1p(y_true + 1) - np.log1p(y_pred + 1), 2))) def rmse(y_true, y_pred): assert len(y_true) ==...
sklinl/Competition_Tunghai
lg.py
lg.py
py
5,626
python
en
code
0
github-code
1
[ { "api_name": "numpy.sqrt", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.mean", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.power", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.log1p", "line_number": 9, ...
4626498979
#!/usr/bin/env python # -*- coding: utf-8 -*- # {# pkglts, pysetup.kwds # format setup arguments import os from os import walk from os.path import abspath, normpath, dirname from os.path import join as pj from setuptools import setup, find_packages short_descr = "Python/Visualea interface to Caribu Light model" rea...
openalea-incubator/caribu
setup.py
setup.py
py
2,530
python
en
code
7
github-code
1
[ { "api_name": "os.path.normpath", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path.abspath", "line_number": 27, "usage_type": "call" }, { "api_name": "os.path.normpath", "line_number": 33, "usage_type": "call" }, { "api_name": "os.path.abspath", ...
26373489244
import sys from math import log, sqrt from itertools import combinations import json from nltk.stem.porter import * from nltk.stem.snowball import ArabicStemmer from string import punctuation punctuation += '،؛؟”0123456789“' stopWords = open(".../arabic_stopwords.txt",encoding = "utf-8").read().splitlines()...
DrMustafa/GOA-Arabic-Text-Summarization
data_preprocessing.py
data_preprocessing.py
py
5,696
python
en
code
0
github-code
1
[ { "api_name": "string.punctuation", "line_number": 9, "usage_type": "name" }, { "api_name": "nltk.stem.snowball.ArabicStemmer", "line_number": 20, "usage_type": "call" }, { "api_name": "math.sqrt", "line_number": 35, "usage_type": "call" }, { "api_name": "math.log...
31865151145
import numpy as np import matplotlib.pyplot as plt import copy from run_stages.common_run_stage import CommonRunStage from configuration.configuration_manager import Configuration from configuration.models import Models from utilities.image_processing_utilities import int_sq class ResistiveMeshStage(CommonRunStage):...
PalankerLab/RPSim
run_stages/resistive_mesh_stage.py
resistive_mesh_stage.py
py
5,314
python
en
code
0
github-code
1
[ { "api_name": "run_stages.common_run_stage.CommonRunStage", "line_number": 11, "usage_type": "name" }, { "api_name": "configuration.configuration_manager.Configuration", "line_number": 30, "usage_type": "call" }, { "api_name": "configuration.configuration_manager.Configuration", ...
26104077495
import connexion import six from swagger_server.models.meta_page import MetaPage # noqa: E501 from swagger_server.models.page import Page # noqa: E501 from swagger_server import util, const from swagger_server.database import database from swagger_server.controllers.exceptions import ExceptionHandler from swagger_se...
JakubKuderski/Programowanie_Zespolowe
server/swagger_server/controllers/page_controller.py
page_controller.py
py
1,997
python
en
code
0
github-code
1
[ { "api_name": "swagger_server.const.DEFAULT_USER", "line_number": 37, "usage_type": "attribute" }, { "api_name": "swagger_server.const", "line_number": 37, "usage_type": "name" }, { "api_name": "swagger_server.database.database.conn.cursor", "line_number": 38, "usage_type...
36064335120
# get chat completions by by passing one or more messages to the chat model from langchain.chat_models import ChatOpenAI # import chat model from langchain.schema import ( AIMessage, HumanMessage, SystemMessage) # type of message from dotenv import dotenv_values env_val = dotenv_values(".env") openai_api_key = ...
bakiwebdev/langchain-local-experment
message_completions_from_a_chat_model.py
message_completions_from_a_chat_model.py
py
882
python
en
code
2
github-code
1
[ { "api_name": "dotenv.dotenv_values", "line_number": 8, "usage_type": "call" }, { "api_name": "langchain.chat_models.ChatOpenAI", "line_number": 11, "usage_type": "call" }, { "api_name": "langchain.schema.HumanMessage", "line_number": 15, "usage_type": "call" }, { ...
3766678139
import json import os SEQUENCE_LENGTH = 64 DATASET_PATH = './dataset' SINGLE_FILE_DATASET_PATH = 'file_dataset' MAPPING_PATH = 'mapping.json' def load(file_path): with open(file_path, 'r') as file: song = file.read() return song def save(songs, file_dataset_path): with open(file_dataset_path, '...
Jiangyuliang0813/MusicGeneration
datasetbuilding.py
datasetbuilding.py
py
2,007
python
en
code
0
github-code
1
[ { "api_name": "os.walk", "line_number": 24, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 26, "usage_type": "call" }, { "api_name": "os.path", "line_number": 26, "usage_type": "attribute" }, { "api_name": "json.dump", "line_number": 41, ...
38420632726
""" Creates a single-page HTTP server """ import os from flask import Flask, request def create_app(test_config=None): # create and configure the app app = Flask(__name__, instance_relative_config=True) app.config.from_mapping( SECRET_KEY='dev', DATABASE=os.path.join(app.instance_path, 'f...
Cy83rr/web_monitor
src/web_monitor/server/server.py
server.py
py
1,031
python
en
code
0
github-code
1
[ { "api_name": "flask.Flask", "line_number": 11, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_number"...
38906742448
import math from numpy import ndarray, array from scipy.spatial.transform import Rotation from .GeoShape import GeoShape from src.pyLiveKML.KML.GeoCoordinates import GeoCoordinates from src.pyLiveKML.KML.KML import AltitudeMode def ellipse_gen( x_rad: float, y_rad: float, rotation: Rotation = None, num_v: int =...
smoke-you/pyLiveKML
evals/apps/geometry/GeoEllipse.py
GeoEllipse.py
py
1,476
python
en
code
1
github-code
1
[ { "api_name": "scipy.spatial.transform.Rotation", "line_number": 12, "usage_type": "name" }, { "api_name": "math.pi", "line_number": 14, "usage_type": "attribute" }, { "api_name": "numpy.array", "line_number": 18, "usage_type": "call" }, { "api_name": "math.cos", ...
9396196983
from collections import Counter from collections import defaultdict from nltk.corpus import stopwords from wordcloud import WordCloud import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from preprocess import process_text_data from utils import load_epub def get_word_frequency_information(book...
dhsong95/the-catcher-in-the-rye
question2.py
question2.py
py
4,122
python
en
code
0
github-code
1
[ { "api_name": "collections.defaultdict", "line_number": 15, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords.words", "line_number": 17, "usage_type": "call" }, { "api_name": "nltk.corpus.stopwords", "line_number": 17, "usage_type": "name" }, { "api_nam...
19801286548
from django.urls import path from . import views urlpatterns =[ path('',views.login,name='index_login'), path('login/',views.login,name='login'), path('logout/',views.logout,name='logout'), path('cadastrar/',views.cadastrar,name='cadastrar'), path('dashboard/',views.dashboard,name='dashboard') ]
vitormiura/senai-cti
django/siteCurso/aluno/urls.py
urls.py
py
317
python
en
code
2
github-code
1
[ { "api_name": "django.urls.path", "line_number": 5, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 6, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", ...
13732329032
# -*- coding: utf8 -*- from flask_login import current_user from app import sa from app.models import Base from app.helpers import ModelHelper, MutableObject import datetime class Comment(Base, sa.Model, ModelHelper): __tablename__ = 'comments' __json_meta__ = [ 'id', 'text', 'profi...
tabaresjc/HeadUP
app/models/comments/comment.py
comment.py
py
2,541
python
en
code
6
github-code
1
[ { "api_name": "app.models.Base", "line_number": 10, "usage_type": "name" }, { "api_name": "app.sa.Model", "line_number": 10, "usage_type": "attribute" }, { "api_name": "app.sa", "line_number": 10, "usage_type": "name" }, { "api_name": "app.helpers.ModelHelper", ...
73826277794
""" Main function to run the script of the pipeline Author: Arkaan Quanunga Date: 03/03/2022 """ import os import tempfile import mlflow import hydra import omegaconf # The Steps this pipeline will run- edit this based on local machine vs S3 # storage _steps = [ # Comment this line out if you don't have any data...
arkaan27/data-engineering-pipeline
main.py
main.py
py
4,939
python
en
code
1
github-code
1
[ { "api_name": "omegaconf.DictConfig", "line_number": 27, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 36, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 37, "usage_type": "attribute" }, { "api_name": "tempfile.Te...
30196444534
#!/usr/bin/env python3 import collections Shader = collections.namedtuple("Shader", "name vs_path fs_path attributes uniforms subroutines") SHADERS = [ Shader( name = "circle", vs_path = "circle.vert", fs_path = "circle.frag", attributes = ["vertex"], uniforms = ["projection", "color...
Poussinou/naev
src/shaders_c_gen.py
shaders_c_gen.py
py
9,168
python
en
code
null
github-code
1
[ { "api_name": "collections.namedtuple", "line_number": 5, "usage_type": "call" } ]
72163556515
from SbisSite import SearchHelper from selenium.webdriver.common.by import By import time def test_sbis(browser): sbis_main_page = SearchHelper(browser) # Открываем сайт sbis_main_page.go_to_site() # Проверяем наличие городом из моего региона в списке контактов cities_kostroma = ['Кострома', 'Нея'] fo...
deadenddanse/tenzor
Task2.py
Task2.py
py
1,289
python
ru
code
0
github-code
1
[ { "api_name": "SbisSite.SearchHelper", "line_number": 7, "usage_type": "call" }, { "api_name": "selenium.webdriver.common.by.By.XPATH", "line_number": 19, "usage_type": "attribute" }, { "api_name": "selenium.webdriver.common.by.By", "line_number": 19, "usage_type": "name"...
9356428118
import asyncio import copy import json import os import shlex import subprocess import sys from datetime import datetime from json.decoder import JSONDecodeError from typing import Any, Dict, List, cast import pymongo import tornado.httpclient from watchdog import observers from watchdog.events import FileSystemEvent,...
berton7/kek-monitors
kekmonitors/monitor_manager.py
monitor_manager.py
py
41,901
python
en
code
8
github-code
1
[ { "api_name": "sys.version_info", "line_number": 23, "usage_type": "attribute" }, { "api_name": "os.path", "line_number": 31, "usage_type": "attribute" }, { "api_name": "kekmonitors.comms.server.Server", "line_number": 34, "usage_type": "name" }, { "api_name": "wa...
42604295575
from app import db from app.models import \ MoneroTransactions, MoneroWalletFee from app.generalfunctions import floating_decimals from sqlalchemy import func def getlastestfee(): """ THis will query the last 10 withdrawls...get the average fee :return: """ getratings = db.session.query(func...
CRYPTOFOUNDARY/wallet_monero
monero_getlastestfee.py
monero_getlastestfee.py
py
742
python
en
code
0
github-code
1
[ { "api_name": "app.db.session.query", "line_number": 15, "usage_type": "call" }, { "api_name": "app.db.session", "line_number": 15, "usage_type": "attribute" }, { "api_name": "app.db", "line_number": 15, "usage_type": "name" }, { "api_name": "sqlalchemy.func.avg",...
15933889767
import pymongo from pymongo import MongoClient cluster = MongoClient("mongodb://localhost:27017") database = cluster["Storage"] collection = database["Inventory"] deletingManyDate = collection.delete_many({}) post = {"_id": 0, "quantity": 400, "productId": 0, "productName": "Soap", "pr...
Nirusan03/FYP_Abi
mongodb.py
mongodb.py
py
2,346
python
en
code
0
github-code
1
[ { "api_name": "pymongo.MongoClient", "line_number": 4, "usage_type": "call" } ]
35718269403
# -*- coding: utf-8 -*- """ Course: CS 4365/5354 [Computer Vision] Author: Jose Perez [ID: 80473954] Assignment: Lab 2 Instructor: Olac Fuentes """ from timeit import default_timer as timer import numpy as np from scipy import signal # ========================= Constants ========================= # Matrix used for con...
DeveloperJose/Python-CS4363-Computer-Vision
Lab2_Detection/Zip/integral_sums_image.py
integral_sums_image.py
py
2,635
python
en
code
0
github-code
1
[ { "api_name": "numpy.array", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 18, "usage_type": "call" }, { "api_name": "scipy.signal.convolve", "line_number": 19, "usage_type": "call" }, { "api_name": "scipy.signal", "lin...
21946634176
#* # SLAM.py: the implementation of SLAM # created and maintained by Ty Nguyen # tynguyen@seas.upenn.edu # Feb 2020 #* import sys ros_path = '/opt/ros/kinetic/lib/python2.7/dist-packages' if ros_path in sys.path: sys.path.remove(ros_path) from MapUtils.bresenham2D import * from probs_utils ...
Saumya-Shah/SLAM-for-THOR
SLAM.py
SLAM.py
py
16,423
python
en
code
0
github-code
1
[ { "api_name": "sys.path", "line_number": 10, "usage_type": "attribute" }, { "api_name": "sys.path.remove", "line_number": 11, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 11, "usage_type": "attribute" }, { "api_name": "sys.version_info", "l...
22051845535
import argparse import itertools import os import subprocess from collections import OrderedDict import numpy as np import torch import torch.nn as nn from torch import linalg from torch.nn import functional as F def mix_many_models(): model_paths = [ os.path.join(args.model_path, file_name) for ...
Lavreniuk/2nd-place-solution-in-Scene-Understanding-for-Autonomous-Drone-Delivery
Mono_depth/soup.py
soup.py
py
1,869
python
en
code
3
github-code
1
[ { "api_name": "os.path.join", "line_number": 16, "usage_type": "call" }, { "api_name": "os.path", "line_number": 16, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": 17, "usage_type": "call" }, { "api_name": "numpy.arange", "line_number"...
36903356880
import pickle import DLfunctions as dl from keras.preprocessing.sequence import pad_sequences print("What is the name of the hyperparams file?(Local directory):") params_file_name = input() a_file = open(params_file_name, "rb") params = pickle.load(a_file) w = params["w"] b = params["b"] print("What is the question...
sidejackthenativity/DL_URLquery
bad_or_good_url.py
bad_or_good_url.py
py
664
python
en
code
0
github-code
1
[ { "api_name": "pickle.load", "line_number": 9, "usage_type": "call" }, { "api_name": "keras.preprocessing.sequence.pad_sequences", "line_number": 21, "usage_type": "call" }, { "api_name": "DLfunctions.predict", "line_number": 25, "usage_type": "call" } ]
9439454968
from django import forms from .models import Museum, Group from user.models import UserProfile class CreateGroupForm(forms.Form): name = forms.CharField(max_length=50) number = forms.IntegerField(min_value=1, max_value=200) museum = forms.ModelChoiceField(Museum.objects.all()) def create_users_pdf(sel...
nicholastaylor0000/CPS410-F20-Team04
museum/forms.py
forms.py
py
913
python
en
code
0
github-code
1
[ { "api_name": "django.forms.Form", "line_number": 5, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 5, "usage_type": "name" }, { "api_name": "django.forms.CharField", "line_number": 6, "usage_type": "call" }, { "api_name": "django.forms"...
13460846161
# coding: UTF-8 import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # 使用する変数の宣言 znは原子番号 i = 0 zn = 18.0 # グラフの作成 azim,elevオプションで見る角度設定可能 fig = plt.figure() ax = fig.add_subplot(111, projection='3d', aspect='equal') # 軸ラベルの設定 ax.set_xlabel("X-axis") ax.set_yla...
kokeshing/orbit_plot
orbit2pz.py
orbit2pz.py
py
1,199
python
ja
code
0
github-code
1
[ { "api_name": "matplotlib.pyplot.figure", "line_number": 12, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 12, "usage_type": "name" }, { "api_name": "numpy.random.rand", "line_number": 26, "usage_type": "call" }, { "api_name": "numpy.ra...
32631833253
# -*- coding: utf-8 -*- import numpy as np from collections import deque, OrderedDict from datetime import datetime from common.funcs import * from common.layers import * from common.optimizers import * class Planner_separate(): def __init__(self, name, env, state_dim, action_dim): #name:このPl...
Atsuo-Shoji/a2c_continuous_no_framework
Planner_separate.py
Planner_separate.py
py
30,413
python
en
code
1
github-code
1
[ { "api_name": "numpy.ceil", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.sqrt", "line_number": 27, "usage_type": "call" }, { "api_name": "numpy.int", "line_number": 27, "usage_type": "attribute" }, { "api_name": "collections.OrderedDict", "l...
12646195802
from html.parser import HTMLParser from read_site_content import read_site_content import datetime import all_id_pages class HabrPageParser(HTMLParser): bull_title = False bull_user = False bull_hash = False bull_ul = False bull_data = False title='' user = '' data = [] hash = []...
gugry/FogStreamEdu
lesson8_conclusion_of_SQL/HabrPageParser.py
HabrPageParser.py
py
3,580
python
en
code
0
github-code
1
[ { "api_name": "html.parser.HTMLParser", "line_number": 6, "usage_type": "name" }, { "api_name": "datetime.datetime.today", "line_number": 68, "usage_type": "call" }, { "api_name": "datetime.datetime", "line_number": 68, "usage_type": "attribute" }, { "api_name": "...
73800489312
import logging from concurrent.futures import ThreadPoolExecutor from time import sleep from typing import List, Any, Union from django.core.files.uploadedfile import InMemoryUploadedFile from app.forms import UploadFilesForm from app.models import TaxonomyAbundance from app.util.file_parser import parse_taxonomy_fil...
jankod/UMCGMicrobiomeWeb
app/views.py
views.py
py
8,385
python
en
code
0
github-code
1
[ { "api_name": "logging.getLogger", "line_number": 17, "usage_type": "call" }, { "api_name": "app.forms.UploadFilesForm", "line_number": 50, "usage_type": "call" }, { "api_name": "app.util.file_parser.FILE_TYPE_TAXONOMY", "line_number": 57, "usage_type": "name" }, { ...
73698769953
import logging from abc import ABC import tensorflow as tf from detectors.AbstractDetector import AbstractDetector from utils.setup_logger import logger from utils.tensorflow import label_map_util from utils.util import * # Create class logger logger = logging.getLogger('TensorFlowDetector') class TensorFlowDetect...
tdiekel/Video-Object-Detection
detectors/TensorFlowDetector.py
TensorFlowDetector.py
py
5,547
python
en
code
0
github-code
1
[ { "api_name": "utils.setup_logger.logger", "line_number": 12, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "detectors.AbstractDetector.AbstractDetector", "line_number": 15, "usage_type": "name" }, ...
26344566280
#!/usr/bin/env python import rospy from tf2_msgs.msg import TFMessage import tf from tf.transformations import euler_from_quaternion from std_msgs.msg import String from geometry_msgs.msg import PoseStamped import numpy as np # For random numbers import tf import time import math import geometry_msgs.msg class Tran...
max-27/final_project
scripts/transformations.py
transformations.py
py
4,762
python
en
code
1
github-code
1
[ { "api_name": "rospy.Subscriber", "line_number": 24, "usage_type": "call" }, { "api_name": "std_msgs.msg.String", "line_number": 24, "usage_type": "argument" }, { "api_name": "rospy.Subscriber", "line_number": 25, "usage_type": "call" }, { "api_name": "geometry_ms...
28602910056
''' 「検査陽性者の状況」画像から注記を抽出する処理 パターン2 ''' import re import pytesseract import cv2 import numpy as np # 画像内の矩形を抽出 # https://stackoverflow.com/a/60068297 def cropTable(src): hei = src.shape[0] wid = src.shape[1] totalArea = wid * hei original = src.copy() gray = cv2.cvtColor(src, cv2.COLOR_BGR2GRAY) ...
code4nagoya/covid19-aichi-tools
recognize_main_summary_remarks_2.py
recognize_main_summary_remarks_2.py
py
3,539
python
en
code
6
github-code
1
[ { "api_name": "cv2.cvtColor", "line_number": 19, "usage_type": "call" }, { "api_name": "cv2.COLOR_BGR2GRAY", "line_number": 19, "usage_type": "attribute" }, { "api_name": "cv2.threshold", "line_number": 20, "usage_type": "call" }, { "api_name": "cv2.THRESH_BINARY_...
22048125267
from cProfile import label from tkinter import* from tkinter import messagebox from tkinter.filedialog import askopenfilename import os # import win32com.client from pdf2docx import Converter class ventana(Tk): # Constructor def __init__(self,*args,**kwargs): super().__init__(*args,**kwargs) ...
DarguinBarbosa/Convert-pdf---word
convert.py
convert.py
py
2,661
python
es
code
2
github-code
1
[ { "api_name": "tkinter.messagebox.askquestion", "line_number": 19, "usage_type": "call" }, { "api_name": "tkinter.messagebox", "line_number": 19, "usage_type": "name" }, { "api_name": "tkinter.filedialog.askopenfilename", "line_number": 24, "usage_type": "call" }, { ...
11669927645
# 9-13 Practice from collections import OrderedDict word_dict = OrderedDict() word_dict['if'] = "如果" word_dict['else'] = "其他情况" word_dict['for'] = "有限循环" word_dict['while'] = "无限循环" word_dict['raise'] = "抛出异常" word_dict['try'] = "捕获异常" word_dict['catch'] = "处理异常" word_dict['finally'] = "捕获异常之后" word_dict['def'] = "函数"...
bombasticRY/PythonCrashCourse-Chapter1-11
Chapter9/05HM.py
05HM.py
py
1,066
python
en
code
0
github-code
1
[ { "api_name": "collections.OrderedDict", "line_number": 4, "usage_type": "call" }, { "api_name": "random.randint", "line_number": 27, "usage_type": "call" } ]
34024693827
#!/usr/bin/env python """Setup script for installing sofia.""" from setuptools import setup config = { 'name': 'sofia', 'version': '0.0.1', 'description': 'GUI', 'author': 'Danna Xue', 'author email': 'dannaxue@stanford.edu', 'url': 'https://github.com/dannaxue/sofia.git', 'download_url':...
dannaxue/sofia
setup.py
setup.py
py
455
python
en
code
0
github-code
1
[ { "api_name": "setuptools.setup", "line_number": 19, "usage_type": "call" } ]
40891943622
import asyncio from datetime import datetime from aiogram import types from aiogram.utils.markdown import code from init import bot, config, dp from utils import try_sending_message from verify import * from verify import Status # init async def on_startup(app) -> None: """Simple hook for aiohttp application w...
why-not-try-calmer/O-Susie
bot.py
bot.py
py
3,758
python
en
code
0
github-code
1
[ { "api_name": "init.bot.delete_webhook", "line_number": 17, "usage_type": "call" }, { "api_name": "init.bot", "line_number": 17, "usage_type": "name" }, { "api_name": "init.bot.set_webhook", "line_number": 18, "usage_type": "call" }, { "api_name": "init.bot", ...
71372300515
import base64 import datetime import json import re import time from django.db import connection from django.db.models import Q from django.views.decorators.csrf import csrf_exempt from operation.models import AdminLoginLog from src.models import OneSrc from user.models import User, Group from utils.gen_captcha impor...
17-12-20-ll/fun_lib
user/views.py
views.py
py
20,640
python
en
code
0
github-code
1
[ { "api_name": "user.models.User.objects.filter", "line_number": 28, "usage_type": "call" }, { "api_name": "user.models.User.objects", "line_number": 28, "usage_type": "attribute" }, { "api_name": "user.models.User", "line_number": 28, "usage_type": "name" }, { "ap...
22052722472
from django.shortcuts import render, redirect from django.http import HttpResponse, HttpResponseRedirect from django.urls import reverse_lazy from django.views.generic import CreateView from django.contrib.auth.models import User from .models import * from .forms import * # from .api_powerbi import * from django.http ...
WETECH-INNOVATIONS/wetech
Calidad/Apps/indicador/views.py
views.py
py
35,474
python
es
code
0
github-code
1
[ { "api_name": "django.views.generic.CreateView", "line_number": 16, "usage_type": "name" }, { "api_name": "django.urls.reverse_lazy", "line_number": 21, "usage_type": "call" }, { "api_name": "django.http.HttpResponseRedirect", "line_number": 40, "usage_type": "call" }, ...
74496272353
# ================================== # Video Object Detection with YOLOv3 # ================================== # RUN WITH EXAMPLE COMMAND BELOW: # python YOLO_vid.py -i vid_IO/drive.mp4 -o vid_IO/drive_processed.mp4 -y yolov3 import numpy as np import argparse import imutils import time import cv2 import os """User...
Jacklu0831/Real-Time-Object-Detection
1_YOLO/YOLO_vid.py
YOLO_vid.py
py
7,575
python
en
code
1
github-code
1
[ { "api_name": "argparse.ArgumentParser", "line_number": 17, "usage_type": "call" }, { "api_name": "cv2.dnn.readNetFromDarknet", "line_number": 28, "usage_type": "call" }, { "api_name": "cv2.dnn", "line_number": 28, "usage_type": "attribute" }, { "api_name": "os.pa...
72263563554
"""Added switch history Revision ID: b85b82664c28 Revises: 94ccd671cbcd Create Date: 2021-03-26 15:56:26.634107 """ from alembic import op import sqlalchemy as sa from its_on.utils import AwareDateTime # revision identifiers, used by Alembic. revision = 'b85b82664c28' down_revision = '94ccd671cbcd' branch_labels = ...
best-doctor/its_on
db/migrations/versions/b85b82664c28_added_switch_history.py
b85b82664c28_added_switch_history.py
py
1,108
python
en
code
14
github-code
1
[ { "api_name": "alembic.op.create_table", "line_number": 22, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 22, "usage_type": "name" }, { "api_name": "sqlalchemy.Column", "line_number": 23, "usage_type": "call" }, { "api_name": "sqlalchemy.Integ...
38075311961
#!/usr/bin/env python # -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np from matplotlib import animation as animation import math #definindo a classe class Oscilador: #inicialização def __init__(self, lado, x, v): self.m= rob*(lado**3) self.l= lado self.x= x self.v= v #aceleração de...
hugosanc/ProjetoFinal
oscilador.py
oscilador.py
py
2,610
python
pt
code
0
github-code
1
[ { "api_name": "numpy.arange", "line_number": 43, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 44, "usage_type": "call" }, { "api_name": "numpy.zeros", "line_number": 45, "usage_type": "call" }, { "api_name": "matplotlib.pyplot.figure", "...
2574010068
from sdv.model import DataPointFloat, Model class O2WR(Model): """O2WR model. Attributes ---------- Lambda: sensor PID 2x (byte AB) and PID 3x (byte AB) - Lambda for wide range/band oxygen sensor Voltage: sensor PID 2x (byte CD) - Voltage for wide range/band oxygen sensor ...
eclipse-velocitas/vehicle-model-python
sdv_model/OBD/O2WR/__init__.py
__init__.py
py
744
python
en
code
1
github-code
1
[ { "api_name": "sdv.model.Model", "line_number": 4, "usage_type": "name" }, { "api_name": "sdv.model.DataPointFloat", "line_number": 27, "usage_type": "call" }, { "api_name": "sdv.model.DataPointFloat", "line_number": 28, "usage_type": "call" }, { "api_name": "sdv....
13337504275
##평균 제곱 오차 import numpy as np def mean_squared_error(y, t): return 0.5 * np.sum((y-t)**2) t = [0, 0, 1, 0, 0, 0, 0, 0, 0, 0] y = [0.1, 0.05, 0.6, 0.0, 0.05, 0.1, 0.0, 0.1, 0.0, 0.0] print(mean_squared_error(np.array(y), np.array(t))) y = [0.1, 0.05, 0.1, 0.0, 0.05, 0.1, 0.0, 0.6, 0.0, 0.0] print(mean_squared_e...
hongjw1938/machine_learning_study
python_class/deep_learning/deep learning from scratch/neural_network_04.py
neural_network_04.py
py
7,961
python
en
code
0
github-code
1
[ { "api_name": "numpy.sum", "line_number": 5, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 10, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.sum", "line_number": 29, ...
28404000694
import os import pandas as pd import sqlalchemy #Definindo uma string de conexão str_connection = 'sqlite:///{path_to_data}' # Os endereços do projeto e sub-pastas BASE_DIR = os.path.dirname( os.path.dirname(os.path.abspath(__file__))) DATA_DIR = os.path.join(BASE_DIR,'data') # Encontrando os arquivos de dados f...
esrodrigues01/Projetos-em-Python
src/upload_data_local.py
upload_data_local.py
py
802
python
pt
code
0
github-code
1
[ { "api_name": "os.path.dirname", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path", "line_number": 12, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 12, "usage_type": "call" }, { "api_name": "os.path.join", "line...
4017006848
"""Controller class file.""" from gpiozero import Button from time import sleep class Controller(object): def __init__(self, up_pin: int, down_pin: int, left_pin: int, right_pin: int, back_pin: int, enter_pin: int): """ Initialize controller. :param up_pin: pin controlling the UP button ...
Marten-M/GAGMehhatroonikaklubi
src/classes/chessrobot/controller/controller.py
controller.py
py
1,521
python
en
code
0
github-code
1
[ { "api_name": "gpiozero.Button", "line_number": 19, "usage_type": "call" }, { "api_name": "gpiozero.Button", "line_number": 20, "usage_type": "call" }, { "api_name": "gpiozero.Button", "line_number": 21, "usage_type": "call" }, { "api_name": "gpiozero.Button", ...
32184257693
import sys import asyncio from aioconsole import ainput async def input_loop(loop): while True: input_ = await ainput(loop=loop) if input_ == "@end": sys.exit(0) print(f"Echo: {input_}") if __name__ == "__main__": loop = asyncio.get_event_loop() loop.run_until_complete(...
metamarcdw/async-interface
test.py
test.py
py
338
python
en
code
0
github-code
1
[ { "api_name": "aioconsole.ainput", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.exit", "line_number": 9, "usage_type": "call" }, { "api_name": "asyncio.get_event_loop", "line_number": 13, "usage_type": "call" } ]
2417852779
"""Auth urls.""" from django.urls import path from apps.vmc_auth import views app_name = "auth" urlpatterns = [ path("accounts/signup/", views.signup, name="signup"), # path("accounts/signin/", views.signin, name="signin"), path("accounts/signin/", views.LoginView.as_view(), name="signin"), path("acco...
dje-1000111/bacasand
apps/vmc_auth/urls.py
urls.py
py
659
python
en
code
0
github-code
1
[ { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "apps.vmc_auth.views.signup", "line_number": 8, "usage_type": "attribute" }, { "api_name": "apps.vmc_auth.views", "line_number": 8, "usage_type": "name" }, { "api_name": "dja...
71968934434
import telebot from telebot import types bot = telebot.TeleBot('') @bot.message_handler(commands=['start']) def start(message): mess = f'Привет, <b>{message.from_user.first_name} {message.from_user.last_name}</b>' bot.send_message(message.chat.id, mess, parse_mode='html') @bot.message_handler(commands=['webs...
markess/hestiamaks
tgbot.py
tgbot.py
py
1,426
python
ru
code
0
github-code
1
[ { "api_name": "telebot.TeleBot", "line_number": 4, "usage_type": "call" }, { "api_name": "telebot.types.InlineKeyboardMarkup", "line_number": 13, "usage_type": "call" }, { "api_name": "telebot.types", "line_number": 13, "usage_type": "name" }, { "api_name": "teleb...
37276683325
""" --- Day 13: Knights of the Dinner Table --- In years past, the holiday feast with your family hasn't gone so well. Not everyone gets along! This year, you resolve, will be different. You're going to find the optimal seating arrangement and avoid all those awkward conversations. You start by writing up a list of ev...
ochelset/advent-of-code
2015/Day 13/13.py
13.py
py
4,022
python
en
code
0
github-code
1
[ { "api_name": "itertools.permutations", "line_number": 73, "usage_type": "call" } ]
44032736509
from __future__ import annotations import pytest from mocksafe import MockProperty, mock, stub, that class Philosopher: @property def meaning_of_life(self: Philosopher) -> str: return "42" def test_mock_getter_prop(): mock_meaning: MockProperty[str] = MockProperty("") philosopher: Philosoph...
dmayo3/mocksafe
tests/test_props.py
test_props.py
py
1,167
python
en
code
2
github-code
1
[ { "api_name": "mocksafe.MockProperty", "line_number": 13, "usage_type": "name" }, { "api_name": "mocksafe.mock", "line_number": 15, "usage_type": "call" }, { "api_name": "mocksafe.stub", "line_number": 17, "usage_type": "call" }, { "api_name": "pytest.raises", ...
24782913768
import sys import time import numpy as np import logging import tensorflow as tf from os.path import join as pjoin from tqdm import tqdm from evaluate import f1_score, exact_match_score class QaSystemSolver(object): def __init__(self, model, dataset, answers, raw_answers, rev_vocab, **kwargs): self.mod...
jeffrey1hu/context-based-qa-system
core/solver.py
solver.py
py
12,925
python
en
code
3
github-code
1
[ { "api_name": "tensorflow.train", "line_number": 41, "usage_type": "attribute" }, { "api_name": "tensorflow.Variable", "line_number": 43, "usage_type": "call" }, { "api_name": "tensorflow.placeholder", "line_number": 44, "usage_type": "call" }, { "api_name": "tens...
3018933371
# -*- coding: utf-8 -*- """ Training deep convolutional neural networks. Created on Thu Jul 5 11:00:00 2018 Author: Prasun Roy | CVPRU-ISICAL (http://www.isical.ac.in/~cvpr) GitHub: https://github.com/prasunroy/cnn-on-degraded-images """ # imports from __future__ import division from __future__ import print_functio...
prasunroy/cnn-on-degraded-images
train_deepcnn.py
train_deepcnn.py
py
14,364
python
en
code
14
github-code
1
[ { "api_name": "keras.optimizers.sgd", "line_number": 53, "usage_type": "call" }, { "api_name": "keras.optimizers", "line_number": 53, "usage_type": "name" }, { "api_name": "numpy.random.seed", "line_number": 72, "usage_type": "call" }, { "api_name": "numpy.random"...
39159734260
"""Utilities shared across the whole cog""" # Built-in import random import re # Third-party from discord import Color # Local from .embed import create_embed, create_error_embed from .settings import DEFAULT_USER_SETTINGS # -------------------------------------------------------------------------------- # > Consta...
Jordan-Kowal/discord-dice-roller
discord_dice_roller/utils/dice_roll.py
dice_roll.py
py
23,842
python
en
code
0
github-code
1
[ { "api_name": "re.compile", "line_number": 17, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 18, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 19, "usage_type": "call" }, { "api_name": "re.compile", "line_number": 20, ...
75065242274
import dash from dash_core_components.Tabs import Tabs import dash_html_components as html import dash_core_components as dcc from dash.dependencies import Input, Output, State import plotly.express as px import datetime import pandas as pd import base64 # Python scripts import aux_ as aux import tasks import os, sys...
danaecanillas/Calendari_TEA
app/app_nofunciona.py
app_nofunciona.py
py
6,022
python
en
code
0
github-code
1
[ { "api_name": "sys.path.append", "line_number": 15, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 15, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 15, "usage_type": "call" }, { "api_name": "os.path", "line_num...
24142497222
import webapp2 import jinja2 import os from google.appengine.ext import db template_dir = os.path.join(os.path.dirname(__file__), "templates") jinja_env = jinja2.Environment(loader = jinja2.FileSystemLoader(template_dir), autoescape=True) class Entry(db.Model): title = db.StringPr...
johnmccorkell/build-a-blog
main.py
main.py
py
2,398
python
en
code
0
github-code
1
[ { "api_name": "os.path.join", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7, "usage_type": "attribute" }, { "api_name": "os.path.dirname", "line_number": 7, "usage_type": "call" }, { "api_name": "jinja2.Environment", "line...
31093817853
from youtube_transcript_api import YouTubeTranscriptApi from bardapi import Bard import os import requests import pytube #important notes: This tools can only translate upto a 2000 word transript or a 10 minutes videos #using dsdaniel park bardapi #the link: https://github.com/dsdanielpark/Bard-API #code ...
huype1/playing-w-yt-and-bard
YT_translate_to_vietnamese.py
YT_translate_to_vietnamese.py
py
2,807
python
en
code
0
github-code
1
[ { "api_name": "pytube.YouTube", "line_number": 15, "usage_type": "call" }, { "api_name": "youtube_transcript_api.YouTubeTranscriptApi.list_transcripts", "line_number": 20, "usage_type": "call" }, { "api_name": "youtube_transcript_api.YouTubeTranscriptApi", "line_number": 20, ...
42744791584
#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np import pandas as pd import math as mt from IPython.display import Markdown, display def printmd(string): display(Markdown(string)) # In[2]: def DectoBin(num): x = np.absolute(num) Bin = "" for i in range(1,33): if x > 1: ...
shahmeerrajput/WorkOnTensorflowNmpyPandas
DS Project Working.py
DS Project Working.py
py
3,162
python
en
code
0
github-code
1
[ { "api_name": "IPython.display.display", "line_number": 12, "usage_type": "call" }, { "api_name": "IPython.display.Markdown", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.absolute", "line_number": 19, "usage_type": "call" } ]
24946960553
from selenium import webdriver from time import sleep from selenium.webdriver import Keys from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By chrome_options = Options() chrome_options.add_argument("--headless") # Chạy trình duyệt ẩn danh browser = webdriver.Chrome() bro...
Namgiangvt12/Upwork
50.0478-multithread.py
50.0478-multithread.py
py
911
python
en
code
0
github-code
1
[ { "api_name": "selenium.webdriver.chrome.options.Options", "line_number": 9, "usage_type": "call" }, { "api_name": "selenium.webdriver.Chrome", "line_number": 11, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 11, "usage_type": "name" }, { ...
12698763875
import math import soundfile as sf import numpy as np #import librosa data, samplerate = sf.read('sineAmend.wav') channels = len(data.shape) length_s = len(data)/float(samplerate) if (length_s < 6.0): n = math.ceil(6*samplerate/len(data)) if (channels == 2): data = np.tile(data, (n,1)) else: data = np.ti...
Shri-0/Pedalboard-Shri
Py/PedalBoard/Sessions/PB-repeatAudio.py
PB-repeatAudio.py
py
370
python
en
code
0
github-code
1
[ { "api_name": "soundfile.read", "line_number": 7, "usage_type": "call" }, { "api_name": "math.ceil", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.tile", "line_number": 14, "usage_type": "call" }, { "api_name": "numpy.tile", "line_number": 16...
17745879141
import aioitertools import copy class _SampleIterator: _none = object() def __init__(self, sample): self._iters = [iter(t) for t in sample] def __iter__(self): return self def __next__(self): sample = tuple(next(t, self._none) for t in self._iters) if any(map(lambda ...
isushik94/pytorch-data-api
src/torch_data/_ops/_unbatch.py
_unbatch.py
py
1,695
python
en
code
1
github-code
1
[ { "api_name": "copy.deepcopy", "line_number": 19, "usage_type": "call" }, { "api_name": "aioitertools.next", "line_number": 38, "usage_type": "call" } ]
1405363679
import requests import json x = requests.get("https://gist.githubusercontent.com/D-Brox/5ea0d9cec29c4921a9e397163f447646/raw/classes2.txt") e = x.text.split("\n") b = {} for i in e: a = i.split(" = ")[::-1] try: b[a[0]] = a[1] except: print(i) with open("classes.json", "w") as f: json.du...
captain8771-plugins/append-old-classnames
download classnames.py
download classnames.py
py
328
python
en
code
0
github-code
1
[ { "api_name": "requests.get", "line_number": 3, "usage_type": "call" }, { "api_name": "json.dump", "line_number": 13, "usage_type": "call" } ]
29544552626
import time import ssz import py_ecc.bls as bls from eth2.beacon._utils.hash import hash_eth2 from eth2.beacon.on_genesis import ( get_genesis_block, ) from eth2.beacon.state_machines.forks.serenity.blocks import ( SerenityBeaconBlock, ) from eth2.beacon.state_machines.forks.serenity.configs import SERENITY_CO...
hwwhww/trinity
eth2_sim/simulation/run.py
run.py
py
4,210
python
en
code
null
github-code
1
[ { "api_name": "eth2.beacon._utils.hash.hash_eth2", "line_number": 30, "usage_type": "call" }, { "api_name": "sim_config.Config.NUM_VALIDATORS", "line_number": 31, "usage_type": "attribute" }, { "api_name": "sim_config.Config", "line_number": 31, "usage_type": "name" }, ...