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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18171697721 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from warnings import warn
import math
import torch
from typing import Optional
from torchaudio import functional as F
from torchaudio.compliance import kaldi
__all__ = [
'Spectrogram',
'GriffinLim',
... | hephaex/audio | torchaudio/transforms.py | transforms.py | py | 33,411 | python | en | code | null | github-code | 97 | [
{
"api_name": "torch.nn",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "torch.hann_window",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "torchaudio.functional.spectrogram",
"line_number": 74,
"usage_type": "call"
},
{
"api_name":... |
73959355837 | """Main module."""
import os.path
import numpy as np
import scipy.stats
from astropy.io import fits
import configparser
import copy
from . import correlation_item, data, utils
from vega.scale_parameters import ScaleParameters
from vega.model import Model
from vega.minimizer import Minimizer
from vega.analy... | andreicuceu/vega | vega/vega_interface.py | vega_interface.py | py | 28,209 | python | en | code | 5 | github-code | 97 | [
{
"api_name": "configparser.ConfigParser",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "configparser.ConfigParser",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "os.path.path.expandvars",
"line_number": 64,
"usage_type": "call"
},
{
"api_n... |
10195441532 | from Bio import Entrez
import json
import pymongo
def number_of_entries(query):
Entrez.email = 'mikael@koutero.name'
handle = Entrez.egquery(term=query)
record = Entrez.read(handle)
for row in record["eGQueryResult"]:
if row["DbName"]=="pubmed":
entries_num = row["Count"]
return... | eetuko/publication_strategy | Get_PubMed.py | Get_PubMed.py | py | 2,052 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "Bio.Entrez.email",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "Bio.Entrez",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "Bio.Entrez.egquery",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "Bio.Entrez",
"li... |
5826921881 | import numpy as np
import matplotlib.pyplot as plt
import os
# Sparseness based on Rolls-Tovee measure (Rolls and Tovee,1995)
# by Vinje and Gallant(Vinje and Gallant,2000)
# 0< value <1 , higher than sparser distributions
def calculateVinjeGallantSparseness(frEx):
nbrOfNeurons,nbrOfPatches = np.shape(frEx)
no... | hamkerlab/Larisch2021_PLOSComBio | analyzes_V1Simple/Network/analysis/sparseness.py | sparseness.py | py | 1,841 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.shape",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.max",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.float",
"line_number": 17,
... |
70602930878 | import unittest
from pathlib import Path
import project1
from IO_file import read_instructions_from_file
from InstructionsProcess import *
from ElemetsInstance import *
import io
from contextlib import redirect_stdout
class MyTestCase(unittest.TestCase):
def test_file(self):
"""Test the opening and reading... | Kazee0/Project3 | tests/test_project1.py | test_project1.py | py | 14,454 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "unittest.TestCase",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "IO_file.read_instructions_from_file",
"line_number": 14,
"usage_type": "call"
},
{
"api_name"... |
72444085438 | import collections
import os
from data.data_config import DataConfig, wrap_master
from configparser import ConfigParser
class CamelsConfig(DataConfig):
def __init__(self, config_file):
super().__init__(config_file)
opt_data, opt_train, opt_model, opt_loss = self.init_model_param()
self.mo... | FRahmani368/HydroSPDB | data/camels_config.py | camels_config.py | py | 4,205 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "data.data_config.DataConfig",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "data.data_config.wrap_master",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "... |
7598612367 | import queue
from django.shortcuts import render, redirect, get_object_or_404
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
from django.contrib.auth import login, logout, authenticate
from django.contrib.auth.models import User
from django.db import IntegrityError
from django.utils import t... | mariajgarzonb/ColegioPepito | colegio/views.py | views.py | py | 4,878 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.shortcuts.render",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "models.Curso.objects.all",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "models.Curso.objects",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_na... |
39019832636 | import pandas as pd
from pandas import ExcelWriter
from pandas import ExcelFile
from string import digits
import collections
import os
import snap7
from time import sleep
import snap7.client as c
from snap7.util import *
from snap7.snap7types import *
import tkinter as tk
from tkinter import filedialog
... | McPhy/McSim | test_BPCS.py | test_BPCS.py | py | 3,397 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "snap7.client.Client",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "snap7.client",
"line_number": 40,
"usage_type": "attribute"
},
{
"api_name": "tkinter.Tk",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "tkinter.filedialog.a... |
86654754506 | import keras
from keras import backend as K
from Dataset_MNIST import num_classes
import numpy as np
def distance_based_suprise_adequacy(AT_train,AT_test,y_test,C):
print('AT_train shape', AT_train.shape)
print('AT_test shape', AT_test.shape)
C=keras.utils.to_categorical(C, num_classes)
print(... | ChenchengLiang/Suprise-Adequacy-Implementation | SA/DSA.py | DSA.py | py | 2,019 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "keras.utils.to_categorical",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "Dataset_MNIST.num_classes",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "keras.utils",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_nam... |
73238014718 | from rest_framework_jwt.views import obtain_jwt_token
from django.urls import path
from . import views
urlpatterns = [
path('signup/', views.signup),
path('userinfo/', views.update_info),
path('api-token-auth/', obtain_jwt_token),
path('<username>/', views.profile),
path('<int:user_pk>/follow/', ... | Xxell-8/PICKle-Vue-Django-Movie-Recommendation-Web-Project | server/accounts/urls.py | urls.py | py | 337 | python | en | code | 1 | github-code | 97 | [
{
"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",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "rest_framework_jwt.v... |
18133747196 | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.tensorboard import SummaryWriter
from const import *
class PolicyValue(nn.Module):
"""policy-value network module"""
def __init__(self, board_width=SIZE, board_height=SIZE):
super(PolicyValue, self).__init__()
... | Son4ta/Gobang-AI-program-based-on-AlphaZero | net2.py | net2.py | py | 3,346 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "torch.nn.Module",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numb... |
7259605114 | # coding: utf-8
# ## LSTM with Connectionist Temporal Classifier - Lasagne
# **Description**: A script to test lasagne-rnn-ctc using toy ascii alphabet data from [rakeshvar's repo](https://github.com/rakeshvar/rnn_ctc).
# **Dependencies**: print_utils.py, data.pkl *(ascii scribe) from rakeshvar*
#
import pickle as ... | matthijsvk/multimodalSR | code/audioSR/old/audioModel/lstm.py | lstm.py | py | 5,997 | python | en | code | 56 | github-code | 97 | [
{
"api_name": "theano.config",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "pickle.load",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "print_utils.prediction_printer",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "numpy.a... |
36711519391 | import cv2
import numpy as np
from skimage.filters import unsharp_mask
def get_labels(preprocessings):
labels = ['nenhum', 'bilateral', 'clahe',
'unsharp_mask', 'tophat', 'eqHist']
return [labels[pre] for pre in preprocessings]
def params_labels():
return ['sigma_color', 'sigma_space', 'c... | Luanabcruz/Tese-Doutorado-DCCMAPI | kidney-tumor-segmentation-method/kidney_dataset_utils/gen_ct_imgs/preprocessings.py | preprocessings.py | py | 3,015 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.min",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "numpy.float32",
"line_number": 46,
"usage_type": "attribute"
},
{
"api_name": "cv2.bilateralFilter",
... |
39742716305 | import random
import sys
import math
import matplotlib.pyplot as plt
#Renad Altayyar 441200897
#Rahaf Alzahrani 441201093
#Layan alorayyidh 441201401
#Danah Alturki 441200847
class SmartCargoLoading:
#Ask user for requared inputs
def input_func(self):
items = int(input("Enter the number of items:... | itsRenad/Genetic-algorithm | IT426-Project-Phase2-Group6.py | IT426-Project-Phase2-Group6.py | py | 15,494 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "sys.exit",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "random.randrange",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "random.uniform",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.plot",
... |
36898810596 | import tkinter as tk
from tkinter import PhotoImage, StringVar, image_names, ttk
from tkinter.constants import ACTIVE, ANCHOR
from PIL import ImageTk, Image
import random
import mysql.connector
import os
from pathlib import Path
LARGEFONT =("Arial Bold", 35)
MEDFONT = ("Arial", 20)
BOLDMEDFONT = ("Arial", 1... | tannerJDA/ror2_database | ror2.py | ror2.py | py | 32,994 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tkinter.Tk",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "tkinter.Tk.__init__",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "tkinter.Tk",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "tkinter.Frame",
... |
73798370877 | from __future__ import annotations
import datetime
import os
import time
from functools import cached_property
import sqlalchemy.orm
from sqlalchemy import create_engine, Column, Integer, DateTime as DT, ForeignKey, String, Float
from sqlalchemy.orm import sessionmaker, declarative_base, relationship, scoped_session
... | epsilon-phase/timetracker | timetracker/models.py | models.py | py | 5,102 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.getenv",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "os.getenv",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.create_engine",
"line_nu... |
73126375680 | # Contains code for reading from CSVs, normalizing text, and labeling text
import re
from random import shuffle
from sklearn.base import TransformerMixin
from sklearn.pipeline import Pipeline, FeatureUnion, make_pipeline
from nltk.tokenize import sent_tokenize, word_tokenize
from nltk.corpus import stopwords
from rad_c... | bdrad/rad_classify | rad_classify/preprocessing.py | preprocessing.py | py | 3,532 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "rad_classify.extract_impression",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "rad_classify.extract_clinical_history",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "rad_classify.extract_findings",
"line_number": 13,
"usage_type": "n... |
16327573676 | import logging
import config
RX_BYTES = 'rx_bytes'
TX_BYTES = 'tx_bytes'
RX_PACKETS = 'rx_packets'
TX_PACKETS = 'tx_packets'
SDN_RX_BYTES = 'sdn_rx_bytes'
SDN_TX_BYTES = 'sdn_tx_bytes'
SDN_RX_PACKETS = 'sdn_rx_packets'
SDN_TX_PACKETS = 'sdn_tx_packets'
IS_VIRTUAL = 'is_virtual'
PORT_NAME = 'name'
PORT_STATS = {RX_BYT... | netgroup/OSHI-monitoring | switch_stats.py | switch_stats.py | py | 12,116 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "config.LLDP_NOISE_BYTE_S",
"line_number": 287,
"usage_type": "attribute"
},
{
"api_name": "config.LLDP_NOISE_PACK_S",
"line_number": 288,
"usage_type": "attribute"
}
] |
43250019008 | import pygame
from pygame.sprite import Sprite
class Bullet(Sprite):
"""Classe para gerenciar as balas atiradas pela nave"""
def __init__(self, ai_game):
"""Cria um objeto de projétil de bala na posição atual da nave"""
super().__init__()
self.screen = ai_game.screen
self.sett... | GuilhermeAmado/alien_invasion | bullet.py | bullet.py | py | 1,133 | python | pt | code | 0 | github-code | 97 | [
{
"api_name": "pygame.sprite.Sprite",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "pygame.Rect",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "pygame.draw.rect",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pygame.draw",
"l... |
36933186107 | import asyncio
import grpc
import logging
import time
from bidding_pb2 import (
BidRequest,
BidReply,
HighestBidRequest,
HighestBidReply,
Bid,
BidHistoryRequest,
BidHistoryReply,
)
from bidding_pb2_grpc import (
BiddingService,
add_BiddingServiceServicer_to_server,
)
from tasks impo... | kumokay/my_learning | 09_minikube/example/project/bidding/src/server.py | server.py | py | 2,876 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "bidding_pb2_grpc.BiddingService",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "bidding_pb2.BidRequest",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "grpc.aio",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "... |
22031993062 | import itertools
import logging
from typing import Any
from sretoolbox.utils import threaded
from reconcile import queries
from reconcile.utils.defer import defer
from reconcile.utils.gitlab_api import GitLabApi
QONTRACT_INTEGRATION = "gitlab-permissions"
def get_members_to_add(repo, gl, app_sre):
maintainers ... | app-sre/qontract-reconcile | reconcile/gitlab_permissions.py | gitlab_permissions.py | py | 1,638 | python | en | code | 25 | github-code | 97 | [
{
"api_name": "logging.error",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "reconcile.queries.get_gitlab_instance",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "reconcile.queries",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": ... |
23760745687 | import cv2
import os
import numpy as np
from tensorflow import keras
import tensorflow
from tensorflow.keras import layers
import matplotlib.pyplot as plt
import tkinter
from tkinter.filedialog import *
from xml.dom import minidom
# http://hmf.enseeiht.fr/travaux/projnum/2019/d%C3%A9tection-dobjets-avec-python-opencv... | Maxime135/Road-sign-classification | road sign classification vgg16.py | road sign classification vgg16.py | py | 6,226 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "xml.dom.minidom.parse",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "xml.dom.minidom",
"line_number": 45,
"usage_type": "name"
},
{
"api_name": "os.chdir",
"line_number": 96,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras.prepr... |
39125902027 | import sqlite3
import os
# Get the directory of the current script
script_dir = os.path.dirname(os.path.abspath(__file__))
# Construct the path to the database file
db_path = os.path.join(script_dir, 'my_database.db')
print(f"Database Path: {db_path}")
print("HELLO")
conn = sqlite3.connect(db_path)
c... | felipe-l/interTrackerStreak | modules/databaseFunctions.py | databaseFunctions.py | py | 2,108 | python | en | code | 0 | github-code | 97 | [
{
"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.join",
"line_nu... |
5398106373 | import matplotlib.pyplot as plt
import numpy as np
if __name__ == '__main__':
# 载入数据
np.random.seed(0)
data = np.random.random([6, 5])*0.3 + 0.3
# 参数设置
xlabel = r'$\sigma$'
xticks = [r'$10^0$', r'$10^1$', r'$10^2$', r'$10^3$', r'$10^4$', r'$10^5$']
ylabel = r'$\mu$'
yticks = [r'$10^0$'... | chenxichen95/myModuals | figure_template/G_Cls_bar3_20/G_Cls_bar3_20.py | G_Cls_bar3_20.py | py | 2,134 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.random.seed",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "numpy.random.random",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.random",
... |
23596263026 | from pathlib import Path
from typing import Optional
from click import argument
from . import app, option, option_workdir
@app.command()
@argument("section", required=False)
@argument("flavor", required=False)
@option("--unused/--no-unused", default=True, help="Display the unused flavors")
@option_workdir
def deps(... | mlambda/deckz | deckz/cli/deps.py | deps.py | py | 7,804 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.Optional",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "typing.Set",
"line_number": 45,
"usage_type": "name"
},
{
"api_name": "pathlib.Path",
"line_numb... |
16748725376 | import numpy as np
import tools
import time
data_set = "wiki_vote"
result_folder = "../results/motivations/"+data_set+"/"
k = 10
seed_set1 = np.loadtxt(result_folder+"k"+str(k)+"seed1.txt")
seed_set2 = np.loadtxt(result_folder+"k"+str(k)+"seed2.txt")
iterations = 5000
r1 = np.zeros(iterations)
r2 = np.zeros(iteratio... | ah-ansari/cim | motivations/4_diffusion.py | 4_diffusion.py | py | 1,232 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.loadtxt",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number... |
30661666390 | import os, sys
# import transformers
from datasets import Dataset, load_dataset
import datasets
import numpy as np
import pandas as pd
import statistics
import logging
import torch
from torch.nn import functional as F
from torch.utils.data import DataLoader
from transformers import AutoModel, AutoModelForSeq2SeqLM, A... | sdeva14/framework_hf2023_basic | trainer_test.py | trainer_test.py | py | 8,734 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.basicConfig",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 45,
"usage_type": "attribute"
},
{
"api_name": "sys.stdout",
"... |
28215315826 | import base64
import requests
import random
import string
from Crypto.PublicKey import RSA
from Crypto.Signature import pkcs1_15
from Crypto.Hash import SHA256
from Crypto.Cipher import PKCS1_v1_5, AES
from tqdm import tqdm
def decode_and_import_rsa_private_key(data):
private_key_bytes = base64.b64decode(base64.b6... | Tecnologica-Mente/Pearson_DRM_Remover | PearsonLib.py | PearsonLib.py | py | 4,771 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "base64.b64decode",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "Crypto.PublicKey.RSA.import_key",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "Crypto.PublicKey.RSA",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": ... |
24400766670 | # -*- coding: utf-8 -*-
"""
Created on Tue Dec 3 13:38:01 2019
@author: Aya Gamal
"""
import numpy as np
from scipy.io import wavfile
import matplotlib.pyplot as plt
import os
import glob
from scipy.signal import stft
def read_wav_file(x):
# Read wavfile using scipy wavfile.read
_, wav =... | ayaallaa/Virtual-Rehabilitation-for-Aphasic-Patients | Speech recognition algorithm/Preprocessing_Steps/Spectrogram.py | Spectrogram.py | py | 1,614 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "scipy.io.wavfile.read",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "scipy.io.wavfile",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "scipy.signal.stft",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.log",
... |
5859683470 | #!/usr/bin/env python
# coding: utf-8
# In[2]:
import yfinance as yf
import pandas as pd
import requests
from bs4 import BeautifulSoup
import plotly.graph_objects as go
from plotly.subplots import make_subplots
#Graphing Function
def make_graph(stock_data, revenue_data, stock):
fig = make_subplots(rows=2... | pankajyadav928/pankajyadav928 | Final ass.py | Final ass.py | py | 3,720 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "plotly.subplots.make_subplots",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "plotly.graph_objects.Scatter",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "plotly.graph_objects",
"line_number": 21,
"usage_type": "name"
},
{
"a... |
74009659519 | #!/usr/bin/env python3
import sys
import os
import yaml
import json
class YamlReaderError(Exception):
pass
#**********************************
def static_to_dynamic_inventory(inputdict, hosts={}, groups={}, position='top'):
'''{
"_meta": {
"hostvars": {}
},
"all": {
"children... | jdongmo/devops | inventory/inventory.py | inventory.py | py | 5,240 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "sys.stderr.write",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "sys.stderr",
"line_number": 66,
"usage_type": "attribute"
},
{
"api_name": "os.walk",
"line_number": 149,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_nu... |
35508271588 |
import PySimpleGUI as sg
import psycopg2
from PySimpleGUI import *
# Telas
def make_win1():
layout = [
[Image(filename='Projeto_Desintegrador/logo.png')],
[sg.Button('Cadastrar Aluno'),sg.Button('Cadastrar Instrutor'),sg.Button('Cadastrar Curso'),sg.Button('Sair')]]
return sg.Window('Sist... | h4ns7/Projeto_Desintegrador | script.py | script.py | py | 20,374 | python | pt | code | 0 | github-code | 97 | [
{
"api_name": "PySimpleGUI.Button",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Window",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.Text",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "PySimpleGUI.In... |
73997482878 | # importing libraries
import datetime
from datetime import date
# =================================Definition of functions===========================================================
def reg_user(logged_u):
# while loop that will run as long as a condition is met and brakes out
while True:
# condition... | Trycondiuis/CapstoneProject-Lists-Functions-StringHandling | task_manager.py | task_manager.py | py | 29,070 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 65,
"usage_type": "attribute"
},
{
"api_name": "datetime.date.today",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": ... |
43776027018 | import json
from pathlib import Path
import requests
from bs4 import BeautifulSoup # type: ignore
from django.conf import settings
from django.core import mail # type: ignore
from django.core.exceptions import ValidationError # type: ignore
from django.core.management import call_command
from django.template import... | froomzy/book-crater-django-backend | lists/tests/tests.py | tests.py | py | 19,364 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.test.TestCase",
"line_number": 164,
"usage_type": "name"
},
{
"api_name": "lists.wishlists.process_wishlist",
"line_number": 167,
"usage_type": "call"
},
{
"api_name": "lists.constants.NZD",
"line_number": 167,
"usage_type": "name"
},
{
"api_... |
27799417584 | import collections
class Node:
""""Definition for a Node."""
def __init__(self, val=0, neighbors=None):
self.val = val
self.neighbors = neighbors if neighbors is not None else []
def cloneGraph(self, node: 'Node') -> 'Node':
if not node:
return node
is_visited = {node: Node(... | jphran/leetCodeGrindPythonEdition | leet_code_grind/clone_graph.py | clone_graph.py | py | 826 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "collections.deque",
"line_number": 16,
"usage_type": "call"
}
] |
29109294291 | from flask import Flask
from werkzeug.wsgi import SharedDataMiddleware
from os.path import join as joinpath, dirname
from functools import partial
Z = partial(joinpath, dirname(__file__))
app = Flask(__name__)
app.wsgi_app = SharedDataMiddleware(app.wsgi_app,
{
'/dojolib': Z('./lib/dojoto... | kykyev/dojo-builds | server.py | server.py | py | 567 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "functools.partial",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 6,
"usage_type": "argument"
},
{
"api_name": "os.path.dirname",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"li... |
39382700110 | # imports
import streamlit as st
import pdfminer
import requests
#from pdfminer import high_level
from pdfminer.layout import LAParams
import pandas as pd
import arxiv
import textwrap
from bs4 import BeautifulSoup
import openai
import streamlit as st
from streamlit_tags import st_tags
from io import Byte... | Marshall-mk/article_summerizer | summerizer_app.py | summerizer_app.py | py | 6,026 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "io.BytesIO",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "pdfminer.high_level.extract_text",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pdfminer.high_level",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "... |
26320113954 | """Tests for opentrons.protocol_reader.file_identifier."""
import json
from dataclasses import dataclass
from decoy import Decoy
import pytest
from opentrons_shared_data import load_shared_data
from opentrons_shared_data.robot.dev_types import RobotType
from opentrons.protocols import parse
from opentrons.protocols... | Opentrons/opentrons | api/tests/opentrons/protocol_reader/test_file_identifier.py | test_file_identifier.py | py | 12,095 | python | en | code | 363 | github-code | 97 | [
{
"api_name": "decoy.Decoy",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "pytest.MonkeyPatch",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "decoy.mock",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "opentrons.protocols.pa... |
35279059376 | import numpy as np
import cv2 as cv
import glob
import json
import math
import os
from quartonian_handler import QuartonianHandler
def get_tranformation_matrix_from_transform(trans: list, rotation_matrix) -> list:
transformation_matrix = np.identity(4)
for i in range(3):
for j ... | Lewis-Stuart-11/Robotic-View-Capture | view_capture_scripts/camera_calibration.py | camera_calibration.py | py | 3,819 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "numpy.identity",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "cv2.TERM_CRITERIA_EPS",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "cv2.TERM_CRITERIA_MAX_ITER",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_nam... |
73058261760 | import asyncio
import os
from datetime import datetime, timedelta
from db_access.globals import *
from models import *
from security_functions.cryptography import pw_hash
ROOM_GROUP_NUM = 4 # Number of groups group chats
ROOM_DIRECT_NUM = 2 # Number of direct group chats
if os.getcwd().split("\\")[-1] == "server":... | SpeedFox198/Infosecurity-Project | server/init_db.py | init_db.py | py | 5,513 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "os.getcwd",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "asyncio.set_event_loop_policy",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "asyncio.WindowsSelectorEventLoopPolicy",
"line_number": 23,
"usage_type": "call"
},
{
"ap... |
35445228751 | ##
## Copyright (c) 2023 unSkript, Inc
## All rights reserved.
##
import pprint
from typing import Optional, Tuple
from datetime import datetime, timedelta
from pydantic import BaseModel, Field
from unskript.connectors.aws import aws_get_paginator
from unskript.legos.aws.aws_list_all_regions.aws_list_all_reg... | unskript/Awesome-CloudOps-Automation | AWS/legos/aws_get_ebs_volume_for_low_usage/aws_get_ebs_volume_for_low_usage.py | aws_get_ebs_volume_for_low_usage.py | py | 4,754 | python | en | code | 258 | github-code | 97 | [
{
"api_name": "pydantic.BaseModel",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "pydantic.Field",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "typing.Optional",
... |
20049075662 | #!/usr/bin/env python
#coding:utf-8
import mock
#print('查看mock库常用方法:',dir(mock))
#print('查看mock库详细的帮助信息:',help(mock))
# 删除文件
'''import os
class Remove():
def rmdir(self,path=r'D:\www'):
r = os.rmdir(path)
if r == None:
return "删除成功"
else:
return "删除失败"
def exists... | zhenfang95/Hello-World | mystudy/fzf_request/mockxx.py | mockxx.py | py | 639 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "mock.Mock",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "mock.info",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "mock.info",
"line_number": 25,
"usage_type": "attribute"
}
] |
26332361527 | import math, gmplot, os, ast
from math import radians, cos, sin, asin, sqrt, fabs
import numpy as np
import pandas as pd
import sys, time
def createProjectFolderStructure(folders):
for folder in folders:
if not os.path.exists(folder):
os.makedirs(folder)
def readCsv(filepath, sep):
... | billkord/Python-Data-Mining | code/functions.py | functions.py | py | 8,713 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "os.path.exists",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.makedirs",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_num... |
25929714256 | import os
import numpy as np
import tensorflow as tf
import codecs
import collections
from operator import itemgetter
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
config.gpu_options.per_process_gpu_memory_fraction = 0.5
config.gpu_options.allocator_type = 'B... | SysuJayce/tensorflow_learning | NLP/PTB.py | PTB.py | py | 11,651 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "os.environ",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "tensorflow.ConfigProto",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "collections.Counter",
"line_number": 43,
"usage_type": "call"
},
{
"api_name": "codecs.open"... |
22959897797 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Created by thomas on 2015/8/25
#
from django.core.management.base import BaseCommand
from store.models import Shop, Goods, Category
from exceltojson import excel2json, utils
from django.contrib.auth.models import User
from datetime import datetime
class Command(BaseC... | malongge/inventory | store/management/commands/import_goods.py | import_goods.py | py | 4,019 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "django.core.management.base.BaseCommand",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 18,
"usage_type": "name"
},
{
... |
25291229342 | import pickle
import base64
from django_redis import get_redis_connection
def merge_cookie_to_redis(request, response):
# 1.读取cookie数据
cookie_carts = request.COOKIES.get('carts')
if cookie_carts is not None:
carts = pickle.loads(base64.b64decode(cookie_carts))
# 2.初始化一个字典 用于保存sku_id:count... | alienguo/meiduo_project | meiduo_mall/apps/carts/utils.py | utils.py | py | 1,472 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pickle.loads",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "base64.b64decode",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "django_redis.get_redis_connection",
"line_number": 27,
"usage_type": "call"
}
] |
4498704833 | #!/usr/bin/env python
# coding: utf-8
# ## Practical Activity 3.2.8
# ### Prepare your workstation
# In[2]:
# Copy the YAML file and your Twitter keys over to this Jupyter Notebook before you start to work
get_ipython().system('pip install pyyaml')
import yaml
from yaml.loader import SafeLoader
get_ipython().syste... | rrrichardz/My_Python_Activity_2 | Week 3/Practical_Activity_3.2.8.py | Practical_Activity_3.2.8.py | py | 4,598 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "yaml.safe_load",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pandas.concat",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "nltk.download",
"li... |
27458382109 | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import torch
import torch.nn as nn
from torch.nn import Module, Sequential, Conv2d, ReLU,AdaptiveMaxPool2d, AdaptiveAvgPool2d, \
BatchNorm2d, CrossEntropyLoss, AvgPool2d, MaxPool2d, Parameter, Linear, Sigmo... | JD910/general_net_for_lesion_seg | GDModels/attention.py | attention.py | py | 4,669 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "torch.nn.Module",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.nn.Conv2d",
... |
41196992173 | from flask import render_template, session, redirect, url_for, request,jsonify
from database.mongodb import MongoDb
import controllers.ctl_history as hist
from bson.objectid import ObjectId
from controllers.validaciones import Validaciones as val
import controllers.encrypt as encrypt
import os
import uuid
#import qrcod... | Darwinpz/Smart-Tec | controllers/index.py | index.py | py | 5,297 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "database.mongodb.MongoDb",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "controllers.validaciones.Validaciones.validar_session",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.session",
"line_number": 14,
"usage_type": "argument... |
33964227812 | """ Command line interface to the REDCap Data Utilities.
@author: Victor Meyerson
"""
import click
import sys
from redcap_rdf.datadict_validator import Validator
from redcap_rdf.transform_to_cube import Transformer
@click.group()
def cli():
pass
@cli.command()
@click.option("--datadict",
help="... | nicholsn/redcap_rdf | redcap_rdf/cli.py | cli.py | py | 1,947 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "click.group",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "redcap_rdf.datadict_validator.Validator",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "click.option",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "clic... |
14886134458 | import warnings
import torch
import math
import sys
from tqdm import tqdm, trange
class Trainer:
"""
Trainer class that eases the training of a PyTorch model.
Parameters
----------
model : torch.nn.Module
The model to train.
criterion : torch.nn.Module
Loss funct... | mberkay0/pretrained-backbones-unet | backbones_unet/utils/trainer.py | trainer.py | py | 4,945 | python | en | code | 19 | github-code | 97 | [
{
"api_name": "torch.zeros",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "torch.zeros",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "tqdm.trange",
"line_number": 68,
"usage_type": "call"
},
{
"api_name": "torch.zeros",
"line_number": ... |
74901980797 |
import datetime
import unittest
import json
from util import Stock, Portfolio, is_weekday, create_payload
class StockTest(unittest.TestCase):
stocks = [
Stock("SUBARU", "6株", "22,086円", "+0.00%"),
Stock("日本セラミック","6株", "18,480円", "+0.82%"),
Stock("デンソー", "2株", "14,076円", "-0.31%"),
... | kouki-dan/Folio-bot | test/util-test.py | util-test.py | py | 7,617 | python | en | code | 12 | github-code | 97 | [
{
"api_name": "unittest.TestCase",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "util.Stock",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "util.Stock",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "util.Stock",
"line_nu... |
17119283636 | import unittest
import textwrap
from kfp.dsl import artifact
class _MyArtifact(artifact.Artifact):
TYPE_NAME = 'MyTypeName'
PROPERTIES = {
'int1': artifact.Property(
type=artifact.PropertyType.INT,
description='An integer-typed property'),
'int2': artifact.Property(type=artifact.P... | chironghua/kubeflow-piplines | sdk/python/tests/dsl/artifact_test.py | artifact_test.py | py | 6,147 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "kfp.dsl.artifact.Artifact",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "kfp.dsl.artifact",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "kfp.dsl.artifact.Property",
"line_number": 10,
"usage_type": "call"
},
{
"api_name"... |
13368721632 | class Solution:
def findCheapestPrice(self, n: int, flights: List[List[int]], src: int, dst: int, K: int) -> int:
from collections import defaultdict, deque
outgraph = defaultdict(list)
for (x,y,p) in flights:
outgraph[x].append((p, y))
que = deque()
que.append((0... | coutyou/LeetCodeEveryday | Heap/Medium/787. K 站中转内最便宜的航班/Solution.py | Solution.py | py | 967 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "collections.defaultdict",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "collections.deque",
"line_number": 7,
"usage_type": "call"
}
] |
11114506976 | from django.urls import path
from .views import posts_page, post_detail, add_post_by_user, delete_post_by_user, edit_post_by_user, add_reply, \
like_post, unlike_post
app_name = 'posts'
urlpatterns = [
path("all_posts/", posts_page, name='posts_page'),
path("posts/<int:year>-<int:month>-<int:day>/<slug>/",... | erfanmorsali/social_media | social_media_posts/urls.py | urls.py | py | 823 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "views.posts_page",
"line_number": 7,
"usage_type": "argument"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "views.post_detail... |
35064666457 | import os
import csv
import cv2
import numpy as np
from scipy import ndimage
# read driving log from csv file
lines = []
with open('/opt/carnd_p3/data/driving_log.csv') as csvfile:
reader = csv.reader(csvfile)
next(reader, None)
for line in reader:
lines.append(line)
import sklearn ... | billyzheli/Clone-Driving-Behavior-Using-Deep-Learning | model.py | model.py | py | 3,158 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "csv.reader",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.random.shuffle",
"line_number": 22,
"usage_type": "call"
},
{
"api_name... |
29154193039 | import io
import json
import types
from requests.status_codes import codes
from requests.structures import CaseInsensitiveDict
from robot.api import logger
from RequestsLibrary.compat import urlencode, PY3
from RequestsLibrary.exceptions import UnknownStatusError
class WritableObject:
""" HTTP stream handler ""... | MarketSquare/robotframework-requests | src/RequestsLibrary/utils.py | utils.py | py | 4,108 | python | en | code | 454 | github-code | 97 | [
{
"api_name": "requests.status_codes.codes.get",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "requests.status_codes.codes",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "RequestsLibrary.exceptions.UnknownStatusError",
"line_number": 30,
"usage_typ... |
1158166028 | import requests
api_key = 'acc_70d8068e509a25f'
api_secret = '46db5f57a8139d367db2aabdea5404e9'
image_url = 'https://cdn.discordapp.com/attachments/890119354128142336/934666345272979526/IMG_1587.jpg'
response = requests.get(
'https://api.imagga.com/v2/tags?image_url=%s' % image_url,
auth=(api_key, api_secret)... | js0mmer/hackuci2022 | object_recognizer.py | object_recognizer.py | py | 416 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
}
] |
75062467197 | #!/usr/bin/env python
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import MinMaxScaler
from sklearn.preprocessing import StandardScaler
import statsmodels.api as sm
from sklearn.decomposition import PCA
import statsmodels.stats.multitest as mttest
import sys
imp... | kellyliyichen/eGFR_450k | single-site/run_single-site.py | run_single-site.py | py | 4,693 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.StandardScaler",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "... |
22826185930 | from collections import deque
class TreeNode:
def __init__(self, val):
self.val = val
self.left, self.right = None, None
def find_minimum_depth(root):
if not root:
return 0
queue = deque()
queue.append(root)
levelCount = 0
while queue:
levelCount += 1
levelSize = len(queue)
for... | dhumindesai/Problem-Solving | educative/breadth-first-search/find_minimum_depth_of_binary_tree.py | find_minimum_depth_of_binary_tree.py | py | 1,293 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "collections.deque",
"line_number": 13,
"usage_type": "call"
}
] |
45162641242 | import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gio, GObject, Gtk
class Plugin(GObject.Object):
__gsignals__ = {"request": (GObject.SignalFlags.RUN_LAST, None, (str,))}
def __init__(self, application):
super().__init__()
application.connect("request", print)
self.... | atornel/Deity | src/plugins/demo/demo.py | demo.py | py | 1,934 | python | en | code | 5 | github-code | 97 | [
{
"api_name": "gi.require_version",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "gi.repository.GObject.Object",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "gi.repository.GObject",
"line_number": 5,
"usage_type": "name"
},
{
"api_name"... |
35429648346 | import re
import sqlite3
def get_database_connection():
try:
conn = sqlite3.connect('bible.db')
except sqlite3.Error as error:
print("Error occurred - ", error)
return conn
def parse_line(line):
# pattern = r'^([a-zA-Z]+)(\d+):(\d+)$'
pattern = r'([0-9]*[a-zA-Z]+)\s*([0-9]+)\s*:\... | pauloft/bibleverse | populate.py | populate.py | py | 1,829 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sqlite3.connect",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "sqlite3.Error",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "re.match",
"line_number": 22,
"usage_type": "call"
}
] |
31577051870 | import requests
from utils import header
from utils import signature
import logging
# client_request_id
#brand
#face value (amount, currencty)
#amount
data = {
"client_request_id": str(signature.client_request_id),
"brand": "tesco",
"face_value": {
"amount": 10,
"currency": "GBP"
},
"deli... | dinuvld/ChattyGift-api | app/utils/card_methods.py | card_methods.py | py | 1,375 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "utils.signature.client_request_id",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "utils.signature",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "utils.header.generate_branded_header",
"line_number": 42,
"usage_type": "call"
}... |
32942436652 | import logging
import pathlib
import sys, os
import subprocess
def submit2(command, runtime, cores, ram, directory='', modules='', group='dtu_00009',
output='/dev/null', error='/dev/null', jobname="henspi", email='', dependency = [], test=False):
"""
Function to submit a job to the Queueing System - withou... | HenrikSpiegel/Screener | pipeline/general_functions.py | general_functions.py | py | 3,919 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.exit",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "sys.exit",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number": 43,
"us... |
28081967110 | from patterns import (
Parameter,
State,
Table,
)
from datetime import datetime, timedelta
discord_messages = Table("discord_messages", "r")
bounces = Table("bounces", "w")
discord_messages_filtered = Table("discord_messages_filtered", "w")
state = State()
buffer_seconds = 15
max_q_len = 500
last_mess... | patterns-app/patterns-components | patterns_templates/Featured/AskHN/rate_limit_messages.py | rate_limit_messages.py | py | 812 | python | en | code | 113 | github-code | 97 | [
{
"api_name": "patterns.Table",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "patterns.Table",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "patterns.Table",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "patterns.State",
"lin... |
6618220391 | # https://www.acmicpc.net/problem/15591
# 백준 15591 - MooTube (Silver)
# Pypy 제출
import sys
from collections import defaultdict, deque
N, Q = map(int, sys.stdin.readline().split())
graph = defaultdict(dict)
def find(_from, value_limit):
global graph
q = deque([(_from, 1000000001)])
visited = {_from}
... | AMYMEME/algorithm-study | amymeme/20210421/15591.py | 15591.py | py | 1,098 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.stdin.readline",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.stdin",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "collections.defaultdict",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "collections.de... |
19882354882 | import numpy as np
from scipy.stats import invwishart, multivariate_normal, invgamma
from scipy.linalg import cholesky
class canary:
def __init__(self, data, ninv, diag_noise=True,
scale_prior_aff=None, df_prior_aff=None, scale_prior_unaff=None,
df_prior_unaff=None):
"""... | mwilensky768/canary | canary/canary.py | canary.py | py | 14,334 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.copy",
"line_number": 53,
"usage_type": "call"
},
{
"api_name": "numpy.eye",
"line_number": 63,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 113,
"usage_type": "call"
},
{
"api_name": "numpy.diag",
"line_number": 115... |
70954855999 | import sys
import random
import numpy as np
from apex import amp
from model import DBGB
from sklearn.model_selection import train_test_split
from transformers import AdamW
import torch
from scipy.sparse import load_npz
from torch.utils.data import DataLoader
from dataset import MDataset, createDataCSV
from log import... | yitongYao/DBGB | src/main.py | main.py | py | 5,327 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "model.get_tokenizer",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "dataset.MDataset",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "dataset.... |
37091820783 | from django.contrib import admin
from django.urls import path, include
from . import views
# Defines URL patterns for the Django application.
urlpatterns = [
# Includes URLs from the 'users' app.
path('', include('users.urls')),
# Maps the admin URL to the Django admin site.
path('admin/', admin.... | Chunleshy/DevDiaries | kunle-blog-origin/blog/urls.py | urls.py | py | 874 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.include",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "django.contrib.ad... |
27888144578 | import typing
import pandas as pd
from data.provider import DataProvider
from data.raw import RawData
from summarize.figures.artists_bar_chart import artists_bar_chart
from summarize.figures.genres_bar_chart import genres_bar_chart
from summarize.figures.labels_bar_chart import labels_bar_chart
from summarize.figures.p... | jbrown1618/spotify-stats | summarize/pages/overview.py | overview.py | py | 8,403 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "pandas.DataFrame",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "utils.markdown.md_link",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "utils.path.overview_audio_features_path",
"line_number": 34,
"usage_type": "call"
},
{
... |
19044239571 | import numpy as np
import configparser as cp
from network.data_features_dumper import DataFeaturesDumper
from network.silknet import LoadInterface
from network.silknet.FolderDataReader import FolderDataReader
from interface import implements
import os
import pickle
from network.computation_graph_parse import Computatio... | shahrukhqasim/TIES | python/network/trainer_parse.py | trainer_parse.py | py | 8,481 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "interface.implements",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "network.silknet.LoadInterface",
"line_number": 15,
"usage_type": "argument"
},
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "o... |
9674894330 | import matplotlib.pyplot as plt
import pandas as pd
from cdrift import evaluation
from cdrift.utils.helpers import readCSV_Lists, convertToTimedelta, importLog
import numpy as np
from datetime import datetime
from statistics import mean, harmonic_mean, stdev
from scipy.stats import iqr
from typing import List, Tuple
im... | cpitsch/cdrift-evaluation | evaluate.py | evaluate.py | py | 41,079 | python | en | code | 3 | github-code | 97 | [
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "matplotlib.pyplot.rcParams",
"line_number": 22,
"usage_type": "attribute"
},
{
... |
32308487077 | import pytest
from django.contrib.auth.models import User
@pytest.mark.skip('not now')
@pytest.mark.django_db
def test_new_user(user_factory):
user = user_factory.create()
count = User.objects.all().count()
print(count)
assert count == 1
print(user.username)
assert True
| bartdob/Django-project | tests/test_factories_user.py | test_factories_user.py | py | 298 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "django.contrib.auth.models.User.objects.all",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.contrib.auth.models.User.objects",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.auth.models.User",
"line_number": 10,... |
724328125 | # -*- coding: utf-8 -*-
import ckan.plugins.toolkit as tk
import logging
log = logging.getLogger(__name__)
@tk.side_effect_free
def deleted_user_list(context, data_dict):
'''Return a list of the site's deketed user accounts.
'''
model = context['model']
tk.check_access('deleted_user_list'... | CivityNL/ckanext-keycloaksynch | ckanext/keycloaksynch/logic/action/get.py | get.py | py | 606 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "logging.getLogger",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "ckan.plugins.toolkit.check_access",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "ckan.plugins.toolkit",
"line_number": 13,
"usage_type": "name"
},
{
"api_name"... |
7319113299 | '''
Created on 31.03.2018
@author: Sercan Turkmen
Moamen Ibrahim
Mina Ghobrial
REFERENCEs:
- [1] Programmable Web Project, Exercise3, resources.py
'''
import json
from urllib.parse import unquote
from flask import Flask, request, Response, g, _request_ctx_stack, redirect, send_from_direct... | sercant/critique | app/resources.py | resources.py | py | 58,874 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "json.load",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 39,
... |
15041726698 | #!/usr/bin/env python
# coding: utf-8
# ### Importing the libraries
# In[54]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# ### Importing the dataset
# In[55]:
covid_death_dataset = pd.read_csv("covid19_deaths_dataset.csv")
# In[56]:
covid_death_dataset.head... | shrey0506/Covid-19-Data-Analysis | covid19_data_analysis.py | covid19_data_analysis.py | py | 4,352 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.legend",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 73,
"usage_type": "name"
},
{
"api_name": "pandas.Dat... |
28128937204 | import logging
import logging.handlers
from datetime import datetime, timezone
import jddgrabber.JDDConfig as cnf
import boto3
from retrying import retry
class JDDLoggerSQSHandler(logging.Handler):
"""
A Python logging handler which sends messages to Amazon SQS.
Code based on Zyllow's SQS-Logging-Handler ... | itamarc/JobsDataDashboard-jddgrabber | src/jddgrabber/JDDLoggerSQSHandler.py | JDDLoggerSQSHandler.py | py | 3,454 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "logging.Handler",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "logging.Handler.__init__",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "logging.Handler",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "bot... |
34588802771 | import sys
sys.stdin = open('input_1226.txt', 'r')
from collections import deque
def bfs(y, x):
global ans
Q = deque()
visited[y][x] = True
Q.append([y, x])
while Q:
s = Q.popleft()
for dir in range(4):
ty, tx = s[0] + dy[dir], s[1] + dx[dir]
i... | Jinwoongma/Algorithm | swea/D4/swea_1226_미로1.py | swea_1226_미로1.py | py | 997 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "sys.stdin",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 7,
"usage_type": "call"
}
] |
23198258616 | #!/usr/bin/env python3
#Import open AI OS and System Modules
import openai,os,sys
openai.api_key = os.environ['api_key']
messages = [
{"role": "system", "content": "You are a friendly girl teddy bear named Pearl. You enjoy doing teddy bear things, like having picnics and dancing around. Take inspiration from fi... | TheOtherDavid/language-stream | gpt_conversation.py | gpt_conversation.py | py | 1,165 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "openai.api_key",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "openai.ChatCompletion.create",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "openai... |
8553519410 | #!/usr/bin/env python3
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.linear_model import LogisticRegression
from scipy.stats import logistic
from matplotlib.ticker import NullFormatter
from sklearn import linear_model
from scipy import stats
import seaborn as sns
import statsmodel... | steve-hof/golf_and_tennis_analysis | tennis_analysis.py | tennis_analysis.py | py | 2,540 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "numpy.asarray",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.asarray",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "sklearn.linear_model.LogisticRegression",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "s... |
27879461182 | import json
def finalProcess(dictText, N_analysresult, N_Events):
"""Метод для финальной обработки полученного словаря и преобразования его в JSON
Args:
dictText (dict): Словарь полученный при распознавании текста
"""
newDict = {}
newDict = dictText.copy()
newDict['analysresults'] = []... | TeoDar/table_ocr | App/Scripts/TextToJSON.py | TextToJSON.py | py | 1,279 | python | ru | code | 1 | github-code | 97 | [
{
"api_name": "json.dumps",
"line_number": 36,
"usage_type": "call"
}
] |
24727321947 | from azureml.core import Run
import argparse
import os
import pandas as pd
parser = argparse.ArgumentParser()
parser.add_argument('--filename',dest='dataset_name')
parser.add_argument('--preprocessed-data',dest="folder")
parser.add_argument('--dataset', dest="dataset")
args = parser.parse_args()
run = Run.get_conte... | manuelgilm/data_science-portafolio | machine_learning/bank_customer_churn_detection/scripts/pipeline_scripts/step1_processing_data.py | step1_processing_data.py | py | 623 | python | en | code | 2 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "azureml.core.Run.get_context",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "azureml.core.Run",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "... |
6598653332 | from django.conf.urls import url
from django.contrib import admin
from .views import (
doctor_list,
doctor_create,
doctor_detail,
doctor_update,
doctor_delete,
patient_create,
patient_detail,
patient_update,
doctors_selection,
doctor_choose,
patient_register,
patient_cancel,
)
urlpatterns = [
url(r... | jessbsm/DocSpeed | src/doctors/urls.py | urls.py | py | 1,099 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.conf.urls.url",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "views.doctor_list",
"line_number": 22,
"usage_type": "argument"
},
{
"api_name": "django.conf.urls.url",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "views... |
71254229119 | import importlib
NewsAPI = importlib.import_module("newsapi-python")
newsapi = NewsApiClient(api_key='0f6bb26533f74234ab55c3d6bcee6de2')
top_headlines = newsapi.get_top_headlines(q='bitcoin',
sources='bbc-news,the-verge',
category='bus... | Arunav07/SocioTech | NewsAPI.py | NewsAPI.py | py | 505 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "importlib.import_module",
"line_number": 2,
"usage_type": "call"
}
] |
39788145028 | import yaml
from typing import List
import networkx as nx
def read_tasks(filepath: str) -> nx.DiGraph:
"""Read config yaml file as Directed Acyclic Graph.
Args:
filepath: config yaml file path
Returns:
Directed Acyclic Graph
"""
tasks = _read_yaml(filepath)
return _create_da... | takeshi0406/ordmap | ordmap/ordmap.py | ordmap.py | py | 1,748 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "networkx.DiGraph",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "yaml.load",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "typing.List",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_nu... |
24312381339 | from __future__ import print_function
from numpy import array as Vector
from collections import namedtuple
from .vector_ops import *
from .kpclasses import Bead,chainDeepCopy
from .writer import *
from .reader import *
from .config import EPSILON,VERBOSE
from knot_pull.finder import find_frame
def too_far(p1 ,p2 ,p3... | dzarmola/knot_pull | knot_pull/puller.py | puller.py | py | 14,638 | python | en | code | 7 | github-code | 97 | [
{
"api_name": "kpclasses.Bead",
"line_number": 145,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 145,
"usage_type": "call"
},
{
"api_name": "config.EPSILON",
"line_number": 172,
"usage_type": "name"
},
{
"api_name": "kpclasses.Bead",
"li... |
20803634068 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0016_auto_20150930_1628'),
]
operations = [
migrations.CreateModel(
name='StaffProfile',
fie... | Dete-Desai/cube-movers | server/core/migrations/0017_staffprofile.py | 0017_staffprofile.py | py | 539 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "django.db.migrations.Migration",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.db.migrations",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.db.migrations.CreateModel",
"line_number": 14,
"usage_type": "call"
},
... |
794050319 | import argparse
import os
from f7utils import *
import pandas as pd
import numpy as np
from typing import Tuple, NewType
try:
from termcolor import colored
COLORFUL = True
except ImportError as ie:
print(f"""The package `termcolor` is an optional dependency, \
which seems to not be installed in your syste... | Yoquec/fase7EDR | fileAggregator.py | fileAggregator.py | py | 6,845 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "typing.NewType",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "numpy.ndarray",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "termcolor.colored",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "termcolor.colored... |
8815902012 | from operator import ge
import numpy as np
import cv2
import dlib
from pathlib import Path
import glob
from tensorflow.keras.models import load_model
from architecture import *
from tensorflow.keras.models import load_model
import tensorflow.keras
from utils import detector_utils as detector_utils
import tensorflow as... | kiko77/AI-final | ver1.py | ver1.py | py | 12,650 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "cv2.imread",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "cv2.resize",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "cv2.imwrite",
"line_number": 3... |
73918976958 | from time import sleep
from therm import *
from lcd import *
from button import *
from actuator import *
import tensorflow as tf
import datetime
model = tf.keras.models.load_model("model.hdf5")
def time_now():
now = datetime.datetime.now()
return now.hour + now.minute/60
while True:
while not get_auto_st... | datbt207/smart-bedroom-with-artificial-intelligent | Sources/main.py | main.py | py | 669 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "tensorflow.keras.models.load_model",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "tensorflow.keras",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "datetime.datetime.now",
"line_number": 12,
"usage_type": "call"
},
{
"api_... |
1634395522 | import sys
import pyqtgraph as pg
from PyQt5 import QtCore, QtGui, QtWidgets
from pyqtgraph.widgets.MatplotlibWidget import MatplotlibWidget
from core.gui_utils import validate_session, Communicate, validate_cut, find_tetrodes
from core.default_parameters import project_name, default_filename, defaultXAxis, defaultYAxi... | GeoffBarrett/gebaSpike | gebaSpike/main.py | main.py | py | 37,969 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "PyQt5.QtWidgets.QWidget",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "PyQt5.QtWidgets",
"line_number": 25,
"usage_type": "name"
},
{
"api_name": "core.default_parameters.project_name",
"line_number": 33,
"usage_type": "name"
},
{
... |
70621912640 | """
Created by Gotham on 10-06-2018.
"""
import facebook
class FacebookWallPoster:
def __init__(self, access_token, version='2.7', profile_id='me'):
self.profile_id = profile_id
self.graph = facebook.GraphAPI(access_token=access_token, version=version)
def construct_post(self, message, **kwar... | gotham13/TWI_to_FB | FacebookWallPoster.py | FacebookWallPoster.py | py | 1,249 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "facebook.GraphAPI",
"line_number": 10,
"usage_type": "call"
}
] |
37848547381 | from pathlib import Path
import json
import os
from flask import Flask, render_template, send_from_directory, jsonify
app = Flask(__name__)
app.config['FREEZER_REMOVE_EXTRA_FILES'] = False
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = 0
app.static_folder = 'static'
# app.config['DEBUG']=True
app.config["TEMPLATES_AUTO_REL... | sertalpbilal/flask_vue_app_template | app.py | app.py | py | 1,003 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "flask.send_from_directory",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "os.environ... |
21995088918 | from KG_handler import *
from LM import *
import json
class multimedia_handler():
def __init__(self, KG_handler:KG_handler, LM_ner:LM_ner, json_path='utils/images.json'):
self.KG = KG_handler
self.ner = LM_ner
with open(json_path, 'r') as f:
self.image_net = j... | tttequila/ATAI_chatbot | Multimedia.py | Multimedia.py | py | 2,305 | python | en | code | 1 | github-code | 97 | [
{
"api_name": "json.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sparknlp.start",
"line_number": 63,
"usage_type": "call"
}
] |
15898238835 | import getpass
import os
import shutil
import argparse
THRESHOLD = 400000
EXTENSION = '.jpg'
COUNTER = 0
parser = argparse.ArgumentParser(description='Windows 10 Login Image Finder Script')
parser.add_argument('-t', '--threshold', help = 'Minimum size for conversion, in bytes (default: 400KB)')
parser.add_argument('-... | rlamchops/fli | fli.py | fli.py | py | 2,000 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.isdir",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 27,
"usage_type": "attribute"
},
{
"api_name": "os.chdir",
"li... |
20832290641 | from django.db import models
class НаселПунктТип(models.Model): # 4.89
ТипНаселПункт = models.CharField(max_length=30, null=True,
verbose_name='Тип элемента населенный пункт (поселок, село и т.п.)')
НаимНаселПункт = models.CharField(max_length=255, null=True,
... | kmakeev/fnsservice | fnsservice/fns/models_/НаселПунктТип.py | НаселПунктТип.py | py | 1,376 | python | ru | code | 2 | github-code | 97 | [
{
"api_name": "django.db.models.Model",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "... |
20186744435 | #!/usr/bin/python
#author: jfernandezm
import zeep
import pandas as pd
from zeep.helpers import serialize_object
import datetime as dt
import numpy as np
from time import sleep
import sys
def consultaseries(user,pw,fInic,fFin,series):
#Creación de inputs para conectar al webservice
user=str(user)
pw=... | juan-castro-1/alphacast_chile | getseries.py | getseries.py | py | 7,143 | python | es | code | 1 | github-code | 97 | [
{
"api_name": "numpy.unique",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "zeep.Client",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "zeep.helpers.serialize_obje... |
25090488049 | import os
import openai
import whisper
import tempfile
from dotenv import load_dotenv
from pydub import AudioSegment
load_dotenv()
openai.api_key = os.environ['OPENAI_API_KEY']
def transcribe_fn_tmp(audio_file):
s2t_model = whisper.load_model('base.en')
transcription = s2t_model.transcribe(audio_file)
... | apiraccini/whisper2me | utils/app_utils.py | app_utils.py | py | 2,315 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "dotenv.load_dotenv",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "openai.api_key",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "whisper.load_mode... |
17411065329 | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 15 09:17:09 2019
@author: harpal
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
market_df=pd.read_csv('D:\Harpal\TechnicalStuff\Complete_ML_Own\Programs\ML_programs\dataset\market_fact.csv')
customer_df=pd.r... | Harpal008/MLPrograms | Visaulization_Time_Series.py | Visaulization_Time_Series.py | py | 1,881 | python | en | code | 0 | github-code | 97 | [
{
"api_name": "pandas.read_csv",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
... |
27829362698 | #!/usr/bin/env python
import numpy as np
import pandas as pd
import mdtraj as mt
import itertools
import multiprocessing
import sys, os
from biopandas.mol2 import PandasMol2
import argparse
from argparse import RawDescriptionHelpFormatter
from rdkit import Chem
import subprocess as sp
# Define required atomic elemen... | zhenglz/onionnet-v2 | generate_features.py | generate_features.py | py | 14,142 | python | en | code | 4 | github-code | 97 | [
{
"api_name": "rdkit.Chem.MolFromPDBFile",
"line_number": 60,
"usage_type": "attribute"
},
{
"api_name": "rdkit.Chem",
"line_number": 60,
"usage_type": "name"
},
{
"api_name": "rdkit.Chem.MolFromMol2File",
"line_number": 61,
"usage_type": "attribute"
},
{
"api_nam... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.