code
stringlengths
31
1.05M
apis
list
extract_api
stringlengths
97
1.91M
from dataclasses import dataclass import typing import numpy as np from arrus.ops.operation import Operation @dataclass(frozen=True) class Pulse: """ A definition of the pulse that can be triggered by the us4r device. :param center_frequency: pulse center frequency [Hz] :param n_periods: number of pe...
[ "numpy.asarray", "numpy.sum", "dataclasses.dataclass" ]
[((112, 134), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (121, 134), False, 'from dataclasses import dataclass\n'), ((547, 569), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (556, 569), False, 'from dataclasses import dataclass\n'), ((201...
import numpy as np def evaluate_voxel_prediction(preds, gt, thresh): preds_occupy = preds[:, :, :, 1] >= thresh diff = np.sum(np.logical_xor(preds_occupy, gt[:, :, :, 1])) intersection = np.sum(np.logical_and(preds_occupy, gt[:, :, :, 1])) union = np.sum(np.logical_or(preds_occupy, gt[:, :, :, 1])) ...
[ "numpy.logical_and", "numpy.logical_not", "numpy.logical_xor", "numpy.array", "numpy.logical_or" ]
[((513, 566), 'numpy.array', 'np.array', (['[diff, intersection, union, num_fp, num_fn]'], {}), '([diff, intersection, union, num_fp, num_fn])\n', (521, 566), True, 'import numpy as np\n'), ((136, 180), 'numpy.logical_xor', 'np.logical_xor', (['preds_occupy', 'gt[:, :, :, 1]'], {}), '(preds_occupy, gt[:, :, :, 1])\n', ...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
[ "matplotlib.pyplot.tight_layout", "matplotlib.rc", "caltrain.run_calibration.estimate_ece", "numpy.random.seed", "os.path.join", "os.makedirs", "numpy.abs", "absl.flags.DEFINE_string", "matplotlib.use", "absl.app.run", "matplotlib.pyplot.subplots" ]
[((806, 827), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (820, 827), False, 'import matplotlib\n'), ((848, 877), 'matplotlib.rc', 'matplotlib.rc', (['"""font"""'], {}), "('font', **font)\n", (861, 877), False, 'import matplotlib\n'), ((899, 977), 'absl.flags.DEFINE_string', 'flags.DEFINE_stri...
# -*- coding: utf-8 -*- """Random Interval Spectral Forest (RISE). # TODO move or remove RandomIntervalSpectralForest in v0.10.0 This classifier has been refactored to have the correct name. The incorrectly named algorithm will be depreciated. """ __author__ = ["TonyBagnall", "<NAME>"] __all__ = [ "RandomInterval...
[ "numpy.fft.rfft", "numpy.abs", "numpy.sum", "numpy.argmax", "numpy.empty", "numpy.iinfo", "sklearn.tree.DecisionTreeClassifier", "numba.prange", "sklearn.base.clone", "numpy.unique", "numpy.pad", "sktime.utils.validation.panel.check_X", "sklearn.ensemble._base._partition_estimators", "nump...
[((5121, 5327), 'deprecated.sphinx.deprecated', 'deprecated', ([], {'version': '"""0.8.1"""', 'reason': '"""RandomIntervalSpectralForest will be moved or removed in v0.10.0, to be replaced by the correctly named RandomIntervalSpectralEnsemble"""', 'category': 'FutureWarning'}), "(version='0.8.1', reason=\n 'RandomIn...
#!/usr/bin/env python # --------Include modules--------------- from copy import copy import rospy from visualization_msgs.msg import Marker from geometry_msgs.msg import Point from nav_msgs.msg import OccupancyGrid from geometry_msgs.msg import PointStamped import tf from numpy import array, vstack, delete from functi...
[ "rospy.Subscriber", "rospy.Time", "rospy.Duration", "rospy.Time.now", "rospy.Rate", "rospy.is_shutdown", "rospy.init_node", "rrt_exploration.msg.PointArray", "functions.gridValue", "nav_msgs.msg.OccupancyGrid", "sklearn.cluster.MeanShift", "rospy.loginfo", "visualization_msgs.msg.Marker", ...
[((505, 520), 'nav_msgs.msg.OccupancyGrid', 'OccupancyGrid', ([], {}), '()\n', (518, 520), False, 'from nav_msgs.msg import OccupancyGrid\n'), ((1406, 1448), 'rospy.init_node', 'rospy.init_node', (['"""filter"""'], {'anonymous': '(False)'}), "('filter', anonymous=False)\n", (1421, 1448), False, 'import rospy\n'), ((149...
""" Conditional VAE """ from __future__ import absolute_import from __future__ import print_function from six.moves import xrange import numpy as np from keras import backend as K from keras import optimizers from keras import objectives from keras.layers import Input, Lambda, Concatenate, Reshape from keras.models...
[ "numpy.expand_dims", "keras.models.Model", "keras.layers.Concatenate", "numpy.tile", "numpy.random.normal", "keras.layers.Input", "keras.layers.Reshape" ]
[((1795, 1841), 'keras.layers.Input', 'Input', ([], {'shape': '(self.max_seq_length, self.x_dim)'}), '(shape=(self.max_seq_length, self.x_dim))\n', (1800, 1841), False, 'from keras.layers import Input, Lambda, Concatenate, Reshape\n'), ((1853, 1899), 'keras.layers.Input', 'Input', ([], {'shape': '(self.max_seq_length, ...
import sys sys.path.insert(1, "../../../") import h2o import numpy as np import random import math import scipy.special def expr_math_ops(ip,port): sin_cos_tan_atan_sinh_cosh_tanh_asinh_data = [[random.uniform(-10,10) for r in range(10)] for c in range(10)] asin_acos_atanh_data = [[random.uniform(-1...
[ "numpy.floor", "numpy.arccosh", "numpy.sin", "numpy.exp", "h2o.run_test", "numpy.trunc", "numpy.arctanh", "numpy.arcsin", "numpy.expm1", "math.gamma", "numpy.tan", "numpy.arcsinh", "numpy.fabs", "numpy.log10", "numpy.arccos", "numpy.log1p", "numpy.tanh", "numpy.ceil", "numpy.log2...
[((11, 42), 'sys.path.insert', 'sys.path.insert', (['(1)', '"""../../../"""'], {}), "(1, '../../../')\n", (26, 42), False, 'import sys\n'), ((546, 613), 'h2o.H2OFrame', 'h2o.H2OFrame', ([], {'python_obj': 'sin_cos_tan_atan_sinh_cosh_tanh_asinh_data'}), '(python_obj=sin_cos_tan_atan_sinh_cosh_tanh_asinh_data)\n', (558, ...
# --- For cmd.py from __future__ import division, print_function import os import subprocess import multiprocessing import collections import glob import pandas as pd import numpy as np import distutils.dir_util import shutil import stat import re def spanwiseBD(tsAvg,vr,R,postprofile=None, IR=None): # --- Extr...
[ "numpy.trapz", "numpy.ones" ]
[((8850, 8879), 'numpy.trapz', 'np.trapz', (['(vr_bar * Ct)', 'vr_bar'], {}), '(vr_bar * Ct, vr_bar)\n', (8858, 8879), True, 'import numpy as np\n'), ((8915, 8931), 'numpy.ones', 'np.ones', (['r.shape'], {}), '(r.shape)\n', (8922, 8931), True, 'import numpy as np\n')]
# -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by <NAME> # -------------------------------------------------------- """ Convert depreciated VGG16 snapshots to the ones that support tensorflow format It will check...
[ "numpy.random.seed", "argparse.ArgumentParser", "numpy.allclose", "tensorflow.ConfigProto", "tensorflow.global_variables", "lib.nets.vgg16.vgg16", "tensorflow.Variable", "pprint.pprint", "lib.model.config.cfg_from_list", "tensorflow.multiply", "os.path.join", "lib.datasets.factory.get_imdb", ...
[((1219, 1306), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Convert an old VGG16 snapshot to new format"""'}), "(description=\n 'Convert an old VGG16 snapshot to new format')\n", (1242, 1306), False, 'import argparse\n'), ((4265, 4306), 'tensorflow.ConfigProto', 'tf.ConfigProto', (...
import numpy as np from nnweaver import * def test_regularizers(): nn = NN(2) nn.add_layer(Layer(1)) reg = L1L2Regularizer(1, 0) nn.layers[0].weights = np.matrix([[1, 0]]) nn.layers[0].bias = np.matrix([[0]]) assert reg(nn) == 1 nn.layers[0].weights = np.matrix([[1, 0], [0, 0]]) nn.l...
[ "numpy.matrix", "numpy.testing.assert_array_equal" ]
[((172, 191), 'numpy.matrix', 'np.matrix', (['[[1, 0]]'], {}), '([[1, 0]])\n', (181, 191), True, 'import numpy as np\n'), ((216, 232), 'numpy.matrix', 'np.matrix', (['[[0]]'], {}), '([[0]])\n', (225, 232), True, 'import numpy as np\n'), ((284, 311), 'numpy.matrix', 'np.matrix', (['[[1, 0], [0, 0]]'], {}), '([[1, 0], [0...
"""Functions to plot EEG sensor montages or digitizer montages.""" from copy import deepcopy import numpy as np from ..utils import check_version, logger, _check_option from . import plot_sensors def plot_montage(montage, scale_factor=20, show_names=True, kind='topomap', show=True): """Plot a mon...
[ "scipy.spatial.distance.cdist", "numpy.tril_indices", "copy.deepcopy", "numpy.setdiff1d", "numpy.isclose", "numpy.arange" ]
[((1456, 1487), 'scipy.spatial.distance.cdist', 'cdist', (['montage.pos', 'montage.pos'], {}), '(montage.pos, montage.pos)\n', (1461, 1487), False, 'from scipy.spatial.distance import cdist\n'), ((1578, 1609), 'numpy.tril_indices', 'np.tril_indices', (['dists.shape[0]'], {}), '(dists.shape[0])\n', (1593, 1609), True, '...
# -*- coding: UTF-8 -*- """ This file is part of pyCMBS. (c) 2012- <NAME> For COPYING and LICENSE details, please refer to the LICENSE file """ # good introduction into packing can be found in # https://python-packaging-user-guide.readthedocs.org/en/latest/index.html from setuptools import setup from distutils.core ...
[ "os.path.realpath", "numpy.get_include", "setuptools.find_packages" ]
[((2747, 2762), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (2760, 2762), False, 'from setuptools import find_packages\n'), ((1045, 1071), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (1061, 1071), False, 'import os\n'), ((2405, 2421), 'numpy.get_include', 'np.get_inclu...
import torch import torch.nn as nn import os import numpy as np from torchvision.datasets import ImageFolder from scipy import interp import matplotlib.pyplot as plt from itertools import cycle from sklearn.metrics import roc_curve, auc, f1_score, precision_recall_curve, average_precision_score os.environ['CUDA_VISIBL...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "torch.device", "itertools.cycle", "os.path.join", "numpy.zeros_like", "torch.utils.data.DataLoader", "torch.load", "torch.zeros", "matplotlib.pyplot.show", "matplotlib.pyplot.ylim", "matplotlib.pyplot.legend", "torchvision.datasets.Imag...
[((701, 739), 'os.path.join', 'os.path.join', (['data_root', '"""test_images"""'], {}), "(data_root, 'test_images')\n", (713, 739), False, 'import os\n'), ((995, 1042), 'torchvision.datasets.ImageFolder', 'ImageFolder', (['test_dir'], {'transform': 'transform_test'}), '(test_dir, transform=transform_test)\n', (1006, 10...
#******************************************************************************* # Copyright 2014-2020 Intel Corporation # All Rights Reserved. # # This software is licensed under the Apache License, Version 2.0 (the # "License"), the following terms apply: # # You may not use this file except in compliance with the Li...
[ "numpy.ascontiguousarray", "daal4py.low_order_moments", "sys.path.insert", "stream.read_next", "daal4py.oneapi.sycl_context", "os.path.join" ]
[((1083, 1107), 'sys.path.insert', 'sys.path.insert', (['(0)', '""".."""'], {}), "(0, '..')\n", (1098, 1107), False, 'import sys\n'), ((1645, 1707), 'os.path.join', 'os.path.join', (['""".."""', '"""data"""', '"""batch"""', '"""covcormoments_dense.csv"""'], {}), "('..', 'data', 'batch', 'covcormoments_dense.csv')\n", (...
from __future__ import division import numpy as np import argparse def evaluate_explanation_score(x, y, w, h, saliency_map): """ :param x: normalized coordinate x int :param y: normalized coordinate y int :param w: normalized coordinate w int :param h: normalized coordinate h int :param salie...
[ "numpy.zeros_like", "numpy.multiply", "argparse.ArgumentParser" ]
[((374, 401), 'numpy.zeros_like', 'np.zeros_like', (['saliency_map'], {}), '(saliency_map)\n', (387, 401), True, 'import numpy as np\n'), ((643, 668), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (666, 668), False, 'import argparse\n'), ((560, 591), 'numpy.multiply', 'np.multiply', (['bbox', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: mAP.py # Copy from: # https://github.com/huanghoujing/person-reid-triplet-loss-baseline/blob/master/tri_loss/utils/metric.py#L107 import sklearn from sklearn.metrics import average_precision_score import numpy as np def mean_ap( distmat, query_ids=None, ...
[ "numpy.sum", "numpy.zeros", "numpy.argsort", "numpy.any", "sklearn.metrics.average_precision_score" ]
[((2538, 2565), 'numpy.argsort', 'np.argsort', (['distmat'], {'axis': '(1)'}), '(distmat, axis=1)\n', (2548, 2565), True, 'import numpy as np\n'), ((2667, 2678), 'numpy.zeros', 'np.zeros', (['m'], {}), '(m)\n', (2675, 2678), True, 'import numpy as np\n'), ((2698, 2709), 'numpy.zeros', 'np.zeros', (['m'], {}), '(m)\n', ...
import PIL.Image import random import numpy as np class RandomResizeLong(): def __init__(self, min_long, max_long): self.min_long = min_long self.max_long = max_long def __call__(self, img): target_long = random.randint(self.min_long, self.max_long) w, h = img.size ...
[ "random.randint", "numpy.copy", "numpy.transpose", "numpy.zeros", "numpy.ones", "numpy.fliplr", "random.randrange", "pydensecrf.utils.unary_from_softmax", "numpy.array", "random.getrandbits", "pydensecrf.densecrf.DenseCRF2D", "numpy.ascontiguousarray", "cv2.resize" ]
[((5009, 5037), 'numpy.transpose', 'np.transpose', (['img', '(2, 0, 1)'], {}), '(img, (2, 0, 1))\n', (5021, 5037), True, 'import numpy as np\n'), ((5565, 5596), 'pydensecrf.densecrf.DenseCRF2D', 'dcrf.DenseCRF2D', (['w', 'h', 'n_labels'], {}), '(w, h, n_labels)\n', (5580, 5596), True, 'import pydensecrf.densecrf as dcr...
import pandas as pd import numpy as np from pathlib import Path from sklearn.manifold import TSNE from sklearn.cluster import KMeans import seaborn as sns import matplotlib.pyplot as plt import configparser from dateutil.parser import parse import os from sklearn.metrics import roc_auc_score, f1_score, precision_score,...
[ "matplotlib.pyplot.title", "numpy.isin", "pandas.read_csv", "logging.getLogger", "sklearn.metrics.classification_report", "matplotlib.pyplot.figure", "pathlib.Path", "sklearn.metrics.f1_score", "os.path.join", "pandas.DataFrame", "os.path.abspath", "sklearn.cluster.KMeans", "matplotlib.pyplo...
[((404, 431), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (421, 431), False, 'import logging\n'), ((1178, 1200), 'pandas.DataFrame', 'pd.DataFrame', (['tag_dict'], {}), '(tag_dict)\n', (1190, 1200), True, 'import pandas as pd\n'), ((1579, 1616), 'pandas.concat', 'pd.concat', (['[train_...
import datetime import math import os import fire import logging import numpy as np import matplotlib.pyplot as plt import tensorflow as tf from tensorflow.python.keras.callbacks import ModelCheckpoint from fastprogress.fastprogress import master_bar, progress_bar from mozhi.bin.urn.datasets_urn import DATASET_OBJ_MA...
[ "matplotlib.pyplot.title", "numpy.argmax", "tensorflow.keras.metrics.Mean", "fastprogress.fastprogress.progress_bar", "matplotlib.pyplot.style.use", "matplotlib.pyplot.figure", "mozhi.utils.pretty_print.print_error", "tensorflow.nn.softmax", "tensorflow.summary.trace_on", "seqeval.metrics.f1_score...
[((865, 888), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""ggplot"""'], {}), "('ggplot')\n", (878, 888), True, 'import matplotlib.pyplot as plt\n'), ((1103, 1130), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(12, 5)'}), '(figsize=(12, 5))\n', (1113, 1130), True, 'import matplotlib.pyplot as plt...
"""Process simtel data for the training of the estimator models.""" import numpy as np import astropy.units as u from astropy.coordinates.angle_utilities import angular_separation from sys import exit as sys_exit from glob import glob import signal import tables as tb import pandas as pd from tqdm import tqdm from ct...
[ "numpy.sum", "tables.Float32Col", "numpy.mean", "ctapipe.utils.CutFlow", "numpy.std", "tables.Int32Col", "tables.BoolCol", "protopipe.pipeline.utils.SignalHandler", "astropy.coordinates.angle_utilities.angular_separation", "protopipe.pipeline.utils.make_argparser", "signal.signal", "tables.ope...
[((701, 717), 'protopipe.pipeline.utils.make_argparser', 'make_argparser', ([], {}), '()\n', (715, 717), False, 'from protopipe.pipeline.utils import make_argparser, prod5N_array, prod3b_array, str2bool, SignalHandler, bcolors\n'), ((1679, 1708), 'protopipe.pipeline.io.load_config', 'load_config', (['args.config_file']...
# # Copyright (c) 2019, Neptune Labs Sp. z o.o. # # 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 agr...
[ "math.isinf", "neptune.exceptions.NotAFile", "os.path.isfile", "glob.glob", "numpy.unique", "os.path.abspath", "neptune.api_exceptions.ConnectionLost", "pandas.merge", "os.path.exists", "math.isnan", "git.Repo", "time.sleep", "neptune.api_exceptions.ServerError", "neptune.api_exceptions.SS...
[((1216, 1243), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1233, 1243), False, 'import logging\n'), ((1731, 1756), 'neptune.exceptions.InvalidNotebookPath', 'InvalidNotebookPath', (['path'], {}), '(path)\n', (1750, 1756), False, 'from neptune.exceptions import InvalidNotebookPath, Fi...
""" Production of corner plots. Modified from a fork of https://github.com/dfm/corner.py . Original code: Copyright (c) 2013-2020 <NAME> Full license: https://github.com/dfm/corner.py/blob/main/LICENSE This modified version: - Add the observed quantities to the corner plots - Colours for the plots - Add KDE to non...
[ "numpy.amin", "numpy.shape", "numpy.argsort", "numpy.arange", "matplotlib.pyplot.gca", "matplotlib.ticker.ScalarFormatter", "matplotlib.colors.LinearSegmentedColormap.from_list", "numpy.atleast_2d", "logging.warning", "scipy.ndimage.gaussian_filter", "matplotlib.ticker.MaxNLocator", "numpy.tra...
[((702, 723), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (716, 723), False, 'import matplotlib\n'), ((5385, 5402), 'numpy.atleast_1d', 'np.atleast_1d', (['xs'], {}), '(xs)\n', (5398, 5402), True, 'import numpy as np\n'), ((7555, 7593), 'matplotlib.pyplot.subplots', 'plt.subplots', (['K', 'K']...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import pandas as pd import numpy as np ## it can be more general allowing the user to pass ## the name of the columns def getMcSnowTable(mcSnowPath): """ Read McSnow output table Parameters ---------- mc...
[ "pandas.read_csv", "numpy.ones_like" ]
[((804, 853), 'pandas.read_csv', 'pd.read_csv', (['mcSnowPath'], {'header': 'None', 'names': 'names'}), '(mcSnowPath, header=None, names=names)\n', (815, 853), True, 'import pandas as pd\n'), ((1476, 1505), 'numpy.ones_like', 'np.ones_like', (["mcTable['time']"], {}), "(mcTable['time'])\n", (1488, 1505), True, 'import ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Oct 11 15:50:17 2017 https://github.com/ChangdeDu/DGMM @author: duchangde """ import os os.environ['THEANO_FLAGS'] = "device=gpu" import numpy as np import matplotlib.pyplot as plt from scipy.io import savemat, loadmat from sklearn import preproc...
[ "tensorflow.python.framework.ops.disable_eager_execution", "numpy.moveaxis", "numpy.random.seed", "tensorflow.keras.layers.Reshape", "scipy.io.loadmat", "tensorflow.keras.layers.Dense", "sklearn.preprocessing.MinMaxScaler", "numpy.ones", "matplotlib.pyplot.figure", "numpy.exp", "numpy.random.nor...
[((766, 791), 'tensorflow.python.framework.ops.disable_eager_execution', 'disable_eager_execution', ([], {}), '()\n', (789, 791), False, 'from tensorflow.python.framework.ops import disable_eager_execution\n'), ((829, 857), 'scipy.io.loadmat', 'loadmat', (['"""digit69_28x28.mat"""'], {}), "('digit69_28x28.mat')\n", (83...
import datetime import os import warnings import xml.etree.ElementTree as ET import zipfile import numpy as np import shapely import isce3 from nisar.workflows.stage_dem import check_dateline from s1reader.s1_burst_slc import Doppler, Sentinel1BurstSlc # TODO evaluate if it make sense to combine below into a class d...
[ "numpy.empty", "os.path.isfile", "numpy.arange", "numpy.unique", "shapely.geometry.Point", "warnings.simplefilter", "os.path.exists", "isce3.core.Geocent", "nisar.workflows.stage_dem.check_dateline", "datetime.timedelta", "s1reader.s1_burst_slc.Doppler", "isce3.core.Orbit", "xml.etree.Elemen...
[((827, 865), 'datetime.datetime.strptime', 'datetime.datetime.strptime', (['t_str', 'fmt'], {}), '(t_str, fmt)\n', (853, 865), False, 'import datetime\n'), ((1560, 1597), 'isce3.core.Poly1d', 'isce3.core.Poly1d', (['coeffs', 'r0', 'half_c'], {}), '(coeffs, r0, half_c)\n', (1577, 1597), False, 'import isce3\n'), ((4634...
import os import time import numpy as np from scipy import ndimage, misc import numba as nb from config.load_yaml import configs, configs_name from sklearn.mixture import GaussianMixture from utils import visualization def get_packet_events(event_txt, mode='TimeFixed'): ''' :param event_txt: The input events...
[ "scipy.ndimage.binary_dilation", "numpy.sum", "numpy.zeros_like", "os.path.basename", "numpy.unique", "numpy.zeros", "numpy.genfromtxt", "sklearn.mixture.GaussianMixture", "numpy.sort", "numpy.append", "numpy.where", "numpy.array", "numpy.loadtxt", "numpy.linalg.norm", "numpy.min", "nu...
[((2650, 2674), 'numpy.genfromtxt', 'np.genfromtxt', (['event_txt'], {}), '(event_txt)\n', (2663, 2674), True, 'import numpy as np\n'), ((3693, 3720), 'numpy.array', 'np.array', (['value'], {'dtype': 'dtyp'}), '(value, dtype=dtyp)\n', (3701, 3720), True, 'import numpy as np\n'), ((3738, 3770), 'numpy.sort', 'np.sort', ...
#! /usr/bin/python ''' Module of utility functions to drive ATP from Python and extract results At this time, only steady-state result extraction is supported. ''' from __future__ import print_function, unicode_literals from math import sqrt import pickle import lineZ import numpy as np from numpy.linalg import inv...
[ "numpy.absolute", "lineZ.ph_to_seq_m", "pickle.dump", "numpy.abs", "numpy.angle", "text_data_cards.DataCard", "numpy.imag", "os.path.join", "text_data_cards.DataCardOptional", "codecs.open", "lineZ.ABCD_to_ZY", "os.path.dirname", "numpy.bmat", "lineZ.ph_to_seq_v", "numpy.real", "shutil...
[((23216, 23277), 'text_data_cards.DataCard', 'tdc.DataCard', (['"""A2, A78"""', "['C ', 'Comment']"], {'fixed_fields': '(0,)'}), "('A2, A78', ['C ', 'Comment'], fixed_fields=(0,))\n", (23228, 23277), True, 'import text_data_cards as tdc\n'), ((23293, 23358), 'text_data_cards.DataCard', 'tdc.DataCard', (['"""A9, A71"""...
import torch.nn as nn from functools import partial import torch # NOQA from clab.torch.models.output_shape_for import OutputShapeFor from collections import OrderedDict class Conv3DBlock(nn.Module): """ >>> block = Conv3DBlock(in_channels=64, out_channels=128, n_conv=2) >>> block.output_shape_for([1, 3,...
[ "functools.partial", "torch.nn.Conv3d", "clab.torch.models.output_shape_for.OutputShapeFor", "torch.nn.Softmax", "torch.nn.Linear", "collections.OrderedDict", "torch.nn.MaxPool3d", "numpy.prod" ]
[((946, 1003), 'functools.partial', 'partial', (['nn.LeakyReLU'], {'negative_slope': '(0.01)', 'inplace': '(False)'}), '(nn.LeakyReLU, negative_slope=0.01, inplace=False)\n', (953, 1003), False, 'from functools import partial\n'), ((2414, 2471), 'functools.partial', 'partial', (['nn.LeakyReLU'], {'negative_slope': '(0....
''' ## Test ## # Test a trained DQN. This can be run alongside training by running 'run_every_new_ckpt.sh'. @author: <NAME> (<EMAIL>) ''' import os import sys import argparse import gym import tensorflow as tf import numpy as np import scipy.stats as ss from train import get_train_args from utils.util...
[ "sys.stdout.write", "utils.network.DeepQNetwork", "numpy.random.seed", "argparse.ArgumentParser", "tensorflow.ConfigProto", "tensorflow.Variable", "sys.stdout.flush", "numpy.mean", "tensorflow.train.latest_checkpoint", "numpy.random.randint", "utils.utils.preprocess_image", "os.path.exists", ...
[((515, 540), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (538, 540), False, 'import argparse\n'), ((2670, 2688), 'gym.make', 'gym.make', (['args.env'], {}), '(args.env)\n', (2678, 2688), False, 'import gym\n'), ((2814, 2846), 'numpy.random.seed', 'np.random.seed', (['args.random_seed'], {})...
''' 在第七课的基础上,增加了TensorBoard功能。 ''' #import tensorflow as tf import tensorflow.compat.v1 as tf import numpy as np import matplotlib.pyplot as plt ''' 定义网络结构 输入的参数: 该层输入,输入数据的大小,输出数据的大小,以及使用的激活函数,激活函数在默认情况下是None,即不适用激活函数 ''' def add_layer(inputs,in_size,out_size,activation_function=None): with tf.name_scope("layer")...
[ "tensorflow.compat.v1.square", "tensorflow.compat.v1.zeros", "matplotlib.pyplot.show", "tensorflow.compat.v1.name_scope", "tensorflow.compat.v1.placeholder", "numpy.square", "tensorflow.compat.v1.train.GradientDescentOptimizer", "tensorflow.compat.v1.matmul", "matplotlib.pyplot.ion", "matplotlib.p...
[((1865, 1877), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (1875, 1877), True, 'import matplotlib.pyplot as plt\n'), ((1936, 1945), 'matplotlib.pyplot.ion', 'plt.ion', ([], {}), '()\n', (1943, 1945), True, 'import matplotlib.pyplot as plt\n'), ((1946, 1967), 'matplotlib.pyplot.show', 'plt.show', ([], {...
import tensorflow as tf import matplotlib.pyplot as plt import numpy as np import os from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten, Reshape from tensorflow.keras.layers import Conv2D, MaxPooling2D, SpatialDropout2D from data_loader import load_3D,...
[ "matplotlib.pyplot.subplot", "tensorflow.keras.layers.SpatialDropout2D", "matplotlib.pyplot.show", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.Reshape", "tensorflow.keras.layers.Dense", "matplotlib.pyplot.imshow", "os.path.dirname", "tensorflow.keras.callbacks.ModelCheckpoint", "num...
[((872, 916), 'data_loader.load_3D', 'load_3D', (['train_map_count', 'map_size', 'map_size'], {}), '(train_map_count, map_size, map_size)\n', (879, 916), False, 'from data_loader import load_3D, load_2D\n'), ((947, 1012), 'data_loader.load_3D', 'load_3D', (['test_map_count', 'map_size', 'map_size', '"""test_created_dat...
import random import operator import math import numpy import numpy as np import csv import datetime import os import time # deap # pip install deap from deap import base, creator, gp, tools, algorithms # keras # pip install keras import tensorflow import keras from keras.models import Sequential, clone_model import k...
[ "csv.reader", "deap.base.Toolbox", "random.uniform", "sklearn.model_selection.train_test_split", "deap.tools.MultiStatistics", "datetime.date.today", "deap.tools.Statistics", "random.random", "deap.creator.create", "numpy.mean", "numpy.array", "keras.layers.Dense", "keras.models.Sequential",...
[((1116, 1152), 'csv.reader', 'csv.reader', (['data_file'], {'delimiter': '""","""'}), "(data_file, delimiter=',')\n", (1126, 1152), False, 'import csv\n'), ((2227, 2238), 'numpy.array', 'np.array', (['X'], {}), '(X)\n', (2235, 2238), True, 'import numpy as np\n'), ((2243, 2254), 'numpy.array', 'np.array', (['y'], {}),...
# # devon # www.fabiocrameri.ch/colourmaps from matplotlib.colors import LinearSegmentedColormap cm_data = [[0.17103, 0.1004, 0.29978], [0.17087, 0.10414, 0.30337], [0.17068, 0.10786, 0.30699], [0.17046, 0.11159, 0.31061], ...
[ "matplotlib.colors.LinearSegmentedColormap.from_list", "numpy.linspace", "matplotlib.pyplot.show", "viscm.viscm" ]
[((11858, 11909), 'matplotlib.colors.LinearSegmentedColormap.from_list', 'LinearSegmentedColormap.from_list', (['"""devon"""', 'cm_data'], {}), "('devon', cm_data)\n", (11891, 11909), False, 'from matplotlib.colors import LinearSegmentedColormap\n'), ((12397, 12407), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\...
#!/usr/bin/env python import os import time import re import numpy from pyscf import lib from pyscf import gto, scf, dft, mcscf, mp, cc, lo def sort_mo(casscf, idx, mo_coeff): mol = casscf.mol corth = lo.orth.orth_ao(mol) casorb = corth[:,idx] nmo = mo_coeff.shape[1] ncore = casscf.ncore ncas ...
[ "pyscf.lib.logger.Logger", "pyscf.lo.orth.orth_ao", "pyscf.gto.Mole", "pyscf.dft.RKS", "pyscf.scf.density_fit", "numpy.einsum", "pyscf.cc.CCSD", "pyscf.mcscf.CASSCF", "numpy.hstack", "time.clock", "time.time", "numpy.argsort", "pyscf.scf.RHF", "re.search", "pyscf.mp.MP2" ]
[((920, 930), 'pyscf.gto.Mole', 'gto.Mole', ([], {}), '()\n', (928, 930), False, 'from pyscf import gto, scf, dft, mcscf, mp, cc, lo\n'), ((953, 985), 'pyscf.lib.logger.Logger', 'lib.logger.Logger', (['mol.stdout', '(5)'], {}), '(mol.stdout, 5)\n', (970, 985), False, 'from pyscf import lib\n'), ((210, 230), 'pyscf.lo.o...
# -*- coding: utf-8 -*- """ Created on Mon Apr 16 00:56:03 2018 @author: Shreyans """ from sklearn.tree import DecisionTreeClassifier import numpy as np import pandas as pd train_features = np.load("../data/train_features.npy") test_features = np.load("../data/test_features.npy") train_data = pd.read_csv("../data/m...
[ "pandas.read_csv", "numpy.load", "sklearn.tree.DecisionTreeClassifier" ]
[((193, 230), 'numpy.load', 'np.load', (['"""../data/train_features.npy"""'], {}), "('../data/train_features.npy')\n", (200, 230), True, 'import numpy as np\n'), ((247, 283), 'numpy.load', 'np.load', (['"""../data/test_features.npy"""'], {}), "('../data/test_features.npy')\n", (254, 283), True, 'import numpy as np\n'),...
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # import os import io from logging import getLogger import numpy as np import torch from scipy.stats import spearmanr MONOLINGU...
[ "os.path.basename", "os.path.isdir", "scipy.stats.spearmanr", "os.path.exists", "os.path.isfile", "numpy.linalg.norm", "io.open", "numpy.vstack", "os.path.join", "os.listdir", "logging.getLogger", "torch.from_numpy" ]
[((415, 426), 'logging.getLogger', 'getLogger', ([], {}), '()\n', (424, 426), False, 'from logging import getLogger\n'), ((2829, 2874), 'os.path.join', 'os.path.join', (['MONOLINGUAL_EVAL_PATH', 'language'], {}), '(MONOLINGUAL_EVAL_PATH, language)\n', (2841, 2874), False, 'import os\n'), ((3741, 3786), 'os.path.join', ...
## test_defense.py -- test defense ## ## Copyright (C) 2017, <NAME> <<EMAIL>>. ## ## This program is licenced under the BSD 2-Clause licence, ## contained in the LICENCE file in this directory. # Load external module: MagNet import sys, os project_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ...
[ "sys.path.append", "externals.MagNet.worker.DBDetector", "os.path.abspath", "externals.MagNet.worker.AEDetector", "numpy.sum", "keras.activations.softmax", "keras.models.Model", "externals.MagNet.setup_cifar.CIFAR", "externals.MagNet.worker.SimpleReformer", "keras.models.Sequential", "externals....
[((320, 348), 'sys.path.append', 'sys.path.append', (['project_dir'], {}), '(project_dir)\n', (335, 348), False, 'import sys, os\n'), ((292, 317), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (307, 317), False, 'import os\n'), ((1004, 1078), 'keras.models.Model', 'Model', ([], {'inputs': 'm...
""" test_physics_cross_sections.py Author: <NAME> Affiliation: University of Colorado at Boulder Created on: Mon Apr 22 10:54:18 2013 Description: """ import numpy as np import matplotlib.pyplot as pl from ares.physics.CrossSections import * def test(): E = np.logspace(np.log10(13.6), 4) sigma = Ph...
[ "matplotlib.pyplot.annotate", "matplotlib.pyplot.close", "matplotlib.pyplot.legend", "matplotlib.pyplot.ylabel", "numpy.log10", "matplotlib.pyplot.xlabel" ]
[((768, 792), 'matplotlib.pyplot.legend', 'pl.legend', ([], {'frameon': '(False)'}), '(frameon=False)\n', (777, 792), True, 'import matplotlib.pyplot as pl\n'), ((802, 840), 'matplotlib.pyplot.xlabel', 'pl.xlabel', (['"""$h\\\\nu \\\\ (\\\\mathrm{eV})$"""'], {}), "('$h\\\\nu \\\\ (\\\\mathrm{eV})$')\n", (811, 840), Tru...
import numpy as np import os import ntpath def fill_mesh(mesh2fill, file: str, opt): load_path = get_mesh_path(file, opt.num_aug) if os.path.exists(load_path): mesh_data = np.load(load_path, encoding='latin1', allow_pickle=True) else: mesh_data = from_scratch(file, opt) np.savez_co...
[ "numpy.load", "numpy.sum", "numpy.savez_compressed", "numpy.mean", "numpy.linalg.norm", "numpy.random.randint", "numpy.random.normal", "os.path.join", "numpy.std", "os.path.dirname", "os.path.exists", "ntpath.split", "numpy.random.choice", "numpy.arccos", "os.path.basename", "numpy.asa...
[((143, 168), 'os.path.exists', 'os.path.exists', (['load_path'], {}), '(load_path)\n', (157, 168), False, 'import os\n'), ((1325, 1347), 'os.path.splitext', 'os.path.splitext', (['file'], {}), '(file)\n', (1341, 1347), False, 'import os\n'), ((1363, 1388), 'os.path.dirname', 'os.path.dirname', (['filename'], {}), '(fi...
import streamlit as st import pickle import numpy as np import os import matplotlib.pyplot as plt import pandas as pd st.set_option('deprecation.showPyplotGlobalUse', False) model = pickle.load(open(os.path.join(os.getcwd(), 'model', 'mlp_model.pkl'), 'rb')) # output = [0, 0, 2, 3, 4, 3, 1, 5, 3, 5, 5, 4, 3, 4, 4, 5]...
[ "streamlit.markdown", "streamlit.set_option", "os.getcwd", "streamlit.radio", "streamlit.button", "numpy.array", "streamlit.success" ]
[((120, 175), 'streamlit.set_option', 'st.set_option', (['"""deprecation.showPyplotGlobalUse"""', '(False)'], {}), "('deprecation.showPyplotGlobalUse', False)\n", (133, 175), True, 'import streamlit as st\n'), ((431, 451), 'numpy.array', 'np.array', (['evaluation'], {}), '(evaluation)\n', (439, 451), True, 'import nump...
from __future__ import print_function import sys sys.path.insert(0, 'src') import transform, numpy as np, vgg, pdb, os import scipy.misc import tensorflow as tf from utils import save_img, get_img, exists, list_files, check_version from argparse import ArgumentParser from collections import defaultdict import ...
[ "utils.list_files", "argparse.ArgumentParser", "transform.net", "numpy.clip", "collections.defaultdict", "tensorflow.ConfigProto", "os.path.join", "utils.exists", "utils.check_version", "os.path.exists", "tensorflow.placeholder", "numpy.fromstring", "tensorflow.train.get_checkpoint_state", ...
[((51, 76), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""src"""'], {}), "(0, 'src')\n", (66, 76), False, 'import sys\n'), ((1050, 1146), 'subprocess.Popen', 'subprocess.Popen', (['command'], {'stdout': 'subprocess.PIPE', 'bufsize': '(10 ** 9)', 'stdin': 'None', 'stderr': 'None'}), '(command, stdout=subprocess.PIP...
import numpy as np def rotation_x(phi: float) -> np.ndarray: """ Return the Rotation matrix around the X-axis for phi radians. """ R_rot = np.array([[1, 0, 0], [0, np.cos(phi), -np.sin(phi)], [0, np.sin(phi), np.cos(phi)]]) return R_rot def rotation_y(...
[ "numpy.sin", "numpy.cos", "numpy.deg2rad" ]
[((1149, 1165), 'numpy.deg2rad', 'np.deg2rad', (['roll'], {}), '(roll)\n', (1159, 1165), True, 'import numpy as np\n'), ((1167, 1184), 'numpy.deg2rad', 'np.deg2rad', (['pitch'], {}), '(pitch)\n', (1177, 1184), True, 'import numpy as np\n'), ((1186, 1201), 'numpy.deg2rad', 'np.deg2rad', (['yaw'], {}), '(yaw)\n', (1196, ...
#!/usr/bin/env python """ Tests for solution 2 """ import io import numpy as np import pytest import solution1 import solution2 @pytest.mark.parametrize( 'radians, expected', [ (0, 180), (np.pi / 2, 90), (np.pi, 0), (3 * np.pi / 2, 270), ] ) def test_bearings_to_polar_deg...
[ "io.StringIO", "solution2.order_points_by_angle_distance", "pytest.fixture", "solution2.bearings_to_polar_degrees", "numpy.array", "pytest.mark.parametrize", "solution1.calculate_best_site" ]
[((133, 245), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""radians, expected"""', '[(0, 180), (np.pi / 2, 90), (np.pi, 0), (3 * np.pi / 2, 270)]'], {}), "('radians, expected', [(0, 180), (np.pi / 2, 90), (\n np.pi, 0), (3 * np.pi / 2, 270)])\n", (156, 245), False, 'import pytest\n'), ((452, 482), 'pyt...
import pickle import torch import torch.optim as optim from torch.utils.tensorboard import SummaryWriter from tqdm import tqdm import numpy as np from sklearn.model_selection import train_test_split from model import AlphaGoZero from loss import alpha_go_zero_loss from uniform_replay_buffer import UniformReplayBuffer ...
[ "torch.optim.lr_scheduler.StepLR", "random.shuffle", "loss.alpha_go_zero_loss", "numpy.expand_dims", "model.AlphaGoZero", "pickle.load", "torch.cuda.is_available", "torch.utils.tensorboard.SummaryWriter", "torch.cuda.get_device_name" ]
[((398, 412), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', (409, 412), False, 'import pickle\n'), ((578, 607), 'random.shuffle', 'random.shuffle', (['total_samples'], {}), '(total_samples)\n', (592, 607), False, 'import random\n'), ((1004, 1055), 'torch.optim.lr_scheduler.StepLR', 'optim.lr_scheduler.StepLR', ([...
import gym import os import errno import itertools import numpy as np import tensorflow as tf import tensorflow.contrib.layers as layers import baselines.common.tf_util as U from baselines import logger from baselines import deepq from baselines.deepq.replay_buffer import ReplayBuffer from baselines.common.schedules ...
[ "baselines.common.tf_util.BatchInput", "numpy.ones_like", "gym.make", "tensorflow.train.Saver", "tensorflow.contrib.layers.fully_connected", "baselines.common.tf_util.make_session", "baselines.deepq.replay_buffer.ReplayBuffer", "tensorflow.global_variables_initializer", "os.makedirs", "baselines.c...
[((692, 729), 'tensorflow.variable_scope', 'tf.variable_scope', (['scope'], {'reuse': 'reuse'}), '(scope, reuse=reuse)\n', (709, 729), True, 'import tensorflow as tf\n'), ((764, 833), 'tensorflow.contrib.layers.fully_connected', 'layers.fully_connected', (['out'], {'num_outputs': '(64)', 'activation_fn': 'tf.nn.tanh'})...
""" Student Name: <NAME> Student ID: U32332746 Class: CS480 Assignment Number: 4 Due Date: Tuesday 12/07, 11:59 PM no collabrations """ import math import numpy as np import ColorType from Animation import Animation from Component import Component from Light import Light from Material import Mater...
[ "DisplayableTorus.DisplayableTorus", "DisplayableSphere.DisplayableSphere", "numpy.zeros", "DisplayableCube.DisplayableCube", "math.sin", "DisplayableCubeEBO.DisplayableCubeEBO", "numpy.array", "math.cos", "Point.Point", "GLUtility.GLUtility" ]
[((3137, 3158), 'GLUtility.GLUtility', 'GLUtility.GLUtility', ([], {}), '()\n', (3156, 3158), False, 'import GLUtility\n'), ((5964, 5975), 'numpy.zeros', 'np.zeros', (['(4)'], {}), '(4)\n', (5972, 5975), True, 'import numpy as np\n'), ((3055, 3071), 'Point.Point', 'Point', (['(0, 0, 0)'], {}), '((0, 0, 0))\n', (3060, 3...
# Copyright 2015-2021 - RoboDK Inc. - https://robodk.com/ # 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...
[ "tkinter.filedialog.asksaveasfilename", "csv.reader", "math.asin", "math.atan2", "time.ctime", "numpy.ones", "os.path.isfile", "numpy.linalg.svd", "numpy.linalg.norm", "sys.stdout.flush", "sys.exc_info", "glob.glob", "tkinter.Frame", "tkinter.Label", "os.chdir", "codecs.open", "tkint...
[((1935, 1953), 'glob.glob', 'glob.glob', (['pattern'], {}), '(pattern)\n', (1944, 1953), False, 'import glob\n'), ((2180, 2205), 'os.path.dirname', 'os.path.dirname', (['filepath'], {}), '(filepath)\n', (2195, 2205), False, 'import os\n'), ((2312, 2338), 'os.path.basename', 'os.path.basename', (['filepath'], {}), '(fi...
# Copyright (c) 2019 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 app...
[ "unittest.main", "numpy.random.uniform", "numpy.mean" ]
[((1208, 1234), 'numpy.mean', 'np.mean', (['(a_r * b_r)'], {'axis': '(1)'}), '(a_r * b_r, axis=1)\n', (1215, 1234), True, 'import numpy as np\n'), ((1949, 1964), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1962, 1964), False, 'import unittest\n'), ((1365, 1403), 'numpy.random.uniform', 'np.random.uniform', (['...
from pathlib import Path from marius.tools.preprocess.dataset import NodeClassificationDataset from marius.tools.preprocess.utils import download_url, extract_file import numpy as np from marius.tools.preprocess.converters.torch_converter import TorchEdgeListConverter from marius.tools.preprocess.converters.spark_conve...
[ "marius.tools.preprocess.utils.extract_file", "numpy.load", "omegaconf.OmegaConf.to_yaml", "marius.tools.preprocess.datasets.dataset_helpers.remap_nodes", "torch.load", "numpy.zeros", "numpy.isnan", "pathlib.Path", "numpy.arange", "marius.tools.preprocess.utils.download_url" ]
[((2543, 2577), 'torch.load', 'torch.load', (['self.input_splits_file'], {}), '(self.input_splits_file)\n', (2553, 2577), False, 'import torch\n'), ((3488, 3525), 'numpy.load', 'np.load', (['self.input_node_feature_file'], {}), '(self.input_node_feature_file)\n', (3495, 3525), True, 'import numpy as np\n'), ((3543, 357...
# coding: utf-8 # # Mask R-CNN - Train modified model on Shapes Dataset # ### the modified model (include model_lib) does not include any mask related heads or losses import os import sys # import random import math # import re import gc import time import numpy as np # import cv2 import argparse import platform # i...
[ "sys.path.append", "mrcnn.shapes.ShapesDataset", "os.path.expanduser", "numpy.set_printoptions", "argparse.ArgumentParser", "os.getcwd", "mrcnn.model_mod.MaskRCNN", "pprint.PrettyPrinter", "gc.collect", "mrcnn.shapes.ShapesConfig", "platform.system", "os.path.join", "mrcnn.prep_notebook.load...
[((435, 457), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (450, 457), False, 'import sys\n'), ((974, 1015), 'pprint.PrettyPrinter', 'pprint.PrettyPrinter', ([], {'indent': '(2)', 'width': '(100)'}), '(indent=2, width=100)\n', (994, 1015), False, 'import pprint\n'), ((1016, 1094), 'numpy.set_...
#!/usr/bin/env python from __future__ import division, absolute_import, print_function import numpy as np from scipy.spatial.distance import pdist, squareform def kriging(x, y, z, semi_mod, semi_popt, xnew=None, ynew=None, plot=False, masked=False, silent=True, eop=None, block=False): """ Krigi...
[ "matplotlib.rc", "numpy.amin", "numpy.empty", "numpy.shape", "matplotlib.pyplot.figure", "numpy.mean", "scipy.spatial.distance.pdist", "numpy.ma.masked_array", "doctest.testmod", "scipy.spatial.Delaunay", "matplotlib.ticker.ScalarFormatter", "numpy.meshgrid", "numpy.empty_like", "numpy.app...
[((12222, 12238), 'numpy.linalg.inv', 'np.linalg.inv', (['A'], {}), '(A)\n', (12235, 12238), True, 'import numpy as np\n'), ((25959, 26016), 'doctest.testmod', 'doctest.testmod', ([], {'optionflags': 'doctest.NORMALIZE_WHITESPACE'}), '(optionflags=doctest.NORMALIZE_WHITESPACE)\n', (25974, 26016), False, 'import doctest...
import os import numpy as np import pybullet as p from igibson.object_states import * from igibson.objects.articulated_object import URDFObject from igibson.objects.multi_object_wrappers import ObjectGrouper, ObjectMultiplexer from igibson.robots.behavior_robot import BehaviorRobot from igibson.robots.fetch import Fe...
[ "pybullet.getBasePositionAndOrientation", "igibson.objects.multi_object_wrappers.ObjectGrouper", "igibson.objects.multi_object_wrappers.ObjectMultiplexer", "igibson.simulator.Simulator", "pybullet.resetBasePositionAndOrientation", "numpy.array", "igibson.robots.behavior_robot.BehaviorRobot", "igibson....
[((507, 532), 'numpy.array', 'np.array', (['[100, 100, 100]'], {}), '([100, 100, 100])\n', (515, 532), True, 'import numpy as np\n'), ((741, 765), 'numpy.array', 'np.array', (['[0.5, -2.5, 0]'], {}), '([0.5, -2.5, 0])\n', (749, 765), True, 'import numpy as np\n'), ((780, 800), 'numpy.array', 'np.array', (['[1.0, 0.5]']...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
[ "scipy.spatial.distance.cdist", "numpy.abs", "numpy.logical_and", "numpy.zeros", "numpy.isnan", "numpy.argmin", "numpy.mean", "numpy.arange" ]
[((2000, 2028), 'numpy.zeros', 'np.zeros', (['total_combinations'], {}), '(total_combinations)\n', (2008, 2028), True, 'import numpy as np\n'), ((2804, 2832), 'numpy.zeros', 'np.zeros', (['total_combinations'], {}), '(total_combinations)\n', (2812, 2832), True, 'import numpy as np\n'), ((4411, 4450), 'numpy.logical_and...
""" The inference algorithm introduce a new format of fit trial isolation unequal trial ready """ import copy import logging import warnings import numpy as np from numpy import identity, einsum from scipy.linalg import solve, norm, svd, LinAlgError from . import gp from .base import Model from .callback import Saver...
[ "scipy.linalg.solve", "copy.deepcopy", "numpy.zeros_like", "numpy.array_equal", "numpy.sum", "numpy.diag_indices_from", "numpy.empty_like", "numpy.identity", "logging.getLogger", "numpy.einsum", "scipy.linalg.svd", "scipy.linalg.norm", "numpy.squeeze", "warnings.warn", "numpy.var", "nu...
[((545, 572), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (562, 572), False, 'import logging\n'), ((1364, 1378), 'numpy.identity', 'identity', (['rank'], {}), '(rank)\n', (1372, 1378), False, 'from numpy import identity, einsum\n'), ((5960, 6016), 'numpy.concatenate', 'np.concatenate',...
import os.path import numpy as np import torch import tqdm from transformers import GPT2LMHeadModel, GPT2TokenizerFast from fibber import resources from fibber.metrics.bert_classifier import get_optimizer from fibber.paraphrase_strategies.strategy_base import StrategyBase def make_input_output_pair(tokenizer, x): ...
[ "torch.log_softmax", "numpy.maximum", "transformers.GPT2LMHeadModel.from_pretrained", "numpy.asarray", "numpy.zeros", "fibber.resources.get_transformers", "torch.softmax", "numpy.max", "numpy.random.choice", "torch.tensor" ]
[((701, 736), 'numpy.zeros', 'np.zeros', (['(n, max_len)'], {'dtype': '"""int"""'}), "((n, max_len), dtype='int')\n", (709, 736), True, 'import numpy as np\n'), ((748, 783), 'numpy.zeros', 'np.zeros', (['(n, max_len)'], {'dtype': '"""int"""'}), "((n, max_len), dtype='int')\n", (756, 783), True, 'import numpy as np\n'),...
# File: linear.py # Last Change: 29.10.2018 # Content: Linear Regression layout class # Authors: <NAME>, import numpy as np # => Simple Linear Regression Model class SLRModel(object): # Initializer / Constructor: def __init__(self): self.coef = [] # Hook methods for build in functions: de...
[ "numpy.size", "numpy.mean", "numpy.sum" ]
[((555, 565), 'numpy.size', 'np.size', (['x'], {}), '(x)\n', (562, 565), True, 'import numpy as np\n'), ((591, 601), 'numpy.mean', 'np.mean', (['x'], {}), '(x)\n', (598, 601), True, 'import numpy as np\n'), ((603, 613), 'numpy.mean', 'np.mean', (['y'], {}), '(y)\n', (610, 613), True, 'import numpy as np\n'), ((638, 673...
import tensorflow as tf import numpy as np import time import argparse import os import json import mnist_dataset import alexnet def val_data(): x_train, y_train, label_train, x_test, y_test, label_test = mnist_dataset.read_data() return x_test, y_test, label_test def calc_accuracy(predictions, labels): ...
[ "json.dump", "alexnet.load_pb", "argparse.ArgumentParser", "numpy.argmax", "tensorflow.compat.v1.wrap_function", "tensorflow.constant", "time.time", "tensorflow.nest.map_structure", "mnist_dataset.read_data", "tensorflow.compat.v1.import_graph_def" ]
[((2488, 2513), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (2511, 2513), False, 'import argparse\n'), ((214, 239), 'mnist_dataset.read_data', 'mnist_dataset.read_data', ([], {}), '()\n', (237, 239), False, 'import mnist_dataset\n'), ((338, 368), 'numpy.argmax', 'np.argmax', (['predictions']...
# flake8: noqa E731 from alibi.api.defaults import DEFAULT_META_CEM, DEFAULT_DATA_CEM from alibi.explainers import CEM import numpy as np from sklearn.datasets import load_iris from sklearn.linear_model import LogisticRegression import pytest @pytest.mark.tf1 def test_cem(disable_tf2): # load iris dataset da...
[ "sklearn.datasets.load_iris", "numpy.random.seed", "alibi.api.defaults.DEFAULT_META_CEM.keys", "sklearn.linear_model.LogisticRegression", "alibi.explainers.CEM", "alibi.api.defaults.DEFAULT_DATA_CEM.keys" ]
[((328, 339), 'sklearn.datasets.load_iris', 'load_iris', ([], {}), '()\n', (337, 339), False, 'from sklearn.datasets import load_iris\n'), ((569, 586), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (583, 586), True, 'import numpy as np\n'), ((597, 635), 'sklearn.linear_model.LogisticRegression', 'Logis...
import logging import numpy as np import pandas as pd import pickle import re from scipy import stats from sklearn import linear_model import statsmodels.api as sm import string import time from pyspan.config import * log_dir = paths["log_dir"] if not ganesha: import matplotlib as mpl import matplotlib.colors a...
[ "matplotlib.pyplot.title", "statsmodels.api.OLS", "numpy.polyfit", "numpy.isnan", "numpy.argsort", "matplotlib.pyplot.figure", "numpy.mean", "numpy.exp", "numpy.interp", "matplotlib.pyplot.fill_between", "pandas.DataFrame", "numpy.std", "re.escape", "matplotlib.pyplot.colorbar", "numpy.l...
[((6482, 6502), 'numpy.vectorize', 'np.vectorize', (['is_nan'], {}), '(is_nan)\n', (6494, 6502), True, 'import numpy as np\n'), ((1339, 1453), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s : %(levelname)s : %(message)s"""', 'level': 'logging.INFO', 'filename': 'filename'}), "(format='%(a...
from neorl import TS import numpy as np #this example is not finalized, it uses TS to solve two combinatorial problems: #Travel salesman problem #Job scheduling problem ############################################# #### -- Scheduling Problem related input ############################################# def ...
[ "numpy.power", "neorl.TS" ]
[((8252, 8372), 'neorl.TS', 'TS', ([], {'mode': '"""min"""', 'bounds': 'BOUNDS', 'fit': 'Tour', 'tabu_tenure': '(6)', 'penalization_weight': '(0.8)', 'swap_mode': '"""swap"""', 'ncores': '(1)', 'seed': '(1)'}), "(mode='min', bounds=BOUNDS, fit=Tour, tabu_tenure=6, penalization_weight=\n 0.8, swap_mode='swap', ncores...
""" =============== Radon transform =============== In computed tomography, the tomography reconstruction problem is to obtain a tomographic slice image from a set of projections [1]_. A projection is formed by drawing a set of parallel rays through the 2D object of interest, assigning the integral of the object's con...
[ "skimage.transform.iradon", "skimage.transform.iradon_sart", "matplotlib.pyplot.show", "skimage.transform.rescale", "numpy.mean", "skimage.transform.radon", "matplotlib.pyplot.subplots", "skimage.io.imread" ]
[((3100, 3147), 'skimage.io.imread', 'imread', (["(data_dir + '/phantom.png')"], {'as_grey': '(True)'}), "(data_dir + '/phantom.png', as_grey=True)\n", (3106, 3147), False, 'from skimage.io import imread\n'), ((3156, 3217), 'skimage.transform.rescale', 'rescale', (['image'], {'scale': '(0.4)', 'mode': '"""reflect"""', ...
""" (mag, T, x, y, s, d, k, bgd) vs time """ import numpy as np, matplotlib.pyplot as plt, pandas as pd from glob import glob import os from astropy.io import fits from bspline_fit_xyTmag_BIC_approach import homog_get_data from mpl_toolkits.axes_grid1 import make_axes_locatable def plot_EPD_parameters_vs_time(lcpat...
[ "pandas.DataFrame", "os.path.basename", "numpy.median", "matplotlib.pyplot.close", "os.path.exists", "pandas.isnull", "numpy.argsort", "bspline_fit_xyTmag_BIC_approach.homog_get_data", "numpy.mean", "os.path.join" ]
[((712, 741), 'os.path.join', 'os.path.join', (['savdir', 'savname'], {}), '(savdir, savname)\n', (724, 741), False, 'import os\n'), ((754, 777), 'os.path.exists', 'os.path.exists', (['savpath'], {}), '(savpath)\n', (768, 777), False, 'import os\n'), ((933, 949), 'numpy.argsort', 'np.argsort', (['time'], {}), '(time)\n...
from __future__ import print_function import time import os import glob import numpy import math from scipy.fftpack import fft from scipy.fftpack.realtransforms import dct import matplotlib as mpl mpl.use('TkAgg') import matplotlib.pyplot as plt from pyAudioAnalysis import audioBasicIO from pyAudioAnalysis import util...
[ "numpy.roots", "numpy.sum", "numpy.abs", "numpy.double", "numpy.argmax", "numpy.floor", "numpy.ones", "numpy.isnan", "numpy.imag", "matplotlib.pyplot.figure", "numpy.arange", "numpy.mean", "numpy.correlate", "matplotlib.pyplot.gca", "glob.glob", "numpy.float64", "scipy.fftpack.realtr...
[((197, 213), 'matplotlib.use', 'mpl.use', (['"""TkAgg"""'], {}), "('TkAgg')\n", (204, 213), True, 'import matplotlib as mpl\n'), ((856, 877), 'numpy.sum', 'numpy.sum', (['(frame ** 2)'], {}), '(frame ** 2)\n', (865, 877), False, 'import numpy\n'), ((1691, 1710), 'numpy.sum', 'numpy.sum', (['(ind * Xt)'], {}), '(ind * ...
# -*- coding: utf-8 -*- import os import math import re import numpy as np from tqdm import tqdm import datetime import subprocess from mmd.utils.MLogger import MLogger from mmd.mmd.VmdData import VmdMorphFrame, VmdMotion from mmd.mmd.PmxData import PmxModel from mmd.mmd.VmdWriter import VmdWriter from mmd.utils.MSer...
[ "mmd.utils.MServiceUtils.get_file_encoding", "tqdm.tqdm", "mmd.mmd.VmdData.VmdMorphFrame", "mmd.mmd.PmxData.PmxModel", "re.compile", "math.ceil", "os.path.getsize", "os.path.exists", "mmd.monaural_adapter.FFMPEGMonauralProcessAudioAdapter", "datetime.datetime.now", "numpy.max", "re.findall", ...
[((432, 458), 'mmd.utils.MLogger.MLogger', 'MLogger', (['__name__'], {'level': '(1)'}), '(__name__, level=1)\n', (439, 458), False, 'from mmd.utils.MLogger import MLogger\n'), ((1003, 1045), 'os.path.join', 'os.path.join', (['args.audio_dir', '"""vocals.wav"""'], {}), "(args.audio_dir, 'vocals.wav')\n", (1015, 1045), F...
import numpy as np import warnings from ..core import Bullet from ..scene_maker import BulletSceneMaker from ..collision_checker import BulletCollisionChecker from ..robots import PandaDualArm class PandaDualArmEnvBase: def __init__(self, render=False, arm_distance=0.4): self.is_render = render sel...
[ "warnings.warn", "numpy.zeros", "numpy.all" ]
[((1208, 1219), 'numpy.zeros', 'np.zeros', (['(3)'], {}), '(3)\n', (1216, 1219), True, 'import numpy as np\n'), ((3196, 3264), 'warnings.warn', 'warnings.warn', (['"""env.reset() can`t find feasible reset configuration"""'], {}), "('env.reset() can`t find feasible reset configuration')\n", (3209, 3264), False, 'import ...
# real time prediction import cv2 import time import mediapipe as mp import numpy as np import os from utils import mediapipe_detection, draw_landmarks, draw_landmarks_custom, draw_limit_rh, draw_limit_lh, check_detection, points_detection #from keras.models import model_from_json import pickle from sklearn import svm...
[ "argparse.ArgumentParser", "utils.points_detection", "cv2.waitKey", "cv2.destroyAllWindows", "cv2.imshow", "cv2.VideoCapture", "numpy.array", "utils.mediapipe_detection" ]
[((423, 439), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (437, 439), False, 'from argparse import ArgumentParser\n'), ((1328, 1352), 'numpy.array', 'np.array', (['model.classes_'], {}), '(model.classes_)\n', (1336, 1352), True, 'import numpy as np\n'), ((1487, 1506), 'cv2.VideoCapture', 'cv2.VideoCa...
""" SQLite database backend Store traces from tallyable objects in individual SQL tables. Implementation Notes -------------------- For each object, a table is created with the following format: key (INT), trace (INT), v1 (FLOAT), v2 (FLOAT), v3 (FLOAT) ... The key is autoincremented each time a new row is added t...
[ "os.remove", "os.path.exists", "sqlite3.connect", "numpy.array", "numpy.squeeze" ]
[((3417, 3440), 'numpy.squeeze', 'squeeze', (['trace[slicing]'], {}), '(trace[slicing])\n', (3424, 3440), False, 'from numpy import zeros, shape, squeeze, transpose\n'), ((4835, 4883), 'sqlite3.connect', 'sqlite3.connect', (['dbname'], {'check_same_thread': '(False)'}), '(dbname, check_same_thread=False)\n', (4850, 488...
# Importing the needed python packages import numpy as np import matplotlib.pyplot as plt from scipy.integrate import odeint import time import sys from pylab import * from matplotlib.patches import Rectangle # Defining the right hand side of the ODEs (rate of changes of predator and prey) def NegativeFBmo...
[ "matplotlib.pyplot.title", "numpy.meshgrid", "matplotlib.pyplot.quiver", "numpy.array", "numpy.linspace", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel" ]
[((447, 469), 'numpy.linspace', 'np.linspace', (['(-5)', '(5)', '(21)'], {}), '(-5, 5, 21)\n', (458, 469), True, 'import numpy as np\n'), ((476, 503), 'numpy.meshgrid', 'np.meshgrid', (['coords', 'coords'], {}), '(coords, coords)\n', (487, 503), True, 'import numpy as np\n'), ((547, 571), 'matplotlib.pyplot.quiver', 'p...
#!/usr/bin/env python3 import rclpy from rclpy.node import Node from rclpy.executors import MultiThreadedExecutor from rclpy.action import ActionServer, CancelResponse from rclpy.action.client import GoalStatus # Interfaces from geometry_msgs.msg import PolygonStamped, Polygon, Point32, PoseStamped from std_msgs.msg im...
[ "geometry_msgs.msg.PolygonStamped", "std_msgs.msg.Header", "ros2_utils.cli.gh_state_machine", "numpy.ones", "geometry_msgs.msg.Point32", "ros2_utils.cli.CompleteActionState", "geometry_msgs.msg.PoseStamped", "rclpy.spin", "shapely.geometry.Polygon", "numpy.asfarray", "robot_command_interfaces.ac...
[((1003, 1019), 'geometry_msgs.msg.PolygonStamped', 'PolygonStamped', ([], {}), '()\n', (1017, 1019), False, 'from geometry_msgs.msg import PolygonStamped, Polygon, Point32, PoseStamped\n'), ((1035, 1044), 'geometry_msgs.msg.Polygon', 'Polygon', ([], {}), '()\n', (1042, 1044), False, 'from geometry_msgs.msg import Poly...
# # bamakoS # www.fabiocrameri.ch/colourmaps from matplotlib.colors import LinearSegmentedColormap cm_data = [[0.0011753, 0.25004, 0.3], [0.9999, 0.89988, 0.59995], [0.37638, 0.49034, 0.080686], [0.72588, 0.6474, 0.14503], ...
[ "matplotlib.colors.LinearSegmentedColormap.from_list", "numpy.linspace", "matplotlib.pyplot.show", "viscm.viscm" ]
[((4764, 4817), 'matplotlib.colors.LinearSegmentedColormap.from_list', 'LinearSegmentedColormap.from_list', (['"""bamakoS"""', 'cm_data'], {}), "('bamakoS', cm_data)\n", (4797, 4817), False, 'from matplotlib.colors import LinearSegmentedColormap\n'), ((5311, 5321), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n'...
#!/usr/bin/env python import rospy import numpy as np import cv2 as cv from cv_bridge import CvBridge, CvBridgeError from sensor_msgs.msg import Image, CameraInfo, PointCloud2 import sensor_msgs.point_cloud2 as pc2 # visual sensors class RPIv2: def __init__(self): self.bridge=CvBridge() # camera i...
[ "cv_bridge.CvBridge", "rospy.Subscriber", "cv2.waitKey", "numpy.mean", "cv2.imshow" ]
[((291, 301), 'cv_bridge.CvBridge', 'CvBridge', ([], {}), '()\n', (299, 301), False, 'from cv_bridge import CvBridge, CvBridgeError\n'), ((420, 491), 'rospy.Subscriber', 'rospy.Subscriber', (['"""/rpi/image_info"""', 'CameraInfo', 'self._caminfo_callback'], {}), "('/rpi/image_info', CameraInfo, self._caminfo_callback)\...
# -*- coding: utf-8 -*- # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2020 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTI...
[ "numpy.stack", "megengine.load", "argparse.ArgumentParser", "math.atan2", "cv2.imwrite", "numpy.ascontiguousarray", "cv2.addWeighted", "cv2.imread", "numpy.mean", "numpy.array", "official.vision.keypoints.test.find_keypoints", "cv2.fillConvexPoly", "megengine.jit.trace", "official.vision.d...
[((886, 910), 'megengine.get_logger', 'mge.get_logger', (['__name__'], {}), '(__name__)\n', (900, 910), True, 'import megengine as mge\n'), ((945, 970), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (968, 970), False, 'import argparse\n'), ((5876, 5900), 'megengine.jit.trace', 'jit.trace', ([]...
# @formatter:off # Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU. # # 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...
[ "cobra.flux_analysis.find_essential_genes", "pytest.mark.skipif", "os.path.join", "cameo.flux_analysis.analysis.find_essential_metabolites", "cobra.util.fix_objective_as_constraint", "os.path.dirname", "pytest.raises", "pickle.dumps", "cameo.core.utils.medium", "os.getenv", "pytest.mark.xfail", ...
[((1394, 1419), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (1409, 1419), False, 'import os\n'), ((1356, 1382), 'os.getenv', 'os.getenv', (['"""TRAVIS"""', '(False)'], {}), "('TRAVIS', False)\n", (1365, 1382), False, 'import os\n'), ((1472, 1537), 'os.path.join', 'os.path.join', (['TESTDIR...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from future.utils import bytes_to_native_str from hypothesis import given import hypothesis.strategies as st import unittest from caffe2.proto import caffe2_pb2 from caf...
[ "unittest.main", "caffe2.python.core.Net", "caffe2.python.core.GradientRegistry.GetBackwardPass", "caffe2.python.core.GradientRegistry.RegisterGradient", "caffe2.python.workspace.RunNetOnce", "caffe2.python.core.DeviceOption", "caffe2.python.workspace.ResetWorkspace", "caffe2.python.core.CreateOperato...
[((1220, 1263), 'caffe2.python.core.GradientRegistry.RegisterGradient', 'GradientRegistry.RegisterGradient', (['"""Direct"""'], {}), "('Direct')\n", (1253, 1263), False, 'from caffe2.python.core import CreateOperator, GradientRegistry\n'), ((1529, 1575), 'caffe2.python.core.GradientRegistry.RegisterGradient', 'Gradient...
import numpy as np import cv2 import os import argparse import glob import math import matplotlib.pyplot as plt from ReadCameraModel import * from UndistortImage import * def rotationMatrixToEulerAngles(R) : sy = math.sqrt(R[0,0] * R[0,0] + R[1,0] * R[1,0]) singular = sy < 1e-6 if not singular : x = math.atan...
[ "argparse.ArgumentParser", "math.atan2", "matplotlib.pyplot.figure", "os.path.join", "cv2.recoverPose", "cv2.cvtColor", "cv2.BFMatcher", "numpy.append", "numpy.linalg.det", "math.sqrt", "cv2.findEssentialMat", "numpy.asarray", "cv2.FlannBasedMatcher", "numpy.hstack", "cv2.ORB_create", ...
[((217, 265), 'math.sqrt', 'math.sqrt', (['(R[0, 0] * R[0, 0] + R[1, 0] * R[1, 0])'], {}), '(R[0, 0] * R[0, 0] + R[1, 0] * R[1, 0])\n', (226, 265), False, 'import math\n'), ((492, 559), 'numpy.array', 'np.array', (['[x * 180 / math.pi, y * 180 / math.pi, z * 180 / math.pi]'], {}), '([x * 180 / math.pi, y * 180 / math.p...
import cv2 import tensorflow as tf import os from tqdm import tqdm import numpy DATADIR = "valid" CATEGORIES = ["d4", "d6", "d8","d10","d12", "d20"] dobre=0 calosc=0 def prepare(filepath): IMG_SIZE = 100 img_array = cv2.imread(filepath) new_array = cv2.resize(img_array, (IMG_SIZE, IMG_SIZE)) new_a...
[ "tensorflow.keras.models.load_model", "numpy.around", "cv2.imread", "numpy.round", "os.path.join", "os.listdir", "cv2.resize" ]
[((396, 441), 'tensorflow.keras.models.load_model', 'tf.keras.models.load_model', (['"""dice6-CNN.model"""'], {}), "('dice6-CNN.model')\n", (422, 441), True, 'import tensorflow as tf\n'), ((1337, 1360), 'numpy.around', 'numpy.around', (['przewi', '(0)'], {}), '(przewi, 0)\n', (1349, 1360), False, 'import numpy\n'), ((2...
import gym import numpy as np import matplotlib.pyplot as plt env = gym.make("MountainCar-v0") env.reset() LEARNING_RATE = 0.1 DISCOUNT = 0.95 # weight, how important do we value future rewards over current rewards EPISODES = 5000 SHOW_EVERY = 2000 DISCRETE_OS_SIZE = [20] *len(env.observation_space.high) discrete_...
[ "numpy.random.uniform", "matplotlib.pyplot.show", "gym.make", "matplotlib.pyplot.plot", "numpy.argmax", "matplotlib.pyplot.legend", "numpy.max", "numpy.random.random", "numpy.random.randint" ]
[((69, 95), 'gym.make', 'gym.make', (['"""MountainCar-v0"""'], {}), "('MountainCar-v0')\n", (77, 95), False, 'import gym\n'), ((421, 500), 'numpy.random.uniform', 'np.random.uniform', ([], {'low': '(-2)', 'high': '(0)', 'size': '(DISCRETE_OS_SIZE + [env.action_space.n])'}), '(low=-2, high=0, size=DISCRETE_OS_SIZE + [en...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 3 06:18:58 2020 @author: kenneth """ from __future__ import absolute_import import numpy as np from Utils.utils import EvalC from Utils.Loss import loss from Utils.kernels import Kernels class TwoClassSVDD(EvalC, loss, Kernels): def __init__(s...
[ "sklearn.model_selection.train_test_split", "numpy.ones", "Utils.kernels.Kernels.polynomial", "numpy.linalg.norm", "Utils.kernels.Kernels.linear", "Utils.kernels.Kernels.chi", "Utils.kernels.Kernels.etakernel", "numpy.ones_like", "Utils.kernels.Kernels.linrbf", "Utils.kernels.Kernels.rbf", "Util...
[((4963, 5005), 'sklearn.datasets.make_circles', 'make_circles', (['(1000)'], {'noise': '(0.07)', 'factor': '(0.3)'}), '(1000, noise=0.07, factor=0.3)\n', (4975, 5005), False, 'from sklearn.datasets import make_blobs, make_moons, make_circles\n'), ((5141, 5178), 'sklearn.model_selection.train_test_split', 'train_test_s...
""" CHAED includes 1) 1000 images, 10 for each of 100 Chinese characters 2) including 20 characters with single element and 3) 80 with multi components in different structure types including horizontal composition, vertical composition, half surrounding compos...
[ "matplotlib.pyplot.subplot", "tqdm.tqdm", "matplotlib.pyplot.show", "os.path.basename", "numpy.argmax", "random.shuffle", "matplotlib.pyplot.imshow", "common.utils.join", "matplotlib.pyplot.close", "matplotlib.pyplot.axis", "PIL.Image.open", "dataset.DatasetFactory.register", "matplotlib.pyp...
[((6582, 6635), 'dataset.DatasetFactory.register', 'DatasetFactory.register', (['"""CHAEDClassificationDataset"""'], {}), "('CHAEDClassificationDataset')\n", (6605, 6635), False, 'from dataset import DatasetFactory\n'), ((6905, 6956), 'dataset.DatasetFactory.register', 'DatasetFactory.register', (['"""CHAEDDistribution...
import numpy as np import pandas as pd import tensorflow as tf import cv2 import io import os from PIL import Image import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten from keras.layers import Conv2D, MaxPooling2D from keras import backend ...
[ "preprocess.preprocess", "keras.optimizers.Adadelta", "numpy.save", "cnn_model.createModel", "keras.backend.image_data_format", "sklearn.model_selection.train_test_split", "cv2.imread", "numpy.array", "cv2.imshow", "os.listdir", "keras.utils.to_categorical" ]
[((612, 632), 'os.listdir', 'os.listdir', (['DATAPATH'], {}), '(DATAPATH)\n', (622, 632), False, 'import os\n'), ((1415, 1429), 'numpy.array', 'np.array', (['data'], {}), '(data)\n', (1423, 1429), True, 'import numpy as np\n'), ((1439, 1455), 'numpy.array', 'np.array', (['labels'], {}), '(labels)\n', (1447, 1455), True...
#import required stuff import pandas as pd import numpy as np import nltk from nltk.corpus import stopwords nltk.download('wordnet') import re #for working with regular expression import nltk #for natural language processing (nlp) import string #This is a module, Python also has built-in class str, these are ...
[ "pandas.read_csv", "nltk.stem.porter.PorterStemmer", "numpy.argsort", "numpy.array", "nltk.corpus.stopwords.words", "nltk.download", "gensim.models.word2vec.Word2Vec" ]
[((113, 137), 'nltk.download', 'nltk.download', (['"""wordnet"""'], {}), "('wordnet')\n", (126, 137), False, 'import nltk\n'), ((574, 601), 'pandas.read_csv', 'pd.read_csv', (['"""df_final.csv"""'], {}), "('df_final.csv')\n", (585, 601), True, 'import pandas as pd\n'), ((1836, 1862), 'nltk.download', 'nltk.download', (...
import numpy as np from pymor.basic import * from pymor.bindings.dunext import DuneXTMatrixOperator, DuneXTVectorSpace from pymor.bindings.dunegdt import DuneGDTVisualizer from pymor.vectorarrays.list import ListVectorArray from dune.xt.la import IstlDenseVectorDouble from dune.xt.functions import ConstantFunction__2...
[ "dune.xt.functions.ConstantFunction__2d_to_1x1", "dune.gdt.gamm_2019_talk_on_conservative_rb.assemble_SWIPDG_matrix", "pymor.bindings.dunegdt.DuneGDTVisualizer", "dune.gdt.gamm_2019_talk_on_conservative_rb.compute_flux_reconstruction", "dune.gdt.gamm_2019_talk_on_conservative_rb.assemble_Hdiv_product_matrix...
[((1237, 1322), 'dune.xt.functions.ExpressionFunction__2d_to_1x1', 'ExpressionFunction', (['"""x"""', "['0.5*pi*pi*cos(0.5*pi*x[0])*cos(0.5*pi*x[1])']", '(3)', '"""f"""'], {}), "('x', ['0.5*pi*pi*cos(0.5*pi*x[0])*cos(0.5*pi*x[1])'], 3, 'f'\n )\n", (1255, 1322), True, 'from dune.xt.functions import ExpressionFunction...
import numpy as np from numpy.linalg import inv import sys if ".." not in sys.path: sys.path.append("..") # from PyCommon.modules import pydart2 as pydart import pydart2 as pydart from PyCommon.modules.Math import mmMath as mm import math class PDController: """ :type h : float :type skel : pydart.Skel...
[ "sys.path.append", "numpy.diagflat", "math.atan2", "numpy.zeros", "numpy.hstack", "numpy.linalg.inv", "numpy.array", "PyCommon.modules.Math.mmMath.exp" ]
[((88, 109), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (103, 109), False, 'import sys\n'), ((718, 761), 'numpy.diagflat', 'np.diagflat', (['([0.0] * 6 + [Kt] * (ndofs - 6))'], {}), '([0.0] * 6 + [Kt] * (ndofs - 6))\n', (729, 761), True, 'import numpy as np\n'), ((780, 823), 'numpy.diagflat',...
import json import numpy import numpy as np import pkg_resources import pickle from .. import utils datafile = pkg_resources.resource_filename( "excursion", "testcases/data/checkmate_dense.json" ) def modify(zv): return np.log(zv) - np.log(0.05) truthX, truthy_obs, truthy_exp = [], [], [] for p, _, result...
[ "numpy.array", "numpy.log", "pkg_resources.resource_filename" ]
[((113, 200), 'pkg_resources.resource_filename', 'pkg_resources.resource_filename', (['"""excursion"""', '"""testcases/data/checkmate_dense.json"""'], {}), "('excursion',\n 'testcases/data/checkmate_dense.json')\n", (144, 200), False, 'import pkg_resources\n'), ((652, 668), 'numpy.array', 'np.array', (['truthX'], {}...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ "numpy.random.uniform", "tvm.te.placeholder", "topi.testing.dispatch", "topi.nn.util.get_pad_tuple", "tvm.nd.array", "numpy.maximum", "topi.testing.dilate_python", "tvm.context", "tvm.target.create", "tvm.runtime.enabled", "topi.add", "tvm.contrib.pickle_memoize.memoize", "topi.testing.conv2...
[((1786, 1826), 'topi.nn.util.get_pad_tuple', 'get_pad_tuple', (['padding', '(kernel, kernel)'], {}), '(padding, (kernel, kernel))\n', (1799, 1826), False, 'from topi.nn.util import get_pad_tuple\n'), ((2081, 2147), 'tvm.te.placeholder', 'te.placeholder', (['(batch, in_height, in_width, in_channel)'], {'name': '"""A"""...
from __future__ import division import numpy as np import scipy.linalg as la from numpy.testing import assert_almost_equal import multiprocessing as mp import matplotlib.pyplot as plt from scipy.cluster.vq import kmeans import random import pandas as pd import time def distance(x,Y): ''' Function to calc...
[ "numpy.random.uniform", "numpy.log", "numpy.zeros", "scipy.linalg.norm", "random.seed", "numpy.array", "numpy.random.choice", "numpy.vstack" ]
[((849, 864), 'random.seed', 'random.seed', (['(22)'], {}), '(22)\n', (860, 864), False, 'import random\n'), ((917, 948), 'numpy.random.choice', 'np.random.choice', (['X.shape[0]', '(1)'], {}), '(X.shape[0], 1)\n', (933, 948), True, 'import numpy as np\n'), ((1960, 1991), 'numpy.random.choice', 'np.random.choice', (['X...
"""RPN for fasterRCNN""" import numpy as np import mindspore.nn as nn import mindspore.common.dtype as mstype from mindspore.ops import operations as P from mindspore import Tensor from mindspore.ops import functional as F from src.CTPN.bbox_assign_sample import BboxAssignSample class RpnRegClsBlock(nn.Cell): """ ...
[ "mindspore.ops.operations.SigmoidCrossEntropyWithLogits", "mindspore.ops.operations.Cast", "numpy.ones", "mindspore.ops.operations.CheckValid", "mindspore.ops.operations.Fill", "mindspore.ops.operations.Transpose", "mindspore.ops.operations.Concat", "mindspore.ops.operations.ReduceSum", "mindspore.o...
[((1013, 1022), 'mindspore.ops.operations.Shape', 'P.Shape', ([], {}), '()\n', (1020, 1022), True, 'from mindspore.ops import operations as P\n'), ((1046, 1057), 'mindspore.ops.operations.Reshape', 'P.Reshape', ([], {}), '()\n', (1055, 1057), True, 'from mindspore.ops import operations as P\n'), ((1591, 1604), 'mindspo...
############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or modify # it under the terms of the GNU Less...
[ "os.path.isabs", "sardana.macroserver.scan.scandata.Record", "os.path.basename", "os.path.dirname", "numpy.rank", "os.path.exists", "sardana.macroserver.macro.ParamRepeat", "numpy.shape", "taurus.console.table.Table", "os.path.normpath", "sardana.macroserver.msexception.StopException", "numpy....
[((5312, 5429), 'taurus.console.table.Table', 'Table', (['values'], {'elem_fmt': 't_format', 'col_head_str': 'col_headers', 'col_head_width': 'motor_width', 'row_head_str': 'row_headers'}), '(values, elem_fmt=t_format, col_head_str=col_headers, col_head_width=\n motor_width, row_head_str=row_headers)\n', (5317, 5429...
# Implement BPR. # <NAME>, et al. BPR: Bayesian personalized ranking from implicit feedback. # Proceedings of the twenty-fifth conference on uncertainty in artificial intelligence. AUAI, 2009. # @author <NAME>, <NAME>, <NAME> import random from collections import defaultdict import numpy as np from sklearn.me...
[ "random.randint", "random.sample", "numpy.zeros", "sklearn.metrics.roc_auc_score", "collections.defaultdict", "numpy.exp", "numpy.random.rand", "numpy.dot", "numpy.mat", "scores.topK_scores" ]
[((776, 810), 'numpy.zeros', 'np.zeros', (['(user_count, item_count)'], {}), '((user_count, item_count))\n', (784, 810), True, 'import numpy as np\n'), ((823, 841), 'numpy.zeros', 'np.zeros', (['size_u_i'], {}), '(size_u_i)\n', (831, 841), True, 'import numpy as np\n'), ((858, 876), 'numpy.zeros', 'np.zeros', (['size_u...
""" <NAME> <EMAIL> Image warping using per-pixel flow vectors. Modified from: https://github.com/tensorflow/addons/blob/v0.6.0/tensorflow_addons/image/dense_image_warp.py Added Nearest-Neighbor interpolation. """ from __future__ import absolute_import from __future__ import division from __future__ import print_func...
[ "tensorflow.python.ops.array_ops.shape", "tensorflow.python.ops.math_ops.maximum", "tensorflow.python.ops.math_ops.range", "tensorflow.python.ops.math_ops.floor", "tensorflow.python.ops.array_ops.reshape", "numpy.iinfo", "tensorflow.python.ops.array_ops.expand_dims", "tensorflow.python.framework.const...
[((1554, 1574), 'tensorflow.python.framework.ops.name_scope', 'ops.name_scope', (['name'], {}), '(name)\n', (1568, 1574), False, 'from tensorflow.python.framework import ops\n'), ((1587, 1614), 'tensorflow.python.framework.ops.convert_to_tensor', 'ops.convert_to_tensor', (['grid'], {}), '(grid)\n', (1608, 1614), False,...
import numpy as np #======================================================== # # Environment-specific cost functions: # def cheetah_cost_fn(state, action, next_state): if len(state.shape) > 1: heading_penalty_factor=10 scores=np.zeros((state.shape[0],)) #dont move front shin back so far ...
[ "numpy.square", "numpy.zeros" ]
[((249, 276), 'numpy.zeros', 'np.zeros', (['(state.shape[0],)'], {}), '((state.shape[0],))\n', (257, 276), True, 'import numpy as np\n'), ((1487, 1508), 'numpy.square', 'np.square', (['next_s_vel'], {}), '(next_s_vel)\n', (1496, 1508), True, 'import numpy as np\n'), ((1626, 1647), 'numpy.square', 'np.square', (['next_s...
import torch import math import cv2 as cv import torch.nn.functional as F import numpy as np import random '''modified from the original test implementation Replace cv.BORDER_REPLICATE with cv.BORDER_CONSTANT Add a variable called att_mask for computing attention and positional encoding later''' def iou(reference, pr...
[ "torch.stack", "math.sqrt", "cv2.copyMakeBorder", "torch.cat", "numpy.ones", "torch.Tensor", "torch.max", "torch.rand", "torch.nn.functional.interpolate", "torch.min", "cv2.resize", "torch.nn.functional.pad" ]
[((684, 729), 'torch.max', 'torch.max', (['reference[:, :2]', 'proposals[:, :2]'], {}), '(reference[:, :2], proposals[:, :2])\n', (693, 729), False, 'import torch\n'), ((739, 827), 'torch.min', 'torch.min', (['(reference[:, :2] + reference[:, 2:])', '(proposals[:, :2] + proposals[:, 2:])'], {}), '(reference[:, :2] + re...
#%% import warnings warnings.simplefilter("ignore") import random import matplotlib.pyplot as plt import tensorflow as tf from itertools import product import pandas as pd import numpy as np import pickle import keras from keras import layers from sklearn.model_selection import StratifiedKFold from math import log2...
[ "pickle.dump", "keras.Sequential", "numpy.shape", "numpy.mean", "numpy.unique", "pandas.DataFrame", "warnings.simplefilter", "keras.layers.Flatten", "numpy.random.choice", "itertools.product", "numpy.log2", "keras.optimizers.Adam", "proglearn.progressive_learner.ProgressiveLearner", "keras...
[((21, 52), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""'], {}), "('ignore')\n", (42, 52), False, 'import warnings\n'), ((8525, 8560), 'keras.datasets.cifar100.load_data', 'keras.datasets.cifar100.load_data', ([], {}), '()\n', (8558, 8560), False, 'import keras\n'), ((8570, 8603), 'numpy.concatenat...
#!/usr/bin/python3 import numpy as np import matplotlib.pyplot as plt from priors import * import sys sys.path.insert(0,".") ############## Job Control ################################## # Default values, overridden by vb_in.py # jobctl_0 = { "trials" : { "Pfizer (Final)" : {"n_p":262, "n_v":8, "v2p_ratio"...
[ "numpy.log", "matplotlib.pyplot.clf", "numpy.zeros", "sys.path.insert", "numpy.searchsorted", "numpy.argsort", "numpy.max", "matplotlib.pyplot.figure", "numpy.arange", "numpy.exp", "matplotlib.pyplot.savefig" ]
[((102, 125), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""."""'], {}), "(0, '.')\n", (117, 125), False, 'import sys\n'), ((1769, 1784), 'numpy.zeros', 'np.zeros', (['nsamp'], {}), '(nsamp)\n', (1777, 1784), True, 'import numpy as np\n'), ((1794, 1805), 'numpy.zeros', 'np.zeros', (['(2)'], {}), '(2)\n', (1802, 18...
# Lint as: python3 # Copyright 2018 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 agr...
[ "apache_beam.Map", "apache_beam.Pipeline", "apache_beam.testing.util.BeamAssertException", "tensorflow_model_analysis.proto.metrics_for_slice_pb2.SliceKey", "tensorflow_model_analysis.slicer.slicer_lib.deserialize_cross_slice_key", "tensorflow.test.main", "tensorflow_model_analysis.slicer.slicer_lib.get...
[((25246, 25260), 'tensorflow.test.main', 'tf.test.main', ([], {}), '()\n', (25258, 25260), True, 'import tensorflow as tf\n'), ((2819, 2877), 'tensorflow_model_analysis.slicer.slicer_lib.SingleSliceSpec', 'slicer.SingleSliceSpec', ([], {'columns': 'columns', 'features': 'features'}), '(columns=columns, features=featur...
# Copyright (c) 2021, <NAME> # Licensed under BSD 3-Clause License. See LICENSE.txt for details. import numpy as np import gm def poisson(k,lam,cumulative=False): #poisson pmf #vectorised in lambda, but not k threshold=23 #threshold for switching to normal approximation if k<threshold: #poisson ...
[ "numpy.math.factorial", "numpy.exp", "numpy.sqrt" ]
[((460, 472), 'numpy.exp', 'np.exp', (['(-lam)'], {}), '(-lam)\n', (466, 472), True, 'import numpy as np\n'), ((533, 553), 'numpy.math.factorial', 'np.math.factorial', (['k'], {}), '(k)\n', (550, 553), True, 'import numpy as np\n'), ((640, 652), 'numpy.sqrt', 'np.sqrt', (['lam'], {}), '(lam)\n', (647, 652), True, 'impo...
# -*- coding: utf-8 -*- """ Created on Wed Oct 21 09:32:12 2020 REF: https://github.com/sichkar-valentyn/Reinforcement_Learning_in_Python/blob/master/RL_Q-Learning_E1/env.py @author: HG19230 """ import numpy as np # To deal with data in form of matrices import math import random #import tkinter as tk # To build GUI ...
[ "drone.drone.filterCoveredTargets", "math.floor", "gym.spaces.Discrete", "random.random", "numpy.array", "gym.spaces.Box", "numpy.reshape", "MobilityPatterns.RPGM_Mobility.RPGM_Mobility", "drone.drone.setRandomInitialLocation", "numpy.sqrt" ]
[((2092, 2109), 'numpy.sqrt', 'np.sqrt', (['areaSize'], {}), '(areaSize)\n', (2099, 2109), True, 'import numpy as np\n'), ((2711, 2742), 'gym.spaces.Discrete', 'spaces.Discrete', (['self.n_actions'], {}), '(self.n_actions)\n', (2726, 2742), False, 'from gym import spaces\n'), ((2813, 2875), 'gym.spaces.Box', 'spaces.Bo...
""" Copyright Eskapade: License Apache-2: https://github.com/KaveIO/Eskapade-Core/blob/master/LICENSE Reference link: https://github.com/KaveIO/Eskapade/blob/master/python/eskapade/analysis/histogram_filling.py All modifications copyright ING WBAA. """ import copy import logging from collections import defaultdict im...
[ "pandas.Timestamp", "numpy.floor", "numpy.dtype", "copy.copy", "numpy.issubdtype", "logging.getLogger", "collections.defaultdict", "pandas.Timedelta", "numpy.unique" ]
[((4323, 4342), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (4340, 4342), False, 'import logging\n'), ((11120, 11168), 'numpy.unique', 'np.unique', (['[j for i in self.features for j in i]'], {}), '([j for i in self.features for j in i])\n', (11129, 11168), True, 'import numpy as np\n'), ((13052, 13100)...
#!/usr/bin/env python u""" reduce_ICESat2_ATL07_raster.py Written by <NAME> (11/2021) Create masks for reducing ICESat-2 ATL07 data using raster imagery COMMAND LINE OPTIONS: -R X, --raster X: Input raster file -F X, --format X: Input raster file format netCDF4 HDF5 geotiff -v X, -...
[ "argparse.ArgumentParser", "numpy.shape", "numpy.meshgrid", "numpy.copy", "os.path.dirname", "os.chmod", "datetime.datetime.today", "os.path.basename", "pyproj.CRS.from_string", "re.match", "pyproj.Transformer.from_crs", "numpy.concatenate", "re.compile", "logging.basicConfig", "warnings...
[((2252, 2285), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (2275, 2285), False, 'import warnings\n'), ((4543, 4593), 'numpy.concatenate', 'np.concatenate', (['(x0[:, None], y0[:, None])'], {'axis': '(1)'}), '((x0[:, None], y0[:, None]), axis=1)\n', (4557, 4593), True, ...
# coding=utf-8 # Copyright 2019 The Edward2 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 applicable law o...
[ "tensorflow_probability.distributions.Bernoulli", "edward2.Normal", "tensorflow.compat.v2.test.main", "tensorflow.compat.v2.zeros", "tensorflow.compat.v1.placeholder", "numpy.zeros", "absl.testing.parameterized.parameters", "edward2.make_log_joint_fn", "tensorflow.python.framework.test_util.run_v1_o...
[((4738, 4939), 'absl.testing.parameterized.parameters', 'parameterized.parameters', (["{'cls': ed.Normal, 'value': 2, 'loc': 0.5, 'scale': 1.0}", "{'cls': ed.Normal, 'value': [2], 'loc': [0.5], 'scale': [1.0]}", "{'cls': ed.Poisson, 'value': 2, 'rate': 0.5}"], {}), "({'cls': ed.Normal, 'value': 2, 'loc': 0.5, 'scale':...