repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
blazma/ca3net
[ "bfeb4fa6c8d07f75778df671cc9500cf0316df51" ]
[ "scripts/bayesian_decoding.py" ]
[ "# -*- coding: utf8 -*-\n\"\"\"\nFunctions used for estimating position from spike trains and fitting trajectory of the animal (used for sequence replay detection)\nbased on: Davison et al. 2009 (the difference is that the tau_i(x) tuning curves are known here, since we generated them... see: `poisson_proc.py`)\nau...
[ [ "numpy.log", "numpy.ones_like", "numpy.random.seed", "numpy.linspace", "numpy.multiply", "numpy.arange", "numpy.random.shuffle", "numpy.ones", "numpy.percentile", "numpy.max", "numpy.round", "numpy.zeros_like", "numpy.where", "scipy.special.factorial", "...
danielsnider/mlcube_examples
[ "0d273ffcf1ee7d791f1c4b01dbaf9d00c6876dd9", "0d273ffcf1ee7d791f1c4b01dbaf9d00c6876dd9" ]
[ "matmul/build/matmul.py", "emdenoise/build/main.py" ]
[ "import argparse\nimport numpy as np\nimport tensorflow as tf\nfrom typing import List\nfrom datetime import datetime\nimport yaml\ntry:\n from yaml import CLoader as Loader, CDumper as Dumper\nexcept ImportError:\n from yaml import Loader, Dumper\n\n\ndef matmul(shape_a: List[int], shape_b: List[int], output...
[ [ "numpy.savetxt", "tensorflow.matmul", "tensorflow.random.normal" ], [ "tensorflow.keras.layers.Concatenate", "tensorflow.keras.models.load_model", "tensorflow.TensorShape", "tensorflow.keras.models.Model", "tensorflow.keras.losses.MeanSquaredError", "tensorflow.keras.layers...
mofeing/qibo
[ "3eb675ba893bf35f103d41a8a64c86aae9cbf616", "3eb675ba893bf35f103d41a8a64c86aae9cbf616", "3eb675ba893bf35f103d41a8a64c86aae9cbf616" ]
[ "examples/reuploading_classifier/qlassifier.py", "src/qibo/tests/test_models_evolution.py", "examples/adiabatic/optimize.py" ]
[ "import numpy as np\nfrom qibo.models import Circuit\nfrom qibo import gates, K\nfrom datasets import create_dataset, create_target, fig_template, world_map_template\nfrom matplotlib.cm import get_cmap\nfrom matplotlib.colors import Normalize\nimport os\n\n\nclass single_qubit_classifier:\n def __init__(self, na...
[ [ "numpy.abs", "numpy.random.seed", "matplotlib.colors.Normalize", "numpy.argmax", "numpy.random.randn", "matplotlib.cm.get_cmap", "numpy.angle", "numpy.sum" ], [ "numpy.diag", "numpy.random.random", "numpy.sqrt", "numpy.linspace", "numpy.cos", "scipy.lina...
ZeQing-Liu/keras-bert
[ "2d3590dac33b4f097aefbff3d42b630626fd157d" ]
[ "tests/layers/test_task_embed.py" ]
[ "import unittest\n\nimport numpy as np\nfrom tensorflow import keras\nfrom tensorflow.keras import backend as K\n\nfrom keras_bert.layers import TaskEmbedding\n\n\nclass TestTaskEmbedding(unittest.TestCase):\n\n def test_mask_zero(self):\n embed_input = keras.layers.Input(shape=(5, 4))\n task_input...
[ [ "numpy.random.random", "numpy.allclose", "tensorflow.keras.backend.function", "numpy.array", "tensorflow.keras.layers.Input" ] ]
iascchen/ai_study_notes
[ "03f46c5e37670c10bd99000d979940db8878f36c", "03f46c5e37670c10bd99000d979940db8878f36c" ]
[ "src/study_keras/6_hello_gan/hello_gan_cifar10.py", "src/study_keras/1_hello_mnist/hello_mnist.py" ]
[ "import os\n\nimport numpy as np\nimport tensorflow.keras as keras\nfrom tensorflow.keras.preprocessing import image\nfrom tensorflow.keras import layers\n\nlatent_dim = 32\nheight = 32\nwidth = 32\nchannels = 3\n\n# =========================================\n\ngenerator_input = keras.Input(shape=(latent_dim,))\n\n...
[ [ "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.LeakyReLU", "tensorflow.keras.Input", "numpy.random.random", "tensorflow.keras.models.Model", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Conv2DTranspose", "tensorflow.keras.optimizers.RMSprop", "tensorfl...
undeadinu/magenta
[ "1a5774e429849a3e79d00fc6d152ddd4a2d1ad31", "1a5774e429849a3e79d00fc6d152ddd4a2d1ad31", "1a5774e429849a3e79d00fc6d152ddd4a2d1ad31", "1a5774e429849a3e79d00fc6d152ddd4a2d1ad31" ]
[ "magenta/pipelines/note_sequence_pipelines_test.py", "magenta/models/music_vae/lstm_utils.py", "magenta/models/coconet/lib_evaluation.py", "magenta/models/drums_rnn/drums_rnn_model.py" ]
[ "# Copyright 2017 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 appli...
[ [ "tensorflow.test.main" ], [ "tensorflow.logging.warning", "tensorflow.contrib.rnn.InputProjectionWrapper", "tensorflow.concat", "tensorflow.stack", "tensorflow.equal", "tensorflow.contrib.rnn.LSTMBlockCell", "tensorflow.summary.scalar", "tensorflow.train.get_global_step", ...
sergejhorvat/d6tflow
[ "00ac64a3d31bf48062003c18ea3269e466322d46" ]
[ "docs/example.py" ]
[ "\nimport d6tflow\nimport luigi\nimport sklearn, sklearn.datasets, sklearn.svm\nimport pandas as pd\n\n# define workflow\nclass TaskGetData(d6tflow.tasks.TaskPqPandas): # save dataframe as parquet\n\n def run(self):\n iris = sklearn.datasets.load_iris()\n df_train = pd.DataFrame(iris.data,columns=...
[ [ "sklearn.preprocessing.scale", "sklearn.datasets.load_iris", "sklearn.svm.SVC" ] ]
tranhoangkhuongvn/cage-challenge-1
[ "88c4b8fb7da9fd4e87bd60fdf6e4a5caa3f146b1" ]
[ "CybORG/CybORG/Agents/Branching_Agents/test_agent.py" ]
[ "from tqdm import tqdm\nimport torch \nimport torch.nn as nn \nimport torch.nn.functional as F \nimport torch.optim as optim \nfrom torch.distributions import Categorical \n\nimport numpy as np \nimport gym \nimport random\nfrom tqdm import tqdm\n\nfrom collections import namedtuple, deque\n\nfrom network import Du...
[ [ "torch.from_numpy", "torch.tensor", "torch.nn.functional.mse_loss", "numpy.max", "torch.no_grad", "numpy.random.randint", "torch.cuda.is_available", "torch.cuda.get_device_name", "torch.stack", "numpy.mean", "numpy.array", "numpy.vstack", "torch.argmax" ] ]
DoraSzasz/mp-mri-prostate
[ "bd420534b4b5c464e5bbb4a07eabdc8724831f8a" ]
[ "pipeline/feature-classification/exp-3/selection-extraction/pipeline_select_adc.py" ]
[ "\"\"\"This pipeline is intended for selecting the more appropriate feature\"\"\"\nimport os\nimport numpy as np\n\nfrom sklearn.externals import joblib\n\nfrom collections import Counter\n\npath_feat_sel = '/data/prostate/results/mp-mri-prostate/exp-3/selection-extraction/rf/adc/feat_sel.pkl'\n# Load the data and ...
[ [ "numpy.concatenate", "numpy.array", "sklearn.externals.joblib.load" ] ]
ppcrong/TestPython
[ "6a87d09e31ad662ce1dea707118d1e914dfeaba7" ]
[ "TestPython/ctypes_test.py" ]
[ "import string\nfrom ctypes import *\n\n# visual studio\n# dll_c = CDLL('dll/ctypes_dll.dll')\n# vscode\ndll_c = CDLL('dll/libctypes_dll.dll')\n\n# read data of value\n# method1 byref\nc_value = c_int(0)\nret = dll_c.test_value(byref(c_value))\nprint('ret: {}'.format(ret))\nprint('c_value: {}'.format(c_value))\n# m...
[ [ "numpy.ctypeslib.as_array", "numpy.arange" ] ]
Abhi-H/CNN-with-Fashion-MNIST-dataset
[ "67e238a51108aa4245a343eabc786e7d0475281a" ]
[ "FashionMNISTwithCNN.py" ]
[ "from __future__ import print_function\nimport torch.utils.data as data\nfrom PIL import Image\nimport os\nimport os.path\nimport errno\nimport torch\nimport codecs\n\n\nclass fashion(data.Dataset):\n \"\"\"`MNIST <http://yann.lecun.com/exdb/mnist/>`_ Dataset.\n Args:\n root (string): Root directory of...
[ [ "torch.ByteTensor", "torch.LongTensor", "torch.nn.CrossEntropyLoss", "torch.max", "torch.nn.ELU", "torch.nn.Conv2d", "torch.utils.data.DataLoader", "torch.nn.MaxPool2d", "torch.nn.Linear", "torch.save", "torch.nn.init.xavier_uniform", "torch.autograd.Variable" ] ]
pabloqb2000/py-led_audio_visualizer
[ "5a3616a0d93e1a8878d482bf8dcb985a326371b4" ]
[ "utils/to_leds.py" ]
[ "from rpi_ws281x import *\nimport numpy as np\n\n# LED strip configuration:\nLED_COUNT = 100 # Number of LED pixels.\nLED_PIN = 18 # GPIO pin connected to the pixels (18 uses PWM!).\n#LED_PIN = 10 # GPIO pin connected to the pixels (10 uses SPI /dev/spidev0.0).\nLED_FREQ_HZ = 80...
[ [ "numpy.zeros" ] ]
ssghost/PySyft
[ "1921efeeda2c7b0bf93f17a33ddf59f8020fa653" ]
[ "syft/core/frameworks/torch/__init__.py" ]
[ "from .hook import TorchHook\nfrom .tensor import _SyftTensor, _LocalTensor, _PointerTensor\nfrom .tensor import _FixedPrecisionTensor, _TorchTensor, _PlusIsMinusTensor, _GeneralizedPointerTensor\nfrom .tensor import _SPDZTensor, _SNNTensor\nfrom enum import Enum, auto\n\n__all__ = ['TorchHook', '_SyftTensor', '_Lo...
[ [ "torch.guard.keys", "torch.tensorvar_methods.append", "torch._command_guard" ] ]
xlnwel/grl
[ "7d42bb2e78bc3e7b7c3ebbcf356a4d1cf12abebf", "7d42bb2e78bc3e7b7c3ebbcf356a4d1cf12abebf", "7d42bb2e78bc3e7b7c3ebbcf356a4d1cf12abebf", "7d42bb2e78bc3e7b7c3ebbcf356a4d1cf12abebf" ]
[ "nn/norm.py", "algo/mriqn/nn.py", "utility/adabelief.py", "nn/func.py" ]
[ "import numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras import layers, initializers\n\n\nEVONORM_B0 = 'evonorm_b0'\nEVONORM_S0 = 'evonorm_s0'\nLAYER_TYPES = (EVONORM_B0, EVONORM_S0)\n\n\nclass EvoNorm(layers.Layer):\n def __init__(self, \n name='evonorm',\n layer_type=...
[ [ "numpy.ones_like", "tensorflow.nn.sigmoid", "tensorflow.maximum", "tensorflow.nn.moments", "tensorflow.cast", "tensorflow.reshape", "tensorflow.sqrt", "tensorflow.random.normal", "tensorflow.tile", "tensorflow.random.set_seed" ], [ "tensorflow.reshape", "tensorf...
PabloGomez96/ISAtmosphere
[ "ba98527f99cd145852beb930738d62c5337feb67" ]
[ "ISA.py" ]
[ "import numpy\nimport scipy.constants as Const\ndef AtmLayers(hG):\n Layers = ([0, 11e3, 25e3, 47e3, 53e3, 79e3, 90e3, 105e3])\n FHght = numpy.digitize(hG,Layers)\n switcher = {\n 1: numpy.array([False, -6.5e-3]),\n 2: numpy.array([True, 216.66]),\n 3: numpy.array([False, 3e-3]),\n ...
[ [ "numpy.digitize", "numpy.array", "numpy.power" ] ]
ahaselsteiner/viroconcom
[ "186d768a7f39788b827173467febb038044199c7", "186d768a7f39788b827173467febb038044199c7" ]
[ "examples/3D_contour.py", "manual_tests/manual_test_HDC.py" ]
[ "\"\"\"\nA comprehensive example that shows the whole workflow of\n1) Loading data\n2) Defining the model structure for a joint distribution\n3) Estimating the parameter values of the model (\"Fitting\")\n4) Computing a 3D environmental contour\n\n\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimpor...
[ [ "pandas.read_csv", "matplotlib.pyplot.subplots", "numpy.exp", "numpy.random.default_rng", "matplotlib.pyplot.figure" ], [ "matplotlib.pyplot.legend", "matplotlib.pyplot.scatter", "numpy.linspace", "numpy.max", "matplotlib.pyplot.close", "numpy.exp", "numpy.array...
stgl/pymccrgb
[ "dc8ad2e46cbe6ff8081c32fa11bce68f869baafa" ]
[ "pymccrgb/core.py" ]
[ "\"\"\" Multiscale curvature classification of ground points with color updates \"\"\"\n\nimport numpy as np\n\nfrom copy import copy\n\nfrom .classification import make_sgd_pipeline\nfrom .features import calculate_color_features\nfrom .pointutils import equal_sample, intersect_rows\n\nfrom pymcc_lidar import calc...
[ [ "numpy.isfinite", "sklearn.externals.joblib.delayed", "numpy.zeros_like", "numpy.argsort", "numpy.array", "numpy.sum", "sklearn.externals.joblib.Parallel" ] ]
Scitator/MONAI
[ "a42b563acf0c7504cee18ee84c8af2eff6e948a7" ]
[ "tests/test_copy_itemsd.py" ]
[ "# Copyright 2020 MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable law or agreed to i...
[ [ "torch.tensor", "torch.cuda.is_available", "numpy.testing.assert_allclose", "torch.device", "numpy.array" ] ]
vkotaru/Car-Racing
[ "f69cec857b6cd660ba6d1c37683ef8cfa0bee8b6" ]
[ "pycar_racing/utils.py" ]
[ "import numpy as np\n\n\ndef linear_regression(x, u, lamb):\n \"\"\"Estimates linear system dynamics\n x, u: data used in the regression\n lamb: regularization coefficient\n \"\"\"\n # Want to solve W^* = argmin sum_i ||W^T z_i - y_i ||_2^2 + lamb ||W||_F,\n # with z_i = [x_i u_i] and W \\in R^{n ...
[ [ "numpy.hstack", "numpy.dot", "numpy.min", "numpy.eye", "numpy.max", "numpy.vstack" ] ]
muralinba12/MetaLearningForNER
[ "61b5159059e486b8e0b50fcd8089554bc26249f6" ]
[ "datasets/utils.py" ]
[ "import glob\nimport json\nimport os\nimport random\n\nfrom torch.utils import data\nfrom torch.nn import CrossEntropyLoss\nfrom torch.utils.data import Subset\n\nfrom datasets.episode import Episode\nfrom datasets.wsd_dataset import WordWSDDataset, MetaWSDDataset\nfrom datasets.ner_dataset import NERSampler, read_...
[ [ "torch.utils.data.DataLoader" ] ]
TheRakeshPurohit/tensorflow
[ "bee6d5a268122df99e1e55a7b92517e84ad25bab", "bee6d5a268122df99e1e55a7b92517e84ad25bab", "bee6d5a268122df99e1e55a7b92517e84ad25bab", "bee6d5a268122df99e1e55a7b92517e84ad25bab" ]
[ "tensorflow/python/trackable/converter.py", "tensorflow/python/kernel_tests/data_structures/lookup_ops_test.py", "tensorflow/core/tfrt/saved_model/tests/gen_resource_gather_v1.py", "tensorflow/python/ops/numpy_ops/integration_test/benchmarks/micro_benchmarks.py" ]
[ "# Copyright 2022 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.python.framework.tensor_util.is_tf_type", "tensorflow.python.eager.function_saved_model_utils.TrackableConstant", "tensorflow.python.trackable.data_structures.wrap_or_unwrap", "tensorflow.python.ops.resource_variable_ops.is_resource_variable" ], [ "tensorflow.python.ops.lookup_...
aowen-uwmad/PySpecTools
[ "3fd0b68352910df1e653370797a8edd46d92fa1c", "3fd0b68352910df1e653370797a8edd46d92fa1c" ]
[ "pyspectools/astro/radiative.py", "tests/test_assignment.py" ]
[ "\n\"\"\" radiative.py\n\n Routines for calculating quantities useful for\n radiative transfer, such as Einstein coefficients\n\"\"\"\nimport numpy as np\nimport pandas as pd\nfrom scipy import constants\n\nfrom pyspectools.units import kbcm, MHz2cm\n\n\ndef parse_str(filepath):\n # Function that will pars...
[ [ "numpy.exp", "pandas.read_fwf" ], [ "pandas.read_csv", "numpy.abs", "pandas.DataFrame" ] ]
JimmyRetza/Theano
[ "1985d4c73fabd5f08f54b922e73a9306e09c77a5", "72d83bce0d547d54ab3513bcba35c166979f7a6f", "1985d4c73fabd5f08f54b922e73a9306e09c77a5", "72d83bce0d547d54ab3513bcba35c166979f7a6f", "72d83bce0d547d54ab3513bcba35c166979f7a6f", "72d83bce0d547d54ab3513bcba35c166979f7a6f" ]
[ "theano/tensor/subtensor.py", "theano/gpuarray/tests/test_basic_ops.py", "theano/gof/tests/test_graph_opt_caching.py", "theano/tensor/nnet/tests/test_bn.py", "theano/tensor/nnet/tests/speed_test_conv.py", "theano/gpuarray/opt.py" ]
[ "from __future__ import absolute_import, print_function, division\nimport sys\nfrom textwrap import dedent\nimport collections\nimport warnings\nimport logging\n\nimport numpy as np\nfrom six import integer_types\nfrom six.moves import xrange\n\nimport theano\nfrom theano.compat import izip\nfrom theano.gradient im...
[ [ "numpy.add.at", "numpy.can_cast", "numpy.__version__.split", "numpy.ones", "numpy.all", "numpy.any", "numpy.zeros", "numpy.empty" ], [ "numpy.asarray", "numpy.eye", "numpy.int32", "numpy.dtype", "numpy.all", "numpy.random.rand", "numpy.array" ], ...
SamuelBrand1/covid-19-in-households-public
[ "a0740d85f8f9fb1ae67dbd9c5a92f1085e4d9ea1" ]
[ "examples/carehome_vacc_analysis/plot_no_vacc_results.py" ]
[ "from pickle import load\nfrom matplotlib.pyplot import subplots\nfrom matplotlib.cm import get_cmap\n\nwith open('carehome_no_vacc_sol.pkl','rb') as f:\n no_vacc_output, ave_hh_by_class = load(f)\n\nlgd=['S','E','M', 'C', 'R', 'D']\n\nt = no_vacc_output['t']\ndata_list = [no_vacc_output['S_no_vacc']/ave_hh_by_c...
[ [ "matplotlib.pyplot.subplots", "matplotlib.cm.get_cmap" ] ]
rosa-yuri/my_projects
[ "8b430f5e5d6c3dc1f8e1a59251bf1cdd90e3501b" ]
[ "color/colorImg.py" ]
[ "# (2) 영상 처리 및 이미지 기반의 데이터 분석 통합 GUI 툴\n# --> RAW, GIF, JPG, PNG, BMP, TIF 영상 데이터 분석 및 처리\n# --> 영상 데이터와 CSV, SQLite, MySQL, XLS 저장 및 로딩 기능 지원\n# --> Image Processing 알고리즘 (화소점, 화소영역, 기하학 등)\n# --> 히스토그램을 통한 데이터 분석 및 영상 개선 알고리즘\n# --> 대량의 영상 빅데이터 자동변환 기능 (자동화)\n\n## 라이브러리\nfrom tkinter import *\nfrom tkinter.f...
[ [ "matplotlib.pyplot.plot", "numpy.arange", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
DJongstra/habitat-lab
[ "42c52f65ad0b758ec7d2dd14ec5d3d64f365d24b" ]
[ "habitat_baselines/rl/ppo/ppo_trainer.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\nimport contextlib\nimport os\nimport random\nimport time\nfrom collections import defaultdict, deque\nfrom ty...
[ [ "torch.load", "torch.zeros", "torch.distributed.PrefixStore", "torch.no_grad", "torch.cuda.is_available", "torch.device", "torch.distributed.get_rank", "torch.logical_not", "torch.tensor", "numpy.finfo", "numpy.size", "torch.nn.init.constant_", "torch.zeros_like...
fminga/tiqs
[ "3e03658feb518025ec4b7c3c00d08bbda94d2b1e" ]
[ "tiqs-notebooks/example.py" ]
[ "from qutip import *\nimport numpy as np\nimport scipy as sc\nimport matplotlib.pyplot as plt\nimport time\n\n## this is for spcific configurations, default set to false\nparallel_active = False\nif parallel_active == True:\n from qutip.parallel import parfor, parallel_map, serial_map\n\n# Example: a spin chain ...
[ [ "numpy.add", "numpy.sqrt", "matplotlib.pyplot.figure" ] ]
lambdabaa/tensorflow
[ "b7e7addbd06c3ba414565f1cd50d734a45f6e12d", "b7e7addbd06c3ba414565f1cd50d734a45f6e12d", "b7e7addbd06c3ba414565f1cd50d734a45f6e12d", "b7e7addbd06c3ba414565f1cd50d734a45f6e12d" ]
[ "tensorflow/python/__init__.py", "tensorflow/python/keras/saving/saved_model/save_impl.py", "tensorflow/lite/tools/pip_package/setup.py", "tensorflow/python/keras/optimizers.py" ]
[ "# Copyright 2015 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.python.util.tf_export.tf_export", "tensorflow.python.tf2.enabled", "tensorflow.python.eager.monitoring.BoolGauge" ], [ "tensorflow.python.util.tf_inspect.ismethod", "tensorflow.python.framework.tensor_shape.TensorShape", "tensorflow.python.training.tracking.layer_utils.filt...
giraffe-tree/play-tf
[ "30f39f228d55fdeb35f1bd420b3bb29ecd3ade96", "30f39f228d55fdeb35f1bd420b3bb29ecd3ade96", "30f39f228d55fdeb35f1bd420b3bb29ecd3ade96" ]
[ "marvanZhouTutorial/04_try_variable.py", "marvanZhouTutorial/06_try_activation_func_visualization.py", "try_myself/basic/try_l2_regularizer2.py" ]
[ "import tensorflow as tf\nimport numpy as np\n\n# 本节主要讲解变量/常量\n\nstate = tf.Variable(0,name=\"counter\")\n# print(state.name)\none = tf.constant(1)\nstate2 = tf.add(state,one)\nupdate = tf.assign(state,state2)\n\n# 定义了变量后, 一定要用下面的\n# old -> tf.initialize_all_variables()\ninit = tf.global_variables_initializer()\n\n...
[ [ "tensorflow.constant", "tensorflow.Variable", "tensorflow.assign", "tensorflow.global_variables_initializer", "tensorflow.add", "tensorflow.Session" ], [ "numpy.square", "tensorflow.matmul", "numpy.linspace", "tensorflow.zeros", "tensorflow.placeholder", "tensor...
kgkang/deep-learning-from-scratch
[ "1b2c680cc69e9fd1bbc51ef9753f24c3d92890f1" ]
[ "test-ch05/model_classification.py" ]
[ "\nimport numpy as np\nimport matplotlib.pylab as plt\n\ndef sigmod(z):\n return 1 / (1 + np.exp(-z))\n\n\nsz = np.linspace(-10,10,100)\nsa = sigmod(sz)\n\nplt.plot(sz, sa)\nplt.show()\n\n" ]
[ [ "numpy.exp", "matplotlib.pylab.show", "numpy.linspace", "matplotlib.pylab.plot" ] ]
christinarudolf/TheFluShot
[ "5a5d6c6d7b7bb9c46d48c35480ee32db5e7d64db" ]
[ "modeling/train.py" ]
[ "from logging import getLogger\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import mean_squared_error, r2_score\nfrom sklearn.linear_model import LinearRegression\nimport pickle\nimport warnings\nimport mlflow\nfrom mlflow.sklearn import save_model # , log_model\...
[ [ "pandas.read_csv", "sklearn.metrics.r2_score", "sklearn.model_selection.train_test_split", "sklearn.metrics.mean_squared_error", "sklearn.linear_model.LinearRegression" ] ]
datitran/falcon-prediction-app
[ "b63c72ea7c2cb9ffeaa1decf06ecdfa6b23de602" ]
[ "src/prediction_app/predict.py" ]
[ "import base64\nimport json\nimport falcon\nimport numpy as np\nfrom io import BytesIO\nfrom PIL import Image, ImageOps\n\n\ndef convert_image(image):\n img = Image.open(image).convert('L')\n inverted_img = ImageOps.invert(img)\n data = np.asarray(inverted_img, dtype='int32')\n rescaled_data = (data / 2...
[ [ "numpy.asarray" ] ]
wyddmw/RotPred
[ "18ca1a565fdbf90e8016e51ed5a3b84dc12109f3" ]
[ "pcdet/models/backbones_3d/vfe/prop_utils/voting_module.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.utils.data\nimport torch.nn.functional as F\n\n\nclass PointNetEncoder(nn.Module):\n def __init__(self, in_channel=64):\n super(PointNetEncoder, self).__init__()\n self.conv1 = torch.nn.Conv1d(in_channel, 128, 1)\n ...
[ [ "torch.nn.BatchNorm1d", "torch.max", "torch.cat", "torch.nn.Sigmoid", "torch.rand", "torch.nn.Conv1d" ] ]
KMCzajkowski/pyscf
[ "e8af41d910cc0d3963655120c0b689590ad978e7", "e8af41d910cc0d3963655120c0b689590ad978e7", "e8af41d910cc0d3963655120c0b689590ad978e7", "e8af41d910cc0d3963655120c0b689590ad978e7", "e8af41d910cc0d3963655120c0b689590ad978e7" ]
[ "pyscf/cc/ccsd_t.py", "pyscf/nao/m_log_mesh.py", "pyscf/pbc/df/df_ao2mo.py", "pyscf/nao/m_siesta2blanko_denvec.py", "pyscf/nao/m_siesta_wfsx.py" ]
[ "#!/usr/bin/env python\n#\n# Author: Qiming Sun <osirpt.sun@gmail.com>\n#\n\nimport gc\nimport time\nimport ctypes\nimport tempfile\nimport numpy\nimport h5py\nfrom pyscf import lib\nfrom pyscf import symm\nfrom pyscf.lib import logger\nfrom pyscf.cc import _ccsd\n\n'''\nCCSD(T)\n'''\n\n# t3 as ijkabc\n\n# JCP, 94,...
[ [ "numpy.diag", "numpy.hstack", "numpy.random.random", "numpy.random.seed", "numpy.asarray", "numpy.arange", "numpy.empty_like", "numpy.sort", "numpy.bincount", "numpy.argsort", "numpy.zeros", "numpy.where", "numpy.empty" ], [ "numpy.log", "numpy.exp",...
Syuukakou/DeepLook_into_Android-type_ELF
[ "ef021f893b9c257aea77a06f5383857e382c74fe", "ef021f893b9c257aea77a06f5383857e382c74fe" ]
[ "Linux_Android_Classification/Src/GridSearchCV/RF/importances_process.py", "Linux_Android_Classification/Src/functions.py" ]
[ "import ast, os, json\nfrom pprint import pprint\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\ndef transform_str2list(file):\n str_contents = []\n with open(file, \"r\") as f:\n for line in f:\n str_contents.append(line.strip('\\n'))\n results = []\n str_contents[0] = str_...
[ [ "matplotlib.pyplot.yticks", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "matplotlib.pyplot.bar", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "pandas.read_csv" ] ]
pallgeuer/mmpose
[ "d3c17d5e6bdb9dbaca19f3bf53aa2802105355fd", "d3c17d5e6bdb9dbaca19f3bf53aa2802105355fd", "d3c17d5e6bdb9dbaca19f3bf53aa2802105355fd", "d3c17d5e6bdb9dbaca19f3bf53aa2802105355fd", "d3c17d5e6bdb9dbaca19f3bf53aa2802105355fd", "d3c17d5e6bdb9dbaca19f3bf53aa2802105355fd" ]
[ "tests/test_pipelines/test_pose3d_transform.py", "mmpose/models/necks/fpn.py", "mmpose/datasets/pipelines/bottom_up_transform.py", "mmpose/datasets/datasets/hand/hand_coco_wholebody_dataset.py", "tests/test_post_processing/test_group.py", "tools/webcam/webcam_apis/nodes/helper_node.py" ]
[ "# Copyright (c) OpenMMLab. All rights reserved.\nimport copy\nimport os.path as osp\nimport tempfile\n\nimport mmcv\nimport numpy as np\nimport pytest\nfrom numpy.testing import assert_array_almost_equal\n\nfrom mmpose.core import SimpleCamera\nfrom mmpose.datasets.pipelines import Compose\n\nH36M_JOINT_IDX = [14,...
[ [ "numpy.diagflat", "numpy.full", "numpy.concatenate", "numpy.ones", "numpy.random.rand", "numpy.testing.assert_allclose", "numpy.load", "numpy.array", "numpy.zeros", "numpy.testing.assert_array_almost_equal" ], [ "torch.nn.ModuleList", "torch.nn.functional.relu",...
xingjiepan/alpha_helix_generator
[ "2b35691b790e6363d5c4897a72c3efa8556d0143", "2b35691b790e6363d5c4897a72c3efa8556d0143" ]
[ "ss_generator/basic.py", "tests/test_ca_tracing_alpha_helix.py" ]
[ "import numpy as np\n\nfrom . import geometry\n\n\ndef transform_residue(residue, M, t):\n '''Transform a residue by a rotation M and a\n translation t. Return the transformed residue.\n '''\n new_res = {}\n\n for key in residue.keys():\n new_res[key] = np.dot(M, residue[key]) + t\n\n retur...
[ [ "numpy.dot", "numpy.radians", "numpy.cos", "numpy.sin", "numpy.array" ], [ "numpy.seterr", "numpy.array", "numpy.radians", "numpy.degrees" ] ]
mori0711/XenonPy
[ "e36ca0ea112b45ee629cd980c88e80cd6c96c514", "e36ca0ea112b45ee629cd980c88e80cd6c96c514", "e36ca0ea112b45ee629cd980c88e80cd6c96c514" ]
[ "xenonpy/mdl/base.py", "tests/models/test_extension.py", "xenonpy/model/utils/metrics.py" ]
[ "# Copyright (c) 2021. yoshida-lab. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n\nimport json\nfrom os import remove\nfrom pathlib import Path\nfrom shutil import make_archive\n\nimport pandas as pd\nimport requests\nfrom requests ...
[ [ "pandas.DataFrame" ], [ "pandas.Series", "torch.Tensor", "numpy.asarray", "scipy.special.softmax", "torch.from_numpy", "torch.equal", "pandas.DataFrame", "numpy.all", "numpy.argmax", "numpy.random.randn", "numpy.random.rand", "numpy.zeros", "numpy.random...
jzerfowski/mne-python
[ "963eea23740f0e697ac03dc1fd671ee91e15c162" ]
[ "mne/io/tests/test_meas_info.py" ]
[ "# -*- coding: utf-8 -*-\n# # Authors: MNE Developers\n# Stefan Appelhoff <stefan.appelhoff@mailbox.org>\n#\n# License: BSD-3-Clause\n\nfrom datetime import datetime, timedelta, timezone, date\nimport hashlib\nimport os.path as op\nimport pickle\n\nimport pytest\nimport numpy as np\nfrom numpy.testing im...
[ [ "numpy.arange", "numpy.eye", "numpy.ones", "numpy.testing.assert_array_equal", "numpy.longlong", "numpy.testing.assert_allclose", "numpy.savetxt", "numpy.array", "numpy.zeros", "numpy.random.RandomState" ] ]
mpharrigan/reference-qvm
[ "ed427b0a9f279a22a8d6e2f5c4979cc61e97b5b2", "ed427b0a9f279a22a8d6e2f5c4979cc61e97b5b2" ]
[ "referenceqvm/tests/test_unitary_generator.py", "referenceqvm/unitary_generator.py" ]
[ "import pytest\nimport warnings\nimport numpy as np\nfrom referenceqvm.unitary_generator import (lifted_gate, apply_gate,\n tensor_gates, tensor_up)\nfrom referenceqvm.gates import gate_matrix, utility_gates\nfrom pyquil.quil import Program\nfrom pyquil.gates import H as H...
[ [ "numpy.dot", "numpy.allclose", "numpy.conj", "numpy.eye", "numpy.kron", "numpy.testing.assert_allclose", "numpy.zeros" ], [ "numpy.dot", "numpy.log2", "numpy.allclose", "numpy.conj", "scipy.sparse.eye", "numpy.arange", "scipy.sparse.csr_matrix", "num...
fdp0525/seam-erasure
[ "fa3aece97b4a4ab0a2bdaf0ea96911253d8a38fc" ]
[ "SeamErasure/points_in_triangle.py" ]
[ "\"\"\"\nUtility file for testing if points are in a given triangle.\n\nWritten by Zachary Ferguson\n\"\"\"\n\nimport numpy\n\n\ndef points_in_triangle(tri, points, tol=1e-8):\n \"\"\"\n Test if the points are inside the triangle.\n Input:\n tri - the triangle as a matrix where the rows are the xy p...
[ [ "numpy.all", "numpy.linalg.solve", "numpy.zeros", "numpy.ones" ] ]
AshishSardana/make-a-thon
[ "9a50ceca893c484812c07fbc210639182d9e6ff7" ]
[ "1-Neonatal Jaunice Detection/Scripts/skinDetect_2.py" ]
[ "# Required modules\r\nimport cv2\r\nimport numpy\r\n\r\n# Constants for finding range of skin color in YCrCb\r\nmin_YCrCb = numpy.array([0,133,77],numpy.uint8)\r\nmax_YCrCb = numpy.array([255,173,127],numpy.uint8)\r\n\r\n# Create a window to display the camera feed\r\ncv2.namedWindow('Camera Output')\r\n\r\n# Get ...
[ [ "numpy.array" ] ]
mkmkryu/scanpy2
[ "f3db32a142dc31c1b628380db1c969a6d0b9dc3a", "f3db32a142dc31c1b628380db1c969a6d0b9dc3a", "f3db32a142dc31c1b628380db1c969a6d0b9dc3a", "f3db32a142dc31c1b628380db1c969a6d0b9dc3a", "f3db32a142dc31c1b628380db1c969a6d0b9dc3a" ]
[ "scanpy/tools/_dendrogram.py", "scanpy/external/tl/_palantir.py", "scanpy/plotting/palettes.py", "scanpy/plotting/_tools/paga.py", "scanpy/tests/test_sim.py" ]
[ "\"\"\"\nComputes a dendrogram based on a given categorical observation.\n\"\"\"\n\nfrom typing import Optional, Sequence, Dict, Any\n\nimport pandas as pd\nfrom anndata import AnnData\nfrom pandas.api.types import is_categorical_dtype\n\nfrom .. import logging as logg\nfrom .._utils import _doc_params\nfrom ..tool...
[ [ "scipy.cluster.hierarchy.linkage", "pandas.api.types.is_categorical_dtype" ], [ "pandas.DataFrame" ], [ "numpy.arange", "matplotlib.colors.ListedColormap" ], [ "matplotlib.pyplot.legend", "numpy.sqrt", "numpy.linspace", "numpy.cumsum", "pandas.DataFrame", "m...
srsohn/mtsgi
[ "31dc14b007758edc0aa340397184f47695705b1c" ]
[ "mtsgi/run_meta_loop.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...
[ [ "numpy.set_printoptions" ] ]
lpd6375/qlib
[ "3a911bc09ba5136cd7c61c2c8dcca8a63339e738", "3a911bc09ba5136cd7c61c2c8dcca8a63339e738" ]
[ "examples/benchmarks_dynamic/DDG-DA/workflow.py", "qlib/contrib/online/operator.py" ]
[ "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT License.\nfrom pathlib import Path\nfrom qlib.model.meta.task import MetaTask\nfrom qlib.contrib.meta.data_selection.model import MetaModelDS\nfrom qlib.contrib.meta.data_selection.dataset import InternalData, MetaDatasetDS\nfrom qlib.data.dataset.ha...
[ [ "pandas.concat", "pandas.Series" ], [ "pandas.Timestamp" ] ]
luotigerlsx/models_archive
[ "c6578521ae61df7298003b42526b03e78d2d0d4b", "c6578521ae61df7298003b42526b03e78d2d0d4b" ]
[ "research/mobilenet/mobilenet_trainer.py", "research/mobilenet/mobilenet_v2.py" ]
[ "# Copyright 2020 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 required...
[ [ "tensorflow.keras.metrics.SparseTopKCategoricalAccuracy", "tensorflow.keras.metrics.TopKCategoricalAccuracy", "tensorflow.train.latest_checkpoint", "tensorflow.keras.losses.CategoricalCrossentropy", "tensorflow.keras.losses.SparseCategoricalCrossentropy", "tensorflow.keras.metrics.Categori...
adymaharana/VLCStoryGan
[ "74112404689e8144c2ed2d375e1e5a1cde09debb" ]
[ "densecap/utils/data_loader.py" ]
[ "import os\nimport pickle\n\nimport h5py\nimport torch\nfrom torch.utils.data import Dataset\nimport torchvision.transforms as transforms\nfrom PIL import Image\nfrom torch.utils.data import DataLoader\nfrom prefetch_generator import BackgroundGenerator\n\n\n__all__ = [\n \"DataLoaderPFG\", \"DenseCapDataset\", ...
[ [ "torch.tensor", "torch.as_tensor" ] ]
bltlab/mot
[ "4896c8e6b5e6895a27662b5e92897c0752b7adaa" ]
[ "qualitychecks/sentence_average.py" ]
[ "#! /usr/bin/env python\n\"\"\"\nScript to observe sentence counts by language\n\"\"\"\n\nimport os\nimport json\nfrom argparse import ArgumentParser\nfrom collections import Counter\nfrom multiprocessing import Pool\nfrom typing import Generator\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.autoscale", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show" ] ]
danbirken/pandas
[ "bfd5348d824a721dd0d896bb06e63e4ad801ba51", "fa8a5ca1dd27c4169727070ddbdcb248002fddb4" ]
[ "pandas/tseries/tests/test_timedeltas.py", "pandas/tseries/offsets.py" ]
[ "# pylint: disable-msg=E1101,W0612\n\nfrom datetime import datetime, timedelta\nimport nose\n\nimport numpy as np\nimport pandas as pd\n\nfrom pandas import (Index, Series, DataFrame, Timestamp, isnull, notnull,\n bdate_range, date_range, _np_version_under1p7)\nimport pandas.core.common as com\nf...
[ [ "pandas.to_datetime", "pandas.Series", "pandas.isnull", "pandas.offsets.Day", "pandas.Timestamp", "numpy.arange", "pandas.util.testing.assert_series_equal", "pandas.util.testing.assert_almost_equal", "pandas.tseries.timedeltas._coerce_scalar_to_timedelta_type", "numpy.timed...
233xw/Neural-Networks-and-Deep-Learning
[ "e6e0519d41ca3dc02da652e43fc799f736b60a2f" ]
[ "src/mnist_loader.py" ]
[ "\"\"\"\nmnist_loader\n~~~~~~~~~~~~\n\nA library to load the MNIST image data. For details of the data\nstructures that are returned, see the doc strings for ``load_data``\nand ``load_data_wrapper``. In practice, ``load_data_wrapper`` is the\nfunction usually called by our neural network code.\n\"\"\"\n\n#### Lib...
[ [ "numpy.reshape", "numpy.zeros" ] ]
caisarl76/alfred
[ "b73bdc1651e14c02440938b639fa3c7f3ab3d321" ]
[ "models/eval/eval.py" ]
[ "import json\nimport pprint\nimport random\nimport time\nimport torch\nimport torch.multiprocessing as mp\nfrom models.nn.resnet import Resnet\nfrom data.preprocess import Dataset\nfrom importlib import import_module\n\nclass Eval(object):\n\n # tokens\n STOP_TOKEN = \"<<stop>>\"\n SEQ_TOKEN = \"<<seg>>\"\...
[ [ "torch.device", "torch.multiprocessing.Process" ] ]
Speech-Lab-IITM/espnet-1
[ "fc62b1ce3e50c5ef8a2ac8cedb0d92ac41df54ca", "fc62b1ce3e50c5ef8a2ac8cedb0d92ac41df54ca" ]
[ "espnet/nets/chainer_backend/transformer/subsampling.py", "espnet/nets/pytorch_backend/nets_utils.py" ]
[ "# encoding: utf-8\n\"\"\"Class Declaration of Transformer's Input layers.\"\"\"\n\nimport logging\n\nimport chainer\nimport chainer.functions as F\nimport chainer.links as L\nimport numpy as np\n\nfrom espnet.nets.chainer_backend.transformer.embedding import PositionalEncoding\n\n\nclass Conv2dSubsampling(chainer....
[ [ "numpy.array", "numpy.sqrt" ], [ "torch.sum", "torch.from_numpy", "numpy.ones", "torch.arange", "numpy.array" ] ]
Devanshu-singh-VR/FaceRecognition
[ "f596d1964f4f43174ffe5bac6d6437a7d22c3593", "f596d1964f4f43174ffe5bac6d6437a7d22c3593" ]
[ "network.py", "extractor_triplet.py" ]
[ "import torch\r\nimport torch.nn as nn\r\nimport torchvision.models as models\r\n\r\nclass Siamese(nn.Module):\r\n def __init__(self, in_channels, out_size, dropout):\r\n super(Siamese, self).__init__()\r\n self.dropout = dropout\r\n self.dropout_layer = nn.Dropout(dropout)\r\n #self....
[ [ "torch.nn.Dropout", "torch.ones", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d" ], [ "pandas.read_csv", "pandas.DataFrame" ] ]
karlhthompson/cwrc
[ "9fadf113712908c1bfa73bf8a696108a846e4677", "9fadf113712908c1bfa73bf8a696108a846e4677", "9fadf113712908c1bfa73bf8a696108a846e4677" ]
[ "rltools/rltools/distributions.py", "rllab/rllab/distributions/recurrent_categorical.py", "rllab/rllab/spaces/box.py" ]
[ "import numpy as np\nimport tensorflow as tf\n\nfrom rltools.rltools import tfutil\nfrom rltools.rltools import util\n\nTINY = 1e-10\n\n\nclass Distribution(object):\n\n @property\n def dim(self):\n raise NotImplementedError()\n\n def kl(self, old, new):\n raise NotImplementedError()\n\n d...
[ [ "numpy.log", "numpy.isfinite", "numpy.random.choice", "tensorflow.shape", "tensorflow.exp", "tensorflow.op_scope", "tensorflow.to_float", "tensorflow.log", "tensorflow.square", "tensorflow.pack" ], [ "numpy.log" ], [ "numpy.allclose", "numpy.asarray", ...
jzjonah/apollo
[ "df9113ae656e28e5374db32529d68e59455058a0" ]
[ "modules/tools/vehicle_calibration/process.py" ]
[ "#!/usr/bin/env python3\n\n###############################################################################\n# Copyright 2017 The Apollo 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...
[ [ "scipy.signal.filtfilt", "numpy.min", "numpy.set_printoptions", "numpy.genfromtxt", "numpy.all", "numpy.max", "scipy.signal.butter", "numpy.append", "numpy.argmax", "numpy.argmin", "numpy.diff", "numpy.argsort", "numpy.where" ] ]
preisach/animations
[ "07dc9598eee7ed3f73e35b99dd6c44c525a976d5" ]
[ "samples/samplesPY/arch/io_plots/ioPairs.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Feb 19 14:34:30 2019\n\n@author: m\n\"\"\"\n\nfrom matplotlib import pyplot as plt\n\n# pairs = [ [ [ 0, 0 ], [ 0.4, 0 ] ], [ [ 0.2, 0.16666666666666666 ], [ 0.6000000000000001, 0.16666666666666666 ] ], [ [ 0.2, 0.3333333333333333 ], [ 0.6000...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
apoorv698/MajorProject
[ "50162cc7eec676d662d7484c7c65046835faaadc" ]
[ "trypy.py" ]
[ "from flask import Flask, render_template, request, redirect, url_for\r\nimport base64\r\nimport re\r\nimport numpy as np\r\nfrom io import BytesIO\r\nfrom tkinter import *\r\nfrom PIL import Image, ImageTk\r\nimport time\r\nimport threading\r\nimport cv2\r\nimport os\r\n\r\nfrom sklearn.model_selection import trai...
[ [ "tensorflow.get_default_graph", "numpy.array", "numpy.expand_dims" ] ]
brandondutra/cloudml-samples
[ "3d483593c070c4acd4a9648dbfd7db2be6524583", "3d483593c070c4acd4a9648dbfd7db2be6524583" ]
[ "molecules/predict.py", "census/tensorflowcore/trainer/task.py" ]
[ "#!/usr/bin/env python\n#\n# Copyright 2018 Google Inc. All Rights Reserved. Licensed under the Apache\n# License, Version 2.0 (the \"License\"); you may not use this file except in\n# compliance with the License. You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requ...
[ [ "tensorflow.python.saved_model.loader.load", "tensorflow.python.framework.ops.Graph", "tensorflow.Session" ], [ "tensorflow.contrib.metrics.aggregate_metric_map", "tensorflow.train.MonitoredTrainingSession", "tensorflow.summary.scalar", "tensorflow.Graph", "tensorflow.contrib.t...
NathanWoo/pulse2percept
[ "2a1e15159af234fb247092b88a465b7bdffd21db" ]
[ "pulse2percept/viz/axon_map.py" ]
[ "\"\"\"`plot_axon_map`, `plot_implant_on_axon_map`\"\"\"\n# https://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python\nfrom sys import platform\nimport matplotlib as mpl\nif platform == \"darwin\": # OS X\n mpl.use('TkAgg')\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom ...
[ [ "numpy.asarray", "matplotlib.use", "numpy.sqrt", "matplotlib.pyplot.subplots" ] ]
RenatoFarruggio/TextBoxes_plusplus_tf
[ "9d1bfb73ebe9eb147747daea3b9ec21b8cb0d6ba" ]
[ "train_stage_1.py" ]
[ "import os\n\nuse_gpu = True\n\nif use_gpu:\n os.environ['CUDA_VISIBLE_DEVICES']= '0' # using GPU 0\nelse:\n os.environ['CUDA_VISIBLE_DEVICES']= '-1' # using only CPU\n\nimport tensorflow as tf\nimport tensorflow.contrib.slim as slim\nfrom tensorflow.python.ops import control_flow_ops\n\nfrom tf_extended im...
[ [ "tensorflow.stack", "tensorflow.train.ExponentialMovingAverage", "tensorflow.app.flags.DEFINE_string", "tensorflow.GPUOptions", "tensorflow.app.flags.DEFINE_boolean", "tensorflow.group", "tensorflow.summary.scalar", "tensorflow.Graph", "tensorflow.python.ops.control_flow_ops.wi...
genggng/Meta-DETR
[ "45f9dcb4d3402b0e308e06537284fe2c8443b3f6" ]
[ "models/meta_detr.py" ]
[ "import copy\nimport math\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.utils.weight_norm import WeightNorm\n\nfrom util import box_ops\nfrom util.misc import (NestedTensor, nested_tensor_from_tensor_list,\n accuracy, get_world_size, is_dist_avail_and_ini...
[ [ "torch.nn.functional.l1_loss", "torch.cat", "torch.zeros", "torch.no_grad", "torch.full_like", "torch.device", "torch.nn.utils.weight_norm.WeightNorm.apply", "torch.norm", "torch.ones", "torch.nn.GroupNorm", "torch.full", "torch.nn.init.constant_", "torch.nn.fun...
ZhenyueQin/PANet
[ "a186d7ca06533a666299c1c07c632f44e4e34d48", "a186d7ca06533a666299c1c07c632f44e4e34d48" ]
[ "lib/datasets/voc_dataset_evaluator.py", "lib/modeling/collect_and_distribute_fpn_rpn_proposals.py" ]
[ "# Copyright (c) 2017-present, Facebook, 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 required by applicabl...
[ [ "numpy.mean" ], [ "numpy.concatenate", "numpy.argsort", "numpy.where", "numpy.empty" ] ]
henninglebbaeus/simpletransformers
[ "99ede240385fb7999abd46f7cbd708d8951e945f" ]
[ "simpletransformers/classification/multi_modal_classification_model.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n\nfrom __future__ import absolute_import, division, print_function\n\nimport json\nimport logging\nimport math\nimport os\nimport random\nimport warnings\nfrom multiprocessing import cpu_count\nfrom dataclasses import asdict\n\nimport numpy as np\nfrom scipy.stats import m...
[ [ "numpy.squeeze", "sklearn.metrics.matthews_corrcoef", "torch.utils.data.DataLoader", "sklearn.metrics.confusion_matrix", "pandas.DataFrame", "torch.nn.BCEWithLogitsLoss", "torch.no_grad", "torch.cuda.is_available", "torch.cuda.manual_seed_all", "torch.device", "torch.nn...
kamatsuoka/gpt-2
[ "ac326eb5e704316d16f2a5421666a71e986c24a8" ]
[ "src/interactive_conditional_samples.py" ]
[ "#!/usr/bin/env python3\n\nimport json\nimport os\n\nimport fire\nimport numpy as np\nimport tensorflow as tf\n\nimport encoder\nimport model\nimport sample\n\n\ndef interact_model(\n model_name='345M',\n seed=None,\n nsamples=1,\n batch_size=1,\n length=None,\n temperature...
[ [ "tensorflow.Graph", "numpy.random.seed", "tensorflow.placeholder", "tensorflow.set_random_seed", "tensorflow.train.Saver" ] ]
cshenry/MergeMetabolicAnnotations-1
[ "d0b9bce13de16bcd816bfca789bf624323b2a239" ]
[ "lib/MergeMetabolicAnnotations/utils/functions.py" ]
[ "import pandas as pd\nimport os\nimport logging\nimport yaml\nimport datetime\n\n\ndef df_to_ontology(params, staging_dir, pass_df=None):\n '''\n Takes the text file from staging, or the pandas df passed from the merge\n app, and converts to an ontology dictionary suitable from the annotation\n ontology...
[ [ "pandas.notnull", "pandas.read_csv" ] ]
mrernst/rl_robotics_research
[ "0bc446cfb69591cb4ee3ce8d39815c463090a5f6" ]
[ "env/plane.py" ]
[ "import gym\nimport numpy as np\nimport cv2\nfrom gym import spaces\n\n\ndef line_intersection(line1, line2):\n # calculate the intersection point\n xdiff = (line1[0][0] - line1[1][0], line2[0][0] - line2[1][0])\n ydiff = (line1[0][1] - line1[1][1], line2[0]\n [1] - line2[1][1]) # Typo was here\n\n ...
[ [ "numpy.ones", "numpy.array", "numpy.random.random", "numpy.cross" ] ]
OpenMDAO/zappy
[ "2c72048b4c4e0ce0ae83221e4ee5788978254340" ]
[ "zappy/LF_elements/bus.py" ]
[ "import math, cmath\nimport numpy as np\n\nfrom openmdao.api import ImplicitComponent\n\nclass ACbus(ImplicitComponent):\n \"\"\"\n Determines the voltage of an AC bus\n \"\"\"\n\n def initialize(self):\n\n self.options.declare('num_nodes', types=int)\n self.options.declare('lines', defaul...
[ [ "numpy.arange", "numpy.zeros", "numpy.ones" ] ]
kobewangSky/deep-person-reid
[ "628885841585536a09f40542bebbb77c3edcb8b1" ]
[ "torchreid/data/transforms.py" ]
[ "from __future__ import division, print_function, absolute_import\nimport math\nimport random\nfrom collections import deque\nimport torch\nfrom PIL import Image\nfrom torchvision.transforms import (\n Resize, Compose, ToTensor, Normalize, ColorJitter, RandomHorizontalFlip\n)\nfrom ..utils.augumentation import S...
[ [ "torch.mm", "torch.zeros_like", "torch.Tensor" ] ]
TrasgoGroup/Cell-Viewer
[ "4f2421e278b22926cd34e0600d0ecb12026d58c9" ]
[ "figmap/cellmap.py" ]
[ "\"\"\"\n A P A C H E L I C E N S E\n ------------ \n Version 2.0, January 2004\n\n Copyright 2021 Miguel Cruces Fernández\n\n Licensed under the Apache License, Version 2.0 (the \n\"License\"); you may not use this file except in compliance \nwith the License. Y...
[ [ "numpy.min", "matplotlib.colors.to_hex", "matplotlib.pyplot.subplots", "matplotlib.colors.Normalize", "numpy.max", "numpy.log10", "matplotlib.cm.ScalarMappable", "numpy.ndenumerate" ] ]
zhuoyuhe/CenterTrack
[ "43a2e641b7d3f4d19279eab24f2e4c6e8a6d7ae1" ]
[ "src/lib/dataset/datasets/nuscenes.py" ]
[ "# Copyright (c) Xingyi Zhou. All Rights Reserved\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport pycocotools.coco as coco\nfrom pycocotools.cocoeval import COCOeval\nfrom pyquaternion import Quaternion\nimport numpy as np\nimport torch\nimpo...
[ [ "numpy.array", "numpy.zeros", "numpy.argmax" ] ]
ishine/StyleSpeech-1
[ "f939cf9cb981db7b738fa9c9c9a7fea2dfdd0766" ]
[ "train_meta.py" ]
[ "import torch\r\nimport torch.nn as nn\r\nimport torch.distributed as dist\r\nfrom torch.utils.tensorboard import SummaryWriter\r\nimport torch.multiprocessing as mp\r\nimport torch.distributed as dist\r\nimport torch.utils.data.distributed\r\n\r\nimport argparse\r\nimport os\r\nimport json\r\n\r\nfrom models.Style...
[ [ "torch.distributed.init_process_group", "torch.multiprocessing.spawn", "torch.cuda.set_device", "torch.randperm", "torch.no_grad", "torch.cuda.device_count", "torch.nn.parallel.DistributedDataParallel" ] ]
git-disl/HQ-Ensemble
[ "c588f2979476e50efd429c9d9d5bb2f854b9ad41" ]
[ "baselineDiversityPruning.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\nimport os\nimport time\nimport timeit\n\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.optim\nimport torch.utils.data\nimport torchvision.transforms as transforms\nimport torchvision.datasets as datasets...
[ [ "torch.nn.functional.softmax", "numpy.random.seed", "numpy.min", "torch.load", "numpy.arange", "numpy.max", "numpy.mean", "numpy.array" ] ]
medtray/IEEEBigData2020-DSRMM-Table-Retrieval
[ "ff274f0c029c856b584d29ee1590c971cb12b051" ]
[ "dsrmm_model.py" ]
[ "import torch\nimport torch.nn as nn\n\n\nimport numpy as np\nimport torch.nn.functional as f\nfrom torch.autograd import Variable\nimport torch.nn.functional as F\n\n\nclass DSRMM(nn.Module):\n\n def __init__(self, args):\n \"\"\"\"Constructor of the class.\"\"\"\n super(DSRMM, self).__init__()\n\...
[ [ "torch.nn.functional.normalize", "torch.mean", "torch.nn.functional.softmax", "torch.clamp", "torch.max", "torch.Tensor", "torch.cat", "torch.nn.Conv2d", "torch.sum", "torch.exp", "torch.nn.MaxPool2d", "torch.nn.Linear", "torch.FloatTensor", "torch.bmm", ...
entn-at/TTS-Cube
[ "ac244ac1aa7cf2ce485e40ea54100329bc5961a7" ]
[ "cube/models/clarinet/modules.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom models.clarinet.loss import gaussian_loss, KL_gaussians\nimport numpy as np\nimport math\n\n\nclass Conv(nn.Module):\n def __init__(self, in_channels, out_channels, kernel_size, dilation=1, causal=False, mode='SAME'):\n super(Conv...
[ [ "torch.cos", "torch.sigmoid", "numpy.imag", "torch.sin", "torch.sqrt", "torch.nn.utils.weight_norm", "numpy.eye", "torch.nn.functional.conv1d", "torch.nn.functional.conv_transpose1d", "torch.tensor", "torch.tanh", "numpy.linalg.pinv", "numpy.real", "torch.nn...
biergaiqiao/Oriole-Thwarting-Privacy-against-Trustworthy-Deep-Learning-Models
[ "ffadb82b666e8c1561a036a10d9922db8a3266cc" ]
[ "oriole/function.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sat Oct 10 08:45:03 2020\r\n\r\n@author: 一叶之秋\r\n\"\"\"\r\nimport numpy as np\r\nfrom fawkes.utils import extractor_ls_predict\r\nfrom fawkes.utils import pairwise_l2_distance\r\n\r\n\r\n####这里的loaded_images必须进行归一化处理\r\ndef compute_points(loaded_images,feature_extrac...
[ [ "numpy.average" ] ]
Joseph-ML/training-data-analyst
[ "a96d73f0b9630935337bab7bb624da87160d1865" ]
[ "blogs/rl-on-gcp/cartpole_policy_gradients/rl_model_code/trainer/model.py" ]
[ "# Copyright 2018 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 app...
[ [ "tensorflow.concat", "numpy.concatenate", "tensorflow.nn.sigmoid_cross_entropy_with_logits", "numpy.mean", "tensorflow.keras.initializers.VarianceScaling", "tensorflow.train.AdamOptimizer", "tensorflow.summary.scalar", "tensorflow.layers.dense", "tensorflow.reset_default_graph"...
W-yk/privacy
[ "5f21b040ded4132346e025b73246ecf4dfa32604" ]
[ "tutorials/cifar.py" ]
[ "# Copyright 2019, The TensorFlow Authors.\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 require...
[ [ "tensorflow.keras.losses.CategoricalCrossentropy", "tensorflow.keras.optimizers.SGD", "tensorflow.keras.preprocessing.image.ImageDataGenerator", "tensorflow.Variable", "tensorflow.keras.regularizers.l2", "tensorflow.keras.applications.mobilenet_v2.MobileNetV2", "tensorflow.keras.layers...
masstalde/uwb
[ "a220d03e604f47d6b884d21f8180f9d3998615a5" ]
[ "src/uwb_tracker_node.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"uwb_tracker_node.py: Streams tracked positions based on UWB multi-range messages.\"\"\"\n\nfrom __future__ import print_function\n\n__author__ = \"Benjamin Hepp\"\n__email__ = \"benjamin.hepp@inf.ethz.ch\"\n__copyright__ = \"Copyright 2016 Benjamin Hepp\"\n\nimport selec...
[ [ "numpy.diag", "numpy.dot", "numpy.abs", "numpy.eye", "numpy.linalg.norm", "numpy.linalg.pinv", "numpy.copy", "numpy.ravel", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.empty" ] ]
HamsterBiz/Automatic-Video-Colorization-1
[ "e110650d130d3eadfe29073bf445513d10a5b3f6", "e110650d130d3eadfe29073bf445513d10a5b3f6" ]
[ "fully_colorization/pytorch_pwc/comparison/comparison.py", "fully_colorization/psnr.py" ]
[ "#!/usr/bin/env python\n\nimport math\nimport moviepy\nimport moviepy.editor\nimport numpy\nimport PIL\nimport PIL.Image\nimport PIL.ImageFont\nimport PIL.ImageDraw\n\nintX = 32\nintY = 436 - 64\n\nobjImages = [ {\n\t'strFile': 'official - caffe.png',\n\t'strText': 'official - Caffe'\n}, {\n\t'strFile': 'this - pyt...
[ [ "numpy.array" ], [ "numpy.mean", "pandas.DataFrame" ] ]
levaid/open_lth
[ "43c91e83cf17524702b80df3a252dffc83fb532e" ]
[ "models/charcnn.py" ]
[ "import torch.nn as nn\n\nimport torch.nn as nn\n\nfrom foundations import hparams\nfrom lottery.desc import LotteryDesc\nfrom models import base\nfrom pruning import sparse_global\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass Model(base.Model):\n \"\"\"Character-level CNN des...
[ [ "torch.nn.CrossEntropyLoss", "torch.nn.Dropout", "torch.nn.Linear", "torch.nn.MaxPool1d", "torch.nn.Conv1d", "torch.nn.ReLU" ] ]
Rowing0914/TF_RL
[ "68e5e9a23e38ed2d8ac5f97d380567b919a3d2e7", "68e5e9a23e38ed2d8ac5f97d380567b919a3d2e7" ]
[ "examples/Sutton_RL_Intro/ch5_MC/first_visit_MC_ES.py", "test/Other_test/gpu_test.py" ]
[ "# 5.3 Monte Carlo Control\n# Monte Carlo ES (Exploring Starts) with first visit constraint\n# reference: https://github.com/dennybritz/reinforcement-learning/blob/master/MC/MC%20Control%20with%20Epsilon-Greedy%20Policies%20Solution.ipynb\n\nfrom collections import defaultdict\nimport numpy as np\nimport sys\n\nif ...
[ [ "numpy.arange", "numpy.argmax", "numpy.zeros", "numpy.ones" ], [ "tensorflow.device", "tensorflow.matmul", "tensorflow.constant", "tensorflow.python.client.device_lib.list_local_devices", "tensorflow.Session" ] ]
michael-snower/d2go
[ "614336e421baef3c61bcbc2135a21c912db25cc5" ]
[ "projects_oss/detr/test_detr_export.py" ]
[ "#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\nimport unittest\n\nimport torch\nfrom d2go.runner import create_runner\nfrom detr.util.misc import nested_tensor_from_tensor_list\nfrom fvcore.nn import flop_count_table, FlopCountAnalysis\n\n\nclass Tester(unittest.T...
[ [ "torch.jit.script", "torch.rand" ] ]
jojoelfe/napari
[ "b52a136dad392c091b0008c0b8d7fcc5ef460f66", "b52a136dad392c091b0008c0b8d7fcc5ef460f66", "48cdf4d1c4bcf6f76603e90b1c0c7498e2aba6c0" ]
[ "examples/dev/plot_2d_edge_meshes.py", "napari/benchmarks/benchmark_points_layer.py", "napari/layers/utils/_color_encoding.py" ]
[ "from napari.layers.shapes._shapes_utils import (\n generate_2D_edge_meshes,\n) # , old_generate_2D_edge_meshes\nimport matplotlib.pyplot as plt\nfrom matplotlib.patches import Polygon\n\nfig, axes = plt.subplots(2, 3)\n# fig.set_figwidth(15)\n# fig.set_figheight(10)\ncolors = iter(['red', 'green', 'blue', 'yel...
[ [ "matplotlib.pyplot.show", "matplotlib.patches.Polygon", "matplotlib.pyplot.subplots" ], [ "numpy.round", "numpy.random.uniform", "numpy.random.random", "numpy.random.seed" ], [ "numpy.min", "numpy.asarray", "numpy.max", "numpy.interp", "numpy.empty" ] ]
orestislampridis/Greek-Lyrics-Generation
[ "e37b33b048a8d38a83474b43e407552538fcf2ca" ]
[ "char_level_lstm/char_level_lstm.py" ]
[ "#Import dependencies\nimport tensorflow as tf\nfrom keras.models import Sequential\nfrom keras.layers import LSTM, Bidirectional, Activation, Dropout, Dense,CuDNNLSTM, Embedding,GRU, CuDNNGRU\nfrom keras.callbacks import *\nfrom keras.optimizers import Adam\nfrom keras.utils import np_utils\nimport numpy as np\nim...
[ [ "numpy.pad", "numpy.reshape", "numpy.append", "numpy.argmax", "tensorflow.keras.utils.get_file", "numpy.array" ] ]
andreabragantini/pandapower
[ "5503873141ba6bf3dc1459ce8d57f4dac5160dbd" ]
[ "pandapower/build_branch.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2020 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.\n\nimport copy\nimport ...
[ [ "numpy.sqrt", "numpy.arctan", "numpy.in1d", "numpy.concatenate", "numpy.any", "numpy.where", "numpy.square", "numpy.hstack", "numpy.unique", "numpy.arcsin", "numpy.arange", "numpy.stack", "numpy.count_nonzero", "numpy.zeros", "numpy.logical_not", "nu...
loichuder/hsds
[ "729d39d423b4b52ef60985fb32d25468b211c1c2" ]
[ "hsds/async_lib.py" ]
[ "##############################################################################\n# Copyright by The HDF Group. #\n# All rights reserved. #\n# ...
[ [ "numpy.zeros" ] ]
serre-lab/deeplabcut_mgh
[ "8fa4a59f422ff0357552e290230838239edcfe1b" ]
[ "deeplabcut/utils/select_crop_parameters.py" ]
[ "\"\"\"\nDeepLabCut2.0 Toolbox (deeplabcut.org)\n© A. & M. Mathis Labs\nhttps://github.com/AlexEMG/DeepLabCut\nPlease see AUTHORS for contributors.\n\nhttps://github.com/AlexEMG/DeepLabCut/blob/master/AUTHORS\nLicensed under GNU Lesser General Public License v3.0\n\"\"\"\n\nfrom __future__ import print_function\nim...
[ [ "matplotlib.backends.backend_wxagg.FigureCanvasWxAgg", "matplotlib.widgets.RectangleSelector", "matplotlib.figure.Figure" ] ]
KnightZhang625/Project_SentimentAnalysis
[ "e68193b8811a12217f9ae117aafe7f363c9f7caa" ]
[ "show_acc.py" ]
[ "import matplotlib.pyplot as plt\nimport codecs as co\nimport os\nimport sys\nimport numpy as np\n\nif len(sys.argv) > 1:\n LF = sys.argv[1]\nelse: \n LF = './log/loss_record'\nAF = './infer_precision'\n# ADF = './ad_losses'\n# GNG = './gng_losses'\n\nplt.figure(figsize=(22,12))\n\ndef full_arr(arr, target):\...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.subplot", "matplotlib.pyplot.grid", "matplotlib.pyplot.show", "numpy.sum", "matplotlib.pyplot.figure" ] ]
sajjad2014/vq-vae-2-pytorch
[ "ef5f67c46f93624163776caec9e0d95063910eca" ]
[ "pixelsnail_mnist.py" ]
[ "import numpy as np\r\nimport torch\r\nfrom torch import nn, optim\r\nfrom torch.utils.data import DataLoader\r\nfrom torchvision import datasets\r\nfrom tqdm import tqdm\r\n\r\nfrom pixelsnail import PixelSNAIL\r\n\r\n\r\ndef train(epoch, loader, model, optimizer, device):\r\n loader = tqdm(loader)\r\n\r\n c...
[ [ "torch.nn.CrossEntropyLoss", "numpy.array", "torch.utils.data.DataLoader", "torch.from_numpy" ] ]
davidhwyllie/findNeighbour4
[ "d42e10711e59e93ebf0e798fbb1598929f662c9c" ]
[ "findn/rdbmsstore.py" ]
[ "#!/usr/bin/env python\n\"\"\" provides a storage layer for meta-data and snv distances from the\nfindneighbour4 system in a RDBMS\n\nTested with:\n- Oracle Autonomous (ATP and ADW cloud service)\n- Sqlite (but, sqlite can't be used as a server backend)\n\nNot tested:\nMS SQL server, PostgreSQL\n\nTested but doesn'...
[ [ "pandas.DataFrame.from_records", "pandas.DataFrame" ] ]
dlshriver/tensorfuzz
[ "a81df1b9b62f4d3176af35cf545bef16cf65a05f" ]
[ "tensorfuzz/fuzz_utils.py" ]
[ "# Copyright 2018 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 to ...
[ [ "tensorflow.gfile.ListDirectory", "tensorflow.gfile.Open", "tensorflow.get_collection", "scipy.misc.imsave", "numpy.squeeze", "tensorflow.reshape", "numpy.tile", "tensorflow.train.import_meta_graph", "tensorflow.logging.info", "tensorflow.train.MonitoredTrainingSession" ]...
tcbegley/numpyro
[ "e55f0d41c9eba48a10e88fb403a5e016f18857e6" ]
[ "numpyro/util.py" ]
[ "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom collections import OrderedDict\nfrom contextlib import contextmanager\nimport os\nimport random\nimport re\nimport warnings\n\nimport numpy as np\nimport tqdm\nfrom tqdm.auto import tqdm as tqdm_auto\n\nimport jax\nfrom ja...
[ [ "numpy.prod", "numpy.shape", "numpy.random.seed", "numpy.ndim" ] ]
dnacombo/mne-bids
[ "b6f7b80456e207005fb126c7136d7cf30190831c" ]
[ "examples/convert_ieeg_to_bids.py" ]
[ "\"\"\"\n.. currentmodule:: mne_bids\n\n====================================\n08. Convert iEEG data to BIDS format\n====================================\n\nIn this example, we use MNE-BIDS to create a BIDS-compatible directory of iEEG\ndata. Specifically, we will follow these steps:\n\n1. Download some iEEG data fr...
[ [ "numpy.array", "numpy.loadtxt" ] ]
y-mitsui/DensityRatioEstimation
[ "de84b60890e36087f09cdc9215e0a83610d61de5" ]
[ "py_lsif.py" ]
[ "# -*- coding:utf-8 -*-\n# uLSIF\nimport numpy as np\n\nclass LSIF:\n \"\"\"\n Density radio estimation of uLSIF (Sugiyama) using RBF kernel\n r(sample) = P_x(sample) / P_y(sample)\n \n example:\n LSIF(0.3, 0.1).fit(sample_molecule, sample_denominator).predict(sample_new)\...
[ [ "numpy.dot", "numpy.maximum", "numpy.identity", "numpy.array", "numpy.zeros" ] ]
sultansidhu/Graphonomy
[ "6ca8ddf89c4b42a5c9869fe890df9fc807e1d4ce" ]
[ "exp/test/eval_show_cihp2pascal.py" ]
[ "import socket\nimport timeit\nimport numpy as np\nfrom PIL import Image\nfrom datetime import datetime\nimport os\nimport sys\nimport glob\nfrom collections import OrderedDict\n\nsys.path.append(\"../../\")\n# PyTorch includes\nimport torch\nimport pdb\nfrom torch.autograd import Variable\nimport torch.optim as op...
[ [ "torch.nn.functional.upsample", "torch.max", "torch.load", "torch.cat", "torch.utils.data.DataLoader", "torch.from_numpy", "torch.no_grad", "numpy.array", "numpy.zeros", "torch.autograd.Variable" ] ]
jhfong/NeMo
[ "db7a2db5ee4e0e81a5640b1f8ff5e83e993bcb87" ]
[ "nemo/collections/asr/modules/audio_preprocessing.py" ]
[ "# Copyright (c) 2020, NVIDIA CORPORATION. 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 re...
[ [ "torch.no_grad", "torch.randint", "torch.nn.functional.pad", "torch.cat" ] ]
openforcefield/bayes-implicit-solvent
[ "067239fcbb8af28eb6310d702804887662692ec2", "067239fcbb8af28eb6310d702804887662692ec2", "067239fcbb8af28eb6310d702804887662692ec2", "067239fcbb8af28eb6310d702804887662692ec2" ]
[ "bayes_implicit_solvent/continuous_parameter_experiments/automatic_parameterization_figure/rwmh.py", "bayes_implicit_solvent/rjmc_experiments/tree_rjmc2.py", "bayes_implicit_solvent/rjmc_experiments/plot_branching_figure.py", "bayes_implicit_solvent/utils.py" ]
[ "from jax_posterior import log_posterior, grad_log_posterior, sample_prior, get_predictions\nfrom jax import numpy as np\nimport numpy as onp\nfrom bayes_implicit_solvent.samplers import random_walk_mh\n\nif __name__ == '__main__':\n perturbation_sigma = 0.2\n pred_traj_thinning = 50\n #n_steps = 10000\n ...
[ [ "numpy.asarray", "numpy.random.seed", "numpy.random.randint" ], [ "numpy.random.seed" ], [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.figure", "matplotlib.pyplot.plot", "matplotlib.pyplot.subplot", "matplotlib.pyplot.close", "matplotlib.pyplot.xlabel", ...
notplus/thinc
[ "9228eba1a0af20fb0de80970791c601549b40e26" ]
[ "thinc/backends/ops.py" ]
[ "import math\n\nfrom typing import Optional, List, Tuple, Sequence, Union, cast, TypeVar\nfrom typing import Iterator, overload\nimport numpy\nimport itertools\n\nfrom .. import registry\nfrom ..types import Xp, Shape, DTypes, DTypesInt, DTypesFloat, List2d, ArrayXd\nfrom ..types import Array3d, Floats1d, Floats2d,...
[ [ "numpy.asarray", "numpy.random.shuffle" ] ]
jorisvandenbossche/scipy-lecture-notes
[ "689105f90db641eb1e1f82692f4d8b8492e8245d", "689105f90db641eb1e1f82692f4d8b8492e8245d", "689105f90db641eb1e1f82692f4d8b8492e8245d" ]
[ "advanced/image_processing/examples/plot_sharpen.py", "intro/matplotlib/examples/plot_exercice_2.py", "packages/3d_plotting/examples/compute_field.py" ]
[ "import scipy\nfrom scipy import ndimage\nimport matplotlib.pyplot as plt\n\nl = scipy.misc.lena()\nblurred_l = ndimage.gaussian_filter(l, 3)\n\nfilter_blurred_l = ndimage.gaussian_filter(blurred_l, 1)\n\nalpha = 30\nsharpened = blurred_l + alpha * (blurred_l - filter_blurred_l)\n\nplt.figure(figsize=(12, 4))\n\npl...
[ [ "matplotlib.pyplot.imshow", "scipy.misc.lena", "scipy.ndimage.gaussian_filter", "matplotlib.pyplot.subplot", "matplotlib.pyplot.axis", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "numpy.cos", "numpy.linspace", "numpy.sin" ], [ "numpy.square", "...
DingXiaoH/GSM-SGD
[ "992dd0fb31ee47a79cb0891f4f231707abd0c5c6" ]
[ "utils/engine.py" ]
[ "# encoding: utf-8\n\nimport os\nimport os.path as osp\nimport time\nimport torch\nimport torch.distributed as dist\n\nfrom collections import OrderedDict\nfrom utils.pyt_utils import (\n parse_torch_devices, ensure_dir)\nfrom utils.logger import get_logger\n\nfrom utils.checkpoint import load_model\nfrom utils....
[ [ "torch.distributed.init_process_group", "torch.cuda.set_device", "torch.cuda.empty_cache", "torch.distributed.barrier", "torch.from_numpy", "torch.device", "torch.save" ] ]