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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
72556608054 | import json
import pandas as pd
import os
from datetime import date, datetime
import pytz
from app import app
from dash import Input, Output, State, callback_context
from data_prep.data_scheduling import check_increment_update_time_hourly
from data_prep.data_transform import prepare_data
rough_df = pd.read_feather('... | dovbysh/mo_analytics_form3 | pages/dashboard/store_data_clbks.py | store_data_clbks.py | py | 6,323 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_feather",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "data_prep.data_transform.prepare_data",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "pandas.read_feather",
"line_number": 44,
"usage_type": "call"
},
{
"api... |
71279286134 | '''
25.
I voti assegnati a 30 studenti di una classe in una prova di italiano sono memorizzati in un dizionario
che ha per chiave la matricola, mentre il valore associato è il voto. Elenca i risultati in ordine crescente di voto
e successivamente visualizza quali voti diversi tra loro sono stati assegnati, riducendo a... | citarellag/esercizi-scuola | 25_26-190.py | 25_26-190.py | py | 1,695 | python | it | code | 0 | github-code | 21 | [
{
"api_name": "statistics.mean",
"line_number": 40,
"usage_type": "call"
}
] |
8179728103 | import re
import logging
import numpy as np
from gtd.utils import memoize
@memoize
def get_spacy():
"""
Loads the spaCy english processor.
Tokenizing, Parsing, and NER are enabled. All other features are disabled.
Returns:
A spaCy Language object for English
"""
logging.info('Loading... | microsoft/ContextualSP | lemon/executor/gtd/text.py | text.py | py | 5,683 | python | en | code | 348 | github-code | 21 | [
{
"api_name": "logging.info",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "spacy.en.en.English",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "spacy.en.en",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "spacy.en",
"lin... |
6309535277 | #!/usr/bin/python2.7
from numpy.core.multiarray import ndarray
from GT3.BeamDeposition.Functions.GetMFP import get_mfp, sigeff
from scipy.interpolate import UnivariateSpline
from scipy.integrate import quad, fixed_quad, cumtrapz
from math import sqrt, exp
from time import time
import warnings
import numpy as np
from s... | gt-frc/gt3 | GT3/BeamDeposition/Functions/Beam.py | Beam.py | py | 65,119 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "scipy.constants.physical_constants",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "scipy.constants",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "collections.namedtuple",
"line_number": 42,
"usage_type": "call"
},
{
"ap... |
74918557811 | #Доступ к атрибутам тэгов и замена атрибутов средствами BeautifulSoup'а.
from bs4 import BeautifulSoup
with open("index.html") as fp:
soup = BeautifulSoup(fp)
tag1 = soup.span.attrs #Доступ ко всем атрибутам тега.
tag2 = soup.span['id'] #Доступ к атрибуту id.
tag3 = soup.span['class'] #Доступ к атрибу... | uzwer1/my-parse | parser-treating_tags_attrs.py | parser-treating_tags_attrs.py | py | 698 | python | ru | code | 0 | github-code | 21 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 6,
"usage_type": "call"
}
] |
22675140110 | import boto3
import json
class Interactions:
def __init__(self):
self.firehose_client = boto3.client(service_name='firehose')
# saves customer interactions into an S3 bucket using Firehose
def save_interaction(self, interaction):
put_record_response = self.firehose_client.put_record(
... | rami8k/samples | py-recommendations-engine/src/core/services/services/Interactions.py | Interactions.py | py | 543 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "boto3.client",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 13,
"usage_type": "call"
}
] |
35899220461 | from tkinter import *
import psycopg2
connection_string = "host='localhost' dbname='Databese Zuil' user='postgres' password='kaas'"
conn = psycopg2.connect(connection_string)
cursor = conn.cursor()
query = """SELECT tekst_bericht, naam_reiziger
FROM bericht
WHERE status_beoordeling = 'g' ;"""
cursor.e... | RamonSiers/nszuil | wah3.py | wah3.py | py | 821 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "psycopg2.connect",
"line_number": 5,
"usage_type": "call"
}
] |
35546462015 | import copy
from itertools import combinations, chain
from numpy.linalg import inv
import numpy as np
from utils import *
import pandas as pd
import networkx as nx
class TMFG:
def __init__(self):
pass
def fit(self, weights, output, cov=None):
'''
The `fit` method is a member of the ... | FinancialComputingUCL/Triangulated_Maximally_Filtered_Graph | TMFG_core.py | TMFG_core.py | py | 11,637 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "copy.copy",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 58... |
7997483292 | from AccessControl import Permissions
from AccessControl import Unauthorized
from Acquisition import aq_base
from Acquisition import aq_parent
from plone.app.testing import logout
from plone.app.testing import setRoles
from plone.app.testing import TEST_USER_ID
from Products.CMFCore.utils import getToolByName
from Prod... | plone/Products.PlonePAS | src/Products/PlonePAS/tests/test_groupstool.py | test_groupstool.py | py | 10,214 | python | en | code | 6 | github-code | 21 | [
{
"api_name": "unittest.TestCase",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "Products.PlonePAS.testing.PRODUCTS_PLONEPAS_INTEGRATION_TESTING",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "Products.CMFCore.utils.getToolByName",
"line_number": ... |
38527759517 | import scrapy
import json
from ximalaya.items import XimalayaItem
class XimalayaSpider(scrapy.Spider):
name = "ximalaya"
start_urls = [
"http://www.ximalaya.com/81407276/album/10401275/",
]
def parse(self, response):
for sound_id in response.css('li[sound_id]'):
yield respo... | suwenjiang/TinyTools | ximalaya/ximalaya/spiders/download_spider.py | download_spider.py | py | 809 | python | en | code | 8 | github-code | 21 | [
{
"api_name": "scrapy.Spider",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "ximalaya.items.XimalayaItem",
"line_number": 26,
"usage_type": "call"
}
] |
17397222923 | from skimage.feature import hog
from utils import rgb2gray
import os
import imageio
from os import listdir
import pandas as pd
# trainsetpath = os.path.join('E:\Ximenzi\Baseline\WeldFault\data\Train', str(0)) # 路径拼接
# file = listdir(trainsetpath)
# print(len(file))
# def creatHogvec(zero):
for j in range... | huliqujing/WeldFault | extract_Hogfeat.py | extract_Hogfeat.py | py | 2,142 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "imageio.imread",
"line_numbe... |
74451949494 | import os
import matplotlib.pyplot as plt
import cv2
TRAIN_PATH = './data/train/'
classes = os.listdir(TRAIN_PATH)
class_names = []
class_nums = []
img_size_x = []
img_size_y = []
for c in classes:
images = os.listdir(os.path.join(TRAIN_PATH, c))
class_names.append(int(c))
class_nums.append(len(images))
... | babarosa08/BaiduXJ | 02_inspect_data.py | 02_inspect_data.py | py | 917 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.listdir",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 13,
... |
35451907 | import datetime
import socket
import time
from communication.decoders import Decoder
from communication.encoders import Encoder
from communication.opcodes import *
from server.engine import Engine
class GameServer:
def __init__(self, host, port, fps=60):
self.host = host
self.port = port
... | tudorvaran/university | vgd/server/gameserver.py | gameserver.py | py | 3,195 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "server.engine.Engine",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "socket.socket",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "socket.AF_INET",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "socket.SOCK_ST... |
38793854222 | """The longest sentence is more than 500 words, thus we need to extract a span.
Following the distribution of train set, there are:
4.4% sentences within 10 words,
23.9% sentences between 10~20 words,
33.3% sentences between 20~30 words,
23.6% sentences between 30~40 words,
10.9% sentences between 4... | waltbai/MCPredictor | experiments/scan_sents.py | scan_sents.py | py | 1,816 | python | en | code | 14 | github-code | 21 | [
{
"api_name": "mcpredictor.utils.config.CONFIG.work_dir",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "mcpredictor.utils.config.CONFIG",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 24,
"usage_type": "call"
},... |
27726282228 | from django.contrib import admin
from django.urls import path
from predictionApi import views
urlpatterns = [
path('', views.react),
path('symptoms/', views.liverDiseaseSymptoms),
path('predictdisease/', views.liverDiseasePrediction),
path('download/', views.downloadsample),
path('result/', views.d... | Vishnubalu/Prediction-Server | virtusa/urls.py | urls.py | py | 414 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "predictionApi.views.react",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "predictionApi.views",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "djan... |
19081410575 | #Start Logger
import logger as lg
lg.init()
logger = lg.log;
import json, argparse
from answeringEngine import answeringEngine, user
from JobsiteSniffers.ottaJobsniffer import ottaJobsniffer
#Load Secret keys
fSecrets = open("secrets.json", "r")
secrets = json.load(fSecrets)
fSecrets.close()
global globalSettings;
... | Fwuffie/GPT3IsAGoodSoftwareEngineer | main.py | main.py | py | 4,188 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "logger.init",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "logger.log",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "json.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "answeringEngine.user",
"line_... |
42416670996 | from __future__ import print_function
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait as wait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options
from bs4 import Beautifu... | Makas9/CheapFareFetcher | tripcom.py | tripcom.py | py | 5,776 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "datetime.datetime.strptime",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 34,
"usage_type": "call"
},
{
"api_name"... |
1659127836 | import sys
from collections import deque
input = sys.stdin.readline
N, S, D, F, B, K = map(int, input().split())
chk = [0] * (N + 100000) # 방문했던 곳에 다시 방문하면 최소가 아니다 -> 방문 체크해서 방문한 곳 다시 안 가게 함.
if K != 0:
police_offices = list(map(int, input().split()))
# 경찰서는 방문하면 안되니, 방문 체크
for police_office in police_... | mintropy/algorithm_pulzo | 김서인/2108/210820/13700/13700.py | 13700.py | py | 1,103 | python | ko | code | 3 | github-code | 21 | [
{
"api_name": "sys.stdin",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 18,
"usage_type": "call"
}
] |
32427097668 | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
df_train=pd.read_csv('train.csv') #You should enter the location of you data files
df_test=pd.read_csv('test.csv') #in the brackets given.
columns= list(df_train.columns)
def phi(x_train, n):
X=np.array([[1.0]*(n+1)]*len(... | RajdevShivam/ML | Regression/16AE30018_AS1_Part_3.py | 16AE30018_AS1_Part_3.py | py | 4,094 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_num... |
29554675317 | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 19 19:37:12 2016
@author: aeloyq
"""
class Config:
def __init__(self):
self.name = 'unamed'
self.batch_size = 20
self.valid_batch_size = 64
self.max_epoch = 50
self.savelog = True
self.verbose = 5
def set(self, **... | aeloyq/NNBuilder | nnbuilder/main.py | main.py | py | 17,112 | python | en | code | 6 | github-code | 21 | [
{
"api_name": "numpy.arange",
"line_number": 106,
"usage_type": "call"
},
{
"api_name": "numpy.sort",
"line_number": 175,
"usage_type": "call"
},
{
"api_name": "numpy.random.permutation",
"line_number": 175,
"usage_type": "call"
},
{
"api_name": "numpy.random",
... |
72224131574 | #!/usr/bin/env python3
# Python 3.9.5
# Dependencies
import networkx as nx
import matplotlib.pyplot as plt
GRAPH = nx.path_graph(4)
locations = {0: 'Miami', 1: 'Atlanta', 2: 'Charlotte', 3:'Washington'}
LABELED_GRAPH = nx.relabel_nodes(GRAPH, locations)
nx.draw(LABELED_GRAPH, with_labels=True)
plt.show()
| fenceMeshwire/python_matplotlib | 01_path_graph.py | 01_path_graph.py | py | 311 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "networkx.path_graph",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "networkx.relabel_nodes",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "networkx.draw",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.py... |
17877942235 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Piotr Pasich, Łukasz Wycisło
WSB, Informatyka, Niestacjonarne, Programowanie w jezyku Python
Zestaw 5
"""
import math
"""
Zadanie 1
"""
def getUserNumber():
return input("Podaj liczbę: ")
def parseNumbers(f, n):
numbers = []
while len(numbers) < n:
... | piotrpasich/python_exercises | zestaw5.py | zestaw5.py | py | 2,196 | python | pl | code | 0 | github-code | 21 | [
{
"api_name": "math.sqrt",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "math.pow",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 45,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": 46,
"... |
73806220854 | from __future__ import print_function
import tensorflow as tf
from keras.models import Sequential
from config import *
from keras.layers import Activation, Input
from keras.layers.core import Dropout, Reshape, Flatten
from keras import optimizers
from keras.models import Model
from keras.layers import Dense
from kera... | yenicelik/CapgInterSession | model/build_model.py | build_model.py | py | 5,504 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "keras.layers.Input",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "keras.layers.normalization.BatchNormalization",
"line_number": 40,
"usage_type": "call"
},
{
... |
38653266845 | import os.path as osp
import torch
import numpy as np
import pandas as pd
import os
import networkx as nx
import torch_geometric.transforms as T
from torch_geometric.utils import to_networkx
from torch_geometric.data import Data
from torch_geometric.utils import remove_isolated_nodes, remove_self_loops
from tqdm import... | jqmcginnis/vessel_graph_pipeline | analysis/analyze_loops.py | analyze_loops.py | py | 6,056 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "torch_geometric.data.Data",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torch.from_... |
74537705334 | # !/usr/bin/env python
# -*- encoding: utf-8 -*-
# @File: maskface.py
# @Time: 2022/06/09 11:10:35
# @Author: zhouhl-b
from __future__ import division
import datetime
import numpy as np
import onnx
import onnxruntime
import os
import os.path as osp
import cv2
import sys
import time
from .postprocess import (DETPostPr... | zhleternity/mask-face-det-landmark | insightface/model_zoo/mask/maskface.py | maskface.py | py | 5,546 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "numpy.max",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "numpy.newaxis",
"line_number": 24,
"usage_type": "attribute"
},
{
"api_name": "numpy.exp",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number":... |
45645964705 | # -*- coding: utf-8 -*-
import scrapy
from urllib import parse
from items import qidianBookListTtem
from scrapy_redis.spiders import RedisSpider
class QidianspiderSpider(RedisSpider):
name = 'qidianSpider'
allowed_domains = ['https://www.qidian.com']
redis_key = "qidianspider:star_urls"
start_urls = ... | ricardozhang1/crawl_qidian | qidianSpider.py | qidianSpider.py | py | 1,555 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "scrapy_redis.spiders.RedisSpider",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "items.qidianBookListTtem",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "scrapy.Request",
"line_number": 35,
"usage_type": "call"
}
] |
9734031794 | from django.db import models
from django.contrib.auth.models import AbstractUser
from ckeditor.fields import RichTextField
from phonenumber_field.modelfields import PhoneNumberField
import os
from django.core.validators import RegexValidator
# Create your models here.
class GroupNumber(models.Model):
nu... | casplaer/MCAS | base/models.py | models.py | py | 6,521 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "django.db.models.Model",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "django.db.models.CharField",
"line_number": 11,
"usage_type": "call"
},
{
"api_name"... |
3669805907 | import numpy as np
import cv2
import os.path
from model.I3DModel import I3DModel
batch_count = 20
clip_frame_count = 15
im_size = 224
model = I3DModel('model/graph_optimized.pb')
def process_batch(batch, batch_id, save_dir):
print('processing batch...')
# normalize values to (-1,1)
normalized_batch = np... | MDSKUL/MasterProject | stap3/extract_features.py | extract_features.py | py | 2,043 | python | en | code | 35 | github-code | 21 | [
{
"api_name": "model.I3DModel",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "model.I3DModel.I3DModel",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "numpy.interp",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.size",
... |
2850429303 | from typing import Union, Any
from casadi import MX, SX, vertcat
from ..optimization.non_linear_program import NonLinearProgram
class PenaltyNodeList:
"""
A placeholder for the required elements to compute a penalty (all time)
"""
def __init__(self, ocp, nlp: NonLinearProgram, t: list, x: list, u: ... | AurelienRenou/Stage_link_home_lab | bioptim-master/bioptim-master/bioptim/limits/penalty_node.py | penalty_node.py | py | 3,830 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "optimization.non_linear_program.NonLinearProgram",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "casadi.MX",
"line_number": 13,
"usage_type": "name"
},
{
"api_name"... |
40756997312 | import re
from pandas import Series,DataFrame,concat
import pandas as pd
from pymongo import MongoClient
import json
import logging
from logging.config import fileConfig
import configparser
fileConfig('logger_config.ini')
logger=logging.getLogger('infoLogger')
class TransWLS():
def __init__(self):
self.cf... | yyztc/itop | trans_weblogic.py | trans_weblogic.py | py | 2,035 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.config.fileConfig",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "configparser.ConfigParser",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": ... |
72452126134 | import os
from typing import Any, List
from PIL import Image
import pandas as pd
import torch
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms as T
import random
def get_datasets(
root_dir: str,
domains: List,
train=True,
split_rat: List[int]=[10_... | myasincifci/wilds_test | wilds_dataset.py | wilds_dataset.py | py | 2,827 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "pandas.read_csv",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_numb... |
10242409340 | from handler.handler import NeuralBackendHandler
from flask import Flask, request, jsonify
app = Flask(__name__)
handler = NeuralBackendHandler(
'http://0.0.0.0:8501/v1/models/neural_poet:predict'
)
@app.route('/write_poem', methods=['POST'])
def write_poem():
if not request.is_json:
print(f'NON-JSO... | Preep/lstm-poet | backend/app/main.py | main.py | py | 1,158 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "handler.handler",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "handler.handler.NeuralBackendHandler",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask.r... |
73041845493 | from __future__ import absolute_import
from imp import reload
import imp
import os
import sys
import shutil
reload(sys)
if hasattr(sys, 'setdefaultencoding'):
sys.setdefaultencoding('latin-1')
import pytest
from retriever.lib.tools import getmd5
from retriever import ENGINE_LIST
# Set postgres password, Appveyor ... | LiuFang816/SALSTM_py_data | python/weecology_retriever/retriever-master/test/test_regression_cli.py | test_regression_cli.py | py | 5,461 | python | en | code | 9 | github-code | 21 | [
{
"api_name": "imp.reload",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.setdefaultencoding",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.name",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "retriever.ENGINE_LIST",... |
25827734025 | from torch import nn
import torch
import torchvision
from matplotlib import pyplot as plt
import torch.nn.functional as F
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
class Generator(nn.Module):
def __init__(self, g_input_dim = 64, g_output_dim = 784):
super().__init__()
self.dense... | Sumeet2807/GANs | models/MNIST_AGAD_v2.py | MNIST_AGAD_v2.py | py | 3,713 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "torch.device",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "torch.cuda.is_available",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "torch.cuda",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.nn.Module",
... |
203259488 | from flask import Flask, request, g, render_template, send_file, session, make_response, redirect
import json
import os
from environs import Env
env = Env()
env.read_env()
config_string = env.str("CONTROLLER_CONFIG", default='{"port": 8080, "actions": {"test": "date", "stop": "echo stop"}}')
config = json.loads(config... | matthieudelaro/remote-controller | main.py | main.py | py | 1,442 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "environs.Env",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 12,... |
40365354914 | from datetime import datetime, timedelta, date
from functools import partial
from itertools import groupby
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models, _
from odoo.exceptions import UserError, ValidationError
from odoo.tools.misc import formatLang
from odoo.osv import expressi... | omikronkreatif/Kanjabungnew | asa_simpin_syariah/models/syariah_pinjaman.py | syariah_pinjaman.py | py | 27,921 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "odoo.models.Model",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "odoo.fields.Many2one",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "odoo.fields",... |
37637964003 | #---------------------------------------------#
# 运行前一定要修改classes
# 如果生成的2007_train.txt里面没有目标信息
# 那么就是因为classes没有设定正确
#---------------------------------------------#
import xml.etree.ElementTree as ET
from os import getcwd
sets=[('2007', 'train'), ('2007', 'val'), ('2007', 'test')]
#--------------------... | mingyi1992/yolo-v4 | voc_annotation.py | voc_annotation.py | py | 3,384 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "os.getcwd",
"line_number": 46,
"usage_type": "call"
}
] |
71535968054 | import os
import datetime
import uuid
import werkzeug
from app import celery, s3_client, io
from app.utils.encoding import b64str_to_bytes, bytes_to_b64str
from app.utils.io import S3InputOutputProvider
@celery.task()
def upload_test_file_task(b64_str, filepath):
filedir = os.path.dirname(filepath)
if not ... | andrius-sil/climbicus | server/app/tasks.py | tasks.py | py | 1,649 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "os.path.dirname",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_numbe... |
42768584777 | from django import forms
from django.utils.translation import ugettext_lazy as _
class EmployeeDataForm(forms.Form):
input_text = forms.CharField(
label=_('Input text'),
required=False,
widget=forms.TextInput(attrs={
'placeholder': _('Write the data in this field')
})
... | carlosacg/ACME_Payments | apps/payments/forms.py | forms.py | py | 384 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.forms.Form",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "django.forms",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "django.forms.CharField",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.forms"... |
25893278650 |
from gtts import gtts
import Time
from playsound import playsound
text_val = input("Enter your Text: ")
time.sleep(0.1)
language = 'en'
obj = gTTS(text=text_val, lang=language, slow=False)
obj.save("exam.mp3")
playsound("exam.mp3")
time.sleep(60) | Krish-198/Text-To-Speech | main.py | main.py | py | 247 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "playsound.playsound",
"line_number": 10,
"usage_type": "call"
}
] |
42654084843 | from rest_framework import routers
from django.conf.urls import url, include
from sso.endpoints import (
AuthTokenApiView,
UserViewSet
)
router = routers.SimpleRouter()
router.register(r'users', UserViewSet)
urlpatterns = [
url(r'^', include(router.urls)),
url(r'^auth/', AuthTokenApiView.as_view(), ... | Kimiato/MyEcho-Blog | sso/urls.py | urls.py | py | 334 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rest_framework.routers.SimpleRouter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "rest_framework.routers",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "sso.endpoints.UserViewSet",
"line_number": 11,
"usage_type": "argument"
},
{... |
20862287413 | from catboost import CatBoostRegressor
from flask import Flask, request, jsonify
import pandas as pd
# Initialize the Flask app
app = Flask(__name__)
model = CatBoostRegressor()
model.load_model("mm_catboost_model.h5")
df_train = pd.read_parquet("tv_data_processed.parquet")
@app.route("/predict", methods=['POST'])... | werzawerz/tv_model | mm_inference_api.py | mm_inference_api.py | py | 1,230 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "catboost.CatBoostRegressor",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "pandas.read_parquet",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask.reques... |
70255321972 | # 백준 14502: 연구소
# 문제 요약
# 바이러스(2)는 상하좌우 방향의 빈 공간(0)으로 확산
# 바이러스는 벽(1)을 통과하지 못함
# 맵에서 벽을 반드시 3개를 세워야 한다
# 바이러스가 퍼지지 않는 안전영역의 갯수가 최대인 값을 구하라
# 1. 아이디어
# 바이러스가 퍼지는 영역은 BFS를 이용해서 구할 수 있다.
# 벽을 세우는 위치는 규칙이 없으므로 완전탐색을 통해서 구현해야 한다.
# 2. 자료구조
# graph : 입력으로 제공되는 맵 저장
# queue : BFS를 구현하기 위한 큐
# answer : 안전영역의 최대값을 저장할 변수
imp... | vfrnji124/algorithm_practice | Baekjoon/BAEKJOON14502_연구소_0724_01.py | BAEKJOON14502_연구소_0724_01.py | py | 1,843 | python | ko | code | 0 | github-code | 21 | [
{
"api_name": "sys.stdin",
"line_number": 18,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "itertools.combinations",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "copy.deepcopy... |
71574545013 | #!/bin/env python3
from os import path, getcwd, mkdir, scandir, listdir
from bs4 import BeautifulSoup
from zipfile import ZipFile
import xml.etree.ElementTree as ET
from shutil import copy, rmtree
import argparse
from functions import *
__location__ = path.realpath( path.join( getcwd(), path.dirname(__file__) ) )
B... | alexbatistaarantes/epubToWeb | epubToWeb.py | epubToWeb.py | py | 10,484 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "os.path.realpath",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.getcwd",
"line_number": ... |
20706654680 | from custom_module import get_tools as getkrw
import requests, redis, json, time, math
import numpy as np
import pandas as pd
def get_all_krw(host,port,db):
r = redis.Redis(host=host, port=port, db=db)
url = "https://api.bithumb.com/public/ticker/ALL_KRW"
headers = {"accept": "application/json"}
respon... | Douggy91/AC_GroupTest | pyweb-app/crawling_data.py | crawling_data.py | py | 1,081 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "redis.Redis",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "math.floor",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 16... |
73594721654 |
import numpy as np
import random
import matplotlib.pyplot as plt
import math
class UAVTASKENV():
def __init__(self, c1, c2):
#initializing UAV fog server cordinates and data for each UAV task and other variables
self.k = plt.subplots()
self.fig = self.k[0]
self.ax = self.k[1]
self.cluster1 ... | Dev-shrm07/SkyNetMEC | code/uav_env.py | uav_env.py | py | 5,790 | python | en | code | 24 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "numpy.full",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "math.log10",
... |
14722400073 | # coding: utf-8
import numpy as np
import matplotlib.pyplot as plt
import scipy.signal as ssg
import glob
plt.ion ()
############ PARAMETERS
fs=2048
T=1
t = np.arange (0, int(T*fs)) / fs
tsize = t.size
############ ccsn
print ("ccsn")
FF = glob.glob ("ccsn_signals/*.dat")
FL = len(FF)
NITER = 15
NSAMP = FL * NITER
### ... | shiningsurya/gwa_final | create_ccsn.py | create_ccsn.py | py | 1,188 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.ion",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "numpy.arange",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"l... |
2008674596 | import json
import time
import cherrypy
register = []
class Person(object):
def __init__(self, name, surname, sex, age:int):
self.__name = name
self.__surname = surname
self.__sex = sex
self.__age = age
def getName(self):
return self.__name
def getSurname(self):
return self.__surname
def getSex(sel... | grzianod/IoT | samples/cherrypy2.py | cherrypy2.py | py | 2,725 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "cherrypy.HTTPError",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "cherrypy.HTTPError",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "cherrypy.HTTPError",
"line_number": 48,
"usage_type": "call"
},
{
"api_name": "time.time",
... |
6533219535 | #!/usr/bin/env python
# coding: utf-8
# In[18]:
#크롤링시 필요한 라이브러리 불러오기
import time
from bs4 import BeautifulSoup
import requests
headers = {'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36'}
# In[19]:
# 페이지 url 형식에 맞게 바꾸어 주는 함수 만들기
#... | Peach0720/E.T | 크롤러/naver_종토.py | naver_종토.py | py | 4,554 | python | ko | code | 0 | github-code | 21 | [
{
"api_name": "requests.get",
"line_number": 64,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 77,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"... |
9769773738 | from django import views
from django.urls import path
from django.contrib.auth.views import LogoutView
from .views import *
urlpatterns = [
path('creacion-servicio/', ServicioCreacion.as_view(), name='creacion-servicio'),
path('acerca-de-nosotros/', about, name='acerca-de-nosotros'),
path('impresion3d-li... | jfaguerre55/EntregaFinal_Aguerre_daSilva_Martinez | App_Services/urls.py | urls.py | py | 2,101 | python | es | code | 0 | github-code | 21 | [
{
"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": 11,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
36200777527 | """
@author Luke Jordan (bruceli)
"""
import boto3
from datetime import date
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('profiles')
"""
Get the items in the database by using a list of emails and usernames
How to interpret response:
["Responses"]["profiles"][1]["username"] would get the second... | GODZAOZAO/aws-lambdas-master | helper_files/database.py | database.py | py | 3,473 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "boto3.resource",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "datetime.date.today",
"line_number": 42,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"line_number": 42,
"usage_type": "name"
}
] |
15107524591 | #===================
from tkinter import *
import tkinter.messagebox
from instaloader import *
from PIL import ImageTk
from PIL import *
#===================
class insta:
def __init__(self,root):
self.root=root
self.root.title("Instagram")
self.root.geometry("500x300")
sel... | ShreyasMohite/PY_Instagram | Instgram.py | Instgram.py | py | 8,501 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "tkinter.messagebox.askretrycancel",
"line_number": 118,
"usage_type": "call"
},
{
"api_name": "tkinter.messagebox",
"line_number": 118,
"usage_type": "attribute"
},
{
"api_name": "tkinter.messagebox.askretrycancel",
"line_number": 123,
"usage_type": "call"
... |
2182426989 | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 29 12:46:11 2019
@author: Jean Mário
"""
import numpy as np
from sklearn.svm import SVR
from sklearn.neural_network import BernoulliRBM
from sklearn.model_selection import train_test_split
from sklearn import metrics
from sklearn.preprocessing import MinMax... | jeanmmlima/deep-learning | rbm/rbm_svm.py | rbm_svm.py | py | 2,371 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.arange",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "sklearn.preprocessing.MinMaxScaler",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 31,
"usage_type": "call"
},
... |
11554806624 | from collections import defaultdict
from re import findall
def load_data(path="input.data"):
with open(path) as fobj:
return [list(map(int, findall(r"\d+", row))) for row in fobj]
def draw_lines(lines, diagonals=False):
covered = defaultdict(int)
for x1, y1, x2, y2 in lines:
# vertical l... | suic86/adventofcode | 2021/day_05/solution.py | solution.py | py | 1,294 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "re.findall",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 11,
"usage_type": "call"
}
] |
6786434705 | import gzip
import io
from unittest import TestCase
from unittest.mock import Mock
from botocore.response import StreamingBody
from boto3_large_message_utils.parser import LargeMessageParser
class TestRetrieveFromS3(TestCase):
def setUp(self):
self.parser = LargeMessageParser()
self.parser.s3.ge... | infinitytracking/boto3-large-message-utils | tests/test_parser.py | test_parser.py | py | 1,416 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "unittest.TestCase",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "boto3_large_message_utils.parser.LargeMessageParser",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "unittest.mock.Mock",
"line_number": 14,
"usage_type": "call"
},
... |
32472203671 | #!/home/user/anaconda3/bin/python
import requests
from twstock import Stock, proxy
import twstock
import sys
import time
from datetime import datetime
import pandas as pd
import random
import argparse
import os
from twse import twse
import json
proxy_list = [
{'http': 'http://5.189.133.231:80'},
{'http': 'htt... | pohunghuang-nctu/STOCK_PRICE_CNN | data_collect.py | data_collect.py | py | 6,867 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "random.shuffle",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "twstock.proxy.RoundRobinProxiesProvider",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "twstock.proxy",
"line_number": 34,
"usage_type": "name"
},
{
"api_name": "... |
3804238831 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import collections
from datetime import date, datetime
import io
import itertools
from ..utils.py3 import urlopen, urlquote
from .. import feed
from ..utils import date2num
class YahooFinanceCSVData(feed.C... | yuspan/backtrader | backtrader/feeds/yahoo.py | yahoo.py | py | 5,456 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.deque",
"line_number": 58,
"usage_type": "call"
},
{
"api_name": "io.StringIO",
"line_number": 62,
"usage_type": "call"
},
{
"api_name": "itertools.count",
"line_number": 69,
"usage_type": "call"
},
{
"api_name": "datetime.date",
"li... |
74464793654 | import os
import sys
OS = '/run/media/pengfei/OTHERS/' #
sys.path.append(OS+'Gitlab/pythonsharedfunctions.git')
import pandas as pd
from collections import defaultdict, Counter
import lib_file
from lib_timetable import Timetable, FlightTimetable
import lib_grid
import lib_graph
import lib_plot
import networkx as nx
fr... | YI-Pengfei/PythonSharedFunctions | examples/TransferScheme-InformsVersion/21-换乘方案-联合.py | 21-换乘方案-联合.py | py | 9,168 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sys.path.append",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "xpinyin.Pinyin",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "lib_file.read_file2df",
... |
5856469422 | import json
import boto3
import botocore.exceptions
def get_data(data):
try:
secret_name = "Sec_Compl_Postgres_Log_in"
region_name = "us-east-1"
session = boto3.session.Session()
client = session.client(
service_name='secretsmanager',
region_name=region_nam... | ferb00000100/docker | port_scanner/get_db_data.py | get_db_data.py | py | 1,691 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "boto3.session.Session",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "boto3.session",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "botocore.exceptio... |
10149305833 | from setuptools import setup, find_packages
from setuptools_rust import Binding, RustExtension
with open("README.md", mode="r", encoding="utf-8") as readme:
long_description = readme.read()
setup(
name='koai',
version="0.0.4.4",
description='Korean AI Project',
long_description="No Description",... | hkjeon13/koai | setup.py | setup.py | py | 1,198 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "setuptools.setup",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "setuptools_rust.RustExtension",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "setuptools_rust.Binding.PyO3",
"line_number": 20,
"usage_type": "attribute"
},
{
"a... |
12598389433 | import json
from django.db.models import signals
from django.template import loader, Context
from django.utils.html import escape
from dispatch.core.signals import post_create, post_update
from dispatch.modules.content.models import Article
from dispatch.modules.integrations.models import Integration
from dispatch.v... | TomDiFrancesco/DjangoRedis | venv/Lib/site-packages/dispatch/modules/integrations/integrations.py | integrations.py | py | 4,747 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "dispatch.modules.integrations.models.Integration.objects.get_settings",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "dispatch.modules.integrations.models.Integration.objects",
"line_number": 50,
"usage_type": "attribute"
},
{
"api_name": "dispatch.modu... |
11554701714 | from collections import defaultdict, deque
from functools import reduce
from itertools import chain, product, starmap
from operator import mul
MONSTER = [
" # ",
"# ## ## ###",
" # # # # # # ",
]
def read_data(path="input.data"):
tiles = defaultdict(list)
with op... | suic86/adventofcode | 2020/day_20/solution.py | solution.py | py | 8,647 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "collections.defaultdict",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "itertools.starmap",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "itertools.product",
"line_number": 73,
"usage_type": "call"
},
{
"api_name": "collectio... |
17156371080 | # -*- coding: utf-8 -*-
import argparse
from .download import sync
def cli_sync(argv=None):
'''CLI sync flickr folders'''
parser = argparse.ArgumentParser(description='Sync Flickr folder(s)')
parser.add_argument('--user-id', '-i', help='User ID', type=str)
parser.add_argument('--username', '-u', help=... | seignovert/python-flickr-apollo-archive | apolloarchive/cli.py | cli.py | py | 754 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "download.sync",
"line_number": 19,
"usage_type": "call"
}
] |
34040390195 | from .generators import PDFGenerator
from django.template import loader
from django.http import HttpResponse
from .settings import pdf_settings
from .utils import get_random_filename
def render_pdf(filename, request, template_name, context=None, content_type=None, status=None, using=None, options={}):
content = load... | VingtCinq/django-nightmare-pdf | nightmare_pdf/renderers.py | renderers.py | py | 853 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "django.template.loader.render_to_string",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.template.loader",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "django.http.HttpResponse",
"line_number": 11,
"usage_type": "call"
},
{
... |
41804141680 | import asyncio
import os
import subprocess
from datetime import datetime
from gtts import gTTS
from Deepak import legend
from Deepak.Config import Config
menu_category = "fun"
@legend.legend_cmd(
pattern="audio ([\s\S]*)",
command=("audio", menu_category),
info={
"header": "To convert text to A... | OFFICIALHACKERERA/PLUGINSS | Deepak/plugins/audio.py | audio.py | py | 2,735 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "datetime.datetime.now",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 33,
"usage_type": "name"
},
{
"api_name": "os.path.isdir",
"line_number": 57,
"usage_type": "call"
},
{
"api_name": "os.path",
"... |
11329478774 | import os, random
import torch
import argparse
import pytorch_lightning as pl
from pytorch_lightning import Trainer, seed_everything
from transformers import (AdamW, T5Tokenizer, BartTokenizer, BartForConditionalGeneration, T5ForConditionalGeneration, WEIGHTS_NAME,CONFIG_NAME)
from data_loader import prepare_data
from ... | facebookresearch/Zero-Shot-DST | T5DST/T5.py | T5.py | py | 9,881 | python | en | code | 82 | github-code | 21 | [
{
"api_name": "pytorch_lightning.LightningModule",
"line_number": 47,
"usage_type": "attribute"
},
{
"api_name": "transformers.AdamW",
"line_number": 87,
"usage_type": "call"
},
{
"api_name": "pytorch_lightning.seed_everything",
"line_number": 95,
"usage_type": "call"
}... |
38509467511 | from rest_framework.decorators import api_view
from rest_framework.response import Response
from .serializers import CompanySerializer
from .models import *
# Create your views here.
@api_view(['GET','POST'])
def home(request):
return Response({'message':'Hello World'})
@api_view(['GET'])
def productList(reques... | sachinspeaks/DRF-api | core/api/views.py | views.py | py | 1,467 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rest_framework.response.Response",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "rest_framework.decorators.api_view",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "serializers.CompanySerializer",
"line_number": 16,
"usage_type": "call... |
15302057237 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import pandas as pd
import numpy as np
from sklearn.linear_model import Ridge
from sklearn.metrics import mean_squared_error
def main():
## 读取X
lgb_pre = pd.read_csv('./output/submission_lgb.csv')
x1 = np.array(lgb_pre['revenue'].tolist()).reshape([4398, 1]... | bigangrybird/Kaggle | tmdb/cheat.py | cheat.py | py | 2,047 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pandas.read_csv",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_n... |
29976736313 | import numpy as np
import torch
import torch.nn.functional as F
import cv2
from .utils_post import vis_colored_pointcloud, pcwrite, scale_intrinsics
def to_tensor(a):
a_t = torch.from_numpy(a).float()
return a_t.unsqueeze(0)
def depth2flow(depth, K, poses, grid):
"""Unproject-transform-project to induce ... | thuzhaowang/idn-solver | post_processing/calConfidence.py | calConfidence.py | py | 3,812 | python | en | code | 45 | github-code | 21 | [
{
"api_name": "torch.from_numpy",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "torch.zeros",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "torch.zeros",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "torch.zeros",
"line_numbe... |
9204884405 | from rest_framework import generics, status
from rest_framework.views import APIView
from rest_framework.request import Request
from rest_framework.response import Response
from uuid import UUID
from friends.serializers import UserSerializer, FriendshipSerializer
from friends.models import CustomUser
from friends.stor... | ruslanzakharov/friends_service | friends/views.py | views.py | py | 6,715 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "rest_framework.generics.CreateAPIView",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.generics",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "friends.models.CustomUser.objects.all",
"line_number": 15,
"usage_type... |
3658360044 | from random import shuffle
import tkinter as tk
import json
class Numquiz:
def __init__(self):
with open("quest.json") as f:
self.quest = json.load(f)
shuffle(self.quest)
self.i = 0
self.question = ""
self.answer = ""
self.welcome_txt = "Willkommen zu... | whiskeyZZ/Numquiz | numquiz.py | numquiz.py | py | 2,507 | python | de | code | 0 | github-code | 21 | [
{
"api_name": "json.load",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "random.shuffle",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "tkinter.Tk",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "tkinter.Label",
"line_number"... |
72400361652 | import argparse
import json
import os
import sys
import requests
from timsconvert.timestamp import *
# Parse arguments for CLI usage
def get_args(server=False):
"""
Parse command line parameters, including required, optional, and system parameters.
:param server: If enabled, allows the user to specify a ... | gtluu/timsconvert | timsconvert/arguments.py | arguments.py | py | 6,229 | python | en | code | 23 | github-code | 21 | [
{
"api_name": "os.path.join",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path.realpath",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"lin... |
3462953067 | import dbus
import time
import logging
from dbus.mainloop.glib import DBusGMainLoop
from dbus import service # pylint: disable=W0611
from dbus import DBusException
logger = logging.getLogger(__name__)
SERVICE_NAME = 'org.bluez'
ADAPTER_INTERFACE = SERVICE_NAME + '.Adapter1'
DEVICE_INTERFACE = SERVICE_NAME + '.Device... | atareao/pam-device | src/pamdevice/bluetoothdbus.py | bluetoothdbus.py | py | 4,219 | python | en | code | 7 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "dbus.SystemBus",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "dbus.Interface",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "dbus.SystemBus",
"... |
19644287518 | #!/usr/bin/env python
####################################
# Network Topology XML File Parser
####################################
import sys, os, re
import xml.dom.minidom
# XML Specific Tags
TAG_GRID = "GRID"
TAG_CLUSTER = "CLUSTER"
TAG_SWITCH = "SWITCH"
TAG_HOST = "HOST"
TAG_ID = "id"
TAG_BW = "b... | qnu/gxp | gxpbin/topology.py | topology.py | py | 7,683 | python | en | code | 2 | github-code | 21 | [
{
"api_name": "sys.stdout",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "sys.stderr",
"line_number": 23,
"usage_type": "attribute"
},
{
"api_name": "os.path.exists",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_nu... |
27069688196 | import sys
import sqlite3
from random import shuffle
db = sqlite3.connect('mahjong.db', check_same_thread=False)
class Player:
def __init__(self, userid, username, displayName, tiles, flowers, tai = 0, wind=None):
self.userid = userid
self.username = username
self.displayName = displayName... | KennethSee/Mahjong | test.py | test.py | py | 12,735 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "sqlite3.connect",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "random.shuffle",
"line_number": 106,
"usage_type": "call"
},
{
"api_name": "random.shuffle",
"line_number": 107,
"usage_type": "call"
}
] |
41108556271 | import numpy as np
import pandas as pd
import six
from random import randint
import matplotlib.pyplot as plt
plt.style.use('seaborn-white')
#import seaborn as sns
#sns.set_style("white")
from sklearn.model_selection import train_test_split
from skimage.transform import resize
from keras import Model
from keras.cal... | EldarKurbanov/sky-segmentation | TensorflowLite_UNet/Models/UNet_ResNet34.py | UNet_ResNet34.py | py | 22,892 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 8,
"usage_type": "name"
},
{
"api_name"... |
14339045396 | #! /usr/bin/env python
from setuptools import setup
# use README file as long_description
with open('README.rst') as readme:
long_description = readme.read()
setup(name = 'pyRegurgitator',
description = 'pyRegurgitator - Tools for analysing python code',
version = '0.2.1',
license = 'MIT',
... | schettino72/pyRegurgitator | setup.py | setup.py | py | 1,375 | python | en | code | 17 | github-code | 21 | [
{
"api_name": "setuptools.setup",
"line_number": 10,
"usage_type": "call"
}
] |
71454902453 | import plyer
from database import Database
from kivymd.uix.screen import MDScreen
from kivy.properties import StringProperty
from kivymd.uix.behaviors import FakeRectangularElevationBehavior
from kivymd.uix.card import MDCard
class FeedsCard(MDCard, FakeRectangularElevationBehavior):
image = StringProperty()
... | Tomiwaolooto/current-python-projects | folder 1/main_screen.py | main_screen.py | py | 1,307 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "kivymd.uix.card.MDCard",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "kivymd.uix.behaviors.FakeRectangularElevationBehavior",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "kivy.properties.StringProperty",
"line_number": 11,
"usage_t... |
8046575964 | from os.path import exists
import re
from stop_words import get_stop_words
stop_words = get_stop_words('english')
# print(stop_words)
def count_words(filename: str) -> dict[str, int]:
"""
reads text file with name filename and counts distinct word frequencies in it
:param filename: the name of the text fi... | iproduct/intro-python | sdp_2021_02/words_count.py | words_count.py | py | 1,188 | python | en | code | 6 | github-code | 21 | [
{
"api_name": "stop_words.get_stop_words",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.exists",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "re.split",
"line_number": 22,
"usage_type": "call"
}
] |
25146413600 | import sys
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import math
def sigmoid(X):
return 1 / (1 + np.exp(-X))
def sigmoidDer(X):
return sigmoid(X) * (1 - sigmoid(X))
def softmax(X):
f_X = np.exp(X) / np.sum(np.exp(X))
return f_X
class Model:
def __init__(self, hidden... | garima-rawat/Mnist-dataset-experiment | neural_mnist.py | neural_mnist.py | py | 7,788 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "numpy.exp",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.exp",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.sum",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.random.rand",
"line_number": 2... |
35349984333 | from typing import Literal
from pathlib import Path
import sys
sys.path.append(str(Path(__file__).parent.parent.parent.parent))
from AlgorithmicStrategy import AlgorithmicStrategy, TradeTime, DataSet, OrderBook
class TWAP(AlgorithmicStrategy):
def __init__(
self,
orderbook: OrderBook,
tick... | Me2yhm/Algorithmic-Trading | AlgorithmicStrategy/TWAP_VWAP/MODELS/TWAP.py | TWAP.py | py | 3,064 | python | en | code | 1 | github-code | 21 | [
{
"api_name": "sys.path.append",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line_number": 4,
"usage_type": "call"
},
{
"api_name": "AlgorithmicStrategy.Algorithm... |
3114694824 | '''
Created on Jun. 2, 2021
@author: zollen
@url: https://github.com/alan-turing-institute/sktime/blob/main/examples/01_forecasting.ipynb
'''
from statsmodels.tsa.stattools import adfuller
from sktime.forecasting.trend import PolynomialTrendForecaster
from sktime.transformations.series.detrend import Detrender
from ... | zollen/Python-ML | time_series/sktime/de_trend.py | de_trend.py | py | 2,361 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "seaborn.set_style",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "statsmodels.tsa.stattools.adfuller",
"line_number": 26,
"usage_type": "call"
},
{
"api_... |
19071699588 | from typing import List
class Solution:
def calPoints(self, operations: List[str]) -> int:
score = []
for op in operations:
# if x = integer, add x to array
if op.lstrip('-').isdigit():
score.append(int(op))
# if +, add a new score that i... | BoydBLever/Algorithms | NeetCode/682.BaseballGame.py | 682.BaseballGame.py | py | 892 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "typing.List",
"line_number": 4,
"usage_type": "name"
}
] |
20606385025 | import json
import supybot.conf as conf
import supybot.registry as registry
try:
from supybot.i18n import PluginInternationalization
_ = PluginInternationalization('NoisyKarma')
except:
# Placeholder that allows to run the plugin on a bot
# without the i18n module
_ = lambda x:x
def configure(advan... | progval/Supybot-plugins | NoisyKarma/config.py | config.py | py | 2,845 | python | en | code | 107 | github-code | 21 | [
{
"api_name": "supybot.i18n.PluginInternationalization",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "supybot.conf.registerPlugin",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "supybot.conf",
"line_number": 18,
"usage_type": "name"
},
{
"a... |
7841167561 | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import os
import dgl
import dgl.function as fn
from dgl.nn.pytorch.conv import GATConv
import args
#out encoder
class GCN(nn.Module):
def __init__(self, in_feat, out_feat, num_classes, num_heads):
super(GCN, self).__init_... | NohSeongRae/GACG | model.py | model.py | py | 2,384 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "torch.nn.Module",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "dgl.nn.pytorch.conv.GATConv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "dgl.nn.pyto... |
36217127352 | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 14 11:22:19 2019
@author: Dominick
"""
import uuid
import xlsxwriter
import xlrd
from datetime import datetime
class response():
def __init__(self, file_nm):
'''
Initilizes the class. Only takes in a file name or the path to a file.
... | edtsoi430/Townhall.digital | response_getter.py | response_getter.py | py | 3,666 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "xlrd.open_workbook",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "uuid.uuid4",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 66,
"usage_type": "call"
},
{
"api_name": "datetime.datetime... |
32731861218 | # Capstone Project Module 1
# Case Study: Gudang (Data Stok)
from prettytable import PrettyTable
Stok_Barang = {
'Sofa':['TOP001', 'Impor', 300, 'Rp 3.000.000'],
'Kasur':['TOP002', 'Lokal', 150, 'Rp 5.000.000'],
'Lemari':['TOP003', 'Impor', 200, 'Rp 8.000.000'],
'Meja':['TOP004', 'Impor', 400... | KevinSaputraWijayaTan/CapstoneProjectModule1 | Capstone Project Module 1.py | Capstone Project Module 1.py | py | 7,114 | python | id | code | 0 | github-code | 21 | [
{
"api_name": "prettytable.PrettyTable",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "prettytable.PrettyTable",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "prettytable.PrettyTable",
"line_number": 45,
"usage_type": "call"
}
] |
19211189623 | from pyspark import SparkContext
# from sys import stdin
def loadBoringWords():
boring_words = set(line.strip() for line in open("E:/Big Data By Sumit Mittal/Week 10/Datasets/boringwords-201014-183159.txt"))
return boring_words
if __name__ == "__main__":
sc = SparkContext("local[*]", "campaignData")
s... | shrutileena/PySpark | bidataCampaignData.py | bidataCampaignData.py | py | 1,033 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "pyspark.SparkContext",
"line_number": 9,
"usage_type": "call"
}
] |
41606243934 | import time
# preparing selenium and chrome web driver manager
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
# initialising chrome driver
driver = webdriver.Chrome(ChromeDriverManager().install())
URL = 'https://witty-hill-0acfceb03.azurestaticapps.net/film_register.html'
driv... | Pilinger/probazarovizsga2 | testproject/film_register.py | film_register.py | py | 1,976 | python | en | code | null | github-code | 21 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "webdriver_manager.chrome.ChromeDriverManager",
"line_number": 7,
"usage_type": "call"
},
{... |
30901106483 | import importlib
from torch.utils.data import DataLoader
from utils import check_device
import numpy as np
import datetime
from Explanation.saliency.saliency_zoo import fast_ig, guided_ig, agi, big, ig, deeplift, saliencymap, sm, sg, process_dataloader, caculate_insert_deletion
class Pipeline:
def __init__(self):... | KxPlaug/Neural-testing-tools | main.py | main.py | py | 6,504 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "utils.check_device",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "impor... |
70798574772 | import base64
import itertools
import json
from django.core.paginator import Paginator, InvalidPage, EmptyPage
from django.db.models import Q
from django.core import serializers
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.conf import settings
from django.views.decor... | lightsgoout/iichantra_highscores_ng | highscores/views.py | views.py | py | 7,267 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "django.conf.settings.CURRENT_IICHANTRA_VERSION",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "django.conf.settings",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "highscores.models.Version.objects.get",
"line_number": 18,
"usag... |
20754937586 | import ezdxf
from ezdxf.enums import TextEntityAlignment
# The TEXT entity is a DXF primitive and is supported in all DXF versions.
# The argument setup=True creates standard linetypes and text styles in the
# new DXF document.
doc = ezdxf.new("R12", setup=True)
msp = doc.modelspace()
# Use method set_placement() to ... | Demonwuwen/zwpycad | ezdxfprac/text.py | text.py | py | 816 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "ezdxf.new",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "ezdxf.enums.TextEntityAlignment.MIDDLE_RIGHT",
"line_number": 15,
"usage_type": "attribute"
},
{
"api_name": "ezdxf.enums.TextEntityAlignment",
"line_number": 15,
"usage_type": "name"
},... |
25420382030 | from typing import Union
from fastapi import FastAPI, HTTPException, status
from fastapi_utils.tasks import repeat_every
from starlette.responses import RedirectResponse
import model_handler
import model_trainer
import df_loader
from models import Event, User
app = FastAPI(
title='ML-Model-API',
description='... | Bangkit-Capstone-CR23-PR565/ML-Model-API | main.py | main.py | py | 2,910 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "fastapi.FastAPI",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "starlette.responses.RedirectResponse",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "df_loader.SessionLocal",
"line_number": 26,
"usage_type": "call"
},
{
"api_n... |
41394815223 | import telebot
import os
import flask
from flask import request
server = flask.Flask(__name__)
debug = False
token = "1251418314:AAGaPAc7pcpKWzluP-PYYhGk9LbcSMtbcCM"
bot = telebot.TeleBot(token)
@bot.message_handler(commands=['start'])
def send_welcome(message):
print(message)
id = message.from_user.id
... | Travis-ugo/Travis_Bot | Travis_Bot.py | Travis_Bot.py | py | 2,195 | python | en | code | 3 | github-code | 21 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "telebot.TeleBot",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "flask.request.stream.read",
"line_number": 55,
"usage_type": "call"
},
{
"api_name": "flask.request.st... |
8597191887 | from __future__ import annotations
import logging
from collections import namedtuple
from itertools import groupby
from operator import attrgetter
from typing import Iterator, Tuple
from wazo_confd_client import Client as ConfdClient
from xivo.asterisk.protocol_interface import protocol_interface_from_channel
from xi... | wazo-platform/wazo-call-logd | wazo_call_logd/generator.py | generator.py | py | 15,056 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "logging.getLogger",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "collections.namedtuple",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "wazo_confd_client.Client",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "waz... |
44025013751 | """
This module contains the :py:class:`SerialDevice` interface for the `AD2USB`_, `AD2SERIAL`_ or `AD2PI`_.
.. _AD2USB: http://www.alarmdecoder.com
.. _AD2SERIAL: http://www.alarmdecoder.com
.. _AD2PI: http://www.alarmdecoder.com
.. moduleauthor:: Scott Petersen <scott@nutech.com>
"""
import threading
import serial... | nutechsoftware/alarmdecoder | alarmdecoder/devices/serial_device.py | serial_device.py | py | 7,327 | python | en | code | 58 | github-code | 21 | [
{
"api_name": "base_device.Device",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "serial.tools.list_ports.grep",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "serial.tools",
"line_number": 44,
"usage_type": "attribute"
},
{
"api_name": "ser... |
5178931050 | # _author_ = 'sixueyang'
# _date_ = 2023/10/24 15:04
import argparse
import pandas as pd
import os
# 设置传参
def get_args():
parser = argparse.ArgumentParser(description="代谢组分析 - 差异代谢物结果汇总")
parser.add_argument("-is", "--inputs", nargs="*",help="各组差异分析结果", required=True)
parser.add_argument("-l", "--change_l... | sixue-yang/Metabolism | Script/08.Venn_data_sort.py | 08.Venn_data_sort.py | py | 1,721 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.path.basename",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname... |
15109991321 | import numpy as np
import glob
from PIL import Image
import cv2
import keras.callbacks as callbacks
from keras.callbacks import Callback
from keras import Model
import keras
class DataGenerator(keras.utils.Sequence):
'Generates data for Keras'
def __init__(self, train_im_path, train_mask_path, augmentations=No... | shreyasms17/Pneumothorax-Segmentation | src/main/scripts/helper/classmodules.py | classmodules.py | py | 4,930 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "keras.utils",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "glob.glob",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.ceil",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number"... |
33840490833 | #!/usr/bin/env python
# coding: utf-8
# 下面是代码的整个结构目录:
#
# 【1.用来存放自定义图片的目录——/home/aistudio/images/face】
#
# 【2.用来存放图像列表的目录——/home/aistudio/face/】
#
# 【3.model_vgg用来存放vgg网络训练的模型】
#
# 【4.model_cnn用来存放cnn网路训练的模型】
# ",
client_id="MgscZwplj5P1NEbU9pjRgw",
client_secret="iaRaCR07fvTgSYQ1e1ycrBLRqZ7tdg"#,
#username="USERNAME",
#password="PASSWORD",
)
learnjapanese_kanji_frequency... | Kyle-Jeffrey-Reese/Website | content/Code/reddit_data.py | reddit_data.py | py | 2,361 | python | en | code | 0 | github-code | 21 | [
{
"api_name": "praw.Reddit",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "jp_regex.extract_unicode_block",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 49,
"usage_type": "call"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.