repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
Loranet-Technologies/traffic-analysis
[ "e1e50b6c36b3da6279678c679500a8cf4e62ccef" ]
[ "maskrcnn_benchmark/structures/segmentation_mask.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport torch\n\nimport pycocotools.mask as mask_utils\n\n# transpose\nFLIP_LEFT_RIGHT = 0\nFLIP_TOP_BOTTOM = 1\n\n\nclass Mask(object):\n \"\"\"\n This class is unfinished and not meant for use yet\n It is supposed to contain the mas...
[ [ "torch.as_tensor", "torch.from_numpy" ] ]
saanikagupta/Computational-Intelligence
[ "1ae304c691462a9e69bfb1035053a78653041901" ]
[ "kNN_IrisDataset/kNN.py" ]
[ "# K-Nearest Neighbors (K-NN)\n\n# Importing the libraries\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\n# Importing the dataset\ndataset = pd.read_csv('Iris.csv')\nX = dataset.iloc[:, [1, 2, 3, 4]].values\ny = dataset.iloc[:, 5].values\n\n# Encoding the Independent Variable\nfrom skl...
[ [ "sklearn.preprocessing.LabelEncoder", "sklearn.metrics.confusion_matrix", "sklearn.preprocessing.StandardScaler", "sklearn.neighbors.KNeighborsClassifier", "pandas.read_csv", "sklearn.cross_validation.train_test_split" ] ]
acharal/tensorflow
[ "c5d99169bea3f5d1e3cef973690d2ec7fdbac80f", "c5d99169bea3f5d1e3cef973690d2ec7fdbac80f", "c5d99169bea3f5d1e3cef973690d2ec7fdbac80f" ]
[ "tensorflow/python/kernel_tests/qr_op_test.py", "tensorflow/compiler/tests/binary_ops_test.py", "tensorflow/python/keras/_impl/keras/estimator_test.py" ]
[ "# Copyright 2016 The TensorFlow 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 requ...
[ [ "numpy.divide", "numpy.reshape", "numpy.random.seed", "tensorflow.python.ops.math_ops.matmul", "tensorflow.python.framework.constant_op.constant", "numpy.linalg.qr", "tensorflow.python.ops.linalg_ops.qr", "tensorflow.python.ops.array_ops.ones_like", "numpy.ndarray", "tensor...
guyemerson/sem-func
[ "6945d02bc204203a7fb43d70bbf8aa232646158a" ]
[ "src/core/restart.py" ]
[ "import argparse, numpy as np, logging\n\nfrom trainer import Trainer\n\nif __name__ == \"__main__\":\n np.set_printoptions(precision=3, suppress=True, threshold=np.nan)\n \n parser = argparse.ArgumentParser(description=\"Train a sem-func model\")\n # File name\n parser.add_argument('fullname', nargs...
[ [ "numpy.set_printoptions" ] ]
liud16/direct18project
[ "a92a66ea688469b48be7e701d1b6b9baef28883f" ]
[ "SAFMI/UserImageProcessing/ImagePreprocessing.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Mar 05 12:15:10 2018\n\n@author: sarth\n\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom skimage import morphology\nimport cv2\n\n\n\ndef savefile(filename, file):\n \"\"\" \n Save an array to a txt file\n \n Args:\n filename: na...
[ [ "matplotlib.pyplot.colorbar", "numpy.savetxt", "numpy.zeros", "matplotlib.pyplot.gray", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.show", "matplotlib.pyplot.imshow" ] ]
mjbigdel/baselines
[ "ea25b9e8b234e6ee1bca43083f8f3cf974143998" ]
[ "baselines/deepq/build_graph.py" ]
[ "\"\"\"Deep Q learning graph\n\nThe functions in this file can are used to create the following functions:\n\n======= act ========\n\n Function to chose an action given an observation\n\n Parameters\n ----------\n observation: object\n Observation that can be feed into the output of make_obs_ph\n...
[ [ "tensorflow.constant_initializer", "tensorflow.group", "tensorflow.clip_by_norm", "tensorflow.stack", "tensorflow.control_dependencies", "tensorflow.nn.softmax", "tensorflow.one_hot", "tensorflow.trainable_variables", "tensorflow.shape", "tensorflow.argmax", "tensorflow...
arunmp2004/PixelLib
[ "9e8690b594528a48d983992c55f7ce37029d9f25" ]
[ "pixellib/instance.py" ]
[ "import cv2\r\nimport numpy as np\r\nimport random\r\nimport os\r\nimport sys\r\nimport math\r\nfrom pixellib.mask_rcnn import MaskRCNN\r\nfrom pixellib.config import Config\r\nimport colorsys\r\nimport time\r\nfrom datetime import datetime\r\n\r\n\r\nclass configuration(Config):\r\n NAME = \"configuration\"\r\n...
[ [ "numpy.any", "numpy.where", "numpy.array" ] ]
krkaufma/Electron-Diffraction-CNN
[ "157ce788eabed6d8599193d4b826d703ea181c0a" ]
[ "src/vecchio/make_data.py" ]
[ "import os\nimport typing as t\n\nimport abc\nimport collections.abc as cabc\nimport imageio\nimport keras\nimport numpy as np\nimport pandas as pd\nfrom skimage.transform import resize\nfrom sklearn.model_selection import train_test_split\n\nfrom vecchio.file_utils import dirfmt\n\n\ndef scale_dims(max_dim, h, w):...
[ [ "sklearn.model_selection.train_test_split", "numpy.array", "pandas.read_csv" ] ]
MartinLidh/ida_ai
[ "bbc2f8e1778d77bc704763f94985860d517af23c" ]
[ "model/ner_model.py" ]
[ " # -*- coding: utf-8 -*-\nimport numpy as np\nimport os\nimport tensorflow as tf\n\n\nfrom .data_utils import minibatches, pad_sequences, get_chunks\nfrom .general_utils import Progbar\nfrom .base_model import BaseModel\nfrom .gazetteer import Gazetteer\n\n\nclass NERModel(BaseModel):\n \"\"\"Specialized class ...
[ [ "tensorflow.matmul", "numpy.mean", "tensorflow.reshape", "tensorflow.nn.embedding_lookup", "tensorflow.shape", "tensorflow.concat", "tensorflow.nn.bidirectional_dynamic_rnn", "tensorflow.argmax", "tensorflow.Variable", "tensorflow.variable_scope", "tensorflow.nn.dropout...
zyhazwraith/FigureQA-baseline
[ "241a6054b3016793529b1508c1b67507166a2e67" ]
[ "eval_model_on_figureqa.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport argparse\nfrom glob import glob\nimport json\nimport os\nimport re\nimport shutil\nimport tarfile\n\nimport numpy as np\nimport pandas as pd\nimport tensorflow as tf\nfrom tqdm import tqdm\n\nfrom data.figureqa import FigureQA\nfrom models.cnn_baseline impor...
[ [ "numpy.sum", "tensorflow.Session", "tensorflow.train.Saver", "tensorflow.variable_scope", "tensorflow.python.debug.LocalCLIDebugWrapperSession", "tensorflow.placeholder" ] ]
albertomarchisio/EfficientSNN
[ "783005ccbbb31bd9ce3f4defadc14491c4ca9cf6", "783005ccbbb31bd9ce3f4defadc14491c4ca9cf6" ]
[ "DVS_preprocessing/dataset_generator32x32_1ch.py", "DVS_preprocessing/dataset_generator32x32temporal_6chNoPol.py" ]
[ "import struct\nimport numpy as np\nimport time\nfrom time import sleep\nfrom matplotlib import pyplot as plt\nfrom matplotlib import style\nimport csv\nimport glob\nimport os\nimport math\nimport pickle\nimport time\nimport datetime\n\ntrain_set = True # flag that is used to define if the current file is a part...
[ [ "numpy.divide", "numpy.full", "numpy.array", "numpy.asarray", "numpy.min", "numpy.multiply", "numpy.amax" ], [ "numpy.divide", "numpy.array", "numpy.asarray", "numpy.zeros", "numpy.multiply", "numpy.amax" ] ]
tonglizi/SfmLearner-Pytorch-master_new
[ "b4315b75d47f0bb3662adf50c8db12a82f082675" ]
[ "point_cloud_processing/prepare_data.py" ]
[ "# -*- coding: utf-8 -*-\r\n'''\r\n***********点云的处理库*******\r\npcl:c++的开源库,python的接口提供的支持较少(windows环境下超级难装!)\r\nopen3D: intel开源的python点云库,作为python环境的主力库\r\n在读取数据方面,两者都能达到同样的效果\r\n'''\r\nimport os\r\n# import pcl\r\n# import open3d as o3d\r\nimport numpy as np\r\n\r\n\r\n# from pypcd import pypcd\r\n\r\n\r\n# def lo...
[ [ "numpy.fromfile" ] ]
tanakatsu/dqn-jan-ken-pon
[ "3ae2c928d9ab00edee709f553b16963951859189" ]
[ "tf/jan_ken_pon.py" ]
[ "import os\nimport numpy as np\n\n\nclass JanKenPon:\n\n def __init__(self):\n # parameters\n self.name = os.path.splitext(os.path.basename(__file__))[0]\n self.player_hand = None\n self.opponent_hand = None\n self.observation = np.zeros(6)\n self.frame_length = 1\n ...
[ [ "numpy.zeros" ] ]
zklgame/CatEyeNets
[ "b5cdd9fa6b84f6ebaaf56d03d5beca4a63af6932" ]
[ "utils/gradient_check.py" ]
[ "import numpy as np\nfrom random import randrange\n\ndef grad_check_sparse(f, x, analytic_grad, num_checks=10, h=1e-5):\n \"\"\"\n sample a few random elements and only return numerical\n in this dimensions\n \"\"\"\n for i in xrange(num_checks):\n ix = tuple([randrange(m) for m in x.shape])\n...
[ [ "numpy.sum", "numpy.zeros_like", "numpy.nditer" ] ]
khaledsaab/NeuralCDE
[ "559d9d6fdb137afd14965725ea4845cf31e9235c" ]
[ "experiments/common.py" ]
[ "import copy\nimport json\nimport math\nimport numpy as np\nimport os\nimport pathlib\nimport sklearn.metrics\nimport torch\nimport tqdm\n\nimport models\n\n#here = pathlib.Path(__file__).resolve().parent\nhere = pathlib.Path(\"/dfs/scratch1/ksaab/ncde_results\")\n\ndef _add_weight_regularisation(loss_fn, regularis...
[ [ "torch.zeros", "torch.cat", "torch.no_grad", "torch.cuda.reset_max_memory_allocated", "torch.cuda.memory_allocated", "torch.cuda.max_memory_allocated", "torch.tensor", "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.nn.BCEWithLogitsLoss", "torch.argmax" ] ]
salesforce/UniversalFewShotNLP
[ "7a1564a886e5ef71d2f01f60beb123c279f27bfe" ]
[ "SciTail/0.shot.py" ]
[ "# Copyright (c) 2018, salesforce.com, inc.\n# All rights reserved.\n# SPDX-License-Identifier: BSD-3-Clause\n# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause\n\n\"\"\"BERT finetuning runner.\"\"\"\n\nfrom __future__ import absolute_import, division, pri...
[ [ "torch.nn.Linear", "torch.cuda.is_available", "torch.load", "scipy.special.softmax", "torch.distributed.init_process_group", "torch.manual_seed", "torch.tensor", "torch.utils.data.DataLoader", "numpy.argmax", "torch.device", "torch.cuda.manual_seed_all", "torch.util...
p-christ/Deep-Reinforcement-Learning-PyTorch-Algorithms
[ "135d3e2e06bbde2868047d738e3fc2d73fd8cc93", "135d3e2e06bbde2868047d738e3fc2d73fd8cc93" ]
[ "agents/HER_Base.py", "agents/DQN_agents/Dueling_DDQN.py" ]
[ "import torch\nimport numpy as np\nfrom utilities.data_structures.Replay_Buffer import Replay_Buffer\nfrom utilities.Utility_Functions import abstract\n\n@abstract\nclass HER_Base(object):\n \"\"\"Contains methods needed to turn an algorithm into a hindsight experience replay (HER) algorithm\"\"\"\n def __ini...
[ [ "numpy.concatenate", "torch.cat" ], [ "torch.no_grad", "torch.mean", "torch.from_numpy" ] ]
JamzumSum/yNet
[ "78506738e64321cfd26f0af70a62dd2119948e39" ]
[ "src/toynet/unet.py" ]
[ "\"\"\"\nA torch implement for U-Net.\n\n* see: U-Net: Convolutional Networks for Biomedical Image Segmentation\n\n* author: JamzumSum\n* create: 2021-1-11\n\"\"\"\nfrom functools import partial\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom common.layers import BlurPool, MaxBlurPool2d,...
[ [ "torch.cat", "torch.nn.Identity", "torch.relu", "torch.nn.Sigmoid", "torch.nn.Tanh", "torch.nn.ConvTranspose2d", "torch.nn.Upsample", "torch.nn.Conv2d", "torch.nn.Sequential.__init__", "torch.nn.functional.pad", "torch.nn.Sequential.forward" ] ]
yesunhuang/QRNNs_Memory
[ "69adbdb2b580f38420854422fe9a2afcc7782386" ]
[ "src/CExpFQC.py" ]
[ "'''\nName: CExpFQC\nDesriptption: Full power with quantum counterpart sRNN\nEmail: yesunhuang@mail.ustc.edu.cn\nOpenSource: https://github.com/yesunhuang\nMsg: Experiment One\nAuthor: YesunHuang\nDate: 2022-04-17 20:40:50\n'''\n#import all the things we need\nimport os\nos.environ['KMP_DUPLICATE_LIB_OK']='True'\ni...
[ [ "torch.cat", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.vlines", "matplotlib.pyplot.subplots", "torch.unsqueeze", "torch.squeeze", "matplotlib.pyplot.show" ] ]
nfrumkin/GNN_Workload_Characterization
[ "7a329c2e94b5996af35f3a46179a2070e6a43c9b" ]
[ "hgcn/test.py" ]
[ "from __future__ import division\nfrom __future__ import print_function\n\nimport datetime\nimport json\nimport logging\nimport os\nimport pickle\nimport time\n\nimport numpy as np\nimport optimizers\nimport torch\nfrom config import parser\nfrom models.base_models import NCModel, LPModel\nfrom utils.data_utils imp...
[ [ "torch.cuda.manual_seed", "torch.cuda.profiler.stop", "numpy.random.seed", "torch.is_tensor", "torch.manual_seed", "torch.cuda.profiler.start", "torch.load", "torch.set_default_dtype" ] ]
nitram-bot/fhnw_lecture
[ "201009fdb695d52db5aa44d8d0e80b52cf9db6c0" ]
[ "scripts/animated_k_means.py" ]
[ "#%matplotlib inline\nimport matplotlib.pyplot as plt\nimport seaborn; seaborn.set() # for plot styling\nimport numpy as np\nfrom ipywidgets import interact\nfrom sklearn.metrics import pairwise_distances_argmin\nfrom sklearn.neighbors import NearestCentroid\nfrom sklearn.datasets.samples_generator import make_blo...
[ [ "numpy.array", "scipy.spatial.distance.euclidean", "numpy.random.rand", "sklearn.cluster.KMeans", "sklearn.neighbors.NearestCentroid", "sklearn.datasets.samples_generator.make_blobs", "matplotlib.pyplot.figure", "numpy.where", "numpy.unique", "matplotlib.gridspec.GridSpec",...
bentotten/gamma-spectra_denoising
[ "42cf6791e2399475666f4308526f574fed59763b" ]
[ "load_data.py" ]
[ "import sys\nimport time\nimport h5py\nimport argparse\nimport numpy as np\nfrom skimage.metrics import peak_signal_noise_ratio as psnr\n\nfrom spectra_utils import split_radionuclide_name, plot_data\n\n\ndef load_data(datafile, det, show_data=False):\n with h5py.File(datafile, 'r') as h5f:\n assert h5f[d...
[ [ "numpy.max", "numpy.min" ] ]
pennucci/enterprise
[ "24b46116b63d2ef76e0f4132830d17dec575f8a3" ]
[ "enterprise/signals/selections.py" ]
[ "# selections.py\n\"\"\"Contains various selection functions to mask parameters by backend flags,\ntime-intervals, etc.\"\"\"\n\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport functools\nimport inspect\n\nimport numpy as np\n\n\ndef call_me_maybe(obj):\n \"\"\"See `h...
[ [ "numpy.ones_like", "numpy.unique" ] ]
arashbm/lattice
[ "e71587ab037ec417e8f6ef75cfadcb5d0ea11821" ]
[ "plot_ratios.py" ]
[ "import fileinput\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nselected_dim = 1\np_crit = 0.644701\n\nsizes = {}\nfor line in fileinput.input():\n pc, dims, seed, size, mass, lt, volume = \\\n [float(i.strip()) for i in line.split()]\n\n if dims == selected_dim:\n nodes = int(si...
[ [ "numpy.mean", "matplotlib.pyplot.subplots" ] ]
huzq85/tensorflow-fork
[ "92f1dd09bef516a6eb0ad6be6833f28785ef2be8", "92f1dd09bef516a6eb0ad6be6833f28785ef2be8" ]
[ "tensorflow/python/checkpoint/checkpoint_view.py", "tensorflow/cc/saved_model/testdata/generate_saved_models.py" ]
[ "\"\"\"Manages a Checkpoint View.\"\"\"\n# Copyright 2017 The TensorFlow 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.or...
[ [ "tensorflow.core.protobuf.trackable_object_graph_pb2.TrackableObjectGraph", "tensorflow.python.training.py_checkpoint_reader.NewCheckpointReader" ], [ "tensorflow.python.ops.variables.Variable", "tensorflow.python.compat.v2_compat.enable_v2_behavior", "tensorflow.python.platform.test.test_...
singhst/web-scraping-tv-movie
[ "1942cad5f631424dccc4a0c89fc346497ce9854d" ]
[ "(useless)combine-and-clean-csv.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Jan 12 06:56:16 2019\n@author: Chris\n\nhttps://github.com/ekapope/Combine-CSV-files-in-the-folder/blob/master/Combine_CSVs.py\n\"\"\"\n#credited:\n#https://stackoverflow.com/questions/9234560/find-all-csv-files-in-a-directory-using-python/12280052\n\nimport os\nimpo...
[ [ "pandas.read_csv" ] ]
JakubMroz4/PythonUiS
[ "fc4f8ff15f280e07e21d55df31f9dfb81cf5a6cd" ]
[ "Oving4/samlingobjekter/demo_numpy_arrays.py" ]
[ "import numpy as np\n\n# Lager en array med 10 0-ere\narray = np.zeros(10)\n\n# Kan indeksere og tilordne som ei liste, men kan ikke legge til elementer da\n# numpy arrays har en fast størrelse, definert nbår du lager den\narray[5] = 3\n\n# Lager en array med elementene fra og med 0, til men ikke med 10, og med\n# ...
[ [ "numpy.sin", "numpy.arange", "numpy.zeros" ] ]
noisyoscillator/Patterns-in-Real-World-Time-Series-Data
[ "1bf203a238be0cfbde42e9f65b3071ee9fab5466" ]
[ "brownianMotion.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Feb 13 14:22:57 2022\n\n@author: kamaludindingle\n\"\"\"\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndef BrownianMotion(years=15,record=1):\n #Brownian motion for (10) years, recorded every \"record\" years\n Gaussian = np.ra...
[ [ "numpy.random.randn", "numpy.cumsum" ] ]
keithmgould/deep-rl
[ "ca87f50603b3e1646e2194a9b82cb3a8d6a75fc3" ]
[ "ddpg/ddpg.py" ]
[ "\"\"\"\nImplementation of DDPG - Deep Deterministic Policy Gradient\n\nAlgorithm and hyperparameter details can be found here:\n http://arxiv.org/pdf/1509.02971v2.pdf\n\nThe algorithm is tested on the Pendulum-v0 OpenAI gym task\nand developed with tflearn + Tensorflow\n\nAuthor: Patrick Emami\n\"\"\"\nimport t...
[ [ "tensorflow.matmul", "tensorflow.gradients", "tensorflow.global_variables_initializer", "tensorflow.trainable_variables", "numpy.zeros_like", "numpy.random.normal", "tensorflow.Variable", "numpy.sqrt", "tensorflow.train.AdamOptimizer", "numpy.reshape", "numpy.zeros", ...
WangTaoAs/MGN_ReID
[ "916244c39b57b8068c34a7bfa1803781193bb554" ]
[ "test.py" ]
[ "import os\nimport torch\nimport argparse\nfrom configs import args\nfrom data import make_data_loader\nfrom model import bulid_MGN_resnet\nfrom processor import inference\n\ndef test(args):\n\n print('Start Testing ------')\n train_loader, val_loader, class_num, _, _, num_query = make_data_loader(args)\n\n ...
[ [ "torch.device" ] ]
kevinLCG/machinelearning-az
[ "54e3090275a3fc419aad17caadc6a47a71dcd3d4" ]
[ "datasets/Part 1 - Data Preprocessing/Section 2 -------------------- Part 1 - Data Preprocessing --------------------/data_preprocessing_template.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Feb 27 19:43:11 2019\n\n@author: juangabriel\n\"\"\"\n\n# Plantilla de Pre Procesado\n\n# Cómo importar las librerías\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\n# Importar el data set\ndataset = pd.read_csv('D...
[ [ "sklearn.model_selection.train_test_split", "pandas.read_csv" ] ]
Lazea/TensorFlow
[ "3237a043a6c43c94e1dabcfa88a3a3afb1bb3646" ]
[ "util/input_data.py" ]
[ "\"\"\"Data util script for managing and processing data.\"\"\"\n\nimport os\nimport numpy as np\n\nclass Data:\n\n def __init__(self):\n self.offset = 0\n self.data = None\n self.count = 0\n\n def __init__(self, filepath):\n self.offset = 0\n self.count = 0\n self.da...
[ [ "numpy.array", "numpy.reshape", "numpy.load", "numpy.random.shuffle", "numpy.save", "numpy.random.random" ] ]
cgranade/Qcodes
[ "2d8fd0b8e0fa12d7921a96003318598ad347dd05", "2d8fd0b8e0fa12d7921a96003318598ad347dd05" ]
[ "qcodes/tests/test_parameter.py", "qcodes/dataset/measurements.py" ]
[ "\"\"\"\nTest suite for parameter\n\"\"\"\nfrom collections import namedtuple\nfrom collections.abc import Iterable\nfrom unittest import TestCase\nfrom typing import Tuple\nimport pytest\n\nimport numpy as np\nfrom hypothesis import given, event, settings\nimport hypothesis.strategies as hst\nfrom qcodes import Fu...
[ [ "numpy.testing.assert_allclose", "numpy.array", "numpy.linspace" ], [ "numpy.atleast_1d", "numpy.array", "numpy.meshgrid" ] ]
countywest/progressive_growing_of_points
[ "17a7641cdf73f22e60eaf2ca378ac74e9a4d4572" ]
[ "models/auto_encoder.py" ]
[ "import torch\nimport torch.nn as nn\nimport os\nimport shutil\nfrom layers.pointnet import pointnet\nfrom layers.srtdecoder import SRTDecoder\nfrom layers.srtdecoder_pg import SRTDecoderPG\nfrom layers.mrtdecoder import MRTDecoder\nfrom layers.mrtdecoder_pg import MRTDecoderPG\nfrom layers.mrtdecoder_pg2 import MR...
[ [ "torch.load" ] ]
dohmatob/POT
[ "42d0aa94e7cb49711a646fe9b263a86cdb817161", "42d0aa94e7cb49711a646fe9b263a86cdb817161" ]
[ "test/test_plot.py", "docs/source/auto_examples/plot_otda_semi_supervised.py" ]
[ "\"\"\"Tests for module plot for visualization \"\"\"\n\n# Author: Remi Flamary <remi.flamary@unice.fr>\n#\n# License: MIT License\n\nimport numpy as np\nimport matplotlib\nmatplotlib.use('Agg')\n\n\ndef test_plot1D_mat():\n\n import ot\n\n n_bins = 100 # nb bins\n\n # bin positions\n x = np.arange(n_b...
[ [ "matplotlib.use", "numpy.array", "numpy.arange", "numpy.random.rand" ], [ "matplotlib.pylab.legend", "matplotlib.pylab.show", "matplotlib.pylab.figure", "matplotlib.pylab.subplot", "matplotlib.pylab.yticks", "matplotlib.pylab.tight_layout", "matplotlib.pylab.title",...
theo-brown/ahrs
[ "cd9c9e0bbf9db7fd67a297e1aafa8518bf17050d" ]
[ "test_data/barometer_kalman.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.widgets import Slider\nfrom kalman_filter import KalmanFilter\n\nraw_data = np.loadtxt(\"barometer_data.txt\")\n# Truncate raw data (it's super long)\nraw_data = raw_data[:raw_data.size//4]\nraw_data_step = np.loadtxt(\"barometer_data_step.txt\")...
[ [ "matplotlib.widgets.Slider", "numpy.zeros", "matplotlib.pyplot.figure", "numpy.loadtxt", "numpy.arange", "matplotlib.pyplot.show" ] ]
BartlomiejOlber/od-test
[ "fb7adb8fe003e405ce94fa3887553c7af55d3fd3", "fb7adb8fe003e405ce94fa3887553c7af55d3fd3" ]
[ "methods/nearest_neighbor.py", "methods/energy/integrated.py" ]
[ "from __future__ import print_function\nfrom os import path\nfrom termcolor import colored\n\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data import DataLoader\n\nimport global_vars as Global\nimport models as Models\nfrom datasets import MirroredDataset\nfrom methods.score_svm import ScoreSVM\n\nfrom tq...
[ [ "torch.zeros", "torch.LongTensor", "torch.utils.data.DataLoader", "torch.load", "torch.set_grad_enabled", "torch.topk" ], [ "numpy.quantile", "torch.cat", "numpy.where", "torch.nn.functional.cross_entropy", "torch.load", "numpy.cos", "numpy.concatenate", ...
Yujun-Shi/BLIP
[ "87bc558aec17feb6c65ed3c37ab9317fd444b254" ]
[ "miniImageNetClassification/src/run_baselines.py" ]
[ "import math\nimport sys,os,argparse,time\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport utils\nfrom datetime import datetime\n\ndef main():\n tstart=time.time()\n\n parser=argparse.ArgumentParser(description='xxx')\n\n # Data parameters\n parser.add_argument('--seed', de...
[ [ "numpy.random.seed", "torch.manual_seed", "torch.cuda.is_available", "torch.cuda.manual_seed" ] ]
1995subhankar1995/Machine_Learning_codes
[ "5170f4880798184b257d7e64577dc9dd8d0e1e81" ]
[ "SVM.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt \nimport pandas as pd\nfrom qpsolvers import solve_qp\nfrom sklearn.metrics import confusion_matrix\n\n########### Importing Dataset #######################\ndataset = pd.read_csv('Social_Network_Ads.csv')\nX = dataset.iloc[:, :-1].values\ny = dataset.iloc[:,...
[ [ "numpy.concatenate", "sklearn.metrics.confusion_matrix", "numpy.dot", "numpy.zeros", "sklearn.preprocessing.StandardScaler", "sklearn.model_selection.train_test_split", "pandas.read_csv" ] ]
itisianlee/hawk-facedet
[ "55774ac5619f9a4c76a3a872ff11940a874b32d1" ]
[ "hawkdet/dataset/widerface.py" ]
[ "import cv2\nimport numpy as np\nimport torch\n\nfrom torch.utils.data import Dataset\n\n\nclass WiderFace(Dataset):\n def __init__(self, txt_path, transforms=None):\n super().__init__()\n self.transforms = transforms\n self.imgs_path = []\n self.annos = []\n with open(txt_path...
[ [ "numpy.array", "torch.from_numpy" ] ]
parkerwray/smuthi-1
[ "a5ced07461b8fd223dc37d28259261ceed78aed5" ]
[ "tests/unit_tests/test_layerresponse.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Test the layerresponse functions defined in layers.py.\"\"\"\nimport unittest\n\nimport numpy as np\nimport smuthi.layers as lay\nimport smuthi.fields.expansions as fldex\n\n\nlayer_d = [0, 300, 400, 0]\nlayer_n = [1, 2 + 0.1j, 3, 1 + 5j]\nomega = 2 * 3.15 / 550\nkpar = omega * 1.7\n...
[ [ "numpy.testing.assert_almost_equal", "numpy.array", "numpy.linspace" ] ]
avasalya/singleshot6Dpose
[ "a39eae0191dce42d4aca08eaff5a1e5646d592df" ]
[ "utils.py" ]
[ "import sys\nimport os\nimport time\nimport math\nimport torch\nimport numpy as np\nfrom PIL import Image, ImageDraw, ImageFont\nfrom torch.autograd import Variable\nimport torch.nn.functional as F\nimport cv2\nfrom scipy import spatial\n\nimport struct\nimport imghdr\n\n# Create new directory\ndef makedirs(path):\...
[ [ "scipy.spatial.cKDTree", "numpy.arccos", "numpy.min", "torch.exp", "torch.sum", "numpy.max", "torch.sigmoid", "torch.nn.Softmax", "torch.autograd.Variable", "torch.FloatTensor", "numpy.transpose", "numpy.array", "numpy.reshape", "numpy.zeros", "torch.max...
scuervo91/resimpy
[ "b291621b373c61081304ad47231d027913204fe0" ]
[ "resimpy/grid.py" ]
[ "#########################################################################\n# Most of the Code has been taken from the next Github Repository: #\n# https://github.com/BinWang0213/PyGRDECL #\n# Code is used to load and manipulate Eclipse Data Grid\n###############################...
[ [ "numpy.full", "numpy.array", "numpy.sin", "numpy.matmul", "numpy.zeros", "numpy.mean", "numpy.radians", "numpy.arange", "numpy.atleast_1d", "numpy.cos" ] ]
krikyn/Strong-Paraphrase-Generation-2020
[ "3d5b6f4fd0d4b4f96ed6bdd91b7000d3d80fc901" ]
[ "paraphrase/vae/utils/batch_loader.py" ]
[ "import collections\nimport os\nimport re\n\nimport numpy as np\nfrom six.moves import cPickle\n\nfrom .functional import *\n\n\nclass BatchLoader:\n def __init__(self, data_files, idx_files, tensor_files, path='../../'):\n self.data_files = data_files\n self.idx_files = idx_files\n self.ten...
[ [ "numpy.array", "numpy.zeros", "numpy.load", "numpy.save", "numpy.amax", "numpy.arange", "numpy.argmax" ] ]
jeremiedbb/scipy
[ "2bea64c334b18fd445a7945b350d7ace2dc22913", "2bea64c334b18fd445a7945b350d7ace2dc22913" ]
[ "scipy/spatial/kdtree.py", "scipy/io/wavfile.py" ]
[ "# Copyright Anne M. Archibald 2008\n# Released under the scipy license\nfrom __future__ import division, print_function, absolute_import\n\nimport sys\nimport numpy as np\nfrom heapq import heappush, heappop\nimport scipy.sparse\n\n__all__ = ['minkowski_distance_p', 'minkowski_distance',\n 'distance_matr...
[ [ "numpy.promote_types", "numpy.minimum", "numpy.copy", "numpy.ndindex", "numpy.empty", "numpy.nonzero", "numpy.prod", "numpy.arange", "numpy.argmax", "numpy.array", "numpy.zeros", "numpy.shape", "numpy.amax", "numpy.amin", "numpy.searchsorted", "numpy...
XDong18/yolact
[ "e602d89904a674fc25dfc5db09a87baf0a04bde6" ]
[ "train.py" ]
[ "from data import *\nfrom utils.augmentations import SSDAugmentation, BaseTransform\nfrom utils.functions import MovingAverage, SavePath\nfrom utils.logger import Log\nfrom utils import timer\nfrom layers.modules import MultiBoxLoss\nfrom yolact import Yolact\nimport os\nimport sys\nimport time\nimport math, random...
[ [ "torch.zeros", "torch.stack", "torch.set_default_tensor_type", "torch.no_grad", "torch.isfinite", "torch.cuda.device_count", "torch.cuda.is_available", "torch.utils.data.DataLoader" ] ]
abhishirk/Capstone
[ "84149fc56bb90303f5fa5a40a8ace7e569eae918" ]
[ "ros/src/waypoint_updater/waypoint_updater.py" ]
[ "#!/usr/bin/env python\n\nimport rospy\nfrom geometry_msgs.msg import PoseStamped\nfrom styx_msgs.msg import Lane, Waypoint\n\nimport tf\nfrom std_msgs.msg import Int32, Bool\nimport math\nimport numpy as np\n\n'''\nThis node will publish waypoints from the car's current position to some `x` distance ahead.\n\nAs m...
[ [ "numpy.array", "numpy.dot" ] ]
hzm2016/dm_control
[ "c24ec9f5f3cb3c25c6571c89c9f60bf3350f5711" ]
[ "dm_control/rl/control_test.py" ]
[ "# Copyright 2017 The dm_control 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 required by applicable law...
[ [ "numpy.asarray", "numpy.zeros" ] ]
adrische/actuary
[ "1b446c3a66ef831a0727ff4d3ea1e1cc3b838af9" ]
[ "selected-topics-in-life-insurance/basic-interest-rate-models.py" ]
[ "# Simple interest rate processes - some examples\n#\n# - Brownian motion\n# - AR(1)-model\n# - Vasiček-model\n# - Cox-Ingersoll-Ross-model\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom math import sqrt\n\n\n# Brownian motion / Random walk\ndef sim_brownian(steps, start=0, sigma=1, discretization=1):...
[ [ "numpy.random.standard_normal", "numpy.zeros", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.ylabel", "numpy.cumsum", "matplotlib.pyplot.show", "numpy.column_stack" ] ]
Cospel/age_prediction_cnn
[ "de3f293d70faa791f7c7076e049daf96b47c650b" ]
[ "facematch/age_prediction/utils/utils.py" ]
[ "import numpy as np\nfrom scipy.special import softmax\nCLASSES_NUMBER = 100\nMAX_AGE = 100\nRANGE_LENGTH = 5\nAGE_RANGES_UPPER_THRESH = 80\n\n\ndef build_age_vector(age, deviation):\n \"\"\"Build AGE vector as a normal probability histogram\"\"\"\n # Sample from a normal distribution using numpy's random num...
[ [ "numpy.random.normal", "numpy.histogram", "numpy.zeros", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.title", "numpy.arange", "numpy.amax", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show", "numpy.linspace" ] ]
ssloy/least-squares-course
[ "e51206d795bd8385779f13fd611ed91624095d04", "e51206d795bd8385779f13fd611ed91624095d04" ]
[ "src/ch6/3-caricature/silhouette-better.py", "presentation/listings/poisson-2d.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\ndef amplify(x):\n n = len(x)\n A = np.matrix(np.zeros((2*n,n)))\n b = np.matrix(np.zeros((2*n,1)))\n for i in range(n):\n A[i, i] = 1. # amplify the curvature\n A[i, (i+1)%n] = -1.\n b[i, 0] = (x[i] - x[(i+1)%n])*1.9\n\n ...
[ [ "numpy.zeros", "matplotlib.pyplot.plot", "matplotlib.pyplot.show", "matplotlib.pyplot.gca", "numpy.linalg.inv", "matplotlib.pyplot.axis" ], [ "scipy.sparse.linalg.lsmr", "matplotlib.image.imread", "matplotlib.image.imsave" ] ]
Chan1998/MAAC
[ "8eabafe346b7b238663de4ad12f8771d7db6071a" ]
[ "multiagent/environment.py" ]
[ "import gym\nfrom gym import spaces\nfrom gym.envs.registration import EnvSpec\nimport numpy as np\n\n# environment for all agents in the multiagent world\n# currently code assumes that no agents will be created/destroyed at runtime!\nclass MultiAgentEnv(gym.Env):\n metadata = {\n 'render.modes' : ['human...
[ [ "numpy.array", "numpy.sin", "numpy.zeros", "numpy.random.seed", "numpy.sum", "numpy.argmax", "numpy.cos", "numpy.all", "numpy.linspace" ] ]
eitrheim/Resume-Screening-and-Selection
[ "4ee2dd0d6ba917bcf244c704ef5042fe7596e600" ]
[ "khc_home_edited/method.py" ]
[ "import pandas as pd\r\nimport numpy as np\r\nimport csv\r\nimport pickle\r\n\r\nJobs_path = \"TestDescriptions.csv\"\r\nJobs = pd.read_csv(Jobs_path, delimiter=',')\r\n\r\ndef get_JobID():\r\n IDs = np.array(Jobs.index.values.tolist())\r\n IDs = np.unique(IDs)\r\n IDs = IDs.tolist()\r\n return(IDs)\r\n...
[ [ "pandas.read_csv", "numpy.unique" ] ]
SOOIN-KIM/lab-python
[ "4b85dc11c76e2d4f89be0d01864f9f61f3c6e2cc" ]
[ "scratch14/ex03.py" ]
[ "from sklearn.datasets import load_iris\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport math\n\ndef logistic(x):\n '''Logistic Sigmoid 함수'''\n return 1 / (1 + math.exp(-x))\n\n\ndef predict(row, betas):\n '''row의 x1, x2값과 betos의 b0, b1, b2를 사용해서\n 회귀식 y = b0 _ b1 * x2 + b2* x2를 만들고,\n 회...
[ [ "numpy.random.seed", "matplotlib.pyplot.legend", "numpy.random.random", "matplotlib.pyplot.scatter", "matplotlib.pyplot.show", "sklearn.datasets.load_iris" ] ]
Phillistan16/fastestimator
[ "54c9254098aee89520814ed54b6e6016b821424f", "54c9254098aee89520814ed54b6e6016b821424f", "54c9254098aee89520814ed54b6e6016b821424f" ]
[ "apphub/NLP/language_modeling/ptb_tf.py", "test/PR_test/integration_test/backend/test_set_lr.py", "test/PR_test/integration_test/schedule/test_epoch_scheduler.py" ]
[ "# Copyright 2019 The FastEstimator 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...
[ [ "numpy.exp", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.Embedding", "tensorflow.keras.layers.LSTM", "tensorflow.optimizers.SGD" ], [ "torch.optim.Adam", "tensorflow.optimizers.Adam", "tensorflow.keras.backend.get_value" ],...
mingruimingrui/torch-collections
[ "f7c20b28b63de76c763983338aa4c825904ef4cd" ]
[ "torch_collections/modules/_l2_normalization.py" ]
[ "\"\"\" Copied from \"\"\"\n\nimport torch\n\n\nclass L2Normalization(torch.nn.Module):\n def __init__(self, alpha=1.0):\n super(L2Normalization, self).__init__()\n self.alpha = alpha\n\n def forward(self, v):\n # v_ = v / norm * alpha\n # norm = sqrt(norm_sq)\n # norm_sq =...
[ [ "torch.sum", "torch.sqrt", "torch.pow" ] ]
TomaszOdrzygozdz/gym-splendor
[ "aeb00605e105628188143a4bbd6280e9eb41c4f9" ]
[ "monte_carlo_tree_search/mcts_algorithms/multi_process/multi_mcts.py" ]
[ "# from mpi4py import MPI\n\nimport numpy as np\n\nfrom gym_splendor_code.envs.mechanics.game_settings import USE_TQDM\nfrom monte_carlo_tree_search.evaluation_policies.abstract_evaluation_policy import EvaluationPolicy\nfrom monte_carlo_tree_search.rollout_policies.random_rollout import RandomRollout\nfrom monte_c...
[ [ "numpy.argsort", "numpy.argpartition" ] ]
AWNystrom/SparseInteraction
[ "68ac222d7a826a344675d0e5196d82cb1711a69a" ]
[ "sparse_polynomial_features/test.py" ]
[ "import pyximport; pyximport.install()\nfrom sparse_polynomial_features import SparsePolynomialFeatures\nfrom sklearn.preprocessing import PolynomialFeatures\nimport unittest\nfrom scipy.sparse import random\nfrom code import interact\nimport cPickle\nfrom numpy import array\nfrom numpy.random import choice\nfrom s...
[ [ "scipy.sparse.csr_matrix", "sklearn.preprocessing.PolynomialFeatures", "numpy.random.choice" ] ]
faustomorales/tensorflow
[ "63b84e3b732f050e53902481fa8cb02791a5d789" ]
[ "tensorflow/compiler/xla/python/xla_client.py" ]
[ "# Lint as: python3\n# Copyright 2017 The TensorFlow 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...
[ [ "tensorflow.compiler.xla.python.xla_extension.ops.Scatter", "tensorflow.compiler.xla.python.xla_extension.ops.Fft", "tensorflow.compiler.xla.python.xla_extension.AllocatorConfig", "tensorflow.compiler.xla.python.xla_extension.ops.Reshape", "numpy.true_divide", "tensorflow.compiler.xla.pyth...
fastyangmh/AudioGANomaly
[ "d877f050606765b17bb6755bd70277857326b5e1" ]
[ "src/predict.py" ]
[ "# import\nfrom src.project_parameters import ProjectParameters\nfrom src.model import create_model\nimport torch\nfrom DeepLearningTemplate.data_preparation import parse_transforms, AudioLoader\nfrom DeepLearningTemplate.predict import AudioPredictDataset\nfrom typing import TypeVar, Any\nT_co = TypeVar('T_co', co...
[ [ "numpy.concatenate", "torch.no_grad", "torch.cuda.is_available", "torch.utils.data.DataLoader" ] ]
CrtomirJuren/npTDMS
[ "cbebbf31d3977af06dbfa7f9602c89627134621d" ]
[ "study/matplotlib-datatime.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Nov 27 13:22:05 2020\n\n@author: crtjur\n\"\"\"\n\nimport matplotlib.pyplot as plt\nimport matplotlib.dates as mdates\nimport numpy as np\nimport datetime as dt\n\nnp.random.seed(1)\n\nN = 100\ny = np.random.rand(N)\n\nstart = dt.datetime.now()\nduration = 10\ndelta ...
[ [ "numpy.random.rand", "numpy.random.seed", "matplotlib.dates.DateFormatter", "matplotlib.pyplot.plot", "matplotlib.dates.drange", "matplotlib.pyplot.gcf", "matplotlib.pyplot.show", "matplotlib.pyplot.gca", "matplotlib.dates.DayLocator" ] ]
zouguojian/Traffic-speed-prediction
[ "4b9917a9e1147c37b64e51be3c060af4bdb9544d", "4b9917a9e1147c37b64e51be3c060af4bdb9544d" ]
[ "MT-STFLN /model/normalization.py", "MT-STFLN /comparison_model/fi_gru.py" ]
[ "# -- coding: utf-8 --\nimport tensorflow as tf\n\nclass Normalization(object):\n def __init__(self,inputs,out_size,is_training=False):\n self.inputs=inputs\n self.out_size=out_size\n self.is_training=is_training\n\n def feed_forward(self):\n '''\n the feed forward layer\n ...
[ [ "tensorflow.matmul", "tensorflow.layers.batch_normalization", "tensorflow.reshape", "tensorflow.variable_scope", "tensorflow.random_normal" ], [ "tensorflow.concat", "tensorflow.expand_dims", "tensorflow.nn.rnn_cell.GRUCell", "tensorflow.reshape", "tensorflow.variable_s...
nickrobinson251/hypersearch
[ "152be98f16d2a9e19b691d394386beab1a00615a" ]
[ "examples/optimize_hyperparameters.py" ]
[ "\"\"\"Search for Hyperparameters.\"\"\"\nimport argparse\nimport logging\nimport os\nimport dask_ml.joblib # think this is needed to regiaster dask joblib context\nfrom dask.distributed import Client, progress\nfrom sklearn.datasets import load_digits\nfrom sklearn.ensemble import RandomForestClassifier\nfrom skl...
[ [ "sklearn.ensemble.RandomForestClassifier", "sklearn.datasets.load_digits", "sklearn.externals.joblib.parallel_backend" ] ]
jeanoliveira92/metaheuristicas-mosp
[ "96be6ca4c45603a16c8c7b83b2ee34fd0c79b146" ]
[ "HeuristicaPopulacional/graspPathRelinkMixed.py" ]
[ "import random\nimport numpy as np\nimport globals as g\nimport math\nfrom HeuristicaRefinamento import heuristicaRefinamento as hr\nfrom HeuristicaConstrutiva import heuristicaConstrutiva as hc\nfrom HeuristicaPopulacional import grasp\n\n# HEURISTICA POPULACIONAL GRASP PATH RELINK MIXED - FIRST IMPROVEMEMENT\ndef...
[ [ "numpy.all", "numpy.any" ] ]
chrismile/cuMat
[ "8bfe48393cc93aa4555c7b81b5b4f44c142b4ebb" ]
[ "benchmarks/batched_reduction/MakePlotsLinear.py" ]
[ "import sys\nimport os\nimport json\nimport matplotlib.pyplot as plt\nimport math\nimport seaborn as sns\n\nsetPath = sys.argv[1]\nsetName = setPath[setPath.rfind('/')+1:]\n\nresultFile = setPath + \".json\"\nwith open(resultFile, 'r') as f:\n results = json.load(f)\n\nsize = results[\"Size\"]\nsets = [\"Row\", ...
[ [ "matplotlib.pyplot.xscale", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.yscale", "matplotlib.pyplot.xticks" ] ]
j-bac/GSPCA
[ "81521d768d1e96f6101e46412b67e24266e681d6" ]
[ "GSPCA.py" ]
[ "import scipy\nimport numpy as np\n\ndef GSPCA( data, labels, nComp, param ):\n #GSPCA calculates generalised advanced supervised PCA with respect to [1].\n # [ V, D ] = GSPCA( data, labels, nComp, kind ) return n-by-nComp\n # matrix V with PCs as columns and diagonal nComp-by-nComp\n # ...
[ [ "numpy.zeros", "numpy.sum", "numpy.ones", "numpy.mean", "numpy.triu", "scipy.sparse.linalg.eigs", "scipy.linalg.eig", "numpy.tril", "numpy.argsort", "numpy.diag", "numpy.unique" ] ]
VicFic2006/StravaActivityAnalyser
[ "c09f98bde4af79dd10a113240a38e10aee807cae" ]
[ "fetch/fetch.py" ]
[ "import pandas as pd\nimport requests\nimport json\nimport time\n\ndef thething(strava_tokens, ind):\n idofathlete = strava_tokens['athlete']['id']\n\n ## If access_token has expired then use the refresh_token to get the new access_token\n if strava_tokens['expires_at'] < time.time():\n print(\"🔐-a...
[ [ "pandas.DataFrame", "pandas.read_csv" ] ]
eort/nipype
[ "04d0159686a8d656905e9e06110287c6c60c1523" ]
[ "nipype/interfaces/spm/model.py" ]
[ "# -*- coding: utf-8 -*-\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"The spm module provides basic functions for interfacing with matlab\nand spm to access spm tools.\n\n Change directory to provide relative paths for doctests\n >>> ...
[ [ "numpy.array", "scipy.io.loadmat" ] ]
lucateo/lenstronomy
[ "3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab", "3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab", "3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab", "3ab6cfd4adea2222f02d3f0f1a9cb5390c533aab" ]
[ "test/test_LensModel/test_Profiles/test_sersic_lens.py", "lenstronomy/LensModel/Profiles/chameleon.py", "lenstronomy/LensModel/Profiles/spemd.py", "test/test_GalKin/test_numeric_kinematics.py" ]
[ "__author__ = 'sibirrer'\n\nimport lenstronomy.Util.derivative_util as calc_util\nfrom lenstronomy.LensModel.Profiles.sersic import Sersic\nfrom lenstronomy.LightModel.Profiles.sersic import Sersic as Sersic_light\nfrom lenstronomy.LensModel.Profiles.sersic_ellipse_kappa import SersicEllipseKappa\nfrom lenstronomy....
[ [ "numpy.array", "numpy.sin", "numpy.testing.assert_almost_equal", "numpy.sqrt", "numpy.cos", "numpy.linspace" ], [ "numpy.sqrt" ], [ "numpy.zeros_like", "numpy.array", "numpy.sin", "numpy.shape", "numpy.atleast_1d", "numpy.cos", "numpy.isfinite" ], ...
Manas02/ScaffoldGPT
[ "44641a7ed9afcf94f3b2c338935d9fcae3a5d64e" ]
[ "svg.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# Part of Scaffold Generative Pretraining Project\n# Author : Manas Mahale <manas.mahale@bcp.edu.in>\n\nimport re\nimport logging\n\n\nfrom rdkit import Chem\nfrom rdkit.Chem import rdDepictor\nfrom rdkit.Chem.Draw import rdMolDraw2D\nfrom rdkit import RDLogger ...
[ [ "torch.tensor", "torch.load" ] ]
hi-ogawa/magnum-bindings
[ "5f324bdcde828d9ffc3bcd8e562480875586c54b" ]
[ "src/python/magnum/test/test_scenegraph_numpy.py" ]
[ "#\n# This file is part of Magnum.\n#\n# Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019\n# Vladimír Vondruš <mosra@centrum.cz>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"...
[ [ "numpy.array" ] ]
PaulTran47/xlnet
[ "ebf4f69a296d299eaeaa4160259ae213e2ddc0a7" ]
[ "train_gpu.py" ]
[ "\"\"\"Pretraining on GPUs.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os, sys\nimport math\nimport json\nimport time\nimport numpy as np\n\nfrom absl import flags\nimport absl.logging as _logging # pylint: disable=unused-import\n...
[ [ "tensorflow.trainable_variables", "tensorflow.logging.set_verbosity", "numpy.zeros", "tensorflow.gfile.Exists", "tensorflow.train.Saver", "tensorflow.gradients", "tensorflow.add_n", "tensorflow.ConfigProto", "tensorflow.gfile.MakeDirs", "numpy.prod", "tensorflow.placeho...
nothingbutpassion/dldiy
[ "53c6365fb5689b47ec62cf3bb4c3d5bde621e8f4" ]
[ "datasets/widerface.py" ]
[ "# coding: utf-8\r\nimport os\r\nimport zipfile\r\nimport pickle\r\nimport numpy as np\r\nimport PIL.Image as Image\r\n\r\ndataset_dir = os.path.dirname(os.path.abspath(__file__)) + \"/widerface\"\r\nsave_file = dataset_dir + \"/winderface.pkl\"\r\n\r\ndef _extract_files(root):\r\n for name in [\"wider_face_spli...
[ [ "numpy.random.rand" ] ]
BlueAnon/BD-BNN
[ "89b71510167333a5e83b072fe0aebac55263cc66" ]
[ "train.py" ]
[ "import argparse\nimport os\nimport sys\nimport random\nimport shutil\nimport time\nimport warnings\nimport logging\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.distributed as dist\nimport torch.optim\nimport torch.multiprocessing as mp\nimport t...
[ [ "torch.optim.lr_scheduler.CosineAnnealingLR", "torch.distributed.init_process_group", "torch.no_grad", "torch.optim.Adam", "torch.multiprocessing.spawn", "torch.nn.parallel.DistributedDataParallel", "torch.cuda.device_count", "torch.manual_seed", "torch.cuda.set_device", "t...
lucaspettit/GifTheRipper
[ "c60ba5872cd34f149d21aaf7a785edb15cdc5a6e" ]
[ "silverDataScrub.py" ]
[ "# Silver Data Scrub\n#\n# 1. Queries .GIF files from <src>\n# 2. Converts .GIF to set of JPG's\n# 3. Saves JPG's to <dest>\n\nimport cv2\nfrom datetime import datetime\nimport imageio\nimport os\nimport numpy as np\nfrom random import randint\nimport json\n\n# face detection\nimport mxnet as mx\nfrom MTCNN.mtcnn_d...
[ [ "numpy.asarray", "numpy.zeros" ] ]
miaobin/DirectML
[ "d4657006a60a7b7d9baf17638c42aee27258c836" ]
[ "PyTorch/yolov3/utils/torch_utils.py" ]
[ "# YOLOv3 PyTorch utils\n\nimport datetime\nimport logging\nimport math\nimport os\nimport platform\nimport subprocess\nimport time\nfrom contextlib import contextmanager\nfrom copy import deepcopy\nfrom pathlib import Path\n\nimport torch\nimport torch.backends.cudnn as cudnn\nimport torch.nn as nn\nimport torch.n...
[ [ "torch.zeros", "torch.device", "torch.nn.utils.prune.l1_unstructured", "torch.sqrt", "torch.cuda.synchronize", "torch.nn.functional.interpolate", "torch.cuda.get_device_properties", "torch.no_grad", "torch.nn.utils.prune.remove", "torch.cuda.device_count", "torch.manual...
zhaohj2017/HSCC20-Repeatability
[ "47a152058a2c3aa83104b76a0f866fab9a30d9f3" ]
[ "cases/eg3_darboux/superp.py" ]
[ "import torch\nimport numpy as np\nfrom functools import reduce\nfrom operator import mul\n\n############################################\n# set default data type to double; for GPU\n# training use float\n############################################\ntorch.set_default_dtype(torch.float64)\ntorch.set_default_tensor_...
[ [ "torch.set_default_dtype", "torch.set_default_tensor_type", "numpy.array", "numpy.power" ] ]
javakian/Paddle
[ "10018f1561cb8f75f8df982dcf2217e50cee2647" ]
[ "python/paddle/fluid/tests/unittests/test_cond.py" ]
[ "# Copyright (c) 2018 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.full", "numpy.isclose", "numpy.asarray", "numpy.zeros", "numpy.random.seed", "numpy.copy", "numpy.random.randint", "numpy.random.random" ] ]
rafzi/DeepThings
[ "d12e8e8ad9f9ebaa3b0d55f547c0b3c7f1baf636" ]
[ "scripts/plotresults.py" ]
[ "import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# 1: YOLOv2, 2: AlexNet, 3: VGG-16, 4: GoogLeNet\nmodel = 4\nLINEPLOT = True\n\ndfs = pd.read_excel(\"t.xlsx\", sheet_name=None, header=None)\nif model == 1:\n ms = \"YOLOv2\"\nelif model == 2:\n ms = \"AlexNet\"\nelif model == 3:\n ms ...
[ [ "matplotlib.pyplot.rcParams.update", "numpy.array", "matplotlib.pyplot.savefig", "pandas.read_excel", "matplotlib.pyplot.ylim", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots_adjust", "numpy.flip" ] ]
10jqka-aicubes/opinion_classification
[ "43f193522b033bd857d294737b3f9dbaac7aed9f" ]
[ "opinion_classification/electra/finetune/preprocessing.py" ]
[ "# coding=utf-8\n# Copyright 2020 The Google Research 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 requ...
[ [ "tensorflow.train.Features", "tensorflow.data.TFRecordDataset", "tensorflow.gfile.Exists", "tensorflow.python_io.TFRecordWriter", "tensorflow.contrib.data.map_and_batch", "tensorflow.parse_single_example", "tensorflow.cast" ] ]
vidhiJain/lab
[ "43a3eb2aa3121b226c849690e636dcd4c04a49cf" ]
[ "lab/helpers/pytorch/device.py" ]
[ "import torch\n\nfrom lab.configs import BaseConfigs\n\n\nclass DeviceInfo:\n def __init__(self, *,\n use_cuda: bool,\n cuda_device: int):\n self.use_cuda = use_cuda\n self.cuda_device = cuda_device\n self.cuda_count = torch.cuda.device_count()\n\n self...
[ [ "torch.device", "torch.cuda.is_available", "torch.cuda.get_device_name", "torch.cuda.device_count" ] ]
zwc662/disentangling-vae
[ "7eeace2a30f8034e222be6a906f53748b3b2bb6e" ]
[ "exp_adv/A3C/model.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\ndef normalized_columns_initializer(weights, std=1.0):\n out = torch.randn(weights.size())\n out *= std / torch.sqrt(out.pow(2).sum(1, keepdim=True))\n return out\n\n\ndef weights_init(m):\n classname = m.__cla...
[ [ "torch.nn.Linear", "torch.nn.LSTMCell", "torch.nn.Conv2d", "numpy.prod", "numpy.sqrt" ] ]
victor-torres/arche
[ "1bc31a1397e15860be7c3762be86c47f9e839704" ]
[ "src/arche/rules/price.py" ]
[ "from arche.readers.schema import TaggedFields\nfrom arche.rules.result import Result\nfrom arche.tools.helpers import is_number, ratio_diff\nimport pandas as pd\n\n\ndef compare_was_now(df: pd.DataFrame, tagged_fields: TaggedFields):\n \"\"\"Compare price_was and price_now tagged fields\"\"\"\n\n price_was_f...
[ [ "pandas.DataFrame" ] ]
gurcani/dycon
[ "64313471a9222682dce12f8623eb5d0563a8bb5c" ]
[ "plot_dd.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Apr 1 23:40:16 2020\n\n@author: ogurcan\n\"\"\"\n\nimport networkx as nx\nimport h5py as h5\nimport matplotlib.pylab as plt\nimport numpy as np\n\nnwflname='run-GOY/nwfile.pkl'\ngr=nx.read_gpickle(nwflname)\ncc=nx.bipartite.degrees(gr,nx.bipa...
[ [ "matplotlib.pylab.xlabel", "matplotlib.pylab.legend", "numpy.arange", "matplotlib.pylab.ylabel" ] ]
jonoconway/nz_snow_tools
[ "7002fb401fb48225260fada6fd5b5b7ca5ad1184" ]
[ "nz_snow_tools/met/interp_met_data_hourly_jobst_data.py" ]
[ "\"\"\"\nGenerate hourly temperature and precipitation data for use in the snow model\n\nThe daily gridded fields from Andi Jobst at 250m for each calander year\nplus vcsn radiation feilds\nare downscaled to hourly using the same methods given in \"Simulations of seasonal snow for the South Island, New Zealand\"\nC...
[ [ "numpy.asarray", "numpy.ma.fix_invalid", "numpy.ones", "numpy.flipud", "numpy.transpose" ] ]
UmbraVenus/streamlit
[ "d9ff6b4221b2d1424d5156932bd49986a5ec8a40" ]
[ "agraph.py" ]
[ "import streamlit as st\nfrom streamlit_agraph import agraph, Node, Edge, Config\nimport pandas as pd\nimport numpy as np\n\n@st.cache(suppress_st_warning=True)\ndef get_graph(file):\n\n nodes = []\n edges = []\n df = pd.read_csv(file)\n for x in np.unique(df[[\"Source\", \"Target\"]].values):\n ...
[ [ "pandas.read_csv", "numpy.unique" ] ]
thorstenhater/arbor
[ "29b09f2d752cb1243eddda31ff0b06675b52fc1f" ]
[ "python/example/single_cell_detailed_recipe.py" ]
[ "#!/usr/bin/env python3\n\nimport arbor\nimport pandas\nimport seaborn\nimport sys\nfrom arbor import mechanism as mech\n\n#(1) Creat a cell.\n\n# Create the morphology\n\n# Read the SWC filename from input\n# Example from docs: morph.swc\n\nif len(sys.argv) < 2:\n print(\"No SWC file passed to the program\")\n ...
[ [ "pandas.DataFrame" ] ]
zizglu/DEND-1-Data-modeling-with-Postgres
[ "568ba2b4e8d7bec8391074b9d2c3f10c5b498edd" ]
[ "etl.py" ]
[ "import os\nimport glob\nimport psycopg2\nimport pandas as pd\nfrom sql_queries import *\nimport io\n\ndef get_files( root_directory , file_search_query = '*' ):\n '''\n lookup for json file in root_directory and return a list of full file path\n \n Parameters\n ----------\n ...
[ [ "pandas.to_datetime", "pandas.read_json", "pandas.to_numeric", "pandas.concat" ] ]
GusFurtado/DadosAbertosBrasil
[ "d8848f4c5c1107b3b67fd4ef73689541d06c3e28" ]
[ "DadosAbertosBrasil/camara.py" ]
[ "'''\nMódulo para captura dos dados abertos da Câmara dos Deputados do Brasil.\n\nMini-Tutorial\n-------------\n1. Importe o módulo `camara`.\n>>> from DadosAbertosBrasil import camara\n\n2. Busque o código do objeto de estudo utilizando as funções `lista`.\n>>> camara.lista_deputados( ... )\n\n3. Instancie o objet...
[ [ "pandas.DataFrame" ] ]
dpnemergut/VELOCIraptor-STF
[ "5eb6351723002a9813753b112a9a8ff62efce295" ]
[ "examples/catalocomparison_VRinputonly.py" ]
[ "#!/usr/bin/env python2.7\n# -*- coding: utf-8 -*-\n\n\"\"\"\n\n This python script reads two input VR particle catalog files and quickly compares them. It determines\n if the catalogs match. If they do not, further tests are run. For a perfect match, particles are in the\n same order. Information is passe...
[ [ "numpy.concatenate", "numpy.array_equal", "numpy.setdiff1d", "numpy.zeros", "numpy.sum", "numpy.int32", "numpy.isin" ] ]
tuananhbui89/Adversarial-Divergence-Reduction
[ "7304fa514b6c044aa19afce87c3794f9619e9665" ]
[ "ADR_tf/utils_grad.py" ]
[ "import tensorflow as tf \nimport numpy as np\nimport matplotlib.pyplot as plt \nfrom mpl_toolkits import mplot3d\nfrom matplotlib.ticker import FormatStrFormatter\nfrom matplotlib import cm\nfrom matplotlib.colors import ListedColormap, LinearSegmentedColormap\n\ndef plot_grad_wrt_x_or_z(model, sess, x, y, eps, sa...
[ [ "numpy.min", "numpy.sign", "numpy.max", "matplotlib.pyplot.savefig", "numpy.arange", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.axis", "numpy.expand_dims", "numpy.reshape", "numpy.zeros", "matplotlib.pyplot.close", "numpy.shape", "matplotlib.pyplot.fig...
itchono/Electric-Atoms
[ "6f72cc5c400f9a73b641cb21f317cdb4e98e7838" ]
[ "Magnetic Coil Project/4_DoubleNumba.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\nimport pickle\nimport time\nfrom numba import njit\n\nimport cProfile\n\n\n# store shape as a series of points\n\n# coil points stored as columns of 3 x n matrix, in cm\n# current stored in amps\n\n# assume infinitely thi...
[ [ "numpy.array", "numpy.linalg.norm", "numpy.reshape", "numpy.zeros", "numpy.apply_along_axis", "numpy.linspace", "numpy.cross", "numpy.vstack" ] ]
jsgilberto/imu
[ "ace256362e8fa767c0e7c769f9cff641a3e66f76" ]
[ "main.py" ]
[ "import pygame\nfrom pygame.locals import *\nfrom OpenGL.GL import *\nfrom OpenGL.GLU import *\nfrom sensor import Sensor\nfrom madgwick import Madgwick\nimport numpy as np\nimport math\n\nvertices = (\n (1, -1, -1),\n (1, 1, -1),\n (-1, 1, -1),\n (-1, -1, -1),\n (1, -1, 1),\n (1, 1, 1),\n (-1,...
[ [ "numpy.asarray" ] ]
amustafa9/SEG-2020-Spatiotemporal-modeling-for-seismic-inversion
[ "6443710367e05e71e71cf4cbfe8671767a52b26a" ]
[ "train-2D-TCN.py" ]
[ "\n# imports\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport os\nimport torch\nfrom os.path import join\nimport zipfile\nfrom utils import extract, standardize\nfrom datasets import SeismicDataset2D\nfrom torch.utils.data import DataLoader\nfrom model2D import Model2D\nfrom sklearn.metrics import r2_sc...
[ [ "torch.nn.MSELoss", "torch.no_grad", "matplotlib.pyplot.subplots", "torch.cuda.is_available", "torch.utils.data.DataLoader", "torch.load", "numpy.abs", "sklearn.metrics.r2_score", "matplotlib.pyplot.show" ] ]
1iyc/T2T-Analysis
[ "faed5fb1ed62e981e8d3b2bd534785798e60e849" ]
[ "tensor2tensor/models/video/basic_stochastic.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Tensor2Tensor 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 requir...
[ [ "tensorflow.concat", "tensorflow.less", "tensorflow.expand_dims", "tensorflow.random_uniform", "tensorflow.variable_scope", "tensorflow.stack", "tensorflow.nn.sigmoid", "tensorflow.random_normal_initializer" ] ]
pana1990/models
[ "68d983b9bc91d9db9a2b7cbe1b1a69d44921e210" ]
[ "official/nlp/transformer/compute_bleu.py" ]
[ "# Copyright 2018 The TensorFlow 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 requ...
[ [ "tensorflow.logging.set_verbosity", "tensorflow.logging.info", "tensorflow.io.gfile.GFile" ] ]
adarbha/Tic-Tac-Toe
[ "b3d2eae888ca97a3bd2658e3ef975293a0891012" ]
[ "tests/test_game.py" ]
[ "import unittest\nimport numpy as np\nfrom tictactoeadarbha.game import Game\nfrom tictactoeadarbha.player import Player\n\nclass TestGame(unittest.TestCase):\n\n def setUp(self):\n self.game = Game()\n self.player1 = Player('p1','X')\n self.player2 = Player('p2','-')\n\n\n def test_initi...
[ [ "numpy.array" ] ]
GG-yuki/bugs
[ "aabd576e9e57012a3390007af890b7c6ab6cdda8", "aabd576e9e57012a3390007af890b7c6ab6cdda8", "aabd576e9e57012a3390007af890b7c6ab6cdda8" ]
[ "python/AND/main.py", "python/pytorch-mobilenet-v3/test.py", "python/paper_design_cifar100/support.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# @Date : 2018-09-27 15:09:03\n# @Author : Jiabo (Raymond) Huang (jiabo.huang@qmul.ac.uk)\n# @Link : https://github.com/Raymond-sci\n\nimport torch\nimport torch.backends.cudnn as cudnn\n\nimport sys\nimport os\nimport time\nfrom datetime import datetime\n\nim...
[ [ "torch.save", "torch.cuda.is_available", "torch.tensor", "torch.load" ], [ "torch.randn" ], [ "torch.nn.Linear", "torch.nn.Dropout", "torch.cuda.manual_seed_all", "torch.max", "numpy.random.seed", "torch.autograd.Variable", "torch.save", "torch.no_grad",...
simoncometto/PowerFlow2
[ "306f83475494262646683c0d7d0364da829c8d4f" ]
[ "powerflow.py" ]
[ "\n'''Simón Cometto 11/10/2019 Río Cuarto'''\n\n# coding=utf-8\nimport numpy as np\nimport scipy.sparse as sparse\nfrom math import cos, sin\n\nclass powerflow:\n '''\n\n '''\n def __init__(self, filename=''):\n with open(filename) as cdf:\n # Leo el archivo hasta llegar a la sección de B...
[ [ "scipy.sparse.issparse", "numpy.array", "numpy.delete", "numpy.empty", "numpy.savetxt", "numpy.zeros", "matplotlib.pyplot.matshow", "numpy.int32", "numpy.any", "numpy.argwhere", "matplotlib.pyplot.show", "numpy.linalg.solve", "numpy.append", "numpy.hstack", ...
imanolarrieta/RL
[ "072a8c328652f45e053baecd640f04adf7f84b49", "072a8c328652f45e053baecd640f04adf7f84b49", "072a8c328652f45e053baecd640f04adf7f84b49" ]
[ "rlpy/Policies/SwimmerPolicy.py", "examples/cartpole_orig/independent.py", "examples/hiv/kifdd.py" ]
[ "from .Policy import Policy\n\nimport numpy as np\nfrom scipy.io import loadmat\nfrom rlpy.Tools import __rlpy_location__, cartesian\nimport os\n\n\nclass SwimmerPolicy(Policy):\n\n \"\"\"\n Fixed deterministic policy for a 3-link swimmer.\n It is a discretized version from Yuval Tassas MATLAB implmentatio...
[ [ "numpy.sin", "numpy.dot", "numpy.zeros", "numpy.argmin", "numpy.sum", "scipy.io.loadmat", "numpy.ones", "numpy.cos", "numpy.hstack", "numpy.mod" ], [ "numpy.log" ], [ "numpy.log" ] ]