code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
""" Run x12/x13-arima specs in a subprocess from Python and curry results back into python. Notes ----- Many of the functions are called x12. However, they are also intended to work for x13. If this is not the case, it's a bug. """ from statsmodels.compat.pandas import deprecate_kwarg import os import subprocess impo...
[ "os.remove", "statsmodels.base.data._make_exog_names", "statsmodels.compat.pandas.deprecate_kwarg", "statsmodels.tools.tools.Bunch", "os.path.join", "statsmodels.tools.sm_exceptions.X13NotFoundError", "subprocess.check_call", "os.path.dirname", "os.path.exists", "re.findall", "pandas.tseries.api...
[((9528, 9581), 'statsmodels.compat.pandas.deprecate_kwarg', 'deprecate_kwarg', (['"""forecast_years"""', '"""forecast_periods"""'], {}), "('forecast_years', 'forecast_periods')\n", (9543, 9581), False, 'from statsmodels.compat.pandas import deprecate_kwarg\n'), ((17153, 17206), 'statsmodels.compat.pandas.deprecate_kwa...
""" An example of Gym Wrapper. """ import time import numpy as np from gym import spaces from airobot import Robot from airobot.utils.common import ang_in_mpi_ppi from airobot.utils.common import clamp from airobot.utils.common import euler2quat from airobot.utils.common import quat_multiply from airobot.utils.commo...
[ "airobot.Robot", "airobot.utils.common.euler2quat", "airobot.utils.common.clamp", "airobot.utils.common.quat_multiply", "airobot.utils.common.rotvec2quat", "time.sleep", "numpy.array", "gym.spaces.Box", "airobot.utils.common.ang_in_mpi_ppi", "numpy.sqrt" ]
[((478, 537), 'airobot.Robot', 'Robot', (['"""ur5e_2f140"""'], {'pb_cfg': "{'gui': gui, 'realtime': False}"}), "('ur5e_2f140', pb_cfg={'gui': gui, 'realtime': False})\n", (483, 537), False, 'from airobot import Robot\n'), ((799, 833), 'numpy.array', 'np.array', (['([self._action_bound] * 5)'], {}), '([self._action_boun...
""" Transaction support for Blobs tests """ from __future__ import absolute_import from __future__ import print_function import os from ZODB.interfaces import BlobError from ZODB.interfaces import IStorageUndoable from ZODB.blob import Blob from ZODB.POSException import ConflictError from ZODB.POSException import Con...
[ "transaction.commit", "transaction.TransactionManager", "transaction.get", "os.path.exists", "relstorage.blobhelper.interfaces.IAuthoritativeBlobHelper.providedBy", "ZODB.interfaces.IStorageUndoable.providedBy", "relstorage.blobhelper.interfaces.ICachedBlobHelper.providedBy", "transaction.savepoint", ...
[((696, 702), 'ZODB.blob.Blob', 'Blob', ([], {}), '()\n', (700, 702), False, 'from ZODB.blob import Blob\n'), ((1055, 1075), 'transaction.commit', 'transaction.commit', ([], {}), '()\n', (1073, 1075), False, 'import transaction\n'), ((2231, 2250), 'transaction.abort', 'transaction.abort', ([], {}), '()\n', (2248, 2250)...
# MIT License # # Copyright (c) 2020-2021 Parakoopa and the SkyTemple Contributors # # 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...
[ "explorerscript.ssb_converting.ssb_special_ops.OPS_BRANCH.keys", "explorerscript.util._", "explorerscript.ssb_converting.compiler.utils.SsbLabelJumpBlueprint" ]
[((3442, 3520), 'explorerscript.ssb_converting.compiler.utils.SsbLabelJumpBlueprint', 'SsbLabelJumpBlueprint', (['self.compiler_ctx', 'self.ctx', 'op.op_code.name', 'op.params'], {}), '(self.compiler_ctx, self.ctx, op.op_code.name, op.params)\n', (3463, 3520), False, 'from explorerscript.ssb_converting.compiler.utils i...
import sys import cProfile from pstats import Stats from unittest import TestCase, main from pandas import DataFrame from lib.pipeline import DefaultPipeline # Synthetic data used for testing TEST_AUX_DATA = DataFrame.from_records( [ # Country with no subregions { "key": "AA", ...
[ "unittest.main", "pstats.Stats", "cProfile.Profile", "pandas.DataFrame.from_records", "lib.pipeline.DefaultPipeline" ]
[((210, 2449), 'pandas.DataFrame.from_records', 'DataFrame.from_records', (["[{'key': 'AA', 'country_code': 'AA', 'subregion1_code': None,\n 'subregion2_code': None, 'match_string': None}, {'key': 'AB',\n 'country_code': 'AB', 'subregion1_code': None, 'subregion2_code': None,\n 'match_string': None}, {'key': '...
#!/usr/bin/env python3 import argparse import asyncio import json import logging import os.path import sys from collections import defaultdict from enum import Enum from typing import Any from typing import DefaultDict from typing import Dict from typing import List from typing import NamedTuple from typing import Opti...
[ "asyncio.gather", "asyncio.get_event_loop", "argparse.ArgumentParser", "logging.basicConfig", "json.loads", "kazoo.client.KazooClient", "asyncio.open_connection", "collections.defaultdict", "yaml.safe_load", "logging.getLogger" ]
[((474, 508), 'logging.getLogger', 'logging.getLogger', (['"""check_orphans"""'], {}), "('check_orphans')\n", (491, 508), False, 'import logging\n'), ((1240, 1267), 'kazoo.client.KazooClient', 'KazooClient', ([], {'hosts': 'zk_hosts'}), '(hosts=zk_hosts)\n', (1251, 1267), False, 'from kazoo.client import KazooClient\n'...
from datetime import date from datetime import datetime def transformacion(fecha_en_crudo):#2021-10-15T05:45:57 print(fecha_en_crudo) dia=int(fecha_en_crudo[8:10]) mes=int(fecha_en_crudo[5:7]) año=int(fecha_en_crudo[0:4]) hora=int(fecha_en_crudo[11:13]) minuto=int(fecha_en_crudo[14:16]) new...
[ "datetime.datetime.isocalendar", "datetime.datetime" ]
[((328, 365), 'datetime.datetime', 'datetime', (['año', 'mes', 'dia', 'hora', 'minuto'], {}), '(año, mes, dia, hora, minuto)\n', (336, 365), False, 'from datetime import datetime\n'), ((383, 413), 'datetime.datetime.isocalendar', 'datetime.isocalendar', (['new_date'], {}), '(new_date)\n', (403, 413), False, 'from datet...
# -*- coding: utf-8 -*- # @Date : 2019-07-25 # @Author : <NAME> (<EMAIL>) # @Link : None # @Version : 0.0 import os import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torchvision.utils import make_grid from torch.autograd import Variable from imageio import imsave import ...
[ "torch.roll", "torch.cat", "torch.randn", "numpy.random.normal", "os.path.join", "torch.nn.MSELoss", "torch.Tensor", "torch.zeros", "imageio.imsave", "ramps.sigmoid_rampup", "torch.mean", "tqdm.tqdm", "torch.randint", "numpy.random.beta", "torch.nn.functional.cross_entropy", "utils.fid...
[((554, 581), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (571, 581), False, 'import logging\n'), ((593, 605), 'torch.nn.MSELoss', 'nn.MSELoss', ([], {}), '()\n', (603, 605), True, 'import torch.nn as nn\n'), ((1162, 1195), 'numpy.random.permutation', 'np.random.permutation', (['batch_...
# Copyright [2018] [<NAME> via AID:Tech] # # 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 ...
[ "nephos.fabric.peer.create_channel", "nephos.fabric.peer.setup_peer", "nephos.fabric.ord.setup_ord", "nephos.composer.install.install_network", "nephos.composer.upgrade.upgrade_network", "nephos.fabric.crypto.setup_nodes", "nephos.fabric.crypto.genesis_block", "nephos.fabric.crypto.channel_tx", "nep...
[((1662, 1717), 'nephos.composer.install.deploy_composer', 'deploy_composer', (['opts'], {'upgrade': 'upgrade', 'verbose': 'verbose'}), '(opts, upgrade=upgrade, verbose=verbose)\n', (1677, 1717), False, 'from nephos.composer.install import deploy_composer, install_network, setup_admin\n'), ((1722, 1756), 'nephos.compos...
""" ---------------------------------------------- training: Listen to updates from self-play actors, train network, predict from network, and plot performance. ---------------------------------------------- """ import pickle import os from multiprocessing.connection import wait from glob import glob from sys import ar...
[ "util.sqlUtil.SqlUtil.get_latest_status", "view.log.FancyLogger.start_timing", "util.sqlUtil.SqlUtil.add_status", "util.sqlUtil.SqlUtil.set_status", "view.log.FancyLogger.set_network_status", "multiprocessing.connection.wait", "view.log.FancyLogger.set_performance_values", "os.path.exists", "view.lo...
[((1394, 1439), 'view.log.FancyLogger.set_network_status', 'FancyLogger.set_network_status', (['"""Training..."""'], {}), "('Training...')\n", (1424, 1439), False, 'from view.log import FancyLogger\n'), ((3588, 3650), 'view.graph.GraphHandler.plot_data', 'GraphHandler.plot_data', (['"""Training Evaluation"""', 'ai', 's...
import io import pytest import serial from panoptes.utils import error from panoptes.utils import rs232 from panoptes.utils.serial.handlers import protocol_buffers, protocol_hooked from panoptes.utils.serial.handlers.protocol_no_op import NoOpSerial from serial.serialutil import PortNotOpenError def test_port_discov...
[ "io.BytesIO", "panoptes.utils.serial.handlers.protocol_buffers.get_serial_write_buffer", "panoptes.utils.rs232.get_serial_port_info", "pytest.fixture", "panoptes.utils.serial.handlers.protocol_buffers.set_serial_read_buffer", "serial.protocol_handler_packages.append", "pytest.raises", "panoptes.utils....
[((858, 890), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (872, 890), False, 'import pytest\n'), ((339, 367), 'panoptes.utils.rs232.get_serial_port_info', 'rs232.get_serial_port_info', ([], {}), '()\n', (365, 367), False, 'from panoptes.utils import rs232\n'), ((626, 6...
import os import re from setuptools import setup, find_packages def read(f): return open(os.path.join(os.path.dirname(__file__), f)).read().strip() try: version = re.findall(r"""^__version__ = "([^']+)"\r?$""", read(os.path.join("sioinstagram", "__init__.py")), ...
[ "os.path.dirname", "os.path.join", "setuptools.find_packages" ]
[((820, 835), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (833, 835), False, 'from setuptools import setup, find_packages\n'), ((253, 296), 'os.path.join', 'os.path.join', (['"""sioinstagram"""', '"""__init__.py"""'], {}), "('sioinstagram', '__init__.py')\n", (265, 296), False, 'import os\n'), ((108,...
import pathlib import pickle import anonlink from e2etests.util import ( create_project_upload_data, delete_project, get_run_result, post_run, binary_pack_for_upload) DATA_FILENAME = 'test-multiparty-results-correctness-data.pkl' DATA_PATH = pathlib.Path(__file__).parent / 'testdata' / DATA_FILENAME DATA_HASH_SI...
[ "e2etests.util.delete_project", "e2etests.util.get_run_result", "e2etests.util.binary_pack_for_upload", "anonlink.solving.greedy_solve", "pathlib.Path", "pickle.load", "e2etests.util.create_project_upload_data", "e2etests.util.post_run", "anonlink.candidate_generation.find_candidate_pairs" ]
[((591, 706), 'anonlink.candidate_generation.find_candidate_pairs', 'anonlink.candidate_generation.find_candidate_pairs', (['filters', 'anonlink.similarities.dice_coefficient', 'THRESHOLD'], {}), '(filters, anonlink.\n similarities.dice_coefficient, THRESHOLD)\n', (641, 706), False, 'import anonlink\n'), ((745, 791)...
import logging import re from django import forms import requests from zentral.contrib.mdm.models import SCEPChallengeType from .base import SCEPChallengeError, SCEPChallenge logger = logging.getLogger("zentral.contrib.mdm.scep.microsoft_ca") class MicrosoftCAChallengeForm(forms.Form): url = forms.URLField(help...
[ "re.finditer", "django.forms.URLField", "django.forms.PasswordInput", "requests.get", "django.forms.CharField", "logging.getLogger" ]
[((186, 244), 'logging.getLogger', 'logging.getLogger', (['"""zentral.contrib.mdm.scep.microsoft_ca"""'], {}), "('zentral.contrib.mdm.scep.microsoft_ca')\n", (203, 244), False, 'import logging\n'), ((301, 371), 'django.forms.URLField', 'forms.URLField', ([], {'help_text': '"""Full URL of the NDES mscep_admin/ endpoint"...
import sqlalchemy from bot import config _db = None def initialize(): global _db _db = sqlalchemy.create_engine(config.DATABASE_URL) def get_conn(): return _db
[ "sqlalchemy.create_engine" ]
[((99, 144), 'sqlalchemy.create_engine', 'sqlalchemy.create_engine', (['config.DATABASE_URL'], {}), '(config.DATABASE_URL)\n', (123, 144), False, 'import sqlalchemy\n')]
"""statesp_test.py - test state space class RMM, 30 Mar 2011 based on TestStateSp from v0.4a) RMM, 14 Jun 2019 statesp_array_test.py coverted from statesp_test.py to test with use_numpy_matrix(False) BG, 26 Jul 2020 merge statesp_array_test.py differences into statesp_test.py convert...
[ "numpy.empty", "control.tf", "numpy.ones", "numpy.exp", "numpy.tile", "control.statesp.ss", "pytest.mark.parametrize", "numpy.testing.assert_array_almost_equal", "numpy.diag", "control.lti.evalfr", "control.xferfcn.TransferFunction", "numpy.atleast_2d", "control.xferfcn.ss2tf", "control.st...
[((44060, 44149), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['""" gmats, ref"""', '[(LTX_G1, LTX_G1_REF), (LTX_G2, LTX_G2_REF)]'], {}), "(' gmats, ref', [(LTX_G1, LTX_G1_REF), (LTX_G2,\n LTX_G2_REF)])\n", (44083, 44149), False, 'import pytest\n'), ((44198, 44323), 'pytest.mark.parametrize', 'pytest.ma...
import torch import triton class _dot(torch.autograd.Function): src = """ __global__ void dot(TYPE *A __noalias __readonly __aligned(16), TYPE *B __noalias __readonly __aligned(16), TYPE *C __noalias __aligned(16), float alpha, ...
[ "triton.kernel", "torch.manual_seed", "torch.rand", "triton.empty" ]
[((3838, 3858), 'torch.manual_seed', 'torch.manual_seed', (['(0)'], {}), '(0)\n', (3855, 3858), False, 'import torch\n'), ((3444, 3477), 'triton.empty', 'triton.empty', (['[M, N]'], {'dtype': 'dtype'}), '([M, N], dtype=dtype)\n', (3456, 3477), False, 'import triton\n'), ((3891, 3909), 'torch.rand', 'torch.rand', (['(M,...
# SPDX-FileCopyrightText: 2021 easyDiffraction contributors <<EMAIL>> # SPDX-License-Identifier: BSD-3-Clause # © 2021 Contributors to the easyDiffraction project <https://github.com/easyScience/easyDiffractionApp> import mss import cv2 import time import numpy as np from threading import Thread from PySide2.QtCore im...
[ "threading.Thread", "PySide2.QtCore.Slot", "cv2.VideoWriter_fourcc", "cv2.cvtColor", "PySide2.QtWidgets.QApplication.instance", "time.time", "time.sleep", "mss.mss", "numpy.array", "PySide2.QtCore.Signal", "cv2.destroyAllWindows", "PySide2.QtWidgets.QApplication.primaryScreen" ]
[((448, 456), 'PySide2.QtCore.Signal', 'Signal', ([], {}), '()\n', (454, 456), False, 'from PySide2.QtCore import QObject, Signal, Slot\n'), ((4405, 4433), 'PySide2.QtCore.Slot', 'Slot', (['"""QVariant"""', '"""QVariant"""'], {}), "('QVariant', 'QVariant')\n", (4409, 4433), False, 'from PySide2.QtCore import QObject, S...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Extend the power of declarative base. """ import math from copy import deepcopy from collections import OrderedDict from sqlalchemy.orm import sessionmaker from sqlalchemy.orm.session import Session from sqlalchemy.engine.base import Engine from sqlalchemy.exc import...
[ "copy.deepcopy", "sqlalchemy_mate.utils.grouper_list", "math.sqrt", "sqlalchemy.inspection.inspect", "sqlalchemy_mate.utils.ensure_list", "sqlalchemy.orm.sessionmaker", "collections.OrderedDict" ]
[((8113, 8137), 'sqlalchemy_mate.utils.ensure_list', 'ensure_list', (['obj_or_data'], {}), '(obj_or_data)\n', (8124, 8137), False, 'from sqlalchemy_mate.utils import ensure_list, grouper_list\n'), ((912, 948), 'sqlalchemy.orm.sessionmaker', 'sessionmaker', ([], {'bind': 'engine_or_session'}), '(bind=engine_or_session)\...
""" mcpython - a minecraft clone written in python licenced under the MIT-licence (https://github.com/mcpython4-coding/core) Contributors: uuk, xkcdjerry (inactive) Based on the game of fogleman (https://github.com/fogleman/Minecraft), licenced under the MIT-licence Original game "minecraft" by Mojang Studios (www.m...
[ "simplejson.dump", "generate_build.main", "os.path.dirname", "simplejson.load", "subprocess.call" ]
[((685, 710), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (700, 710), False, 'import os\n'), ((718, 740), 'os.path.dirname', 'os.path.dirname', (['local'], {}), '(local)\n', (733, 740), False, 'import os\n'), ((743, 814), 'subprocess.call', 'subprocess.call', (["[sys.executable, local + '/...
import enum _methods = 'head get put post delete patch options'.split() Http = enum.Enum('Http', _methods) _etr = {k: v for k, v in zip(Http, _methods)} def enum_to_method(http_enum_value): return _etr[http_enum_value]
[ "enum.Enum" ]
[((81, 108), 'enum.Enum', 'enum.Enum', (['"""Http"""', '_methods'], {}), "('Http', _methods)\n", (90, 108), False, 'import enum\n')]
from puzzle import solve_maxrook from time import time def main(): n0,S,X = 8,7,3 N,T = [],[] for i in range(S): n = n0*2**i N.append(n) t0 = time() for _ in range(X): rc = solve_maxrook(n) t = (time()-t0)/X T.append(t) T = [T[i]/T[0] for i i...
[ "puzzle.solve_maxrook", "time.time" ]
[((179, 185), 'time.time', 'time', ([], {}), '()\n', (183, 185), False, 'from time import time\n'), ((230, 246), 'puzzle.solve_maxrook', 'solve_maxrook', (['n'], {}), '(n)\n', (243, 246), False, 'from puzzle import solve_maxrook\n'), ((260, 266), 'time.time', 'time', ([], {}), '()\n', (264, 266), False, 'from time impo...
import sys from kqml import cl_json, KQMLList from kqml.cl_json import CLJsonConverter def _equal(json_val, back_json_val, strict=False): # This handles the case where False->NIL which is not reliably # back-translated. if not strict: if json_val is False and back_json_val is None: re...
[ "kqml.cl_json._key_from_string", "sys.stdout.flush", "kqml.cl_json._string_from_key", "kqml.cl_json.CLJsonConverter" ]
[((1258, 1276), 'sys.stdout.flush', 'sys.stdout.flush', ([], {}), '()\n', (1274, 1276), False, 'import sys\n'), ((1626, 1643), 'kqml.cl_json.CLJsonConverter', 'CLJsonConverter', ([], {}), '()\n', (1641, 1643), False, 'from kqml.cl_json import CLJsonConverter\n'), ((1993, 2010), 'kqml.cl_json.CLJsonConverter', 'CLJsonCo...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ "pulumi.get", "pulumi.getter", "pulumi.ResourceOptions", "pulumi.set" ]
[((2400, 2434), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""instanceName"""'}), "(name='instanceName')\n", (2413, 2434), False, 'import pulumi\n'), ((2775, 2807), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""maxVersion"""'}), "(name='maxVersion')\n", (2788, 2807), False, 'import pulumi\n'), ((3166, 3199)...
import os import torch import pandas as pd import numpy as np from wilds.datasets.wilds_dataset import WILDSDataset from wilds.common.grouper import CombinatorialGrouper from wilds.common.metrics.all_metrics import Accuracy class CivilCommentsDataset(WILDSDataset): """ The CivilComments-wilds toxicit...
[ "os.path.join", "wilds.common.metrics.all_metrics.Accuracy", "wilds.common.grouper.CombinatorialGrouper", "torch.LongTensor" ]
[((2487, 2548), 'torch.LongTensor', 'torch.LongTensor', (["(self._metadata_df['toxicity'].values >= 0.5)"], {}), "(self._metadata_df['toxicity'].values >= 0.5)\n", (2503, 2548), False, 'import torch\n'), ((4399, 4409), 'wilds.common.metrics.all_metrics.Accuracy', 'Accuracy', ([], {}), '()\n', (4407, 4409), False, 'from...
# -*- coding: utf-8 -*- """ .. _tut-raw-class: The Raw data structure: continuous data ======================================= This tutorial covers the basics of working with raw EEG/MEG data in Python. It introduces the :class:`~mne.io.Raw` data structure in detail, including how to load, query, subselect, export, a...
[ "numpy.save", "mne.io.read_raw_fif", "matplotlib.pyplot.plot", "mne.pick_types", "matplotlib.pyplot.legend", "numpy.array", "mne.datasets.sample.data_path", "os.path.join" ]
[((2757, 2788), 'mne.datasets.sample.data_path', 'mne.datasets.sample.data_path', ([], {}), '()\n', (2786, 2788), False, 'import mne\n'), ((2812, 2886), 'os.path.join', 'os.path.join', (['sample_data_folder', '"""MEG"""', '"""sample"""', '"""sample_audvis_raw.fif"""'], {}), "(sample_data_folder, 'MEG', 'sample', 'sampl...
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.TradePrecreateConfirmIndirectMerchantInfo import TradePrecreateConfirmIndirectMerchantInfo from alipay.aop.api.domain.TradePrecreateConfirmTradeMerchantIn...
[ "alipay.aop.api.domain.TradePrecreateConfirmPrecreateCodeInfo.TradePrecreateConfirmPrecreateCodeInfo.from_alipay_dict", "alipay.aop.api.domain.TradePrecreateConfirmIndirectMerchantInfo.TradePrecreateConfirmIndirectMerchantInfo.from_alipay_dict", "alipay.aop.api.domain.TradePrecreateConfirmTradeStoreInfo.TradePr...
[((1842, 1907), 'alipay.aop.api.domain.TradePrecreateConfirmIndirectMerchantInfo.TradePrecreateConfirmIndirectMerchantInfo.from_alipay_dict', 'TradePrecreateConfirmIndirectMerchantInfo.from_alipay_dict', (['value'], {}), '(value)\n', (1900, 1907), False, 'from alipay.aop.api.domain.TradePrecreateConfirmIndirectMerchant...
# SPDX-License-Identifier: Apache-2.0 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np # type: ignore from typing import List, Any import onnx from ..base import Base from . import expect def com...
[ "onnx.helper.make_tensor_type_proto", "onnx.helper.make_node", "onnx.helper.make_sequence_type_proto", "onnx.helper.make_tensor_value_info", "onnx.helper.make_optional_type_proto", "onnx.helper.make_value_info", "numpy.array", "onnx.helper.make_tensor", "onnx.helper.make_opsetid", "onnx.helper.mak...
[((828, 899), 'onnx.helper.make_tensor_value_info', 'onnx.helper.make_tensor_value_info', (['"""y_in"""', 'onnx.TensorProto.FLOAT', '[1]'], {}), "('y_in', onnx.TensorProto.FLOAT, [1])\n", (862, 899), False, 'import onnx\n'), ((916, 988), 'onnx.helper.make_tensor_value_info', 'onnx.helper.make_tensor_value_info', (['"""...
import discord from discord.ext import commands import re, difflib class ErrorHandler(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_command_error(self, ctx, error): embed = discord.Embed(title="Fatal Error:", colour=discord.Color.from_rgb(81,...
[ "re.findall", "discord.Color.from_rgb", "difflib.get_close_matches", "discord.ext.commands.Cog.listener" ]
[((161, 184), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (182, 184), False, 'from discord.ext import commands\n'), ((294, 328), 'discord.Color.from_rgb', 'discord.Color.from_rgb', (['(81)', '(0)', '(124)'], {}), '(81, 0, 124)\n', (316, 328), False, 'import discord\n'), ((1073, 1173)...
import psutil import os from influxdb import InfluxDBClient import time,math,random #获取当前运行的pid p1=psutil.Process(os.getpid()) from influxdb import InfluxDBClient import time,math,random while True: a = psutil.virtual_memory().percent #内存占用率 b = psutil.cpu_percent(interval=1.0) #cpu占用率 json_body = [...
[ "psutil.virtual_memory", "os.getpid", "influxdb.InfluxDBClient", "time.sleep", "psutil.cpu_percent" ]
[((116, 127), 'os.getpid', 'os.getpid', ([], {}), '()\n', (125, 127), False, 'import os\n'), ((261, 293), 'psutil.cpu_percent', 'psutil.cpu_percent', ([], {'interval': '(1.0)'}), '(interval=1.0)\n', (279, 293), False, 'import psutil\n'), ((648, 707), 'influxdb.InfluxDBClient', 'InfluxDBClient', (['"""localhost"""', '(8...
from setuptools import setup import re version = '' with open('discord/ext/ui/__init__.py') as f: version = re.search( r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', f.read(), re.MULTILINE).group(1) if not version: raise RuntimeError('version is not set') if version.endswith(('a', 'b', 'r...
[ "subprocess.Popen", "setuptools.setup" ]
[((1095, 1987), 'setuptools.setup', 'setup', ([], {'name': '"""discord-ext-ui"""', 'author': '"""sizumita"""', 'url': '"""https://github.com/sizumita/discord-ext-ui"""', 'version': 'version', 'long_description': 'readme', 'long_description_content_type': '"""text/x-rst"""', 'packages': "['discord.ext.ui', 'discord.ext....
# -*- encoding: utf-8 -*- import copy import io import json import platform import logging.handlers import multiprocessing import os import sys import time from typing import Any, Dict, Optional, List, Tuple, Union import uuid import unittest.mock import warnings import tempfile from ConfigSpace.configuration_space im...
[ "numpy.argmax", "sys.version.split", "numpy.clip", "autosklearn.util.pipeline.get_configuration_space", "multiprocessing.get_context", "numpy.argmin", "autosklearn.data.validation.InputValidator", "ConfigSpace.configuration_space.Configuration", "os.path.join", "autosklearn.ensembles.singlebest_en...
[((3258, 3283), 'warnings.catch_warnings', 'warnings.catch_warnings', ([], {}), '()\n', (3281, 3283), False, 'import warnings\n'), ((9462, 9473), 'autosklearn.util.stopwatch.StopWatch', 'StopWatch', ([], {}), '()\n', (9471, 9473), False, 'from autosklearn.util.stopwatch import StopWatch\n'), ((13455, 13513), 'multiproc...
import logging from PyQt5.QtCore import ( Qt, QTimer) from PyQt5.QtWidgets import ( QApplication, QWidget, QGridLayout, QGroupBox, QVBoxLayout, QLabel, QLineEdit, QFileDialog, QToolButton, QComboBox, QCheckBox, QHBoxLayout, QSpinBox, QSizePolicy ) from babel.core import Locale import cddagl.constants as c...
[ "PyQt5.QtWidgets.QGridLayout", "PyQt5.QtWidgets.QVBoxLayout", "babel.core.Locale.parse", "cddagl.i18n.proxy_gettext", "PyQt5.QtWidgets.QApplication.instance", "PyQt5.QtWidgets.QSpinBox", "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QWidget", "PyQt5.QtWidgets.QToolButton", "PyQt5.QtWidgets.QCheckBox"...
[((648, 675), 'logging.getLogger', 'logging.getLogger', (['"""cddagl"""'], {}), "('cddagl')\n", (665, 675), False, 'import logging\n'), ((1058, 1071), 'PyQt5.QtWidgets.QVBoxLayout', 'QVBoxLayout', ([], {}), '()\n', (1069, 1071), False, 'from PyQt5.QtWidgets import QApplication, QWidget, QGridLayout, QGroupBox, QVBoxLay...
from pydantic import BaseModel, Field class ShareResponse(BaseModel): ticker: str = Field(...) class Config: schema_extra = {'example': {'ticker': 'TSLA'}} class ShareCreate(BaseModel): ticker: str = Field(...) class ShareUpdate(BaseModel): ticker: str = Field(...)
[ "pydantic.Field" ]
[((90, 100), 'pydantic.Field', 'Field', (['...'], {}), '(...)\n', (95, 100), False, 'from pydantic import BaseModel, Field\n'), ((225, 235), 'pydantic.Field', 'Field', (['...'], {}), '(...)\n', (230, 235), False, 'from pydantic import BaseModel, Field\n'), ((286, 296), 'pydantic.Field', 'Field', (['...'], {}), '(...)\n...
"""Application 'quiz' admin page configuration.""" from django.contrib import admin from .models import Answer, Question, Quiz class QuestionsInline(admin.StackedInline): model = Question.quiz.through extra = 0 class AnswersInline(admin.TabularInline): model = Answer extra = 0 @admin.register(Qui...
[ "django.contrib.admin.register" ]
[((302, 322), 'django.contrib.admin.register', 'admin.register', (['Quiz'], {}), '(Quiz)\n', (316, 322), False, 'from django.contrib import admin\n'), ((702, 726), 'django.contrib.admin.register', 'admin.register', (['Question'], {}), '(Question)\n', (716, 726), False, 'from django.contrib import admin\n')]
from supervisor import ticks_ms from kmk.consts import KMK_RELEASE, UnicodeMode from kmk.hid import BLEHID, USBHID, AbstractHID, HIDModes from kmk.keys import KC from kmk.matrix import MatrixScanner, intify_coordinate from kmk.types import TapDanceKeyMeta class Sandbox: matrix_update = None secondary_matrix_...
[ "kmk.matrix.intify_coordinate", "supervisor.ticks_ms" ]
[((4225, 4252), 'kmk.matrix.intify_coordinate', 'intify_coordinate', (['row', 'col'], {}), '(row, col)\n', (4242, 4252), False, 'from kmk.matrix import MatrixScanner, intify_coordinate\n'), ((8882, 8892), 'supervisor.ticks_ms', 'ticks_ms', ([], {}), '()\n', (8890, 8892), False, 'from supervisor import ticks_ms\n'), ((8...
from wtforms.ext.sqlalchemy.fields import QuerySelectMultipleField from wtforms.widgets import ListWidget, CheckboxInput class MultiCheckboxField(QuerySelectMultipleField): widget = ListWidget(prefix_label=False) option_widget = CheckboxInput()
[ "wtforms.widgets.ListWidget", "wtforms.widgets.CheckboxInput" ]
[((188, 218), 'wtforms.widgets.ListWidget', 'ListWidget', ([], {'prefix_label': '(False)'}), '(prefix_label=False)\n', (198, 218), False, 'from wtforms.widgets import ListWidget, CheckboxInput\n'), ((239, 254), 'wtforms.widgets.CheckboxInput', 'CheckboxInput', ([], {}), '()\n', (252, 254), False, 'from wtforms.widgets ...
import os import json from .exceptions import CLGEException import zipfile import os import shutil path = os.path.dirname(__file__) def GetPlugins(): PluginList = json.load(open(path + "/plugs/plugs.json")) plugins = "" for plugin in PluginList: plugins += plugin + " " return plugins def Un...
[ "zipfile.ZipFile", "os.makedirs", "os.path.dirname", "json.dumps", "shutil.rmtree" ]
[((107, 132), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (122, 132), False, 'import os\n'), ((352, 397), 'shutil.rmtree', 'shutil.rmtree', (["(path + '/plugs/' + plugin_name)"], {}), "(path + '/plugs/' + plugin_name)\n", (365, 397), False, 'import shutil\n'), ((559, 581), 'json.dumps', 'j...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 8 14:56:45 2021 @author: maxmhuggins """ import backtester as bt import datareader as dr import matplotlib.pyplot as plt class ExampleStrategy: def __init__(self, closes, dates, symbol): self.Closes, self.Dates, self.Symbol = close...
[ "matplotlib.pyplot.scatter", "backtester.BackTester", "matplotlib.pyplot.plot", "datareader.DataReader" ]
[((2085, 2135), 'datareader.DataReader', 'dr.DataReader', (['symbol', '"""binance"""', 'dates'], {'tick': '"""1h"""'}), "(symbol, 'binance', dates, tick='1h')\n", (2098, 2135), True, 'import datareader as dr\n'), ((2349, 2412), 'matplotlib.pyplot.scatter', 'plt.scatter', (['optimize_range', 'Strat.BackTester.Gains'], {...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2018 Alibaba Group Holding Ltd. # # 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-...
[ "logging.getLogger", "mars.dataframe.utils.build_concatenated_rows_frame", "pandas.DataFrame", "cupid.runtime.RuntimeContext.is_context_ready", "mars.serialize.BoolField", "cupid.io.table.CupidTableUploadSession", "cupid.io.table.core.BlockWriter", "pyarrow.RecordBatchStreamWriter", "pyarrow.RecordB...
[((1054, 1081), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1071, 1081), False, 'import logging\n'), ((1431, 1452), 'mars.serialize.SeriesField', 'SeriesField', (['"""dtypes"""'], {}), "('dtypes')\n", (1442, 1452), False, 'from mars.serialize import StringField, SeriesField, BoolField...
print ('pydubでオーディオのミキシング(2つの音声を合成)') # pydubを使うにはffmpegが必要- from pydub import AudioSegment # mp3ファイルの読み込み audio1 = AudioSegment.from_file("./test_data/test1.mp3", "mp3") audio2 = AudioSegment.from_file("./test_data/effect_sound1.mp3", "mp3") audio = audio2.overlay(audio1, position=0) # エクスポートする audio.export("./tes...
[ "pydub.AudioSegment.from_file" ]
[((118, 172), 'pydub.AudioSegment.from_file', 'AudioSegment.from_file', (['"""./test_data/test1.mp3"""', '"""mp3"""'], {}), "('./test_data/test1.mp3', 'mp3')\n", (140, 172), False, 'from pydub import AudioSegment\n'), ((182, 244), 'pydub.AudioSegment.from_file', 'AudioSegment.from_file', (['"""./test_data/effect_sound1...
import os from . import parsers import tempfile import signal def run(args, input_file): igblast_run = IgBlastRun(args) return igblast_run.run_single_process(input_file) class IgBlastRun(): ''' IgBlast single run is the class to call for a single IgBlast subprocess. This class is the most handy ...
[ "tempfile.NamedTemporaryFile", "signal.signal", "os.path.join" ]
[((4500, 4549), 'signal.signal', 'signal.signal', (['signal.SIGINT', 'self.signal_handler'], {}), '(signal.SIGINT, self.signal_handler)\n', (4513, 4549), False, 'import signal\n'), ((1820, 1874), 'os.path.join', 'os.path.join', (["args['aux']", "(args['species'] + '_gl.aux')"], {}), "(args['aux'], args['species'] + '_g...
from logparser import Drain from logparser import Spell class SimpleParserFactory: @staticmethod def create_parser(data_dir, output_dir, parser_type, log_format, regex, keep_para=False, st=0.3, depth=3, max_child=1000, tau=0.35): parser = None if parser_type == "drain": # the hyper...
[ "logparser.Spell.LogParser", "logparser.Drain.LogParser" ]
[((450, 588), 'logparser.Drain.LogParser', 'Drain.LogParser', (['log_format'], {'indir': 'data_dir', 'outdir': 'output_dir', 'depth': 'depth', 'st': 'st', 'rex': 'regex', 'keep_para': 'keep_para', 'maxChild': 'max_child'}), '(log_format, indir=data_dir, outdir=output_dir, depth=depth,\n st=st, rex=regex, keep_para=k...
from sofi.ui import Div def test_basic(): assert(str(Div()) == "<div></div>") def test_text(): assert(str(Div("text")) == "<div>text</div>") def test_custom_class_ident_style_and_attrs(): assert(str(Div("text", cl='abclass', ident='123', style="font-size:0.9em;", attrs={"data-test": 'abc'})) =...
[ "sofi.ui.Div" ]
[((58, 63), 'sofi.ui.Div', 'Div', ([], {}), '()\n', (61, 63), False, 'from sofi.ui import Div\n'), ((116, 127), 'sofi.ui.Div', 'Div', (['"""text"""'], {}), "('text')\n", (119, 127), False, 'from sofi.ui import Div\n'), ((214, 311), 'sofi.ui.Div', 'Div', (['"""text"""'], {'cl': '"""abclass"""', 'ident': '"""123"""', 'st...
#!/usr/bin/env python3 import rospy from geometry_msgs.msg import Twist from math import pi class TurtleBot: def __init__(self): rospy.init_node('square_openloop', anonymous=True) self.velocity_publisher = rospy.Publisher('cmd_vel', Twist, queue_size = 10) self.rate = rospy.Rate(10) ...
[ "rospy.Time.now", "rospy.Publisher", "geometry_msgs.msg.Twist", "rospy.Rate", "rospy.is_shutdown", "rospy.init_node" ]
[((144, 194), 'rospy.init_node', 'rospy.init_node', (['"""square_openloop"""'], {'anonymous': '(True)'}), "('square_openloop', anonymous=True)\n", (159, 194), False, 'import rospy\n'), ((230, 278), 'rospy.Publisher', 'rospy.Publisher', (['"""cmd_vel"""', 'Twist'], {'queue_size': '(10)'}), "('cmd_vel', Twist, queue_size...
''' Author: cvhades Date: 2021-11-09 16:46:33 LastEditTime: 2022-01-18 19:12:08 LastEditors: cvhadessun FilePath: /PG-engine/src/lib/Model/SMPL.py ''' import bpy from bpy_extras.object_utils import world_to_camera_view from mathutils import Matrix, Quaternion import numpy as np import pickle as pkl import os from too...
[ "mathutils.Quaternion", "bpy.ops.object.material_slot_remove", "numpy.empty", "pickle.load", "os.path.join", "bpy.ops.wm.memory_statistics", "bpy.ops.object.material_slot_add", "bpy.ops.object.vertex_group_set_active", "bpy.ops.object.vertex_group_select", "tools.geometryutils.rodrigues2bshapes", ...
[((3639, 3664), 'bpy.data.objects.values', 'bpy.data.objects.values', ([], {}), '()\n', (3662, 3664), False, 'import bpy\n'), ((4887, 4982), 'os.path.join', 'os.path.join', (['self.cfg.Engine.Model.SMPL.smpl_dir', 'self.cfg.Engine.Model.SMPL.segm_overlap'], {}), '(self.cfg.Engine.Model.SMPL.smpl_dir, self.cfg.Engine.Mo...
# Copyright 2021 Google LLC. # # 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 law or agreed to in writing,...
[ "yggdrasil_decision_forests.model.random_forest.random_forest_pb2.Header", "tensorflow_decision_forests.component.py_tree.node.node_to_core_node", "six.add_metaclass", "yggdrasil_decision_forests.dataset.data_spec_pb2.DataSpecification", "yggdrasil_decision_forests.model.abstract_model_pb2.AbstractModel", ...
[((3037, 3067), 'six.add_metaclass', 'six.add_metaclass', (['abc.ABCMeta'], {}), '(abc.ABCMeta)\n', (3054, 3067), False, 'import six\n'), ((10887, 10917), 'six.add_metaclass', 'six.add_metaclass', (['abc.ABCMeta'], {}), '(abc.ABCMeta)\n', (10904, 10917), False, 'import six\n'), ((3445, 3479), 'yggdrasil_decision_forest...
""" ========================== Author: <NAME> Year: 2018 ========================== This module contains the functions used to load data in the /data/ folder. """ from ffai.core.model import * import json from ffai.core.util import * import glob import untangle import uuid # Tile set mapping arena_char_map = { '...
[ "glob.glob", "uuid.uuid1", "untangle.parse", "json.loads" ]
[((1601, 1621), 'untangle.parse', 'untangle.parse', (['path'], {}), '(path)\n', (1615, 1621), False, 'import untangle\n'), ((5872, 5891), 'json.loads', 'json.loads', (['jsonStr'], {}), '(jsonStr)\n', (5882, 5891), False, 'import json\n'), ((7773, 7788), 'json.loads', 'json.loads', (['str'], {}), '(str)\n', (7783, 7788)...
import requests from grum import db from grum.models import User, EmailAccount from flask import jsonify, request from flask.ext.restful import Resource MAILGUN_API_BASE = "https://api.mailgun.net/v3/" MAILGUN_API_ENDPOINT = "/messages" class Accounts(Resource): def get(self): accounts = EmailAccount.qu...
[ "grum.db.session.commit", "grum.models.EmailAccount.query.filter_by", "flask.jsonify", "grum.models.EmailAccount.query.all", "grum.db.session.delete", "grum.db.session.add", "flask.request.get_json", "grum.models.User.query.filter_by" ]
[((305, 329), 'grum.models.EmailAccount.query.all', 'EmailAccount.query.all', ([], {}), '()\n', (327, 329), False, 'from grum.models import User, EmailAccount\n'), ((532, 556), 'flask.jsonify', 'jsonify', ([], {'accounts': 'output'}), '(accounts=output)\n', (539, 556), False, 'from flask import jsonify, request\n'), ((...
"""See https://github.com/xlwings/xlwings/issues/1789 Can be removed again if there's a solution for https://github.com/mhammond/pywin32/issues/1870 This file's content is taken from pywin32 v301, distributed under the following license: Unless stated in the specfic source file, this work is Copyright (c) 1996-2008, ...
[ "pythoncom.new" ]
[((1886, 1911), 'pythoncom.new', 'pythoncom.new', (['self.CLSID'], {}), '(self.CLSID)\n', (1899, 1911), False, 'import pythoncom\n')]
#!/usr/bin/env python # encoding: utf-8 # <NAME>, 2007 (dv) # <NAME>, 2007-2008 (ita) import os, sys, re, optparse import ccroot # <- leave this import TaskGen, Utils, Task, Configure, Logs, Build from Logs import debug, error from TaskGen import taskgen, feature, after, before, extension from Configure import conftes...
[ "os.path.isabs", "re.compile", "TaskGen.before", "TaskGen.task_gen.__init__", "Utils.WafError", "Utils.readf", "TaskGen.feature", "Utils.unversioned_sys_platform", "TaskGen.extension", "TaskGen.after", "Logs.error", "Utils.deque", "Task.simple_task_type", "TaskGen.bind_feature", "Utils.d...
[((5506, 5518), 'TaskGen.feature', 'feature', (['"""d"""'], {}), "('d')\n", (5513, 5518), False, 'from TaskGen import taskgen, feature, after, before, extension\n'), ((5520, 5545), 'TaskGen.before', 'before', (['"""apply_type_vars"""'], {}), "('apply_type_vars')\n", (5526, 5545), False, 'from TaskGen import taskgen, fe...
""" The pycity_scheduling framework Copyright (C) 2022, Institute for Automation of Complex Power Systems (ACS), E.ON Energy Research Center (E.ON ERC), RWTH Aachen University Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Softwa...
[ "pycity_scheduling.util.factory.generate_standard_environment", "numpy.set_printoptions", "pycity_scheduling.util.factory.generate_tabula_district", "pycity_scheduling.util.calculate_flexibility_potential" ]
[((1881, 1981), 'pycity_scheduling.util.factory.generate_standard_environment', 'factory.generate_standard_environment', ([], {'initial_date': '(2018, 12, 6)', 'step_size': '(900)', 'op_horizon': '(96)'}), '(initial_date=(2018, 12, 6), step_size\n =900, op_horizon=96)\n', (1918, 1981), True, 'import pycity_schedulin...
"""Setup file to work with pypi and pip.""" from setuptools import setup with open('LICENSE.txt') as f: license = f.read() with open('README.rst') as f: long_description = f.read() setup(name='pypf', version='0.9.6', description='Create point and figure charts', long_description=long_desc...
[ "setuptools.setup" ]
[((194, 787), 'setuptools.setup', 'setup', ([], {'name': '"""pypf"""', 'version': '"""0.9.6"""', 'description': '"""Create point and figure charts"""', 'long_description': 'long_description', 'classifiers': "['Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License',\n 'Programming Language :: Pytho...
import typing from http import HTTPStatus from flask.views import MethodView, View from flask import Response, make_response, jsonify, request, url_for from .validator import validate_schema, REGISTRY_ENTRY_SCHEMA from .storage import ConfigRegistry from .log import logger __all__ = ( 'FaviconView', 'Configs...
[ "flask.request.json.get", "flask.make_response", "flask.jsonify" ]
[((450, 490), 'flask.make_response', 'make_response', (['""""""', 'HTTPStatus.NO_CONTENT'], {}), "('', HTTPStatus.NO_CONTENT)\n", (463, 490), False, 'from flask import Response, make_response, jsonify, request, url_for\n'), ((1044, 1059), 'flask.jsonify', 'jsonify', (['config'], {}), '(config)\n', (1051, 1059), False, ...
#!/usr/bin/env python3 # # __init__.py """ tox plugin which installs the *minimum* versions of a project's dependencies. """ # # Copyright © 2021 <NAME> <<EMAIL>> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), ...
[ "tox.reporter.warning", "domdf_python_tools.utils.divide", "tox.reporter.verbosity", "types.MethodType", "shippinglabel.requirements.marker_environment", "packaging.specifiers.Specifier", "tox.reporter.error", "packaging.specifiers.SpecifierSet", "cawdrey.header_mapping.HeaderMapping", "tarfile.op...
[((6429, 6468), 're.sub', 're.sub', (['f"""\\\\n([{WSP}])"""', '"""\\\\1"""', 'rawtext'], {}), "(f'\\\\n([{WSP}])', '\\\\1', rawtext)\n", (6435, 6468), False, 'import re\n'), ((6572, 6587), 'cawdrey.header_mapping.HeaderMapping', 'HeaderMapping', ([], {}), '()\n', (6585, 6587), False, 'from cawdrey.header_mapping impor...
def solution1(A): # O(N) """ You are given a list A (eg. [1, 2, 3, 7, 1, 5]). Write a function to calculate the pivot of the array such that the left hand side = right hand side. In the example, pivot (P) = 3, because 1 + 2 + 3 = 1 + 5. Expecte...
[ "doctest.testmod" ]
[((2795, 2812), 'doctest.testmod', 'doctest.testmod', ([], {}), '()\n', (2810, 2812), False, 'import doctest\n')]
from collections import namedtuple from itertools import product from abc import ABC, abstractmethod from pathlib import Path import numpy as np import os from kaa.reach import ReachSet from kaa.plotutil import * from kaa.trajectory import Traj, TrajCollection from settings import PlotSettings, KaaSettings from kaa.te...
[ "kaa.temp.pca_strat.GeneratedPCADirs", "kaa.log.Output.prominent", "kaa.reach.ReachSet", "kaa.temp.lin_app_strat.GeneratedLinDirs", "kaa.trajectory.TrajCollection", "kaa.log.Output.warning", "collections.namedtuple", "kaa.trajectory.Traj", "itertools.product", "os.path.join" ]
[((571, 627), 'collections.namedtuple', 'namedtuple', (['"""GenDirsTuple"""', "['GenPCADirs', 'GenLinDirs']"], {}), "('GenDirsTuple', ['GenPCADirs', 'GenLinDirs'])\n", (581, 627), False, 'from collections import namedtuple\n'), ((12814, 12840), 'kaa.trajectory.TrajCollection', 'TrajCollection', (['self.model'], {}), '(...
from typing import Optional from torch.nn import Sequential, BatchNorm2d, ReLU, Conv2d, Dropout2d from .bottleneck import Bottleneck from ..utils import RichRepr class DenseLayer(RichRepr, Sequential): r""" Dense Layer as described in [DenseNet](https://arxiv.org/abs/1608.06993) and implemented in https...
[ "torch.nn.BatchNorm2d", "torch.nn.Conv2d", "torch.nn.Dropout2d" ]
[((802, 839), 'torch.nn.BatchNorm2d', 'BatchNorm2d', ([], {'num_features': 'in_channels'}), '(num_features=in_channels)\n', (813, 839), False, 'from torch.nn import Sequential, BatchNorm2d, ReLU, Conv2d, Dropout2d\n'), ((1142, 1213), 'torch.nn.Conv2d', 'Conv2d', (['in_channels', 'out_channels'], {'kernel_size': '(3)', ...
import datetime import humanize from markupsafe import Markup import webcolors from bitcoin_acks.constants import ReviewDecision def line_count_formatter(view, context, model, name): lines = getattr(model, name) if name == 'additions': color = '#28a745' prefix = '+' elif name == 'deletio...
[ "webcolors.rgb_to_hex", "markupsafe.Markup.escape", "humanize.naturaltime", "markupsafe.Markup", "webcolors.hex_to_rgb", "datetime.datetime.now", "markupsafe.Markup.striptags" ]
[((677, 705), 'markupsafe.Markup.striptags', 'Markup.striptags', (['model.body'], {}), '(model.body)\n', (693, 705), False, 'from markupsafe import Markup\n'), ((6553, 6567), 'markupsafe.Markup', 'Markup', (['output'], {}), '(output)\n', (6559, 6567), False, 'from markupsafe import Markup\n'), ((8650, 8664), 'markupsaf...
"""Utilities to validate Galaxy xml tool wrappers. """ from pathlib import Path from typing import List, Optional from lxml import etree from pygls.lsp.types import Diagnostic, DiagnosticRelatedInformation, Location, Position, Range from pygls.workspace import Document from galaxy.util import xml_macros from galaxyl...
[ "galaxy.util.xml_macros.load_with_references", "lxml.etree.fromstring", "lxml.etree.indent", "pygls.lsp.types.Position", "galaxyls.services.tools.document.GalaxyToolXmlDocument.from_xml_document", "pathlib.Path", "galaxyls.services.macros.remove_macros", "lxml.etree.tostring" ]
[((1563, 1616), 'galaxyls.services.tools.document.GalaxyToolXmlDocument.from_xml_document', 'GalaxyToolXmlDocument.from_xml_document', (['xml_document'], {}), '(xml_document)\n', (1602, 1616), False, 'from galaxyls.services.tools.document import GalaxyToolXmlDocument\n'), ((1653, 1682), 'lxml.etree.fromstring', 'etree....
import unittest from qual_id.pattern import Pattern from unittest.mock import MagicMock class TestPattern(unittest.TestCase): def setUp(self): self.pattern = None def test__get_category_options__returns_non_empty_list(self): self.pattern = Pattern('test_pattern') self.assertGreater(len(self.pattern.g...
[ "unittest.main", "qual_id.pattern.Pattern" ]
[((2169, 2184), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2182, 2184), False, 'import unittest\n'), ((255, 278), 'qual_id.pattern.Pattern', 'Pattern', (['"""test_pattern"""'], {}), "('test_pattern')\n", (262, 278), False, 'from qual_id.pattern import Pattern\n'), ((460, 483), 'qual_id.pattern.Pattern', 'Patt...
#!/usr/bin/env python """The setup script.""" from setuptools import setup, find_packages with open("README.rst") as readme_file: readme = readme_file.read() with open("HISTORY.rst") as history_file: history = history_file.read() # abandoned utility.path_type experiment requirements = [ # "python-magic...
[ "setuptools.find_packages" ]
[((1570, 1621), 'setuptools.find_packages', 'find_packages', ([], {'include': "['treecrawl', 'treecrawl.*']"}), "(include=['treecrawl', 'treecrawl.*'])\n", (1583, 1621), False, 'from setuptools import setup, find_packages\n')]
from __future__ import absolute_import from __future__ import print_function import os import time from pyrevolve import parser, str_to_address, make_revolve_config from pyrevolve.angle import Tree, Crossover, Mutator, WorldManager # from pyrevolve.angle.robogen.spec import make_planar # from pyrevolve.sdfbuilder imp...
[ "pyrevolve.str_to_address", "pyrevolve.make_revolve_config", "time.time", "os.path.join", "pyrevolve.util.multi_future" ]
[((722, 733), 'time.time', 'time.time', ([], {}), '()\n', (731, 733), False, 'import time\n'), ((1608, 1633), 'pyrevolve.make_revolve_config', 'make_revolve_config', (['conf'], {}), '(conf)\n', (1627, 1633), False, 'from pyrevolve import parser, str_to_address, make_revolve_config\n'), ((5607, 5628), 'pyrevolve.util.mu...
from pydiva import pydiva2d import unittest import os import subprocess print("Running tests on Diva Kernel") print(" ") class TestDivaKernel(unittest.TestCase): @classmethod def setUpClass(cls): cls.divadir = "/home/ctroupin/Software/DIVA/DIVA-diva-4.7.1/" cls.contourfile = "./datawrite/co...
[ "unittest.main", "os.remove", "pydiva.pydiva2d.Diva2DMesh", "pydiva.pydiva2d.Diva2DResults", "os.path.exists", "pydiva.pydiva2d.Diva2DParameters", "pydiva.pydiva2d.Diva2DContours", "pydiva.pydiva2d.Diva2DData", "os.path.join" ]
[((3074, 3089), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3087, 3089), False, 'import unittest\n'), ((544, 583), 'pydiva.pydiva2d.Diva2DContours', 'pydiva2d.Diva2DContours', (['cls.xc', 'cls.yc'], {}), '(cls.xc, cls.yc)\n', (567, 583), False, 'from pydiva import pydiva2d\n'), ((680, 774), 'pydiva.pydiva2d.Di...
# -*- coding: utf-8 -*- """Setup file for the package""" from setuptools import find_packages, setup with open("README.md", "r") as fh: long_description = fh.read() setup( name='Tilty', description='A pluggable system to receive and transmit bluetooth events from the Tilt Hydrometer', # noqa author='<...
[ "setuptools.find_packages" ]
[((517, 550), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['tests*']"}), "(exclude=['tests*'])\n", (530, 550), False, 'from setuptools import find_packages, setup\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> # # 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...
[ "argparse.ArgumentParser", "yaml.dump", "jinja2.FileSystemLoader", "pathlib.Path", "yaml.safe_load_all", "sys.stderr.write", "sys.exit" ]
[((761, 793), 'sys.stderr.write', 'sys.stderr.write', (["(stringy + '\\n')"], {}), "(stringy + '\\n')\n", (777, 793), False, 'import sys\n'), ((2096, 2115), 'yaml.dump', 'yaml.dump', (['step_dic'], {}), '(step_dic)\n', (2105, 2115), False, 'import yaml\n'), ((6044, 6069), 'argparse.ArgumentParser', 'argparse.ArgumentPa...
import unittest from idl.Environment import Environment from idl.IDLError import IDLError from idl.IDLImportError import IDLImportError from test.TestBase import TestBase class PackageTest(TestBase): def test_package_import(self): ''' Basic package import test. ''' ...
[ "unittest.main", "idl.Environment.Environment" ]
[((2379, 2394), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2392, 2394), False, 'import unittest\n'), ((922, 935), 'idl.Environment.Environment', 'Environment', ([], {}), '()\n', (933, 935), False, 'from idl.Environment import Environment\n'), ((1536, 1549), 'idl.Environment.Environment', 'Environment', ([], {...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ drs data Used to load data files from the ./data/ directory only Created on 2019-07-02 at 09:24 @author: cook """ import numpy as np import os import glob from apero import core from apero.core import constants from apero import lang from apero.core.core import drs...
[ "apero.io.drs_text.save_text_file", "os.path.basename", "os.path.exists", "apero.io.drs_table.read_table", "numpy.array", "apero.io.drs_path.get_relative_folder", "apero.io.drs_fits.readfits", "apero.io.drs_text.load_text_file", "apero.core.constants.load", "os.path.join" ]
[((744, 774), 'apero.core.constants.load', 'constants.load', (['__INSTRUMENT__'], {}), '(__INSTRUMENT__)\n', (758, 774), False, 'from apero.core import constants\n'), ((4275, 4305), 'os.path.exists', 'os.path.exists', (['absfilename_1m'], {}), '(absfilename_1m)\n', (4289, 4305), False, 'import os\n'), ((4320, 4350), 'o...
"""Predict features in the openstreetmap dataset (map only). Example (You need to train models first or download pre-trained models from our website): Predict embedded descriptors for X domain: python predict_map.py --name PF_map --model map --batch_size 512 --area unionsquare5k1 --em...
[ "os.makedirs", "os.path.isdir", "models.create_model", "numpy.zeros", "scipy.io.savemat", "numpy.savez", "torch.no_grad", "os.path.join", "data.create_dataset", "options.predict_options.PredictOptions" ]
[((1325, 1344), 'data.create_dataset', 'create_dataset', (['opt'], {}), '(opt)\n', (1339, 1344), False, 'from data import create_dataset\n'), ((1418, 1435), 'models.create_model', 'create_model', (['opt'], {}), '(opt)\n', (1430, 1435), False, 'from models import create_model\n'), ((1736, 1781), 'numpy.zeros', 'np.zeros...
from django.db import models from recipient.models import Recipient from tag.models import Tag from template_instance.models import TemplateInstance class Notification(models.Model): user = models.ForeignKey(Recipient, on_delete=models.CASCADE) template_instance = models.ForeignKey( TemplateInstance,...
[ "django.db.models.ForeignKey", "django.db.models.ManyToManyField" ]
[((197, 251), 'django.db.models.ForeignKey', 'models.ForeignKey', (['Recipient'], {'on_delete': 'models.CASCADE'}), '(Recipient, on_delete=models.CASCADE)\n', (214, 251), False, 'from django.db import models\n'), ((276, 337), 'django.db.models.ForeignKey', 'models.ForeignKey', (['TemplateInstance'], {'on_delete': 'mode...
import json import uuid import collections class Question: def path_to_file_question(self): """find the path where is located the questions file""" with open('config.json', 'r') as file: file = json.load(file) return file["simple_question_path"] def read_question_file(self): """open and copy the questi...
[ "uuid.uuid4", "json.dump", "json.load" ]
[((204, 219), 'json.load', 'json.load', (['file'], {}), '(file)\n', (213, 219), False, 'import json\n'), ((448, 468), 'json.load', 'json.load', (['json_file'], {}), '(json_file)\n', (457, 468), False, 'import json\n'), ((712, 757), 'json.dump', 'json.dump', (['questions_json_file', 'file_question'], {}), '(questions_js...
import pandas as pd import numpy as np from quantamatics.core import settings from quantamatics.core.APIClient import Session from quantamatics.core.utils import QException from quantamatics.data.securityMaster import Instrument from quantamatics.data.fundamentals import KPI from quantamatics.providers.panels import P...
[ "numpy.mean", "pandas.to_datetime", "numpy.sum", "quantamatics.core.APIClient.Session" ]
[((3584, 3593), 'quantamatics.core.APIClient.Session', 'Session', ([], {}), '()\n', (3591, 3593), False, 'from quantamatics.core.APIClient import Session\n'), ((7671, 7680), 'quantamatics.core.APIClient.Session', 'Session', ([], {}), '()\n', (7678, 7680), False, 'from quantamatics.core.APIClient import Session\n'), ((1...
""" Unit tests for special euclidean group SE(n). Note: Only the *canonical* left- and right- invariant metrics on SE(3) are tested here. Other invariant metrics are tested with the tests of the invariant_metric module. """ import warnings import tests.helper as helper import geomstats.backend as gs import geomstat...
[ "geomstats.backend.linspace", "tests.helper.log_then_exp", "tests.helper.group_log_then_exp_from_identity", "tests.helper.exp_then_log_from_identity", "geomstats.backend.zeros", "warnings.simplefilter", "geomstats.backend.array", "geomstats.backend.linalg.norm", "geomstats.backend.allclose", "geom...
[((784, 839), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""'], {'category': 'ImportWarning'}), "('ignore', category=ImportWarning)\n", (805, 839), False, 'import warnings\n'), ((848, 868), 'geomstats.backend.random.seed', 'gs.random.seed', (['(1234)'], {}), '(1234)\n', (862, 868), True, 'import geom...
# Copyright (C) 2018 <NAME> # # SPDX-License-Identifier: MIT """This module contains a collection of functions related to geographical data. """ from .utils import sorted_by_key # noqa from haversine import haversine # formula to calculate distance between two coordinates def stations_by_distance(stations, p): ...
[ "haversine.haversine" ]
[((398, 436), 'haversine.haversine', 'haversine', (['station.coord', 'p'], {'unit': '"""km"""'}), "(station.coord, p, unit='km')\n", (407, 436), False, 'from haversine import haversine\n'), ((653, 696), 'haversine.haversine', 'haversine', (['station.coord', 'centre'], {'unit': '"""km"""'}), "(station.coord, centre, uni...
from cardboard import types from cardboard.ability import ( AbilityNotImplemented, spell, activated, triggered, static ) from cardboard.cards import card, common, keywords, match @card("Fight or Flight") def fight_or_flight(card, abilities): def fight_or_flight(): return AbilityNotImplemented re...
[ "cardboard.cards.card" ]
[((186, 209), 'cardboard.cards.card', 'card', (['"""Fight or Flight"""'], {}), "('Fight or Flight')\n", (190, 209), False, 'from cardboard.cards import card, common, keywords, match\n'), ((345, 367), 'cardboard.cards.card', 'card', (['"""Kavu Aggressor"""'], {}), "('Kavu Aggressor')\n", (349, 367), False, 'from cardboa...
from django.conf.urls import url, include from snippets.views import SnippetViewSet, UserViewSet from rest_framework.routers import DefaultRouter router = DefaultRouter() router.register(r'snippets', SnippetViewSet) router.register(r'users', UserViewSet) urlpatterns = [ url(r'^', include(router.urls)), ]
[ "django.conf.urls.include", "rest_framework.routers.DefaultRouter" ]
[((156, 171), 'rest_framework.routers.DefaultRouter', 'DefaultRouter', ([], {}), '()\n', (169, 171), False, 'from rest_framework.routers import DefaultRouter\n'), ((289, 309), 'django.conf.urls.include', 'include', (['router.urls'], {}), '(router.urls)\n', (296, 309), False, 'from django.conf.urls import url, include\n...
# -*- coding: utf-8 -*- """ Created on Fri May 28 15:50:05 2021 @author: kerem.basaran """ import time import logging logging.basicConfig(filename='speaker_test.log', encoding='utf-8', level=logging.INFO) # User only changes these two rows: # arguments are: year, month, day, hour, minute, 0, 0, 0, is_it_summertime ...
[ "logging.basicConfig", "time.strftime", "time.time", "time.sleep", "logging.info", "time.mktime", "logging.shutdown", "time.localtime" ]
[((121, 212), 'logging.basicConfig', 'logging.basicConfig', ([], {'filename': '"""speaker_test.log"""', 'encoding': '"""utf-8"""', 'level': 'logging.INFO'}), "(filename='speaker_test.log', encoding='utf-8', level=\n logging.INFO)\n", (140, 212), False, 'import logging\n'), ((450, 483), 'logging.info', 'logging.info'...
#!/usr/bin/python.pydPiper3 # coding: UTF-8 # pydPiper service to display music data to LCD and OLED character displays # Written by: <NAME> # Edited by: <EMAIL> # Also edited by Saiyato import json, threading, logging, queue, time, sys, getopt, moment, signal, subprocess, os, copy, datetime, math, requests import pag...
[ "pause.nextHour", "getopt.getopt", "os.popen", "logging.critical", "subprocess.getoutput", "displays.ssd1306_i2c.ssd1306_i2c", "threading.Thread.__init__", "logging.error", "displays.hd44780.hd44780", "logging.warning", "pydPiper_config.TEMPERATURE.lower", "threading.Lock", "requests.get", ...
[((31958, 31969), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (31966, 31969), False, 'import json, threading, logging, queue, time, sys, getopt, moment, signal, subprocess, os, copy, datetime, math, requests\n'), ((32018, 32064), 'signal.signal', 'signal.signal', (['signal.SIGTERM', 'sigterm_handler'], {}), '(signa...
from mamba import description, context, it from expects import * from unittest.mock import Mock import spec.modeltr.test_helper from web.modeltr.document import Document as Document from web.modeltr.document import DocumentList as DocumentList import web.modeltr.base as tr_types TESTED_CLASS = 'Document' with descr...
[ "mamba.context", "mamba.it", "web.modeltr.document.Document.get_eldest_excl", "unittest.mock.Mock", "web.modeltr.document.DocumentList", "web.modeltr.document.Document", "mamba.description", "web.modeltr.document.Document.get" ]
[((315, 338), 'mamba.description', 'description', (['"""Document"""'], {}), "('Document')\n", (326, 338), False, 'from mamba import description, context, it\n'), ((8604, 8632), 'mamba.description', 'description', (['"""Document List"""'], {}), "('Document List')\n", (8615, 8632), False, 'from mamba import description, ...
"""Test time series plots.""" from pytest import raises from neurodsp.tests.utils import plot_test from neurodsp.plts.time_series import * ################################################################################################### #############################################################################...
[ "pytest.raises" ]
[((772, 790), 'pytest.raises', 'raises', (['ValueError'], {}), '(ValueError)\n', (778, 790), False, 'from pytest import raises\n')]
# from abc import abstractmethod # import voluptuous as vol # import numpy as np # import requests import logging # from ledfx.config import save_config from ledfx.events import Event from ledfx.utils import BaseRegistry, RegistryLoader, async_fire_and_forget # import asyncio _LOGGER = logging.getLogger(__name__) ...
[ "logging.getLogger" ]
[((290, 317), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (307, 317), False, 'import logging\n')]
import numpy as np import torch import torch.optim as optim import gym from rlmodels.models.AC import * from rlmodels.nets import FullyConnected, DiscretePolicy import logging FORMAT = '%(asctime)-15s: %(message)s' logging.basicConfig(level=logging.INFO,format=FORMAT,filename="model_fit.log",filemode="a") max_ep_t...
[ "numpy.random.seed", "gym.make", "logging.basicConfig", "torch.manual_seed", "rlmodels.nets.DiscretePolicy", "rlmodels.nets.FullyConnected" ]
[((219, 318), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': 'FORMAT', 'filename': '"""model_fit.log"""', 'filemode': '"""a"""'}), "(level=logging.INFO, format=FORMAT, filename=\n 'model_fit.log', filemode='a')\n", (238, 318), False, 'import logging\n'), ((334, 357), 'gym.make...
# -*- coding: utf-8 -*- """@package get_surface @date Created on juil. 02 11:03 2018 @author franco_i """ from pyleecan.Classes.Segment import Segment from pyleecan.Classes.Arc1 import Arc1 from pyleecan.Classes.SurfLine import SurfLine from pyleecan.Methods import ParentMissingError from numpy import exp, pi def get...
[ "numpy.exp", "pyleecan.Classes.Arc1.Arc1", "pyleecan.Classes.SurfLine.SurfLine", "pyleecan.Methods.ParentMissingError" ]
[((1533, 1578), 'pyleecan.Classes.SurfLine.SurfLine', 'SurfLine', ([], {'line_list': 'curve_list', 'label': '"""Tooth"""'}), "(line_list=curve_list, label='Tooth')\n", (1541, 1578), False, 'from pyleecan.Classes.SurfLine import SurfLine\n'), ((682, 746), 'pyleecan.Methods.ParentMissingError', 'ParentMissingError', (['"...
from __future__ import absolute_import from linode_api4.objects import Base, Property class LongviewClient(Base): api_endpoint = '/longview/clients/{id}' properties= { "id": Property(identifier=True), "created": Property(is_datetime=True), "updated": Property(is_datetime=True), ...
[ "linode_api4.objects.Property" ]
[((195, 220), 'linode_api4.objects.Property', 'Property', ([], {'identifier': '(True)'}), '(identifier=True)\n', (203, 220), False, 'from linode_api4.objects import Base, Property\n'), ((241, 267), 'linode_api4.objects.Property', 'Property', ([], {'is_datetime': '(True)'}), '(is_datetime=True)\n', (249, 267), False, 'f...
import itertools import pytest import numpy as np from scipy.linalg import block_diag import pennylane as qml from gate_data import Y, Z THETA = np.linspace(0.11, 1, 3) PHI = np.linspace(0.32, 1, 3) VARPHI = np.linspace(0.02, 1, 3) @pytest.mark.parametrize("shots", [None, 1000000]) @pytest.mark.parametrize("theta,...
[ "pennylane.CNOT", "pennylane.RX", "pennylane.Hermitian", "numpy.allclose", "pennylane.qnode", "pennylane.device", "numpy.array", "numpy.linspace", "numpy.kron", "pennylane.RY", "pytest.mark.parametrize", "pennylane.Identity", "numpy.cos", "numpy.sin" ]
[((148, 171), 'numpy.linspace', 'np.linspace', (['(0.11)', '(1)', '(3)'], {}), '(0.11, 1, 3)\n', (159, 171), True, 'import numpy as np\n'), ((178, 201), 'numpy.linspace', 'np.linspace', (['(0.32)', '(1)', '(3)'], {}), '(0.32, 1, 3)\n', (189, 201), True, 'import numpy as np\n'), ((211, 234), 'numpy.linspace', 'np.linspa...
""" Utils for binning functions """ from moredataframes.mdfutils.typing import ArrayLike, EFuncInfo, Any, Callable, NDArray, Optional, Union, Sequence, List from moredataframes.errors import UserFunctionCallError from moredataframes.mdfutils import to_numpy, string_param from moredataframes.encodings import encoding_fu...
[ "moredataframes.mdfutils.string_param", "numpy.concatenate", "numpy.logical_and", "numpy.searchsorted", "numpy.clip", "moredataframes.mdfutils.to_numpy", "numpy.min", "numpy.max", "numpy.array", "numpy.where", "numpy.argwhere", "numpy.digitize", "numpy.issubdtype" ]
[((12651, 12712), 'moredataframes.mdfutils.string_param', 'string_param', (['boundary_type', "['vals', 'change_vals', 'cvals']"], {}), "(boundary_type, ['vals', 'change_vals', 'cvals'])\n", (12663, 12712), False, 'from moredataframes.mdfutils import to_numpy, string_param\n'), ((1154, 1168), 'moredataframes.mdfutils.to...
from __future__ import division from libtbx import str_utils from libtbx import group_args, adopt_init_args import os import sys """ Using GUI callbacks in CCTBX ---------------------------- The libtbx.callbacks module provides (or intends to) a transparent way of sending information (in the form of pickled Python o...
[ "libtbx.group_args", "os.getpid", "libtbx.str_utils.line_breaker" ]
[((3665, 3676), 'os.getpid', 'os.getpid', ([], {}), '()\n', (3674, 3676), False, 'import os\n'), ((4686, 4717), 'libtbx.str_utils.line_breaker', 'str_utils.line_breaker', (['msg', '(72)'], {}), '(msg, 72)\n', (4708, 4717), False, 'from libtbx import str_utils\n'), ((5006, 5082), 'libtbx.group_args', 'group_args', ([], ...
''' @author: MengLai ''' import os import tempfile import uuid import time import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_state as test_state import zstacklib.utils.ssh as ssh import zstackwoodpecker.operations.resource_operations ...
[ "zstackwoodpecker.test_util.test_pass", "zstackwoodpecker.test_lib.lib_get_test_stub", "zstackwoodpecker.operations.scenario_operations.create_vm", "zstackwoodpecker.test_util.test_fail", "zstackwoodpecker.test_util.test_dsc", "zstackwoodpecker.test_lib.lib_get_vm_password", "zstackwoodpecker.test_util....
[((413, 441), 'zstackwoodpecker.test_lib.lib_get_test_stub', 'test_lib.lib_get_test_stub', ([], {}), '()\n', (439, 441), True, 'import zstackwoodpecker.test_lib as test_lib\n'), ((459, 485), 'zstackwoodpecker.test_state.TestStateDict', 'test_state.TestStateDict', ([], {}), '()\n', (483, 485), True, 'import zstackwoodpe...
""" Similar to eval_lead_baselines.py, but evaluates any non-specific baselines. """ from rouge_score.scoring import BootstrapAggregator from .utils import print_aggregate, evaluate_directory from ..baselines.baselines import get_rouge_scorer_with_cistem if __name__ == '__main__': fast = True aggregator = B...
[ "rouge_score.scoring.BootstrapAggregator" ]
[((319, 364), 'rouge_score.scoring.BootstrapAggregator', 'BootstrapAggregator', ([], {'confidence_interval': '(0.95)'}), '(confidence_interval=0.95)\n', (338, 364), False, 'from rouge_score.scoring import BootstrapAggregator\n')]
#!/usr/bin/env python3 from flask import Flask, request import yfinance as yf import os import signal import sys app = Flask(__name__) app_host = os.getenv("APP_HOST") or "0.0.0.0" app_port = os.getenv("APP_PORT") or "8000" @app.route("/download/<string:symbol>/<string:start>/<string:end>", methods=["GET"]) def down...
[ "yfinance.download", "flask.request.args.get", "flask.Flask", "yfinance.Ticker", "signal.signal", "os.getenv", "sys.exit" ]
[((120, 135), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (125, 135), False, 'from flask import Flask, request\n'), ((1465, 1509), 'signal.signal', 'signal.signal', (['signal.SIGINT', 'signal_handler'], {}), '(signal.SIGINT, signal_handler)\n', (1478, 1509), False, 'import signal\n'), ((147, 168), 'os.g...
import numpy import pickle import math from .preprocessor import preprocess from .config import train_bin_path, test_bin_path, validation_bin_path, utility_matrix_bin_path class LatentFactor: """ Latent Factor Model describing all the various factors required. """ def __init__(self, alpha=0.000...
[ "math.sqrt", "math.fabs", "numpy.zeros", "numpy.transpose", "numpy.mean", "pickle.load", "numpy.random.normal" ]
[((1107, 1141), 'numpy.mean', 'numpy.mean', (['self.all_ratings[:, 2]'], {}), '(self.all_ratings[:, 2])\n', (1117, 1141), False, 'import numpy\n'), ((1550, 1644), 'numpy.random.normal', 'numpy.random.normal', ([], {'scale': '(1.0 / self.num_factors)', 'size': '(self.num_users, self.num_factors)'}), '(scale=1.0 / self.n...
from typing import Tuple import sqlalchemy from sqlalchemy.orm.session import Session from sqlalchemy import select from database import db, bcrypt, bcrypt_loground class Account(db.Model): __tablename__ = 'tbl_account' id = db.Column(db.Integer, primary_key=True, autoincrement=True) email = db.Column(db....
[ "database.db.Column", "sqlalchemy.orm.session.Session", "database.bcrypt.generate_password_hash", "database.db.String" ]
[((235, 294), 'database.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)', 'autoincrement': '(True)'}), '(db.Integer, primary_key=True, autoincrement=True)\n', (244, 294), False, 'from database import db, bcrypt, bcrypt_loground\n'), ((431, 483), 'database.db.Column', 'db.Column', (['db.Boolean'], {'nu...
"""Autocomplete engines === Module description === This file contains starter code for the three different autocomplete engines you are writing for this assignment. """ from __future__ import annotations import csv from typing import Any, Dict, List, Optional, Tuple from .melody import Melody from .prefix_tree impor...
[ "csv.reader" ]
[((5203, 5222), 'csv.reader', 'csv.reader', (['csvfile'], {}), '(csvfile)\n', (5213, 5222), False, 'import csv\n'), ((9204, 9223), 'csv.reader', 'csv.reader', (['csvfile'], {}), '(csvfile)\n', (9214, 9223), False, 'import csv\n')]
#!/usr/bin/env python3 # # Copyright (c) 2021 Project CHIP Authors # # 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 applic...
[ "pandas.DataFrame", "memdf.Config.group_map", "io.StringIO", "logging.debug", "io.BytesIO", "memdf.Config.group_def", "memdf.Config", "logging.info", "memdf.util.github.Gh", "re.compile" ]
[((1029, 1057), 'memdf.Config.group_def', 'Config.group_def', (['"""database"""'], {}), "('database')\n", (1045, 1057), False, 'from memdf import Config, ConfigDescription\n'), ((1325, 1351), 'memdf.Config.group_def', 'Config.group_def', (['"""github"""'], {}), "('github')\n", (1341, 1351), False, 'from memdf import Co...
# coding: utf-8 from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('logger', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
[ "django.db.models.URLField", "django.db.migrations.CreateModel", "django.db.migrations.swappable_dependency", "django.db.models.OneToOneField", "django.db.models.ForeignKey", "django.db.models.CharField", "django.db.models.FloatField", "django.db.models.AutoField", "django.db.models.SmallIntegerFiel...
[((197, 254), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (228, 254), False, 'from django.db import migrations, models\n'), ((3066, 3177), 'django.db.migrations.CreateModel', 'migrations.CreateModel', ([], {'name': '...
from dtor.datasets.dataset_nominal import CTImageDataset dset = CTImageDataset("data/external/Label.csv", label="L_LTP_date", shape=(64, 64, 64), stride=(32, 32, 32)) # shape=(64,64,48), stride=(32, 32, 24))
[ "dtor.datasets.dataset_nominal.CTImageDataset" ]
[((65, 171), 'dtor.datasets.dataset_nominal.CTImageDataset', 'CTImageDataset', (['"""data/external/Label.csv"""'], {'label': '"""L_LTP_date"""', 'shape': '(64, 64, 64)', 'stride': '(32, 32, 32)'}), "('data/external/Label.csv', label='L_LTP_date', shape=(64, 64,\n 64), stride=(32, 32, 32))\n", (79, 171), False, 'from...
#!/usr/bin/env python3 # PYTHON_ARGCOMPLETE_OK import argcomplete import argparse import math # import os.path import numpy as np # import pandas as pd import artistools as at def addargs(parser): parser.add_argument('-inputfile', '-i', default='model.txt', help='Path of input file or ...
[ "artistools.inputmodel.get_modeldata", "argparse.ArgumentParser", "math.sqrt", "numpy.dot", "artistools.get_atomic_number", "argcomplete.autocomplete" ]
[((1501, 1579), 'artistools.inputmodel.get_modeldata', 'at.inputmodel.get_modeldata', (['args.inputfile'], {'get_abundances': 'args.getabundances'}), '(args.inputfile, get_abundances=args.getabundances)\n', (1528, 1579), True, 'import artistools as at\n'), ((1017, 1205), 'argparse.ArgumentParser', 'argparse.ArgumentPar...
from llvmlite import ir class Number(): def __init__(self, builder, module, value): self.builder = builder self.module = module self.value = value def eval(self): i = ir.Constant(ir.IntType(8), int(self.value)) return i class BinaryOp(): def __init__(self, builde...
[ "llvmlite.ir.GlobalVariable", "llvmlite.ir.IntType" ]
[((1205, 1260), 'llvmlite.ir.GlobalVariable', 'ir.GlobalVariable', (['self.module', 'c_fmt.type'], {'name': '"""fstr"""'}), "(self.module, c_fmt.type, name='fstr')\n", (1222, 1260), False, 'from llvmlite import ir\n'), ((222, 235), 'llvmlite.ir.IntType', 'ir.IntType', (['(8)'], {}), '(8)\n', (232, 235), False, 'from ll...
import logging from functools import wraps, partial import nose from foxylib.tools.log.foxylib_logger import FoxylibLogger from foxylib.tools.native.clazz.class_tool import cls2name class ProfileTool: LEVEL_DEFAULT = logging.INFO @classmethod def _timedelta2message(cls, td_duration): ms = td_du...
[ "functools.partial", "foxylib.tools.log.foxylib_logger.FoxylibLogger.func_level2logger", "time.time", "functools.wraps", "foxylib.tools.native.clazz.class_tool.cls2name" ]
[((523, 534), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (528, 534), False, 'from functools import wraps, partial\n'), ((1594, 1605), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (1599, 1605), False, 'from functools import wraps, partial\n'), ((591, 602), 'time.time', 'time.time', ([], {}), '()\...
import time import threading import os import subprocess import re import datetime import logging import typing import git import git.exc import filelock from .data import User, Function, Struct, Patch from .state import State from .errors import MetadataNotFoundError from .utils import is_py3 _l = logging.getLogger...
[ "threading.Thread", "subprocess.Popen", "os.path.join", "filelock.FileLock", "git.Repo", "time.time", "threading.Lock", "time.sleep", "git.Repo.clone_from", "re.search", "datetime.datetime.now", "logging.getLogger", "git.Repo.init" ]
[((303, 335), 'logging.getLogger', 'logging.getLogger', ([], {'name': '__name__'}), '(name=__name__)\n', (320, 335), False, 'import logging\n'), ((4076, 4132), 'filelock.FileLock', 'filelock.FileLock', (["(self.repo_root + '/.git/binsync.lock')"], {}), "(self.repo_root + '/.git/binsync.lock')\n", (4093, 4132), False, '...