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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
29752726253 | import sys
sys.path.append('../')
import cnvfc
import numpy as np
import pandas as pd
import pathlib as pal
root_p = pal.Path('../data/')
pheno_p = root_p / 'pheno/Pheno.csv'
connectome_p = root_p / 'preprocessed/connectome/sample_connectome/python/'
connectome_t = 'connectome_s{}_mist64.npy'
label_p = root_p / 'parce... | surchs/Neuropsychiatric_CNV_code_supplement | Scripts/FC_case_control_contrast.py | FC_case_control_contrast.py | py | 1,540 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "sys.path.append",
"line_number": 2,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 2,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.tril",
"line_number... |
71534665953 | import json
def get_utterance_indices(utterance):
utterance += " "
index = 0
for i in range(len(utterance)):
if utterance[i] == ' ':
print(utterance[index:i]+" "+str(index))
index = i+1
print("Last index : {}".format(len(utterance)-1))
with open('final_result.json') as js... | guptaSneha31/Bot-Assignment- | json_repair.py | json_repair.py | py | 903 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "json.load",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 22,
"usage_type": "call"
}
] |
20623982774 | from sympy import symbols, sin, tan, cos, limit, pi, oo, latex
def main():
def limnote(expr, n):
r"""Expr and n must be a pure expr"""
lat = r"\lim_{x \rightarrow " + str(latex(n)) + r"} " + latex(expr)
return str(lat)
x = symbols('x')
# expr = ((x * sin(5*x))/(tan(2*... | David-Sirait01/SCnLM-Informatika-23-24 | Limit & Integral/Limit/Short/main.py | main.py | py | 1,372 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sympy.latex",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "sympy.symbols",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sympy.sin",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sympy.tan",
"line_number": 21,
... |
37213121317 | import numpy as np
import pandas as pd
import os
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
import mlflow
from ydata_profiling import ProfileReport
from trail import Trail
import inspect
def dataloader():
for dirname, _, filenames in os.walk('./input... | NikolausPinger/titanic | baseline.py | baseline.py | py | 2,499 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.walk",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_number"... |
11026928784 | from bs4 import BeautifulSoup
import requests
import numpy as np
import pandas as pd
import re
import warnings
warnings.simplefilter(action='ignore')
titles = list()
locations = list()
pap = list()
dau = list()
serv = list()
desc = list()
bbt = list()
info = list()
title_text = list()
location_text = list()
pap_tex... | Williamz4lyf/My_Projects | lagos_listings/scrape_propertypro.py | scrape_propertypro.py | py | 2,743 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "warnings.simplefilter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "pandas.DataFrame"... |
72153311074 | """Model serialization/deserialization schema."""
import inspect
from typing import Type
from pydent.marshaller.descriptors import DataAccessor
from pydent.marshaller.exceptions import CallbackValidationError
from pydent.marshaller.exceptions import MultipleValidationError
from pydent.marshaller.exceptions import Sche... | aquariumbio/pydent | pydent/marshaller/schema.py | schema.py | py | 8,155 | python | en | code | 6 | github-code | 1 | [
{
"api_name": "pydent.marshaller.registry.SchemaRegistry",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "pydent.marshaller.exceptions.SchemaException",
"line_number": 51,
"usage_type": "call"
},
{
"api_name": "pydent.marshaller.descriptors.DataAccessor",
"line_num... |
11337631853 |
import pandas as pd
import numpy as np
import scipy.signal as sig
import matplotlib.pyplot as plt
import control as con
import scipy.fftpack
def FFT(x, fs):
N = len(x)
X_fft = scipy.fftpack.fft(x)
X_fft_shifted = scipy.fftpack.fftshift(X_fft)
freq = np.arange(-N/2, N/2) * fs/N
X_... | Shujaea/ECE351_CODE | Lab12 Project.py | Lab12 Project.py | py | 3,866 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "scipy.signal.fftpack.fft",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "scipy.signal.fftpack",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "scipy.signal",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "scipy... |
12307570528 |
import math
import numpy as np
from scipy.special import erf
from scipy import stats
norm = stats.norm
class BSOPM_Class:
def disc_function(self, FV, r, T):
PV = FV * np.exp(-r*T)
return PV
def bs_d1_d2(self,St,r,t,K,call,sig):
d1 = np.log(St/K)
d1 += ( sig*sig/2 + r)*t
with np.errstate(di... | aclime/vix | bsopm.py | bsopm.py | py | 2,041 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "scipy.stats.norm",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "scipy.stats",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "numpy.exp",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "numpy.log",
"line_numbe... |
35157210724 | import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LogisticRegression, RidgeClassifier
from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier
from s... | ManishSinghh/Major_project | train_model.py | train_model.py | py | 1,517 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pandas.read_csv",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sklearn.model_selection.train_test_split",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "sklearn.pipeline.make_pipeline",
"line_number": 22,
"usage_type": "call"
},
... |
40377723310 | import re
import requests
from tasks.m3u.record import M3uItemType, M3URecord
class M3UDeserializer( object ):
__RE_ITEM = re.compile( r"(?:^|\n)#EXTINF:((?:-)\d+(\.\d+)?)([^,]+)?,([A-Z].*?)[\r\n]+(.*)" )
__RE_ATTRIBUTE = re.compile( r"(\w*-\w*)=([\"'].*?[\"'])" )
__RE_SERIE = re.compil... | pe2mbs/iptv-server | tasks/m3u/reader.py | reader.py | py | 1,832 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "re.compile",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 37,
... |
9512230126 | from datetime import timedelta
from feast import FeatureView, Field
from feast.types import Float64, String
import pandas as pd
from entities import properties_entity
from data_sources import properties_source
properties_fv = FeatureView(
name="properties_fv",
entities=[properties_entity],
ttl=timedelta... | Thangphan0102/RealEstateProject | feature_repo/feature_views.py | feature_views.py | py | 1,165 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "feast.FeatureView",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "entities.properties_entity",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "datetime.timedelta",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "feast... |
25058294272 | import torch, vtk
import numpy as np
import h5py
from vtk_utils import *
import os
from scipy.stats import zscore
path = 'Twin_Transformers'
folder_name = '/media/shawey/SSD8T/GyraSulci_Motor/'+path+'/figs'
weis = os.listdir(folder_name)
filename = "/media/shawey/SSD8T/GyraSulci_Motor/H5_vtk/100408.h5"
f1 = h5py.File... | Shawey94/Gyral_Sulci_Project | Code/pkl2vtkV2.py | pkl2vtkV2.py | py | 1,535 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.listdir",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "h5py.File",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.load",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "torch.device",
"line_number": 33,... |
8479598404 | import sqlalchemy
from fastapi import Depends
from sqlalchemy.orm import Session
from src.data_layer.bot_io import OrderInput
from src.data_layer.db_connector import get_db
from src.models.order import OrderModel
from fastapi import APIRouter
router = APIRouter()
@router.post("/order")
def get_order_by_hospital_id(ho... | AshikaInnovate/LocAid_Project | src/endpoints/order.py | order.py | py | 2,646 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.orm.Session",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "fastapi.Depends",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "src.data_laye... |
43198314648 | """
✘ Commands Available -
• `{i}fullpromote <reply user/ username>`
Promote User With All rights
"""
import asyncio
from telethon.errors import BadRequestError
from telethon.errors.rpcerrorlist import ChatNotModifiedError, UserIdInvalidError
from telethon.tl.functions.channels import DeleteUserHistoryRequest, Ed... | LoopXS/addons | fullpromote.py | fullpromote.py | py | 1,738 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "telethon.tl.functions.channels.EditAdminRequest",
"line_number": 36,
"usage_type": "call"
},
{
"api_name": "telethon.tl.types.ChatAdminRights",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "telethon.errors.BadRequestError",
"line_number": 54,
"u... |
22593934162 | # -*- coding: utf-8 -*-
import cv2
import numpy as np
from PIL import Image
import glob
import os
from tqdm import tqdm
def color_map(N=256, normalized=False):
def bitget(byteval, idx):
return ((byteval & (1 << idx)) != 0)
dtype = 'float32' if normalized else 'uint8'
cmap = np.zeros((N, 3), dtype... | ISCAS007/torchseg | tools/covert_voc_format.py | covert_voc_format.py | py | 1,890 | python | en | code | 7 | github-code | 1 | [
{
"api_name": "numpy.zeros",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "numpy.uint8",
"line_number": ... |
13428488153 | import torch
from torch.utils.data import Dataset, DataLoader, SequentialSampler, RandomSampler
from utils_MTL import (str2bool,
init_seed,
load_json_data,
get_pretrained_tokenizer,
get_pretrained_model,
g... | woog2ee/KGEC-MTL | MTL/test_MTL.py | test_MTL.py | py | 3,502 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.environ",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "torch.multiprocessing.set_start_method",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "torch.multiprocessing",
"line_number": 20,
"usage_type": "attribute"
},
{
... |
44569908079 |
import heapq
import config
import logbot
log = logbot.getlogger("ASTAR")
class PathNode(object):
def __init__(self, coords, cost=1):
self.coords = coords
self.cost = cost
self.g = 0
self.h = 0
self.f = 0
self.step = 0
self._parent = None
self.has... | FrederickGeek8/TwistedBot | twistedbot/pathfinding.py | pathfinding.py | py | 4,625 | python | en | code | null | github-code | 1 | [
{
"api_name": "logbot.getlogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "config.PATHFIND_LIMIT",
"line_number": 93,
"usage_type": "attribute"
},
{
"api_name": "config.COST_DIAGONAL",
"line_number": 127,
"usage_type": "attribute"
},
{
"api_name": ... |
9640228574 | from openpyxl.styles import NamedStyle, Font, Border, Side, Alignment, PatternFill
from openpyxl.formatting.rule import ColorScaleRule
# 薄緑(主にheader用)
style_00 = NamedStyle(name="style_00",
font=Font(bold=True, size=10.5),
fill=PatternFill(patternType='solid', start_color='... | copipe/nclick | nclick/excel/cell_styles.py | cell_styles.py | py | 4,958 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "openpyxl.styles.NamedStyle",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "openpyxl.styles.Font",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "openpyxl.styles.PatternFill",
"line_number": 8,
"usage_type": "call"
},
{
"api_name... |
16190921784 | import torch
import torch.nn as nn
import torch.nn.functional as F
from itertools import chain
class GaussianActorCriticNet(nn.Module):
def __init__(self, state_size, action_size, shared_layers, actor_layers, critic_layers, std_init=0):
super(GaussianActorCriticNet, self).__init__()
self.shared... | telmo-correa/DRLND-project-2 | model.py | model.py | py | 2,913 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "torch.nn.Module",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "torch.nn.Parameter",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_n... |
16845484949 | import errno
import os
import re
import threading
import unittest
try:
from unittest import mock
except ImportError:
import mock
import ptracer
eperm_mock = mock.Mock(
side_effect=OSError(errno.EPERM, 'Operation not permitted'))
class TestPtracer(unittest.TestCase):
@mock.patch('ptracer.ptrace.att... | pinterest/ptracer | tests/test_ptracer.py | test_ptracer.py | py | 4,300 | python | en | code | 150 | github-code | 1 | [
{
"api_name": "mock.Mock",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "errno.EPERM",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "unittest.TestCase",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "ptracer.PtracerErro... |
71681309794 | import json
import datetime
import requests
from common.logger import warning, debug
def attribute_test(test: dict, attributes: list, kind: type) -> None:
buf = []
try:
for i in attributes:
buf.append(i)
test = test[i]
except KeyError:
warning('fatal error, key ' + ... | Chenrt-ggx/ObjectOriented | common/config.py | config.py | py | 1,970 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "common.logger.warning",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "common.logger.warning",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 23,
"usage_type": "call"
},
{
"api_name":... |
2422288587 | import logging
from odoo import api, fields, models, _
from odoo.exceptions import UserError, MissingError
_logger = logging.getLogger(__name__)
class ProcurementGroup(models.Model):
_inherit = 'procurement.group'
@api.model
def _run_scheduler_tasks(self, use_new_cursor=False, company_id=False):
... | decgroupe/odoo-addons-dec | procurement_run_mts/models/procurement_group.py | procurement_group.py | py | 3,969 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "odoo.models.Model",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "odoo.api.model",
... |
20994301540 | from __future__ import absolute_import, division, print_function, unicode_literals
from typing import List, Dict, Tuple, Iterable, Type, Any
import fidia
# Python Standard Library Imports
# from collections import OrderedDict, Mapping
from copy import deepcopy
# Other Library Imports
# import pandas as pd
import sq... | astrogreen/fidia | fidia/archive/archive.py | archive.py | py | 24,238 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "fidia.slogging.getLogger",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "fidia.slogging",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "fidia.slogging.WARNING",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "f... |
2341825486 | from fastapi import APIRouter, WebSocket
from ..wallets import router as walletRouter
router = APIRouter(
tags=['Websocket endpoints'],
responses={
404: {"description": "Resource does not exist"}
},
)
router.include_router(
router=walletRouter,
prefix='/wallets',
)
@router.websocket(... | timmypelumy/web3_utils_fastapi | routers/ws/index.py | index.py | py | 517 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "fastapi.APIRouter",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "wallets.router",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "fastapi.WebSocket",
"line_number": 22,
"usage_type": "name"
}
] |
2420058577 | from odoo import api, models, fields, tools
import logging
_logger = logging.getLogger(__name__)
class MailActivityTeam(models.AbstractModel):
_inherit = 'mail.activity.team'
# image: all image fields are base64 encoded and PIL-supported
image = fields.Binary(
string="Image",
attachment... | decgroupe/odoo-addons-dec | mail_activity_team_image/models/mail_activity_team.py | mail_activity_team.py | py | 1,369 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "odoo.models.AbstractModel",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "odoo.fields... |
10353210307 | import cv2
from tracker import KCFTracker
def tracker(cam, frame, bbox):
tracker = KCFTracker(True, True, True) # (hog, fixed_Window, multi_scale)
tracker.init(bbox, frame)
while True:
ok, frame = cam.read()
timer = cv2.getTickCount()
bbox = tracker.update(frame)
bbox ... | ryanfwy/KCF-DSST-py | run.py | run.py | py | 1,159 | python | en | code | 68 | github-code | 1 | [
{
"api_name": "tracker.KCFTracker",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "tracker.init",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "cv2.getTickCount",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "tracker.update",
"... |
20868560186 | from struct import unpack_from
from collections import namedtuple
from smbus2 import SMBus
Measurement = namedtuple("Measurement", "temperature,humidity,dust")
class DrsDust:
REGISTER=0
def __init__(self, bus=1, i2c_address=0x08):
self.address = i2c_address
self.bus = SMBus(bus) ... | satanowski/smog-o-meter | smogometer/services/DrsDust.py | DrsDust.py | py | 752 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "collections.namedtuple",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "smbus2.SMBus",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "struct.unpack_from",
"line_number": 18,
"usage_type": "call"
}
] |
74003467553 | import pygame, random
from functools import reduce
class Meteor(pygame.sprite.Sprite):
"""Clase para crear los sprites
para generar los meteoros
Args:
pygame ([type]): [description]
"""
def __init__(self) -> None:
super().__init__()
self.image = pygame.image.load("meteor.pn... | baubyte/pygamePractice | games/meteors/meteors.py | meteors.py | py | 2,779 | python | es | code | 0 | github-code | 1 | [
{
"api_name": "pygame.sprite",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "pygame.image.load",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "pygame.image",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "pygame.sprite",... |
19466962586 | # -*- coding: utf-8 -*-
"""
@file
@brief Function solving the TSP problem
"""
import random
def distance_point(p1, p2):
"""
Returns the Euclidian distance between two points.
Retourne la distance euclidienne entre deux points.
@param p1 point 1
@param p2 point 2
@return ... | sdpython/code_beatrix | src/code_beatrix/algorithm/tsp.py | tsp.py | py | 3,498 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "random.randint",
"line_number": 91,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 92,
"usage_type": "call"
},
{
"api_name": "random.randint",
"line_number": 99,
"usage_type": "call"
},
{
"api_name": "random.randint",
"li... |
30685906080 | """
验证码识别
1.简单的图像文字可以用tesseract或CNN神经网络训练数据集预测,再不行就云打码平台
2.极验(滑动)验证码要先计算窗口偏移量大小然后selenium模拟拖动按钮
tesseract是一个将图像翻译成文字的OCR库(optical character recognition) --> 识别验证码效果一般,还是用云打码平台吧
windows安装tesseract-ocr并配置环境变量
from PIL import Image
import pytesseract
img = Image.open("./test.jpg")
# 此处可能需要做降噪和二值化处理,去除干扰线等
print(pytesserac... | okccc/python | crawl/09_验证码识别.py | 09_验证码识别.py | py | 3,682 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.post",
"line_number": 39,
"usage_type": "call"
},
{
"api_name": "json.loads",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "lxml.etree.HTML",
"line_num... |
7417790842 | #!/usr/bin/env python3
import os
import traceback
## Not sure what this was originally intended for. Leaving for now. BLF
# for key, val in gemsModules.deprecated.delegator.settings.subEntities:
# if val in gemsModules.deprecated.delegator.settings.deprecated:
# pass
# prototype: need to build import sta... | GLYCAM-Web/gems | gemsModules/deprecated/sequence/receive.py | receive.py | py | 11,290 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "gemsModules.deprecated.common.loggingConfig.loggers.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "gemsModules.deprecated.common.loggingConfig.loggers",
"line_number": 17,
"usage_type": "name"
},
{
"api_name": "gemsModules.deprecated.common.logging... |
17715925911 | """The medical image object.
This module defines :class:`MedicalVolume`, which is a wrapper for nD volumes.
"""
import warnings
from copy import deepcopy
from mmap import mmap
from numbers import Number
from typing import Sequence, Tuple, Union
import nibabel as nib
import numpy as np
import pydicom
from nibabel.spat... | ad12/DOSMA | dosma/core/med_volume.py | med_volume.py | py | 54,208 | python | en | code | 49 | github-code | 1 | [
{
"api_name": "dosma.utils.env.sitk_available",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "dosma.utils.env",
"line_number": 24,
"usage_type": "name"
},
{
"api_name": "dosma.utils.env.cupy_available",
"line_number": 26,
"usage_type": "call"
},
{
"api... |
72401623715 | import cv2
import numpy as np
import os
from os.path import join
from time import time
from os import listdir
import matplotlib.pyplot as plt
from src.data.utils.make_dir import make_dir
import src.data.constants as c
# Set working directory to script location
c.setcwd(__file__)
files = c.RAW_FILES_GENERALIZE
kernel ... | gummz/cell | src/data/annotate_old.py | annotate_old.py | py | 2,259 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "src.data.constants.setcwd",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "src.data.constants",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "src.data.constants.RAW_FILES_GENERALIZE",
"line_number": 14,
"usage_type": "attribute"
},
... |
74262851234 | from app.models import Product,db,SCHEMA,environment
from sqlalchemy.sql import text
from datetime import date
from faker import Faker
fake = Faker()
def seed_products():
product1 = Product(
name = 'Shirt', price = 30.00, description= 'Workout shirt', created_at=fake.date_between(start_date='-5y', end_d... | xuantien93/IronReligion | app/seeds/products.py | products.py | py | 1,558 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "faker.Faker",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "app.models.Product",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "app.models.Product",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "app.models.Product",... |
70646935393 | import re, nltk, bs4
import pandas as pd
import numpy as np
from numpy.linalg import norm
import scipy as sp
from scipy.sparse import csr_matrix as csr
import random
from string import punctuation
from nltk.corpus import stopwords
from collections import defaultdict
file_path = 'C:\\path\\to\\both_files\\'
... | guenter-r/knn | tf_idf.py | tf_idf.py | py | 5,501 | python | en | code | 5 | github-code | 1 | [
{
"api_name": "nltk.download",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "string.punctuation",
"line_number": 17,
"usage_type": "argument"
},
{
"api_name": "nltk.corpus.stopwords.words",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "nltk... |
35889571199 | from contextlib import closing
import wolframalpha
import boto3
import sys
import os
wolfram_app_id = "APPID-WOLFRAM"
wolfram_client = wolframalpha.Client(wolfram_app_id)
query = str(sys.argv[1])
print(":: Question: " + query + "\n")
print("++ Getting Answer from WolframAlpha...\n")
wolfram_response = wolfram_client.... | panggi/question-answering-wolfram-polly | wolframsynth.py | wolframsynth.py | py | 1,229 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "wolframalpha.Client",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "boto3.client",
"line_nu... |
11637370478 | from flask import Flask
from . import provedores
def create_app():
"""Create Flask application."""
app = Flask(
__name__,
static_folder = "assets",
instance_relative_config = False
)
with app.app_context():
# ------------
# Provedores
# ------... | brasil-em-numeros/brasil-em-numeros | dashboard/__init__.py | __init__.py | py | 833 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "home.home.home_bp",
"line_number": 28,
"usage_type": "attribute"
},
{
"api_name": "home.home",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "about.about.about_bp",
... |
38572335275 | from numpy import sign
from functools import cmp_to_key
INPUT_FILENAME ="input"
TEST1_FILENAME ="test1.txt"
TEST2_FILENAME ="test2.txt"
PART = 1
DEBUG = False
DIVIDER_PACKETS = [[[2]], [[6]]]
def debug_print(s: str):
if(DEBUG):
print(s)
def parse_pair(pair: str):
left, right = pair.splitlines()
... | MPinna/AOC22 | 13/solve13.py | solve13.py | py | 2,284 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.sign",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "numpy.sign",
"line_number": 52,
"usage_type": "call"
},
{
"api_name": "functools.cmp_to_key",
"line_number": 83,
"usage_type": "call"
}
] |
38946099835 | import logging
from json import load
from os.path import isdir
from time import time
import numpy as np
import pandas as pd
from sklearn.preprocessing import LabelEncoder
from sklearn.tree import DecisionTreeRegressor
def get_setting(arg_setting_name, arg_settings):
if arg_setting_name in arg_settings.keys():
... | mikedelong/animated-kaggle | code/predict.py | predict.py | py | 4,735 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.path.isdir",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "time.time",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "logging.Formatter",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "logging.getLogger",
"li... |
1601838586 | import requests, re
res = requests.get('http://langlang2017.com')
html = res.text.encode('ISO-8859-1').decode(res.apparent_encoding)
# print(html)
pattern = re.compile('<li><img.*?src="img/(.*?)"', re.S)
con = re.findall(pattern, html)
print(con)
for i in con[0]:
ur = 'http://langlang2017.com/img/' + i
r = re... | Lousm/Python | 04_爬虫/week1/day03/07zhengze.py | 07zhengze.py | py | 391 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "re.compile",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "re.S",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "re.findall",
"line_number": 7,
... |
32796762532 | import cv2
import numpy as np
import sys
if (len(sys.argv) > 1):
filename = sys.argv[1]
else:
print('Pass a filename as first argument')
sys.exit(0)
img1 = cv2.imread(filename, cv2.IMREAD_COLOR)
img2 = img1.copy()
DEFAULT = img1.copy()
DEFAULT2 = img2.copy()
def get_points_img1(event, x, y... | mtsafur/vision-por-computadora | practicas-clase/clase-4/practica-2/practica_2.py | practica_2.py | py | 2,879 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.argv",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "sys.argv",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "sys.exit",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "cv2.imread",
"line_number": 11,... |
14194255928 | import hashlib
import inspect
import operator
from typing import Callable, Optional, Union
import cloudpickle
import numpy as np
class _FakeArgSpec:
def __init__(
self,
args=None,
varargs=None,
varkw=None,
defaults=None,
kwonlyargs=None,
kwonlydefaults=None... | loganbvh/py-tdgl | tdgl/parameter.py | parameter.py | py | 14,810 | python | en | code | 24 | github-code | 1 | [
{
"api_name": "typing.Callable",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "inspect.FullArgSpec",
... |
12934811377 | from __future__ import annotations
import operator
from copy import copy
from itertools import chain
from collections.abc import Callable
from dataclasses import replace
from functools import partialmethod
from random import sample
from typing import Any, Hashable, Iterable, List, Optional, Sequence, Tuple, Union
from... | Telofy/SquigglyPy | squigglypy/tree.py | tree.py | py | 9,286 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "enum.Enum",
"line_number": 18,
"usage_type": "name"
},
{
"api_name": "typing.Union",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "typing.Iterable",
"line_number"... |
72540925474 | # Test app main components.
# python -m pytest tests/app/test_main.py
import pytest
from fastapi import status
from fastapi.testclient import TestClient
from app.main import app
from app.models import models
def test_index():
with TestClient(app) as client:
response = client.get("/")
assert resp... | igmalta/ml-classification-api | tests/app/test_main.py | test_main.py | py | 2,543 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "fastapi.testclient.TestClient",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "app.main.app",
"line_number": 13,
"usage_type": "argument"
},
{
"api_name": "fastapi.status.HTTP_200_OK",
"line_number": 15,
"usage_type": "attribute"
},
{
"ap... |
36239962708 | from services.serve import db
from datetime import datetime
from typing import List, Tuple
from sqlalchemy import func, desc
class Visit(db.Model):
__tablename__ = 'visits'
id = db.Column(db.Integer,primary_key=True)
ip = db.Column(db.String(20),nullable=False)
visitable_id = db.Column(db.Integer,null... | mentimun-mentah/zooka-watersports | restapi/services/models/VisitModel.py | VisitModel.py | py | 1,765 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "services.serve.db.Model",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "services.serve.db",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "services.serve.db.Column",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "... |
33370297522 | #!/usr/bin/env python
# coding: utf-8
import numpy as np
import pickle
import sys
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
from robo.fmin import bayesian_optimization
# Global Configuration
try:
CFG = sys.argv[1]
CFG = CFG.replace(".py", "")
SEED = int(sys.... | zehsilva/prior-predictive-specification | bo_optimization/bo_run.py | bo_run.py | py | 833 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "logging.basicConfig",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "logging.getLogger",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.argv",
... |
42272214993 | """
Module for building and manipulating astronomical catalogues.
@author: A.Ruiz
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from six.moves import zip, range
from io import open
import os
import warnings
import tempfile
import subprocess
from copy ... | ruizca/astromatch | astromatch/catalogues.py | catalogues.py | py | 37,736 | python | en | code | 5 | github-code | 1 | [
{
"api_name": "numpy.pi",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "astropy.units.rad",
"line_number": 32,
"usage_type": "attribute"
},
{
"api_name": "astropy.units",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "astropy.units.deg"... |
22020722236 | from . import app
from twilio.twiml.messaging_response import MessagingResponse
from .models import Question
from flask import url_for, request, session
@app.route('/question/<question_id>')
def question(question_id):
question = Question.query.get(question_id)
session['question_id'] = question.id
return sm... | picsul/short-message-survey | sms_app/question_view.py | question_view.py | py | 798 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "models.Question.query.get",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "models.Question.query",
"line_number": 8,
"usage_type": "attribute"
},
{
"api_name": "models.Question",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "fla... |
18607397296 | # -*- coding: utf-8 -*-
"""
@Datetime: 2019/3/4
@Author: Zhang Yafei
"""
from django.urls import path, re_path
from organization.views import OrgView, AddUserAskView, OrgHomeView, OrgCoueseView, OrgTeacherView, OrgDescView
from organization.views import AddFavView, TeacherListView, TeacherDetailView
app_name = 'org'... | zhangyafeii/mxonline | apps/organization/urls.py | urls.py | py | 1,124 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.urls.re_path",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "organization.views.OrgView.as_view",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "organization.views.OrgView",
"line_number": 16,
"usage_type": "name"
},
{
... |
25411012625 | import logging
import threading
from devil.android import device_errors
from devil.utils import reraiser_thread
from devil.utils import watchdog_timer
from pylib import constants
from pylib.base import base_test_result
from pylib.base import test_collection
DEFAULT_TIMEOUT = 7 * 60 # seven minutes
class _ThreadSa... | hanpfei/chromium-net | build/android/pylib/base/test_dispatcher.py | test_dispatcher.py | py | 11,922 | python | en | code | 289 | github-code | 1 | [
{
"api_name": "threading.Lock",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pylib.base.base_test_result.TestRunResults",
"line_number": 74,
"usage_type": "call"
},
{
"api_name": "pylib.base.base_test_result",
"line_number": 74,
"usage_type": "name"
},
{
... |
18653186375 | from django.conf.urls import url
from django.urls import path
from .views import (TicketAPIView, TicketAPIDetailView, ProjectTicketAPIDetailView, TicketReadAPIView,
OrderTicketAPIDetailView, VisitAPIView, VisitAPIDetailView, TicketVisitAPIDetailView)
app_name = "api-tickets"
# app_name will help... | KUSH23/bkend | tickets/api/urls.py | urls.py | py | 998 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "django.conf.urls.url",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "views.TicketAPIDetailView.as_view",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "views.TicketAPIDetailView",
"line_number": 12,
"usage_type": "name"
},
{
"... |
15684526765 | from aiogram import Bot, Dispatcher, types, executor
import requests
import json
btn = types.ReplyKeyboardMarkup(resize_keyboard=True, row_width=2)
btn.add("USD-UZS", "RUB-UZS", "EURO-UZS", "CNY-UZS", "WON-UZS", "DINOR-UZS")
token = "Bot_token"
bot = Bot(token=token)
dp = Dispatcher(bot)
@dp.message_han... | Sardor746/Valutchik | Valyuta/Valyuta.py | Valyuta.py | py | 2,272 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "aiogram.types.ReplyKeyboardMarkup",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "aiogram.types",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "aiogram.Bot",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "aiogram.Disp... |
30640759983 | import discord
from discord.ext import commands
class MyClient(discord.Client):
async def on_ready(self):
print('Logged on as {0}!'.format(self.user))
async def on_message(self, message):
print('Message from {0.author}: {0.content}'.format(message))
if message.content.startswith('\u2... | Ban-Ironic-Ohms/discordbot | micah_s_marvelous.py | micah_s_marvelous.py | py | 1,628 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "discord.Client",
"line_number": 5,
"usage_type": "attribute"
}
] |
32422131788 | from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from time import sleep
# 模拟鼠标操作-鼠标拖动-滑动验证码
driver = webdriver.Chrome()
driver.get("https://reg.taobao.com/member/reg/fill_mobile.htm")
driver.maximize_window()
sleep(3)
# 点击确定按钮
element1 = driver.fin... | chinashenqiuwuyanzu/wuyanzu | python1/taobao.py | taobao.py | py | 1,227 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "selenium.webdriver.Chrome",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "selenium.webdriver",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "time.sleep",
... |
10990304604 | import torch
from torch import nn
from torch.autograd import Function
import pywt
from functools import partial
def get_configs(model_name="wave_vit_s"):
args = {
"wave_vit_s":
dict(stem_hidden_dim=32, embed_dims=[64, 128, 320, 448],
num_heads=[2, 4, 10, 14], mlp_ratios=[8, 8,... | towhee-io/towhee | towhee/models/wave_vit/wave_vit_utils.py | wave_vit_utils.py | py | 5,531 | python | en | code | 2,843 | github-code | 1 | [
{
"api_name": "functools.partial",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "torch.nn.LayerNorm",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "functools.partial"... |
42589540928 | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 6 19:59:37 2017
@author: saber_master
"""
import requests
from bs4 import BeautifulSoup
import bs4
UA = 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36'
headers = {'User-Agent':UA}
# 获取url... | saberly/qiyuezaixian | spider/bilibili/beautifulsoup.py | beautifulsoup.py | py | 1,546 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "bs4.element",
"line_number": 31,
"usage_type": "attribute"
}
] |
33529844024 | import numpy as np
from sympy.physics.mechanics import ReferenceFrame,Point,Vector
from sympy import symbols
from matplotlib import pyplot as plt
from mpl_toolkits import mplot3d
from mpl_toolkits.mplot3d import proj3d
from matplotlib.text import Text
from stl import mesh
from mpl_toolkits.mplot3d.art3d import Line3D,L... | JonathanCamargo/Dinamica_Mecanica_Material_Interactivo | tools/vis.py | vis.py | py | 6,914 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "numpy.reshape",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "numpy.concatenate",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "numpy.concatenate",
"... |
27592126496 | import sys
from collections import deque
input = sys.stdin.readline
n, m = map(int, input().split())
arr = [list(map(int, input().split())) for x in range(m)]
f1, f2 = map(int, input().split())
def limit_weight(f1, f2):
graph = [[] for x in range(n + 1)]
for v1, v2, w in arr:
graph[v1].append((v2, w... | ChoHon/Algorithm | week 03/Test/1939_2.py | 1939_2.py | py | 1,103 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "sys.stdin",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "collections.deque",
"line_number": 19,
"usage_type": "call"
}
] |
11225620250 | import os, sys
# DIR PATH: D:\Environments\practices of the python pro\Bark app\presentation
dir_path = os.path.dirname(os.path.realpath(__file__))
# PARENT DIR PATH: D:\Environments\practices of the python pro\Bark app
parent_dir_path = os.path.abspath(os.path.join(dir_path, os.pardir))
sys.path.insert(0, parent_d... | Zoki92/Practices-of-python-pro | Bark app/presentation/__main__.py | __main__.py | py | 3,957 | python | en | code | 0 | github-code | 1 | [
{
"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.realpath",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"lin... |
33475013754 | bl_info = {
"name": "HECL",
"author": "Jack Andersen <jackoalan@gmail.com>",
"version": (1, 0),
"blender": (2, 80, 0),
"tracker_url": "https://github.com/AxioDL/hecl/issues/new",
"location": "Properties > Scene > HECL",
"description": "Enables blender to gather meshes, materials, and texture... | AxioDL/hecl | blender/hecl/__init__.py | __init__.py | py | 11,246 | python | en | code | 15 | github-code | 1 | [
{
"api_name": "bpy.types",
"line_number": 33,
"usage_type": "attribute"
},
{
"api_name": "bpy.types",
"line_number": 61,
"usage_type": "attribute"
},
{
"api_name": "bpy.types",
"line_number": 80,
"usage_type": "attribute"
},
{
"api_name": "bpy.props.EnumProperty",... |
21617622868 | from bs4 import BeautifulSoup
from jinja2 import Environment, FileSystemLoader
with open('pending_follow_requests.html', 'r') as f:
html = f.read()
soup = BeautifulSoup(html, 'html.parser')
users = []
for element in soup.find_all('div', {'class': 'pam _3-95 _2ph- _a6-g uiBoxWhite noborder'}):
user = {}
... | yassindaboussi/Pending-follow-requests | FromHtml/ExtractAndRender.py | ExtractAndRender.py | py | 952 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "bs4.BeautifulSoup",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "jinja2.Environment",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "jinja2.FileSystemLoader",
"line_number": 24,
"usage_type": "call"
}
] |
74708557793 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Date : 2016-12-05 10:27:37
# @Author : Arms (526923945@qq.com)
# @Link : https://armszhou.github.io
# @Version : $Id$
from xlrd import open_workbook
import re
import os
workbook_name = '钱端(定制版)接口汇总.xlsx'
result_file_name = 'IID_Data'
result_file_path = '/'.join... | ArmsZhou/Python3-Practice | 实战/read_data_from_excel.py | read_data_from_excel.py | py | 856 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.getcwd",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "xlrd.open_workbook",
"line_number": 18,
"usage_type": "call"
}
] |
28905968047 | """Add hospitalizedDischarged column
Revision ID: 58ea38a64c64
Revises: bc309f70af25
Create Date: 2021-01-12 15:41:17.174849
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '58ea38a64c64'
down_revision = 'bc309f70af25'
branch_labels = None
depends_on = None
d... | COVID19Tracking/covid-publishing-api | migrations/versions/58ea38a64c64_add_hospitalizeddischarged_column.py | 58ea38a64c64_add_hospitalizeddischarged_column.py | py | 708 | python | en | code | 9 | github-code | 1 | [
{
"api_name": "alembic.op.add_column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "alembic.op",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "sqlalchemy.Column",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.Integer... |
12157928524 | import torch.nn as nn
from torch.nn import functional as F
class Encoder(nn.Module):
"""
(3, 64, 64)の画像を(1024,)のベクトルに変換するエンコーダ
"""
def __init__(self):
super(Encoder, self).__init__()
self.cv1 = nn.Conv2d(3, 32, kernel_size=4, stride=2)
self.cv2 = nn.Conv2d(32, 64, kernel_size=... | chika-sawa/WorldModels | src/model/encoder.py | encoder.py | py | 754 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "torch.nn.Module",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numb... |
12212610838 | """Defines base classes"""
import abc
from collections import namedtuple
from typing import Dict, List, Optional, Type, Union
from convtools.base import BaseConversion
_none = BaseConversion._none
class BaseStep:
STEP_TYPE = "base_step"
ensures_type: Optional[Type] = None
TypeValueCodeGenArgs = namedtupl... | simrit1/convtools | src/convtools/contrib/models/base.py | base.py | py | 4,078 | python | en | code | null | github-code | 1 | [
{
"api_name": "convtools.base.BaseConversion._none",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "convtools.base.BaseConversion",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 14,
"usage_type": "name"
},
{
... |
33198834237 | import datetime
import datetime
from django.core.paginator import Paginator
from django.db.models import Q
from django.utils import timezone
from django.http import JsonResponse
from django.shortcuts import render, redirect
from django.urls import reverse_lazy
from .models import Message
from .forms import MessageForm... | Sampleeeees/MyHouse24 | Messages/views.py | views.py | py | 4,814 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.contrib.auth.get_user_model",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "django.views.generic.ListView",
"line_number": 28,
"usage_type": "name"
},
{
"api_name": "models.Message",
"line_number": 29,
"usage_type": "name"
},
{
"a... |
70647530913 | #!/usr/bin/env python3
#https://github.com/syakoo/galois-field
#pip install git+https://github.com/syakoo/galois-field
import argparse, sys, os.path, math
from galois_field import GFpn
from lib.wg_gf_lib import SimuGF
from galois_field.core import validator
#----------------------------
def show_examples():
scr... | guenterjantzen/workshop-groups | wg_gf.py | wg_gf.py | py | 9,532 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "os.path.path.basename",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "argparse.ArgumentPars... |
74913147553 | import requests
import os
import sys
import json
import argparse
import shlex
import urllib.parse
import xml.etree.ElementTree as ET
import configparser
from typing import List, Any, Union, Dict, Tuple, Optional
import readline
class apimodule:
"""
Arguments
modulename: The name of the module
... | thka2315/gapicli | gapicli.py | gapicli.py | py | 14,177 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "json.loads",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "typing.Union",
"line_number": 27,
"usage_type": "name"
},
{
"api_name": "typing.Dict",
"line_number": 43,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 4... |
23165249908 | # -*- coding: utf-8 -*-
# =============================================================================
# Author : Ahmadreza Farmahini Farahani
# Created Date : 2023/4
# Project : This project is developed for "Machine Learning and Pattern Recognition" course
# Supervisor : Prof. Sandro Cumani
# =====... | ahmadrezafrh/Gender-Identification-MLPR | postprocess.py | postprocess.py | py | 4,786 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "utils.vrow",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "numpy.log",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "numpy.int32",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 31,... |
5099702172 | import json
from flask import Blueprint, request
from werkzeug.datastructures import ImmutableMultiDict
from api import http_status
from api.errors import ApiException, ValidationException
from api.forms.module_set_config import ModuleSetConfigForm
from api.forms.module_set_value import ModuleSetValueForm
from core.mod... | brewmajsters/brewmaster-backend | api/routes.py | routes.py | py | 8,055 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "flask.Blueprint",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "core.models.DeviceTypeDatapoint.query.all",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "core.models.DeviceTypeDatapoint.query",
"line_number": 18,
"usage_type": "attri... |
72744196835 | from django.urls import path
from . import views
urlpatterns = [
path("", views.index, name='firstpage'),
path("posts", views.posts, name='posts'),
path("posts/<slug>", views.posts_detail, name='info'), #slug - posts/myfirstpost
]
| StrixPO/Django_blog_skeleton | my_site/blog/urls.py | urls.py | py | 246 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.urls.path",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
}
] |
27393257484 | #!/usr/bin/env python
from tasks import *
from utils.functions import get_folder
from pathlib import Path
import config
# Run all tasks here, can also comment out those not wanted
def main():
# Create output.csv in output folder using files in data (starting with ASO)
create_output() # get correct e... | tyulab/ixCells | run.py | run.py | py | 1,309 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "utils.functions.get_folder",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
... |
746501982 | # Flask-TurnKey Version 0.0.1
# App.py
# Flask
from flask import Flask
# Flask-TurboDuck
from flask_turboduck.db import Database
app = Flask(__name__)
app.config.from_object('config.Configuration')
db = Database(app)
def create_tables():
User.create_table()
| DommertTech/flask-turnkey | flask_turnkey/app.py | app.py | py | 266 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask_turboduck.db.Database",
"line_number": 12,
"usage_type": "call"
}
] |
17358841868 | import yaml
from pprint import pprint
from netmiko import ConnectHandler
file = "/home/mwhite/.netmiko.yml"
with open(file) as f:
yaml_out = yaml.load(f)
device = yaml_out["cisco3"]
with ConnectHandler(**device) as connected:
output = connected.find_prompt()
print(output)
| mickdcsw/PyPlus | class3/class3_task5.py | class3_task5.py | py | 287 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "yaml.load",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "netmiko.ConnectHandler",
"line_number": 12,
"usage_type": "call"
}
] |
10681643242 | import torch
import torch.nn as nn
import torch.nn.functional as F
class SRCNN(nn.Module):
def __init__(self, c, n1, n2, n3, f1, f2, f3):
super(SRCNN, self).__init__()
# patch extraction
self.F1 = nn.Conv2d(
in_channels=c,
out_channels=n1,
kernel_size=f1,
stride=1,
padding=... | thepooons/SRCNN | src/models.py | models.py | py | 833 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "torch.nn.Module",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 5,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numb... |
73176238435 | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="pexen",
version="0.0.3",
author="Jiri Jaburek",
author_email="comps@nomail.dom",
description="Python EXecution ENvironment, scheduler included",
long_description=long_description,
... | comps/pexen | setup.py | setup.py | py | 792 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "setuptools.find_packages",
"line_number": 15,
"usage_type": "call"
}
] |
72449217314 | #!/usr/bin/python3
"""Gets user, their tasks done, undone and total
and prints the done tasks"""
from requests import get
from sys import argv
if __name__ == '__main__':
url1 = get('https://jsonplaceholder.typicode.com/todos?userId=' + argv[1])
url2 = get('https://jsonplaceholder.typicode.com/users/' + argv[1... | AyshaMuss/holberton-system_engineering-devops | 0x15-api/0-gather_data_from_an_API.py | 0-gather_data_from_an_API.py | py | 725 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "requests.get",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 10,
... |
34902152990 | """DjangoBBSForum URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Clas... | solost23/DjangoBBSForum | bbs/urls.py | urls.py | py | 1,196 | python | en | code | 10 | github-code | 1 | [
{
"api_name": "django.urls.path",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "bbs.views.index",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "bbs.views",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "django.urls.path",
... |
28666281069 | from urllib.request import urlopen
from bs4 import BeautifulSoup
# 텍스트 읽기 - 영어
url = 'https://www.pythonscraping.com/pages/warandpeace/chapter1.txt'
textPage = urlopen(url)
print(textPage.read()[:1000])
print('='*100)
# 러시아어+프랑스어
url = 'https://www.pythonscraping.com/pages/warandpeace/chapter1-ru.txt'
textPage = ur... | japark/PythonWebScraper | ReadFiles/read_txt.py | read_txt.py | py | 807 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "urllib.request.urlopen",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "urllib.request.urlopen",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "urllib.request.urlopen",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "b... |
45737922134 | from turtle import Screen
from paddle import Paddle
from ball import Ball
from scoreboard import Scoreboard
import time
# Create the game window
screen = Screen()
screen.bgcolor('black')
screen.setup(800, 600)
screen.title('My Pong Game')
screen.tracer(0)
# Create the right paddle and left paddle
r_paddle = Paddle(35... | LJW92/PythonProjects | GUI Projects/PongGame/main.py | main.py | py | 1,570 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "turtle.Screen",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "paddle.Paddle",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "paddle.Paddle",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "ball.Ball",
"line_number... |
11496524767 | import praw
from praw.models import MoreComments
import datetime
sarcComments = []
def readReplies(comment, regFile, sarcFile):
replies = comment.replies
for reply in replies:
if isinstance(reply, MoreComments):
continue
body = reply.body.lower()
tokens = body.split(". ")
... | chrisw2529/Natural-Language-Processing | finalProj/collectData.py | collectData.py | py | 3,077 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "praw.models.MoreComments",
"line_number": 10,
"usage_type": "argument"
},
{
"api_name": "praw.models.MoreComments",
"line_number": 30,
"usage_type": "argument"
},
{
"api_name": "praw.Reddit",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": ... |
70520052195 | import json
from django.shortcuts import render, redirect
from .forms import *
from .models import *
from django.contrib.auth.forms import UserCreationForm
from django.contrib import messages
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from djang... | Badr-Mohammed9/shopuProject | shop/views.py | views.py | py | 3,527 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "django.shortcuts.render",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.redirect",
"line_number": 35,
"usage_type": "call"
},
{
"api_name": "django.shortcuts.render",
"line_number": 36,
"usage_type": "call"
},
{
"api_nam... |
19578363552 | import os
import shutil
import subprocess
import tempfile
from functools import wraps
import click
from PIL import ImageOps
from tqdm import tqdm
from .outliner import outliner
def xml_wrap(tag, inner, **kwargs):
kw = ' '.join('%s="%s"' % (k, str(v)) for k,v in kwargs.items())
if inner is None:
r... | ali1234/bitmap2ttf | bitmap2ttf/convert.py | convert.py | py | 3,625 | python | en | code | 95 | github-code | 1 | [
{
"api_name": "tempfile.mkdtemp",
"line_number": 47,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 49,
"usage_type": "attribute"
},
{
"api_name": "tqdm.tqdm",
"line_numb... |
4246703255 | import pandas as pd
import numpy as np
import umap
import json
from loguru import logger
def convert_str_emb_to_float(emb_list):
float_emb = []
for str_emb in emb_list:
emb = json.loads(str_emb)
float_emb.append(np.array(emb))
return float_emb
def reduce_embedding_dimension(
data,
... | pass-culture/data-gcp | jobs/ml_jobs/embeddings/tools/dimension_reduction.py | dimension_reduction.py | py | 717 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "json.loads",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "numpy.array",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "loguru.logger.info",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "loguru.logger",
"line_n... |
11819620665 | import cv2
fps = 24
size = (274,512)
videowriter = cv2.VideoWriter("result.avi",cv2.cv.FOURCC('M','J','P','G'),fps,size)
for i in range(1,150):
img = cv2.imread('../results/result%d.png' % i)
if i!=70:
videowriter.write(img)
| Hajiren/Parametric-human-shape-reshaping-for-video | code/videoMake/videoMake.py | videoMake.py | py | 243 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "cv2.VideoWriter",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.cv.FOURCC",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "cv2.cv",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "cv2.imread",
"line_number"... |
41283212288 | from hypothesis import given
from hypothesis.strategies import lists, builds
from cim.collection_validator import validate_collection_unordered
from cim.iec61968.common.test_document import document_kwargs, verify_document_constructor_default, verify_document_constructor_kwargs, \
verify_document_constructor_args,... | zepben/evolve-sdk-python | test/cim/iec61968/operations/test_operational_restriction.py | test_operational_restriction.py | py | 1,975 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "cim.iec61968.common.test_document.document_kwargs",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "hypothesis.strategies.lists",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "hypothesis.strategies.builds",
"line_number": 11,
"usage_ty... |
74541383072 | # Local imports
import json
import os
# Paths
JLAB_ROOT = os.getcwd()
PACKAGE_JSON = os.path.join(JLAB_ROOT, "dev_mode", "package.json")
EXTERNAL_DEPENDENCIES = {
"@jupyterlab-benchmarks/table-render": "0.1.1"
}
def main():
with open(PACKAGE_JSON, "r") as fh:
data = json.loads(fh.read())
jlab_da... | jupyterlab/benchmarks | docker/add_table_render.py | add_table_render.py | py | 835 | python | en | code | 12 | github-code | 1 | [
{
"api_name": "os.getcwd",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"line_number": 15,
... |
34886502654 | import time
from pika import BlockingConnection, ConnectionParameters
from pika.adapters.blocking_connection import BlockingChannel
QUEUE_NAME = "basic_channel"
def send_message(channel: BlockingChannel, body: str):
"""
Send a basic message to the given channel
:param channel: The channel to send to... | gnir-work/dockerized-rabbitmq | distributer/distributer/distributer.py | distributer.py | py | 1,161 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "pika.adapters.blocking_connection.BlockingChannel",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "time.sleep",
"line_number": 40,
"usage_type": "call"
},
{
"api_name": "pika.BlockingConnection",
"line_number": 41,
"usage_type": "call"
},
{
... |
30922015541 | """Misc. utilities."""
def endless_range(start=0, step=1):
i = start
while True:
yield i
i += step
try:
from setproctitle import setproctitle
except ImportError:
setproctitle = lambda t: NotImplemented
def mixined(cls, *mixin_clses):
return type(cls.__name__ + "+Mixins", mixin_cls... | yostudios/ams | ams/utils.py | utils.py | py | 2,390 | python | en | code | 2 | github-code | 1 | [
{
"api_name": "setproctitle.setproctitle",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "imp.get_suffixes",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
12855297661 | from __future__ import annotations
from typing import Callable, Type, TypeVar
T = TypeVar("T")
Instance = TypeVar("Instance")
MapValidateSub = TypeVar("MapValidateSub", bound = "MapValidate")
class MapValidate:
"""
A data descriptor that will apply the provided mapper functions to its data to transform it a... | Divy1211/BinaryFileParser | src/binary_file_parser/retrievers/MapValidate.py | MapValidate.py | py | 2,582 | python | en | code | 4 | github-code | 1 | [
{
"api_name": "typing.TypeVar",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "typing.TypeVar",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "typing.TypeVar",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "typing.Callable",
"line... |
4467571006 | import database
import databasebuilder
import idlparser
import logging.config
import os.path
import sys
_logger = logging.getLogger('fremontcutbuilder')
FEATURE_DISABLED = [
'ENABLE_BATTERY_STATUS',
'ENABLE_CSS3_CONDITIONAL_RULES',
'ENABLE_CSS_DEVICE_ADAPTATION',
'ENABLE_CUSTOM_SCHEME_HANDLER',
'E... | MarkBennett/dart | tools/dom/scripts/fremontcutbuilder.py | fremontcutbuilder.py | py | 4,498 | python | en | code | 6 | github-code | 1 | [
{
"api_name": "logging.config.getLogger",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "logging.config",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "os.path.path.dirname",
"line_number": 50,
"usage_type": "call"
},
{
"api_name": "os.path.pa... |
5416694372 | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class Downblock(nn.Module):
def __init__(self, channels, kernel_size=3):
super(Downblock, self).__init__()
self.dwconv = nn.Conv2d(channels, channels, groups=channels, stride=2,
kernel_siz... | cuihu1998/GENet-Res50 | pytorch-GENet/models/blocks.py | blocks.py | py | 2,353 | python | en | code | 15 | github-code | 1 | [
{
"api_name": "torch.nn.Module",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "torch.nn.Conv2d",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "torch.nn",
"line_numbe... |
72514206114 | import torch
import torch.nn as nn
import torch.nn.functional as F
#TODO: focal loss index over error
class FocalLoss(nn.Module):
def __init__(self, gamma=0, alpha=None, size_average=True):
super(FocalLoss, self).__init__()
self.gamma = gamma
self.alpha = alpha
if isinstance(alpha,(... | alswlsghd320/u2net_pytorch | loss.py | loss.py | py | 4,463 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "torch.nn.Module",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "torch.nn",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "torch.Tensor",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "torch.Tensor",
"line_num... |
43438190115 | import numpy as np
import mediapipe as mp
import matplotlib.pyplot as plt
from utils import (
poseDetector, poseUtils
)
def main():
fileName = 'data/Question 19 - 8AE44065-F2F5-4D85-9A96-F69471837F7A.jpeg'
image = poseUtils.getImage(fileName)
pDetector = poseDetector.Pose... | sankhaMukherjee/legalUserImage | main.py | main.py | py | 713 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "utils.poseUtils.getImage",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "utils.poseUtils",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "utils.poseDetector.PoseDetector",
"line_number": 14,
"usage_type": "call"
},
{
"api_name... |
12837436067 | from datetime import datetime, timedelta
from django.db import models
from django.db.models import Q
from django.contrib.postgres.fields import JSONField
from simple_history.models import HistoricalRecords
from web.sns import notify_productcategory_change
from web.managers import ArticleManager
from web.gs1_code_lists ... | hackcasa/zappa_final | web/models.py | models.py | py | 22,739 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "django.db.models.Model",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "django.db.models",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "django.db.models.BooleanField",
"line_number": 32,
"usage_type": "call"
},
{
"api_na... |
35700198066 |
from struct import pack, unpack
import logging
from handleclient import common
from handleclient import utils
from handleclient import message
from handleclient import handlevalue
from handleclient.handlevalue import HandleValue
from handleclient.message import Message, Envelope, Header, Body, Credential
logger = ... | pullp/HandleClient | handleclient/response.py | response.py | py | 1,554 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "logging.getLogger",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "handleclient.common.LOG_LEVEL",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "handleclient.common",
"line_number": 14,
"usage_type": "name"
},
{
"api_name... |
16150940400 |
# Name: John Kelly
# ID: C00176932
from flask import Flask, render_template, request, session
from operator import itemgetter
from collections import Counter
import pickle
import random
import time
import os.path
import parse_words
app = Flask(__name__)
@app.route('/')
def start_app():
if os.path.isfile('pickl... | ItsJohn/Word-Game | webapp.py | webapp.py | py | 4,798 | python | en | code | 0 | github-code | 1 | [
{
"api_name": "flask.Flask",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "os.path.path.isfile",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "os.path.path",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.path",
"line... |
7814140733 | import cv2
import matplotlib.pyplot as plt
import os
from glob import glob
import numpy as np
import argparse
parser = argparse.ArgumentParser()
parser.add_argument( "--root", type=str, default="./atten_bear_visualization/", help="down or middle or up" )
parser.add_argument( "--num_sample", type=int, default=3,... | sunwoo76/CrossAttentionControl-stablediffusion | visualize_comp.py | visualize_comp.py | py | 3,773 | python | en | code | 73 | github-code | 1 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "glob.glob",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_num... |
38989922806 | import argparse
import time
import absim.world as world
from absim.bayesian_agent import BayesianAgent
from absim.prob_agent import ProbAgent
from absim.prox_agent import ProxAgent
from absim.prob_prox_agent import ProbProxAgent
from absim.salesman_agent import SalesmanAgent
agent_lookup = {
"prob" : ProbAgent,
... | utexas-bwi/scavenger_hunt | bwi_scavenger/scripts/absim/hunt.py | hunt.py | py | 5,517 | python | en | code | 3 | github-code | 1 | [
{
"api_name": "absim.prob_agent.ProbAgent",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "absim.prox_agent.ProxAgent",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "absim.prob_prox_agent.ProbProxAgent",
"line_number": 15,
"usage_type": "name"
},
... |
8691148159 | from typing import List
# Definition for a Node.
class Node:
def __init__(self, val=None, children=None):
self.val = val
self.children = children if children is not None else []
class Solution:
def findRoot(self, tree: List['Node']) -> 'Node':
if len(tree) == 0:
return No... | songkuixi/LeetCode | Python/Find Root of N-Ary Tree.py | Find Root of N-Ary Tree.py | py | 631 | python | en | code | 1 | github-code | 1 | [
{
"api_name": "typing.List",
"line_number": 12,
"usage_type": "name"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.