code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'src/ui_ShowResultDialog.ui' # # Created: Sat May 16 17:05:43 2015 # by: PyQt5 UI code generator 5.4 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def s...
[ "widgets.ImageLabel.ImageLabel", "PyQt5.QtWidgets.QSizePolicy", "PyQt5.QtWidgets.QSpacerItem", "PyQt5.QtCore.QMetaObject.connectSlotsByName", "PyQt5.QtWidgets.QHBoxLayout", "PyQt5.QtWidgets.QVBoxLayout", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtCore.QSize" ]
[((443, 472), 'PyQt5.QtWidgets.QVBoxLayout', 'QtWidgets.QVBoxLayout', (['Dialog'], {}), '(Dialog)\n', (464, 472), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((557, 575), 'widgets.ImageLabel.ImageLabel', 'ImageLabel', (['Dialog'], {}), '(Dialog)\n', (567, 575), False, 'from widgets.ImageLabel import ImageLa...
"""Extension loader for filetype handlers. The extension objects provided by MIMEExtensionLoader objects have four attributes: parse, embed, add_options, and update_options. The first two are used as handlers for supporting the MIME type as primary and embeded resources. The last two are (currently) only used for pr...
[ "string.split", "string.replace" ]
[((506, 536), 'string.replace', 'string.replace', (['name', '"""-"""', '"""_"""'], {}), "(name, '-', '_')\n", (520, 536), False, 'import string\n'), ((566, 593), 'string.split', 'string.split', (['new_name', '"""/"""'], {}), "(new_name, '/')\n", (578, 593), False, 'import string\n')]
#!/usr/bin/env python3 # Project: VUT FIT SUI Project - Dice Wars # Authors: # - <NAME> <<EMAIL>> # - <NAME> <<EMAIL>> # - <NAME> <<EMAIL>> # - <NAME> <<EMAIL>> # Year: 2020 # Description: Generates game configurations. import random import sys from argparse import ArgumentParser import time from...
[ "signal.signal", "time.time", "random.randint", "argparse.ArgumentParser" ]
[((414, 446), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'prog': '"""Dice_Wars"""'}), "(prog='Dice_Wars')\n", (428, 446), False, 'from argparse import ArgumentParser\n'), ((1170, 1201), 'signal.signal', 'signal', (['SIGCHLD', 'signal_handler'], {}), '(SIGCHLD, signal_handler)\n', (1176, 1201), False, 'from sign...
import functools import sys from contextlib import contextmanager import pytest _orig_trace = None def pytest_configure(): global _orig_trace _orig_trace = sys.gettrace() @pytest.fixture(scope="session", autouse=True) def term(): """Configure TERM for predictable output from Pygments.""" from _pyt...
[ "_pytest.monkeypatch.MonkeyPatch", "functools.partial", "sys.gettrace", "pytest.fixture", "sys.settrace" ]
[((186, 231), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""', 'autouse': '(True)'}), "(scope='session', autouse=True)\n", (200, 231), False, 'import pytest\n'), ((578, 606), 'pytest.fixture', 'pytest.fixture', ([], {'autouse': '(True)'}), '(autouse=True)\n', (592, 606), False, 'import pytest\n'), ((...
# coding: utf-8 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import unittest from mock import patch from auto_nag.people import People from auto_nag.round_robin im...
[ "mock.patch.object", "auto_nag.round_robin.RoundRobin", "auto_nag.people.People" ]
[((1169, 1257), 'auto_nag.people.People', 'People', (["[{'mail': '<EMAIL>', 'cn': 'G H', 'ismanager': 'FALSE', 'title': 'nothing'}]"], {}), "([{'mail': '<EMAIL>', 'cn': 'G H', 'ismanager': 'FALSE', 'title':\n 'nothing'}])\n", (1175, 1257), False, 'from auto_nag.people import People\n'), ((4065, 4141), 'auto_nag.roun...
# should re-write compiled functions to take a local and global dict # as input. from __future__ import absolute_import, print_function import sys import os from . import ext_tools from . import catalog from . import common_info from numpy.core.multiarray import _get_ndarray_c_version ndarray_api_version = '/* NDARRA...
[ "numpy.core.multiarray._get_ndarray_c_version", "sys.path.insert", "sys._getframe", "os.path.split" ]
[((19930, 19956), 'os.path.split', 'os.path.split', (['module_path'], {}), '(module_path)\n', (19943, 19956), False, 'import os\n'), ((344, 368), 'numpy.core.multiarray._get_ndarray_c_version', '_get_ndarray_c_version', ([], {}), '()\n', (366, 368), False, 'from numpy.core.multiarray import _get_ndarray_c_version\n'), ...
import pathlib import yaml documentations = {"Our Platform": "QuantConnect-Platform-2.0.0.yaml", "Alpha Streams": "QuantConnect-Alpha-0.8.yaml"} def RequestTable(api_call, params): writeUp = '<table class="table qc-table">\n<thead>\n<tr>\n' writeUp += f'<th colspan="2"><code>{api_call}</code...
[ "yaml.load" ]
[((13986, 14026), 'yaml.load', 'yaml.load', (['yaml_file'], {'Loader': 'yaml.Loader'}), '(yaml_file, Loader=yaml.Loader)\n', (13995, 14026), False, 'import yaml\n')]
import glob import logging import os import warnings import pytest from _pytest.outcomes import Failed from _pytest.reports import TestReport from .broker_pact import BrokerPact, BrokerPacts, PactBrokerConfig from .result import PytestResult, log def pytest_addoption(parser): group = parser.getgroup("pact speci...
[ "logging.basicConfig", "logging.getLogger", "os.environ.get", "pytest.fixture", "warnings.warn", "glob.glob" ]
[((8527, 8543), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (8541, 8543), False, 'import pytest\n'), ((3312, 3353), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(message)s"""'}), "(format='%(message)s')\n", (3331, 3353), False, 'import logging\n'), ((4536, 4576), 'glob.glob', 'glob.glob'...
from flask_restx import Api from app.apis.hello import api as hello api = Api( title='api', version='1.0', description='', prefix='/api', doc='/api' ) api.add_namespace(hello)
[ "flask_restx.Api" ]
[((76, 150), 'flask_restx.Api', 'Api', ([], {'title': '"""api"""', 'version': '"""1.0"""', 'description': '""""""', 'prefix': '"""/api"""', 'doc': '"""/api"""'}), "(title='api', version='1.0', description='', prefix='/api', doc='/api')\n", (79, 150), False, 'from flask_restx import Api\n')]
from fastapi import FastAPI, Request, Response from fastapi.responses import HTMLResponse from fastapi.staticfiles import StaticFiles from fastapi.templating import Jinja2Templates from utils import get_page_data, process_initial import uvicorn app = FastAPI() templates = Jinja2Templates(directory="templates") app.mou...
[ "fastapi.FastAPI", "uvicorn.run", "fastapi.templating.Jinja2Templates", "utils.get_page_data", "fastapi.staticfiles.StaticFiles", "utils.process_initial" ]
[((252, 261), 'fastapi.FastAPI', 'FastAPI', ([], {}), '()\n', (259, 261), False, 'from fastapi import FastAPI, Request, Response\n'), ((274, 312), 'fastapi.templating.Jinja2Templates', 'Jinja2Templates', ([], {'directory': '"""templates"""'}), "(directory='templates')\n", (289, 312), False, 'from fastapi.templating imp...
from json import JSONEncoder from time import time class Jsonable: """Abstract class to standardize the toJson method to be implemented by any class that wants to be serialized to JSON""" def toJson(self): """Abstract method""" raise NotImplementedError('You should implement this method in...
[ "time.time", "json.JSONEncoder.default" ]
[((1268, 1296), 'json.JSONEncoder.default', 'JSONEncoder.default', (['self', 'o'], {}), '(self, o)\n', (1287, 1296), False, 'from json import JSONEncoder\n'), ((808, 814), 'time.time', 'time', ([], {}), '()\n', (812, 814), False, 'from time import time\n')]
#!/usr/bin/python3 import time from brownie import ( DataTypes, TransparentUpgradeableProxy, ProxyAdmin, config, network, Contract, ) from scripts.helpful_scripts import get_account, encode_function_data def main(): account = get_account() print(config["networks"][network.show_active()...
[ "brownie.network.show_active", "scripts.helpful_scripts.encode_function_data", "brownie.Contract.from_abi", "scripts.helpful_scripts.get_account" ]
[((256, 269), 'scripts.helpful_scripts.get_account', 'get_account', ([], {}), '()\n', (267, 269), False, 'from scripts.helpful_scripts import get_account, encode_function_data\n'), ((1052, 1101), 'scripts.helpful_scripts.encode_function_data', 'encode_function_data', (['data_types.setDataTypes', '(10)'], {}), '(data_ty...
# written by <NAME> # version 0.1 # ================== IMPORT CUSTOM LEARNING LIBRARIES ===================== # from customs.train import train, test from customs.dataset import load_dataset from customs.model import load_model # ================== TRAINING SETTINGS ================== # import argparse impo...
[ "torch.manual_seed", "customs.model.load_model", "customs.train.train", "argparse.ArgumentParser", "customs.dataset.load_dataset", "torch.nn.DataParallel", "os.getcwd", "customs.train.test", "torch.cuda.is_available", "torch.utils.data.DataLoader" ]
[((338, 363), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (361, 363), False, 'import argparse\n'), ((3220, 3247), 'torch.manual_seed', 'torch.manual_seed', (['opt.seed'], {}), '(opt.seed)\n', (3237, 3247), False, 'import torch\n'), ((4177, 4206), 'customs.dataset.load_dataset', 'load_dataset...
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
[ "qiskit.pulse.MeasureChannel", "qiskit.pulse.ControlChannel", "collections.defaultdict", "qiskit.pulse.DriveChannel" ]
[((5084, 5101), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (5095, 5101), False, 'from collections import defaultdict\n'), ((4450, 4474), 'qiskit.pulse.DriveChannel', 'pulse.DriveChannel', (['qind'], {}), '(qind)\n', (4468, 4474), False, 'from qiskit import pulse\n'), ((4590, 4616), 'qiskit.pu...
# Create your views here. from .models import Mfund import plotly.graph_objects as go from plotly.offline import plot from plotly.tools import make_subplots from django.db.models import Q from django.conf import settings from django.shortcuts import redirect from django.contrib.auth.decorators import login_require...
[ "django.db.models.Sum", "plotly.graph_objects.Pie", "plotly.offline.plot", "django.utils.decorators.method_decorator", "django_gotolong.broker.icidir.imf.models.BrokerIcidirMf.objects.all", "django.urls.reverse", "django.db.models.Max", "django_gotolong.lastrefd.models.lastrefd_update" ]
[((1284, 1316), 'django.utils.decorators.method_decorator', 'method_decorator', (['login_required'], {}), '(login_required)\n', (1300, 1316), False, 'from django.utils.decorators import method_decorator\n'), ((3719, 3771), 'plotly.offline.plot', 'plot', (['fig'], {'output_type': '"""div"""', 'include_plotlyjs': '(False...
#coding: utf-8 from gevent import monkey monkey.patch_all() from gevent.pool import Pool import gevent import requests import urllib import os import time import re import ssl class Downloader: def __init__(self, pool_size, retry=3): self.pool = Pool(pool_size) self.session = self._get_http_sessio...
[ "requests.Session", "os.makedirs", "re.compile", "gevent.monkey.patch_all", "urllib.request.Request", "requests.adapters.HTTPAdapter", "os.path.join", "time.sleep", "urllib.request.urlopen", "gevent.pool.Pool", "os.path.isdir", "gevent.spawn" ]
[((42, 60), 'gevent.monkey.patch_all', 'monkey.patch_all', ([], {}), '()\n', (58, 60), False, 'from gevent import monkey\n'), ((260, 275), 'gevent.pool.Pool', 'Pool', (['pool_size'], {}), '(pool_size)\n', (264, 275), False, 'from gevent.pool import Pool\n'), ((577, 595), 'requests.Session', 'requests.Session', ([], {})...
import logging import os import re import uuid from pathlib import Path from ludwig.constants import CHECKSUM, META, TEST, TRAINING, VALIDATION from ludwig.data.cache.util import calculate_checksum from ludwig.utils import data_utils from ludwig.utils.fs_utils import delete, path_exists logger = logging.getLogger(__n...
[ "logging.getLogger", "ludwig.utils.data_utils.save_json", "pathlib.Path", "ludwig.utils.data_utils.load_json", "ludwig.utils.fs_utils.path_exists", "uuid.uuid1", "os.path.dirname", "ludwig.data.cache.util.calculate_checksum", "re.sub", "ludwig.utils.fs_utils.delete" ]
[((299, 326), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (316, 326), False, 'import logging\n'), ((421, 442), 're.sub', 're.sub', (['"""\\\\W+"""', '""""""', 'v'], {}), "('\\\\W+', '', v)\n", (427, 442), False, 'import re\n'), ((872, 918), 'ludwig.utils.data_utils.load_json', 'data_ut...
import pprint from FactorioCalcBase.data.binary import sorted_recipe_list, production_machine_category_list_dict from FactorioCalcBase.recipe import Recipe from FactorioCalcBase.calculator_base import CalculatorBase from FactorioCalcBase.dependency_dict_common_function import dict_add_number import time def test_chan...
[ "FactorioCalcBase.data.binary.production_machine_category_list_dict.get", "pprint.pp", "FactorioCalcBase.dependency_dict_common_function.dict_add_number", "FactorioCalcBase.recipe.Recipe", "FactorioCalcBase.calculator_base.CalculatorBase", "time.time" ]
[((403, 436), 'FactorioCalcBase.recipe.Recipe', 'Recipe', ([], {'recipe_name': 'target_recipe'}), '(recipe_name=target_recipe)\n', (409, 436), False, 'from FactorioCalcBase.recipe import Recipe\n'), ((502, 548), 'FactorioCalcBase.data.binary.production_machine_category_list_dict.get', 'production_machine_category_list_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jan 20 22:18:58 2020 @author: https://stackoverflow.com/questions/293431/python-object-deleting-itself @editor: thirschbuechler this is probably overkill to alternatively exit a with-context, rather than by exception, but hey, maybe it will be needed, ...
[ "weakref.proxy" ]
[((821, 840), 'weakref.proxy', 'weakref.proxy', (['self'], {}), '(self)\n', (834, 840), False, 'import weakref\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- """A module containing an algorithm for hand gesture recognition""" import numpy as np import cv2 from typing import Tuple __author__ = "<NAME>" __license__ = "GNU GPL 3.0 or later" def recognize(img_gray): """Recognizes hand gesture in a single-channel depth image ...
[ "cv2.convexHull", "numpy.median", "numpy.ones", "numpy.cross", "cv2.threshold", "cv2.arcLength", "cv2.floodFill", "cv2.convexityDefects", "cv2.morphologyEx", "numpy.zeros", "numpy.dot", "cv2.approxPolyDP", "cv2.cvtColor", "cv2.findContours" ]
[((1022, 1063), 'cv2.cvtColor', 'cv2.cvtColor', (['segment', 'cv2.COLOR_GRAY2RGB'], {}), '(segment, cv2.COLOR_GRAY2RGB)\n', (1034, 1063), False, 'import cv2\n'), ((2042, 2059), 'numpy.median', 'np.median', (['center'], {}), '(center)\n', (2051, 2059), True, 'import numpy as np\n'), ((2225, 2250), 'numpy.ones', 'np.ones...
import sys import os from . import filesys MAIN_USAGE_MESSAGE = """ usage: xlab command ... Options: positional arguments: command project """ def project(args): if len(args) != 1: print("error: Invalid arguments.") exit() if args[0] == 'init': root = os.getcwd() ...
[ "os.getcwd" ]
[((300, 311), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (309, 311), False, 'import os\n')]
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ "paddle.is_compiled_with_xpu", "paddle.static.device_guard", "paddle.fluid.layers.assign" ]
[((11439, 11468), 'paddle.is_compiled_with_xpu', 'paddle.is_compiled_with_xpu', ([], {}), '()\n', (11466, 11468), False, 'import paddle\n'), ((11133, 11201), 'paddle.fluid.layers.assign', 'paddle.fluid.layers.assign', ([], {'input': 'scaled_param', 'output': 'master_weight'}), '(input=scaled_param, output=master_weight...
# install BeautifulSoup4 before running # # prints out historical data in csv format: # # [date, open, high, low, close, volume] # import re, csv, sys, urllib2 from bs4 import BeautifulSoup # If start date and end date is the same only one value will be returned and # if not the multiple values which can be used to ma...
[ "urllib2.urlopen", "re.compile", "csv.writer", "bs4.BeautifulSoup", "csv.reader" ]
[((1398, 1418), 'urllib2.urlopen', 'urllib2.urlopen', (['url'], {}), '(url)\n', (1413, 1418), False, 'import re, csv, sys, urllib2\n'), ((1431, 1465), 'bs4.BeautifulSoup', 'BeautifulSoup', (['page', '"""html.parser"""'], {}), "(page, 'html.parser')\n", (1444, 1465), False, 'from bs4 import BeautifulSoup\n'), ((1945, 19...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Test that a node receiving many (potentially out of order) blocks exits initial block download (IBD; this occur...
[ "test_framework.mininode.CBlockHeader", "test_framework.mininode.msg_headers", "test_framework.util.p2p_port", "test_framework.util.wait_until", "test_framework.mininode.network_thread_start", "test_framework.blocktools.create_coinbase", "test_framework.mininode.msg_block" ]
[((963, 976), 'test_framework.mininode.msg_headers', 'msg_headers', ([], {}), '()\n', (974, 976), False, 'from test_framework.mininode import CBlockHeader, network_thread_start, P2PInterface, msg_block, msg_headers\n'), ((1535, 1557), 'test_framework.mininode.network_thread_start', 'network_thread_start', ([], {}), '()...
from guillotina.contrib.workflows.interfaces import IWorkflowChangedEvent from guillotina.events import ObjectEvent from zope.interface import implementer @implementer(IWorkflowChangedEvent) class WorkflowChangedEvent(ObjectEvent): """An object has been moved""" def __init__(self, object, workflow, action, c...
[ "zope.interface.implementer", "guillotina.events.ObjectEvent.__init__" ]
[((158, 192), 'zope.interface.implementer', 'implementer', (['IWorkflowChangedEvent'], {}), '(IWorkflowChangedEvent)\n', (169, 192), False, 'from zope.interface import implementer\n'), ((338, 372), 'guillotina.events.ObjectEvent.__init__', 'ObjectEvent.__init__', (['self', 'object'], {}), '(self, object)\n', (358, 372)...
""" Suppress COVID EHR vaccine concepts. Original Issues: DC-1692 """ # Python imports import logging # Project imports from cdr_cleaner.cleaning_rules.deid.concept_suppression import AbstractBqLookupTableConceptSuppression from constants.cdr_cleaner import clean_cdr as cdr_consts from common import JINJA_ENV, CDM_T...
[ "logging.getLogger", "cdr_cleaner.args_parser.parse_args", "common.JINJA_ENV.from_string", "cdr_cleaner.clean_cdr_engine.get_query_list", "utils.pipeline_logging.configure", "cdr_cleaner.clean_cdr_engine.clean_dataset", "cdr_cleaner.clean_cdr_engine.add_console_logging", "google.cloud.exceptions.Googl...
[((447, 474), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (464, 474), False, 'import logging\n'), ((565, 2264), 'common.JINJA_ENV.from_string', 'JINJA_ENV.from_string', (['"""\nCREATE OR REPLACE TABLE `{{project_id}}.{{sandbox_id}}.{{concept_suppression_lookup_table}}` AS\nwith covid_v...
import pydbhub from typing import Any, Dict, List, Tuple from json.decoder import JSONDecodeError import requests import io def send_request_json(query_url: str, data: Dict[str, Any]) -> Tuple[List[Any], str]: """ send_request_json sends a request to DBHub.io, formatting the returned result as JSON Param...
[ "requests.post" ]
[((721, 773), 'requests.post', 'requests.post', (['query_url'], {'data': 'data', 'headers': 'headers'}), '(query_url, data=data, headers=headers)\n', (734, 773), False, 'import requests\n'), ((1752, 1804), 'requests.post', 'requests.post', (['query_url'], {'data': 'data', 'headers': 'headers'}), '(query_url, data=data,...
#This script Imports Game Data from ESPN, and Odds from the ODDS-API, and then imports them into a MySQL table, example in workbench here https://puu.sh/HOKCj/ce199eec8e.png import mysql.connector import requests import json import datetime import time #Connection to the MYSQL Server. mydb = mysql.connector....
[ "datetime.datetime.utcfromtimestamp", "datetime.datetime.utcnow", "datetime.date.today", "requests.get", "datetime.timedelta", "time.time" ]
[((5112, 5123), 'time.time', 'time.time', ([], {}), '()\n', (5121, 5123), False, 'import time\n'), ((2357, 2429), 'requests.get', 'requests.get', (['"""https://api.the-odds-api.com/v3/odds/"""'], {'params': 'parameters'}), "('https://api.the-odds-api.com/v3/odds/', params=parameters)\n", (2369, 2429), False, 'import re...
from typing import Callable import numpy as np from hmc.integrators.states.leapfrog_state import LeapfrogState from hmc.integrators.fields import riemannian from hmc.linalg import solve_psd class RiemannianLeapfrogState(LeapfrogState): """The Riemannian leapfrog state uses the Fisher information matrix to provi...
[ "hmc.integrators.fields.riemannian.velocity", "hmc.integrators.fields.riemannian.grad_logdet", "hmc.integrators.fields.riemannian.force", "numpy.swapaxes", "hmc.linalg.solve_psd" ]
[((1817, 1847), 'numpy.swapaxes', 'np.swapaxes', (['jac_metric', '(0)', '(-1)'], {}), '(jac_metric, 0, -1)\n', (1828, 1847), True, 'import numpy as np\n'), ((1883, 1918), 'hmc.linalg.solve_psd', 'solve_psd', (['metric'], {'return_chol': '(True)'}), '(metric, return_chol=True)\n', (1892, 1918), False, 'from hmc.linalg i...
from django.utils.translation import ugettext_lazy as _ USER_TYPE_STAFF = 'STAFF' USER_TYPE_ADMIN = 'ADMIN' USER_TYPE_BARBER = 'BARBER' USER_TYPE_CHOICES = ( (USER_TYPE_STAFF, _('Dev')), (USER_TYPE_ADMIN, _('Admin')), (USER_TYPE_BARBER, _('Barber')), )
[ "django.utils.translation.ugettext_lazy" ]
[((182, 190), 'django.utils.translation.ugettext_lazy', '_', (['"""Dev"""'], {}), "('Dev')\n", (183, 190), True, 'from django.utils.translation import ugettext_lazy as _\n'), ((215, 225), 'django.utils.translation.ugettext_lazy', '_', (['"""Admin"""'], {}), "('Admin')\n", (216, 225), True, 'from django.utils.translatio...
#!/usr/bin/env python # Copyright (C) 2018 rerobots, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
[ "logging.getLogger", "logging.handlers.WatchedFileHandler", "json.loads", "logging.StreamHandler", "uuid.UUID", "os.path.exists", "argparse.ArgumentParser", "yaml.dump", "os.close", "subprocess.check_call", "json.dumps", "subprocess.run", "logging.FileHandler", "os.unlink", "os.getpid", ...
[((2664, 2694), 'logging.getLogger', 'logging.getLogger', (['"""hardshare"""'], {}), "('hardshare')\n", (2681, 2694), False, 'import logging\n'), ((2752, 2847), 'logging.handlers.WatchedFileHandler', 'logging.handlers.WatchedFileHandler', ([], {'filename': '"""hardshare_client.log"""', 'mode': '"""a"""', 'delay': '(Tru...
"""Realty Info""" import os import requests from dotenv import load_dotenv from fastapi import APIRouter, Depends import sqlalchemy from pydantic import BaseModel, SecretStr from app import config from app.walk_score import * load_dotenv() router = APIRouter() headers = {'x-rapidapi-key': os.getenv('api_key'), ...
[ "requests.request", "fastapi.APIRouter", "os.getenv", "dotenv.load_dotenv" ]
[((230, 243), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (241, 243), False, 'from dotenv import load_dotenv\n'), ((254, 265), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (263, 265), False, 'from fastapi import APIRouter, Depends\n'), ((296, 316), 'os.getenv', 'os.getenv', (['"""api_key"""'], {}), "(...
#!/bin/python2 import collections import re import subprocess import sys PUC = "../pamu2fcfg/pamu2fcfg" resident = ["", "-r"] presence = ["", "-P"] pin = ["", "-N"] verification = ["", "-V"] Credential = collections.namedtuple("Credential", "keyhandle pubkey attributes oldformat") sshformat = 0 def print_test_...
[ "subprocess.check_output", "collections.namedtuple", "re.match" ]
[((211, 288), 'collections.namedtuple', 'collections.namedtuple', (['"""Credential"""', '"""keyhandle pubkey attributes oldformat"""'], {}), "('Credential', 'keyhandle pubkey attributes oldformat')\n", (233, 288), False, 'import collections\n'), ((4082, 4132), 'subprocess.check_output', 'subprocess.check_output', (["[P...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ "tensorflow.python.ops.array_ops.placeholder", "tensorflow.python.ops.distributions.bijector_test_util.assert_scalar_congruency", "numpy.float64", "tensorflow.contrib.distributions.python.ops.bijectors.affine_scalar.AffineScalar", "numpy.log", "numpy.array", "tensorflow.python.platform.test.main" ]
[((5795, 5806), 'tensorflow.python.platform.test.main', 'test.main', ([], {}), '()\n', (5804, 5806), False, 'from tensorflow.python.platform import test\n'), ((1410, 1432), 'tensorflow.contrib.distributions.python.ops.bijectors.affine_scalar.AffineScalar', 'AffineScalar', ([], {'shift': 'mu'}), '(shift=mu)\n', (1422, 1...
""" The ``ui.ScrollPanel`` class implements a panel that scrolls its contents. If you want the scroll bars to be always visible, call ``setAlwaysShowScrollBars(True)``. You can also change the current scrolling position programmatically by calling ``setScrollPosition(vPos)`` and ``setScrollHorizontalPosition(hPos)`` ...
[ "pyjamas.ui.SimplePanel.SimplePanel", "pyjamas.ui.VerticalPanel.VerticalPanel", "pyjamas.ui.ScrollPanel.ScrollPanel.__init__", "pyjamas.ui.ScrollPanel.ScrollPanel", "pyjamas.ui.HTML.HTML", "pyjamas.ui.SimplePanel.SimplePanel.__init__" ]
[((1154, 1180), 'pyjamas.ui.SimplePanel.SimplePanel.__init__', 'SimplePanel.__init__', (['self'], {}), '(self)\n', (1174, 1180), False, 'from pyjamas.ui.SimplePanel import SimplePanel\n'), ((1196, 1211), 'pyjamas.ui.VerticalPanel.VerticalPanel', 'VerticalPanel', ([], {}), '()\n', (1209, 1211), False, 'from pyjamas.ui.V...
''' * @file ElevatorTestCaseList.py * @author <NAME> * @date 30 July 2020 * @version 0.1 * @brief Implements a class to hold all the test cases during the program life cycle. ''' #!/usr/bin/env python3 import sys import ctypes import ElevatorConfig as cfg import ElevatorMsgProtocol as msgProto class Elev...
[ "ElevatorMsgProtocol.MsgHeader", "ElevatorMsgProtocol.EncodeReqPacket" ]
[((815, 1151), 'ElevatorMsgProtocol.MsgHeader', 'msgProto.MsgHeader', ([], {'tx_node_addr': "self.config.test_case['call'][k][0]", 'rx_node_addr': "self.config.test_case['call'][k][1]", 'msg_id': "self.config.test_case['call'][k][2]", 'msg_class': "self.config.test_case['call'][k][3]", 'hdr_len': "self.config.network['...
#!/usr/bin/env python import os from setuptools import setup, find_packages def read(fname): """Open files relative to package.""" return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='ipyfilechooser', version='0.3.1', author='<NAME> (@crahan)', author_email='<EMAIL...
[ "os.path.dirname", "setuptools.find_packages" ]
[((630, 645), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (643, 645), False, 'from setuptools import setup, find_packages\n'), ((166, 191), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (181, 191), False, 'import os\n')]
############################################################################### # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. ############################################################################### imp...
[ "tensorflow.__version__.split", "distutils.version.StrictVersion", "os.environ.get", "tensorflow.summary.create_file_writer", "tensorflow.python.summary.summary.FileWriter", "tensorflow.python.ops.summary_ops_v2.graph" ]
[((455, 477), 'distutils.version.StrictVersion', 'StrictVersion', (['"""2.0.0"""'], {}), "('2.0.0')\n", (468, 477), False, 'from distutils.version import StrictVersion\n'), ((730, 758), 'os.environ.get', 'os.environ.get', (['"""TB_LOG_DIR"""'], {}), "('TB_LOG_DIR')\n", (744, 758), False, 'import os\n'), ((421, 447), 't...
#!/usr/bin/env python # Converts a PoD XML file to a GeoJSON file. # # With the --javascript parameter, the generated file is a javascript # file defining a variable 'basePodSpec'. # # Get the PoD XML file from http://dev.24-timmars.nu/PoD/xmlapi_app.php. import xml.etree.ElementTree as etree import argparse import r...
[ "xml.etree.ElementTree.parse", "argparse.ArgumentParser", "json.dumps", "io.open", "codecs.open" ]
[((555, 580), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (578, 580), False, 'import argparse\n'), ((862, 886), 'xml.etree.ElementTree.parse', 'etree.parse', (['args.infile'], {}), '(args.infile)\n', (873, 886), True, 'import xml.etree.ElementTree as etree\n'), ((1353, 1394), 'codecs.open', ...
import os import json import importlib from pluginbase import PluginBase import rastervision as rv from rastervision.protos.plugin_pb2 import PluginConfig as PluginConfigMsg from rastervision.utils.files import download_if_needed class PluginError(Exception): pass def load_conf_list(s): """Loads a list of...
[ "importlib.import_module", "rastervision.utils.files.download_if_needed", "rastervision.protos.plugin_pb2.PluginConfig", "rastervision._registry._get_plugin_registry", "os.path.join", "pluginbase.PluginBase", "os.path.dirname", "rastervision._registry.get_file_system", "os.path.basename" ]
[((1001, 1036), 'rastervision._registry._get_plugin_registry', 'rv._registry._get_plugin_registry', ([], {}), '()\n', (1034, 1036), True, 'import rastervision as rv\n'), ((1427, 1459), 'os.path.join', 'os.path.join', (['rv_home', '"""plugins"""'], {}), "(rv_home, 'plugins')\n", (1439, 1459), False, 'import os\n'), ((29...
""" Implements a non interactive controller to controt non-interactive visualizers. (i.e. those that are used for converting TPP souce code into another format) """ from tpp.FileParser import FileParser from tpp.controller.TPPController import TPPController class ConversionController(TPPController): """ Impl...
[ "tpp.FileParser.FileParser" ]
[((757, 779), 'tpp.FileParser.FileParser', 'FileParser', (['input_file'], {}), '(input_file)\n', (767, 779), False, 'from tpp.FileParser import FileParser\n')]
from bs4 import BeautifulSoup from datetime import date from lxml import html import requests import re import json class CovidScraper: def __init__(self): self.api_url = 'http://127.0.0.1:5000/covidgr' self.api_sum_url = 'http://127.0.0.1:5000/summary/covidgr' self.api_test_url = 'http://...
[ "requests.post", "json.dumps", "requests.get", "bs4.BeautifulSoup", "re.findall", "requests.put", "re.sub", "datetime.date.today" ]
[((1607, 1636), 'requests.get', 'requests.get', (['self.scrape_url'], {}), '(self.scrape_url)\n', (1619, 1636), False, 'import requests\n'), ((1652, 1694), 'bs4.BeautifulSoup', 'BeautifulSoup', (['page.content', '"""html.parser"""'], {}), "(page.content, 'html.parser')\n", (1665, 1694), False, 'from bs4 import Beautifu...
import discord from discord.ext import commands class WowCog: """Custom Cog that had commands for WoW Memes""" def __init__(self, bot): self.bot = bot async def _play(self, url, ctx): """Helper for aliasing Play in the Audio module""" audio = self.bot.get_cog('Audio') if ...
[ "discord.ext.commands.command" ]
[((518, 565), 'discord.ext.commands.command', 'commands.command', ([], {'pass_context': '(True)', 'no_pm': '(True)'}), '(pass_context=True, no_pm=True)\n', (534, 565), False, 'from discord.ext import commands\n')]
import pytest from privacy_evaluator.attacks.sample_attack import Sample_Attack """ This test only test if no error is thrown when calling the function, can be removed in the future """ def test_sample_attack(): test = Sample_Attack(0, 0, 0) test.perform_attack()
[ "privacy_evaluator.attacks.sample_attack.Sample_Attack" ]
[((225, 247), 'privacy_evaluator.attacks.sample_attack.Sample_Attack', 'Sample_Attack', (['(0)', '(0)', '(0)'], {}), '(0, 0, 0)\n', (238, 247), False, 'from privacy_evaluator.attacks.sample_attack import Sample_Attack\n')]
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
[ "textwrap.dedent", "re.compile" ]
[((627, 665), 're.compile', 're.compile', (['"""__version__\\\\s+=\\\\s+(.*)"""'], {}), "('__version__\\\\s+=\\\\s+(.*)')\n", (637, 665), False, 'import re\n'), ((1146, 1369), 'textwrap.dedent', 'textwrap.dedent', (['"""\n Client for Presto (https://prestodb.io), a distributed SQL engine for\n interactive and bat...
from __future__ import annotations import numpy as np import pandas as pd from sklearn import datasets from IMLearn.metrics import mean_square_error from IMLearn.utils import split_train_test from IMLearn.model_selection import cross_validate from IMLearn.learners.regressors import PolynomialFitting, LinearRegression, ...
[ "numpy.random.normal", "pandas.Series", "plotnine.ggtitle", "plotnine.ggsave", "plotnine.ggplot", "plotnine.theme_bw", "plotnine.geom_line", "plotnine.aes", "IMLearn.learners.regressors.LinearRegression", "numpy.array", "numpy.linspace", "sklearn.datasets.load_diabetes", "numpy.random.seed",...
[((1030, 1061), 'numpy.linspace', 'np.linspace', (['(-1.2)', '(2)', 'n_samples'], {}), '(-1.2, 2, n_samples)\n', (1041, 1061), True, 'import numpy as np\n'), ((1408, 1433), 'numpy.linspace', 'np.linspace', (['(-1.4)', '(2)', '(100)'], {}), '(-1.4, 2, 100)\n', (1419, 1433), True, 'import numpy as np\n'), ((1518, 1548), ...
import re import copy def parse_media(media, content_version, project_chapters): """ Converts a media object into formats usable in the catalog :param media: the media object :type media: dict :param content_version: the current version of the source content :type content_version: string :p...
[ "copy.copy" ]
[((7719, 7741), 'copy.copy', 'copy.copy', (['media_block'], {}), '(media_block)\n', (7728, 7741), False, 'import copy\n')]
from django.db.models.fields.files import (FieldFile, ImageField, ImageFileDescriptor) from django.utils.translation import ugettext as _ from .backends import get_backend_class from .files import VideoFile class VideoFileDescriptor(ImageFileDescriptor): pass class Vi...
[ "django.utils.translation.ugettext" ]
[((679, 689), 'django.utils.translation.ugettext', '_', (['"""Video"""'], {}), "('Video')\n", (680, 689), True, 'from django.utils.translation import ugettext as _\n')]
from model.group import Group def test_modify_group_name(app): if app.group.count() == 0: app.group.create(Group(name="test")) old_groups = app.group.get_group_list() app.group.modify_first_group(Group(name="New group")) new_groups = app.group.get_group_list() assert len(old_groups) == len...
[ "model.group.Group" ]
[((218, 241), 'model.group.Group', 'Group', ([], {'name': '"""New group"""'}), "(name='New group')\n", (223, 241), False, 'from model.group import Group\n'), ((526, 552), 'model.group.Group', 'Group', ([], {'header': '"""New header"""'}), "(header='New header')\n", (531, 552), False, 'from model.group import Group\n'),...
import elasticsearch from elasticsearch import Elasticsearch from elasticsearch import helpers import time, json, datetime, os class elalog: def __init__(self, date): es_host = os.getenv("ES_PORT_9200_TCP_ADDR") or '<%ELASTICIP%>' es_port = os.getenv("ES_PORT_9200_TCP_PORT") or '9200' sel...
[ "elasticsearch.helpers.bulk", "elasticsearch.Elasticsearch", "time.time", "os.getenv" ]
[((356, 407), 'elasticsearch.Elasticsearch', 'Elasticsearch', (["[{'host': es_host, 'port': es_port}]"], {}), "([{'host': es_host, 'port': es_port}])\n", (369, 407), False, 'from elasticsearch import Elasticsearch\n'), ((192, 226), 'os.getenv', 'os.getenv', (['"""ES_PORT_9200_TCP_ADDR"""'], {}), "('ES_PORT_9200_TCP_ADD...
__author__ = "<NAME>" __copyright__ = "Copyright 2017, Stanford University" __license__ = "MIT" import sys from deepchem.models import KerasModel from deepchem.models.layers import AtomicConvolution from deepchem.models.losses import L2Loss from tensorflow.keras.layers import Input, Layer import numpy as np import t...
[ "tensorflow.equal", "numpy.sqrt", "tensorflow.reduce_sum", "numpy.array", "tensorflow.random.truncated_normal", "tensorflow.keras.layers.Input", "numpy.reshape", "deepchem.models.losses.L2Loss", "itertools.product", "tensorflow.matmul", "tensorflow.zeros_like", "tensorflow.zeros", "tensorflo...
[((1263, 1293), 'tensorflow.Variable', 'tf.Variable', (['weights'], {'name': '"""w"""'}), "(weights, name='w')\n", (1274, 1293), True, 'import tensorflow as tf\n'), ((1300, 1329), 'tensorflow.Variable', 'tf.Variable', (['biases'], {'name': '"""b"""'}), "(biases, name='b')\n", (1311, 1329), True, 'import tensorflow as t...
""" Copyright (c) 2020 COTOBA DESIGN, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
[ "programy.config.file.yaml_file.YamlConfigurationFile", "programy.config.brain.oob.BrainOOBConfiguration", "programy.clients.events.console.config.ConsoleConfiguration" ]
[((1390, 1413), 'programy.config.file.yaml_file.YamlConfigurationFile', 'YamlConfigurationFile', ([], {}), '()\n', (1411, 1413), False, 'from programy.config.file.yaml_file import YamlConfigurationFile\n'), ((1880, 1912), 'programy.config.brain.oob.BrainOOBConfiguration', 'BrainOOBConfiguration', (['"""default"""'], {}...
import math import os from copy import deepcopy from ast import literal_eval import pandas as pd from math import factorial import random from collections import Counter, defaultdict import sys from nltk import word_tokenize from tqdm import tqdm, trange import argparse import numpy as np import re import csv from skle...
[ "pandas.read_csv", "copy.deepcopy", "argparse.ArgumentParser", "os.path.split", "os.path.isdir", "numpy.random.seed", "os.mkdir", "random.randint", "numpy.random.permutation", "random.choice", "sklearn.model_selection.train_test_split", "csv.writer", "ast.literal_eval", "os.path.isfile", ...
[((21335, 21360), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (21358, 21360), False, 'import argparse\n'), ((22879, 22901), 'random.seed', 'random.seed', (['args.seed'], {}), '(args.seed)\n', (22890, 22901), False, 'import random\n'), ((22906, 22931), 'numpy.random.seed', 'np.random.seed', (...
import pytest from janitor.utils import _clean_accounting_column @pytest.mark.utils def test_clean_accounting_column(): test_str = "(1,000)" assert _clean_accounting_column(test_str) == float(-1000) @pytest.mark.utils def test_clean_accounting_column_zeroes(): test_str = "()" assert _clean_accounti...
[ "janitor.utils._clean_accounting_column" ]
[((159, 193), 'janitor.utils._clean_accounting_column', '_clean_accounting_column', (['test_str'], {}), '(test_str)\n', (183, 193), False, 'from janitor.utils import _clean_accounting_column\n'), ((305, 339), 'janitor.utils._clean_accounting_column', '_clean_accounting_column', (['test_str'], {}), '(test_str)\n', (329,...
# coding=utf-8 import sys, getopt import urllib import requests import requests_cache import re import time from bs4 import BeautifulSoup from requests import Session sys.path.append("/home/taejoon1kim/BERT/my_bert") from utils.cacheUtils import cacheExist, writeCache, readCache, getDownloadCachePath from utils.path...
[ "requests_cache.install_cache", "requests.get", "bs4.BeautifulSoup", "utils.cacheUtils.writeCache", "time.time", "utils.cacheUtils.readCache", "sys.path.append", "utils.cacheUtils.getDownloadCachePath" ]
[((169, 218), 'sys.path.append', 'sys.path.append', (['"""/home/taejoon1kim/BERT/my_bert"""'], {}), "('/home/taejoon1kim/BERT/my_bert')\n", (184, 218), False, 'import sys, getopt\n'), ((2320, 2354), 'requests.get', 'requests.get', (['URL'], {'headers': 'headers'}), '(URL, headers=headers)\n', (2332, 2354), False, 'impo...
from xml.dom.minidom import Document, parse class InfoBatch: def __init__(self, title, pre_node_titles): self.title = title self.pre_node_titles = pre_node_titles def save_data_xml(course_list, file_path): doc = Document() courses = doc.createElement('course_list') doc.appendChild(co...
[ "xml.dom.minidom.Document", "xml.dom.minidom.parse" ]
[((240, 250), 'xml.dom.minidom.Document', 'Document', ([], {}), '()\n', (248, 250), False, 'from xml.dom.minidom import Document, parse\n'), ((1367, 1383), 'xml.dom.minidom.parse', 'parse', (['file_path'], {}), '(file_path)\n', (1372, 1383), False, 'from xml.dom.minidom import Document, parse\n')]
import pytest from theheck.rules.git_rm_local_modifications import match, get_new_command from theheck.types import Command @pytest.fixture def output(target): return ('error: the following file has local modifications:\n {}\n(use ' '--cached to keep the file, or -f to force removal)').format(targe...
[ "pytest.mark.parametrize", "theheck.types.Command" ]
[((326, 424), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""script, target"""', "[('git rm foo', 'foo'), ('git rm foo bar', 'bar')]"], {}), "('script, target', [('git rm foo', 'foo'), (\n 'git rm foo bar', 'bar')])\n", (349, 424), False, 'import pytest\n'), ((514, 591), 'pytest.mark.parametrize', 'pyte...
from typing import Optional, Tuple, Union import numpy as np import pandas as pd import pyvista as pv from pyvista import DataSet, MultiBlock, PolyData, UnstructuredGrid try: from typing import Literal except ImportError: from typing_extensions import Literal from .ddrtree import DDRTree, cal_ncenter from .s...
[ "simpleppt.ppt", "pyvista.PolyData", "pandas.merge", "numpy.asarray", "numpy.real", "numpy.dot", "numpy.empty", "numpy.vstack", "numpy.nonzero", "pandas.DataFrame", "numpy.triu" ]
[((4270, 4302), 'numpy.triu', 'np.triu', (['matrix_edges_weights', '(1)'], {}), '(matrix_edges_weights, 1)\n', (4277, 4302), True, 'import numpy as np\n'), ((5574, 5587), 'numpy.asarray', 'np.asarray', (['X'], {}), '(X)\n', (5584, 5587), True, 'import numpy as np\n'), ((5603, 5657), 'simpleppt.ppt', 'simpleppt.ppt', ([...
from __future__ import absolute_import, division, print_function, unicode_literals from base64 import b64decode from binascii import hexlify, unhexlify from struct import pack import six from django.db import models from django.utils.encoding import force_text from django_otp.models import Device from django_otp.ut...
[ "django_otp.util.hex_validator", "django_otp.util.random_hex", "django.db.models.IntegerField", "django.db.models.ForeignKey", "binascii.hexlify", "struct.pack", "django.db.models.BooleanField", "yubiotp.otp.decode_otp", "yubiotp.client.YubiClient20", "yubiotp.client.YubiClient11", "django.db.mo...
[((1365, 1530), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(12)', 'validators': '[id_validator]', 'default': 'default_id', 'verbose_name': '"""Private ID"""', 'help_text': '"""The 6-byte private ID (hex-encoded)."""'}), "(max_length=12, validators=[id_validator], default=\n default_id, ve...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (c) 2002-2018 "Neo Technology," # Network Engine for Objects in Lund AB [http://neotechnology.com] # # This file is part of Neo4j. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Li...
[ "neo4j.v1.Record" ]
[((888, 947), 'neo4j.v1.Record', 'Record', (["['name', 'empire']", "['Nigel', 'The British Empire']"], {}), "(['name', 'empire'], ['Nigel', 'The British Empire'])\n", (894, 947), False, 'from neo4j.v1 import Record\n'), ((966, 1025), 'neo4j.v1.Record', 'Record', (["['name', 'empire']", "['Nigel', 'The British Empire']"...
import tensorflow as tf import sys import os from glob import glob import png sys.path.append(os.path.join(__file__,'..','..')) from tfDataIngest import tfDataSetParquet as tfDsParquet inputDataDir = sys.argv[1] outputDir = sys.argv[2] # test app if __name__ == "__main__": files = glob(os.path.join(inputDataDir...
[ "tfDataIngest.tfDataSetParquet.create_parquet_dataset", "os.path.join", "png.from_array" ]
[((95, 129), 'os.path.join', 'os.path.join', (['__file__', '""".."""', '""".."""'], {}), "(__file__, '..', '..')\n", (107, 129), False, 'import os\n'), ((478, 524), 'tfDataIngest.tfDataSetParquet.create_parquet_dataset', 'tfDsParquet.create_parquet_dataset', (['[files[0]]'], {}), '([files[0]])\n', (512, 524), True, 'fr...
"""\ Code generator functions for wxDatePickerCtrl objects @copyright: 2002-2007 <NAME> @copyright: 2014-2016 <NAME> @copyright: 2016-2021 <NAME> @license: MIT (see LICENSE.txt) - THIS PROGRAM COMES WITH NO WARRANTY """ import common, compat import wcodegen class PythonDatePickerCtrlGenerator(wcodegen.PythonWidgetC...
[ "wcodegen.CppWidgetCodeWriter._prepare_tmpl_content", "common.register", "wcodegen.PythonWidgetCodeWriter._prepare_tmpl_content" ]
[((2676, 2725), 'common.register', 'common.register', (['"""XRC"""', 'klass', 'xrc_code_generator'], {}), "('XRC', klass, xrc_code_generator)\n", (2691, 2725), False, 'import common, compat\n'), ((995, 1059), 'wcodegen.PythonWidgetCodeWriter._prepare_tmpl_content', 'wcodegen.PythonWidgetCodeWriter._prepare_tmpl_content...
import os import sys import unittest from tests.tests_bin_class.test_performance import * if __name__ == "__main__": unittest.main()
[ "unittest.main" ]
[((123, 138), 'unittest.main', 'unittest.main', ([], {}), '()\n', (136, 138), False, 'import unittest\n')]
#Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. #This program is free software; you can redistribute it and/or modify it under the terms of the BSD 0-Clause License. #This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ...
[ "keras.optimizers.Adam", "tensorflow.squared_difference", "keras.engine.topology.Network", "sys.stdout.flush", "tensorflow.abs" ]
[((6069, 6134), 'keras.engine.topology.Network', 'Network', ([], {'inputs': 'image_A', 'outputs': 'guess_A', 'name': '"""D_A_static_model"""'}), "(inputs=image_A, outputs=guess_A, name='D_A_static_model')\n", (6076, 6134), False, 'from keras.engine.topology import Network\n'), ((6162, 6227), 'keras.engine.topology.Netw...
import uvicorn from fastapi import FastAPI from fastapi.staticfiles import StaticFiles from routes import doc, api from fastapi.templating import Jinja2Templates from starlette.requests import Request # configure static and templates file on jinja 2 app = FastAPI( title=f"Technical Case", description=f"endpoi...
[ "fastapi.FastAPI", "uvicorn.run", "routes.doc.init_app", "fastapi.templating.Jinja2Templates", "fastapi.staticfiles.StaticFiles", "routes.api.init_app" ]
[((258, 431), 'fastapi.FastAPI', 'FastAPI', ([], {'title': 'f"""Technical Case"""', 'description': 'f"""endpoint para subir planilhas para banco de dados relacional Postgres."""', 'version': 'f"""0.0.1"""', 'static_directory': '"""static"""'}), "(title=f'Technical Case', description=\n f'endpoint para subir planilha...
from datetime import datetime, timedelta from enum import Enum from typing import List, Optional, Tuple, Dict, Any, Union import time from authlib.common.security import generate_token from authlib.consts import default_json_headers from authlib.oauth2 import ( OAuth2Request, AuthorizationServer as _Authorizat...
[ "user_manager.common.mongo.authorization_code_collection.find_one", "user_manager.common.mongo.user_group_collection.find", "user_manager.common.mongo.token_collection.delete_one", "user_manager.common.mongo.async_user_group_collection.find", "user_manager.common.mongo.authorization_code_collection.update_o...
[((12948, 12994), 'user_manager.common.mongo.client_collection.find_one', 'client_collection.find_one', (["{'_id': client_id}"], {}), "({'_id': client_id})\n", (12974, 12994), False, 'from user_manager.common.mongo import authorization_code_collection, token_collection, client_collection, client_user_cache_collection, ...
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
[ "uhd_restpy.testplatform.sessions.ixnetwork.impairment.profile.fixedclassifier.pattern.pattern.Pattern" ]
[((2601, 2614), 'uhd_restpy.testplatform.sessions.ixnetwork.impairment.profile.fixedclassifier.pattern.pattern.Pattern', 'Pattern', (['self'], {}), '(self)\n', (2608, 2614), False, 'from uhd_restpy.testplatform.sessions.ixnetwork.impairment.profile.fixedclassifier.pattern.pattern import Pattern\n')]
# sacher_epos.py, python wrapper for sacher epos motor # <NAME> <<EMAIL>>, August 2014 # """ Possbily Maxon EPOS now """ """ This is the actual version that works But only in the lab32 virtual environment """ # from instrument import Instrument # import qt import ctypes import ctypes.wintypes import logging import t...
[ "numpy.sqrt", "time.sleep", "ctypes.create_string_buffer", "ctypes.c_void_p", "logging.error", "ctypes.c_int8", "ctypes.wintypes.DWORD", "ctypes.windll.LoadLibrary", "numpy.ceil", "numpy.int16", "logging.warning", "ctypes.wintypes.WORD", "ctypes.wintypes.BOOL", "ctypes.wintypes.HANDLE", ...
[((1377, 1462), 'ctypes.windll.LoadLibrary', 'ctypes.windll.LoadLibrary', (['"""C:\\\\Users\\\\Carbro\\\\Desktop\\\\Charmander\\\\EposCmd.dll"""'], {}), "('C:\\\\Users\\\\Carbro\\\\Desktop\\\\Charmander\\\\EposCmd.dll'\n )\n", (1402, 1462), False, 'import ctypes\n'), ((6700, 6710), 'numpy.ceil', 'np.ceil', (['d'], {...
from django.utils.encoding import force_str from django.utils.functional import keep_lazy from django.utils.safestring import SafeText, mark_safe _json_escapes = { ord('>'): '\\u003E', ord('<'): '\\u003C', ord('&'): '\\u0026', } _json_escapes_attr = { ord('>'): '\\u003E', ord('<'): '\\u003C', ...
[ "django.utils.encoding.force_str", "django.utils.functional.keep_lazy" ]
[((415, 439), 'django.utils.functional.keep_lazy', 'keep_lazy', (['str', 'SafeText'], {}), '(str, SafeText)\n', (424, 439), False, 'from django.utils.functional import keep_lazy\n'), ((606, 630), 'django.utils.functional.keep_lazy', 'keep_lazy', (['str', 'SafeText'], {}), '(str, SafeText)\n', (615, 630), False, 'from d...
# File: Converting_RGB_to_GreyScale.py # Description: Opening RGB image as array, converting to GreyScale and saving result into new file # Environment: PyCharm and Anaconda environment # # MIT License # Copyright (c) 2018 <NAME> # github.com/sichkar-valentyn # # Reference to: # <NAME>. Image processing in Python // Gi...
[ "matplotlib.pyplot.imshow", "skimage.color.rgb2gray", "PIL.Image.open", "numpy.array", "matplotlib.pyplot.figure", "skimage.io.imread", "numpy.array_equal", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((673, 703), 'PIL.Image.open', 'Image.open', (['"""images/eagle.jpg"""'], {}), "('images/eagle.jpg')\n", (683, 703), False, 'from PIL import Image\n'), ((715, 734), 'numpy.array', 'np.array', (['image_RGB'], {}), '(image_RGB)\n', (723, 734), True, 'import numpy as np\n'), ((1054, 1084), 'matplotlib.pyplot.subplots', '...
# coding=UTF-8 # ex:ts=4:sw=4:et=on # # Copyright (c) 2013, <NAME> # All rights reserved. # Complete license can be found in the LICENSE file. from mvc.models.properties import StringProperty from pyxrd.generic.io.custom_io import storables, Storable from pyxrd.generic.models.base import DataModel from pyxrd.refinem...
[ "pyxrd.generic.io.custom_io.storables.register", "mvc.models.properties.StringProperty" ]
[((367, 387), 'pyxrd.generic.io.custom_io.storables.register', 'storables.register', ([], {}), '()\n', (385, 387), False, 'from pyxrd.generic.io.custom_io import storables, Storable\n'), ((1214, 1315), 'mvc.models.properties.StringProperty', 'StringProperty', ([], {'default': '"""New Behaviour"""', 'text': '"""Name"""'...
""" Remove comments from bib file. """ from textx import metamodel_for_language from txbibtex import bibentry_str BIB_FILE = 'references.bib' bibfile = metamodel_for_language('bibtex').model_from_file(BIB_FILE) # Drop line comments. print('\n'.join([bibentry_str(e) for e in bibfile.entries if e.__cla...
[ "txbibtex.bibentry_str", "textx.metamodel_for_language" ]
[((153, 185), 'textx.metamodel_for_language', 'metamodel_for_language', (['"""bibtex"""'], {}), "('bibtex')\n", (175, 185), False, 'from textx import metamodel_for_language\n'), ((252, 267), 'txbibtex.bibentry_str', 'bibentry_str', (['e'], {}), '(e)\n', (264, 267), False, 'from txbibtex import bibentry_str\n')]
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
[ "googlecloudsdk.command_lib.compute.flags.GetDefaultScopeLister", "googlecloudsdk.calliope.base.ReleaseTracks", "googlecloudsdk.command_lib.compute.resource_policies.flags.MakeResourcePolicyArg", "googlecloudsdk.command_lib.compute.resource_policies.util.MakeGroupPlacementPolicy", "googlecloudsdk.command_li...
[((1538, 1581), 'googlecloudsdk.calliope.base.ReleaseTracks', 'base.ReleaseTracks', (['base.ReleaseTrack.ALPHA'], {}), '(base.ReleaseTrack.ALPHA)\n', (1556, 1581), False, 'from googlecloudsdk.calliope import base\n'), ((2544, 2586), 'googlecloudsdk.calliope.base.ReleaseTracks', 'base.ReleaseTracks', (['base.ReleaseTrac...
# Generated by Django 3.1.2 on 2020-10-29 09:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wishes', '0004_auto_20201029_0857'), ] operations = [ migrations.AlterField( model_name='gallery', name='image', ...
[ "django.db.models.FilePathField" ]
[((335, 371), 'django.db.models.FilePathField', 'models.FilePathField', ([], {'path': '"""/images"""'}), "(path='/images')\n", (355, 371), False, 'from django.db import migrations, models\n')]
import math import numpy as np import pandas as pd from sklearn.base import BaseEstimator import sys import os sys.path.append(os.path.abspath('../DecisionTree')) from DecisionTree import DecisionTree class RandomForest(BaseEstimator): """ Simple implementation of Random Forest. This class has implementat...
[ "numpy.random.default_rng", "numpy.average", "math.sqrt", "DecisionTree.DecisionTree", "numpy.empty", "numpy.random.seed", "numpy.concatenate", "numpy.expand_dims", "os.path.abspath", "numpy.shape", "numpy.random.shuffle" ]
[((127, 161), 'os.path.abspath', 'os.path.abspath', (['"""../DecisionTree"""'], {}), "('../DecisionTree')\n", (142, 161), False, 'import os\n'), ((3279, 3309), 'numpy.concatenate', 'np.concatenate', (['(X, y)'], {'axis': '(1)'}), '((X, y), axis=1)\n', (3293, 3309), True, 'import numpy as np\n'), ((3351, 3372), 'numpy.r...
# -*- coding: utf-8 -*- """ Created on Tue Dec 15 09:49:47 2020 @author: james.z.hare """ from src.UnitModule import UnitClass, advance from copy import deepcopy import math class ProjectileClass(UnitClass): """ The Projectile Class This is a subclass to the UnitClass Virtual Functions ----...
[ "src.UnitModule.UnitClass.__init__", "src.UnitModule.advance", "copy.deepcopy" ]
[((1443, 1501), 'src.UnitModule.UnitClass.__init__', 'UnitClass.__init__', (['self', 'ID', 'Owner', 'Health'], {'Extent': '(1, 1)'}), '(self, ID, Owner, Health, Extent=(1, 1))\n', (1461, 1501), False, 'from src.UnitModule import UnitClass, advance\n'), ((2311, 2340), 'copy.deepcopy', 'deepcopy', (['self.Position', 'mem...
#!/usr/bin/env python3 # --------------------( LICENSE )-------------------- # Copyright (c) 2014-2021 Beartype authors. # See "LICENSE" for further details. ''' **Beartype validators.** This submodule publishes a PEP-compliant hierarchy of subscriptable (indexable) classes enabling callers ...
[ "beartype.vale._is._valeistype._IsSubclassFactory", "beartype.vale._is._valeisobj._IsAttrFactory", "beartype.vale._is._valeistype._IsInstanceFactory", "beartype.vale._is._valeis._IsFactory", "beartype.vale._is._valeisoper._IsEqualFactory" ]
[((2119, 2144), 'beartype.vale._is._valeis._IsFactory', '_IsFactory', ([], {'basename': '"""Is"""'}), "(basename='Is')\n", (2129, 2144), False, 'from beartype.vale._is._valeis import _IsFactory\n'), ((2154, 2187), 'beartype.vale._is._valeisobj._IsAttrFactory', '_IsAttrFactory', ([], {'basename': '"""IsAttr"""'}), "(bas...
import unittest from mock import Mock import base64 from cellardoor import errors from cellardoor.authentication import * from cellardoor.authentication.basic import BasicAuthIdentifier class FooIdentifier(Identifier): pass class BarAuthenticator(Authenticator): pass class TestAuthentication(unittest.TestCase...
[ "mock.Mock", "cellardoor.authentication.basic.BasicAuthIdentifier", "base64.standard_b64encode" ]
[((931, 955), 'mock.Mock', 'Mock', ([], {'return_value': '"""foo"""'}), "(return_value='foo')\n", (935, 955), False, 'from mock import Mock\n'), ((1024, 1048), 'mock.Mock', 'Mock', ([], {'return_value': '"""bar"""'}), "(return_value='bar')\n", (1028, 1048), False, 'from mock import Mock\n'), ((1057, 1078), 'mock.Mock',...
import os from mcstasscript.instr_reader.control import InstrumentReader from mcstasscript.interface.instr import McStas_instr class McStas_file: """ Reader of McStas files, can add to an existing McStasScript instrument instance or create a corresponding McStasScript python file. Methods ---...
[ "os.path.isfile", "mcstasscript.instr_reader.control.InstrumentReader", "os.remove" ]
[((1000, 1026), 'mcstasscript.instr_reader.control.InstrumentReader', 'InstrumentReader', (['filename'], {}), '(filename)\n', (1016, 1026), False, 'from mcstasscript.instr_reader.control import InstrumentReader\n'), ((1934, 1958), 'os.path.isfile', 'os.path.isfile', (['filename'], {}), '(filename)\n', (1948, 1958), Fal...
#! /usr/bin/env python3 ####################### """#################### Index: 1. Imports and Readme 2. Functions 3. Main 4. Testing ####################""" ####################### ################################################################### # 1. IMPORTS AND README #############################...
[ "easygui.enterbox", "easygui.ynbox", "country_list_getter.main" ]
[((632, 658), 'country_list_getter.main', 'country_list_getter.main', ([], {}), '()\n', (656, 658), False, 'import country_list_getter\n'), ((742, 820), 'easygui.ynbox', 'easygui.ynbox', (['"""Do you want to play a game?"""', '"""Country Guesser"""', "('Yes', 'No')"], {}), "('Do you want to play a game?', 'Country Gues...
# Need this to import from parent directory when running outside pycharm import os import sys sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir)) from ac_utils.general import save_to_json, load_from_json import click import xml.etree.ElementTree from urllib import unquote def find_c...
[ "click.argument", "ac_utils.general.save_to_json", "os.path.join", "os.path.realpath", "click.command" ]
[((959, 974), 'click.command', 'click.command', ([], {}), '()\n', (972, 974), False, 'import click\n'), ((976, 1006), 'click.argument', 'click.argument', (['"""dataset_path"""'], {}), "('dataset_path')\n", (990, 1006), False, 'import click\n'), ((1494, 1554), 'os.path.join', 'os.path.join', (['dataset_path', '"""analys...
import functools import os import shutil import tempfile from unittest import mock from unittest.mock import MagicMock import pytest from aiohttp import abc, web from aiohttp.web_urldispatcher import SystemRoute @pytest.fixture(scope='function') def tmp_dir_path(request): """ Give a path for a temporary dir...
[ "aiohttp.web.Application", "pytest.fixture", "unittest.mock.patch", "aiohttp.web.Response", "aiohttp.web.view", "os.mkdir", "aiohttp.web.RouteTableDef", "aiohttp.web.HTTPCreated", "aiohttp.web.HTTPPreconditionFailed", "unittest.mock.MagicMock", "tempfile.mkdtemp", "pytest.raises", "os.path.j...
[((217, 249), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (231, 249), False, 'import pytest\n'), ((3505, 3666), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""dir_name,filename,data"""', "[('', 'test file.txt', 'test text'), ('test dir name', 'test dir fil...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Authors : <NAME> (<EMAIL>) & <NAME> (<EMAIL>) # @Paper : Rethinking Graph Autoencoder Models for Attributed Graph Clustering # @License : MIT License import torch import numpy as np import torch.nn as nn import scipy.sparse as sp import torch.nn.functional as F from t...
[ "numpy.sqrt", "torch.LongTensor", "numpy.log", "sklearn.metrics.adjusted_rand_score", "torch.from_numpy", "sklearn.metrics.precision_score", "numpy.argsort", "numpy.array", "sklearn.metrics.recall_score", "torch.exp", "torch.sum", "numpy.isin", "sklearn.metrics.normalized_mutual_info_score",...
[((664, 703), 'numpy.sqrt', 'np.sqrt', (['(6.0 / (input_dim + output_dim))'], {}), '(6.0 / (input_dim + output_dim))\n', (671, 703), True, 'import numpy as np\n'), ((789, 810), 'torch.nn.Parameter', 'nn.Parameter', (['initial'], {}), '(initial)\n', (801, 810), True, 'import torch.nn as nn\n'), ((1386, 1409), 'numpy.zer...
import math import numpy as np import numpy.random as npr import torch import torch.utils.data as data import torch.utils.data.sampler as torch_sampler from torch.utils.data.dataloader import default_collate from torch._six import int_classes as _int_classes from core.config import cfg from roi_data.minibatch import ...
[ "torch.utils.data.dataloader.default_collate", "numpy.ceil", "roi_data.minibatch.get_minibatch", "numpy.empty", "numpy.random.permutation" ]
[((1746, 1768), 'numpy.empty', 'np.empty', (['(DATA_SIZE,)'], {}), '((DATA_SIZE,))\n', (1754, 1768), True, 'import numpy as np\n'), ((815, 858), 'roi_data.minibatch.get_minibatch', 'get_minibatch', (['single_db', 'self._num_classes'], {}), '(single_db, self._num_classes)\n', (828, 858), False, 'from roi_data.minibatch ...
import dataclasses import pytest from dataclasses_avroschema import fields from . import consts @pytest.mark.parametrize("primitive_type", fields.PYTHON_INMUTABLE_TYPES) def test_primitive_types(primitive_type): name = "a_field" field = fields.Field(name, primitive_type, dataclasses.MISSING) avro_type ...
[ "pytest.mark.parametrize", "pytest.raises", "dataclasses_avroschema.fields.Field" ]
[((102, 174), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""primitive_type"""', 'fields.PYTHON_INMUTABLE_TYPES'], {}), "('primitive_type', fields.PYTHON_INMUTABLE_TYPES)\n", (125, 174), False, 'import pytest\n'), ((433, 505), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""primitive_type"""', ...
""" Utility methods for parsing data returned from MapD """ import datetime from collections import namedtuple from sqlalchemy import text import mapd.ttypes as T from ._utils import seconds_to_time Description = namedtuple("Description", ["name", "type_code", "display_size", ...
[ "datetime.datetime", "pyarrow.read_message", "collections.namedtuple", "sqlalchemy.text", "pygdf.gpuarrow.GpuArrowReader", "pyarrow.read_record_batch", "numba.cuda.devicearray.DeviceNDArray", "pygdf.dataframe.DataFrame", "datetime.timedelta", "numba.cuda.cudadrv.drvapi.cu_ipc_mem_handle", "pyarr...
[((216, 334), 'collections.namedtuple', 'namedtuple', (['"""Description"""', "['name', 'type_code', 'display_size', 'internal_size', 'precision', 'scale',\n 'null_ok']"], {}), "('Description', ['name', 'type_code', 'display_size',\n 'internal_size', 'precision', 'scale', 'null_ok'])\n", (226, 334), False, 'from c...
import logging import warnings import dask.dataframe as dd import numpy as np import pandas as pd from featuretools import variable_types as vtypes from featuretools.utils.entity_utils import ( col_is_datetime, convert_all_variable_data, convert_variable_data, get_linked_vars, infer_variable_types...
[ "logging.getLogger", "pandas.Series", "featuretools.utils.entity_utils.convert_variable_data", "featuretools.utils.gen_utils.is_instance", "numpy.sum", "featuretools.utils.entity_utils.convert_all_variable_data", "featuretools.utils.entity_utils.col_is_datetime", "featuretools.utils.entity_utils.get_l...
[((539, 574), 'featuretools.utils.gen_utils.import_or_none', 'import_or_none', (['"""databricks.koalas"""'], {}), "('databricks.koalas')\n", (553, 574), False, 'from featuretools.utils.gen_utils import import_or_none, is_instance\n'), ((585, 628), 'logging.getLogger', 'logging.getLogger', (['"""featuretools.entityset""...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from ralph.business.models import Venture, VentureRole def all_ventures(): yield '', '---------' for v in Venture.objects.filter(show_in...
[ "ralph.business.models.Venture.objects.filter", "ralph.business.models.VentureRole.objects.order_by" ]
[((624, 752), 'ralph.business.models.VentureRole.objects.order_by', 'VentureRole.objects.order_by', (['"""-venture__is_infrastructure"""', '"""venture__name"""', '"""parent__parent__name"""', '"""parent__name"""', '"""name"""'], {}), "('-venture__is_infrastructure', 'venture__name',\n 'parent__parent__name', 'parent...
""" manage.py for flask application """ import unittest import coverage import os from flask.cli import FlaskGroup from project import create_app, db from project.api.models import User # Code coverage COV = coverage.Coverage( branch=True, include='project/*', omit=[ 'project/tests/*', 'p...
[ "project.db.drop_all", "project.db.create_all", "os.path.join", "coverage.Coverage", "project.create_app", "project.db.session.add", "os.path.dirname", "flask.cli.FlaskGroup", "unittest.TextTestRunner", "unittest.TestLoader", "project.db.session.commit" ]
[((211, 313), 'coverage.Coverage', 'coverage.Coverage', ([], {'branch': '(True)', 'include': '"""project/*"""', 'omit': "['project/tests/*', 'project/config.py']"}), "(branch=True, include='project/*', omit=['project/tests/*',\n 'project/config.py'])\n", (228, 313), False, 'import coverage\n'), ((367, 379), 'project...
""" Support for controlling projector via the PJLink protocol. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.pjlink/ """ import logging import voluptuous as vol from homeassistant.components.media_player import ( PLATFORM_SCHEMA, SUPP...
[ "logging.getLogger", "pypjlink.Projector.from_address", "voluptuous.Required", "voluptuous.Optional" ]
[((626, 653), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (643, 653), False, 'import logging\n'), ((778, 801), 'voluptuous.Required', 'vol.Required', (['CONF_HOST'], {}), '(CONF_HOST)\n', (790, 801), True, 'import voluptuous as vol\n'), ((818, 863), 'voluptuous.Optional', 'vol.Optional...
# Built-in import copy import logging import time # External from Qt.QtWidgets import QUndoCommand # Internal from nxt_editor import colors from nxt_editor import user_dir from nxt import nxt_path from nxt.nxt_layer import LAYERS, SAVE_KEY from nxt.nxt_node import (INTERNAL_ATTRS, META_ATTRS, get_node_as_dict, ...
[ "logging.getLogger", "nxt.nxt_path.full_file_expand", "nxt.nxt_node.list_merger", "nxt.nxt_io.load_file_data", "copy.deepcopy", "nxt.nxt_node.META_ATTRS.as_save_key", "nxt_editor.user_dir.breakpoints.pop", "nxt.nxt_node.get_node_as_dict", "nxt.nxt_node.INTERNAL_ATTRS.as_save_key", "nxt.nxt_path.ge...
[((430, 471), 'logging.getLogger', 'logging.getLogger', (['nxt_editor.LOGGER_NAME'], {}), '(nxt_editor.LOGGER_NAME)\n', (447, 471), False, 'import logging\n'), ((67175, 67226), 'nxt.nxt_path.str_path_to_node_namespace', 'nxt_path.str_path_to_node_namespace', (['base_node_path'], {}), '(base_node_path)\n', (67210, 67226...
# -*- coding: utf-8 -*- # Copyright (c) 2021, libracore AG and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from datetime import datetime from PyPDF2 import PdfFileWriter from frappe.utils.file_manager im...
[ "frappe.utils.file_manager.save_file", "frappe.db.get_single_value", "frappe.get_print", "frappe.whitelist", "frappe.enqueue", "datetime.datetime.now", "frappe.utils.pdf.get_file_data_from_writer", "frappe.db.sql", "PyPDF2.PdfFileWriter" ]
[((5555, 5573), 'frappe.whitelist', 'frappe.whitelist', ([], {}), '()\n', (5571, 5573), False, 'import frappe\n'), ((5615, 5752), 'frappe.enqueue', 'frappe.enqueue', ([], {'method': '_get_sammel_pdf', 'queue': '"""long"""', 'job_name': '"""Schlichtungsbehörden Sammel-PDF"""'}), "(method=_get_sammel_pdf, queue='long', j...
from .connection import Connection import socket class ClientSocket: def __init__(self) -> None: self.__socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) def connect(self, host: str, port: int) -> Connection: self.__socket.connect((host, port)) return Connection(self.__socke...
[ "socket.socket" ]
[((127, 176), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (140, 176), False, 'import socket\n')]
#!/pxrpythonsubst # # Copyright 2017 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # ...
[ "pxr.UsdGeom.Cube.Define", "pxr.UsdGeom.Sphere", "pxr.UsdGeom.BasisCurves.Define", "pxr.UsdGeom.Cone.Define", "pxr.UsdGeom.MotionAPI.Apply", "unittest.main", "pxr.UsdGeom.Camera.Define", "pxr.Usd.TimeCode.Default", "pxr.UsdGeom.Curves.ComputeExtent", "pxr.Tf.Type.FindByName", "pxr.UsdGeom.Points...
[((31022, 31037), 'unittest.main', 'unittest.main', ([], {}), '()\n', (31035, 31037), False, 'import sys, unittest\n'), ((1273, 1300), 'pxr.Sdf.Layer.CreateAnonymous', 'Sdf.Layer.CreateAnonymous', ([], {}), '()\n', (1298, 1300), False, 'from pxr import Sdf, Usd, UsdGeom, Vt, Gf, Tf\n'), ((1317, 1345), 'pxr.Usd.Stage.Op...
import pandas as pd from datetime import timedelta def generate_times(matchup_df: pd.DataFrame, tournament_start_time, game_duration, game_stagger): time_df = pd.DataFrame(index=matchup_df.index, columns=matchup_df.columns) if game_stagger == 0: for round_num in range(time_df.shape[0]): ro...
[ "pandas.DataFrame", "datetime.timedelta" ]
[((165, 229), 'pandas.DataFrame', 'pd.DataFrame', ([], {'index': 'matchup_df.index', 'columns': 'matchup_df.columns'}), '(index=matchup_df.index, columns=matchup_df.columns)\n', (177, 229), True, 'import pandas as pd\n'), ((409, 453), 'datetime.timedelta', 'timedelta', ([], {'minutes': '(game_duration * round_num)'}), ...
# Databricks notebook source # MAGIC %md # MAGIC # XGBoost training # MAGIC This is an auto-generated notebook. To reproduce these results, attach this notebook to the **10-3-ML-Cluster** cluster and rerun it. # MAGIC - Compare trials in the [MLflow experiment](#mlflow/experiments/406583024052808/s?orderByKey=metrics.%...
[ "shap.summary_plot", "mlflow.sklearn.autolog", "yaml.load", "mlflow.set_experiment", "shap.KernelExplainer", "sklearn.feature_extraction.FeatureHasher", "mlflow.tracking.MlflowClient", "mlflow.sklearn.eval_and_log_metrics", "sklearn.compose.ColumnTransformer", "pandas.DataFrame", "mlflow.start_r...
[((802, 910), 'mlflow.set_experiment', 'mlflow.set_experiment', (['"""/Users/<EMAIL>/databricks_automl/label_news_articles_csv-2022_03_12-15_38"""'], {}), "(\n '/Users/<EMAIL>/databricks_automl/label_news_articles_csv-2022_03_12-15_38'\n )\n", (823, 910), False, 'import mlflow\n'), ((1251, 1278), 'os.makedirs', '...
import importlib import pkgutil __all__ = [] for loader, module_name, is_pkg in pkgutil.walk_packages(__path__): module = importlib.import_module('.'+module_name,package=__name__) try: globals().update({k: getattr(module, k) for k in module.__all__}) __all__ += module.__all__ except Att...
[ "importlib.import_module", "pkgutil.walk_packages" ]
[((84, 115), 'pkgutil.walk_packages', 'pkgutil.walk_packages', (['__path__'], {}), '(__path__)\n', (105, 115), False, 'import pkgutil\n'), ((130, 190), 'importlib.import_module', 'importlib.import_module', (["('.' + module_name)"], {'package': '__name__'}), "('.' + module_name, package=__name__)\n", (153, 190), False, ...
import numpy as np def get_position_of_minimum(matrix): return np.unravel_index(np.nanargmin(matrix), matrix.shape) def get_position_of_maximum(matrix): return np.unravel_index(np.nanargmax(matrix), matrix.shape) def get_distance_matrix(cell_grid_x, cell_grid_y, x, y): return np.sqrt((x - cell_grid_x)...
[ "numpy.nanargmax", "numpy.nanargmin", "numpy.sqrt" ]
[((295, 351), 'numpy.sqrt', 'np.sqrt', (['((x - cell_grid_x) ** 2 + (y - cell_grid_y) ** 2)'], {}), '((x - cell_grid_x) ** 2 + (y - cell_grid_y) ** 2)\n', (302, 351), True, 'import numpy as np\n'), ((86, 106), 'numpy.nanargmin', 'np.nanargmin', (['matrix'], {}), '(matrix)\n', (98, 106), True, 'import numpy as np\n'), (...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Nicira, Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/lic...
[ "quantum.common.exceptions.InvalidInput", "quantum.manager.QuantumManager.get_plugin", "quantum.api.extensions.ResourceExtension", "quantum.api.v2.base.create_resource" ]
[((5189, 5224), 'quantum.manager.QuantumManager.get_plugin', 'manager.QuantumManager.get_plugin', ([], {}), '()\n', (5222, 5224), False, 'from quantum import manager\n'), ((5419, 5509), 'quantum.api.v2.base.create_resource', 'base.create_resource', (['collection_name', 'resource_name', 'plugin', 'params'], {'allow_bulk...
# Copyright (c) 2017 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[ "oslo_config.cfg.CONF.import_group", "oslo_config.cfg.CONF.set_override", "networking_odl.ml2.mech_driver_v2.OpenDaylightMechanismDriver._record_in_journal", "networking_odl.ml2.mech_driver_v2.OpenDaylightMechanismDriver" ]
[((966, 1030), 'oslo_config.cfg.CONF.import_group', 'cfg.CONF.import_group', (['"""ml2_odl"""', '"""networking_odl.common.config"""'], {}), "('ml2_odl', 'networking_odl.common.config')\n", (987, 1030), False, 'from oslo_config import cfg\n'), ((1192, 1253), 'oslo_config.cfg.CONF.set_override', 'cfg.CONF.set_override', ...