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
18570273884
import config import telebot import arxiv import sqlite3 from sqlite3 import Error from time import sleep, ctime bot = telebot.TeleBot(config.token) max_results = 0 theme = '' titles = [] id = [] last = [] def post_sql_query(sql_query): with sqlite3.connect('arxiv.db') as connection: c...
neksharov/arxivbot
bot.py
bot.py
py
4,083
python
ru
code
0
github-code
6
[ { "api_name": "telebot.TeleBot", "line_number": 9, "usage_type": "call" }, { "api_name": "config.token", "line_number": 9, "usage_type": "attribute" }, { "api_name": "sqlite3.connect", "line_number": 18, "usage_type": "call" }, { "api_name": "sqlite3.Error", "...
20649396402
import cv2 import numpy as np from deepface import DeepFace from sklearn.cluster import DBSCAN from imutils import build_montages from tensorflow.keras.models import Model from tensorflow.keras.applications.vgg16 import VGG16 from tensorflow.keras.preprocessing.image import load_img from tensorflow.keras.applications.v...
huwprosser/cluster-fk
Clustering.py
Clustering.py
py
4,121
python
en
code
10
github-code
6
[ { "api_name": "numpy.where", "line_number": 24, "usage_type": "call" }, { "api_name": "numpy.random.choice", "line_number": 25, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 25, "usage_type": "attribute" }, { "api_name": "cv2.imread", "l...
7005842827
import numpy as np import pandas as pd import torch from torchvision import transforms import skvideo.io def fix_shape(ten_cropped): from torchvision.transforms.functional import Tensor ten_cropped = Tensor(ten_cropped) ten_cropped = ten_cropped.permute(1,0,2,3,4) ten_cropped = np.array(ten_cropped) ...
Anas-Abd-ElAziz/Realtime-Anomaly-Detection
app/I3D/ten_crop.py
ten_crop.py
py
813
python
en
code
3
github-code
6
[ { "api_name": "torchvision.transforms.functional.Tensor", "line_number": 9, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 11, "usage_type": "call" }, { "api_name": "skvideo.io.io.vread", "line_number": 14, "usage_type": "call" }, { "api_name"...
72531202109
import re from pathlib import Path from tempfile import TemporaryDirectory from typing import Dict, List from ..models import RegistryEndpointModel, RepoModel DOCKER_LOGIN: str = ( "echo ${SCCI_TARGET_REGISTRY_PASSWORD} | " "docker login ${SCCI_TARGET_REGISTRY_ADDRESS} --username ${SCCI_TARGET_REGISTRY_USER} ...
ITISFoundation/ci-service-integration-library
src/docker_publisher_osparc_services/gitlab_ci_setup/commands.py
commands.py
py
2,766
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 13, "usage_type": "name" }, { "api_name": "models.RepoModel", "line_number": 42, "usage_type": "name" }, { "api_name": "typing.Dict", "line_number": 43, "usage_type": "name" }, { "api_name": "models.RegistryEndpointModel...
833239822
""" function to compute SSRT requires a data frame with the following variables: trialType: 1=stop, 0=go (can use either 1/0 or stop/go) goRT: response time, should be nan for omissions or successful stop trials SSD: stop signal delay for that trial (nan for go trials) signalRespond: 1 for signal respond trials, 0 fo...
poldrack/open_science_examples
IID/analysis/get_SSRT.py
get_SSRT.py
py
4,520
python
en
code
1
github-code
6
[ { "api_name": "numpy.random.RandomState", "line_number": 30, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 30, "usage_type": "attribute" }, { "api_name": "numpy.hstack", "line_number": 36, "usage_type": "call" }, { "api_name": "numpy.zeros",...
73819785146
from typing import List from framework.data.io_relations.dirs import many_to_one from framework.data import fs_utils import pandas as p from framework.data.thread_timing import ThreadTimer import numpy as np def feat_maps(df: p.DataFrame, params: dict) -> None: print("FeatMaps generation") tt = Thre...
GAntonacci95/room_shape_classification
src/eg/features/post_processing/eg_stack.py
eg_stack.py
py
2,373
python
en
code
1
github-code
6
[ { "api_name": "pandas.DataFrame", "line_number": 9, "usage_type": "attribute" }, { "api_name": "framework.data.thread_timing.ThreadTimer", "line_number": 11, "usage_type": "call" }, { "api_name": "framework.data.fs_utils.get_dir_filenames", "line_number": 13, "usage_type"...
32943352874
import h5py from .dtypes import * def initHDF5File(fileName): with h5py.File(fileName, 'w') as f: f.create_dataset('segments', (0,), dtype = segments_dtype, maxshape = (None,)) f.create_dataset('trajectories', (0,), dtype ...
DanielMDouglas/fakedep
fakedep/h5utils.py
h5utils.py
py
1,264
python
en
code
0
github-code
6
[ { "api_name": "h5py.File", "line_number": 6, "usage_type": "call" }, { "api_name": "h5py.File", "line_number": 19, "usage_type": "call" } ]
11466683281
from . import models import keras import pandas as pd from data_processing import binary_encode from sklearn.model_selection import train_test_split, ParameterGrid early_stopping = keras.callbacks.EarlyStopping(monitor='val_loss', min_delta=0, patience=2, verbose=0, ...
ailiasi/Drafter
neuralnetwork/evaluate_models.py
evaluate_models.py
py
4,916
python
en
code
0
github-code
6
[ { "api_name": "keras.callbacks.EarlyStopping", "line_number": 7, "usage_type": "call" }, { "api_name": "keras.callbacks", "line_number": 7, "usage_type": "attribute" }, { "api_name": "pandas.read_csv", "line_number": 12, "usage_type": "call" }, { "api_name": "data...
34191741476
#!/usr/bin/env python from __future__ import print_function import argparse from collections import namedtuple from functools import partial from pkg_resources import resource_filename import sys from socket import error as socket_error from .lookups import OnionServiceLookup from . import (config_handlers, custom_exce...
kargig/onionrouter
onionrouter/onionrouter.py
onionrouter.py
py
5,665
python
en
code
null
github-code
6
[ { "api_name": "pkg_resources.resource_filename", "line_number": 20, "usage_type": "call" }, { "api_name": "collections.namedtuple", "line_number": 22, "usage_type": "call" }, { "api_name": "lookups.OnionServiceLookup", "line_number": 34, "usage_type": "call" }, { ...
88548250
import torch x = torch.ones(2, 2, requires_grad=True) print(x) y = x + 2 print(y) z = y * y * 3 out = z.mean() print(z, out) out.backward() print(x.grad) x = torch.randn(3, requires_grad=True) y = x * 2 while y.data.norm() < 1000: y = y * 2 print(y) v = torch.tensor([0.1, 1.0, 0.0001], dtype=torch.float) ...
abgoswam/CS224N-Natural-Language-Processing-with-Deep-Learning
trials/pytorch_autograd_tutorial2.py
pytorch_autograd_tutorial2.py
py
348
python
en
code
18
github-code
6
[ { "api_name": "torch.ones", "line_number": 3, "usage_type": "call" }, { "api_name": "torch.randn", "line_number": 18, "usage_type": "call" }, { "api_name": "torch.tensor", "line_number": 26, "usage_type": "call" }, { "api_name": "torch.float", "line_number": 2...
906679513
import argparse import sys import logging import os from gptwntranslator.command import run_export_chapters, run_scrape_chapters, run_scrape_metadata, run_translate_chapters, run_translate_metadata from gptwntranslator.helpers.config_helper import Config from gptwntranslator.helpers.logger_helper import CustomLogger, S...
combobulativedesigns/gptwntranslator
src/gptwntranslator/__main__.py
__main__.py
py
11,786
python
en
code
18
github-code
6
[ { "api_name": "sys.argv", "line_number": 93, "usage_type": "attribute" }, { "api_name": "sys.exit", "line_number": 95, "usage_type": "call" }, { "api_name": "argparse.ArgumentParser", "line_number": 97, "usage_type": "call" }, { "api_name": "sys.exit", "line_n...
16312893126
from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By import pandas as pd navegador = webdriver.SChrome() navegador.get('https://www.google.com.br') navegador.find_element(By.XPATH, '/html/body/div[1]/div[3]/form/div[1]/div[1...
igorfreits/Studies-Python
Hashtag-Treinamentos/Intensivão de Python [Aula 3].py
Intensivão de Python [Aula 3].py
py
2,124
python
pt
code
1
github-code
6
[ { "api_name": "selenium.webdriver.SChrome", "line_number": 6, "usage_type": "call" }, { "api_name": "selenium.webdriver", "line_number": 6, "usage_type": "name" }, { "api_name": "selenium.webdriver.common.by.By.XPATH", "line_number": 10, "usage_type": "attribute" }, {...
39509936039
import argparse from cifar.dataset import get_default_device from ner.dataset import get_data_loaders from ner.model import BiLSTM, BiLSTM_CRF from ner.train import train, train_crf # python3 train_ner.py --initialization glove --char_embeddings 1 --layer_normalization 1 --crf 1 # --output_file trained_model...
aps1310/COL_870
Assignment 1/2020MCS2448_2020MCS2468/train_ner.py
train_ner.py
py
3,297
python
en
code
0
github-code
6
[ { "api_name": "argparse.ArgumentParser", "line_number": 12, "usage_type": "call" }, { "api_name": "cifar.dataset.get_default_device", "line_number": 34, "usage_type": "call" }, { "api_name": "ner.dataset.get_data_loaders", "line_number": 36, "usage_type": "call" }, { ...
37379383336
import os, random import numpy as np from PIL import Image from torch.utils import data # from dataloaders import custom_transforms as tr import rasterio from rasterio.enums import Resampling import torch import torchvision.transforms.functional as TF def twoTrainSeg(args, root=Path.db_root_dir('gid')): images_ba...
faye0078/RS-ImgShp2Dataset
train_example/model/Fast_NAS/data/gid.py
gid.py
py
8,697
python
en
code
1
github-code
6
[ { "api_name": "os.path.join", "line_number": 13, "usage_type": "call" }, { "api_name": "os.path", "line_number": 13, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 1...
40344726364
import requests from bs4 import BeautifulSoup LIMIT=10 URL=f"https://kr.indeed.com/jobs?q=python&l=%EC%9D%B8%EC%B2%9C+%EC%86%A1%EB%8F%84%EB%8F%99&limit={LIMIT}" def get_last_page(): result=requests.get(URL) soup=BeautifulSoup(result.text,"html.parser") pagination=soup.find("div",{"class":"pagination"}) lin...
glauke1996/doForFun
Job_scrapper/indeed.py
indeed.py
py
2,293
python
en
code
0
github-code
6
[ { "api_name": "requests.get", "line_number": 9, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "line_number": 11, "usage_type": "call" }, { "api_name": "requests.get", "line_number": 52, "usage_type": "call" }, { "api_name": "bs4.BeautifulSoup", "l...
26251770696
import os import sys import shutil import time import logging import torch import torch.utils.data as data import torch.nn as nn import torchvision.transforms as transforms from utils.metric import AverageMeter, Loss, constraints_loss from test import test from config import data_config, network_config, lr_scheduler, g...
TencentYoutuResearch/PersonReID-NAFS
train.py
train.py
py
7,299
python
en
code
61
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 25, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 26, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 29, "usage_type": "call" }, { "api_name": "os.path", "line_...
4758299475
import sys from typing import TextIO, Optional, List import click from . import common from .root import cli from gambit.query import QueryParams, QueryInput, query, query_parse from gambit.util.progress import progress_config from gambit.sigs import load_signatures from gambit._cython.threads import omp_set_num_thre...
jlumpe/gambit
gambit/cli/query.py
query.py
py
2,781
python
en
code
16
github-code
6
[ { "api_name": "gambit.results.csv.CSVResultsExporter", "line_number": 17, "usage_type": "call" }, { "api_name": "gambit.results.json.JSONResultsExporter", "line_number": 21, "usage_type": "call" }, { "api_name": "gambit.results.archive.ResultsArchiveWriter", "line_number": 25...
36159834178
#PyQt Imports from PyQt5.QtWidgets import QPushButton, QHBoxLayout, QVBoxLayout, QCheckBox, QMessageBox, QHeaderView from PyQt5.Qt import QTableWidget, QTableWidgetItem, QButtonGroup, QRadioButton, QLineEdit from PyQt5.QtCore import Qt from TraceDocks import TraceDocks from SnifferAPI import * ## @package TableTab # T...
Penlane/Tracesniffer-GUI
Docks/TableTab.py
TableTab.py
py
14,303
python
en
code
25
github-code
6
[ { "api_name": "TraceDocks.TraceDocks", "line_number": 15, "usage_type": "name" }, { "api_name": "PyQt5.QtWidgets.QVBoxLayout", "line_number": 43, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QHBoxLayout", "line_number": 44, "usage_type": "call" }, { "api...
41896885949
from typing import Any, Optional import torch import torch.nn as nn import pytorch_lightning as pl from dataloader.dataloader import ClassificationDataset from torch.utils.data import DataLoader # from torchvision import transforms import wandb from torch.nn import functional as F import torchvision.models as models fr...
kaverigoel/classifierpipeline-kafka
models/ResNet.py
ResNet.py
py
5,042
python
en
code
0
github-code
6
[ { "api_name": "pytorch_lightning.LightningModule", "line_number": 14, "usage_type": "attribute" }, { "api_name": "typing.Any", "line_number": 15, "usage_type": "name" }, { "api_name": "torchvision.models.resnet18", "line_number": 17, "usage_type": "call" }, { "api...
3499710279
from collections import Counter from typing import List class Solution: def topKFrequent(self, nums: List[int], k: int) -> List[int]: # Sort hashmap of occurrences with a heap, O(n log k) if k < n else O(n log n), O(n + k) # count = defaultdict(int) # for num in nums: # count[n...
maxpetretta/leetcode
top-k-frequent-elements.py
top-k-frequent-elements.py
py
2,564
python
en
code
1
github-code
6
[ { "api_name": "typing.List", "line_number": 6, "usage_type": "name" }, { "api_name": "collections.Counter", "line_number": 59, "usage_type": "call" } ]
5762245073
import os import sys import logging scriptPath = os.path.dirname(os.path.abspath(__file__)) projRootPath = os.path.abspath( os.path.join(scriptPath , os.path.join('..', '..'))) sys.path.append(projRootPath) from pydub import AudioSegment import scipy import csv from src.utils.console_functions im...
mariusdgm/AudioMining
src/sample_mixing/sound_mixing.py
sound_mixing.py
py
3,961
python
en
code
0
github-code
6
[ { "api_name": "os.path.dirname", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path", "line_number": 5, "usage_type": "attribute" }, { "api_name": "os.path.abspath", "line_number": 5, "usage_type": "call" }, { "api_name": "os.path.abspath", "line...
1004797150
# -*- coding: utf-8 -*- """ Created on Fri Jan 11 20:06:31 2019 @author: saksake """ import sys import numpy as np import pandas as pd import seaborn as sns import tensorflow as tf from sklearn.datasets import load_boston import matplotlib.pyplot as plt def datasets() : # LOAD BOSTON HOUSING DATASET boston = ...
rofiqq/Machine-Learning
High_API/regressor/boston_housing/boston_housing_keras.py
boston_housing_keras.py
py
7,510
python
en
code
0
github-code
6
[ { "api_name": "sklearn.datasets.load_boston", "line_number": 17, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 30, "usage_type": "call" }, { "api_name": "pandas.cut", "line_number": 89, "usage_type": "call" }, { "api_name": "tensorflow.k...
34760418233
from pyfiglet import Figlet import qrcode RRODUCT = [] flag = 1 def ADD(): new_product = input('Enter product Code, Name , Price, Amount: ') new_product = new_product.replace(' ', ',') myfile = open('database', 'a') myfile.write('\n') myfile.write(new_product) # myfile = open('da...
Hoda-Shad/Python
Assignment6/main.py
main.py
py
6,176
python
en
code
4
github-code
6
[ { "api_name": "qrcode.make", "line_number": 21, "usage_type": "call" }, { "api_name": "pyfiglet.Figlet", "line_number": 153, "usage_type": "call" } ]
26112407225
__authors__ = ["H. Payno"] __license__ = "MIT" __date__ = "23/07/2019" from silx.gui import qt from silx.gui.plot.tools.roi import RegionOfInterestManager from silx.gui.plot.tools.roi import RegionOfInterestTableWidget from silx.gui.plot.items.roi import RectangleROI, PolygonROI, ArcROI from silx.gui.plot import Plot2...
silx-kit/silx
examples/plotROIStats.py
plotROIStats.py
py
10,801
python
en
code
106
github-code
6
[ { "api_name": "threading.Thread", "line_number": 23, "usage_type": "attribute" }, { "api_name": "time.sleep", "line_number": 41, "usage_type": "call" }, { "api_name": "silx.gui.utils.concurrent.submitToQtMainThread", "line_number": 43, "usage_type": "call" }, { "a...
71503036028
#!/usr/bin/env python # coding=utf-8 import xlrd,sys,os ios_project_dir='../../frameworks/runtime-src/proj.ios_mac/ios' localizableFileName='Localizable.strings' IOS_FILE_DICT={ u'中文':'zh-Hans.lproj', u'English':'en.lproj', u'FR':'fr.lproj', u'IT':'it.lproj', u'Deutsch':'de.lproj', u'ES':'es.lproj', u'BRPT':'p...
kusukk/bird
tools/languageTranslate/trans.py
trans.py
py
2,438
python
en
code
0
github-code
6
[ { "api_name": "sys.argv", "line_number": 22, "usage_type": "attribute" }, { "api_name": "os.path.exists", "line_number": 31, "usage_type": "call" }, { "api_name": "os.path", "line_number": 31, "usage_type": "attribute" }, { "api_name": "xlrd.open_workbook", "l...
18598169295
from __future__ import annotations from data_access.dto import SportDTO from typing import TYPE_CHECKING if TYPE_CHECKING: from fake_lib.providers import ( SportProvider, RandomValueFromListProvider ) class SportFactory: def __init__( self, sport_provider: SportProv...
pyteacher123/py35-onl
sports_db_project/populate_db/factories/sport.py
sport.py
py
649
python
en
code
2
github-code
6
[ { "api_name": "typing.TYPE_CHECKING", "line_number": 4, "usage_type": "name" }, { "api_name": "fake_lib.providers.SportProvider", "line_number": 14, "usage_type": "name" }, { "api_name": "fake_lib.providers.RandomValueFromListProvider", "line_number": 15, "usage_type": "n...
31965995131
from fastapi import HTTPException, status, UploadFile, File from passlib.context import CryptContext from config.db import userCollection, notification_collection from utils import regex_check from utils.user_utils import get_user_from_user_id from log import logger from pyuploadcare.client import Uploadcare # import y...
ikarus-puneet/user-testing
utils/user_information_utils.py
user_information_utils.py
py
13,998
python
en
code
0
github-code
6
[ { "api_name": "log.logger", "line_number": 20, "usage_type": "name" }, { "api_name": "logging.getLogger", "line_number": 20, "usage_type": "call" }, { "api_name": "log.logger.setLevel", "line_number": 21, "usage_type": "call" }, { "api_name": "log.logger", "li...
38777276926
from xlrd import open_workbook import pandas as pd import sys p = 'd:\\projects\\ysdd.xlsm' w = 'total.xls' p = sys.argv[1] wb = open_workbook(p) table = {} for s in wb.sheets(): date = s.name for row in range(s.nrows): name = s.cell(row, 0).value value = s.cell(row, 3).value if nam...
maxwell-lv/MyQuant
ysdd.py
ysdd.py
py
518
python
en
code
0
github-code
6
[ { "api_name": "sys.argv", "line_number": 9, "usage_type": "attribute" }, { "api_name": "xlrd.open_workbook", "line_number": 12, "usage_type": "call" }, { "api_name": "pandas.DataFrame.from_dict", "line_number": 22, "usage_type": "call" }, { "api_name": "pandas.Dat...
27598188328
from django.shortcuts import render,get_object_or_404 from django.views.generic import ListView,CreateView,UpdateView from .models import Post,Comment,Like from django.template.defaultfilters import register from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required from dj...
Abhishekvaish/BlogShare
blog/views.py
views.py
py
4,948
python
en
code
3
github-code
6
[ { "api_name": "django.template.defaultfilters.register.filter", "line_number": 13, "usage_type": "call" }, { "api_name": "django.template.defaultfilters.register", "line_number": 13, "usage_type": "name" }, { "api_name": "django.template.defaultfilters.register.filter", "line...
22187102734
from PIL import Image import os import cv2 gt_path = "/media/kaan/Sata/Datasets/Robotaksi/GermanTrafficSignDetectionBenchmark/gt.txt" ds_path = "/media/kaan/Sata/Datasets/Robotaksi/GermanTrafficSignDetectionBenchmark/" output_path_img = "/home/kaan/Desktop/german_yolo/img/" output_path_label = "/home/kaan/Desktop/ger...
musaceylan/handy_codes
gtsdb_to_yolo.py
gtsdb_to_yolo.py
py
2,215
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path", "line_number": 17, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 18, "usage_type": "call" }, { "api_name": "os.path", "line_number": 1...
71964992829
"""Identify issues that need triage.""" from code_intelligence import graphql from code_intelligence import util import datetime from dateutil import parser as dateutil_parser import fire import json import logging import os import numpy as np import pprint import retrying import json PROJECT_CARD_ID = os.getenv('INP...
kubeflow/code-intelligence
py/issue_triage/triage.py
triage.py
py
21,438
python
en
code
55
github-code
6
[ { "api_name": "os.getenv", "line_number": 16, "usage_type": "call" }, { "api_name": "code_intelligence.graphql.unpack_and_split_nodes", "line_number": 48, "usage_type": "call" }, { "api_name": "code_intelligence.graphql", "line_number": 48, "usage_type": "name" }, { ...
24178461263
### encoding: utf8 ### from pymongo import MongoClient from settings import MONGO_SERVER # TODO: put it somewhere else. INFLATION = {1992: 2.338071159424868, 1993: 2.1016785142253185, 1994: 1.8362890269054741, 1995: 1.698638328862775, 1996: 1.5360153664058611, 1997: 1.4356877762122495, 1998: 1.3217305991625745, ...
idoivri/localbudgets-v2
server/models.py
models.py
py
3,645
python
en
code
5
github-code
6
[ { "api_name": "pymongo.MongoClient", "line_number": 47, "usage_type": "call" }, { "api_name": "settings.MONGO_SERVER", "line_number": 47, "usage_type": "argument" } ]
12240066351
#!/usr/bin/python3 import pytest from brownie import accounts, compile_source module_source = """ pragma solidity 0.4.25; contract TestModule { address owner; constructor(address _owner) public { owner = _owner; } function getOwner() external view returns (address) { return owner; } function getP...
zerolawtech/ZAP-Tech
tests/OrgCode/Modular/test_attach_detach.py
test_attach_detach.py
py
3,507
python
en
code
27
github-code
6
[ { "api_name": "brownie.compile_source", "line_number": 35, "usage_type": "call" }, { "api_name": "pytest.fixture", "line_number": 33, "usage_type": "call" }, { "api_name": "brownie.accounts", "line_number": 40, "usage_type": "name" }, { "api_name": "pytest.fixture...
4148554485
import os import sys import logging import yaml import openai import speech_recognition as sr from gtts import gTTS from subprocess import run from UserInput import UserInput from openai_module import OpenAI from AudioProcessor import AudioProcessor class Sabia: def __init__(self, config_file): self.config...
jbhntr861/Sabia
sabia.py
sabia.py
py
1,955
python
en
code
6
github-code
6
[ { "api_name": "AudioProcessor.AudioProcessor", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 38, "usage_type": "call" }, { "api_name": "os.path", "line_number": 38, "usage_type": "attribute" }, { "api_name": "yaml.safe_l...
42742864161
# -*- coding: utf-8 -*- # @Time : 2020/3/30 11:06 # @Author : Hui Wang import numpy as np import tqdm import random import torch import torch.nn as nn from torch.optim import Adam from utils import recall_at_k, ndcg_k, get_metric class Trainer: def __init__(self, model, train_dataloader, e...
aHuiWang/CIKM2020-S3Rec
trainers.py
trainers.py
py
12,589
python
en
code
66
github-code
6
[ { "api_name": "torch.cuda.is_available", "line_number": 22, "usage_type": "call" }, { "api_name": "torch.cuda", "line_number": 22, "usage_type": "attribute" }, { "api_name": "torch.device", "line_number": 23, "usage_type": "call" }, { "api_name": "torch.optim.Adam...
43622972980
# -*- coding: utf-8 -*- import argparse import sys from pathlib import Path from loguru import logger try: import gi gi.require_version('PangoCairo', '1.0') gi.require_version('Gtk', '3.0') gi.require_version('Gdk', '3.0') from gi.repository import Gdk, Gtk except (ValueError, ImportError): r...
thermitegod/mcomix-lite
mcomix/main.py
main.py
py
2,203
python
en
code
2
github-code
6
[ { "api_name": "gi.require_version", "line_number": 11, "usage_type": "call" }, { "api_name": "gi.require_version", "line_number": 12, "usage_type": "call" }, { "api_name": "gi.require_version", "line_number": 13, "usage_type": "call" }, { "api_name": "argparse.Arg...
32644528797
import json from mgear.core import widgets from mgear.shifter.game_tools_fbx import fbx_export_node EXPORT_NODE_NAME = "mgearFbxExportNode" class ExporterSettingsManager(widgets.WidgetSettingsManager): PARTITIONS = "partitions" ANIM_CLIPS = "anim_clips" def __init__(self, ui_name, parent=None): ...
mgear-dev/mgear4
release/scripts/mgear/shifter/game_tools_fbx/settings_manager.py
settings_manager.py
py
1,785
python
en
code
209
github-code
6
[ { "api_name": "mgear.core.widgets.WidgetSettingsManager", "line_number": 10, "usage_type": "attribute" }, { "api_name": "mgear.core.widgets", "line_number": 10, "usage_type": "name" }, { "api_name": "mgear.shifter.game_tools_fbx.fbx_export_node.FbxExportNode.get", "line_numbe...
23007644152
#!/usr/bin/env python # """ Interface to Dark Matter spectra """ import sys import yaml import numpy as np from astropy.table import Table, Column import astropy.io.fits as pf from dmsky.priors import create_prior_functor from fermipy import castro from fermipy import fits_utils from fermipy.utils import load_ya...
fermiPy/dmpipe
dmpipe/dm_spectral_utils.py
dm_spectral_utils.py
py
44,739
python
en
code
0
github-code
6
[ { "api_name": "fermipy.castro.CastroData_Base", "line_number": 33, "usage_type": "attribute" }, { "api_name": "fermipy.castro", "line_number": 33, "usage_type": "name" }, { "api_name": "fermipy.spectrum.DMFitFunction.channel_rev_map", "line_number": 106, "usage_type": "at...
24622919209
#!/usr/bin/python3 # -*- coding: utf-8 -*- from setuptools import setup from os import path myPath = path.abspath(path.dirname(__file__)) with open(path.join(myPath, "README.md"), encoding="utf-8") as f: README = f.read() setup( name="kurdish", version="1.1.5", author="Dolan Hêriş", ...
0xdolan/kurdish
setup.py
setup.py
py
1,777
python
en
code
32
github-code
6
[ { "api_name": "os.path.abspath", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path", "line_number": 8, "usage_type": "name" }, { "api_name": "os.path.dirname", "line_number": 8, "usage_type": "call" }, { "api_name": "os.path.join", "line_number"...
10128481024
import random import time import matplotlib.pyplot as plt import numpy as np import time import math class Node(): def __init__(self, loc, time): self.loc = loc self.t = time def __sub__(self, other): return abs(self.loc - other.loc) def __str__(self): return f"Node:l({sel...
CaptainZidgel/poppyseed
pop.py
pop.py
py
7,185
python
en
code
0
github-code
6
[ { "api_name": "time.time", "line_number": 111, "usage_type": "call" }, { "api_name": "random.seed", "line_number": 114, "usage_type": "call" }, { "api_name": "random.random", "line_number": 120, "usage_type": "call" }, { "api_name": "random.seed", "line_number...
36379020828
import os from sqlite3 import DatabaseError from matplotlib.axis import XAxis import numpy as np import clr import sys import ctypes import json import pandas as pd import matplotlib.pyplot as plt from pyqtgraph.Qt import QtCore,QtGui from pyqtgraph.graphicsItems.PlotDataItem import dataType import pyqtgraph.opengl as ...
jimmyzhang0408/OpenView_for_NDT
getting_AScan_raw_data/plot_AscanPlot_with_gate.py
plot_AscanPlot_with_gate.py
py
7,836
python
en
code
2
github-code
6
[ { "api_name": "clr.FindAssembly", "line_number": 19, "usage_type": "call" }, { "api_name": "clr.AddReference", "line_number": 20, "usage_type": "call" }, { "api_name": "clr.FindAssembly", "line_number": 21, "usage_type": "call" }, { "api_name": "clr.AddReference",...
74492955386
"""Helper file. NOTE: THIS FILE WAS USED AS A HELPER FILE DURING DEVELOPMENT OF THE PIPELINE. IT IS NOT INTEGRATED WITHIN THE PIPELINE. """ import glob import json import os # number extraction is hard coded. Better idea would be to delimitate order index from the filename # by a "_" sorted_frames = sorted( [os....
porscheofficial/speed-estimation-traffic-monitoring
speed_estimation/modules/streaming/capturing/frames_to_json.py
frames_to_json.py
py
695
python
en
code
12
github-code
6
[ { "api_name": "os.path.basename", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path", "line_number": 14, "usage_type": "attribute" }, { "api_name": "glob.glob", "line_number": 14, "usage_type": "call" }, { "api_name": "os.path.join", "line_numb...
8352308944
# standard libraries import sys import asyncio import functools # dependencies from PyQt5.QtWidgets import QApplication from PyQt5.QtCore import Qt import qasync # local modules from window import Window async def main(): ''' required by qasync ''' def close_future(future, loop): loop.call_l...
rexosorous/Rat-Looter-2
app.py
app.py
py
810
python
en
code
1
github-code
6
[ { "api_name": "asyncio.get_event_loop", "line_number": 23, "usage_type": "call" }, { "api_name": "asyncio.Future", "line_number": 24, "usage_type": "call" }, { "api_name": "qasync.QApplication.instance", "line_number": 26, "usage_type": "call" }, { "api_name": "qa...
27750915763
# coding=utf-8 import json # import logging # import sys from datetime import date, datetime, timedelta from decimal import Decimal from functools import partial import requests from flask import Flask, Response, make_response from requests.exceptions import Timeout # sys.stdout = sys.stderr # logging.basicConfig(st...
songbaixin18/aiquanzhanServer
flask_app.py
flask_app.py
py
2,486
python
en
code
0
github-code
6
[ { "api_name": "json.JSONEncoder", "line_number": 18, "usage_type": "attribute" }, { "api_name": "datetime.datetime", "line_number": 20, "usage_type": "argument" }, { "api_name": "datetime.date", "line_number": 22, "usage_type": "argument" }, { "api_name": "decimal...
30408355943
import word_set as ws, os, time import matplotlib.pyplot as plt time_lst = [] amount_of_words_lst = [1000,2000,3000,4000,5000] path1k ='C:/Users\Mikael/python_courses/1DT901/mg223tm_groupproj/part4/words_for_graph/1k.txt' path2k ='C:/Users\Mikael/python_courses/1DT901/mg223tm_groupproj/part4/words_for_graph/...
atakanoc/english-language-analysis
part4/hashing_graph.py
hashing_graph.py
py
2,613
python
en
code
0
github-code
6
[ { "api_name": "word_set.new_empty_set", "line_number": 16, "usage_type": "call" }, { "api_name": "time.time", "line_number": 17, "usage_type": "call" }, { "api_name": "word_set.add_with_full", "line_number": 24, "usage_type": "call" }, { "api_name": "time.time", ...
75163508666
# -*- coding: utf-8 -*- from flask import redirect, url_for, render_template, Blueprint from flask_security import current_user from . import route from dxc.app.models.carpool import CarpoolForm from dxc.services import api_carpool bp = Blueprint('carpool', __name__, template_folder='templates', static_folder='stati...
cash2one/Luyasi-Flask
dxc/app/frontend/carpool.py
carpool.py
py
1,866
python
en
code
0
github-code
6
[ { "api_name": "flask.Blueprint", "line_number": 10, "usage_type": "call" }, { "api_name": "dxc.app.models.carpool.CarpoolForm", "line_number": 16, "usage_type": "call" }, { "api_name": "flask_security.current_user.get_id", "line_number": 19, "usage_type": "attribute" },...
71577889787
import os from aqt import mw addon_folder_abs_path = os.path.dirname(__file__) css_folder = os.path.join(addon_folder_abs_path, "css") user_files_folder = os.path.join(addon_folder_abs_path, "user_files") def get_anki_version(): try: # 2.1.50+ because of bdd5b27715bb11e4169becee661af2cb3d91a443, https:...
langfield/syntax-highlighting
config.py
config.py
py
1,313
python
en
code
0
github-code
6
[ { "api_name": "os.path.dirname", "line_number": 6, "usage_type": "call" }, { "api_name": "os.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "os.path.join", "line_number": 7, "usage_type": "call" }, { "api_name": "os.path", "line_number": 7...
31492509396
#!/bin/env python import boto3 import pandas as pd import os import sys import json import qwl_functions GTM_ENDPOINT_NAME = os.environ['GTM_ENDPOINT_NAME'] MODEL_TIME_STAMP = os.environ['MODEL_TIME_STAMP'] def lambda_handler(event, context): response_json = { "output":[]} print("Received event: " + ...
suryaprathapk/lambda_drl_price_model
lambda_function.py
lambda_function.py
py
4,414
python
en
code
0
github-code
6
[ { "api_name": "os.environ", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.environ", "line_number": 10, "usage_type": "attribute" }, { "api_name": "json.dumps", "line_number": 16, "usage_type": "call" }, { "api_name": "json.loads", "line_numb...
44680352754
import vec3 import ray import hittable from utils import rand_double from abc import ABC, abstractmethod from dataclasses import dataclass import numpy as np import texture class material(ABC): @abstractmethod def scatter(self, r_in: ray, rec: hittable): pass class lambertian: ...
Yunchun/Ray-Tracing
material.py
material.py
py
3,619
python
en
code
1
github-code
6
[ { "api_name": "abc.ABC", "line_number": 10, "usage_type": "name" }, { "api_name": "abc.abstractmethod", "line_number": 11, "usage_type": "name" }, { "api_name": "vec3.add", "line_number": 22, "usage_type": "call" }, { "api_name": "vec3.random_unit_vec", "line_...
72532099069
""" Overrides models in fastapi_pagination Usage: from fastapi_pagination.api import create_page from ...models.pagination import LimitOffsetPage, LimitOffsetParams """ from collections.abc import Sequence from typing import Any, ClassVar, Generic, TypeAlias, TypeVar from fastapi_pagination.limit_offset imp...
ITISFoundation/osparc-simcore
services/api-server/src/simcore_service_api_server/models/pagination.py
pagination.py
py
2,217
python
en
code
35
github-code
6
[ { "api_name": "typing.TypeVar", "line_number": 24, "usage_type": "call" }, { "api_name": "fastapi_pagination.links.limit_offset.LimitOffsetPage.with_custom_options", "line_number": 27, "usage_type": "call" }, { "api_name": "fastapi_pagination.links.limit_offset.LimitOffsetPage", ...
33490477312
import logging import os from typing import List import pymongo.collection from dotenv import load_dotenv from pymongo import MongoClient, common from .fetch import FetchData from .structure import Lecture logger = logging.getLogger(__name__) load_dotenv() class OperateMongoDB: def __init__( self, ...
murakami10/crawling-naist-lecture
src/crawling_naist_syllabus/operatedb.py
operatedb.py
py
3,219
python
en
code
0
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 12, "usage_type": "call" }, { "api_name": "dotenv.load_dotenv", "line_number": 13, "usage_type": "call" }, { "api_name": "os.getenv", "line_number": 20, "usage_type": "call" }, { "api_name": "os.getenv", "line_...
26251784146
import torch import torch.nn as nn import torch.nn.functional as F import math import numpy as np import logging from torch.nn.parameter import Parameter import torch.nn.functional as F import pickle from torch.autograd import Variable logger = logging.getLogger() ...
TencentYoutuResearch/PersonReID-NAFS
utils/metric.py
metric.py
py
20,302
python
en
code
61
github-code
6
[ { "api_name": "logging.getLogger", "line_number": 13, "usage_type": "call" }, { "api_name": "logging.INFO", "line_number": 14, "usage_type": "attribute" }, { "api_name": "torch.pow", "line_number": 20, "usage_type": "call" }, { "api_name": "torch.div", "line_n...
21049493663
from __future__ import absolute_import from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from sentry.constants import TAG_LABELS from sentry.models import ProjectOption from sentry.web.forms.fields import RangeField class ProjectTagsForm(forms.Form): ...
ryanwang520/sentry
src/sentry/web/forms/projects.py
projects.py
py
4,065
python
en
code
null
github-code
6
[ { "api_name": "django.forms.Form", "line_number": 12, "usage_type": "attribute" }, { "api_name": "django.forms", "line_number": 12, "usage_type": "name" }, { "api_name": "django.forms.MultipleChoiceField", "line_number": 13, "usage_type": "call" }, { "api_name": "...
28245924188
import numpy as np; import cv2 as cv; import matplotlib.pyplot as plt; import math colors=[(0,0,0),(127,127,127),(255,255,255)] figures=[0,1,2] power=5 def get_colors(i): if (i==0): return [0,1] if (i==1): return [0,2] if (i==2): return [1,2] if (i==3): return [1,0] i...
delican001/krutov-o-d
source/kr.py
kr.py
py
3,160
python
en
code
0
github-code
6
[ { "api_name": "numpy.random.randint", "line_number": 22, "usage_type": "call" }, { "api_name": "numpy.random", "line_number": 22, "usage_type": "attribute" }, { "api_name": "cv2.rectangle", "line_number": 35, "usage_type": "call" }, { "api_name": "cv2.rectangle", ...
11372853386
import re import os from os import listdir from os.path import isfile from os.path import join from os.path import basename import yaml def load_yaml_schema(source_dir): """ Returns: A dictionary whose keys are the schema file basenames and whose values are nested dictionaries represented by t...
miti-consortium/mititools
mititools/serializers/cerberus_yaml.py
cerberus_yaml.py
py
1,482
python
en
code
0
github-code
6
[ { "api_name": "os.path.join", "line_number": 17, "usage_type": "call" }, { "api_name": "os.listdir", "line_number": 17, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 17, "usage_type": "call" }, { "api_name": "re.search", "line_number":...
74401572347
import json import pickle from typing import Union import numpy as np import pandas as pd class Model: def infer(self, x: Union[dict, str, np.ndarray]): if isinstance(x, str): x = json.loads(x) if isinstance(x, dict): x = np.array(x['x']) ...
jkarolczak/streamlit-presentation
model.py
model.py
py
631
python
en
code
0
github-code
6
[ { "api_name": "typing.Union", "line_number": 10, "usage_type": "name" }, { "api_name": "numpy.ndarray", "line_number": 10, "usage_type": "attribute" }, { "api_name": "json.loads", "line_number": 12, "usage_type": "call" }, { "api_name": "numpy.array", "line_nu...
38992923351
from django.db import models from django.db import migrations class Advertisement(models.Model): title = models.CharField( max_length=100, verbose_name="Название", ) description = models.TextField( verbose_name="Описание", ) price = models.DecimalField( ver...
lirik7002/module_4
app_lesson4/advertisement/app_lesson4/advertisement/lesson_4/models.py
models.py
py
1,526
python
en
code
0
github-code
6
[ { "api_name": "django.db.models.Model", "line_number": 3, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 3, "usage_type": "name" }, { "api_name": "django.db.models.CharField", "line_number": 4, "usage_type": "call" }, { "api_name": "...
26043376326
from __future__ import annotations from typing import ContextManager import pytest from pants.option.alias import CliAlias, CliAliasCycleError, CliAliasInvalidError from pants.option.scope import ScopeInfo from pants.testutil.pytest_util import no_exception from pants.util.frozendict import FrozenDict def test_may...
pantsbuild/pants
src/python/pants/option/alias_test.py
alias_test.py
py
6,644
python
en
code
2,896
github-code
6
[ { "api_name": "pants.option.alias.CliAlias", "line_number": 14, "usage_type": "call" }, { "api_name": "pants.option.alias.CliAlias.from_dict", "line_number": 29, "usage_type": "call" }, { "api_name": "pants.option.alias.CliAlias", "line_number": 29, "usage_type": "name" ...
19239142492
import sys input = sys.stdin.readline from collections import deque q = deque() N = int(input()) while True: n = int(input()) if n == -1: break if n: if not len(q) == N: q.append(n) else: q.popleft() if not q: print('empty') else: for s in q: prin...
sdh98429/dj2_alg_study
BAEKJOON/queue/b15828.py
b15828.py
py
333
python
en
code
0
github-code
6
[ { "api_name": "sys.stdin", "line_number": 2, "usage_type": "attribute" }, { "api_name": "collections.deque", "line_number": 5, "usage_type": "call" } ]
72532755709
from aiohttp import web from pydantic import ByteSize, Field, NonNegativeInt, parse_obj_as from settings_library.base import BaseCustomSettings from .._constants import APP_SETTINGS_KEY class ProjectsSettings(BaseCustomSettings): PROJECTS_MAX_COPY_SIZE_BYTES: ByteSize = Field( parse_obj_as(ByteSize, "30G...
ITISFoundation/osparc-simcore
services/web/server/src/simcore_service_webserver/projects/settings.py
settings.py
py
950
python
en
code
35
github-code
6
[ { "api_name": "settings_library.base.BaseCustomSettings", "line_number": 8, "usage_type": "name" }, { "api_name": "pydantic.ByteSize", "line_number": 9, "usage_type": "name" }, { "api_name": "pydantic.Field", "line_number": 9, "usage_type": "call" }, { "api_name":...
24492386955
# -*- coding:utf-8 -*- import torch import os import numpy as np from Model_Block import Resnet1d, Resnet2d from Model_Fusion_Network import MahFusion_Network from Model_Fusion_Loss import Fusion_loss from Data_Sampler import TrainSampler, TestSampler from Parser import Parser import glob def Split_model_param(model)...
gdphmcenter/DSFSFD
Train.py
Train.py
py
7,433
python
en
code
0
github-code
6
[ { "api_name": "Data_Sampler.TrainSampler", "line_number": 26, "usage_type": "call" }, { "api_name": "Model_Fusion_Loss.Fusion_loss", "line_number": 29, "usage_type": "call" }, { "api_name": "torch.optim.Adam", "line_number": 31, "usage_type": "call" }, { "api_name...
32895842047
from fixtures import * # noqa: F401,F403 from lightning import RpcError from utils import wait_for, TIMEOUT, only_one import json import logging import os import pytest import struct import subprocess import time import unittest with open('config.vars') as configfile: config = dict([(line.rstrip().split('=', 1)...
nayuta-ueno/lightning-cdecker
tests/test_gossip.py
test_gossip.py
py
57,234
python
en
code
1
github-code
6
[ { "api_name": "os.getenv", "line_number": 18, "usage_type": "call" }, { "api_name": "utils.wait_for", "line_number": 37, "usage_type": "call" }, { "api_name": "utils.wait_for", "line_number": 38, "usage_type": "call" }, { "api_name": "utils.wait_for", "line_nu...
40297331250
import random import numpy as np from collections import defaultdict # <---> from .basic import max_ships_to_spawn from .board import Player, Shipyard, Launch from .helpers import find_shortcut_routes from .logger import logger # <---> class _ShipyardTarget: def __init__(self, shipyard: Shipyard): self...
w9PcJLyb/kore-beta-bot
src/offense.py
offense.py
py
4,176
python
en
code
10
github-code
6
[ { "api_name": "board.Shipyard", "line_number": 16, "usage_type": "name" }, { "api_name": "numpy.inf", "line_number": 36, "usage_type": "attribute" }, { "api_name": "board.spawn_cost", "line_number": 41, "usage_type": "attribute" }, { "api_name": "board.shipyard_co...
19009287332
""" Functions to assist in parallel processing with Python 2.7. * Memory-friendly iterator functionality (wrapping Pool.imap). * Exit with Ctrl-C. * Easy use of n_jobs. (e.g. when n_jobs == 1, processing is serial) * Similar to joblib.Parallel but with the addition of imap functionality and a more effective way of h...
columbia-applied-data-science/rosetta
rosetta/parallel/parallel_easy.py
parallel_easy.py
py
16,061
python
en
code
204
github-code
6
[ { "api_name": "sys.stdout", "line_number": 58, "usage_type": "attribute" }, { "api_name": "sys.stdout", "line_number": 68, "usage_type": "attribute" }, { "api_name": "multiprocessing.Manager", "line_number": 82, "usage_type": "call" }, { "api_name": "multiprocessi...
10423305023
from __future__ import annotations import dataclasses from unittest.mock import ANY, AsyncMock import pytest from PySide6 import QtWidgets from randovania.gui.docks.connection_filtering_widget import ConnectionFilteringWidget from randovania.layout.base.trick_level import LayoutTrickLevel from randovania.layout.vers...
randovania/randovania
test/gui/docks/test_connection_layer_widget.py
test_connection_layer_widget.py
py
2,014
python
en
code
165
github-code
6
[ { "api_name": "randovania.layout.base.trick_level.LayoutTrickLevel.HYPERMODE", "line_number": 21, "usage_type": "attribute" }, { "api_name": "randovania.layout.base.trick_level.LayoutTrickLevel", "line_number": 21, "usage_type": "name" }, { "api_name": "dataclasses.replace", ...
18278855418
# -*- coding: utf-8 -*- """ cron: 31 7 * * * new Env('AcFun'); """ import re import requests import urllib3 from notify_mtr import send from utils import get_data urllib3.disable_warnings() class AcFun: def __init__(self, check_items): self.check_items = check_items self.contentid = "27259341"...
fu-c-k/checkinpanel
ck_acfun.py
ck_acfun.py
py
5,174
python
en
code
0
github-code
6
[ { "api_name": "urllib3.disable_warnings", "line_number": 15, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 58, "usage_type": "call" }, { "api_name": "re.findall", "line_number": 59, "usage_type": "call" }, { "api_name": "requests.session", ...
9312542157
import argparse import os import re import sys ITEM_REGEX = re.compile(r"(\w+)(=(.*))?") def parse_items(file): items = {} for line in file: match = ITEM_REGEX.search(line) if not match: print(f'Invalid configuration line "{line}"', file=sys.stderr) continue k...
jzgriffin/gros
make/generator/config.py
config.py
py
2,482
python
en
code
0
github-code
6
[ { "api_name": "re.compile", "line_number": 7, "usage_type": "call" }, { "api_name": "sys.stderr", "line_number": 15, "usage_type": "attribute" }, { "api_name": "sys.stderr", "line_number": 23, "usage_type": "attribute" }, { "api_name": "os.makedirs", "line_num...
4034576434
"""Tools for visualization""" import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import os import os.path as osp from pathlib import Path from functools import reduce from loguru import logger import math import seaborn as sns from CompNet.utils.io_utils import write_img, resiz...
hansongfang/CompNet
CompNet/utils/vis_utils.py
vis_utils.py
py
12,733
python
en
code
33
github-code
6
[ { "api_name": "matplotlib.pyplot.get_cmap", "line_number": 18, "usage_type": "call" }, { "api_name": "matplotlib.pyplot", "line_number": 18, "usage_type": "name" }, { "api_name": "numpy.arange", "line_number": 19, "usage_type": "call" }, { "api_name": "numpy.float...
1245345017
import pandas as pd from tqdm import tqdm import pickle import os import re from absplice_scripts.visualization.benchmark import get_performance from absplice_scripts.utils.mapping_utils import subset_tissues valid_cols = [ 'outlier', *snakemake.params['model_dict'].values(), ] def median_cutoff(_df): # m...
gagneurlab/AbSplice_analysis
workflow/scripts/common/benchmark/performance_dna.py
performance_dna.py
py
2,170
python
en
code
0
github-code
6
[ { "api_name": "tqdm.tqdm", "line_number": 34, "usage_type": "call" }, { "api_name": "pandas.read_parquet", "line_number": 35, "usage_type": "call" }, { "api_name": "pandas.concat", "line_number": 38, "usage_type": "call" }, { "api_name": "absplice_scripts.visualiz...
17414224976
# coding=utf-8 from PyQt5.QtWidgets import QMainWindow, QApplication, QWidget, QFrame, QVBoxLayout, QHBoxLayout, QPushButton, QDesktopWidget from PyQt5.QtGui import QFont, QCursor from PyQt5.QtCore import Qt from src.database.DataQuery import get_movies_info, get_directors_info, get_sorted_genres_info, get_starring_inf...
josephding23/FelKub-Movie-Archive
src/MoviesArchive.py
MoviesArchive.py
py
7,084
python
en
code
2
github-code
6
[ { "api_name": "PyQt5.QtWidgets.QWidget", "line_number": 13, "usage_type": "name" }, { "api_name": "src.database.DataQuery.get_movies_info", "line_number": 16, "usage_type": "call" }, { "api_name": "PyQt5.QtWidgets.QPushButton", "line_number": 41, "usage_type": "call" },...
73128013949
from rest_framework import serializers from django.shortcuts import get_object_or_404 from courses.models import ( Text, File, Image, Video, StudyNote, Course, TopicObjective, TopicGuideLine, Topic, SubTopic, Review, StudentCourseEnrollment, Author, PublisherCity, Publisher,...
DUMBALINYOLO/gbc_oms
courses/serializers/admin.py
admin.py
py
13,808
python
en
code
0
github-code
6
[ { "api_name": "rest_framework.serializers.StringRelatedField", "line_number": 29, "usage_type": "attribute" }, { "api_name": "rest_framework.serializers", "line_number": 29, "usage_type": "name" }, { "api_name": "django.shortcuts.get_object_or_404", "line_number": 35, "us...
71608268669
import warnings warnings.filterwarnings('ignore') import os import sys if os.getcwd() in sys.path: sys.path.append('../') else: sys.path.append(os.getcwd()) import torch import argparse from djtransgan.config import settings from djtransgan.utils import check_exist, out_json from djtrans...
ChenPaulYu/DJtransGAN
script/train.py
train.py
py
2,317
python
en
code
86
github-code
6
[ { "api_name": "warnings.filterwarnings", "line_number": 2, "usage_type": "call" }, { "api_name": "os.getcwd", "line_number": 6, "usage_type": "call" }, { "api_name": "sys.path", "line_number": 6, "usage_type": "attribute" }, { "api_name": "sys.path.append", "l...
32447419052
# load dependacies import pandas as pd import numpy as np import random as random from sklearn import preprocessing from sklearn.metrics import mean_squared_error from matplotlib import pyplot from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense from tensorflow.keras.layers ...
jindeok/Lottery_Prediction
Lottery_prediction/model.py
model.py
py
4,104
python
en
code
11
github-code
6
[ { "api_name": "tensorflow.keras.models.Sequential", "line_number": 24, "usage_type": "call" }, { "api_name": "tensorflow.keras.layers.LSTM", "line_number": 25, "usage_type": "call" }, { "api_name": "tensorflow.keras.layers.Dense", "line_number": 26, "usage_type": "call" ...
35778895326
# -*- coding: utf-8 -*- """ Created on 2021/5/4 11:47 上午 @Author: fduxuan Desc: """ from .helper import * from fastapi import APIRouter, Response, Body, File, Form from error import * from pydantic import BaseModel, Field import re import io from typing import Optional from model.base import gen_uuid...
fduxuan/Information-System-Spring-2021
Backend/router/department.py
department.py
py
4,441
python
en
code
0
github-code
6
[ { "api_name": "fastapi.APIRouter", "line_number": 19, "usage_type": "call" }, { "api_name": "pydantic.BaseModel", "line_number": 37, "usage_type": "name" }, { "api_name": "pydantic.Field", "line_number": 38, "usage_type": "call" } ]
41682584480
"""remove payor <-> provider join table Revision ID: ba3bae2b5e27 Revises: af6f8d819b86 Create Date: 2018-01-05 14:01:10.100376 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'ba3bae2b5e27' down_revision = 'af6f8d819b86' branch_labels = None depends_on = None ...
MondayHealth/provider-import
alembic/versions/ba3bae2b5e27_remove_payor_provider_join_table.py
ba3bae2b5e27_remove_payor_provider_join_table.py
py
1,153
python
en
code
0
github-code
6
[ { "api_name": "alembic.op.drop_table", "line_number": 21, "usage_type": "call" }, { "api_name": "alembic.op", "line_number": 21, "usage_type": "name" }, { "api_name": "alembic.op.create_table", "line_number": 27, "usage_type": "call" }, { "api_name": "alembic.op",...
40009842950
import asyncio import json from random import randint from time import sleep from channels.generic.websocket import AsyncWebsocketConsumer class NotificationConsumer(AsyncWebsocketConsumer): async def connect(self): self.room_name = "notifications" self.room_group_name = "notifications" a...
wasiqwiqar/MandrillListener
Listener/Mandrill/consumers.py
consumers.py
py
1,151
python
en
code
0
github-code
6
[ { "api_name": "channels.generic.websocket.AsyncWebsocketConsumer", "line_number": 8, "usage_type": "name" }, { "api_name": "json.loads", "line_number": 28, "usage_type": "call" }, { "api_name": "json.dumps", "line_number": 42, "usage_type": "call" } ]
13479247243
from typing import List class Solution: def exclusiveTime(self, n: int, logs: List[str]) -> List[int]: stack = [] res = [0] * n last = 0 for log in logs: spl = log.split(':') idx = int(spl[0]) lent = int(spl[2]) if spl[1] == "start"...
1xingao/1xingao
python/main/soluation.py
soluation.py
py
3,419
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 5, "usage_type": "name" } ]
5986287170
from django.db import models LAYOUTS = ( ('1', """Line 1: Headline Line 2: Author Line 3: Pub Date Line 4: Source Line 5: Begin Story"""), ('2', """Line 1: Headline Line 2: Author Line 3: Source Line 4: Begin Story"""), ('3', """File Name: Headline Line 1: Author Line 2: Pub Date Line 3: Source Line 4: Beg...
netconstructor/cms_utility
publisher/models.py
models.py
py
1,084
python
en
code
1
github-code
6
[ { "api_name": "django.db.models.Model", "line_number": 30, "usage_type": "attribute" }, { "api_name": "django.db.models", "line_number": 30, "usage_type": "name" }, { "api_name": "django.db.models.EmailField", "line_number": 34, "usage_type": "call" }, { "api_name...
72633899707
import pandas as pd import yfinance as yf #Extraindo os dados do Banco do Brasil do Yahoo Finance bbas3 = yf.Ticker('BBAS3.SA') historico = bbas3.history(period= '5y') print(historico) #Extraindo os historico de dividendos dos ultimos 5 anos dividendos = bbas3.dividends dados = pd.DataFrame(dividendos).reset_index()...
DiegoAlexandres/python-for-finance-bbas3
analise_bbas3.py
analise_bbas3.py
py
855
python
pt
code
0
github-code
6
[ { "api_name": "yfinance.Ticker", "line_number": 5, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_number": 11, "usage_type": "call" } ]
18476196576
import tornado.httpserver import tornado.ioloop import tornado.web import json import webapp import database global dbn store_setting_nodi = None class GetListaNodiHandler(tornado.web.RequestHandler): def get(self): global store_setting_nodi #*************************************** #*****...
salviador/LightHub
raspberry/app/Nodi.py
Nodi.py
py
4,580
python
it
code
0
github-code
6
[ { "api_name": "tornado.httpserver.web", "line_number": 12, "usage_type": "attribute" }, { "api_name": "tornado.httpserver", "line_number": 12, "usage_type": "name" }, { "api_name": "webapp.dbn.Read_Lista_Nodi_return_JSON", "line_number": 35, "usage_type": "call" }, { ...
5479370117
import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions import Categorical, MixtureSameFamily from maniskill2_learn.utils.torch import ScaledTanhNormal, ScaledNormal, CustomIndependent from ..builder import REGHEADS from .regression_base import ContinuousBaseHead class GaussianBase...
haosulab/ManiSkill2-Learn
maniskill2_learn/networks/regression_heads/gaussian.py
gaussian.py
py
7,431
python
en
code
53
github-code
6
[ { "api_name": "regression_base.ContinuousBaseHead", "line_number": 10, "usage_type": "name" }, { "api_name": "torch.nn.Parameter", "line_number": 17, "usage_type": "call" }, { "api_name": "torch.nn", "line_number": 17, "usage_type": "name" }, { "api_name": "torch....
36712607728
from django.urls import path from . import new_views app_name = 'new' urlpatterns = [ path('sensor/trend', new_views.sensor_trend, name='sensor_trend'), path('sensor/errors', new_views.sensor_errors, name='sensor_errors'), path('sensor/settings', new_views.sensor_settings, name='sensor_settings'), pat...
novelsk/AtlasDjango
app/atlas/new_urls.py
new_urls.py
py
1,572
python
en
code
0
github-code
6
[ { "api_name": "django.urls.path", "line_number": 7, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 8, "usage_type": "call" }, { "api_name": "django.urls.path", "line_number": 9, "usage_type": "call" }, { "api_name": "django.urls.path", ...
19124325113
import glob from kivy.app import App from kivy.properties import ( ObjectProperty, StringProperty, ) from serial.tools.list_ports import comports from kivy.uix.button import Button from kivy.uix.boxlayout import BoxLayout from kivy.uix.stacklayout import StackLayout from kivy.uix.popup import Popup from kivy.u...
siemanko/microgrid
interface/gui.py
gui.py
py
3,735
python
en
code
1
github-code
6
[ { "api_name": "kivy.uix.textinput.TextInput", "line_number": 29, "usage_type": "name" }, { "api_name": "kivy.uix.label.Label", "line_number": 37, "usage_type": "name" }, { "api_name": "kivy.uix.boxlayout.BoxLayout", "line_number": 43, "usage_type": "name" }, { "ap...
24961027926
from __future__ import division import rospy import numpy as np import tf import csv import math from scipy.signal import savgol_filter import ur_robot as ur saved_cloudXYZ = None cloud_csv = './src/edge_follower/save_cloud.csv' write_once = False intervals = 1 # Sorting refvec = [0,1] origin = [0,0] # Seperate the ...
vincent51689453/ur3_edge_follower
src/edge_follower/follower.py
follower.py
py
5,488
python
en
code
0
github-code
6
[ { "api_name": "math.hypot", "line_number": 34, "usage_type": "call" }, { "api_name": "math.pi", "line_number": 37, "usage_type": "attribute" }, { "api_name": "math.atan2", "line_number": 42, "usage_type": "call" }, { "api_name": "math.pi", "line_number": 46, ...
19053943948
import pandas as pd import numpy as np from collections import defaultdict import os import re import sys input_path_to_files = sys.argv[1] output_name_of_file = sys.argv[2] # example: python evaluate_clustering.py /g/scb2/bork/mende/specI_euks/vsearch//combined3//clustering_comb3/ evaluation_clusterings.csv def mai...
zellerlab/specI_utilities
scripts/evaluate_clustering.py
evaluate_clustering.py
py
3,238
python
en
code
0
github-code
6
[ { "api_name": "sys.argv", "line_number": 8, "usage_type": "attribute" }, { "api_name": "sys.argv", "line_number": 9, "usage_type": "attribute" }, { "api_name": "os.listdir", "line_number": 14, "usage_type": "call" }, { "api_name": "pandas.DataFrame", "line_num...
39183176356
from typing import List vector = List[float] vectors = List[vector] def foo(v: vectors) -> vector: return v[0] my_vector = [ [1.0, 2.0, 3.0], [4.0, 5.0, 6.0] ] print(foo(my_vector))
mahfuzurrahman98/typing-in-python
third.py
third.py
py
201
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 3, "usage_type": "name" }, { "api_name": "typing.List", "line_number": 5, "usage_type": "name" } ]
69862803709
import networkx as nx import matplotlib.pyplot as plt from discopygal.solvers import Robot, RobotDisc, RobotPolygon, RobotRod from discopygal.solvers import Obstacle, ObstacleDisc, ObstaclePolygon, Scene from discopygal.solvers import PathPoint, Path, PathCollection, Solver from discopygal.solvers.samplers import * f...
Kahanalon/Robo
prm.py
prm.py
py
7,313
python
en
code
0
github-code
6
[ { "api_name": "discopygal.solvers.Solver", "line_number": 13, "usage_type": "name" }, { "api_name": "discopygal.geometry_utils.collision_detection.collide_two_robots", "line_number": 110, "usage_type": "call" }, { "api_name": "discopygal.geometry_utils.collision_detection", "...
34719306966
import discord from dotenv import load_dotenv from discord.ext import commands load_dotenv() f = open('secret.txt', 'r') token = f.readline().strip() person = f.readline().strip() # genius = f.readline().strip() f.close() client = commands.Bot(command_prefix = '$') @client.event async def on_ready(): print(f'{cli...
ByteOfKathy/fun_projects
discordbot/bot.py
bot.py
py
873
python
en
code
0
github-code
6
[ { "api_name": "dotenv.load_dotenv", "line_number": 5, "usage_type": "call" }, { "api_name": "discord.ext.commands.Bot", "line_number": 11, "usage_type": "call" }, { "api_name": "discord.ext.commands", "line_number": 11, "usage_type": "name" } ]
33461043264
from tkinter import * from tkinter import ttk import sqlite3 from tkinter import messagebox fundo = 'midnightblue' root = Tk() root.title("Cadastro de Produtos") root.configure(bg=fundo,border=4) root.geometry("990x690+50+20") style = ttk.Style() style.configure('Treeview.Heading',font=('arial',10,'bold')) cor = '...
gurian-1974/frente-de-caixa-nfce
cadastro_produto.py
cadastro_produto.py
py
9,639
python
pt
code
0
github-code
6
[ { "api_name": "tkinter.ttk.Style", "line_number": 15, "usage_type": "call" }, { "api_name": "tkinter.ttk", "line_number": 15, "usage_type": "name" }, { "api_name": "sqlite3.connect", "line_number": 21, "usage_type": "call" }, { "api_name": "tkinter.messagebox.askq...
16397985901
import os import pygame from Entities.Item import Item class CountItem(Item): def __init__(self, id, name, position, image, opacity_disable, hint, min_value, max_value, value_increase, value_start, enable=True): self.value = value_start self.value_increase = value_increase ...
linsorak/LinSoTracker
Entities/CountItem.py
CountItem.py
py
2,188
python
en
code
3
github-code
6
[ { "api_name": "Entities.Item.Item", "line_number": 8, "usage_type": "name" }, { "api_name": "Entities.Item.Item.__init__", "line_number": 16, "usage_type": "call" }, { "api_name": "Entities.Item.Item", "line_number": 16, "usage_type": "name" }, { "api_name": "Enti...
15687078152
"""help functions for milvus database """ import numpy as np import struct from pymilvus import CollectionSchema, FieldSchema, DataType, Collection, Milvus from pymilvus import connections import pandas as pd from pymilvus import utility import multiprocessing, logging import time import json import gc import random im...
ReBatch-ML/AnswerSearch
packages/milvus_functions.py
milvus_functions.py
py
7,326
python
en
code
0
github-code
6
[ { "api_name": "pymilvus.FieldSchema", "line_number": 27, "usage_type": "call" }, { "api_name": "pymilvus.DataType.INT64", "line_number": 27, "usage_type": "attribute" }, { "api_name": "pymilvus.DataType", "line_number": 27, "usage_type": "name" }, { "api_name": "p...
39673092654
import fileinput from typing import List from common import Point, plot def _simulate(field: List[List[str]], threshold: int) -> int: total = 0 full = False while not full: sand = Point(500, 0) while not full: if sand.y > threshold: full = True i...
cmatsuoka/aoc
2022 - expedition/14 - regolith reservoir/solution1.py
solution1.py
py
1,295
python
en
code
0
github-code
6
[ { "api_name": "typing.List", "line_number": 7, "usage_type": "name" }, { "api_name": "common.Point", "line_number": 12, "usage_type": "call" }, { "api_name": "fileinput.FileInput", "line_number": 39, "usage_type": "attribute" }, { "api_name": "common.Point.unmarsh...
10356638707
import torch from torch.utils.data import Dataset import numpy as np from random import randint from scipy.io.wavfile import read #reading .wav files from os import listdir #parse directories from os.path import isfile, join #parse directories import cv2 #resizing vectors with interpolation of values from librosa.effec...
remit0/SpeechRecognitionProject
dataset.py
dataset.py
py
13,935
python
en
code
0
github-code
6
[ { "api_name": "os.listdir", "line_number": 62, "usage_type": "call" }, { "api_name": "os.path.isfile", "line_number": 62, "usage_type": "call" }, { "api_name": "os.path.join", "line_number": 62, "usage_type": "call" }, { "api_name": "random.randint", "line_num...
29564769245
""" encode:utf-8 Author:aidan.hu Data:2022/1/15 """ import time from decimal import Decimal import pytest from common.logger import logger from operation.contract.client.account.get_account_info import get_account_info from operation.contract.client.order.order_request import OrderRequest from operation.contract.clien...
shiqilouyang/thanos_test
test_cases/contract/client/order/test_cancel_order.py
test_cancel_order.py
py
7,112
python
en
code
0
github-code
6
[ { "api_name": "decimal.Decimal", "line_number": 19, "usage_type": "call" }, { "api_name": "operation.contract.client.quote.qoute_symbol_index_price.qoute_symbol_index_price", "line_number": 19, "usage_type": "call" }, { "api_name": "operation.contract.client.order.order_request.O...
1440203353
import numpy import bpy import nodeitems_utils from nodeitems_utils import NodeCategory, NodeItem class ImageSocket(bpy.types.NodeSocket): bl_idname = "ImageSocket" bl_label = "Image Node Socket" t_value = numpy.zeros((4, 2), dtype=numpy.float16) # Optional function for drawing the socket input valu...
amb/blender-texture-tools
inactive/image_processing_nodes.py
image_processing_nodes.py
py
5,244
python
en
code
74
github-code
6
[ { "api_name": "bpy.types", "line_number": 7, "usage_type": "attribute" }, { "api_name": "numpy.zeros", "line_number": 11, "usage_type": "call" }, { "api_name": "numpy.float16", "line_number": 11, "usage_type": "attribute" }, { "api_name": "bpy.types", "line_nu...
25153067099
#!/usr/bin/env python from move_base_msgs.msg import MoveBaseGoal from geometry_msgs.msg import Pose, Quaternion, Point, PoseStamped from std_msgs.msg import Header import tf.transformations as transformations import numpy import math class Movement: def __init__(self, nav_server, map_frame, poses_service): ...
EyalSeg/toari-assignment4
ass4/scripts/movement.py
movement.py
py
2,708
python
en
code
0
github-code
6
[ { "api_name": "move_base_msgs.msg.MoveBaseGoal", "line_number": 29, "usage_type": "call" }, { "api_name": "numpy.array", "line_number": 48, "usage_type": "call" }, { "api_name": "numpy.linalg.norm", "line_number": 49, "usage_type": "call" }, { "api_name": "numpy.l...
18338161846
import pymongo from pymongo import MongoClient myclient= pymongo.MongoClient('mongodb://localhost:27017/') database=myclient["codes"] collection=database["subjects"] data=([{"Maths":77,"English":79,"Computer":65,"Biology":87}]) newvalues = { "$set": { "Maths": "98" } } Updation=collection.update(data,newvalues) prin...
MayuriTambe/Programs
Programs/SqlConnection/MongoCRUD/Updation.py
Updation.py
py
370
python
en
code
0
github-code
6
[ { "api_name": "pymongo.MongoClient", "line_number": 4, "usage_type": "call" } ]
41705626947
import numpy as np import matplotlib.pyplot as plt import scipy.optimize as optimization import math as m import scipy.constants # Application example: load and fit data to black body curve (Planck radiation law) # Constants h = scipy.constants.Planck kb = scipy.constants.k c = scipy.constants.c # Kelvin to Celsius ...
kalleadolfsson/spec-streamer
tools/black_body_fit.py
black_body_fit.py
py
1,379
python
en
code
2
github-code
6
[ { "api_name": "scipy.optimize.constants", "line_number": 10, "usage_type": "attribute" }, { "api_name": "scipy.optimize", "line_number": 10, "usage_type": "name" }, { "api_name": "scipy.optimize.constants", "line_number": 11, "usage_type": "attribute" }, { "api_na...
72597824508
#!/usr/bin/env python3 import argparse import sys import os from src import decorateindenter def error(reason): print("ERROR: {}".format(reason), file=sys.stderr) def main(args): streamMode = (args.file is sys.stdin) if streamMode: indBuffer = [] indString = "" try: ...
IjonTichy/decindent
main.py
main.py
py
1,981
python
en
code
1
github-code
6
[ { "api_name": "sys.stderr", "line_number": 10, "usage_type": "attribute" }, { "api_name": "sys.stdin", "line_number": 14, "usage_type": "attribute" }, { "api_name": "src.decorateindenter.DecorateIndenter", "line_number": 44, "usage_type": "call" }, { "api_name": "...
16602046609
from django.test import TestCase from django.shortcuts import resolve_url as r from myproject.core.models import Person from .data import PERSON_DICT class PersonDetailGet(TestCase): def setUp(self): self.obj = Person.objects.create(**PERSON_DICT) self.resp = self.client.get(r('core:person_detail...
rg3915/fique-em-casa
myproject/core/tests/test_view_person_detail.py
test_view_person_detail.py
py
1,314
python
en
code
7
github-code
6
[ { "api_name": "django.test.TestCase", "line_number": 7, "usage_type": "name" }, { "api_name": "myproject.core.models.Person.objects.create", "line_number": 10, "usage_type": "call" }, { "api_name": "myproject.core.models.Person.objects", "line_number": 10, "usage_type": "...