code stringlengths 31 1.05M | apis list | extract_api stringlengths 97 1.91M |
|---|---|---|
""" An example highlighting the difference between DMD and streaming DMD
Streaming DMD is a modification of the "standard" DMD procedure that
produces *APPROXIMATIONS* of the DMD modes and eigenvalues. The benefit
of this procedure is that it can be applied to data sets with large
(in theory, infinite... | [
"dmdtools.DMD",
"matplotlib.pyplot.title",
"numpy.random.seed",
"numpy.abs",
"numpy.angle",
"numpy.allclose",
"matplotlib.pyplot.stem",
"numpy.sin",
"sys.path.append",
"numpy.random.randn",
"matplotlib.pyplot.show",
"matplotlib.pyplot.legend",
"numpy.cos",
"matplotlib.pyplot.ylabel",
"ma... | [((512, 533), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (527, 533), False, 'import sys\n'), ((914, 931), 'numpy.random.seed', 'np.random.seed', (['(0)'], {}), '(0)\n', (928, 931), True, 'import numpy as np\n'), ((1022, 1047), 'numpy.random.randn', 'np.random.randn', (['n_states'], {}), '(n_s... |
import discord
import os
import time
#from dotenv import load_dotenv
import numpy as np
import matplotlib.pyplot as plt
from scipy.special import binom
import io
import urllib, base64
from random import randint
import random
import asyncio
from boto.s3.connection import S3Connection
client = discord.Client()
#... | [
"os.remove",
"numpy.arctan2",
"numpy.sum",
"numpy.abs",
"numpy.argsort",
"numpy.mean",
"discord.Game",
"numpy.sin",
"numpy.atleast_2d",
"random.randint",
"discord.File",
"numpy.append",
"numpy.linspace",
"matplotlib.pyplot.subplots",
"discord.Client",
"scipy.special.binom",
"asyncio.... | [((302, 318), 'discord.Client', 'discord.Client', ([], {}), '()\n', (316, 318), False, 'import discord\n'), ((2971, 2997), 'numpy.linspace', 'np.linspace', (['(0)', '(1)'], {'num': 'num'}), '(0, 1, num=num)\n', (2982, 2997), True, 'import numpy as np\n'), ((3007, 3025), 'numpy.zeros', 'np.zeros', (['(num, 2)'], {}), '(... |
import os
import numpy as np
import matplotlib.pyplot as plt
def head0_der(u):
if (u >= 0.0):
if (u < 0.5):
return -8.0/3.0 * u
elif (u <= 1.5):
return 4.0/3.0 * u - 2.0
return 0.0
def head1_der(u):
if (u >= -1.0):
if (u < -0.5):
return 8.0/3.0 *... | [
"matplotlib.pyplot.figure",
"numpy.zeros",
"matplotlib.pyplot.show"
] | [((1173, 1190), 'numpy.zeros', 'np.zeros', (['(num + 1)'], {}), '(num + 1)\n', (1181, 1190), True, 'import numpy as np\n'), ((1197, 1214), 'numpy.zeros', 'np.zeros', (['(num + 1)'], {}), '(num + 1)\n', (1205, 1214), True, 'import numpy as np\n'), ((1418, 1430), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n'... |
"""
Make a tiny debuggable version of train_x_lpd_5_phr.npz
"""
import numpy as np
import sys
if __name__ == '__main__':
with np.load('train_x_lpd_5_phr.npz') as f:
data = np.zeros(f['shape'], np.bool_)
data[[x for x in f['nonzero']]] = True
data = data[:10000]
np.savez_compressed('train_x... | [
"numpy.savez_compressed",
"numpy.zeros",
"numpy.load"
] | [((292, 344), 'numpy.savez_compressed', 'np.savez_compressed', (['"""train_x_lpd_5_phr_debug"""', 'data'], {}), "('train_x_lpd_5_phr_debug', data)\n", (311, 344), True, 'import numpy as np\n'), ((132, 164), 'numpy.load', 'np.load', (['"""train_x_lpd_5_phr.npz"""'], {}), "('train_x_lpd_5_phr.npz')\n", (139, 164), True, ... |
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 14 18:00:19 2018
@author: asus-task
This script is to demonstrate the process of decoding old (coded 0) and new (coded 1) and scramble (coded 2) images by the ERP (EEG) signals.
1. Stack the ERPs to form the dataset
2. Split the dataset into training (80%) and testing (20... | [
"os.mkdir",
"matplotlib.rc",
"numpy.load",
"numpy.sum",
"sklearn.preprocessing.StandardScaler",
"numpy.mean",
"numpy.arange",
"glob.glob",
"sklearn.svm.SVC",
"os.chdir",
"mne.decoding.Vectorizer",
"os.path.exists",
"matplotlib.pyplot.colorbar",
"numpy.linspace",
"matplotlib.pyplot.subplo... | [((11780, 11825), 'glob.glob', 'glob', (["(working_dir + '*_shuffle*(3 classes).p')"], {}), "(working_dir + '*_shuffle*(3 classes).p')\n", (11784, 11825), False, 'from glob import glob\n'), ((11952, 12052), 'mne.read_epochs', 'mne.read_epochs', (['"""D:/NING - spindle/VCRT_study/data/0.1-40 Hz/3 classes-epo.fif"""'], {... |
import torch
import torch.nn as nn
import numpy as np
import time
import torch.nn.functional as F
import sentencepiece as spm
import model_pairing
import model_utils
import random
import os
from torch.nn.modules.distance import CosineSimilarity
from torch.nn.utils.rnn import pad_packed_sequence as unpack
from torch.nn.... | [
"model_utils.Example",
"sentencepiece.SentencePieceProcessor",
"random.shuffle",
"torch.nn.functional.dropout",
"model_utils.max_pool",
"torch.nn.utils.rnn.pad_packed_sequence",
"torch.device",
"model_utils.mean_pool",
"random.randint",
"torch.load",
"torch.zeros",
"torch.nn.LSTM",
"model_pa... | [((574, 595), 'torch.load', 'torch.load', (['load_file'], {}), '(load_file)\n', (584, 595), False, 'import torch\n'), ((2057, 2096), 'torch.nn.MarginRankingLoss', 'nn.MarginRankingLoss', ([], {'margin': 'self.delta'}), '(margin=self.delta)\n', (2077, 2096), True, 'import torch.nn as nn\n'), ((2119, 2137), 'torch.nn.mod... |
# -*- coding: utf-8 -*-
"""
Master Thesis <NAME>
Parameter File
"""
###############################################################################
## IMPORT PACKAGES & SCRIPTS ##
###############################################################################
#### PACKAGES ####
import gurobipy as gp
import... | [
"gurobipy.setParam",
"numpy.sqrt"
] | [((599, 627), 'gurobipy.setParam', 'gp.setParam', (['"""OutputFlag"""', '(0)'], {}), "('OutputFlag', 0)\n", (610, 627), True, 'import gurobipy as gp\n'), ((4593, 4645), 'numpy.sqrt', 'np.sqrt', (['((1 - power_factor ** 2) / power_factor ** 2)'], {}), '((1 - power_factor ** 2) / power_factor ** 2)\n', (4600, 4645), True... |
#!/usr/bin/env python
import pyrap.tables as pt
import numpy as np
import string
def read_corr(msname):
tt=pt.table(msname,readonly=False)
c=tt.getcol('DATA')
S=np.linalg.norm(c)
n=(np.random.normal(-1,1,c.shape)+1j*np.random.normal(-1,1,c.shape))
# mean should be zero
n=n-np.mean(n)
N=np.linalg.norm(n)... | [
"pyrap.tables.table",
"numpy.mean",
"numpy.linalg.norm",
"numpy.random.normal"
] | [((111, 143), 'pyrap.tables.table', 'pt.table', (['msname'], {'readonly': '(False)'}), '(msname, readonly=False)\n', (119, 143), True, 'import pyrap.tables as pt\n'), ((169, 186), 'numpy.linalg.norm', 'np.linalg.norm', (['c'], {}), '(c)\n', (183, 186), True, 'import numpy as np\n'), ((303, 320), 'numpy.linalg.norm', 'n... |
#!/usr/bin/env python3
import state
import commands
from coord import Coord, diff, UP, DOWN, LEFT, RIGHT, FORWARD, BACK
import sys, os
import math
from algorithm import *
import numpy as np
from math import floor, ceil, sqrt
import cProfile
def next_best_point(st, bot=None):
minX = bot.region["minX"]
maxX = bo... | [
"coord.Coord",
"state.State.create",
"math.floor",
"cProfile.runctx",
"numpy.transpose",
"commands.export_nbt"
] | [((6505, 6540), 'state.State.create', 'state.State.create', (['*args'], {}), '(*args, **kwargs)\n', (6523, 6540), False, 'import state\n'), ((7629, 7658), 'commands.export_nbt', 'commands.export_nbt', (['st.trace'], {}), '(st.trace)\n', (7648, 7658), False, 'import commands\n'), ((1307, 1334), 'coord.Coord', 'Coord', (... |
"""
Wraps geometric procedures
"""
import copy
import json
from typing import Any, Dict, List
import numpy as np
from ..extras import find_module
from ..interface.models import TorsionDriveRecord
from .service_util import BaseService, TaskManager
__all__ = ["TorsionDriveService"]
__td_api = find_module("torsiondri... | [
"json.loads",
"torsiondrive.td_api.create_initial_state",
"json.dumps",
"numpy.argmin",
"torsiondrive.td_api.grid_id_from_string",
"torsiondrive.td_api.next_jobs_from_state",
"torsiondrive.td_api.update_state"
] | [((2147, 2176), 'json.dumps', 'json.dumps', (['molecule_template'], {}), '(molecule_template)\n', (2157, 2176), False, 'import json\n'), ((2252, 2653), 'torsiondrive.td_api.create_initial_state', 'td_api.create_initial_state', ([], {'dihedrals': 'output.keywords.dihedrals', 'grid_spacing': 'output.keywords.grid_spacing... |
import numpy as np
from keras import backend as K
import os
import sys
def main():
K.set_image_dim_ordering('tf')
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from keras_video_classifier.library.utility.plot_utils import plot_and_save_history,plot_history_2win
from keras_video_classi... | [
"numpy.random.seed",
"keras_video_classifier.library.utility.plot_utils.plot_history_2win",
"os.path.dirname",
"keras_video_classifier.library.utility.plot_utils.plot_and_save_history",
"keras_video_classifier.library.recurrent_networks.VGG16LSTMVideoClassifier",
"keras.backend.set_image_dim_ordering",
... | [((89, 119), 'keras.backend.set_image_dim_ordering', 'K.set_image_dim_ordering', (['"""tf"""'], {}), "('tf')\n", (113, 119), True, 'from keras import backend as K\n'), ((788, 806), 'numpy.random.seed', 'np.random.seed', (['(42)'], {}), '(42)\n', (802, 806), True, 'import numpy as np\n'), ((929, 953), 'keras_video_class... |
"""
Time Series Statistics
----------------------
"""
import math
from typing import List, Optional, Tuple, Union
import matplotlib.pyplot as plt
import numpy as np
from scipy.signal import argrelmax
from scipy.stats import norm
from statsmodels.tsa.seasonal import STL, seasonal_decompose
from statsmodels.tsa.stattoo... | [
"scipy.stats.norm.ppf",
"darts.TimeSeries.from_times_and_values",
"scipy.stats.norm",
"darts.logging.raise_if",
"darts.logging.raise_if_not",
"math.sqrt",
"math.ceil",
"matplotlib.pyplot.figure",
"scipy.signal.argrelmax",
"numpy.arange",
"numpy.array",
"numpy.linspace",
"matplotlib.pyplot.Ma... | [((586, 606), 'darts.logging.get_logger', 'get_logger', (['__name__'], {}), '(__name__)\n', (596, 606), False, 'from darts.logging import get_logger, raise_if, raise_if_not, raise_log\n'), ((4899, 5014), 'darts.logging.raise_if_not', 'raise_if_not', (['(model in ModelMode or model in SeasonalityMode)', 'f"""Unknown val... |
# coding=utf-8
# Copyright 2022 The Deeplab2 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 ... | [
"tensorflow.test.main",
"deeplab2.data.data_utils.SegmentationDecoder",
"io.BytesIO",
"numpy.testing.assert_array_equal",
"numpy.random.RandomState",
"PIL.Image.fromarray"
] | [((845, 857), 'io.BytesIO', 'io.BytesIO', ([], {}), '()\n', (855, 857), False, 'import io\n'), ((3436, 3450), 'tensorflow.test.main', 'tf.test.main', ([], {}), '()\n', (3448, 3450), True, 'import tensorflow as tf\n'), ((1036, 1068), 'numpy.random.RandomState', 'np.random.RandomState', (['(319281498)'], {}), '(319281498... |
import os
import shutil
import subprocess
from matplotlib import image
from numpy import testing as np
TEST_DIR = os.path.dirname(os.path.abspath(__file__))
PYDV_DIR = os.path.dirname(TEST_DIR)
BASELINE_DIR = os.path.join(TEST_DIR, 'baseline')
# ------------------------ #
# --- Prepare the data --- #
# ------------... | [
"os.path.abspath",
"os.makedirs",
"os.path.dirname",
"os.path.exists",
"numpy.testing.assert_equal",
"shutil.rmtree",
"os.path.join"
] | [((171, 196), 'os.path.dirname', 'os.path.dirname', (['TEST_DIR'], {}), '(TEST_DIR)\n', (186, 196), False, 'import os\n'), ((212, 246), 'os.path.join', 'os.path.join', (['TEST_DIR', '"""baseline"""'], {}), "(TEST_DIR, 'baseline')\n", (224, 246), False, 'import os\n'), ((436, 468), 'os.path.join', 'os.path.join', (['TES... |
import numpy as np
def get_phases(t,P,t0):
"""
Given input times, a period (or posterior dist of periods)
and time of transit center (or posterior), returns the
phase at each time t.
"""
if type(t) is not float:
phase = ((t - np.median(t0))/np.median(P)) % 1
ii = np.where(phase... | [
"numpy.argsort",
"numpy.where",
"numpy.zeros",
"numpy.median"
] | [((1444, 1464), 'numpy.zeros', 'np.zeros', (['X.shape[1]'], {}), '(X.shape[1])\n', (1452, 1464), True, 'import numpy as np\n'), ((1466, 1486), 'numpy.zeros', 'np.zeros', (['X.shape[1]'], {}), '(X.shape[1])\n', (1474, 1486), True, 'import numpy as np\n'), ((1488, 1508), 'numpy.zeros', 'np.zeros', (['X.shape[1]'], {}), '... |
#!/usr/bin/env python3
# (C) Copyright 2020 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its statu... | [
"pandas.DataFrame",
"climetlab.core.metadata.annotate",
"pandas.date_range",
"pandas.Timestamp",
"numpy.random.randn",
"xarray.DataArray",
"numpy.random.rand",
"climetlab.core.metadata.annotation"
] | [((633, 671), 'pandas.DataFrame', 'pd.DataFrame', (['data'], {'columns': "['a', 'b']"}), "(data, columns=['a', 'b'])\n", (645, 671), True, 'import pandas as pd\n'), ((790, 805), 'climetlab.core.metadata.annotation', 'annotation', (['df1'], {}), '(df1)\n', (800, 805), False, 'from climetlab.core.metadata import annotate... |
#!/usr/bin/python
# pip install lxml
import sys
import os
import json
import xml.etree.ElementTree as ET
from pycocotools.coco import COCO
from pycocotools import mask
import glob
import numpy as np
from skimage import measure
from PIL import Image
START_BOUNDING_BOX_ID = 1
PRE_DEFINE_CATEGORIES = None
# If necessar... | [
"numpy.pad",
"xml.etree.ElementTree.parse",
"numpy.flip",
"numpy.subtract",
"os.path.basename",
"os.path.dirname",
"numpy.unique",
"pycocotools.mask.area",
"pycocotools.mask.toBbox",
"json.dumps",
"PIL.Image.open",
"numpy.array",
"skimage.measure.find_contours",
"numpy.array_equal",
"os.... | [((1787, 1855), 'numpy.pad', 'np.pad', (['binary_mask'], {'pad_width': '(1)', 'mode': '"""constant"""', 'constant_values': '(0)'}), "(binary_mask, pad_width=1, mode='constant', constant_values=0)\n", (1793, 1855), True, 'import numpy as np\n'), ((1871, 1917), 'skimage.measure.find_contours', 'measure.find_contours', ([... |
import pytest
import torch
import torch.nn as nn
from torch import sin, cos
import numpy as np
from neurodiffeq import diff
from neurodiffeq.generators import GeneratorSpherical
from neurodiffeq.function_basis import ZonalSphericalHarmonics
from neurodiffeq.networks import FCNN
from neurodiffeq.operators import spheric... | [
"neurodiffeq.diff",
"numpy.random.seed",
"neurodiffeq.operators.cartesian_to_spherical",
"torch.manual_seed",
"neurodiffeq.operators.spherical_to_cartesian",
"neurodiffeq.operators.spherical_curl",
"pytest.fixture",
"neurodiffeq.function_basis.ZonalSphericalHarmonics",
"neurodiffeq.operators.spheric... | [((624, 652), 'pytest.fixture', 'pytest.fixture', ([], {'autouse': '(True)'}), '(autouse=True)\n', (638, 652), False, 'import pytest\n'), ((670, 691), 'torch.manual_seed', 'torch.manual_seed', (['(42)'], {}), '(42)\n', (687, 691), False, 'import torch\n'), ((696, 714), 'numpy.random.seed', 'np.random.seed', (['(42)'], ... |
#!/usr/bin/env python3
# coding: utf-8
"""
PanelResolver class
Copyright 2017 MicaSense, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in the
Software without restriction, including without limitation the... | [
"skimage.measure.grid_points_in_poly",
"matplotlib.pyplot.tight_layout",
"numpy.poly1d",
"cv2.contourArea",
"matplotlib.pyplot.show",
"numpy.polyfit",
"cv2.cvtColor",
"pyzbar.pyzbar.decode",
"numpy.asarray",
"numpy.roll",
"cv2.getPerspectiveTransform",
"numpy.fliplr",
"numpy.array",
"re.se... | [((3507, 3569), 'pyzbar.pyzbar.decode', 'pyzbar.decode', (['self.gray8b'], {'symbols': '[pyzbar.ZBarSymbol.QRCODE]'}), '(self.gray8b, symbols=[pyzbar.ZBarSymbol.QRCODE])\n', (3520, 3569), True, 'import pyzbar.pyzbar as pyzbar\n'), ((8203, 8269), 'numpy.asarray', 'np.asarray', (['[[-p, p], [p, p], [p, -p], [-p, -p]]'], ... |
# Copyright (c) Microsoft Corporation and contributors.
# Licensed under the MIT License.
import warnings
import numpy as np
from scipy import stats
from ..embed import select_dimension, AdjacencySpectralEmbed
from ..utils import import_graph, fit_plug_in_variance_estimator
from ..align import SignFlips
from ..align... | [
"sklearn.metrics.pairwise.PAIRWISE_KERNEL_FUNCTIONS.keys",
"scipy.stats.multivariate_normal.rvs",
"sklearn.metrics.pairwise.PAIRED_DISTANCES.keys",
"sklearn.utils.check_array",
"sklearn.metrics.pairwise_distances",
"numpy.zeros",
"hyppo.ksample.KSample",
"sklearn.metrics.pairwise.pairwise_kernels",
... | [((728, 751), 'sklearn.metrics.pairwise.PAIRED_DISTANCES.keys', 'PAIRED_DISTANCES.keys', ([], {}), '()\n', (749, 751), False, 'from sklearn.metrics.pairwise import PAIRED_DISTANCES\n'), ((775, 807), 'sklearn.metrics.pairwise.PAIRWISE_KERNEL_FUNCTIONS.keys', 'PAIRWISE_KERNEL_FUNCTIONS.keys', ([], {}), '()\n', (805, 807)... |
"""
@brief test tree node (time=2s)
"""
import unittest
import numpy
from pyquickhelper.pycode import ExtTestCase
from mlprodict.testing import check_is_almost_equal
class TestTesting(ExtTestCase):
def test_check_is_almost_equal(self):
l1 = numpy.array([1, 2])
l2 = numpy.array([1, 2])
... | [
"unittest.main",
"numpy.array",
"mlprodict.testing.check_is_almost_equal"
] | [((654, 669), 'unittest.main', 'unittest.main', ([], {}), '()\n', (667, 669), False, 'import unittest\n'), ((261, 280), 'numpy.array', 'numpy.array', (['[1, 2]'], {}), '([1, 2])\n', (272, 280), False, 'import numpy\n'), ((294, 313), 'numpy.array', 'numpy.array', (['[1, 2]'], {}), '([1, 2])\n', (305, 313), False, 'impor... |
# code to get tflite running a model on raspberry pi source from
#https://github.com/EdjeElectronics/TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi/blob/master/TFLite_detection_stream.py
#
#
import os
import argparse
import cv2
import numpy as np
import sys
import time
from threading import Thread
import ... | [
"argparse.ArgumentParser",
"cv2.VideoWriter_fourcc",
"cv2.getTickCount",
"cv2.rectangle",
"cv2.imshow",
"os.path.join",
"cv2.getTickFrequency",
"cv2.cvtColor",
"GarageServo.GarageServo",
"tflite_runtime.interpreter.Interpreter",
"cv2.destroyAllWindows",
"datetime.datetime.now",
"cv2.resize",... | [((1368, 1393), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1391, 1393), False, 'import argparse\n'), ((1819, 1830), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1828, 1830), False, 'import os\n'), ((1847, 1893), 'os.path.join', 'os.path.join', (['CWD_PATH', 'MODEL_NAME', 'GRAPH_NAME'], {})... |
# -*- coding: utf-8 -*-
'''
This module defines :class:`EpochArray`, an array of epochs. Introduced for
performance reasons.
:class:`EpochArray` derives from :class:`BaseNeo`, from
:module:`neo.core.baseneo`.
'''
# needed for python 3 compatibility
from __future__ import absolute_import, division, print_function
imp... | [
"neo.core.baseneo.BaseNeo.__init__",
"numpy.dtype",
"numpy.hstack",
"numpy.array",
"neo.core.baseneo.merge_annotations"
] | [((2330, 2433), 'neo.core.baseneo.BaseNeo.__init__', 'BaseNeo.__init__', (['self'], {'name': 'name', 'file_origin': 'file_origin', 'description': 'description'}), '(self, name=name, file_origin=file_origin, description=\n description, **annotations)\n', (2346, 2433), False, 'from neo.core.baseneo import BaseNeo, mer... |
#!/usr/bin/python3
import pandas as pd
import torch
from torch.utils.data import Dataset
from torch.autograd import Variable
import numpy as np
import time
class CollisionDataset(Dataset):
"""
Abstract class for the collion detection
Args
path: (string) path to the dataset
"""
def __init__... | [
"pandas.read_csv",
"numpy.asarray",
"torch.from_numpy"
] | [((353, 374), 'pandas.read_csv', 'pd.read_csv', (['csv_path'], {}), '(csv_path)\n', (364, 374), True, 'import pandas as pd\n'), ((859, 908), 'numpy.asarray', 'np.asarray', (['self._data[idx, input_num]'], {'dtype': 'int'}), '(self._data[idx, input_num], dtype=int)\n', (869, 908), True, 'import numpy as np\n'), ((771, 8... |
import numpy as np
n,m = map(int, input().split())
b = np.array([list(map(int, input().split())) for _ in range(n)], dtype = np.int32)
np.set_printoptions(legacy='1.13')
print(np.mean(b, axis = 1))
print(np.var(b, axis = 0))
print(np.std(b)) | [
"numpy.mean",
"numpy.set_printoptions",
"numpy.var",
"numpy.std"
] | [((138, 172), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'legacy': '"""1.13"""'}), "(legacy='1.13')\n", (157, 172), True, 'import numpy as np\n'), ((179, 197), 'numpy.mean', 'np.mean', (['b'], {'axis': '(1)'}), '(b, axis=1)\n', (186, 197), True, 'import numpy as np\n'), ((207, 224), 'numpy.var', 'np.var', (... |
import torch
import numpy as np
def compute_cmvn_epoch(opt, train_loader, enhance_model, feat_model):
enhance_model.eval()
feat_model.eval()
torch.set_grad_enabled(False)
##print(enhance_model.state_dict())
enhance_cmvn_file = os.path.join(opt.exp_path, 'enhance_cmvn.npy')
for i, (data) in enume... | [
"numpy.save",
"torch.FloatTensor",
"torch.set_grad_enabled"
] | [((153, 182), 'torch.set_grad_enabled', 'torch.set_grad_enabled', (['(False)'], {}), '(False)\n', (175, 182), False, 'import torch\n'), ((837, 868), 'torch.FloatTensor', 'torch.FloatTensor', (['enhance_cmvn'], {}), '(enhance_cmvn)\n', (854, 868), False, 'import torch\n'), ((922, 950), 'torch.set_grad_enabled', 'torch.s... |
import os
import pickle
import json
import numpy as np
from kopt import CompileFN, test_fn
from hyperopt import fmin, tpe, hp, Trials
import keras.optimizers as opt
from . import io
from .network import AE_types
def hyper(args):
adata = io.read_dataset(args.input,
transpose=args.tran... | [
"json.dump",
"pickle.dump",
"hyperopt.hp.uniform",
"numpy.log",
"hyperopt.Trials",
"hyperopt.hp.choice",
"hyperopt.fmin",
"kopt.CompileFN",
"kopt.test_fn",
"os.path.join"
] | [((3022, 3070), 'os.path.join', 'os.path.join', (['args.outputdir', '"""hyperopt_results"""'], {}), "(args.outputdir, 'hyperopt_results')\n", (3034, 3070), False, 'import os\n'), ((3087, 3324), 'kopt.CompileFN', 'CompileFN', (['"""autoencoder_hyperpar_db"""', '"""myexp1"""'], {'data_fn': 'data_fn', 'model_fn': 'model_f... |
#%%
from xmlrpc.client import boolean
import numpy as np
from numpy.linalg import matrix_power
from typing import Callable, List
#%%
class graph_data:
def __init__(self, graph: np.array, features: np.array):
n1, n2 = np.shape(graph)
if (n1 != n2):
raise ValueError("graph must be a squ... | [
"numpy.shape",
"numpy.zeros",
"numpy.concatenate"
] | [((232, 247), 'numpy.shape', 'np.shape', (['graph'], {}), '(graph)\n', (240, 247), True, 'import numpy as np\n'), ((350, 368), 'numpy.shape', 'np.shape', (['features'], {}), '(features)\n', (358, 368), True, 'import numpy as np\n'), ((647, 682), 'numpy.zeros', 'np.zeros', ([], {'shape': 'self.features.shape'}), '(shape... |
import numpy as np
from skimage._shared.testing import assert_equal
from skimage import data
from skimage import transform as tf
from skimage.color import rgb2gray
from skimage.feature import (BRIEF, match_descriptors,
corner_peaks, corner_harris)
from skimage._shared import testing
def t... | [
"skimage._shared.testing.raises",
"skimage.color.rgb2gray",
"skimage._shared.testing.assert_equal",
"skimage.data.astronaut",
"numpy.zeros",
"skimage.feature.match_descriptors",
"skimage.transform.SimilarityTransform",
"skimage.feature.corner_harris",
"skimage.feature.BRIEF",
"numpy.array",
"num... | [((465, 530), 'numpy.array', 'np.array', (['[[True, True, False, True], [False, True, False, True]]'], {}), '([[True, True, False, True], [False, True, False, True]])\n', (473, 530), True, 'import numpy as np\n'), ((567, 646), 'numpy.array', 'np.array', (['[[True, False, False, True, False], [False, True, True, True, F... |
import numpy as np
import pytest
import torch
from scipy.spatial.distance import pdist, squareform
from finetuner.tuner.pytorch.losses import get_distance
N_BATCH = 10
N_DIM = 128
@pytest.mark.parametrize('distance', ['cosine', 'euclidean', 'sqeuclidean'])
def test_dist(distance):
embeddings = np.random.rand(N... | [
"numpy.random.rand",
"pytest.mark.parametrize",
"scipy.spatial.distance.pdist",
"torch.tensor"
] | [((185, 260), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""distance"""', "['cosine', 'euclidean', 'sqeuclidean']"], {}), "('distance', ['cosine', 'euclidean', 'sqeuclidean'])\n", (208, 260), False, 'import pytest\n'), ((304, 334), 'numpy.random.rand', 'np.random.rand', (['N_BATCH', 'N_DIM'], {}), '(N_BAT... |
import unittest
import numpy as np
import tensorflow as tf
from elasticdl_preprocessing.layers.concatenate_with_offset import (
ConcatenateWithOffset,
)
from elasticdl_preprocessing.tests.test_utils import (
ragged_tensor_equal,
sparse_tensor_equal,
)
class ConcatenateWithOffsetTest(unittest.TestCase):
... | [
"elasticdl_preprocessing.tests.test_utils.sparse_tensor_equal",
"elasticdl_preprocessing.tests.test_utils.ragged_tensor_equal",
"tensorflow.constant",
"elasticdl_preprocessing.layers.concatenate_with_offset.ConcatenateWithOffset",
"numpy.array",
"tensorflow.ragged.constant"
] | [((383, 411), 'tensorflow.constant', 'tf.constant', (['[[1], [1], [1]]'], {}), '([[1], [1], [1]])\n', (394, 411), True, 'import tensorflow as tf\n'), ((431, 459), 'tensorflow.constant', 'tf.constant', (['[[2], [2], [2]]'], {}), '([[2], [2], [2]])\n', (442, 459), True, 'import tensorflow as tf\n'), ((509, 555), 'elastic... |
import numpy as np
def print_results(iter, FO_evaluations, gbest, pworst,
error_fnc, error_x, swarm_size, n_variables,
intVar, print_freq):
"""
Auxiliary function to print PSO results
:param iter: numer of iteration
:param FO_evaluations:
:param gb... | [
"numpy.array"
] | [((861, 877), 'numpy.array', 'np.array', (['intVar'], {}), '(intVar)\n', (869, 877), True, 'import numpy as np\n')] |
# Copyright 2021 The ByT5 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 or agreed to in wri... | [
"numpy.zeros",
"random.shuffle",
"functools.partial",
"seqio.TextLineDataSource"
] | [((9063, 9084), 'random.shuffle', 'random.shuffle', (['langs'], {}), '(langs)\n', (9077, 9084), False, 'import random\n'), ((1369, 1496), 'functools.partial', 'functools.partial', (['preprocessors.preprocess_tsv'], {'inputs_format': "(f' {language} ' + '{0}')", 'targets_format': '"""{1}"""', 'num_fields': '(2)'}), "(pr... |
# -*- coding: utf-8 -*-
import numpy as np
from ..io import edf
from ..io import xiaedf
class LazyFunction(object):
def __init__(self, samemerge=False):
self.samemerge = samemerge
def __str__(self):
return self._func.__class__.__name__
def __eq__(self, other):
return str(self) ... | [
"numpy.divide",
"numpy.errstate",
"numpy.clip"
] | [((622, 668), 'numpy.errstate', 'np.errstate', ([], {'divide': '"""ignore"""', 'invalid': '"""ignore"""'}), "(divide='ignore', invalid='ignore')\n", (633, 668), True, 'import numpy as np\n'), ((689, 712), 'numpy.divide', 'np.divide', (['fluxt', 'flux0'], {}), '(fluxt, flux0)\n', (698, 712), True, 'import numpy as np\n'... |
# coding=utf-8
# Copyright 2020 The TF-Agents 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | [
"tensorflow.test.main",
"tf_agents.specs.tensor_spec.TensorSpec",
"numpy.testing.assert_almost_equal",
"tf_agents.specs.tensor_spec.sample_spec_nest",
"tf_agents.trajectories.time_step.time_step_spec",
"tf_agents.environments.random_tf_environment.RandomTFEnvironment"
] | [((4175, 4189), 'tensorflow.test.main', 'tf.test.main', ([], {}), '()\n', (4187, 4189), True, 'import tensorflow as tf\n'), ((1165, 1207), 'tf_agents.specs.tensor_spec.TensorSpec', 'tensor_spec.TensorSpec', (['(2, 3)', 'tf.float32'], {}), '((2, 3), tf.float32)\n', (1187, 1207), False, 'from tf_agents.specs import tenso... |
import numpy as np
from data_loader import DataLoader
import random
class ReccurentNetwork:
def __init__(self, data, size):
self.data = data
self.input_size = size
self.output_size = size
self.hidden_size = 100
# Initialize weights and biases
self.W_input = np.rand... | [
"numpy.zeros_like",
"numpy.sum",
"numpy.tanh",
"numpy.log",
"numpy.argmax",
"random.shuffle",
"numpy.zeros",
"numpy.clip",
"data_loader.DataLoader",
"numpy.max",
"numpy.sqrt"
] | [((5584, 5596), 'data_loader.DataLoader', 'DataLoader', ([], {}), '()\n', (5594, 5596), False, 'from data_loader import DataLoader\n'), ((807, 838), 'numpy.zeros', 'np.zeros', (['(self.hidden_size, 1)'], {}), '((self.hidden_size, 1))\n', (815, 838), True, 'import numpy as np\n'), ((863, 894), 'numpy.zeros', 'np.zeros',... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# __init__.py
"""A module to simulate optical transfer functions and point spread functions.
If this file is run as a script (python -m pyotf.otf) it will compare
the HanserPSF to the SheppardPSF in a plot.
https://en.wikipedia.org/wiki/Optical_transfer_function
https://e... | [
"numpy.sin",
"numpy.linalg.norm",
"numpy.exp",
"numpy.arange",
"numpy.meshgrid",
"numpy.zeros_like",
"numpy.arcsin",
"numpy.finfo",
"numpy.fft.fftfreq",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.show",
"numpy.asarray",
"matplotlib.pyplot.style.context",
"numpy.fft.fftshift",
"nump... | [((749, 776), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (766, 776), False, 'import logging\n'), ((22125, 22141), 'copy.copy', 'copy.copy', (['model'], {}), '(model)\n', (22134, 22141), False, 'import copy\n'), ((27160, 27170), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (... |
"""Three-dimensional dam break over a dry bed. (14 hours)
The case is described as a SPHERIC benchmark
https://wiki.manchester.ac.uk/spheric/index.php/Test2
By default the simulation runs for 6 seconds of simulation time.
"""
import numpy as np
from pysph.base.kernels import WendlandQuintic
from pysph.examples._db... | [
"pysph.base.kernels.WendlandQuintic",
"pysph.examples._db_geometry.DamBreak3DGeometry",
"pysph.sph.scheme.WCSPHScheme",
"numpy.sqrt"
] | [((676, 702), 'numpy.sqrt', 'np.sqrt', (['(2.0 * 9.81 * 0.55)'], {}), '(2.0 * 9.81 * 0.55)\n', (683, 702), True, 'import numpy as np\n'), ((1240, 1327), 'pysph.examples._db_geometry.DamBreak3DGeometry', 'DamBreak3DGeometry', ([], {'dx': 'dx', 'nboundary_layers': 'nboundary_layers', 'hdx': 'self.hdx', 'rho0': 'ro'}), '(... |
import torch
import argparse
import onnx
import onnxruntime
from resnets_3d import resnet50_3d
import torch.autograd.profiler as profiler
import tvm.relay.op
from tqdm import tqdm
from tvm import relay
import tvm
from tvm import te
import numpy as np
import tvm.contrib.graph_executor as runtime
from tvm.relay import t... | [
"torch.cuda.synchronize",
"numpy.abs",
"argparse.ArgumentParser",
"numpy.allclose",
"tvm.relay.frontend.from_onnx",
"torch.randn",
"onnxruntime.InferenceSession",
"numpy.mean",
"torch.no_grad",
"torch2trt.torch2trt",
"resnets_3d.resnet50_3d",
"onnx.load",
"torch.cuda.Event",
"tvm.relay.fro... | [((467, 492), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (490, 492), False, 'import argparse\n'), ((927, 953), 'torch2trt.torch2trt', 'torch2trt', (['model', '[inputs]'], {}), '(model, [inputs])\n', (936, 953), False, 'from torch2trt import torch2trt\n'), ((2278, 2302), 'torch.randn', 'torc... |
# -------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
# ------------------------------------------------------------------... | [
"numpy.full",
"histopathology.utils.metrics_utils.plot_heatmap_overlay",
"pandas.DataFrame.from_dict",
"histopathology.utils.metrics_utils.plot_normalized_confusion_matrix",
"matplotlib.pyplot.close",
"ruamel.yaml.YAML",
"torch.save",
"histopathology.utils.metrics_utils.plot_scores_hist",
"health_az... | [((2287, 2301), 'matplotlib.pyplot.close', 'plt.close', (['fig'], {}), '(fig)\n', (2296, 2301), True, 'import matplotlib.pyplot as plt\n'), ((4501, 4538), 'pandas.concat', 'pd.concat', (['df_list'], {'ignore_index': '(True)'}), '(df_list, ignore_index=True)\n', (4510, 4538), True, 'import pandas as pd\n'), ((4801, 4872... |
from numpy import array
def scigrid_2011_01_07_12():
ppc = {"version": '2'}
ppc["baseMVA"] = 100.0
ppc["bus"] = array([
[586, 3, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[589, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[590, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1,... | [
"numpy.array"
] | [((115, 112642), 'numpy.array', 'array', (['[[586, 3, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9], [589, 2, 0, 0, 0, 0, \n 0, 1.0, 0, 380.0, 0, 1.1, 0.9], [590, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, \n 0, 1.1, 0.9], [593, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9], [594,\n 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1,... |
import numpy as np
import tensorflow as tf
from kerod.core.box_ops import convert_to_center_coordinates
from kerod.layers.post_processing.post_processing_detr import post_processing
def test_post_processing_batch_size2():
logits = tf.constant([[[-100., 0, 100], [-100., 1000, -100]], [[4., 0, 3], [-100., 1000,
... | [
"tensorflow.nn.softmax",
"kerod.layers.post_processing.post_processing_detr.post_processing",
"kerod.core.box_ops.convert_to_center_coordinates",
"tensorflow.constant",
"numpy.array"
] | [((237, 334), 'tensorflow.constant', 'tf.constant', (['[[[-100.0, 0, 100], [-100.0, 1000, -100]], [[4.0, 0, 3], [-100.0, 1000, -100]]]'], {}), '([[[-100.0, 0, 100], [-100.0, 1000, -100]], [[4.0, 0, 3], [-\n 100.0, 1000, -100]]])\n', (248, 334), True, 'import tensorflow as tf\n'), ((418, 448), 'tensorflow.nn.softmax'... |
import numpy as np
import xarray as xr
import warnings
# import mpl and change the backend before other mpl imports
try:
import matplotlib as mpl
from matplotlib.transforms import blended_transform_factory
mpl.use("Agg")
import matplotlib.pyplot as plt
mpl = True
except ImportError:
raise Run... | [
"numpy.meshgrid",
"gsw.SA_from_SP",
"numpy.isnan",
"gsw.CT_from_pt",
"matplotlib.pyplot.text",
"numpy.max",
"matplotlib.use",
"numpy.array",
"numpy.diff",
"matplotlib.transforms.blended_transform_factory",
"matplotlib.pyplot.gca",
"numpy.linspace",
"warnings.warn",
"matplotlib.pyplot.gcf",... | [((220, 234), 'matplotlib.use', 'mpl.use', (['"""Agg"""'], {}), "('Agg')\n", (227, 234), True, 'import matplotlib as mpl\n'), ((2541, 2594), 'matplotlib.transforms.blended_transform_factory', 'blended_transform_factory', (['ax.transData', 'ax.transAxes'], {}), '(ax.transData, ax.transAxes)\n', (2566, 2594), False, 'fro... |
import numpy as np
import pytest
from numpy.testing import (
assert_,
assert_raises, assert_almost_equal, assert_allclose)
import pyccl as ccl
from pyccl import CCLWarning
def pk1d(k):
return (k/0.1)**(-1)
def grw(a):
return a
def pk2d(k, a):
return pk1d(k)*grw(a)
def lpk2d(k, a):
return... | [
"pyccl.Pk2D",
"numpy.logspace",
"numpy.allclose",
"pyccl.Cosmology",
"numpy.arange",
"numpy.exp",
"pyccl.angular_cl",
"pytest.mark.parametrize",
"pyccl.CosmologyCalculator",
"pytest.warns",
"numpy.geomspace",
"numpy.testing.assert_almost_equal",
"numpy.isfinite",
"pyccl.CosmologyVanillaLCD... | [((1741, 1831), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""model"""', "['bbks', 'eisenstein_hu', 'eisenstein_hu_nowiggles']"], {}), "('model', ['bbks', 'eisenstein_hu',\n 'eisenstein_hu_nowiggles'])\n", (1764, 1831), False, 'import pytest\n'), ((3856, 3915), 'pytest.mark.parametrize', 'pytest.mark.p... |
import pandas as pd
import numpy as np
from PIL import Image
import os
import importdataset
from keras import applications, Input
from keras.layers import Dense, Dropout, Flatten, Conv2D, MaxPool2D, GlobalAveragePooling2D, AveragePooling2D, Flatten
from keras.models import Sequential, Model, load_model
from keras.optim... | [
"h5py.File",
"numpy.argmax",
"os.getcwd",
"tensorflow.config.list_physical_devices",
"tensorflow.config.experimental.set_memory_growth",
"numpy.array",
"os.path.join",
"tensorflow.keras.applications.EfficientNetB7"
] | [((603, 641), 'tensorflow.config.list_physical_devices', 'tf.config.list_physical_devices', (['"""GPU"""'], {}), "('GPU')\n", (634, 641), True, 'import tensorflow as tf\n'), ((642, 709), 'tensorflow.config.experimental.set_memory_growth', 'tf.config.experimental.set_memory_growth', (['physical_devices[0]', '(True)'], {... |
def calc(f, G0, GI, Beta):
""" calculate SWS as a function of frequency
:param f: vector of frequency (Hz)
:param G0: G_o (Pa)
:param GI: G_inf (Pa)
:param Beta: exponential relaxation constant (s^-1)
:returms: c_omega (SWS in m/s as a function of omega (rad/s)
"""
import numpy as np
... | [
"numpy.array",
"numpy.sqrt"
] | [((340, 351), 'numpy.array', 'np.array', (['f'], {}), '(f)\n', (348, 351), True, 'import numpy as np\n'), ((800, 837), 'numpy.sqrt', 'np.sqrt', (['(muprime ** 2 + muprime2 ** 2)'], {}), '(muprime ** 2 + muprime2 ** 2)\n', (807, 837), True, 'import numpy as np\n'), ((630, 667), 'numpy.sqrt', 'np.sqrt', (['(muprime ** 2 ... |
import pandas as pd
import numpy as np
from output import Logger, ResultFileWriter
def calculate_distance(u, v) -> float:
'''
Distance function for calculating euclidean distance between two tuples
'''
distance = 0
for index in range(2, len(u) - 1):
# add 0.5 to distance if there is ... | [
"pandas.DataFrame",
"output.Logger",
"output.ResultFileWriter",
"numpy.array",
"pandas.isna"
] | [((740, 748), 'output.Logger', 'Logger', ([], {}), '()\n', (746, 748), False, 'from output import Logger, ResultFileWriter\n'), ((805, 823), 'output.ResultFileWriter', 'ResultFileWriter', ([], {}), '()\n', (821, 823), False, 'from output import Logger, ResultFileWriter\n'), ((2700, 2725), 'numpy.array', 'np.array', (['... |
"""
#Trains a TCN on the IMDB sentiment classification task.
Output after 1 epochs on CPU: ~0.8611
Time per epoch on CPU (Core i7): ~64s.
Based on: https://github.com/keras-team/keras/blob/master/examples/imdb_bidirectional_lstm.py
"""
import numpy as np
from tensorflow.keras import Sequential
from tensorflow.keras.dat... | [
"tcn.TCN",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.datasets.imdb.load_data",
"tensorflow.keras.preprocessing.sequence.pad_sequences",
"numpy.array",
"tensorflow.keras.layers.Embedding"
] | [((664, 702), 'tensorflow.keras.datasets.imdb.load_data', 'imdb.load_data', ([], {'num_words': 'max_features'}), '(num_words=max_features)\n', (678, 702), False, 'from tensorflow.keras.datasets import imdb\n'), ((830, 876), 'tensorflow.keras.preprocessing.sequence.pad_sequences', 'sequence.pad_sequences', (['x_train'],... |
import numpy as np
def dist(a, b, ax=-1):
return np.linalg.norm(a - b, axis=ax) | [
"numpy.linalg.norm"
] | [((54, 84), 'numpy.linalg.norm', 'np.linalg.norm', (['(a - b)'], {'axis': 'ax'}), '(a - b, axis=ax)\n', (68, 84), True, 'import numpy as np\n')] |
# Copyright 2019 Xilinx Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | [
"os.mkdir",
"argparse.ArgumentParser",
"skimage.io.imsave",
"os.path.isdir",
"numpy.transpose",
"numpy.expand_dims",
"numpy.min",
"numpy.max",
"caffe.Net",
"matplotlib.pyplot.imread"
] | [((1118, 1143), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1141, 1143), False, 'import argparse\n'), ((1721, 1768), 'caffe.Net', 'caffe.Net', (['model_def', 'model_weights', 'caffe.TEST'], {}), '(model_def, model_weights, caffe.TEST)\n', (1730, 1768), False, 'import caffe\n'), ((1469, 1503... |
# Lint as: python3
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | [
"lingvo.compat.test.main",
"six.moves.range",
"lingvo.compat.einsum",
"lingvo.compat.Graph",
"lingvo.compat.concat",
"lingvo.core.spectrum_augmenter.SpectrumAugmenter.Params",
"lingvo.compat.range",
"lingvo.compat.cast",
"lingvo.compat.expand_dims",
"numpy.shape",
"lingvo.core.spectrum_augmenter... | [((19812, 19826), 'lingvo.compat.test.main', 'tf.test.main', ([], {}), '()\n', (19824, 19826), True, 'import lingvo.compat as tf\n'), ((15361, 15371), 'lingvo.compat.Graph', 'tf.Graph', ([], {}), '()\n', (15369, 15371), True, 'import lingvo.compat as tf\n'), ((1119, 1142), 'lingvo.compat.random.set_seed', 'tf.random.se... |
import numpy as np
from numpy.testing import assert_array_equal
from numpy.random import SeedSequence
def test_reference_data():
""" Check that SeedSequence generates data the same as the C++ reference.
https://gist.github.com/imneme/540829265469e673d045
"""
inputs = [
[3735928559, 195939070... | [
"numpy.testing.assert_array_equal",
"numpy.random.SeedSequence",
"numpy.array"
] | [((2100, 2135), 'numpy.array', 'np.array', (['expected'], {'dtype': 'np.uint32'}), '(expected, dtype=np.uint32)\n', (2108, 2135), True, 'import numpy as np\n'), ((2149, 2167), 'numpy.random.SeedSequence', 'SeedSequence', (['seed'], {}), '(seed)\n', (2161, 2167), False, 'from numpy.random import SeedSequence\n'), ((2225... |
# -*- coding: utf-8 -*-
#
# Copyright 2018-2020 Data61, CSIRO
#
# 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 ... | [
"stellargraph.layer.GCN",
"tensorflow.keras.layers.Dense",
"stellargraph.layer.link_classification",
"stellargraph.mapper.GraphSAGELinkGenerator",
"numpy.ones",
"stellargraph.layer.link_regression",
"stellargraph.StellarGraph",
"stellargraph.layer.GraphSAGE",
"stellargraph.layer.GAT",
"stellargrap... | [((1345, 1355), 'networkx.Graph', 'nx.Graph', ([], {}), '()\n', (1353, 1355), True, 'import networkx as nx\n'), ((2551, 2625), 'stellargraph.layer.GraphSAGE', 'GraphSAGE', ([], {'layer_sizes': '[8, 8]', 'generator': 'generator', 'bias': '(True)', 'dropout': '(0.5)'}), '(layer_sizes=[8, 8], generator=generator, bias=Tru... |
import gym
import configparser
from os import path
import sys
import numpy as np
import aoi_envs
import csv
def eval_baseline(env, baseline, probability, n_episodes=20):
"""
Evaluate a model against an environment over N games.
"""
results = {'reward': np.zeros(n_episodes)}
for k in range(n_episo... | [
"csv.writer",
"gym.make",
"numpy.argmax",
"numpy.std",
"numpy.zeros",
"numpy.mean"
] | [((949, 975), 'numpy.mean', 'np.mean', (["results['reward']"], {}), "(results['reward'])\n", (956, 975), True, 'import numpy as np\n'), ((993, 1018), 'numpy.std', 'np.std', (["results['reward']"], {}), "(results['reward'])\n", (999, 1018), True, 'import numpy as np\n'), ((271, 291), 'numpy.zeros', 'np.zeros', (['n_epis... |
"""The pre-processing module contains classes for image pre-processing.
Image pre-processing aims to improve the image quality (image intensities) for subsequent pipeline steps.
"""
import pymia.filtering.filter as pymia_fltr
import SimpleITK as sitk
import numpy as np
class ImageNormalization(pymia_fltr.... | [
"numpy.std",
"SimpleITK.GetArrayFromImage",
"SimpleITK.Mask",
"numpy.mean",
"SimpleITK.GetImageFromArray"
] | [((877, 906), 'SimpleITK.GetArrayFromImage', 'sitk.GetArrayFromImage', (['image'], {}), '(image)\n', (899, 906), True, 'import SimpleITK as sitk\n'), ((1130, 1161), 'SimpleITK.GetImageFromArray', 'sitk.GetImageFromArray', (['img_arr'], {}), '(img_arr)\n', (1152, 1161), True, 'import SimpleITK as sitk\n'), ((2536, 2558)... |
import numpy as np
import pytest
from segment.raster_transform import (
pixels_range_near_point, pixel_coord, pixel_containing,
long_lat_to_xyz,
)
@pytest.fixture
def lspop_geo():
return (-180.0, 0.0083333333333333, 0.0, 89.99999999999929,
0.0, -0.0083333333333333)
@pytest.fixture
def pfpr... | [
"segment.raster_transform.long_lat_to_xyz",
"segment.raster_transform.pixel_containing",
"segment.raster_transform.pixel_coord",
"numpy.array",
"segment.raster_transform.pixels_range_near_point"
] | [((480, 509), 'segment.raster_transform.pixel_coord', 'pixel_coord', (['pixel', 'lspop_geo'], {}), '(pixel, lspop_geo)\n', (491, 509), False, 'from segment.raster_transform import pixels_range_near_point, pixel_coord, pixel_containing, long_lat_to_xyz\n'), ((588, 622), 'segment.raster_transform.pixel_containing', 'pixe... |
from flask import Flask, request, Response
from flask_cors import CORS, cross_origin
from PIL import Image
import numpy as np
from numpy import asarray
from mtcnn.mtcnn import MTCNN
from tensorflow.keras.models import load_model
from tensorflow.keras.backend import set_session
import tensorflow as tf
import json
app =... | [
"tensorflow.keras.models.load_model",
"flask_cors.CORS",
"numpy.asarray",
"flask.Flask",
"tensorflow.Session",
"mtcnn.mtcnn.MTCNN",
"tensorflow.keras.backend.set_session",
"flask_cors.cross_origin",
"numpy.expand_dims",
"json.dumps",
"PIL.Image.open",
"PIL.Image.fromarray",
"tensorflow.get_d... | [((321, 336), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (326, 336), False, 'from flask import Flask, request, Response\n'), ((337, 346), 'flask_cors.CORS', 'CORS', (['app'], {}), '(app)\n', (341, 346), False, 'from flask_cors import CORS, cross_origin\n'), ((389, 411), 'tensorflow.get_default_graph', ... |
"""
ECE 4424 - Project Classify Image Using 2-layers Neural Network with MNIST data set
<NAME>
12/7/2020
*About Running: main() function that run real-time training and testing result(s)
Note: This code is run on VSCode, in order to draw graph, we have to have #%%
Related modules:
mni... | [
"psutil.virtual_memory",
"matplotlib.pyplot.show",
"neuralNetwork.Network",
"numpy.argmax",
"matplotlib.pyplot.subplots",
"numpy.random.randint",
"numpy.reshape",
"mnist_official_loader.processData"
] | [((1377, 1412), 'mnist_official_loader.processData', 'mnist_official_loader.processData', ([], {}), '()\n', (1410, 1412), False, 'import mnist_official_loader\n'), ((1603, 1639), 'neuralNetwork.Network', 'neuralNetwork.Network', (['[784, 30, 10]'], {}), '([784, 30, 10])\n', (1624, 1639), False, 'import neuralNetwork\n'... |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.test.main",
"tensorflow.constant",
"tensorflow.exp",
"numpy.exp",
"tensorflow.log",
"tensorflow.gradients"
] | [((1410, 1424), 'tensorflow.test.main', 'tf.test.main', ([], {}), '()\n', (1422, 1424), True, 'import tensorflow as tf\n'), ((1033, 1067), 'tensorflow.constant', 'tf.constant', (['(1.0)'], {'dtype': 'tf.float32'}), '(1.0, dtype=tf.float32)\n', (1044, 1067), True, 'import tensorflow as tf\n'), ((1081, 1090), 'tensorflow... |
from sacred import Experiment
import os.path as osp
import os
import numpy as np
import yaml
import cv2
import torch
from torch.utils.data import DataLoader
from tracktor.config import get_output_dir, get_tb_dir
from tracktor.reid.solver import Solver
from tracktor.datasets.factory import Datasets
from tracktor.reid.... | [
"numpy.random.seed",
"os.makedirs",
"torch.utils.data.DataLoader",
"torch.manual_seed",
"yaml.dump",
"torch.cuda.manual_seed",
"tracktor.reid.solver.Solver",
"tracktor.datasets.factory.Datasets",
"os.path.exists",
"tracktor.config.get_output_dir",
"sacred.Experiment",
"tracktor.reid.resnet.res... | [((349, 361), 'sacred.Experiment', 'Experiment', ([], {}), '()\n', (359, 361), False, 'from sacred import Experiment\n'), ((523, 554), 'torch.manual_seed', 'torch.manual_seed', (["reid['seed']"], {}), "(reid['seed'])\n", (540, 554), False, 'import torch\n'), ((559, 595), 'torch.cuda.manual_seed', 'torch.cuda.manual_see... |
import torch
from torch.utils import data
import warnings
import numpy as np
import cv2
import time
class createDataset(data.Dataset):
def __init__(self, image_path, size=[320, 160], image=None):
warnings.simplefilter("ignore")
self.width = size[0]
self.height = size[1]
self.rng... | [
"warnings.simplefilter",
"numpy.power",
"numpy.zeros",
"numpy.transpose",
"time.time",
"cv2.imread",
"torch.Tensor",
"cv2.LUT",
"numpy.array",
"cv2.resize"
] | [((212, 243), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""'], {}), "('ignore')\n", (233, 243), False, 'import warnings\n'), ((526, 550), 'numpy.zeros', 'np.zeros', (['size', 'np.uint8'], {}), '(size, np.uint8)\n', (534, 550), True, 'import numpy as np\n'), ((577, 601), 'numpy.zeros', 'np.zeros', ([... |
"""
(*)~---------------------------------------------------------------------------
Pupil - eye tracking platform
Copyright (C) 2012-2019 <NAME>
Distributed under the terms of the GNU
Lesser General Public License (LGPL v3.0).
See COPYING and COPYING.LESSER for license details.
----------------------------------------... | [
"numpy.minimum",
"numpy.abs",
"numpy.sum",
"numpy.eye",
"numpy.zeros",
"numpy.einsum",
"numpy.min",
"numpy.linalg.norm",
"numpy.reshape",
"numpy.dot",
"numpy.linalg.pinv",
"numpy.sqrt"
] | [((1379, 1436), 'numpy.einsum', 'np.einsum', (['"""ij,ij->i"""', 'directions', '(points - sphere_center)'], {}), "('ij,ij->i', directions, points - sphere_center)\n", (1388, 1436), True, 'import numpy as np\n'), ((1589, 1615), 'numpy.sqrt', 'np.sqrt', (['discriminant[idx]'], {}), '(discriminant[idx])\n', (1596, 1615), ... |
""" Robot planning problem turned into openai gym-like, reinforcement learning style environment """
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import attr
import copy
import numpy as np
from bc_gym_planning_env.robot_models.tricycle_model import Tricyc... | [
"bc_gym_planning_env.envs.base.reward_provider_examples_factory.get_reward_provider_example",
"attr.s",
"bc_gym_planning_env.utilities.path_tools.refine_path",
"numpy.copy",
"attr.asdict",
"bc_gym_planning_env.envs.base.obs.Observation",
"bc_gym_planning_env.envs.base.params.EnvParams.deserialize",
"c... | [((1974, 1991), 'attr.s', 'attr.s', ([], {'cmp': '(False)'}), '(cmp=False)\n', (1980, 1991), False, 'import attr\n'), ((2173, 2193), 'attr.ib', 'attr.ib', ([], {'type': 'object'}), '(type=object)\n', (2180, 2193), False, 'import attr\n'), ((2205, 2229), 'attr.ib', 'attr.ib', ([], {'type': 'np.ndarray'}), '(type=np.ndar... |
import pytest
#from functools import reduce
import numpy as np
from numpy.testing import assert_allclose
from .test_fixtures import *
from ..standard_systems import LMT, SI
from .. import meta
from .. import solver as slv
from .. import utils as u
def test_solve_e_has_zero_rows():
# Number of solutions is 1 which... | [
"numpy.testing.assert_allclose",
"numpy.array",
"numpy.tile",
"pytest.mark.usefixtures"
] | [((830, 870), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""dm_example_72"""'], {}), "('dm_example_72')\n", (853, 870), False, 'import pytest\n'), ((1098, 1138), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""dm_example_72"""'], {}), "('dm_example_72')\n", (1121, 1138), False, 'import pytest\... |
from __future__ import division,absolute_import,print_function
import numpy as np
import pandas as pd
def pricenorm3d(m, features, norm_method, fake_ratio=1.0, with_y=True):
"""normalize the price tensor, whose shape is [features, coins, windowsize]
@:param m: input tensor, unnormalized and there could be nan ... | [
"numpy.empty",
"numpy.zeros",
"numpy.transpose",
"numpy.isnan",
"pandas.Panel",
"numpy.concatenate"
] | [((3493, 3535), 'numpy.transpose', 'np.transpose', (['panel.values'], {'axes': '(2, 0, 1)'}), '(panel.values, axes=(2, 0, 1))\n', (3505, 3535), True, 'import numpy as np\n'), ((4443, 4459), 'pandas.Panel', 'pd.Panel', (['frames'], {}), '(frames)\n', (4451, 4459), True, 'import pandas as pd\n'), ((1096, 1113), 'numpy.ze... |
#!/usr/bin/env python3
import os
import sys
import copy
import json
import math
import pickle
from pprint import pprint
import prody
import pandas as pd
import numpy as np
from .motifs import Generate_Constraints
from .utils import *
import pyrosetta
from pyrosetta import rosetta
def generate_constrained_backrub_e... | [
"pyrosetta.rosetta.numeric.dihedral_degrees_double",
"pyrosetta.rosetta.core.io.RemarkInfo",
"pyrosetta.rosetta.core.pack.task.operation.PreventRepackingRLT",
"pyrosetta.rosetta.basic.options.set_integer_option",
"pyrosetta.rosetta.core.chemical.MutableResidueType",
"pyrosetta.rosetta.core.pack.task.resid... | [((3604, 3628), 'pyrosetta.rosetta.core.pose.Pose', 'rosetta.core.pose.Pose', ([], {}), '()\n', (3626, 3628), False, 'from pyrosetta import rosetta\n'), ((3633, 3721), 'pyrosetta.rosetta.core.import_pose.pose_from_file', 'rosetta.core.import_pose.pose_from_file', (['fuzzball_ligand_pose', 'ligand_conformer_path'], {}),... |
import os
import argparse
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
from torchvision import transforms
from src.dataset import CocoDataset, Resizer, Normalizer, Augmenter, collater
from src.model import EfficientDet
from tensorboardX import SummaryWriter
import shutil
import numpy as np... | [
"argparse.ArgumentParser",
"torch.cuda.device_count",
"numpy.mean",
"shutil.rmtree",
"torch.no_grad",
"os.path.join",
"torch.utils.data.DataLoader",
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"src.dataset.Augmenter",
"torch.manual_seed",
"torch.cuda.manual_seed",
"torch.cuda.is_available",
... | [((387, 510), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""EfficientDet: Scalable and Efficient Object Detection implementation by Signatrix GmbH"""'], {}), "(\n 'EfficientDet: Scalable and Efficient Object Detection implementation by Signatrix GmbH'\n )\n", (410, 510), False, 'import argparse\n'),... |
import os
import json
import glob
import argparse
import numpy as np
from tqdm import tqdm
from scipy.spatial import HalfspaceIntersection
from scipy.spatial import ConvexHull
from .misc import post_proc, panostretch
def tri2halfspace(pa, pb, p):
''' Helper function for evaluating 3DIoU '''
v1 = pa - p
v... | [
"tqdm.tqdm",
"json.load",
"argparse.ArgumentParser",
"os.path.split",
"numpy.zeros",
"numpy.cross",
"numpy.argsort",
"numpy.cumsum",
"numpy.tan",
"numpy.array",
"numpy.arange",
"numpy.mean",
"glob.glob",
"scipy.spatial.ConvexHull",
"numpy.round",
"numpy.concatenate",
"numpy.sqrt"
] | [((340, 356), 'numpy.cross', 'np.cross', (['v1', 'v2'], {}), '(v1, v2)\n', (348, 356), True, 'import numpy as np\n'), ((1329, 1349), 'numpy.array', 'np.array', (['halfspaces'], {}), '(halfspaces)\n', (1337, 1349), True, 'import numpy as np\n'), ((1575, 1598), 'numpy.array', 'np.array', (['dt_floor_coor'], {}), '(dt_flo... |
'''
(c) 2011, 2012 Georgia Tech Research Corporation
This source code is released under the New BSD license. Please see
http://wiki.quantsoftware.org/index.php?title=QSTK_License
for license details.
Created on Nov 7, 2011
@author: <NAME>
@contact: <EMAIL>
@summary: File containing various feature functions
'''
#''... | [
"pandas.DataFrame",
"pandas.rolling_std",
"numpy.average",
"pandas.rolling_mean",
"numpy.random.randn",
"pandas.ewma",
"numpy.corrcoef",
"numpy.std",
"pandas.rolling_sum",
"numpy.zeros",
"QSTK.qstkutil.qsdateutil.getNextOptionClose",
"datetime.datetime",
"QSTK.qstkutil.tsutil.returnize0",
... | [((1164, 1194), 'QSTK.qstkutil.tsutil.returnize0', 'tsu.returnize0', (['dfPrice.values'], {}), '(dfPrice.values)\n', (1178, 1194), True, 'import QSTK.qstkutil.tsutil as tsu\n'), ((1239, 1275), 'pandas.rolling_sum', 'pand.rolling_sum', (['dfPrice', 'lLookback'], {}), '(dfPrice, lLookback)\n', (1255, 1275), True, 'import... |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"tensorflow.test.main",
"tensorflow.global_variables_initializer",
"tensorflow.train.AdagradOptimizer",
"tensorflow.train.FtrlOptimizer",
"tensorflow.constant",
"tensorflow.Variable",
"numpy.array",
"tensorflow.train.GradientDescentOptimizer",
"tensorflow.get_default_session"
] | [((11133, 11147), 'tensorflow.test.main', 'tf.test.main', ([], {}), '()\n', (11145, 11147), True, 'import tensorflow as tf\n'), ((6847, 6871), 'tensorflow.get_default_session', 'tf.get_default_session', ([], {}), '()\n', (6869, 6871), True, 'import tensorflow as tf\n'), ((6044, 6084), 'tensorflow.Variable', 'tf.Variabl... |
# coding=utf-8
# Copyright 2020 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... | [
"numpy.stack",
"numpy.allclose",
"numpy.zeros",
"numpy.einsum",
"numpy.linalg.inv",
"numpy.array",
"numpy.eye",
"numpy.round"
] | [((3701, 3762), 'numpy.einsum', 'numpy.einsum', (['"""isc,jSc->ijsS"""', 'self.gamma_vsc', 'self.gamma_vsc'], {}), "('isc,jSc->ijsS', self.gamma_vsc, self.gamma_vsc)\n", (3713, 3762), False, 'import numpy\n'), ((3776, 3837), 'numpy.einsum', 'numpy.einsum', (['"""isc,jsC->ijcC"""', 'self.gamma_vsc', 'self.gamma_vsc'], {... |
import os
import numpy as np
import tensorflow as tf
import cv2
import matplotlib.pyplot as plt
from tqdm import tqdm
from lpsrgan import LPSRGAN
import load
learning_rate = 1e-3
batch_size = 16
vgg_model = '../vgg19/backup/latest'
def train():
x = tf.placeholder(tf.float32, [None, 96, 96, 3])
... | [
"tensorflow.global_variables",
"tensorflow.Variable",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.tick_params",
"os.path.join",
"matplotlib.pyplot.xlabel",
"cv2.cvtColor",
"matplotlib.pyplot.close",
"matplotlib.pyplot.imshow",
"tensorflow.variable_scope",
"load.load... | [((269, 314), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32', '[None, 96, 96, 3]'], {}), '(tf.float32, [None, 96, 96, 3])\n', (283, 314), True, 'import tensorflow as tf\n'), ((334, 361), 'tensorflow.placeholder', 'tf.placeholder', (['tf.bool', '[]'], {}), '(tf.bool, [])\n', (348, 361), True, 'import tensorf... |
import pytest
import miceforest as mf
from miceforest.ImputationSchema import _ImputationSchema
from sklearn.datasets import load_boston
import pandas as pd
import numpy as np
# Set random state and load data from sklearn
random_state = np.random.RandomState(1991)
boston = pd.DataFrame(load_boston(return_X_y=True)[0])... | [
"sklearn.datasets.load_boston",
"miceforest.ampute_data",
"miceforest.ImputationSchema._ImputationSchema",
"numpy.random.RandomState"
] | [((238, 265), 'numpy.random.RandomState', 'np.random.RandomState', (['(1991)'], {}), '(1991)\n', (259, 265), True, 'import numpy as np\n'), ((507, 567), 'miceforest.ampute_data', 'mf.ampute_data', (['boston'], {'perc': '(0.25)', 'random_state': 'random_state'}), '(boston, perc=0.25, random_state=random_state)\n', (521,... |
import numpy
from scipy.optimize import bisect
from xminds.compat import logger
from .config import INTERACTIONS_DTYPE, MIN_RATING, MAX_RATING
from .utils import partition_int, njit
class InteractionsSampler:
"""
This class samples interactions, i.e. pairs user-item for which the ratings is known.
Sampl... | [
"numpy.full",
"numpy.maximum",
"numpy.log",
"numpy.empty",
"numpy.floor",
"numpy.zeros",
"numpy.ones",
"numpy.searchsorted",
"numpy.histogram",
"numpy.where",
"numpy.exp",
"numpy.linspace",
"numpy.random.choice",
"numpy.random.rand",
"scipy.optimize.bisect",
"numpy.bincount",
"numpy.... | [((4645, 4687), 'numpy.bincount', 'numpy.bincount', (["interacts['user'][:offset]"], {}), "(interacts['user'][:offset])\n", (4659, 4687), False, 'import numpy\n'), ((4716, 4758), 'numpy.bincount', 'numpy.bincount', (["interacts['item'][:offset]"], {}), "(interacts['item'][:offset])\n", (4730, 4758), False, 'import nump... |
import numpy as np
import random
from collections import namedtuple, deque
from replaybuffer import ExperienceReplay
from model import QNetwork
import torch
import torch.nn.functional as F
import torch.optim as optim
BUFFER_SIZE = int(1e5) # replay buffer size
BATCH_SIZE = 32 # minibatch size
GAMMA = 0.99 ... | [
"model.QNetwork",
"torch.nn.functional.mse_loss",
"replaybuffer.ExperienceReplay",
"random.random",
"random.seed",
"numpy.arange",
"torch.no_grad",
"torch.from_numpy"
] | [((984, 1001), 'random.seed', 'random.seed', (['seed'], {}), '(seed)\n', (995, 1001), False, 'import random\n'), ((1108, 1147), 'model.QNetwork', 'QNetwork', (['state_size', 'action_size', 'seed'], {}), '(state_size, action_size, seed)\n', (1116, 1147), False, 'from model import QNetwork\n'), ((1179, 1218), 'model.QNet... |
from __future__ import print_function, unicode_literals
import tensorflow as tf
import numpy as np
import scipy.misc
import os
import argparse
import operator
import csv
import cv2
from moviepy.editor import VideoFileClip
from nets.ColorHandPose3DNetwork import ColorHandPose3DNetwork
from utils.general import detect_... | [
"os.mkdir",
"argparse.ArgumentParser",
"tensorflow.ConfigProto",
"tensorflow.GPUOptions",
"os.path.abspath",
"moviepy.editor.VideoFileClip",
"tensorflow.placeholder_with_default",
"os.path.exists",
"tensorflow.placeholder",
"operator.itemgetter",
"csv.writer",
"os.path.basename",
"tensorflow... | [((751, 841), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Process frames in a video of a particular pose"""'}), "(description=\n 'Process frames in a video of a particular pose')\n", (774, 841), False, 'import argparse\n'), ((1487, 1514), 'os.path.abspath', 'os.path.abspath', (['vi... |
import pymc as pm
import numpy as np
from numpy.linalg import inv
import numpy.random as rand
import matplotlib.pyplot as plt
from pandas.util.testing import set_trace as st
from gpustats import pdfs
# Generate MV normal mixture
gen_mean = {
0: [0, 5],
1: [-10, 0],
2: [-10, 10]
}
gen_sd = {
0: [0.5, 0... | [
"numpy.outer",
"numpy.random.seed",
"pymc.rmv_normal_cov",
"numpy.concatenate",
"matplotlib.pyplot.plot",
"numpy.empty",
"numpy.ones",
"numpy.diag_indices",
"pymc.Dirichlet",
"matplotlib.pyplot.figure",
"numpy.linalg.inv",
"numpy.diag",
"numpy.cov",
"numpy.unique",
"numpy.repeat"
] | [((1718, 1737), 'numpy.diag', 'np.diag', (['[1.0, 1.0]'], {}), '([1.0, 1.0])\n', (1725, 1737), True, 'import numpy as np\n'), ((1748, 1762), 'numpy.cov', 'np.cov', (['data.T'], {}), '(data.T)\n', (1754, 1762), True, 'import numpy as np\n'), ((2083, 2120), 'pymc.Dirichlet', 'pm.Dirichlet', (['"""weights"""'], {'theta': ... |
import pickle
import numpy as np
def read_jpg(jpg_path, plt):
'''
Dependency : matplotlib.pyplot as plt
Args:
jpg_path - string
ends with jpg
plt - plt object
Return:
numpy 3D image
'''
return plt.imread(jpg_path)
def read_pkl(path, encoding='ASCII'):... | [
"numpy.load",
"pickle.load"
] | [((1160, 1173), 'numpy.load', 'np.load', (['path'], {}), '(path)\n', (1167, 1173), True, 'import numpy as np\n'), ((568, 601), 'pickle.load', 'pickle.load', (['f'], {'encoding': 'encoding'}), '(f, encoding=encoding)\n', (579, 601), False, 'import pickle\n')] |
from bs4 import BeautifulSoup
import requests
import numpy as np
def get_all_links(url):
response = requests.get(url)
soup = BeautifulSoup(response.content, features="html.parser")
for link in soup.find_all('a', href=True):
href_array = np.array(link['href'])
if np.char.startswith(href_arr... | [
"bs4.BeautifulSoup",
"numpy.array",
"requests.get",
"numpy.char.startswith"
] | [((106, 123), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (118, 123), False, 'import requests\n'), ((135, 190), 'bs4.BeautifulSoup', 'BeautifulSoup', (['response.content'], {'features': '"""html.parser"""'}), "(response.content, features='html.parser')\n", (148, 190), False, 'from bs4 import BeautifulSoup... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'newGUI.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this file will be lost!
import sys
import threading
import time
import cv2
import numpy
import numpy as np
from PIL import Image, ImageDraw, ImageFon... | [
"PyQt5.QtCore.pyqtSignal",
"PyQt5.QtWidgets.QApplication.primaryScreen",
"cv2.dnn.NMSBoxes",
"numpy.argmax",
"PyQt5.QtWidgets.QPushButton",
"PyQt5.QtWidgets.QFileDialog.getOpenFileName",
"cv2.rectangle",
"PyQt5.QtWidgets.QApplication",
"PyQt5.QtWidgets.QMenuBar",
"PyQt5.QtWidgets.QLabel",
"PyQt5... | [((703, 722), 'PIL.ImageDraw.Draw', 'ImageDraw.Draw', (['img'], {}), '(img)\n', (717, 722), False, 'from PIL import Image, ImageDraw, ImageFont\n'), ((767, 826), 'PIL.ImageFont.truetype', 'ImageFont.truetype', (['"""font/simsun.ttc"""', '(20)'], {'encoding': '"""utf-8"""'}), "('font/simsun.ttc', 20, encoding='utf-8')\n... |
#
# RawIO
# Copyright (c) 2021 <NAME>.
#
from cv2 import findTransformECC, MOTION_TRANSLATION, TERM_CRITERIA_COUNT, TERM_CRITERIA_EPS
from numpy import asarray, eye, float32
from PIL import Image
from sklearn.feature_extraction.image import extract_patches_2d
from typing import Callable
def markov_similarity (mi... | [
"sklearn.feature_extraction.image.extract_patches_2d",
"numpy.eye",
"numpy.asarray",
"PIL.Image.open"
] | [((1211, 1229), 'PIL.Image.open', 'Image.open', (['path_a'], {}), '(path_a)\n', (1221, 1229), False, 'from PIL import Image\n'), ((1248, 1266), 'PIL.Image.open', 'Image.open', (['path_b'], {}), '(path_b)\n', (1258, 1266), False, 'from PIL import Image\n'), ((1477, 1493), 'numpy.asarray', 'asarray', (['image_a'], {}), '... |
# Copyright (c) 2020, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import math
import numpy as np
from coremltools.converters.mil.mil import types
from coremltools.conv... | [
"numpy.maximum",
"numpy.sum",
"numpy.abs",
"math.erf",
"numpy.exp",
"coremltools.converters.mil.mil.input_type.DefaultInputs",
"coremltools.converters.mil.mil.input_type.StringInputType",
"numpy.copy",
"numpy.power",
"numpy.max",
"coremltools.converters.mil.mil.ops.defs._op_reqs.register_op",
... | [((710, 733), 'coremltools.converters.mil.mil.ops.defs._op_reqs.register_op', 'register_op', ([], {'doc_str': '""""""'}), "(doc_str='')\n", (721, 733), False, 'from coremltools.converters.mil.mil.ops.defs._op_reqs import register_op\n'), ((1700, 1723), 'coremltools.converters.mil.mil.ops.defs._op_reqs.register_op', 're... |
import numpy as np
from artemis.experiments.decorators import experiment_function
from matplotlib import pyplot as plt
from six.moves import xrange
__author__ = 'peter'
"""
This file demonstates Artemis's "Experiments"
When you run an experiment, all figures and console output, as well as some metadata such as tota... | [
"matplotlib.pyplot.title",
"matplotlib.pyplot.show",
"matplotlib.pyplot.legend",
"numpy.zeros",
"numpy.random.RandomState",
"matplotlib.pyplot.ion",
"six.moves.xrange",
"numpy.array",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel"
] | [((1921, 1955), 'numpy.random.RandomState', 'np.random.RandomState', (['random_seed'], {}), '(random_seed)\n', (1942, 1955), True, 'import numpy as np\n'), ((2565, 2606), 'six.moves.xrange', 'xrange', (['(n_training_samples * n_epochs + 1)'], {}), '(n_training_samples * n_epochs + 1)\n', (2571, 2606), False, 'from six.... |
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 21 13:10:44 2011
@author: <NAME> (OTO), <<EMAIL>>
"""
# Import necessary modules
import numpy as np
import numpy.linalg as npla
import statTools as st
import cross_val as cv
import matplotlib.pyplot as plt
class nipalsPCA:
"""
GENERAL INFO:
-------------
... | [
"numpy.sum",
"cross_val.LeaveOneOut",
"statTools.centre",
"cross_val.LeaveOneLabelOut",
"numpy.shape",
"matplotlib.pyplot.figure",
"numpy.sin",
"numpy.arange",
"numpy.linalg.norm",
"matplotlib.pyplot.gca",
"cross_val.split",
"numpy.std",
"numpy.transpose",
"matplotlib.pyplot.setp",
"nump... | [((6270, 6298), 'numpy.hstack', 'np.hstack', (['self.X_scoresList'], {}), '(self.X_scoresList)\n', (6279, 6298), True, 'import numpy as np\n'), ((6319, 6349), 'numpy.hstack', 'np.hstack', (['self.X_loadingsList'], {}), '(self.X_loadingsList)\n', (6328, 6349), True, 'import numpy as np\n'), ((8673, 8703), 'numpy.sqrt', ... |
""" test_distance.py
Tests the isi- and spike-distance computation
Copyright 2014, <NAME> <<EMAIL>>
Distributed under the BSD License
"""
from __future__ import print_function
import numpy as np
from copy import copy
from numpy.testing import assert_equal, assert_almost_equal, \
assert_array_almost_equal
impo... | [
"numpy.sum",
"pyspike.spike_sync_multi",
"pyspike.spike_sync",
"numpy.arange",
"pyspike.spike_distance_multi",
"numpy.testing.assert_array_almost_equal",
"os.path.join",
"pyspike.isi_profile",
"pyspike.spike_distance",
"numpy.testing.assert_almost_equal",
"numpy.append",
"numpy.testing.assert_... | [((408, 434), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (424, 434), False, 'import os\n'), ((496, 533), 'pyspike.SpikeTrain', 'SpikeTrain', (['[0.2, 0.4, 0.6, 0.7]', '(1.0)'], {}), '([0.2, 0.4, 0.6, 0.7], 1.0)\n', (506, 533), False, 'from pyspike import SpikeTrain\n'), ((543, 587), 'py... |
import os
import numpy as np
import sqlite3
from lsst.sims.catUtils.dust import EBVbase
'''
This is a companion script to trim_sn_summary.py. The output of
trim_sn_summary.py is this input to complete_sn_summary.
complete_sn_summary must run in a DC2-era lsst_sims environment. It will
- Add new integer id colu... | [
"numpy.radians",
"sqlite3.connect",
"lsst.sims.catUtils.dust.EBVbase",
"os.path.join",
"os.getenv"
] | [((1061, 1102), 'os.path.join', 'os.path.join', (['_SN_DIR', '"""initial_table.db"""'], {}), "(_SN_DIR, 'initial_table.db')\n", (1073, 1102), False, 'import os\n'), ((1177, 1218), 'os.path.join', 'os.path.join', (['_SN_DIR', "(_OUT_TABLE + '.db')"], {}), "(_SN_DIR, _OUT_TABLE + '.db')\n", (1189, 1218), False, 'import o... |
# Copyright 2022 Huawei Technologies Co., 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-2.0
#
# Unless required by applicable law or agreed to... | [
"src.reader.DatasetGenerator",
"numpy.absolute",
"mindspore.load_param_into_net",
"mindspore.Tensor",
"os.path.isfile",
"numpy.mean",
"os.path.join",
"numpy.unique",
"mindspore.context.set_context",
"numpy.std",
"numpy.transpose",
"datetime.datetime.now",
"numpy.partition",
"mindspore.load... | [((1129, 1197), 'mindspore.context.set_context', 'context.set_context', ([], {'mode': 'context.GRAPH_MODE', 'device_target': '"""Ascend"""'}), "(mode=context.GRAPH_MODE, device_target='Ascend')\n", (1148, 1197), False, 'from mindspore import context, load_checkpoint, load_param_into_net\n'), ((6087, 6108), 'numpy.uniqu... |
"""Build combined NIST table from txt files included in package
"""
import glob
import os
import numpy as np
import re
from astropy.table import Column, Table, vstack
def build_table(line_lists=None):
"""Build master table from NIST txt files
Parameters
----------
line_lists: list or None
A ... | [
"astropy.table.Table",
"os.path.realpath",
"numpy.genfromtxt",
"astropy.table.vstack",
"glob.glob",
"astropy.table.Column",
"re.sub",
"astropy.table.Table.read"
] | [((1438, 1459), 'astropy.table.vstack', 'vstack', (['tabs_to_stack'], {}), '(tabs_to_stack)\n', (1444, 1459), False, 'from astropy.table import Column, Table, vstack\n'), ((795, 850), 'glob.glob', 'glob.glob', (["(code_dir + '/datasets/line_lists/NIST/*.txt')"], {}), "(code_dir + '/datasets/line_lists/NIST/*.txt')\n", ... |
#!/usr/bin/env python
"""@package docstring
File: analyzer.py
Author: <NAME>
Email: <EMAIL>
Description: File containing classes to analyze data, make movies,
and create graphs from foxlink runs
"""
from pathlib import Path
import numpy as np
# from matplotlib.lines import Line2D
import h5py
import yaml
import pprint
... | [
"h5py.File",
"numpy.zeros_like",
"numpy.subtract",
"numpy.nan_to_num",
"numpy.asarray",
"numpy.einsum",
"numpy.clip",
"numpy.diff",
"numpy.linalg.norm",
"pprint.pprint",
"yaml.safe_load",
"numpy.sign",
"numpy.where",
"numpy.exp",
"pathlib.Path.cwd",
"numpy.sqrt"
] | [((441, 469), 'numpy.linalg.norm', 'np.linalg.norm', (['vec'], {'axis': '(-1)'}), '(vec, axis=-1)\n', (455, 469), True, 'import numpy as np\n'), ((2737, 2770), 'numpy.asarray', 'np.asarray', (["self._h5_data['time']"], {}), "(self._h5_data['time'])\n", (2747, 2770), True, 'import numpy as np\n'), ((3713, 3744), 'h5py.F... |
from scipy.spatial.distance import cdist
from malaya_speech.model.clustering import ClusteringAP
from malaya_speech.utils.dist import l2_normalize, compute_log_dist_matrix
import numpy as np
from herpetologist import check_type
from typing import Callable
@check_type
def speaker_similarity(
vad_results,
speak... | [
"scipy.spatial.distance.cdist",
"malaya_speech.utils.dist.compute_log_dist_matrix",
"numpy.argsort",
"numpy.where",
"numpy.array",
"spectralcluster.SpectralClusterer",
"malaya_speech.model.clustering.ClusteringAP"
] | [((3780, 3800), 'numpy.array', 'np.array', (['activities'], {}), '(activities)\n', (3788, 3800), True, 'import numpy as np\n'), ((5144, 5229), 'malaya_speech.model.clustering.ClusteringAP', 'ClusteringAP', ([], {'metric': 'log_distance_metric', 'damping': 'damping', 'preference': 'preference'}), '(metric=log_distance_m... |
import numpy as np
def dfs(cb, dep):
if not np.any(cb == 0):
print('Solved at %d-th depth' % dep)
print(cb)
return
pos = np.argwhere(cb == 0)[0]
for val in range(1, 10):
if check(cb, pos, val):
cb[pos[0], pos[1]] = val
dfs(cb, dep+1)
... | [
"numpy.argwhere",
"numpy.any",
"numpy.array"
] | [((728, 1012), 'numpy.array', 'np.array', (['[[2, 0, 3, 4, 0, 0, 0, 9, 0], [0, 0, 0, 1, 0, 2, 0, 0, 5], [5, 0, 6, 0, 0, \n 0, 1, 0, 0], [0, 2, 0, 5, 0, 0, 8, 1, 0], [9, 8, 1, 0, 0, 0, 0, 0, 6],\n [0, 0, 0, 0, 1, 9, 2, 0, 0], [4, 3, 0, 0, 8, 0, 0, 0, 1], [0, 9, 0, 0, \n 5, 0, 6, 0, 0], [0, 0, 0, 0, 2, 1, 0, 5, ... |
"""
Demo script to showcase the functionality of the multi-task Bayesian neural network
implementation.
"""
import os
from sys import int_info
import warnings
import numpy as np
import pyro
import wandb
from matplotlib import pyplot as plt
from wandb.sdk.wandb_init import init
from mtbnn.mtbnn import MultiTaskBayesi... | [
"mtbnn.plotting.plot_predictions",
"mtutils.mtutils.split_tasks",
"metalearning_benchmarks.util.normalize_benchmark",
"warnings.simplefilter",
"mtutils.mtutils.norm_area_under_curve",
"warnings.catch_warnings",
"numpy.linspace",
"wandb.login",
"matplotlib.pyplot.show",
"os.getenv",
"mtutils.mtut... | [((1180, 1218), 'pyro.set_rng_seed', 'pyro.set_rng_seed', (["config['seed_pyro']"], {}), "(config['seed_pyro'])\n", (1197, 1218), False, 'import pyro\n'), ((1713, 1737), 'mtutils.mtutils.collate_data', 'collate_data', ([], {'bm': 'bm_meta'}), '(bm=bm_meta)\n', (1725, 1737), False, 'from mtutils.mtutils import BM_DICT, ... |
"""
Let T(n) be the number of tours over a 4 × n playing board such that:
The tour starts in the top left corner.
The tour consists of moves that are up, down, left, or right one square.
The tour visits each square exactly once.
The tour ends in the bottom left corner.
The diagram shows one tour over ... | [
"numpy.matrix",
"numpy.matmul"
] | [((2079, 2320), 'numpy.matrix', 'np.matrix', (['[[3, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0, 1, \n 1], [1, 1, 1, 1, 1, 0, 1, 1], [2, 1, 1, 1, 1, 1, 0, 1], [1, 1, 1, 0, 1,\n 1, 1, 1], [0, 1, 1, 0, 1, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0]]', 'np.int64'], {}), '([[3, 1, 1, 1, 1, 1, 0, 1], [1,... |
import numpy as np
from sklearn.decomposition import PCA
def DAPCA(Xs, Xt, n_components=2):
return PCA(n_components=n_components).fit(np.concatenate([Xs, Xt], axis=0)).components_.T | [
"sklearn.decomposition.PCA",
"numpy.concatenate"
] | [((140, 172), 'numpy.concatenate', 'np.concatenate', (['[Xs, Xt]'], {'axis': '(0)'}), '([Xs, Xt], axis=0)\n', (154, 172), True, 'import numpy as np\n'), ((105, 135), 'sklearn.decomposition.PCA', 'PCA', ([], {'n_components': 'n_components'}), '(n_components=n_components)\n', (108, 135), False, 'from sklearn.decompositio... |
#!/usr/bin/env python2
from __future__ import print_function
import sys
sys.path.append('../lib')
import os
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.path import Path
from matplotlib.patches import PathPatch
import string
import protocols
import model as... | [
"numpy.random.seed",
"numpy.abs",
"numpy.argmin",
"numpy.argsort",
"matplotlib.pyplot.figure",
"numpy.mean",
"matplotlib.patches.Patch",
"sys.path.append",
"numpy.copy",
"numpy.append",
"numpy.max",
"numpy.loadtxt",
"numpy.linspace",
"scipy.optimize.fmin",
"numpy.percentile",
"numpy.mi... | [((72, 97), 'sys.path.append', 'sys.path.append', (['"""../lib"""'], {}), "('../lib')\n", (87, 97), False, 'import sys\n'), ((145, 166), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (159, 166), False, 'import matplotlib\n'), ((575, 594), 'numpy.random.seed', 'np.random.seed', (['(101)'], {}), '... |
from config import RESULT_PATH, DATABASE_PATH
from utils import load_splitdata, balancer_block, save_to_pickle, \
load_from_pickle, check_loadsave, training_series, evaluating_series, \
load_30xonly, load_50xonly, random_sample
from utils import mutypes, pcodes
from os import path, makedirs
from sys import ... | [
"os.path.join",
"numpy.arange"
] | [((476, 516), 'os.path.join', 'path.join', (['RESULT_PATH', 'software', 'mt', 'pc'], {}), '(RESULT_PATH, software, mt, pc)\n', (485, 516), False, 'from os import path, makedirs\n'), ((1221, 1252), 'numpy.arange', 'np.arange', (['X_train_ori.shape[1]'], {}), '(X_train_ori.shape[1])\n', (1230, 1252), True, 'import numpy ... |
import os
import sys
PROJECT_PATH = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
sys.path.append(PROJECT_PATH)
"""
Original model, but only with translation transformations (9 transformations), original Resnet is used
"""
import numpy as np
from keras.utils import to_categorical
from modules.d... | [
"sys.path.append",
"scripts.detached_transformer_od_hits.calc_approx_alpha_sum",
"transformations.KernelTransformer",
"numpy.log",
"os.path.dirname",
"modules.data_loaders.base_line_loaders.load_hits",
"tensorflow.Session",
"scripts.detached_transformer_od_hits.plot_histogram_disc_loss_acc_thr",
"sc... | [((105, 134), 'sys.path.append', 'sys.path.append', (['PROJECT_PATH'], {}), '(PROJECT_PATH)\n', (120, 134), False, 'import sys\n'), ((922, 938), 'tensorflow.ConfigProto', 'tf.ConfigProto', ([], {}), '()\n', (936, 938), True, 'import tensorflow as tf\n'), ((1036, 1061), 'tensorflow.Session', 'tf.Session', ([], {'config'... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from numpy.testing import assert_allclose
from astropy.tests.helper import pytest
from astropy.utils.data import get_pkg_data_filename
import astropy.units as u
from astropy.io import ascii
from ..utils import (validate_data_table, gene... | [
"numpy.sum",
"astropy.io.ascii.read",
"numpy.logspace",
"astropy.tests.helper.pytest.raises",
"astropy.utils.data.get_pkg_data_filename",
"numpy.all",
"astropy.units.Unit"
] | [((411, 465), 'astropy.utils.data.get_pkg_data_filename', 'get_pkg_data_filename', (['"""data/CrabNebula_HESS_ipac.dat"""'], {}), "('data/CrabNebula_HESS_ipac.dat')\n", (432, 465), False, 'from astropy.utils.data import get_pkg_data_filename\n'), ((479, 496), 'astropy.io.ascii.read', 'ascii.read', (['fname'], {}), '(fn... |
from __future__ import print_function
import numpy as np
from .lte import *
__all__ = ['initLTE', 'synthLTE']
def initLTE(atmos, lines, wavelengthAxis):
"""
Initialize the LTE synthesis module using nodes
Args:
atmos (float): array of size (ndepth x 7) defining the reference atmosphere. The c... | [
"numpy.zeros",
"numpy.sum",
"numpy.copy"
] | [((1957, 1980), 'numpy.copy', 'np.copy', (['referenceAtmos'], {}), '(referenceAtmos)\n', (1964, 1980), True, 'import numpy as np\n'), ((2142, 2161), 'numpy.sum', 'np.sum', (['variablesRF'], {}), '(variablesRF)\n', (2148, 2161), True, 'import numpy as np\n'), ((2176, 2218), 'numpy.zeros', 'np.zeros', (['(nVariables, nDe... |
from unityagents import UnityEnvironment
import numpy as np
env = UnityEnvironment(file_name='/data/Reacher_Linux_NoVis/Reacher.x86_64')
brain_name = env.brain_names[0]
brain = env.brains[brain_name]
from ddpg_agent import Agent
from collections import deque
import torch
import torch.nn.functional as F
import torch... | [
"workspace_utils.active_session",
"numpy.zeros",
"time.time",
"numpy.any",
"numpy.mean",
"unityagents.UnityEnvironment",
"collections.deque",
"ddpg_agent.Agent"
] | [((67, 137), 'unityagents.UnityEnvironment', 'UnityEnvironment', ([], {'file_name': '"""/data/Reacher_Linux_NoVis/Reacher.x86_64"""'}), "(file_name='/data/Reacher_Linux_NoVis/Reacher.x86_64')\n", (83, 137), False, 'from unityagents import UnityEnvironment\n'), ((399, 449), 'ddpg_agent.Agent', 'Agent', ([], {'state_size... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.