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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19111946178 | import argparse
import os
import torch
import torch.distributed as dist
from maskrcnn_benchmark.solver import make_lr_scheduler
from maskrcnn_benchmark.solver import make_optimizer
from maskrcnn_benchmark.utils.checkpoint import DetectronCheckpointer
from maskrcnn_benchmark.utils.collect_env import collect_env_info
fr... | amazon-science/siam-mot | tools/train_net.py | train_net.py | py | 4,427 | python | en | code | 463 | github-code | 71 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "siammot.modelling.rcnn.build_siammot",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "siammot.configs.defaults.cfg",
"line_number": 38,
"usage_type": "argument"
... |
22634444687 |
import os
#os.environ['LD_LIBRARY_PATH'] += ':/usr/local/cuda-11.1/bin64:/usr/local/cuda-11.2/bin64'
import numpy as np
import torch
import torch.multiprocessing as mp
import torch_geometric.datasets as GeoData
from modelnet40 import ModelNet40
from torch.utils.data import DataLoader, Sampler
import torch_geometric.... | megaelius/LG-GCN | train_modelnet40.py | train_modelnet40.py | py | 12,918 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "torch.initial_seed",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "numpy.random.seed",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "numpy.random",
"line_number": 30,
"usage_type": "attribute"
},
{
"api_name": "random.seed",
... |
17973368800 | """
-*- coding: utf-8 -*-
@Time : 2022/8/15 15:15
@Author : 文闯
@File : test_gcp.py
@Software: PyCharm
@company : 功夫豆信息科技
"""
import sys,os
sys.path.append('..')
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
import pytest
import json
from common.conf import MyCon... | wwenchuang/gfd-gcp | testcases/test_gcp.py | test_gcp.py | py | 2,945 | python | zh | code | 0 | github-code | 71 | [
{
"api_name": "sys.path.append",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "sys.path.append",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_nu... |
7525736982 | from contextlib import nullcontext
from typing import List
from absl import logging
import tensorflow as tf
from monolith.agent_service.agent_service_pb2 import ServerType
from monolith.agent_service.backends import SyncBackend
from monolith.utils import get_libops_path
from monolith.native_training.runtime.ops import... | bytedance/monolith | monolith/native_training/distributed_serving_ops.py | distributed_serving_ops.py | py | 4,915 | python | en | code | 702 | github-code | 71 | [
{
"api_name": "monolith.native_training.runtime.ops.gen_monolith_ops",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "absl.logging.info",
"line_number": 65,
"usage_type": "call"
},
{
"api_name": "absl.logging",
"line_number": 65,
"usage_type": "name"
},
{
... |
15277682051 | from __future__ import annotations
from typing import TYPE_CHECKING, Optional, List, Union, Any
from discord import Message
from pygame import Surface
from UI.Game import ActivePlayerView, InactivePlayerView
if TYPE_CHECKING:
from Classes import DeadBot, SubnauticaPlayer, ResourceCard, EquipmentCard, CreatureCa... | AllegroVivo/DeadBot | Classes/Game/PlayerHand.py | PlayerHand.py | py | 4,991 | python | de | code | 0 | github-code | 71 | [
{
"api_name": "typing.TYPE_CHECKING",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "Classes.SubnauticaPlayer",
"line_number": 31,
"usage_type": "name"
},
{
"api_name": "Classes.SubnauticaPlayer",
"line_number": 33,
"usage_type": "name"
},
{
"api_name":... |
38952070861 | from collections import defaultdict
import math
def solution(fees, records):
answer = []
record_dict = defaultdict(list)
car_num = defaultdict(list)
for element in records:
now_time, now_car, now_statue = element.split()
car_num[now_car] = [0, 0]
convert_time = int(now_time... | DonghakPark/Problem-Solving | Python/other/[K]3.py | [K]3.py | py | 1,853 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "collections.defaultdict",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "collections.defaultdict",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "math.ceil",
"line_number": 36,
"usage_type": "call"
}
] |
73381069988 | import glob
import os
import platform
import re
import shutil
import subprocess
import sys
import setuptools
from setuptools.command.build_ext import build_ext
cur_dir = os.path.dirname(os.path.abspath(__file__))
def is_windows():
return platform.system() == "Windows"
def cmake_extension(name, *args, **kwargs... | csukuangfj/kaldilm | setup.py | setup.py | py | 4,663 | python | en | code | 37 | github-code | 71 | [
{
"api_name": "os.path.dirname",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "platform.system",
"l... |
34277351109 | import os
import datetime
import setpath
import solver.v1.tables.lp_table as lp_table1
import solver.v1.tables.make_table as mt
import solver.v1.tables.tables as cb
import utils.scan.tabholder as tabh
import utils.logging as log
import solver.v2.tables.lp_table as lp_table2
from version import *
import probspec as ... | cargicar/Primalboot_py39 | py/table_funcs.py | table_funcs.py | py | 1,757 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "solver.v1.tables.make_table.get_filename",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "solver.v1.tables.make_table",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "probspec.dim",
"line_number": 20,
"usage_type": "attribute"
},
{... |
5616834971 | # Example initially from
# https://github.com/Azure-Samples/resource-manager-python-resources-and-groups
import os
import json
from datetime import datetime
from azure.common.credentials import ServicePrincipalCredentials
from azure.mgmt.resource import ResourceManagementClient
# Variables
GROUP_LOCATION = "westus"
G... | lazywinadmin/python | azure-auth_env_variables/example.py | example.py | py | 4,696 | python | en | code | 7 | github-code | 71 | [
{
"api_name": "json.load",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "os.environ",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_numb... |
19388574919 | import os
from PIL import Image
import pytesseract
from flask import Flask, request
from flask_cors import CORS
app = Flask(__name__)
cors = CORS(app, resources={r"/*": {"origins": "*"}})
@app.route("/process/<language>", methods=['POST'])
def process_image(language):
assert language == request.view_args['languag... | gomezrondon/py-ocr-service | main.py | main.py | py | 785 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "flask.Flask",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask.request.view_args",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "flask.request"... |
21774734049 | from PIL import Image
import numpy as np
def distance(x, y, ox, oy):
return np.sqrt((x-ox)**2 + (y-oy)**2)
def sin(x):
return np.sin(x)
def zdistance(x, y, origin, factor):
return round(distance(x, y, origin[0], origin[1])) % factor
def colorSin(freq, o, x, y, factor, num):
return np.floor((128 + 12... | jjjpanda/SineWave-Imaging | waveImgGen.py | waveImgGen.py | py | 4,541 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.sqrt",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.sin",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "numpy.floor",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "numpy.pi",
"line_number": 14,
... |
41343106837 | from django.contrib import admin
from django.contrib.admin import widgets
from django.contrib.admin.sites import site
from ...utils.admin import CustomModelAdmin
from .models import Room, Timebound, Timetable, Course, School
@admin.register(Room)
class RoomAdmin(CustomModelAdmin):
model = Room
raw_id_fi... | Limkaa/KBTU-Diploma-project-LMS | backend/src/apps/core/modules/timetables/admin.py | admin.py | py | 3,285 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "utils.admin.CustomModelAdmin",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "models.Room",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "django.contrib.admin.register",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": ... |
74231813026 | import os, sys, shlex
from task import Task
from more import More
from errors import CommandNotFoundError, InvalidArgumentsError, InvalidCommandError
import readline
'''
Sean Fradl
Dublin City University
Student No 17460674
As part of CA216
This shell runs in Python 3.
Note about readline import:
... | Frazl/CA216-PythonShell | myshell.py | myshell.py | py | 10,399 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "os.getcwd",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "sys.argv",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "os.getcwd",
"line_number": 32,
"usage_type": "call"
},
{
"api_name": "os.environ.get",
"line_number":... |
42187947093 | import numpy as np
import matplotlib.pyplot as plt
def showScanImage2(slice, pic, label, pred, threshold=None, saturate=None, cmap_='CMRmap'):
pic_ = np.copy(pic)
label_ = np.copy(label)
pred_ = np.copy(pred)
if saturate is not None:
print('saturate')
temp = pred_[:,:,:,1]
tem... | winsonhana/HVSMR16Heart | HVSMRview.py | HVSMRview.py | py | 2,811 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.copy",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "numpy.copy",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.copy",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.figure",
"line_nu... |
39267013282 | # coding=utf-8
import pandas as pd
from sklearn.cross_validation import train_test_split
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import StratifiedKFold, KFold
from sklearn.metrics import roc_auc_score, precision_recall_curve, roc_curve, average_precision_score
import numpy as np
impo... | Shicoder/rong360-UserProfile-rank38-Soultion | 2feature_enginer/src/model_combine.py | model_combine.py | py | 7,756 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pandas.read_csv",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
... |
40929097030 | #
#
#
from __future__ import absolute_import, division, print_function, \
unicode_literals
from six import text_type
from ..source.base import BaseSource
from ..zone import Zone
from .plan import Plan
class BaseProvider(BaseSource):
def __init__(self, id, apply_disabled=False,
manage_root... | swisstxt/octodns-old-to-be-deleted | octodns/provider/base.py | base.py | py | 3,966 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "source.base.BaseSource",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "plan.Plan.MAX_SAFE_UPDATE_PCENT",
"line_number": 19,
"usage_type": "attribute"
},
{
"api_name": "plan.Plan",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": ... |
34571343799 | from django.urls import path
from . import views
app_name = 'base'
urlpatterns = [
path('', views.index, name='index'),
path('profile/', views.profile, name='profile'),
path('group/', views.group, name='group'),
path('group/<int:group_id>/', views.group_individual, name='group_individual'),
path(... | white-noise/rensetsu | rensetsu/base/urls.py | urls.py | py | 1,299 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "django.urls.path",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "django.urls.path",
... |
20014032391 | import pandas
from numpy import corrcoef
from scipy.sparse import hstack
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.decomposition import PCA
import sys
from sklearn.linear_model import Ridge
sys.path.append("..")
from util import print_answer
from sklearn.feature_extraction import DictVe... | dimitrkovalsky/intro-to-ml | 04-pca/main.py | main.py | py | 939 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "sys.path.append",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "pandas.read_csv",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "sklearn.decomposition.P... |
3496918491 | import os
import yaml
def load_yaml(path):
with open(path, 'r') as f:
return yaml.load(f, Loader=yaml.FullLoader)
def get_root_work_path() -> str:
"""获取ros的工作目录,会得到一个到src文件夹的绝对路径
Returns:
str: 工作目录的绝对路径
"""
import os
try:
ros_package_path = os.environ['ROS_PACKAGE_PATH... | MERONAL/RLmapping | rl/scripts/utils/tools.py | tools.py | py | 1,766 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "yaml.load",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "yaml.FullLoader",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "os.environ",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line... |
39281740928 | from rest_framework import serializers
class PublishSerializer(serializers.Serializer):
"""
推送 notify 輸入
"""
message = serializers.CharField(label="要發送的訊息")
class WebhookSerializer(serializers.Serializer):
"""
Line notify webhook use
"""
code = serializers.CharField()
state = ser... | s0974129/line_notify_service | api/serializers.py | serializers.py | py | 361 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "rest_framework.serializers.Serializer",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.serializers",
"line_number": 4,
"usage_type": "name"
},
{
"api_name": "rest_framework.serializers.CharField",
"line_number": 8,
"usage_type"... |
13136471542 | import sys
sys.path.append("/opt")
from common.utils.response import Response
from common.constants import Constants
from user_common import User
from common.utils.validate_json import validate_query_params
from common.utils.authorize import authorize
schema = {
"$schema": "http://json-schema.org/draft-04/schema#... | saif-sha/Cloud_a2 | backend/user/update_user.py | update_user.py | py | 1,030 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "sys.path.append",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "sys.path",
"line_number": 3,
"usage_type": "attribute"
},
{
"api_name": "common.utils.response.Response",
"line_number": 28,
"usage_type": "call"
},
{
"api_name": "user_commo... |
36941621316 | from fastapi.testclient import TestClient
from quality_of_life.main import app
client = TestClient(app)
def test_get_nearest():
response = client.get(
'/api/v1/nearest/?city=gda%C5%84sk&country=Poland&distance=200&limit=1')
assert response.status_code == 200
assert response.json() == [
{... | MaciejZawierzeniec/Quality_of_life_API | tests/api/endpoints/test_nearest.py | test_nearest.py | py | 676 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "fastapi.testclient.TestClient",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "quality_of_life.main.app",
"line_number": 5,
"usage_type": "argument"
}
] |
10468123427 | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
from django.contrib import admin
from views import *
admin.site.site_header = 'Pets Example'
urlpatterns = patterns('',
url(r'^pet/list$', PetListView.as_view()),
url(r'^pet$', PetView.as_view()),
url(r'^pet/(?P<id>.+)/$', PetVie... | ugosan/django-basic-rest | app/basicrest/urls.py | urls.py | py | 401 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "django.contrib.admin.site",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.admin",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "django.conf.urls.patterns",
"line_number": 9,
"usage_type": "call"
},
{
"api_na... |
29848766360 | import json
import sys, re, copy
from numerics import *
import config
from operator import *
from sym import SYM
import math
def misc1(fun, iterable):
"""
Maps the function over the iterable
fun : Function that must be applied on each element of iterable
iterable : iterable over which function must be... | suryasashankgundepudi/CSC-591-GROUP-6-FINALPROJECT | src/misc.py | misc.py | py | 5,834 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "config.egs",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "sys.stdout.write",
"line_number": 49,
"usage_type": "call"
},
{
"api_name": "sys.stdout",
"line_number": 49,
"usage_type": "attribute"
},
{
"api_name": "re.findall",
"li... |
33254096679 | from __future__ import nested_scopes
import pytest
from raft import models
from raft.models import Event, EventType, rpc, server
@pytest.fixture
def candidate_request_vote_event(config):
def inner(node_id, term, dest):
return Event(
EventType.CandidateRequestVoteRpc,
rpc.RequestV... | erewok/raft-py | tests/raft/models/test_server.py | test_server.py | py | 14,626 | python | en | code | 3 | github-code | 70 | [
{
"api_name": "raft.models.Event",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "raft.models.EventType.CandidateRequestVoteRpc",
"line_number": 13,
"usage_type": "attribute"
},
{
"api_name": "raft.models.EventType",
"line_number": 13,
"usage_type": "name"
},... |
884325931 | import json
from pathlib import Path
import pytest
from micloud.micloudexception import MiCloudAccessDenied
from miio import CloudException, CloudInterface
def load_fixture(filename: str) -> str:
"""Load a fixture."""
file = Path(__file__).parent.absolute() / "fixtures" / filename
with file.open() as f:... | rytilahti/python-miio | miio/tests/test_cloud.py | test_cloud.py | py | 3,224 | python | en | code | 2,794 | github-code | 70 | [
{
"api_name": "pathlib.Path",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "miio.CloudInterface",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "pytest.fixture",
"line... |
23313400665 | from functools import cached_property
from msilib.schema import Error
from django.shortcuts import render, redirect
from django.urls import reverse_lazy
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from User.forms import UpdateUserForm
from django.contrib.auth.mixins im... | Al-mogtaba/E-Dawa | dashboard/views.py | views.py | py | 4,610 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "models.Pharmacy.objects.all",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "models.Pharmacy.objects",
"line_number": 17,
"usage_type": "attribute"
},
{
"api_name": "models.Pharmacy",
"line_number": 17,
"usage_type": "name"
},
{
"api_name... |
75188860387 | #!/usr/bin/env python3
import time
import asyncio
import random
import pytest
from scheduler import Scheduler
class MockTime:
def __init__(self, start):
self.time = start
def monotonic(self):
return self.time
async def sleep(self, n):
self.time += n
return None
@pytes... | grubberr/aiven-kafka | tests/test_scheduler.py | test_scheduler.py | py | 1,160 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "scheduler.Scheduler",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "scheduler.add",
"line_number": 33,
"usage_type": "call"
},
{
"api_name": "scheduler.add",
"line_number": 34,
"usage_type": "call"
},
{
"api_name": "scheduler.gen",
"... |
33460529815 | from datetime import datetime
import numpy as np
import pandas as pd
__Author__ = 'ZCXY'
import os
import warnings
warnings.filterwarnings("ignore")
from functools import reduce
from data_process import *
'''
品种持仓:
1、缺少SC
会员持仓(成交量、持仓买量、持仓卖量):
1、缺少SC
2、三个表交集差异集中在2014-2016的SF
缺失因子用均值填充
'''
class RawData:
def ... | 18337179943/future_ml | mainconinfo/data_load.py | data_load.py | py | 8,347 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "warnings.filterwarnings",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.now",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "os.pat... |
29907066803 | import pickle
import matplotlib.ticker
import matplotlib.pyplot as plt
import numpy as np
plt.style.use('ggplot')
with open("latencies_rpi", 'rb') as p_in:
latencies = pickle.load(p_in)
x = np.linspace(0, len(latencies), len(latencies))
fig, ax = plt.subplots(2)
latencies = np.array(latencies)
ax[0].stem(x, l... | h-brenne/DataMuleIoT | src/plotLatency.py | plotLatency.py | py | 532 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "matplotlib.pyplot.style.use",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot.style",
"line_number": 6,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 6,
"usage_type": "name"
},
{
"api_name"... |
41539140586 | # -*- encoding=utf8 -*-
__author__ = "jiangsihui"
import os
import configparser
import time
import math
import urllib
import cv2
import numpy as np
from airtest.core.api import *
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from airtest_selenium.proxy import WebChrome
from selenium.we... | jiangsihuiamanda/pccwglobal | Part1/searchImage.air/searchImage.py | searchImage.py | py | 3,401 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "airtest_selenium.proxy.WebChrome",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "configparser.ConfigParser",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_number": 28,
"usage_type": "call"
},
{
"api_na... |
20228390226 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import time
import rich_click as click
import rtmidi
from rich.table import Table
from rich.console import Console
# Create a console instance for formatting the output against this
console = Console()
from utils import bytes_to_hex_str
from sysexdata import SYSEX_DEVICE_... | AndreasPantle/X-Touch-Mini-HandsOn | cli/xtm.py | xtm.py | py | 13,374 | python | en | code | 4 | github-code | 70 | [
{
"api_name": "rich.console.Console",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "rtmidi.MidiIn",
"line_number": 80,
"usage_type": "call"
},
{
"api_name": "rtmidi.MidiOut",
"line_number": 81,
"usage_type": "call"
},
{
"api_name": "rich_click.group",
... |
33948557695 | from datetime import datetime, timedelta
from pytz import timezone, utc
from odoo import api, fields, models, _
from odoo.addons.http_routing.models.ir_http import slug
from odoo.addons.resource.models.utils import float_to_time
from odoo.tools import is_html_empty
from odoo.tools.translate import html_translate
cla... | odoo/odoo | addons/website_event_exhibitor/models/event_sponsor.py | event_sponsor.py | py | 11,201 | python | en | code | 31,745 | github-code | 71 | [
{
"api_name": "odoo.models.Model",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "odoo.models",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "odoo.fields.Many2one",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "odoo.fields",... |
4424554145 | from typing import Callable, List
from data import MoleculeFactorDataset
from model import MatrixFactorizer
from predict import predict
from chemprop.data.scaler import StandardScaler
def evaluate_predictions(targets: List[int],
preds: List[float],
num_tasks: int,
... | swansonk14/chemprop-factor | evaluate.py | evaluate.py | py | 1,610 | python | en | code | 11 | github-code | 70 | [
{
"api_name": "typing.List",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "typing.List",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "typing.Callable",
"line_numbe... |
43179540162 | from dataclasses import dataclass, field
from typing import List, Optional
from .compu_const import CompuConst
from .compu_scale import CompuScale
__NAMESPACE__ = "http://autosar.org/schema/r4.0"
@dataclass
class Compu:
"""
This meta-class represents the ability to express one particular computation.
:i... | tefra/xsdata-samples | autosar/models/compu.py | compu.py | py | 2,864 | python | en | code | 7 | github-code | 70 | [
{
"api_name": "typing.Optional",
"line_number": 38,
"usage_type": "name"
},
{
"api_name": "dataclasses.field",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "typing.Optional",
"line_number": 46,
"usage_type": "name"
},
{
"api_name": "compu_const.CompuCo... |
22778512919 | import copy
import smtplib
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.utils import COMMASPACE, formatdate
from _env import (
EMAIL_USE_TLS,
EMAIL_HOST,
EMAIL_PORT,
... | SuperDev0123/python-cron-examples | _email_lib.py | _email_lib.py | py | 1,114 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "email.mime.multipart.MIMEMultipart",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "_env.EMAIL_HOST_USER",
"line_number": 32,
"usage_type": "name"
},
{
"api_name": "email.utils.COMMASPACE.join",
"line_number": 33,
"usage_type": "call"
},
{
... |
1374895768 | import datetime
from typing import TypeVar, ClassVar
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.future import select
from app.src.database import Base
from app.src.http_requests import MakeRequest
from app.src.paginations import PagePagination
# custom type for SQLAlchemy model
ModelType = Type... | ruslanhq/registry-prozorro-update | app/src/base_services.py | base_services.py | py | 6,555 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "typing.TypeVar",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "app.src.database.Base",
"line_number": 13,
"usage_type": "name"
},
{
"api_name": "app.src.paginations.PagePagination",
"line_number": 19,
"usage_type": "name"
},
{
"api_name"... |
40031780367 | #Given an array arr, replace every element in that array with the greatest element among the elements to its right,
# and replace the last element with -1.
from typing import List
class ReplaceWithGreatestRight:
def replace_elements(arr: List[int]):
i = 1
while i<=len(arr):
if i == len... | KatthakS/data_structures_in_python | LeetCode_Problems/replace_with_greatest_right.py | replace_with_greatest_right.py | py | 514 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "typing.List",
"line_number": 6,
"usage_type": "name"
}
] |
23560052223 | import os
import pytest
import json
import pkg_resources
import pandas as pd
from pathlib import Path
from mlflow import pyfunc
from bigmlflow.bigml import save_model, load_model
from bigml.supervised import SupervisedModel
from bigml.fields import Fields
MODELS_PATH = os.path.join(
str(Path(pkg_resources.reso... | bigmlcom/bigmlflow | tests/register_test.py | register_test.py | py | 3,360 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "os.path.join",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "pathlib.Path",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pkg_resources.resource_filenam... |
40997406892 | from flask import Flask, render_template, request
app = Flask(__name__)
# List of symptoms
symptoms = ['Fever', 'Cough', 'Shortness of Breath', 'Chest Pain', 'Chills', 'Headache', 'Fatigue', 'Sore Throat']
@app.route('/', methods=['GET', 'POST'])
def index():
result = None
if request.method == 'POST':
... | BHUKYA-VEERANNA/PneumoTrack | flask app/app.py | app.py | py | 1,040 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "flask.Flask",
"line_number": 3,
"usage_type": "call"
},
{
"api_name": "flask.request.method",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "flask.request",
"line_number": 12,
"usage_type": "name"
},
{
"api_name": "flask.request.form... |
25701267957 | import requests
from bs4 import BeautifulSoup
# Add the url
url = 'https://www.flipkart.com/search?q=mobile+phone+5g'
# Make a request to the website
response = requests.get(url)
# Create a BeautifulSoup object
soup = BeautifulSoup(response.text, 'html.parser')
# print(soup)
# Find and extract specific ele... | PrathamjyotSingh/Web-Scraping | Soup_flipkart.py | Soup_flipkart.py | py | 2,039 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "bs4.BeautifulSoup",
"l... |
3391271360 | from math import sqrt
import numpy as np
from collections import defaultdict
import matplotlib.pyplot as plt
input = np.loadtxt("./data/wine_input.asc")
target = np.loadtxt("./data/wine_desired.asc")
def getTargetList(target):
t = np.zeros(len(target), dtype=int)
for index, i in enumerate(target):
num... | hminle/intro-neural-nets | assignment3/task3/task3.py | task3.py | py | 2,028 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "numpy.loadtxt",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "numpy.loadtxt",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "numpy.zeros",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "math.sqrt",
"line_number": ... |
10998623725 | from typing import List
from topsdk.client import BaseRequest
from topsdk.util import convert_struct_list,convert_basic_list,convert_struct,convert_basic
from datetime import datetime
class TaobaoFenxiaoProductsGetRequest(BaseRequest):
def __init__(
self,
outer_id: str = None,
productcat_... | LIANGCYRUS/TopApiSite | apps/topsdk/defaultability/request/taobao_fenxiao_products_get_request.py | taobao_fenxiao_products_get_request.py | py | 6,642 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "topsdk.client.BaseRequest",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "datetime.datetime",
"line_number": 15,
"usage_type": "name"
},
{
"api_name": "datetime.datetime",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "datetime... |
39607782482 | import os
import json
from lda import *
from flask_cors import CORS
import openai
from flask import Flask, redirect, render_template, request, url_for, jsonify
app = Flask(__name__)
CORS(app)
openai.api_key = os.getenv("OPENAI_API_KEY")
@app.route("/", methods=['POST'])
def index():
print("received request")
... | bbelide2/CS510-Topic-Summary-Generator | backend/app.py | app.py | py | 1,983 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "flask.Flask",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "openai.api_key",
"line_number": 11,
"usage_type": "attribute"
},
{
"api_name": "os.getenv",
"line_... |
33080018637 | import logging
from time import gmtime
from flask import Flask, Blueprint, request
logging.basicConfig(
format="[%(asctime)s][%(levelname)s][%(name)s.%(funcName)s():%(lineno)s] %(message)s",
datefmt="%Y-%m-%dT%H:%M:%SZ",
level=logging.INFO)
logging.Formatter.converter = gmtime
log = logging.getLogger(__n... | bitbytebitco/radpc_scale | cpap/test/payload_swic/callback_server.py | callback_server.py | py | 1,587 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "logging.basicConfig",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "logging.INFO",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "logging.Formatter",
"line_number": 10,
"usage_type": "attribute"
},
{
"api_name": "time.gmtim... |
73707160551 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import os
import setuptools
from trac_captcha.lib.distribution_helpers import information_from_file
def add_simplejson_if_necessary(a_list_or_dict):
try:
import json
except ImportError:
if hasattr(a_list_or_dict, 'append'):
a_list_or... | FelixSchwarz/trac-captcha | setup.py | setup.py | py | 1,634 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "os.path.join",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "trac_captcha.lib.distribution_helpers.information_from_file",
"line_number": 27,
"usage_type": "call"
},
{
... |
42647296775 | import requests
from time import sleep
import os
import sys
import json
TOO_MANY_REQUESTS = 6
path_for_config = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json')
path_for_group = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'groups.json')
def do_request(url, parameters):
base_p... | Taras52/MyProjects | Diploma/spy_games.py | spy_games.py | py | 3,243 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.path.join",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "os.path.dirname",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.abspath",
"line_nu... |
2892792932 | from Flask import Flask
from sqlalchemy import create_engine
from models.models import *
from models.models import ChlamydiaGonorrhea, CongenitalSyphilis, Base, HepatitisBinfected
app = Flask(__name__)
app.secret_Key = 'somessecretekeythatonlyishouldknow'
app.config['SQLALCHEMY_DATABASE_URL'] = 'mysql+mysqlconnector... | lawoo9/class_project_2 | app/app.py | app.py | py | 566 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "Flask.Flask",
"line_number": 5,
"usage_type": "call"
},
{
"api_name": "sqlalchemy.create_engine",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "models.models.Base.metadata.create_all",
"line_number": 9,
"usage_type": "call"
},
{
"api_name... |
38298591663 | from mxnet import autograd, nd
class Test:
"""
"""
def test(self):
"""
Returns true if this set contains the specified element
"""
x = nd.arange(4).reshape((4,1))
x.attach_grad()
print(autograd.is_training())
with autograd.record():
y... | yongjun310/dsl | c2/Test.py | Test.py | py | 1,149 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "mxnet.nd.arange",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "mxnet.nd",
"line_number": 11,
"usage_type": "name"
},
{
"api_name": "mxnet.autograd.is_training",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "mxnet.autograd",
... |
7647698803 | import sys
from setuptools import setup
PY2 = sys.version_info[0] <= 2
setup(
name='worklogmd',
version=0.24,
author='Samuel Taylor',
url='https://github.com/ssaamm/worklog.md',
description='Text-based work habit tracker',
license='MIT',
packages=['worklog', 'wo... | ssaamm/worklog.md | setup.py | setup.py | py | 660 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "sys.version_info",
"line_number": 4,
"usage_type": "attribute"
},
{
"api_name": "setuptools.setup",
"line_number": 6,
"usage_type": "call"
}
] |
26834360607 | import logging
from os import PathLike
from typing import Any, Dict, Iterable, Tuple, Union, Optional
import torch
from torch import Tensor
from allennlp.common.file_utils import cached_path, json_lines_from_file
from allennlp.common.lazy import Lazy
from allennlp.data.dataset_readers.dataset_reader import DatasetRe... | allenai/allennlp-models | allennlp_models/vision/dataset_readers/nlvr2.py | nlvr2.py | py | 10,490 | python | en | code | 508 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "allennlp_models.vision.dataset_readers.vision_reader.VisionReader",
"line_number": 26,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 66,
"usage_type": "n... |
40307271244 | import torch
from .communication import MPI
from . import dndarray
from . import factories
from . import manipulations
from . import _operations
from . import stride_tricks
from . import types
__all__ = [
"add",
"bitwise_and",
"bitwise_not",
"bitwise_or",
"bitwise_xor",
"cumprod",
"cumprod... | coquelin77/icml-repo | heat/core/arithmetics.py | arithmetics.py | py | 27,882 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "torch.add",
"line_number": 77,
"usage_type": "attribute"
},
{
"api_name": "torch.Tensor",
"line_number": 119,
"usage_type": "attribute"
},
{
"api_name": "torch.Tensor",
"line_number": 163,
"usage_type": "attribute"
},
{
"api_name": "torch.Tensor",
... |
39387799658 | import xml.etree.ElementTree as ET
import os
from entities.member import Member
from entities.mutzar import Mutzar
from entities.maasik import Maasik
from entities.member_personal_data import MemberPersonalData
class XmlUtils:
@classmethod
def parse_folder_to_member(cls,folder_name):
member = Membe... | kaplanhadar1982/parse-swiftness | src/utilities/xml_utils.py | xml_utils.py | py | 2,221 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "entities.member.Member",
"line_number": 15,
"usage_type": "call"
},
{
"api_name": "os.listdir",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "xml.etree.ElementTree.parse",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "xml.etr... |
19814611751 | from flask_wtf import FlaskForm
from wtforms import TextField, SelectField, IntegerField, Form, BooleanField, StringField, PasswordField, validators, SubmitField
from wtforms.validators import DataRequired, AnyOf, NoneOf
class DeleteRowForm(FlaskForm):
ID = IntegerField('Delete Row: ', validators=[DataRequired()]... | MikeStrenk/ATX-Financial-Personal-Loan-Behavior-Predictions | forms.py | forms.py | py | 2,135 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "flask_wtf.FlaskForm",
"line_number": 6,
"usage_type": "name"
},
{
"api_name": "wtforms.IntegerField",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "wtforms.validators.DataRequired",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": ... |
23103346654 | """ Newrelic Alert policies resource
"""
from newrelic import Newrelic
import json
class AlertsPolicies(Newrelic):
def list(self, **kwargs):
"""
Returns list of newrelic alert policies.
:type kwargs: dict
:param kwags: named argument: params, headers
:rtype dict
... | sahilsk/newrelic-monitoring | newrelic_api/alerts_policies.py | alerts_policies.py | py | 2,231 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "newrelic.Newrelic",
"line_number": 8,
"usage_type": "name"
},
{
"api_name": "json.dumps",
"line_number": 44,
"usage_type": "call"
},
{
"api_name": "json.dumps",
"line_number": 66,
"usage_type": "call"
}
] |
36607098327 | import os
import numpy as np
import matplotlib.pyplot as plt
import livvkit
from livvkit.util.LIVVDict import LIVVDict
from livvkit import elements
from livvkit.util import functions
case_color = {'bench': '#d7191c',
'test': '#fc8d59'}
line_style = {'bench': 'o-',
'test': '-'}
setup =... | LIVVkit/LIVVkit | livvkit/components/numerics_tests/ismip.py | ismip.py | py | 6,004 | python | en | code | 7 | github-code | 71 | [
{
"api_name": "livvkit.util.functions.read_json",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "livvkit.util.functions",
"line_number": 23,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "... |
39674526671 | from json.encoder import JSONEncoder
import random
from Vertex import Vertex
from Edge import Edge
import sys
import copy
import json
class Graph:
def __init__(self, total_vertexs:int):
random.seed(88194)
self.total_vertexs = total_vertexs
self.vertexs = self.generateVer... | bearkillerPT/AA | AA01/Graph.py | Graph.py | py | 3,402 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "random.seed",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "json.dump",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "json.load",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "Vertex.Vertex.fromJSON",
"line_nu... |
6454143198 | #!/usr/bin/env python
from __future__ import absolute_import, print_function, division
from mesonh_atmosphere import MesoNHAtmosphere
import os
import sys
import signal
import time
import socket
import struct
import cmath
import numpy as np
from os import getenv
# if PAPARAZZI_HOME not set, then assume the tree contai... | paparazzi/paparazzi | sw/simulator/mesonh/mesonh.py | mesonh.py | py | 4,024 | python | en | code | 1,440 | github-code | 71 | [
{
"api_name": "os.getenv",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path.normpath",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 16,
"usage_type": "attribute"
},
{
"api_name": "os.path.join",
"line_numb... |
43306656219 | """Serve an interactive visualization of the model
This file uses holoviews and panel to serve a dashboard where a user can play with the simulation parameters and see how
the model behaves.
"""
from collections import OrderedDict
import holoviews as hv
import holoviews.plotting.bokeh
import pandas as pd
import pane... | raaperrotta/covid-binder | seir/fiddle.py | fiddle.py | py | 6,021 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "panel.extension",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "pandas.Timestamp",
"line_number": 22,
"usage_type": "attribute"
},
{
"api_name": "panel.widgets",
"line_number": 20,
"usage_type": "attribute"
},
{
"api_name": "panel.widget... |
36229664337 | import os
import pickle
import logging
from typing import List
from functools import partial
from pytconf import register_function
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from google_auth_oauthlib.flow import InstalledAppFlow
from pygooglehelper.util impor... | veltzer/pygooglehelper | pygooglehelper/auth.py | auth.py | py | 3,302 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "typing.List",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "pygooglehelper.configs.ConfigAuth.host",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "pygooglehelper.configs.ConfigAuth",
"line_number": 21,
"usage_type": "name"
},
... |
30910622517 | from rest_framework import viewsets, mixins
from rest_framework.response import Response
from rest_framework.permissions import IsAuthenticated, IsAdminUser
from rest_framework.decorators import action
from apps.page.models import Tag, Page, Post
from apps.page.serializers import (
TagSerializer,
PageSerialize... | apollinaire33/Python-Twitter-Clone-Web-API | apps/page/views.py | views.py | py | 7,025 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "rest_framework.mixins.ListModelMixin",
"line_number": 36,
"usage_type": "attribute"
},
{
"api_name": "rest_framework.mixins",
"line_number": 36,
"usage_type": "name"
},
{
"api_name": "rest_framework.mixins.CreateModelMixin",
"line_number": 37,
"usage_type":... |
75133900389 | import asyncio
import json
from datetime import datetime
from enum import Enum
from functools import partial
from itertools import cycle
from typing import Any, Dict, Iterator, List
from aiohttp import ClientError as ClientError
from aiohttp import ClientSession as Session
from aiohttp import ClientTimeout
from aiokaf... | DSkrubber/Async_FastAPI_webpage_info_parser_with_minio | parser/app/parser_utils.py | parser_utils.py | py | 6,279 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "logger.get_logger",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "enum.Enum",
"line_number": 29,
"usage_type": "name"
},
{
"api_name": "itertools.cycle",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "constants.USER_AGENTS",
... |
23925830303 | import time
import ifcopenshell
import ifcopenshell.api.owner.settings
class Usecase:
def __init__(self, file):
"""Creates a new owner history indicating an element was added
Any object in IFC with a unique ID and name (such as physical products,
tasks, calendars, etc) may have an owner a... | IfcOpenShell/IfcOpenShell | src/ifcopenshell-python/ifcopenshell/api/owner/create_owner_history.py | create_owner_history.py | py | 5,252 | python | en | code | 1,412 | github-code | 71 | [
{
"api_name": "ifcopenshell.api.owner.settings.get_user",
"line_number": 85,
"usage_type": "call"
},
{
"api_name": "ifcopenshell.api",
"line_number": 85,
"usage_type": "attribute"
},
{
"api_name": "ifcopenshell.api.owner.settings.get_application",
"line_number": 88,
"usag... |
6362484026 | from __future__ import unicode_literals
import unittest
from functools import partial
from beekeeper.variable_handlers import render
import beekeeper.variable_handlers
class VariableReceiver(object):
def execute(self, var_type, **kwargs):
render(self, var_type, **kwargs)
def receive(self, expected... | haikuginger/beekeeper | test/test_variable_handers.py | test_variable_handers.py | py | 3,412 | python | en | code | 49 | github-code | 70 | [
{
"api_name": "beekeeper.variable_handlers.render",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "unittest.TestCase",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "functools.partial",
"line_number": 34,
"usage_type": "call"
},
{
"api_n... |
35789916494 | import csv
from io import StringIO, TextIOWrapper
from flask import Flask, jsonify, redirect, request, url_for
from markupsafe import escape
from flask import render_template
from elasticsearch import Elasticsearch
import math
ELASTIC_PASSWORD = ""
existing_index_name = 'law-data-reindex-1'
es = Elasticsearch("http:/... | pkbsa/ThaiLawFinder | search_app.py | search_app.py | py | 7,379 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "elasticsearch.Elasticsearch",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask.Flask",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "flask.render_template",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "flask.r... |
41987695397 | from flask import Flask, request, jsonify
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
# Init app
app = Flask(__name__)
# Database
app.config['SQLALCHEMY_DATABASE_URI']='sqlite:///db.sqlite'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
# Initialize db
db = SQLAlchemy(app)... | codekaust/My-Notes | Python Server or Services/Flask/Flask-RESTAPI/app.py | app.py | py | 1,790 | python | en | code | 7 | github-code | 70 | [
{
"api_name": "flask.Flask",
"line_number": 6,
"usage_type": "call"
},
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "flask_marshmallow.Marshmallow",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "... |
41405988393 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" 造数据 """
import pymysql
import random
from datetime import datetime
__pyname__ = 'make_data'
__author__ = 'Hedwig'
__date__ = '2017/3/22'
def connect_db():
"""
连接数据库
"""
connection = pymysql.connect(
host='127.0.0.1',
port=3306,
... | Hedwiglzy/Book_Info_Manager_System | BIMS/tools/make_data.py | make_data.py | py | 2,798 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pymysql.connect",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "pymysql.cursors",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "random.randint",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "random.randint",
... |
73869484388 | from collections import defaultdict
from typing import Any, Dict, List, Mapping, Optional, Sequence, Tuple, Type
import numpy as np
import rich.progress
import torch
from ...env import PhantomEnv
from ...logging import Metric
from ...types import AgentID, PolicyID
from ...utils import check_env_config
from ..trainer ... | jpmorganchase/Phantom | examples/trainers/ppo/trainer.py | trainer.py | py | 14,252 | python | en | code | 35 | github-code | 71 | [
{
"api_name": "trainer.Trainer",
"line_number": 19,
"usage_type": "name"
},
{
"api_name": "policy.PPOPolicy",
"line_number": 46,
"usage_type": "name"
},
{
"api_name": "typing.Optional",
"line_number": 51,
"usage_type": "name"
},
{
"api_name": "typing.Type",
"l... |
15291820591 | from collections import namedtuple
from ovos_config.config import Configuration
from ovos_config.locale import setup_locale
from ovos_core.transformers import MetadataTransformersService, UtteranceTransformersService
from ovos_core.intent_services.adapt_service import AdaptService
from ovos_core.intent_services.commo... | goldyfruit/ovos-core | ovos_core/intent_services/__init__.py | __init__.py | py | 21,211 | python | en | code | null | github-code | 70 | [
{
"api_name": "collections.namedtuple",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "ovos_config.config.Configuration",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "ovos_core.intent_services.adapt_service.AdaptService",
"line_number": 44,
"usage_... |
73455356709 | from flask import Flask, jsonify
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
## DB CONNECTION AREA
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql+psycopg2://tomato:<password>@localhost:5432/ripe_tomatoes_db'
# config = protocol+adaptor for db ://user:p... | rulerrobin/Coder-Academy | term2/postwork/ORM-challenge-main/app.py | app.py | py | 2,915 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "flask.Flask",
"line_number": 8,
"usage_type": "call"
},
{
"api_name": "flask_sqlalchemy.SQLAlchemy",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "flask_marshmallow.Marshmallow",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "... |
36751553933 | import csv
import json
import os
import re
from typing import Dict
import utils
def process_files(path_to_json_files: str, output_name: str, regex_filter: str = r'*') -> None:
"""
Processes JSON files in the specified directory, filters data based on a regex pattern,
and creates a CSV file contai... | nogakassif/SensingPlaces | locationsProcess.py | locationsProcess.py | py | 4,199 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.listdir",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 26,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "json.load",
"line_number": 2... |
14391948438 | import torch
from torch_geometric.data import Dataset, Data
import random
import math
import os
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from tqdm import tqdm
from sklearn.neighbors import kneighbors_graph
########################################
### CUSTOM DATASET
########################... | dahe-cvl/VISAPP2022_GSTC | GraphDatasets.py | GraphDatasets.py | py | 8,562 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "torch_geometric.data.Dataset",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "os.path.join",
"line_number": 31,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 31,
"usage_type": "attribute"
},
{
"api_name": "os.listdir",
... |
27134236247 |
import logging
import os
import time
from enum import Enum
from typing import List, Optional, Union
from tqdm import tqdm
from filelock import FileLock
from PIL import Image
import torch
from torch.utils.data import Dataset
from torchvision import transforms
from .autoaugment import ImageNetPolicy
from .processors imp... | uzh-dqbm-cmi/NFC_VIT | Model/datasets.py | datasets.py | py | 6,637 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms.Normalize",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "torchvision.transforms",
"line_number": 27,
"usage_type": "name"
},
{
"api_nam... |
7674163112 | from rest_framework.views import APIView
from dash.models import Follow
from .serializers import AuthorSerializer
from .dataUtils import validateData, getAuthor, getFriendsListData
from .verifyUtils import multiFriendQueryValidators, DependencyError
from .httpUtils import JSONResponse
class AuthorFriendsView(APIView)... | CMPUT404W17T06/CMPUT404-project | rest/authorFriendsView.py | authorFriendsView.py | py | 3,495 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "rest_framework.views.APIView",
"line_number": 9,
"usage_type": "name"
},
{
"api_name": "dataUtils.getAuthor",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "httpUtils.JSONResponse",
"line_number": 26,
"usage_type": "call"
},
{
"api_name":... |
37634656623 | # -*- coding: utf-8 -*-
"""
Batch generator with bucketing support.
"""
import queue
import time
from collections import namedtuple
from random import shuffle
from threading import Thread
import numpy as np
import tensorflow as tf
import data_utils_pre_h
from data_utils_pre_h import tf_Examples
ModelInput = namedt... | Circle-Ming/Speech-Text_Alignment-MachineTranslation | batch_reader.py | batch_reader.py | py | 5,603 | python | en | code | 2 | github-code | 71 | [
{
"api_name": "collections.namedtuple",
"line_number": 19,
"usage_type": "call"
},
{
"api_name": "queue.Queue",
"line_number": 37,
"usage_type": "call"
},
{
"api_name": "queue.Queue",
"line_number": 38,
"usage_type": "call"
},
{
"api_name": "threading.Thread",
... |
17578342120 | # Imports the Google Cloud client library
from google.cloud import vision
import io
import os
from recognise_ingredients.image_processing import *
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "/Users/jakub/git/fraidge-ai/fraidge-fcf90a851481.json"
RELATIVE_PATH = 'images/fridge.jpg'
SHOW = False
# Load ... | GGmorello/FrAIdge | recognise_ingredients/main.py | main.py | py | 1,950 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "os.environ",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "google.cloud.vision.ImageAnnotatorClient",
"line_number": 13,
"usage_type": "call"
},
{
"api_name": "google.cloud.vision",
"line_number": 13,
"usage_type": "name"
},
{
"api_n... |
5137885668 | from flask import Flask, request, send_file
from flask_cors import CORS
from gopro_client import GoProClient
from image_cache import ImageCache
from calibration import Calibrator
from environment import Environment
from resetter import Reset
app = Flask(__name__)
CORS(app)
# gpCam.downloadLastMedia(gpCam.shoot_vide... | iconocl4st/billiard_view | pool_server/gopro_api/app.py | app.py | py | 2,907 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "flask.Flask",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "flask_cors.CORS",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "image_cache.ImageCache.get_instance",
"line_number": 41,
"usage_type": "call"
},
{
"api_name": "image... |
19175397811 | import sys
import random
from PySide6 import QtCore, QtWidgets, QtGui
import maya.cmds as cmds
class MyWidget(QtWidgets.QWidget):
def __init__(self):
super().__init__()
self.cube = cmds.polyCube( sx=5, sy=5, sz=5 )
self.sphere = cmds.polySphere(sx=10, sy=15, r=20)
self... | JonathanJaeJunLim/anim-t380-2022-assignments | assignment - 5/python/pySideTest.py | pySideTest.py | py | 1,092 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "PySide6.QtWidgets.QWidget",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "PySide6.QtWidgets",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "maya.cmds.polyCube",
"line_number": 11,
"usage_type": "call"
},
{
"api_name": "may... |
72883517351 | """Extract mirror subjects from 20 Questions mirror subject HITs.
See ``python extractmirrorsubjects.py --help`` for more information.
"""
import ast
import collections
import json
import logging
import re
import click
from scripts import _utils
logger = logging.getLogger(__name__)
# constants
KEY_SCHEMA = {
... | allenai/twentyquestions | scripts/extractmirrorsubjects.py | extractmirrorsubjects.py | py | 4,025 | python | en | code | 13 | github-code | 71 | [
{
"api_name": "logging.getLogger",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "ast.literal_eval",
"line_number": 26,
"usage_type": "attribute"
},
{
"api_name": "ast.literal_eval",
"line_number": 29,
"usage_type": "attribute"
},
{
"api_name": "ast.lit... |
8753173036 | # encoding: utf-8
import requests
import json
def get_weather(url):
result = requests.get(url)
if result.status_code == 200:
return result.json()
else:
return('Не могу получить данные о погоде!')
def get_names(url='http://api.data.mos.ru/v1/datasets/2009/rows', year=None):
if year in ... | mightydok/moscowpy3 | homework3/req.py | req.py | py | 788 | python | ru | code | 0 | github-code | 71 | [
{
"api_name": "requests.get",
"line_number": 7,
"usage_type": "call"
},
{
"api_name": "requests.get",
"line_number": 17,
"usage_type": "call"
}
] |
31448092400 | '''
`phonetic` - symbol representing a sound
`sample` - a single audio run's worth of sound information about a phonetic
`params` - phonetic parameters derived from a `sample`
`frames` - aggregated and focused `params` ready for use in synthesis
`info` - `frames` and prior information for a `phonetic`
'''
from . impor... | dansgithubuser/dlal | skeleton/dlal/_speech.py | _speech.py | py | 18,856 | python | en | code | 5 | github-code | 70 | [
{
"api_name": "math.floor",
"line_number": 139,
"usage_type": "call"
},
{
"api_name": "math.floor",
"line_number": 140,
"usage_type": "call"
},
{
"api_name": "math.floor",
"line_number": 145,
"usage_type": "call"
},
{
"api_name": "math.floor",
"line_number": 1... |
18155196661 | import os
from models.detector import Detector
from pycocotools.cocoeval import COCOeval
import pycocotools.coco as coco
import pycocotools.mask as mask_util
import numpy as np
from tqdm import tqdm
from config import cfg as opt
os.environ['CUDA_VISIBLE_DEVICES'] = '3'
valid_ids = [
1, 2, 3, 4, 5, 6, 7, 8, ... | CaoWGG/TensorMask | eval.py | eval.py | py | 2,036 | python | en | code | 51 | github-code | 71 | [
{
"api_name": "os.environ",
"line_number": 9,
"usage_type": "attribute"
},
{
"api_name": "config.cfg.weights",
"line_number": 21,
"usage_type": "attribute"
},
{
"api_name": "config.cfg",
"line_number": 21,
"usage_type": "name"
},
{
"api_name": "config.cfg.vis_treh... |
31389722281 | # selecting a Data-Structure to handle images effeciently
import numpy as np
# For handling the Folder/Files Structure
import os
# Reading images and performing Image processing
import cv2
from PIL import Image
import tensorflow as tf
# visualizing the images
from matplotlib import pyplot as plt
plt.switch_backend('... | ruchitha018/A-GAN-BASED-DEEP-LEARNING-METHOD-FOR-LOW-QUALITY-DEFECT-IMAGE-RECONSTRUCTION-AND-RECOGNITION- | SRGAN_module.py | SRGAN_module.py | py | 5,087 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "matplotlib.pyplot.switch_backend",
"line_number": 14,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "tensorflow_hub.load",
"line_number": 26,
"usage_type": "call"
},
{
"api_name":... |
39095859238 | import json
import typing
from datetime import datetime
from src import db
from src.sender import send_to_email, send_to_bot, send_to_rabbit_mq
from src.utils import utils
async def search_by_ref_code(referrer: str, user_id: int, lvl: int = 1) -> bool:
"""
This function adds levels to each referral.
:para... | xristxgod/REFERRAL-SYSTEM | src/services.py | services.py | py | 4,094 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "src.db.get_referrer_by_referral_code",
"line_number": 16,
"usage_type": "call"
},
{
"api_name": "src.db",
"line_number": 16,
"usage_type": "name"
},
{
"api_name": "json.loads",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "src.utils.util... |
11075444841 | import configparser
import os
def hex_to_rgba_01(value):
value = value.lstrip('#')
lv = len(value)
r, g, b = tuple(int(value[i:i + lv // 3], 16) for i in range(0, lv, lv // 3))
r /= 255
g /= 255
b /= 255
a = 1
return [r, g, b, a]
class themeConfig:
def __init__(self... | LiuJ0/FocusMath | theme.py | theme.py | py | 1,429 | python | en | code | 1 | github-code | 71 | [
{
"api_name": "configparser.ConfigParser",
"line_number": 17,
"usage_type": "call"
},
{
"api_name": "configparser.ConfigParser",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "os.path.join",
"line_number": 24,
"usage_type": "call"
},
{
"api_name": "os.p... |
11087374989 | import cv2
import os
from concurrent.futures import ThreadPoolExecutor
import sys
import getopt
import subprocess
from numpy import arange
from itertools import repeat
import moviepy.editor as editor
def Worker(a_InputFile, a_OutputFileName, a_Scale, a_FrameChunkCount, a_CurrID, a_TotalFrameCount):
print("Starting... | Teitoku42/Chunkify | Chunkify.py | Chunkify.py | py | 4,944 | python | en | code | 13 | github-code | 71 | [
{
"api_name": "os.path.dirname",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 25,
"usage_type": "attribute"
},
{
"api_name": "os.path.abspath",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "subprocess.call",
"l... |
28497942602 | import time
import paho.mqtt.client as paho
import random
import json
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from datetime import datetime
broker="broker.hivemq.com"
RECEIVING = False
MSG_NUMBER = -1
RECEIVED_MSGS = 0
HUMIDITY_TOPIC = "house/humidity_shr"
dates = []
humidities = []
def ... | RShabanov/IoT | mqtt/mqtt_subscriber.py | mqtt_subscriber.py | py | 1,932 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "json.loads",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "datetime.datetime.strptime",
"line_number": 30,
"usage_type": "call"
},
{
"api_name": "datetime.datetime",
"line_number": 30,
"usage_type": "name"
},
{
"api_name": "matplotlib.py... |
17009961261 | import matplotlib.pyplot as plt
import config as c
file = open(f"res{c.n}.txt", "r")
Data=[]
E=[] #количества ребер
for line in file:
Data.append(line[:-1].split(' '))
E.append(int(file.readline()))
Data = [(int(i[0]), int(i[1]), int(i[2]), float(i[3]), int(i[4])) for i in Data]
# Data_apr=[str(i[0])+'>' for ... | Lenoliums/FF_algorithm | graph.py | graph.py | py | 2,881 | python | ru | code | 0 | github-code | 71 | [
{
"api_name": "config.n",
"line_number": 5,
"usage_type": "attribute"
},
{
"api_name": "matplotlib.pyplot.subplots",
"line_number": 20,
"usage_type": "call"
},
{
"api_name": "matplotlib.pyplot",
"line_number": 20,
"usage_type": "name"
},
{
"api_name": "matplotlib.... |
2638943011 | from datetime import datetime
import toml, json, os, traceback, github3, argparse
from fpm_fetch_toml import GitlabLite, fetch_fpm_toml
from fpm_validate import check_registry_entry, check_fpm_toml
def cli():
"""Define and parse command lines args"""
parser = argparse.ArgumentParser(description=
... | fortran-lang/fpm-registry | build_index.py | build_index.py | py | 6,453 | python | en | code | 35 | github-code | 71 | [
{
"api_name": "argparse.ArgumentParser",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "os.path.isfile",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "os.path",
"line_number": 46,
"usage_type": "attribute"
},
{
"api_name": "json.loads",
"... |
29447144157 | from pyecharts import Pie
from liquidView.psours import *
pObj = Pie("男女生占比图")
datas = queryEmpSex()
ats = []
das = []
for value in datas:
ats.append(value[1])
das.append(value[0])
pObj.add("男女生占比",ats,das)
pObj.render("p.html") | beautifu1gir1/Python | python_Pro/liquidView/pview1.py | pview1.py | py | 264 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "pyecharts.Pie",
"line_number": 4,
"usage_type": "call"
}
] |
74856873508 | #!/usr/bin/env python
# -*-coding:utf-8-*-
import json
import shortuuid
import base64
from websdk.jwt_token import gen_md5
from websdk.tools import check_password
from libs.base_handler import BaseHandler
from websdk.db_context import DBContext
from models.admin import UserRoles, Stakeholder, Companylist, model_to_di... | fengjp/admin | mg/handlers/stakeholder_handler.py | stakeholder_handler.py | py | 11,614 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "websdk.cache_context.cache_conn",
"line_number": 22,
"usage_type": "call"
},
{
"api_name": "websdk.db_context.DBContext",
"line_number": 23,
"usage_type": "call"
},
{
"api_name": "models.admin.Stakeholder",
"line_number": 24,
"usage_type": "argument"
},
... |
808546052 | import datetime
import pytest
from bs4 import BeautifulSoup
from django.utils import timezone
from model_bakery import baker
from delivery_options.models import DeliveryOption
from documents import factories
from orders.models import Order, OrderItem, User
pytestmark = pytest.mark.django_db
def test_create_local_a... | stanwood/traidoo-api | documents/tests/test_factories.py | test_factories.py | py | 7,052 | python | en | code | 3 | github-code | 71 | [
{
"api_name": "pytest.mark",
"line_number": 12,
"usage_type": "attribute"
},
{
"api_name": "documents.factories.CreditNoteFactory",
"line_number": 18,
"usage_type": "call"
},
{
"api_name": "documents.factories",
"line_number": 18,
"usage_type": "name"
},
{
"api_na... |
15188086271 | import glob
from PyPDF2 import PdfFileWriter, PdfFileReader
import os
import shutil
import re
from pathlib import Path
def merger(output_path, input_paths):
pdf_writer = PdfFileWriter()
for path in input_paths:
pdf_reader = PdfFileReader(path)
for page in range(pdf_reader.getNumPa... | Rishav-Git/Python-Projects | PdfPageExtractor.py | PdfPageExtractor.py | py | 1,431 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "PyPDF2.PdfFileWriter",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "PyPDF2.PdfFileReader",
"line_number": 12,
"usage_type": "call"
},
{
"api_name": "os.path.splitext",
"line_number": 21,
"usage_type": "call"
},
{
"api_name": "os.path",
... |
19287912525 | from copy import deepcopy
from datetime import datetime, timezone
from io import StringIO
from pathlib import Path
import numpy as np
import pytest
from numpy.testing import assert_allclose, assert_array_equal
from scipy import sparse
from mne import pick_types, read_cov, read_evokeds
from mne._fiff.pick import _pick... | mne-tools/mne-python | mne/utils/tests/test_numerics.py | test_numerics.py | py | 21,259 | python | en | code | 2,405 | github-code | 71 | [
{
"api_name": "pathlib.Path",
"line_number": 46,
"usage_type": "call"
},
{
"api_name": "mne.io.read_raw_fif",
"line_number": 54,
"usage_type": "call"
},
{
"api_name": "numpy.testing.assert_array_equal",
"line_number": 56,
"usage_type": "call"
},
{
"api_name": "mne... |
37676674500 | import requests
from lxml import etree
import os
url = 'https://pic.netbian.com/4kyouxi/'
headers = {
'User-Agent' :'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36'
}
page_text = requests.get(url=url,headers=headers).text
tree = etree.HTML(page_text)
i... | FadeHub/git-py | chapter14.py | chapter14.py | py | 866 | python | en | code | 0 | github-code | 70 | [
{
"api_name": "requests.get",
"line_number": 9,
"usage_type": "call"
},
{
"api_name": "lxml.etree.HTML",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "lxml.etree",
"line_number": 10,
"usage_type": "name"
},
{
"api_name": "os.path.exists",
"line_num... |
42391897562 | from selenium import webdriver
import selenium
from selenium.webdriver.common.keys import Keys
import time
driver = webdriver.Chrome()
driver.get ("https://www.anr.org.py/consulta-padron-nacional/")
#Tiempo de espera para dejar que cargue la página
time.sleep(3)
#Cambio al segundo frame
frame = driver.find_element_... | seb5433/ANR_REQUEST | request.py | request.py | py | 1,033 | python | es | code | 0 | github-code | 70 | [
{
"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": 11,
"usage_type": "call"
},
{
"api_name": "selenium.webdri... |
1845094331 | import json
import numpy as np
from os.path import dirname, realpath
class Node:
def __init__(self, x, y):
self.x = x
self.y = y
self.xRestraint = False
self.yRestraint = False
self.momentRestraint = False
self.xLoad = 0
self.yLoad = 0
self.moment = ... | DiogoLedermann/public | pibic/2020-2021/GantryV2/model.py | model.py | py | 11,004 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "numpy.inf",
"line_number": 77,
"usage_type": "attribute"
},
{
"api_name": "json.load",
"line_number": 114,
"usage_type": "call"
},
{
"api_name": "os.path.dirname",
"line_number": 162,
"usage_type": "call"
},
{
"api_name": "os.path.realpath",
"li... |
19672512593 | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import json
import pandas as pd
import numpy as np
import dash
from dash.dependencies import Input, Output
import plotly.express as px
import dash_bootstrap_components as dbc
from dash import dcc, html, callback
import matplotlib.pyplot as plt
import io
import base64
i... | DeyozJP/Rock-Analytics | pages/part_2.py | part_2.py | py | 7,222 | python | en | code | 0 | github-code | 71 | [
{
"api_name": "dash.register_page",
"line_number": 25,
"usage_type": "call"
},
{
"api_name": "pathlib.Path",
"line_number": 27,
"usage_type": "call"
},
{
"api_name": "pandas.read_csv",
"line_number": 29,
"usage_type": "call"
},
{
"api_name": "dash_bootstrap_compon... |
760585853 | import os
from PIL import Image
import torch.utils.data as data
import torchvision.transforms as transforms
class SalObjDataset(data.Dataset):
def __init__(self, image_root, gt_root, trainsize):
self.trainsize = trainsize
self.images = [image_root + f for f in os.listdir(image_root) if f.... | TJUMMG/DIPONet | data.py | data.py | py | 3,595 | python | en | code | 4 | github-code | 71 | [
{
"api_name": "torch.utils.data.Dataset",
"line_number": 7,
"usage_type": "attribute"
},
{
"api_name": "torch.utils.data",
"line_number": 7,
"usage_type": "name"
},
{
"api_name": "os.listdir",
"line_number": 10,
"usage_type": "call"
},
{
"api_name": "os.listdir",
... |
5424685545 | import typing
from django.contrib.contenttypes.models import ContentType
from rest_framework.decorators import action
from rest_framework.request import Request
from rest_framework.response import Response
from community.models import Rating
class CreateRatingMixin:
@action(detail=True, methods=["POST"], url_na... | PavelIgin/easy_flat | api/mixins/create_rating.py | create_rating.py | py | 932 | python | en | code | 1 | github-code | 70 | [
{
"api_name": "rest_framework.request.Request",
"line_number": 14,
"usage_type": "name"
},
{
"api_name": "typing.Any",
"line_number": 14,
"usage_type": "attribute"
},
{
"api_name": "django.contrib.contenttypes.models.ContentType.objects.get_for_model",
"line_number": 17,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.