repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
klein203/AI-Learning
[ "8db60945f4ea41b891b56e416f3b49a160b046c6" ]
[ "src/resnet_model.py" ]
[ "'''\r\n@author: xusheng\r\n'''\r\nimport tensorflow as tf\r\nfrom model import Model\r\nfrom six.moves import xrange\r\n\r\nclass ResnetModel(Model):\r\n \r\n def _res_block(self, scope_name, x, in_channels, out_channels, stride=1):\r\n # Res: H(x) = F(x) + x\r\n # F(x) = Conv(Relu(BN( Conv(Rel...
[ [ "tensorflow.summary.histogram", "tensorflow.reshape", "tensorflow.variable_scope", "tensorflow.pad", "tensorflow.reduce_mean", "tensorflow.nn.avg_pool" ] ]
jwyles/cudf
[ "1ba84a1354c33aac0a9851e15321c6d9a2fca956" ]
[ "python/cudf/cudf/comm/gpuarrow.py" ]
[ "# Copyright (c) 2019, NVIDIA CORPORATION.\n\nfrom collections import OrderedDict\nfrom collections.abc import Sequence\n\nimport numba.cuda.cudadrv.driver\nimport numpy as np\nimport pandas as pd\nimport pyarrow as pa\n\nimport rmm\n\nfrom cudf._lib.arrow._cuda import CudaBuffer\nfrom cudf._lib.gpuarrow import (\n...
[ [ "numpy.dtype", "pandas.core.dtypes.dtypes.CategoricalDtype" ] ]
hhmlai/OpenNMT-tf
[ "f2320fd857f6c76d4f552a10a0a854b8cd8c8c79" ]
[ "opennmt/tests/checkpoint_test.py" ]
[ "import os\n\nimport tensorflow as tf\n\nfrom opennmt.utils import checkpoint as checkpoint_util\n\n\nclass _DummyModel(tf.keras.layers.Layer):\n\n def __init__(self):\n super(_DummyModel, self).__init__()\n self.layers = [tf.keras.layers.Dense(20), tf.keras.layers.Dense(20)]\n\n def call(self, x):\n for...
[ [ "tensorflow.train.latest_checkpoint", "tensorflow.train.CheckpointManager", "tensorflow.not_equal", "tensorflow.ones_like", "tensorflow.random.uniform", "tensorflow.keras.layers.Dense", "tensorflow.train.list_variables", "tensorflow.test.main", "tensorflow.reduce_mean", "te...
ZJZAC/Passport-aware-Normalization
[ "e2c2b928678188c1b5440f7da2c529ace87f23ac" ]
[ "Image_cls/Baseline/experiments/classification.py" ]
[ "import os\nfrom pprint import pprint\n\nimport torch\nimport torch.optim as optim\n\nimport passport_generator\nfrom dataset import prepare_dataset, prepare_wm\nfrom experiments.base import Experiment\nfrom experiments.trainer import Trainer, Tester\nfrom experiments.trainer_private import TesterPrivate\nfrom expe...
[ [ "torch.tensor", "torch.load", "torch.optim.lr_scheduler.MultiStepLR" ] ]
Tartar-san/montage.ai
[ "c699dfaf300fdca69f3dbc5d63fae9f00a26ca40" ]
[ "libs/librosa/feature/utils.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Feature manipulation utilities\"\"\"\n\nfrom warnings import warn\n\nimport numpy as np\nimport scipy.signal\n\nfrom .. import cache\nfrom ..util.deprecation import Deprecated\nfrom ..util.exceptions import ParameterError\n\n__all__ = ['delta', 'stack_memory']\...
[ [ "numpy.pad", "numpy.ascontiguousarray", "numpy.roll", "numpy.atleast_1d", "numpy.mod", "numpy.atleast_2d" ] ]
MDiesing/pandapower
[ "02df20351bcc39e074711fa9550acb448a7c522c" ]
[ "pandapower/test/api/test_toolbox.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2019 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\n\nimport copy\n\nimport numpy as np\nimport pandas as pd\nimport pytest\n\nimport pandapower as pp\nimport pandapower.net...
[ [ "numpy.array", "numpy.isnan", "numpy.isclose", "numpy.random.seed", "numpy.allclose", "numpy.random.randint", "numpy.append", "pandas.Series" ] ]
amitport/grace
[ "b0e442057d2f36f09cd1817a4acb966c6b0b780f" ]
[ "grace_dl/dist/compressor/topk.py" ]
[ "import torch\r\n\r\nfrom grace_dl.dist import Compressor\r\n\r\n\r\ndef sparsify(tensor, compress_ratio):\r\n tensor = tensor.flatten()\r\n k = max(1, int(tensor.numel() * compress_ratio))\r\n _, indices = torch.topk(tensor.abs(), k)\r\n values = tensor[indices]\r\n return values, indices\r\n\r\n\r\...
[ [ "torch.zeros" ] ]
anjanatiha/Clustering-for-Document-Classification
[ "64ca76609d0b067d4fc7c493a68e42695794a3b9" ]
[ "news_docs_classification.py" ]
[ "\n# coding: utf-8\n\n# In[1]:\n\n\nfrom sklearn.datasets import fetch_20newsgroups\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.cluster import KMeans\nfrom sklearn import mixture\nfrom sklearn.metrics import f1_score\nimport time\n\n\nnewsgroups_train = fetch_20newsgroups(subset='trai...
[ [ "sklearn.datasets.fetch_20newsgroups", "sklearn.cluster.KMeans", "sklearn.mixture.GaussianMixture", "sklearn.feature_extraction.text.TfidfVectorizer", "sklearn.metrics.f1_score" ] ]
zhujiagang/realtime-lstm-parallel
[ "afdea3bcfc741ae469808f6238ce76c2dda5246e" ]
[ "train_loglr_multigpu.py" ]
[ "\n\"\"\" Adapted from:\n @longcw faster_rcnn_pytorch: https://github.com/longcw/faster_rcnn_pytorch\n @rbgirshick py-faster-rcnn https://github.com/rbgirshick/py-faster-rcnn\n Which was adopated by: Ellis Brown, Max deGroot\n https://github.com/amdegroot/ssd.pytorch\n\n Further:\n Updated by Gurk...
[ [ "torch.cuda.manual_seed_all", "torch.cuda.synchronize", "numpy.asarray", "numpy.random.seed", "torch.nn.init.xavier_uniform", "torch.save", "torch.optim.SGD", "torch.set_default_tensor_type", "torch.autograd.Variable", "numpy.random.shuffle", "torch.manual_seed", "t...
YueLiu-jina/jina-hub
[ "e0a7dc95dbd69a55468acbf4194ddaf11fd5aa6c" ]
[ "encoders/numeric/random_sparse.py" ]
[ "__copyright__ = \"Copyright (c) 2020 Jina AI Limited. All rights reserved.\"\n__license__ = \"Apache-2.0\"\n\nfrom . import TransformEncoder\n\n\nclass RandomSparseEncoder(TransformEncoder):\n \"\"\"\n :class:`RandomSparseEncoder` encodes data from an ndarray in size `B x T` into an ndarray in size `B x D`\n...
[ [ "sklearn.random_projection.SparseRandomProjection" ] ]
ashahba/OpenVINO-model-server
[ "feb7d7119f56fa0787b83393e38e8ea36762a34b" ]
[ "ie_serving/server/predict_utils.py" ]
[ "#\r\n# Copyright (c) 2018 Intel Corporation\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless requi...
[ [ "tensorflow.python.framework.dtypes.as_dtype", "tensorflow.contrib.util.make_ndarray", "tensorflow.python.framework.tensor_shape.as_shape" ] ]
Kisukee/ray
[ "f1a1f9799238c995995f558636a09c2147ecabe6" ]
[ "python/ray/data/dataset.py" ]
[ "import logging\nimport os\nimport time\nfrom typing import (\n List,\n Any,\n Callable,\n Iterator,\n Iterable,\n Generic,\n Dict,\n Optional,\n Union,\n TYPE_CHECKING,\n Tuple,\n)\nfrom uuid import uuid4\n\nif TYPE_CHECKING:\n import pyarrow\n import pandas\n import mars\...
[ [ "tensorflow.data.Dataset.from_generator", "torch.as_tensor", "numpy.mean", "numpy.array_split" ] ]
kozzion/breaker_audio
[ "0f27b3ae581fbeb8f79d0b8755a139f7438ca02b" ]
[ "breaker_audio/component_cmn/toolbox/ui.py" ]
[ "from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas\nfrom matplotlib.figure import Figure\nfrom PyQt5.QtCore import Qt\nfrom PyQt5.QtWidgets import *\nfrom encoder.inference import plot_embedding_as_heatmap\nfrom breaker_audio.data_structure.utterance import Utterance\nfrom pathlib imp...
[ [ "numpy.array", "matplotlib.pyplot.subplots", "numpy.arange", "numpy.unique", "matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg" ] ]
lwb0818/DAVANet
[ "8b7afa3df5b66207f28cc66f559ed23bdd7833d3" ]
[ "utils/network_utils.py" ]
[ "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# \n# Developed by Shangchen Zhou <shangchenzhou@gmail.com>\n\nimport os\nimport sys\nimport torch\nimport numpy as np\nfrom datetime import datetime as dt\nfrom config import cfg\nimport torch.nn.functional as F\n\nimport cv2\n\ndef mkdir(path):\n if not os.path.isdi...
[ [ "torch.zeros", "torch.stack", "torch.isnan", "torch.nn.init.constant_", "torch.save", "torch.nn.init.kaiming_normal_", "torch.nn.init.xavier_uniform_", "torch.FloatTensor", "numpy.logical_and", "torch.nn.init.normal_", "torch.cuda.is_available", "torch.isinf", "...
PositivePeriod/music_in_python
[ "5b3244fe03530ee9a73bc9689ee47583825fdd60" ]
[ "middle_c.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nMimic a middle C on the piano.\n\n@author: khe\n\"\"\"\nimport numpy as np\nfrom scipy.io import wavfile\nimport matplotlib.pyplot as plt\nplt.style.use('seaborn-dark')\nimport utils\n\n# Get middle C frequency\nnote_freqs = utils.get_piano_notes()\nfrequenc...
[ [ "numpy.max", "scipy.io.wavfile.read", "matplotlib.pyplot.xlim", "numpy.round", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.grid", "matplotlib.pyplot.plot", "matplotlib.pyplot.title", "matplotlib.pyplot.savefig", "numpy.sum", "numpy.where", "numpy.fft.fft", "n...
gwrome/pandas
[ "cb6e47d5a04c89cb6f3564753c43abadbdf81c94" ]
[ "pandas/core/sparse/frame.py" ]
[ "\"\"\"\nData structures for sparse float data. Life is made simpler by dealing only\nwith float64 data\n\"\"\"\nimport warnings\n\nimport numpy as np\n\nfrom pandas._libs.sparse import BlockIndex, get_blocks\nfrom pandas.compat.numpy import function as nv\nfrom pandas.util._decorators import Appender\n\nfrom panda...
[ [ "pandas.compat.numpy.function.validate_cumsum", "pandas.io.pickle._unpickle_array", "pandas.core.ops.add_flex_arithmetic_methods", "pandas.core.internals.create_block_manager_from_arrays", "pandas.core.arrays.sparse.SparseArray", "pandas._libs.sparse.get_blocks", "pandas.concat", "...
rao003/ki-in-schulen
[ "ec7e69da6d728ce6480711b45cea0aef7796b14b" ]
[ "Calliope-Rennspiel/Python/ki-rennspiel.py" ]
[ "#\n# ki-rennspiel.py$\n#\n# (C) 2020, Christian A. Schiller, Deutsche Telekom AG\n#\n# Deutsche Telekom AG and all other contributors /\n# copyright owners license this file to you under the\n# MIT License (the \"License\"); you may not use this\n# file except in compliance with the License.\n# You may obtain a co...
[ [ "numpy.median", "numpy.array", "numpy.array_str" ] ]
google-research/nested-transformer
[ "59c0d6aa1a0526fbca15507a172f3dc110f52a3c", "59c0d6aa1a0526fbca15507a172f3dc110f52a3c" ]
[ "main.py", "libml/preprocess.py" ]
[ "# coding=utf-8\n# Copyright 2020 The Nested-Transformer Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless r...
[ [ "tensorflow.config.experimental.set_visible_devices" ], [ "tensorflow.io.decode_jpeg", "tensorflow.image.stateless_random_crop", "tensorflow.image.resize_with_crop_or_pad", "tensorflow.zeros", "tensorflow.shape", "tensorflow.minimum", "tensorflow.image.stateless_random_flip_lef...
nzare/poliastro
[ "c4d0f80c98fb2a0ec59a07f4664cfebb0b1a6cf9" ]
[ "tests/tests_twobody/test_propagation.py" ]
[ "import numpy as np\nimport pytest\nfrom astropy import time, units as u\nfrom astropy.coordinates import CartesianRepresentation\nfrom astropy.tests.helper import assert_quantity_allclose\nfrom hypothesis import given, settings, strategies as st\nfrom numpy.testing import assert_allclose\nfrom pytest import approx...
[ [ "numpy.deg2rad", "numpy.array", "numpy.random.uniform", "numpy.cos" ] ]
noushi/pyccel
[ "f20846897ba2418dc0f432e293bcf8b4ddb24915" ]
[ "tests/pyccel/scripts/hope_benchmarks_decorators/hope_pairwise_python.py" ]
[ "# pylint: disable=missing-function-docstring, missing-module-docstring/\nfrom pyccel.decorators import types\n\n@types('double[:,:]','double[:,:]')\ndef pairwise_python (X, D) :\n from numpy import sqrt, shape\n\n M, N = shape( X )\n for i in range (M) :\n for j in range (M) :\n r = 0.0\...
[ [ "numpy.sqrt", "numpy.shape", "numpy.zeros" ] ]
danielism97/FLAVR
[ "17f62c681bb2a5799e3bc23cf60936ac4d2b9407" ]
[ "model/FLAVR_arch.py" ]
[ "import math\nimport numpy as np\nimport importlib\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom .resnet_3D import SEGating\n\ndef joinTensors(X1 , X2 , type=\"concat\"):\n\n if type == \"concat\":\n return torch.cat([X1 , X2] , dim=1)\n elif type == \"add\":\n re...
[ [ "torch.cat", "torch.stack", "torch.nn.Sequential", "torch.unbind", "torch.nn.LeakyReLU", "torch.split", "torch.nn.BatchNorm2d", "torch.nn.ConvTranspose2d", "torch.nn.Upsample", "torch.nn.Conv2d", "torch.nn.ReflectionPad2d", "torch.nn.Conv3d", "torch.nn.functiona...
robotory/robopilot
[ "e10207b66d06e5d169f890d1d7e57d971ca1eb5d" ]
[ "robopilot/templates/complete.py" ]
[ "#!/usr/bin/env python3\n\"\"\"\nScripts to drive a robopilot 2 car\n\nUsage:\n manage.py (drive) [--model=<model>] [--js] [--type=(linear|categorical)] [--camera=(single|stereo)] [--meta=<key:value> ...] [--myconfig=<filename>]\n manage.py (train) [--tubs=tubs] (--model=<model>) [--type=(linear|inferred|tens...
[ [ "tensorflow.python.keras.models.model_from_json" ] ]
vischia/madminer
[ "98c2bcfb93d0fd84ff1872b344c4d89adf51217f" ]
[ "madminer/utils/ml/models/base.py" ]
[ "from __future__ import absolute_import, division, print_function\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import grad\n\n\nclass BaseFlow(nn.Module):\n \"\"\" \"\"\"\n\n def __init__(self, n_inputs, **kwargs):\n super(BaseFlow, self).__init__()\n\n self.n_...
[ [ "torch.ones_like", "numpy.log", "torch.sum" ] ]
zingale/pynucastro
[ "85b027c0d584046e749888e79e78c611bbf69cb4" ]
[ "pynucastro/rates/rate.py" ]
[ "\"\"\"\nClasses and methods to interface with files storing rate data.\n\"\"\"\n\nimport os\nimport re\nimport io\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport numba\n\ntry:\n from numba.experimental import jitclass\nexcept ImportError:\n from numba import jitclass\n\nfrom pynucastro.nucdata i...
[ [ "numpy.array", "matplotlib.pyplot.colorbar", "numpy.zeros_like", "numpy.log", "matplotlib.pyplot.gca", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.title", "numpy.exp", "matplotlib.pyplot.subplots", "numpy.where", "matplotlib.pyplot.ylabel", "numpy.abs", "matp...
ml-research/X-mushroom-rl
[ "ef5f131d3cfa9c229a614c044d8c001afe8812d2" ]
[ "x_mushroom_rl/algorithms/actor_critic/deep_actor_critic/ppo.py" ]
[ "import numpy as np\n\nimport torch\nimport torch.nn.functional as F\n\nfrom x_mushroom_rl.algorithms.agent import Agent\nfrom x_mushroom_rl.approximators import Regressor\nfrom x_mushroom_rl.approximators.parametric import TorchApproximator\nfrom x_mushroom_rl.utils.torch import to_float_tensor, update_optimizer_p...
[ [ "torch.min", "numpy.mean", "torch.nn.functional.mse_loss", "numpy.std", "torch.distributions.kl.kl_divergence", "torch.tensor" ] ]
trevordavid/rossby-ridge
[ "fb25a8ccf49bec42c440c17d82e56c3ee999f9de" ]
[ "src/scripts/percentiles.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\nimport paths\nimport numpy as np\nimport pandas as pd\n\nfrom astropy.table import Table\n\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\n\nmpl.rcParams[\"figure.dpi\"] = 100\nmpl.rcParams[\"savefig.bbox\"] = \"tight\"\nmpl.rcParams[\"savefig.dpi\"] = 300\n\ni...
[ [ "matplotlib.pyplot.xlim", "numpy.median", "numpy.exp", "numpy.mean", "pandas.read_hdf", "pandas.concat", "numpy.nanpercentile", "matplotlib.pyplot.savefig", "numpy.arange", "numpy.array", "numpy.std", "matplotlib.pyplot.xlabel", "numpy.sum", "matplotlib.pypl...
NagisaZj/pytorch-soft-actor-critic
[ "7f219269356b11273e873a9f4d3ac7b86fe317cb" ]
[ "main.py" ]
[ "import argparse\nimport datetime\nimport gym\nimport numpy as np\nimport itertools\nimport torch\nfrom sac import SAC\nfrom torch.utils.tensorboard import SummaryWriter\nfrom replay_memory import ReplayMemory\nimport json\nimport metaworld, random\n\nparser = argparse.ArgumentParser(description='PyTorch Soft Actor...
[ [ "numpy.random.seed", "torch.save", "torch.manual_seed", "torch.load", "torch.utils.tensorboard.SummaryWriter" ] ]
fronovics/AI_playground
[ "ac302c0694fa2182af343c257b28a033bc4cf5b9" ]
[ "dasem/models.py" ]
[ "\"\"\"models.\n\nUsage:\n dasem.models\n\n\"\"\"\n\n\nfrom __future__ import absolute_import, division, print_function\n\nfrom abc import ABCMeta\n\nimport logging\n\nimport gensim\n\nfrom os.path import join, sep\n\nfrom numpy import argsort, array, dot, newaxis, sqrt, zeros\n\nfrom six import with_metaclass\n\n...
[ [ "numpy.array", "numpy.dot", "numpy.zeros", "numpy.argsort" ] ]
lisabang/basenji
[ "f91bb195b4062c55e487a4091e13a0e813ef07d6" ]
[ "bin/basenji_annot_chr.py" ]
[ "#!/usr/bin/env python\nfrom __future__ import print_function\nfrom optparse import OptionParser\n\nimport gc\nimport joblib\nimport multiprocessing\nimport pdb\nimport os\nimport subprocess\nimport sys\n\nimport h5py\nimport numpy as np\nimport pandas as pd\nfrom sklearn.decomposition import NMF, PCA\n\n# import z...
[ [ "numpy.concatenate", "numpy.array", "pandas.read_table", "numpy.random.choice", "sklearn.decomposition.NMF", "numpy.arange", "numpy.abs", "sklearn.decomposition.PCA" ] ]
lupoglaz/GodotGymAI
[ "2c06f0ab14a4f8e804791324793ae46e668540ee" ]
[ "Tutorials/Lander/main.py" ]
[ "import torch\nimport gym\nfrom stable_baselines3 import DDPG\nfrom LanderEnv import LanderEnv\n\nfrom stable_baselines3.common.callbacks import BaseCallback\nfrom stable_baselines3.common.noise import OrnsteinUhlenbeckActionNoise\nimport numpy as np\n\nclass NormalizedEnvironment(gym.ActionWrapper):\n def actio...
[ [ "numpy.ones", "numpy.zeros", "torch.jit.trace", "torch.from_numpy" ] ]
ManuelFritsche/flow-consistency
[ "90625fe25855aa11c6245ca242ab8d66c41f4726" ]
[ "semseg/models/icnet.py" ]
[ "import torch\r\nimport numpy as np\r\nimport torch.nn as nn\r\n\r\nfrom math import ceil\r\nfrom torch.autograd import Variable\r\n\r\nfrom semseg import caffe_pb2\r\nfrom semseg.models.utils import *\r\nfrom semseg.loss import *\r\n\r\nicnet_specs = {\r\n \"cityscapes\": {\r\n \"n_classes\": 19,\r\n ...
[ [ "numpy.array", "numpy.zeros", "torch.autograd.Variable", "numpy.copy", "scipy.misc.imresize", "torch.from_numpy", "torch.cuda.device_count", "torch.nn.Conv2d", "numpy.argmax", "scipy.misc.imsave" ] ]
qrebjock/fanok
[ "5c3b95ca5f2ec90af7060c21409a11130bd350bd" ]
[ "fanok/sdp/sdp.py" ]
[ "import warnings\n\nimport numpy as np\nfrom scipy.linalg import eigh\nfrom scipy.spatial.distance import pdist\nfrom scipy.cluster.hierarchy import linkage, cut_tree\n\nfrom fanok.sdp._full_rank import _full_rank\nfrom fanok.sdp._low_rank import _sdp_low_rank\n\ntry:\n import cvxpy as cp\nexcept ImportError:\n ...
[ [ "scipy.cluster.hierarchy.linkage", "scipy.spatial.distance.pdist", "scipy.cluster.hierarchy.cut_tree", "numpy.zeros", "scipy.linalg.eigh", "numpy.sum", "numpy.ones", "numpy.ix_", "numpy.where", "numpy.sqrt", "numpy.clip", "numpy.diag" ] ]
LeBronLiHD/ZJU2021_MedicineAI_CourseProject
[ "d19253ace2725545b8eff02ccae957278d6a3402" ]
[ "j_CAE_binary_classification.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"\ngenerate more '1' data in Convolutional auto-encoder\n\"\"\"\n\nimport numpy as np\nimport f_parameters\nimport f_preprocess\nimport f_load_data\nfrom keras.callbacks import EarlyStopping\nfrom keras.layers import Conv2D, MaxPooling2D, UpSampling2D, Dense\nimport os\nimport matpl...
[ [ "numpy.array", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "numpy.shape", "numpy.mean", "numpy.std", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show", "sklearn.metrics.roc_auc_score", "sklearn.metr...
mz71/manim
[ "08678f7b3edc376932493f53e416d310666ed3b7" ]
[ "manim/camera/three_d_camera.py" ]
[ "import numpy as np\n\nfrom ..camera.camera import Camera\nfrom ..constants import *\nfrom ..config import config\nfrom ..mobject.three_d_utils import get_3d_vmob_end_corner\nfrom ..mobject.three_d_utils import get_3d_vmob_end_corner_unit_normal\nfrom ..mobject.three_d_utils import get_3d_vmob_start_corner\nfrom .....
[ [ "numpy.identity", "numpy.array", "numpy.dot", "numpy.exp" ] ]
AZMAG/urbansim_templates
[ "723b83b4187da53a50ee03fdba4842a464f68240" ]
[ "urbansim_templates/models/binary_logit.py" ]
[ "from __future__ import print_function\n\nimport numpy as np\nimport pandas as pd\nimport patsy\nfrom datetime import datetime as dt\nfrom statsmodels.api import Logit\n\nimport orca\n\nfrom .. import modelmanager\nfrom ..utils import get_data\nfrom .shared import TemplateStep\n\n\n@modelmanager.template\nclass Bin...
[ [ "scipy.stats.chi2.sf", "numpy.less", "numpy.dot", "numpy.exp" ] ]
nickpoerio/CarND-Capstone
[ "439bcc4574d6e7a684250c8a86928c3767c68fff" ]
[ "ros/src/waypoint_updater/waypoint_updater_partial.py" ]
[ "#!/usr/bin/env python\n\nimport rospy\nfrom geometry_msgs.msg import PoseStamped\nfrom styx_msgs.msg import Lane, Waypoint\nfrom scipy.spatial import KDTree\nimport numpy as np\n\nimport math\n\n'''\nThis node will publish waypoints from the car's current position to some `x` distance ahead.\n\nAs mentioned in the...
[ [ "scipy.spatial.KDTree", "numpy.array", "numpy.dot" ] ]
AhmedHathout/mathematics_dataset
[ "4fd371919d57258dcdedaa21b111fa61ee0a771f" ]
[ "mathematics_dataset/sample/polynomials.py" ]
[ "# Copyright 2018 DeepMind Technologies Limited.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
[ [ "numpy.random.dirichlet", "numpy.array", "numpy.pad", "numpy.empty", "numpy.asarray", "numpy.zeros", "numpy.reshape", "numpy.not_equal", "numpy.count_nonzero", "numpy.ones", "numpy.prod", "numpy.all", "numpy.indices", "numpy.maximum" ] ]
ffffconf1/anon
[ "4359ee496b85d7c5037a488b72b0bc34e7df88a5" ]
[ "quant_eval/scripts/eurecom/evaluation_psnr_ssim.py" ]
[ "from PIL import Image\nimport numpy as np\nfrom PIL import Image\nimport pandas as pd\nimport argparse\nimport os\nfrom os import listdir,makedirs\nfrom os.path import isfile,join\nimport cv2\nimport os,glob\nfrom skimage.measure import compare_ssim\nimport re\nimport itertools\n\n\"\"\"\nScript to convert real an...
[ [ "numpy.array", "numpy.asarray", "pandas.DataFrame", "numpy.sqrt", "pandas.concat", "pandas.read_csv" ] ]
lsst-dm/Spectractor
[ "4ed1bf75d6bf970fd28308da30754485722835a8" ]
[ "tests/test_extractor.py" ]
[ "from numpy.testing import run_module_suite\n\nfrom spectractor import parameters\nfrom spectractor.extractor.extractor import Spectractor\nfrom spectractor.logbook import LogBook\nfrom spectractor.config import load_config\nimport os\nimport numpy as np\n\n\ndef test_logbook():\n logbook = LogBook('./ctiofulllo...
[ [ "numpy.sum", "numpy.testing.run_module_suite", "numpy.isclose", "numpy.mean" ] ]
Andrew-VanIderstine/RNN-and-DNN-from-scratch
[ "61331277245ca5892c6ece8138a5a2c825565b08" ]
[ "RNN and DNN from scratch.py" ]
[ "from math import exp\r\nfrom random import random\r\nfrom sklearn.model_selection import train_test_split\r\nfrom sklearn import metrics\r\nimport numpy as np\r\nimport librosa\r\nimport tensorflow as tf\r\nimport torch\r\nfrom keras.models import Sequential\r\nfrom keras.layers import Dense\r\nfrom keras.layers i...
[ [ "numpy.full", "numpy.array", "tensorflow.convert_to_tensor", "numpy.asarray", "tensorflow.keras.losses.MeanSquaredError", "sklearn.model_selection.train_test_split", "tensorflow.keras.Input" ] ]
GuanLab/sepsis
[ "2476d894926f5676ef6376746c47b4c1b1111128" ]
[ "evaluation/evaluation_bootstrap_arg.py" ]
[ "from sklearn.metrics import auc\nimport numpy as np\nfrom sklearn.metrics import precision_recall_curve\nimport sklearn.metrics as metrics\nimport sys\n\nthe_list=['0','1','2','3','4']\ny_long=np.zeros(0)\npred_long=np.zeros(0)\nfor the_id in the_list:\n y=np.genfromtxt((sys.argv[1]+'.'+the_id),delimiter='\\t')...
[ [ "numpy.random.choice", "numpy.zeros", "numpy.genfromtxt", "sklearn.metrics.auc", "numpy.hstack", "sklearn.metrics.roc_curve" ] ]
nishio/atcoder
[ "8db36537b5d8580745d5f98312162506ad7d7ab4" ]
[ "agc047/a.py" ]
[ "#!/usr/bin/env python3\nimport sys\nsys.setrecursionlimit(10**6)\nINF = 10 ** 9 + 1 # sys.maxsize # float(\"inf\")\nMOD = 10 ** 9 + 7\n\n\ndef debug(*x):\n print(*x, file=sys.stderr)\n\n\ndef solve0(N, AS):\n ret = 0\n for i in range(N):\n for j in range(i + 1, N):\n if AS[i] * AS[j] % ...
[ [ "numpy.zeros" ] ]
jason9693/ModelWriter
[ "ab80ba154ed862ac32e20b9cd1c6ee7aecec8388" ]
[ "model_writer.py" ]
[ "import pandas as pd\nfrom tabulate import tabulate\n\nclass ModelValue:\n '''\n Model Value class contain model name and some values for during training time.\n '''\n def __init__(self, model_name: str, values: dict):\n self.model_name = model_name\n self.values = values\n\n def set_va...
[ [ "pandas.DataFrame", "pandas.read_csv" ] ]
prography/ddeep_KYJ_JSY
[ "2da506cfd9e792a2d391de6f390b8b3b509b6c54" ]
[ "mtcnn_pytorch/src/detector.py" ]
[ "import numpy as np\r\nimport torch\r\nfrom torch.autograd import Variable\r\nfrom .get_nets import PNet, RNet, ONet\r\nfrom .box_utils import nms, calibrate_box, get_image_boxes, convert_to_square\r\nfrom .first_stage import run_first_stage\r\n\r\n\r\ndef detect_faces(image, min_face_size=20.0,\r\n ...
[ [ "numpy.round", "torch.FloatTensor", "numpy.where", "numpy.vstack", "numpy.expand_dims" ] ]
plant99/MSS
[ "4d1cef8d3822000d8f5a1a88bdeec714fda70adb" ]
[ "mslib/retriever.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n\n mslib.retriever\n ~~~~~~~~~~~~~~~~~~~~\n\n automation within mss to create for instance a number of the same plots\n for several flights or several forecast steps\n\n This file is part of mss.\n\n :copyright: Copyright 2020 Joern Ungermann\n :license: APACHE...
[ [ "matplotlib.pyplot.text", "matplotlib.pyplot.savefig", "matplotlib.pyplot.figure", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.gca" ] ]
aditagrawal/Azure_ML
[ "30d7021c19aef8f56b05580cba25d38a5bc0b24e" ]
[ "1_Train_model_AML/1_Run_training_script.py" ]
[ "### Writing a script to train a model\n\nfrom azureml.core import Run\nimport pandas as pd\nimport numpy as np\nimport joblib\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.linear_model import LogisticRegression\n\n# Get the experiment run context\nrun = Run.get_context()\n\n# Prepare the data...
[ [ "numpy.float", "sklearn.linear_model.LogisticRegression", "sklearn.model_selection.train_test_split", "pandas.read_csv", "numpy.average" ] ]
BadDevCode/lumberyard
[ "3d688932f919dbf5821f0cb8a210ce24abe39e9e" ]
[ "dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/tests/test_dictobject.py" ]
[ "\"\"\"\nTesting numba implementation of the numba dictionary.\n\nThe tests here only check that the numba typing and codegen are working\ncorrectly. Detailed testing of the underlying dictionary operations is done\nin test_dictimpl.py.\n\"\"\"\nfrom __future__ import print_function, absolute_import, division\n\ni...
[ [ "numpy.int8", "numpy.random.seed", "numpy.arange", "numpy.intp", "numpy.uint64", "numpy.random.random", "numpy.int32" ] ]
lyakaap/ISC21-Descriptor-Track-1st
[ "843e28d55b32ae179acc2526aa59ee2f052e310f" ]
[ "exp/v98.py" ]
[ "import argparse\nimport builtins\nimport os\nimport pickle\nimport random\nimport shutil\nimport subprocess\nimport warnings\nfrom pathlib import Path\nfrom typing import Any, Dict, List, Optional\n\nimport h5py\nimport numpy as np\nimport timm\nimport torch\nimport torch.backends.cudnn as cudnn\nimport torch.dist...
[ [ "torch.nn.Linear", "torch.cat", "torch.cuda.amp.autocast", "torch.tile", "torch.multiprocessing.spawn", "torch.load", "torch.nn.DataParallel", "numpy.concatenate", "torch.nn.SyncBatchNorm.convert_sync_batchnorm", "torch.nn.init.constant_", "torch.distributed.init_proces...
aak65/glue
[ "7f03fe5dac4add2cb0d7347832cb9d1850f73440" ]
[ "glue/core/data_factories.py" ]
[ "\"\"\" Factory methods to build Data objects from files\n\nImplementation notes:\n\nEach factory method conforms to the folowing structure, which\nhelps the GUI Frontend easily load data:\n\n1) The first argument is a file name to open\n\n2) The return value is a Data object\n\n3) The function has a .label attribu...
[ [ "numpy.flipud", "pandas.read_excel", "pandas.read_csv" ] ]
ADS-Group-15/Data-Preparation
[ "c7173af6da22c35067cafd88775a17817f81e599" ]
[ "Merge_Data.py" ]
[ "import pandas as pd\nimport csv\n\nhour_filename = 'LPPH.csv'\nperson_filename = 'LPPP.csv'\nsource_filename = 'Data.csv'\n\ndef merge_csv(file1, file2, file3):\n dfH = pd.read_csv(file1, sep=\",\", header=0)\n dfP = pd.read_csv(file2, sep=\",\", header=0)\n dfS = pd.read_csv(file3, sep=\",\", header=0)\n...
[ [ "pandas.read_csv" ] ]
Alexfm101/Smartbots
[ "4dcd422b15ba84584c4e0991e21d0c6e5fbdb289" ]
[ "smartbots/enviroments/driving_0.py" ]
[ "'''\nDriving-v0 environment. Target with no obstacles.\n'''\n# OpenAI gym library imports\nimport gym\n# External libraries\nimport pybullet as p\nimport numpy as np\n# Local resources\nfrom smartbots.enviroments.driving_env import DrivingEnv\nimport smartbots.assets._car as car\nfrom smartbots.assets._cube import...
[ [ "numpy.concatenate", "numpy.array", "numpy.linalg.norm" ] ]
Jjthemoviestar/mr-data-likes-py
[ "93578ac4d989eef9d52fc6938c03e71dc575e662" ]
[ "unused code.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Mon Oct 8 15:20:20 2018\r\n\r\n@author: joshcole\r\n\"\"\"\r\nimport matplotlib.pyplot as plt\r\nimport F1_import as f1\r\n\r\n\r\naskcredloan_credhistnum = f1.loan_data['Credit_History_Num'] #see AskCreditLoans_Regression Analysis for more info\r\naskcredloan_lnsta...
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.title", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.scatter" ] ]
metya/Sun_Project
[ "799cbda66f7d898a39438daa9c16bf124562395a" ]
[ "utils.py" ]
[ "import copy\nimport os\nimport pickle\nimport time\nimport urllib\nimport warnings\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n# import pretrainedmodels\n\nfrom astropy.io import fits\n# from PIL import Image\nfrom skimage.transform import rescale, resize\n# from sklearn.metrics import f1_score\n# from...
[ [ "numpy.max", "torch.utils.data.random_split", "numpy.sign", "numpy.abs", "matplotlib.pyplot.axes", "numpy.floor" ] ]
baowj-678/TC
[ "4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6" ]
[ "ALBERT/dataset/dataloader.py" ]
[ "\"\"\" 数据集加载器\r\n@Author: Bao Wenjie\r\n@Email: bwj_678@qq.com\r\n@Date: 2020/10/31\r\n\"\"\"\r\nfrom torch.utils.data import DataLoader\r\nfrom torch.nn.utils.rnn import pack_padded_sequence\r\nimport torch\r\n\r\ndef collate_func(X):\r\n \"\"\" batch数据处理 (snntence, length, label)\r\n @param:\r\n :pre_X ...
[ [ "torch.tensor", "torch.sort" ] ]
ac-optimus/pymc3
[ "4759797bb2b8f4998f47f32c3fd8cd355529add8" ]
[ "pymc3/model.py" ]
[ "import collections\nimport functools\nimport itertools\nimport threading\nimport warnings\nfrom typing import Optional, TypeVar, Type, List, Union, TYPE_CHECKING, Any, cast\nfrom sys import modules\n\nimport numpy as np\nfrom pandas import Series\nimport scipy.sparse as sps\nimport theano.sparse as sparse\nfrom th...
[ [ "scipy.sparse.issparse", "numpy.array", "numpy.copyto", "numpy.empty", "numpy.asarray", "numpy.zeros", "numpy.ones", "numpy.can_cast", "numpy.prod", "numpy.issubdtype", "numpy.empty_like" ] ]
mikezsx/dlstudy
[ "9eb7ecd3e525c9cff31ebd59a96794f212ca5e1e" ]
[ "tests/keras/preprocessing/image_test.py" ]
[ "import pytest\nfrom keras.preprocessing import image\nfrom PIL import Image\nimport numpy as np\nimport os\nimport shutil\nimport tempfile\n\n\nclass TestImage:\n\n def setup_class(cls):\n img_w = img_h = 20\n rgb_images = []\n gray_images = []\n for n in range(8):\n bias ...
[ [ "numpy.random.random", "numpy.arange", "numpy.random.rand", "numpy.vstack" ] ]
giladElichai/public
[ "1c86379f54999ca941eeb2199cc37a60f7939097" ]
[ "CnnArchitecture/VGG/VGGModel.py" ]
[ "\nfrom tensorflow.keras.layers import Input, Conv2D, MaxPooling2D, BatchNormalization, Activation, Dropout, Dense, Flatten\nfrom tensorflow.keras.models import Model\n\ndef conv_block(input_tensor, filters, n_blocks=2, kernel_size=3, padding='same'):\n\n x = input_tensor\n for _ in range(n_blocks):\n ...
[ [ "tensorflow.keras.layers.Input", "tensorflow.keras.layers.Flatten", "tensorflow.keras.layers.Activation", "tensorflow.keras.models.Model", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.MaxPooling2D", ...
Hertz-and-Alpha/zipline-reloaded
[ "eea4a2ccfc03d7fa4946defcb3cdf23469e4ae39" ]
[ "src/zipline/examples/buy_and_hold.py" ]
[ "#!/usr/bin/env python\n#\n# Copyright 2015 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requir...
[ [ "pandas.Timestamp" ] ]
MEDCOMP/SC2_ACME
[ "511f5c4388ad4b8ef157e46678cc22bb0a199ad4", "511f5c4388ad4b8ef157e46678cc22bb0a199ad4" ]
[ "acme/agents/tf/actors.py", "acme/tf/networks/stochastic.py" ]
[ "# python3\n# Copyright 2018 DeepMind Technologies Limited. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0...
[ [ "tensorflow.function" ], [ "tensorflow.zeros", "tensorflow.range", "tensorflow.gather_nd", "tensorflow.transpose", "tensorflow.debugging.assert_equal", "tensorflow.nn.softmax" ] ]
twicki/dace
[ "75619ef87396c9e48b877ac4a12b333b528abd7c" ]
[ "tests/numpy/array_creation_test.py" ]
[ "# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.\nimport dace\nimport numpy as np\nfrom common import compare_numpy_output\n\n# M = dace.symbol('M')\n# N = dace.symbol('N')\n\nM = 10\nN = 20\n\n\n@dace.program\ndef empty():\n return np.empty([M, N], dtype=np.uint32)\n\n\ndef test_empt...
[ [ "numpy.zeros_like", "numpy.ones_like", "numpy.empty", "numpy.zeros", "numpy.copy", "numpy.ones", "numpy.complex32", "numpy.identity", "numpy.ndarray", "numpy.empty_like", "numpy.full_like" ] ]
karan-w/WebScraping
[ "1d8de647df689f46b97be8084e9f15bddfa658eb" ]
[ "google-news-scraping/scraper.py" ]
[ "import requests\nfrom bs4 import BeautifulSoup\nimport pickle \nimport csv \nimport urllib.request \nimport json\nfrom vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer \nfrom selenium import webdriver\nfrom webdriver_manager.chrome import ChromeDriverManager\nimport datetime\nimport time\nimport arg...
[ [ "pandas.DataFrame", "pandas.read_csv" ] ]
GH-Jo/PROFIT
[ "7a42553c2d1291200b5b01942791113332252829" ]
[ "quant_op/softlsq.py" ]
[ "from __future__ import absolute_import\r\nfrom __future__ import division\r\nfrom __future__ import print_function\r\nfrom __future__ import unicode_literals\r\n\r\nimport torch \r\nimport torch.nn as nn \r\nimport torch.nn.functional as F\r\nfrom torch.nn.parameter import Parameter\r\nimport numpy as np \r\nfrom ...
[ [ "torch.nn.functional.softplus", "torch.no_grad", "numpy.exp", "torch.nn.functional.linear", "torch.nn.functional.hardtanh", "numpy.sort", "numpy.abs", "torch.nn.functional.relu", "torch.nn.functional.pad", "torch.Tensor", "torch.nn.functional.conv2d" ] ]
wwhio/awesome-DeepLearning
[ "2cc92edcf0c22bdfc670c537cc819c8fadf33fac", "2cc92edcf0c22bdfc670c537cc819c8fadf33fac" ]
[ "transformer_courses/BERT_distillation/PaddleSlim-develop/paddleslim/nas/darts/search_space/conv_bert/reader/cls.py", "transformer_courses/BERT_distillation/PaddleSlim-develop/paddleslim/common/rl_controller/ddpg/ddpg_controller.py" ]
[ "# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ...
[ [ "numpy.random.seed", "numpy.random.shuffle" ], [ "numpy.random.normal", "numpy.abs", "numpy.asarray", "numpy.expand_dims" ] ]
junmuz/pandapower
[ "24ed3056558887cc89f67d15b5527523990ae9a1" ]
[ "pandapower/control/util/auxiliary.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2021 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\nimport csv\nimport random\nfrom functools import reduce\nfrom pandapower.auxiliary import ADict\n\nimport numpy as np\nimpo...
[ [ "numpy.asarray", "pandas.Int64Index", "matplotlib.pyplot.plot", "numpy.isscalar", "numpy.ndim", "numpy.linspace" ] ]
Jade-flow/manim
[ "e359f520bc7010d4ce9c3ffa3668049b0d512b1d" ]
[ "manimlib/mobject/mobject.py" ]
[ "import copy\nimport itertools as it\nimport random\nimport sys\nimport moderngl\nfrom functools import wraps\n\nimport numpy as np\n\nfrom manimlib.constants import *\nfrom manimlib.utils.color import color_gradient\nfrom manimlib.utils.color import get_colormap_list\nfrom manimlib.utils.color import rgb_to_hex\nf...
[ [ "numpy.repeat", "numpy.array", "numpy.linalg.norm", "numpy.dot", "numpy.zeros", "numpy.identity", "numpy.sign", "numpy.transpose", "numpy.arange", "numpy.abs", "numpy.all", "numpy.linspace", "numpy.vstack" ] ]
solomon-han/convince
[ "8d32118b3339fc9820aa59af4815f87eaca95f24" ]
[ "ParlAI/parlai/core/pytorch_data_teacher.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"\n (NOTE: To use this class, please follow the tutorial here:\n http://parl.ai/static/docs/tutorial...
[ [ "torch.utils.data.sampler.RandomSampler", "torch.version.__version__.startswith", "torch.multiprocessing.Lock", "torch.multiprocessing.Value", "torch.utils.data.sampler.SequentialSampler", "torch.utils.data.DataLoader", "torch.as_tensor" ] ]
murali1996/ConMask
[ "3e16e35309ca73e4010533d6af7a82f84e3e8079" ]
[ "ndkgc/utils/__init__.py" ]
[ "import numpy as np\n\nimport tensorflow as tf\n\n\ndef count_line(file_path):\n counter = 0\n with open(file_path, 'r', encoding='utf8') as f:\n for _ in f:\n counter += 1\n return counter\n\n\ndef valid_vocab_file(file_path):\n with open(file_path, 'r', encoding='utf8') as f:\n ...
[ [ "tensorflow.logging.info", "numpy.sqrt" ] ]
thomasvrussell/snlstm
[ "8d7f6e2fa03b2486b8297641a430e1ca8172e6df", "8d7f6e2fa03b2486b8297641a430e1ca8172e6df" ]
[ "snail/utils/GPLightCurve.py", "snail/SpecProc.py" ]
[ "import warnings\nimport numpy as np\nfrom sklearn.gaussian_process import GaussianProcessRegressor\nfrom sklearn.gaussian_process.kernels import RBF, ConstantKernel as CK\n\ndef GP_Interpolator(X, Y, eY, X_q, NaN_fill=0.1):\n # * nan-correction\n Avmask = ~np.isnan(Y)\n X, Y, eY = X[Avmask], Y[Avmask], eY...
[ [ "numpy.max", "numpy.isnan", "numpy.atleast_2d", "numpy.min", "sklearn.gaussian_process.kernels.RBF", "numpy.sqrt", "sklearn.gaussian_process.GaussianProcessRegressor", "sklearn.gaussian_process.kernels.ConstantKernel" ], [ "numpy.max", "scipy.interpolate.interp1d", ...
ravipatelxyz/kbc-meta
[ "ff60a159d7d9917f4357c8663974410e4c901531", "ff60a159d7d9917f4357c8663974410e4c901531" ]
[ "toymeta/kbc-cli-toymeta2_higher_sqrdL2norm_multidim_noiseinject.py", "tools/results-cli.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# %%\nimport argparse\nimport sys\nimport os\n\nimport multiprocessing\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom copy import deepcopy\n\nimport pandas as pd\nimport torch\nfrom torch import nn, optim\n\nimport higher\nimport wandb\n\ntorch.set_num...
[ [ "torch.optim.Adagrad", "torch.ones", "pandas.DataFrame", "torch.norm", "matplotlib.pyplot.savefig", "torch.manual_seed", "torch.tensor", "matplotlib.pyplot.tight_layout", "torch.device", "numpy.array", "numpy.percentile", "matplotlib.pyplot.title", "torch.optim....
Superuserjoy/Yolov4-Deepsort-for-google-colab
[ "1261dc3c8bd2d390eb95ddb3dc2f46fedd3b5243" ]
[ "object_tracker.py" ]
[ "import os\n# comment out below line to enable tensorflow logging outputs\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\nimport time\nimport tensorflow as tf\nphysical_devices = tf.config.experimental.list_physical_devices('GPU')\nif len(physical_devices) > 0:\n tf.config.experimental.set_memory_growth(physical_devi...
[ [ "numpy.array", "numpy.delete", "tensorflow.shape", "numpy.asarray", "tensorflow.compat.v1.ConfigProto", "tensorflow.compat.v1.InteractiveSession", "tensorflow.config.experimental.set_memory_growth", "tensorflow.lite.Interpreter", "matplotlib.pyplot.get_cmap", "numpy.linspac...
83286415/DeepLearningWithPythonKeras
[ "d3e7dd3b206d3d22a45ad4967a00edd26c4cbe75" ]
[ "6.3.5-a-first-recurrent-baseline.py" ]
[ "# FROM 6.3py\n# 6.3.1 prepare the climate data\n\nimport keras\nprint(keras.__version__) # 2.1.6\nimport os\n\n\n# prepare the climate data\nbase_dir = 'D:/AI/deep-learning-with-python-notebooks-master'\nclimate_dir = os.path.join(base_dir, 'jena_climate')\nfname = os.path.join(climate_dir, 'jena_climate_2009_201...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "numpy.random.randint", "matplotlib.pyplot.show" ] ]
waffoo/accel
[ "7aaa45af2d120f9ed49d10f8654ff5af03feb705" ]
[ "examples/atari_cql.py" ]
[ "import os\nfrom logging import DEBUG, getLogger\nfrom time import time\n\nfrom comet_ml import Experiment # isort: split\nimport gym\nimport hydra\nimport numpy as np\n# from gym.utils.play import play import random\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim...
[ [ "torch.nn.Linear", "numpy.round", "numpy.load", "torch.nn.Conv2d", "torch.cuda.is_available" ] ]
databricks-academy/scalable-machine-learning-with-apache-spark
[ "2b560dea766e2e6589defaaf6d9d15f361ce6db6", "2b560dea766e2e6589defaaf6d9d15f361ce6db6" ]
[ "Scalable-Machine-Learning-with-Apache-Spark/ML 13 - Training with Pandas Function API.py", "Scalable-Machine-Learning-with-Apache-Spark/Solutions/Labs/ML 08L - Hyperopt Lab.py" ]
[ "# Databricks notebook source\n# MAGIC %md-sandbox\n# MAGIC \n# MAGIC <div style=\"text-align: center; line-height: 0; padding-top: 9px;\">\n# MAGIC <img src=\"https://databricks.com/wp-content/uploads/2018/03/db-academy-rgb-1200px.png\" alt=\"Databricks Learning\" style=\"width: 600px\">\n# MAGIC </div>\n\n# COM...
[ [ "pandas.DataFrame", "sklearn.metrics.mean_squared_error", "sklearn.ensemble.RandomForestRegressor" ], [ "numpy.random.default_rng", "sklearn.ensemble.RandomForestRegressor", "sklearn.model_selection.cross_val_score" ] ]
sheikhahnaf/upho
[ "c658538093d471eb20accc4028406034cb223ecc" ]
[ "upho/harmonic/dynamical_matrix.py" ]
[ "import numpy as np\nfrom phonopy.structure.cells import get_reduced_bases\nfrom phonopy.harmonic.dynamical_matrix import DynamicalMatrix\n\n\nclass UnfolderDynamicalMatrix(DynamicalMatrix):\n \"\"\"Dynamical matrix class\n\n When prmitive and supercell lattices are L_p and L_s, respectively,\n frame F is ...
[ [ "numpy.array", "numpy.dot", "numpy.linalg.norm", "numpy.zeros", "numpy.rint", "numpy.min", "numpy.abs", "numpy.linalg.inv" ] ]
skw32/CoFFEE_PoissonSolver_KO_pa
[ "27a0ec8021ffefda1a4a4aa3d8086ac7d5561559" ]
[ "Examples/1D/NanoRibbon_BN/Model_Scaling/plot_fit.py" ]
[ "#!/usr/bin/env python\n\nimport sys,string\nimport matplotlib.pyplot as plt\nfrom matplotlib.ticker import AutoMinorLocator\nimport matplotlib.gridspec as gridspec\nimport numpy as np\n\nfig, ax = plt.subplots()\n\n# Values of alpha:\nalpha = np.array([6,8,10,15,20,30])\n\n# Corresponding model energies:\nEn = np....
[ [ "numpy.array", "matplotlib.pyplot.savefig", "matplotlib.pyplot.subplots", "numpy.arange", "numpy.polyfit", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.show" ] ]
KansKim/oneplus
[ "df6aad250dba9bc36a0eccfe960026e3e240f057" ]
[ "selfdrive/ntune.py" ]
[ "import os\nimport fcntl\nimport signal\nimport json\nimport numpy as np\n\nfrom selfdrive.hardware import TICI\n\nCONF_PATH = '/data/ntune/'\nCONF_LQR_FILE = '/data/ntune/lat_lqr.json'\n\nntunes = {}\n\ndef file_watch_handler(signum, frame):\n global ntunes\n for ntune in ntunes.values():\n ntune.handle()\n\n...
[ [ "numpy.array" ] ]
jankukacka/lwnet
[ "5b91c1897e68021c1dac263645d1d3050190ab35" ]
[ "analyze_results.py" ]
[ "import argparse\nfrom PIL import Image\nimport os, sys\nimport os.path as osp\nimport pandas as pd\nfrom tqdm import tqdm\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn.metrics import roc_curve, auc, confusion_matrix, accuracy_score\nfrom sklearn.metrics import matthews_corrcoef\nfrom utils.eva...
[ [ "numpy.array", "sklearn.metrics.confusion_matrix", "pandas.DataFrame", "matplotlib.pyplot.plot", "numpy.hstack", "matplotlib.pyplot.legend", "numpy.linspace", "sklearn.metrics.accuracy_score", "matplotlib.pyplot.figure", "numpy.argmax", "sklearn.metrics.auc", "panda...
ndlrf-rnd/sgpt
[ "de45632cc6e12612771146725a0f6fc4ff42555c" ]
[ "biencoder/nli_msmarco/sentence-transformers/examples/training/ms_marco/train_bi-encoder_mnrl.py" ]
[ "\"\"\"\nThis examples show how to train a Bi-Encoder for the MS Marco dataset (https://github.com/microsoft/MSMARCO-Passage-Ranking).\n\nThe queries and passages are passed independently to the transformer network to produce fixed sized embeddings.\nThese embeddings can then be compared using cosine-similarity to ...
[ [ "numpy.random.seed", "torch.utils.data.DataLoader" ] ]
joshuagornall/jax
[ "c97cd0a526c12ad81988fd58c1c66df4ddd71813" ]
[ "jax/experimental/jax2tf/tests/shape_poly_test.py" ]
[ "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "tensorflow.TensorSpec", "numpy.array", "numpy.random.rand", "tensorflow.GradientTape", "numpy.ones", "tensorflow.Variable", "tensorflow.function", "numpy.shape", "numpy.float32", "numpy.stack", "numpy.arange", "numpy.prod" ] ]
DominiqueMaciejewski/asreview
[ "eb1066074613a5f6f930ff610ff92184e9244f4f", "eb1066074613a5f6f930ff610ff92184e9244f4f" ]
[ "asreview/io/ris_writer.py", "asreview/batch.py" ]
[ "# Copyright 2019-2021 The ASReview Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless r...
[ [ "pandas.isnull" ], [ "numpy.random.RandomState" ] ]
HASTE-project/desktop-agent
[ "71a3d0d69b5a6660d63158897a53d1a65aba49ba" ]
[ "scrap/plot-queue.py" ]
[ "import matplotlib.pyplot as plt\n\nLOG_FILE_NAME = '2019_03_22__11_40_21_trash'\n\ntimestamps = []\npre_processeds = []\nnot_pre_processeds = []\ntotal = []\n\nlines = []\n\nwith open('../../logs/log_%s.log' % LOG_FILE_NAME, 'r') as f:\n for line in f:\n if 'PLOT' not in line:\n continue\n ...
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.legend", "matplotlib.pyplot.show", "matplotlib.pyplot.scatter", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.clf" ] ]
sugartom/TF-Serving-Downloads
[ "4bf8eeacafd3a58bc701c23bb31b73463704cedd", "4bf8eeacafd3a58bc701c23bb31b73463704cedd" ]
[ "tensorflow_serving/example/tf_openpose_client.py", "tensorflow_serving/example/inception_client_master_version_v2.py" ]
[ "# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl...
[ [ "tensorflow.contrib.util.make_tensor_proto", "tensorflow.app.run", "numpy.expand_dims", "tensorflow.app.flags.DEFINE_string" ], [ "tensorflow.app.run", "tensorflow.python.framework.tensor_util.MakeNdarray" ] ]
inXS212/Saltie
[ "78224ecdcbe049c9a798c5cfac12c223efc0596f" ]
[ "bot_code/models/actor_critic/base_actor_critic.py" ]
[ "from bot_code.models import base_reinforcement\r\nimport numpy as np\r\nimport tensorflow as tf\r\nimport random\r\nimport bot_code.livedata.live_data_util as live_data_util\r\nimport collections\r\n\r\n\r\nclass BaseActorCritic(base_reinforcement.BaseReinforcement):\r\n frames_since_last_random_action = 0\r\n ...
[ [ "tensorflow.data.Dataset.from_tensor_slices", "tensorflow.multinomial", "tensorflow.matmul", "tensorflow.greater", "tensorflow.stack", "tensorflow.nn.softmax", "tensorflow.identity", "tensorflow.cast", "tensorflow.train.GradientDescentOptimizer", "tensorflow.random_normal_i...
mawanda-jun/TReNDS-neuroimaging
[ "8075f4196e7eb812ce96b5a10b18d13c293ce727" ]
[ "training_net_info/PlainResNet3D50_numInitFeatures.64_lr.0.0001_drop.0.4_batchsize.34_loss.metric_optimizer.adamw_patience.10_other_net.32outputfeatures/train.py" ]
[ "from model import Model\nfrom dataset import TReNDS_dataset, ToTensor, AugmentDataset, fMRI_Aumentation, Normalize, RandomCropToDim, ResizeToDim\nimport shutil\nfrom torch.utils.data import DataLoader, random_split\nfrom torchvision import transforms\nimport os\n\nos.setgid(1000), os.setuid(1000)\n\n\ndef clean_fo...
[ [ "torch.utils.data.random_split", "torch.utils.data.DataLoader" ] ]
wallacegferreira/PythonML_Study
[ "151e96ba4019dc03a8b4fb1cab7d9b0e637f7905" ]
[ "BasicPython/lin_regress_multiv_poly.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Apr 8 15:05:29 2020\n\n@author: Wallace\n\nExamples based on https://realpython.com/linear-regression-in-python/\n\"\"\"\n\n\n\n# Step 1: Import packages\nimport numpy as np\nfrom sklearn.linear_model import LinearRegression\nfrom sklearn.preprocessing import Polyno...
[ [ "numpy.array", "sklearn.linear_model.LinearRegression", "sklearn.preprocessing.PolynomialFeatures", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ] ]
Wenyuan-Vincent-Li/pixpixHD
[ "7553e0f9bb23b453a476404f00607bd8f75854a9" ]
[ "precompute_feature_maps.py" ]
[ "from options.train_options import TrainOptions\nfrom data.data_loader import CreateDataLoader\nfrom models.models import create_model\nimport os\nimport util.util as util\nfrom torch.autograd import Variable\nimport torch.nn as nn\n\nopt = TrainOptions().parse()\nopt.nThreads = 1\nopt.batchSize = 1 \nopt.serial_ba...
[ [ "torch.nn.Upsample" ] ]
linyang23/AI-Python-Code-Implementations-with-Notes
[ "af729c652a301b199d568d5989adc5ed6413dcf9" ]
[ "numpy_test/numpy_c.py" ]
[ "# coding=utf-8\nimport numpy as np\nnd5=np.random.random([3,3]) #生成3行3列的矩阵\nprint(nd5)\nprint(type(nd5))\n\n'''输出 \n[[0.30996243 0.70525938 0.23778251]\n [0.36607574 0.07691564 0.25879282]\n [0.78231402 0.64058363 0.44167507]]\n<class 'numpy.ndarray'>\n'''" ]
[ [ "numpy.random.random" ] ]
Muxelmann/animlib
[ "f85c13ecdc98b49aae64c7cb02e5dccc2dbecfd7" ]
[ "animlib/animations/unveil.py" ]
[ "from animlib.animations.animation import Animation, AnimationOut\nfrom animlib.geometies.base import Base\n\ntry:\n import cairo\nexcept:\n import cairocffi as cairo\nimport numpy as np\nfrom enum import Enum\n\nclass UnveilDirections(Enum):\n LEFT = ( 1.0, 0.0, 1.0, 0.0)\n TOP_LEFT = ...
[ [ "numpy.concatenate", "numpy.array" ] ]
OpenSourceEconomics/tespy
[ "2bf3e6dda867514a04d5816609010bf09e436d44" ]
[ "docs/_static/codes/fig-gaussian-peak.py" ]
[ "\"\"\"Figure of the Gaussian Peak Integrand function in 3D.\n\nx1 is evaluated on [0, 1]\nx2 is evaluated on [0, 1]\ny is the result of applying the Gaussian Peak Integrand function on\neach combination of x1 and x2 and u1,u2 = 0.5\n\n\"\"\"\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom mpl_toolkits.m...
[ [ "numpy.array", "numpy.linspace", "matplotlib.pyplot.figure" ] ]
JoeshpCheung/trans_emotion
[ "5909611c1ae65f9e4e64e5584008d731ca4b7eb9" ]
[ "test_transformers.py" ]
[ "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n# vim:fenc=utf-8\n#\n# Copyright © 2021 jasoncheung <jasoncheung@iZwz95ffbqqbe9pkek5f3tZ>\n#\n# Distributed under terms of the MIT license.\n\n\"\"\"\n\n\"\"\"\nimport os\n\nos.environ[\"TF_CPP_MIN_LOG_LEVEL\"] = \"1\"\nimport tensorflow as tf\n\nfrom transformers i...
[ [ "sklearn.model_selection.train_test_split", "pandas.read_csv", "sklearn.metrics.accuracy_score", "sklearn.metrics.precision_recall_fscore_support" ] ]
Jun1453/tomofilter
[ "efd8db983c92386ae93a4544e057d61b2d38b89c" ]
[ "blockmodel.py" ]
[ "import numpy as np\n\nRADIUS1 = [3484.3,3661.0,3861.0,4061.0,4261.0,4461.0,4861.0,5061.0,5261.0,5411.0,5561.0,5711.0,5841.0,5971.0,6071.0,6171.0,6260.0,6349.0]\nRADIUS2 = [3661.0,3861.0,4061.0,4261.0,4461.0,4861.0,5061.0,5261.0,5411.0,5561.0,5711.0,5841.0,5971.0,6071.0,6171.0,6260.0,6349.0,6371.0]\n\nclass Model(l...
[ [ "numpy.round", "numpy.deg2rad", "numpy.mean", "numpy.zeros" ] ]
takat0m0/test_code
[ "1cd90f8a97bf3d2417319bc48284d7d4be331c94" ]
[ "tf_rnn/rnn_layer.py" ]
[ "# -*- coding:utf-8 -*-\n\nimport os\nimport sys\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom tf_util import Layers\n\nclass RNNLayers(Layers):\n def __init__(self, name_scopes, hidden_dims):\n assert(len(name_scopes) == 1)\n super().__init__(name_scopes)\n self.hidden_dims = hidde...
[ [ "tensorflow.shape", "tensorflow.nn.rnn_cell.GRUCell", "tensorflow.variable_scope", "tensorflow.placeholder", "tensorflow.nn.dynamic_rnn" ] ]
karencfisher/deskbot
[ "655caef26bc7e943976b75ff0c6a597c42610f2d" ]
[ "face_track_backup.py" ]
[ "import cv2\nimport numpy as np\nimport picamera, picamera.array\nimport time\nimport haar_detect\nimport dnn_detect as dn\nimport talker \nfrom adafruit_servokit import ServoKit\nimport pid\n\n# define pan function\nprev_x = 0\nprev_y = 0\n\nclass facetrack():\n \n def __init__(self):\n \n # se...
[ [ "numpy.arctan" ] ]
dionis/ABSA-DeepMultidomain
[ "36371065e15f01e5dd2ebaaf9f39abf8b6282de7" ]
[ "approaches/random.py" ]
[ "import sys\nimport numpy as np\nimport torch\n\nimport utils\n\nclass Appr(object):\n\n def __init__(self,model,nepochs=0,sbatch=0,lr=0,lr_min=1e-4,lr_factor=3,lr_patience=5,clipgrad=10000,args=None):\n self.model=model\n\n self.criterion=None\n self.optimizer=None\n\n return\n\n ...
[ [ "torch.LongTensor", "numpy.random.shuffle" ] ]
awais307/message-ix-models
[ "560b5ae6d7ecde42be8d90cbcbd4bbd14ca1cb1d" ]
[ "message_ix_models/testing.py" ]
[ "import logging\nfrom copy import deepcopy\nfrom pathlib import Path\n\nimport click.testing\nimport message_ix\nimport pandas as pd\nimport pytest\nfrom ixmp import Platform\nfrom ixmp import config as ixmp_config\n\nfrom message_ix_models import cli, util\nfrom message_ix_models.util._logging import mark_time, pr...
[ [ "pandas.ExcelFile", "pandas.ExcelWriter" ] ]
dashee87/blogScripts
[ "526bca57777258e55a140e557e3fa3b813441780" ]
[ "Python/2018-09-13-dixon-coles-and-time-weighting/dixon_coles_decay_xi_5season.py" ]
[ "import pandas as pd\r\nimport numpy as np\r\nimport pickle\r\nfrom scipy.stats import poisson,skellam\r\nfrom scipy.optimize import minimize, fmin\r\nfrom multiprocessing import Pool\r\n\r\ndef calc_means(param_dict, homeTeam, awayTeam):\r\n return [np.exp(param_dict['attack_'+homeTeam] + param_dict['defence_'+...
[ [ "pandas.to_datetime", "numpy.array", "numpy.array_equal", "pandas.DataFrame", "scipy.stats.poisson.pmf", "numpy.exp", "numpy.triu", "numpy.random.uniform", "numpy.diag", "scipy.optimize.minimize", "numpy.tril" ] ]
entn-at/voxceleb_trainer
[ "b288f2a2175ff772647343567395db3b645a2124" ]
[ "models/ResNetSE34.py" ]
[ "#! /usr/bin/python\n# -*- encoding: utf-8 -*-\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn import Parameter\nfrom models.ResNetBlocks import *\n\nclass ResNetSE(nn.Module):\n def __init__(self, block, layers, num_filters, nOut, encoder_type='SAP', **kwargs):\n\n ...
[ [ "torch.nn.InstanceNorm1d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.Sequential", "torch.nn.AvgPool2d", "torch.nn.BatchNorm2d", "torch.FloatTensor", "torch.nn.init.kaiming_normal_", "torch.nn.init.constant_", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.nn.fu...
vineeths96/Pattern-Recognition-2
[ "8691c4fe658028bc9d4a06eb17c216eaa5193df9" ]
[ "problem_4/linear_regression_train.py" ]
[ "from sklearn.linear_model import LinearRegression\nfrom sklearn.utils import shuffle\n\n\n# Trains linear regression model\ndef linear_regression_train(X_train, Y_train):\n X_train, Y_train = shuffle(X_train, Y_train, random_state=0)\n\n linear_reg_model = LinearRegression()\n linear_reg_model.fit(X_train...
[ [ "sklearn.linear_model.LinearRegression", "sklearn.utils.shuffle" ] ]
PolaeCo/restyle-encoder
[ "ca30e5655314b59962cc630745934a17ff717039" ]
[ "cloneGAN.py" ]
[ "import argparse\r\nfrom argparse import Namespace\r\nimport time\r\nimport os\r\nimport sys\r\nimport pprint\r\nimport numpy as np\r\nfrom PIL import Image\r\nimport torch\r\nimport torchvision.transforms as transforms\r\n\r\nsys.path.append(\".\")\r\nsys.path.append(\"..\")\r\n\r\nfrom utils.common import tensor2...
[ [ "torch.no_grad", "torch.load" ] ]
WangShaoSUN/LWDRLD
[ "bc71c2588fb8c65076b8353bb0c9e8f1040db4e6" ]
[ "DQN_Zoo/DQN_per.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n# Implementation of Deep Q-Network (DQN)\n# Paper: https://www.nature.com/articles/nature14236\n# And implementation of Prioritized Experience Replay (PER)\n# Paper: https://arxiv.org/abs/1511.05952\n\ndevice = torch.device...
[ [ "torch.nn.Linear", "torch.arange", "torch.max", "torch.no_grad", "torch.nn.Conv2d", "torch.cuda.is_available", "numpy.random.uniform", "torch.squeeze", "torch.load", "torch.as_tensor", "torch.nn.init.calculate_gain", "torch.nn.init.orthogonal_", "torch.argmax" ...