repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
cambridgeltl/cancer-hallmark-cnn
[ "a1aba55ba425aa0deac4f80c97572a146e4097bb" ]
[ "keras/ltlib/evaluation.py" ]
[ "import numpy as np # TODO remove dependency\n\nfrom collections import namedtuple\nfrom itertools import chain\n\nfrom sklearn import metrics as skmetrics\n\nfrom util import unique\n\nfrom logging import warn\n\nBinaryClassificationCounts = namedtuple('BinaryClassificationCounts',\n ...
[ [ "sklearn.metrics.roc_auc_score", "sklearn.metrics.precision_recall_curve", "numpy.argmax", "sklearn.metrics.average_precision_score", "numpy.average", "numpy.sum" ] ]
Jallet/keras-jl-ac-mean
[ "2bbc1596192fb8c3aefc4a8126482a5283574a59" ]
[ "keras/utils/np_utils.py" ]
[ "from __future__ import absolute_import\nimport numpy as np\nimport scipy as sp\nfrom six.moves import range\nfrom six.moves import zip\n\n\ndef to_categorical(y, nb_classes=None):\n '''Convert class vector (integers from 0 to nb_classes)\n to binary class matrix, for use with categorical_crossentropy.\n '...
[ [ "numpy.log", "numpy.expand_dims", "scipy.log", "scipy.minimum", "scipy.maximum", "numpy.linalg.norm", "numpy.max", "numpy.copy", "numpy.argmax", "numpy.array", "scipy.subtract" ] ]
abraia/abraia-python
[ "e49e3869b2ee7e6b1bcb41e0cc1ae126ac39e202" ]
[ "abraia/hsi.py" ]
[ "import os\nimport wget\nimport tempfile\nimport numpy as np\nimport scipy.io as sio\nimport scipy.ndimage as nd\n\nfrom PIL import Image\nfrom sklearn.svm import SVC\nfrom sklearn.utils import resample\nfrom sklearn.decomposition import PCA\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metric...
[ [ "numpy.amax", "numpy.absolute", "scipy.ndimage.gaussian_filter", "numpy.amin", "sklearn.model_selection.train_test_split", "numpy.dstack", "scipy.ndimage.uniform_filter", "tensorflow.keras.optimizers.Adam", "numpy.argmax", "sklearn.svm.SVC", "numpy.transpose", "nump...
rcelebi/android-elfali
[ "314d9cd9b607460f8bfea80fc828b1521ca18443", "4ea14a58a18356ef9e16aba2e7dae84c02afba12", "4ea14a58a18356ef9e16aba2e7dae84c02afba12", "4ea14a58a18356ef9e16aba2e7dae84c02afba12", "314d9cd9b607460f8bfea80fc828b1521ca18443", "314d9cd9b607460f8bfea80fc828b1521ca18443", "4ea14a58a18356ef9e16aba2e7dae84c02afba1...
[ "jni-build/jni/include/tensorflow/python/training/server_lib_test.py", "jni-build/jni/include/tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py", "jni-build/jni/include/tensorflow/contrib/distributions/python/ops/bijector.py", "jni-build/jni/include/tensorflow/contrib/metrics/python/ops/...
[ "# 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...
[ [ "tensorflow.GPUOptions", "tensorflow.get_default_graph", "tensorflow.Variable", "tensorflow.test.main", "tensorflow.ConfigProto", "tensorflow.initialize_all_variables", "tensorflow.Session", "tensorflow.train.ServerDef", "tensorflow.matmul", "tensorflow.fill", "tensorfl...
Huite/timml
[ "5eb52066be094326343fe26b46555253fef44dc9" ]
[ "timml/model.py" ]
[ "\"\"\"\nModel classes\n\n\"\"\"\n\nimport numpy as np\nimport sys\nimport inspect # Used for storing the input\nfrom .aquifer import Aquifer\nfrom .aquifer_parameters import param_maq, param_3d\nfrom .constant import ConstantStar\nfrom .util import PlotTim\nimport multiprocessing as mp\n\n__all__ = ['Model', 'Mod...
[ [ "numpy.hstack", "numpy.linalg.solve", "numpy.linspace", "numpy.ones", "numpy.atleast_1d", "numpy.array2string", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.empty" ] ]
pearlfranz20/AL_Core
[ "6592079330c7ec3ca264b86f8414970ddab06c0e" ]
[ "apprentice/learners/when_learners/actor_critic.py" ]
[ "import torch\nimport torch.nn as nn\n\n\nclass ValueNet(nn.Module):\n \"\"\"\n The part of the actor critic network that computes the state value. Also,\n returns the hidden layer before state valuation, for use in action network.\n \"\"\"\n\n def __init__(self, n_inputs: int, n_hidden: int = None)...
[ [ "torch.nn.Linear", "torch.nn.ReLU", "torch.cat" ] ]
hakanhp/chanel
[ "6825b60e86c46daabb18f40f1e45d3de2ff8e983", "6825b60e86c46daabb18f40f1e45d3de2ff8e983" ]
[ "tensorflow_model_analysis/eval_saved_model/testutil.py", "tensorflow_model_analysis/eval_saved_model/export.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 ...
[ [ "tensorflow.core.example.example_pb2.Example" ], [ "tensorflow.contrib.learn.utils.saved_model_export_utils.garbage_collect_exports", "tensorflow.Graph", "tensorflow.train.latest_checkpoint", "tensorflow.get_collection", "tensorflow.python.platform.gfile.Rename", "tensorflow.saved_...
MDoid10111/EMNLP2020
[ "97e4da06abc72873a4830cfa53c035a27eb3975b", "97e4da06abc72873a4830cfa53c035a27eb3975b" ]
[ "torch_utils.py", "matchzoo/utils/parse.py" ]
[ "import numpy as np\nimport torch, os\nimport torch.nn.utils.rnn as rnn_utils\nfrom typing import Tuple\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom PIL import Image\nimport torchvision\nfrom torchvision import transforms\n\n\ndef flatten(x):\n '''\n flatten high dimensional tensor x into an ...
[ [ "torch.norm", "torch.cuda.manual_seed", "torch.manual_seed", "numpy.arange", "torch.from_numpy", "numpy.stack", "numpy.random.shuffle", "torch.nn.utils.rnn.pack_padded_sequence", "torch.sort", "numpy.isscalar", "torch.nn.init.xavier_uniform_", "numpy.argsort", "...
kjarczak/balticlsc_module
[ "d104c66fbfeb2147e8a40a0fa5170326843854c5" ]
[ "examples/face_recogniser/content/processing.py" ]
[ "import os\nfrom typing import List, Tuple, Dict\n\nimport face_recognition\n\nfrom matplotlib import pyplot, patches\n\nfrom PIL import Image\n\nimport numpy as np\n\nfrom balticlsc.access.ftp import upload_file, get_connection\nfrom balticlsc.configs.credential.ftp import FTPCredential\nfrom balticlsc.scheme.api ...
[ [ "matplotlib.patches.Rectangle", "matplotlib.pyplot.Axes", "matplotlib.pyplot.savefig", "matplotlib.pyplot.gcf", "matplotlib.pyplot.close", "matplotlib.pyplot.figure" ] ]
waterzxj/UNF
[ "5eda8e7c60116735f595f4b21b24547708b36cf5", "5eda8e7c60116735f595f4b21b24547708b36cf5", "5eda8e7c60116735f595f4b21b24547708b36cf5" ]
[ "UNF/training/metric.py", "UNF/modules/embedding/embedding.py", "UNF/models/predictor.py" ]
[ "#coding:utf-8\n\nimport torch\n\nfrom learner_util import get_ner_BIO\n\n\nclass Metric(object):\n def __call__(self,\n predictions,\n gold_labels,\n mask=None):\n \"\"\"\n metric的抽象类\n\n :params predictions 预测结果的tensor\n :params gold_l...
[ [ "torch.ones_like" ], [ "torch.nn.Dropout", "torch.empty", "torch.nn.Embedding" ], [ "torch.LongTensor" ] ]
sibo/pysimm_tacticity
[ "cfb20851b26b87b736dbb6a2f4c4e7b668d680d5" ]
[ "pysimm/apps/random_walk.py" ]
[ "# ******************************************************************************\n# pysimm.apps.random_walk module\n# ******************************************************************************\n#\n# psuedo random walk algorithm written using pysimm tools\n#\n# **************************************************...
[ [ "numpy.array" ] ]
llimeht/sasview
[ "d0c10746a2397c5021ed8bbc842ba99243a9b0ac" ]
[ "test/sascalculator/utest_sas_gen.py" ]
[ "\"\"\"\nUnit tests for the sas_gen\n\"\"\"\n\nimport os.path\nimport warnings\nwarnings.simplefilter(\"ignore\")\n\nimport unittest\nimport numpy as np\n\nfrom sas.sascalc.calculator import sas_gen\n\n\ndef find(filename):\n return os.path.join(os.path.dirname(__file__), 'data', filename)\n\n\nclass sas_gen_tes...
[ [ "numpy.linspace" ] ]
ddasdkimo/Towards-Realtime-MOT
[ "cfe0e26331969450b6e2a645dfa5c14947514ba5" ]
[ "track.py" ]
[ "import os\r\nimport os.path as osp\r\nimport cv2\r\nimport logging\r\nimport argparse\r\nimport motmetrics as mm\r\n\r\nimport torch\r\nfrom tracker.multitracker import JDETracker\r\nfrom utils import visualization as vis\r\nfrom utils.log import logger\r\nfrom utils.timer import Timer\r\nfrom utils.evaluation imp...
[ [ "torch.from_numpy" ] ]
erikw/taiga_stats
[ "7e28ffff5169707e248be6a4ab6e31326fc2ca85" ]
[ "taiga_stats/helpers.py" ]
[ "import datetime as dt\nimport sys\n\nimport matplotlib\n\nimport taiga_stats.constants as c\n\nmatplotlib.use(\"TkAgg\") # Reference: https://stackoverflow.com/a/48374671/265508\n\n\nDOT_HEADER_FMT = \"\"\"digraph {:s} {{\n labelloc=\"t\";\n //labelfontsize=\"40\"\n label=\"{:s}\";\n //size=\"7.5,10\"\n rati...
[ [ "matplotlib.use" ] ]
mayankj/xView2-Solution
[ "804aa15a3d9f28c7c1d73e50ce0ed0c359a0493e", "804aa15a3d9f28c7c1d73e50ce0ed0c359a0493e" ]
[ "xview/models/unetv2.py", "fit_predict.py" ]
[ "from functools import partial\r\nfrom typing import List, Union, Callable\r\n\r\nimport torch\r\nfrom pytorch_toolbelt.modules import ABN, ACT_RELU, ACT_SWISH\r\nfrom pytorch_toolbelt.modules import encoders as E\r\nfrom pytorch_toolbelt.modules.decoders import DecoderModule\r\nfrom pytorch_toolbelt.modules.encode...
[ [ "torch.nn.ReLU", "torch.nn.Conv2d", "torch.nn.Upsample", "torch.cat" ], [ "torch.utils.data.DataLoader", "torch.cuda.empty_cache" ] ]
adelmuursepp/ML-React-App-Template
[ "d0afed66b8dd037464edc39b1be7709b6207e834" ]
[ "example/iris-data-classifier/ML-React-App-Template/service/model_generator.py" ]
[ "# Import libraries\nimport numpy as np\nprint('imported numpy')\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.tree import DecisionTreeClassifier\nfrom sklearn.externals import joblib\nimport pandas as pd\n\n\n\n\n\n#Otsustuspuud\nfrom sklearn.tree import DecisionTreeClassifier\n\nprint('impor...
[ [ "sklearn.externals.joblib.dump", "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.tree.DecisionTreeClassifier", "sklearn.preprocessing.LabelEncoder" ] ]
Garsiet/MchLE
[ "4afca0328a5710f16fa08f22b38431a6e84e6910" ]
[ "lab-10-2-mnist_nn.py" ]
[ "# Lab 10 MNIST and NN\nimport tensorflow as tf\nimport random\n# import matplotlib.pyplot as plt\n\nfrom tensorflow.examples.tutorials.mnist import input_data\n\ntf.set_random_seed(777) # reproducibility\n\nmnist = input_data.read_data_sets(\"MNIST_data/\", one_hot=True)\n# Check out https://www.tensorflow.org/ge...
[ [ "tensorflow.matmul", "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.cast", "tensorflow.placeholder", "tensorflow.global_variables_initializer", "tensorflow.Session", "tensorflow.train.AdamOptimizer", "tensorflow.set_random_seed", "tensorflow.argmax", "tensor...
bell-one/pifuhd
[ "3221d266a042ad58de702e65e588ada5426b08f6" ]
[ "apps/recon.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n\nimport sys\nimport os\n\nsys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))\nROOT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\nimport time\nimport json \nimport numpy as np\nimport cv...
[ [ "numpy.ones_like", "torch.cat", "torch.load", "numpy.linalg.inv", "torch.from_numpy", "numpy.concatenate", "torch.no_grad", "torch.cuda.is_available", "numpy.zeros" ] ]
rahulgovind/pysph
[ "3d493e6f2c5284ea9c0f0d008e4eb9a0870da0d9", "3d493e6f2c5284ea9c0f0d008e4eb9a0870da0d9", "3d493e6f2c5284ea9c0f0d008e4eb9a0870da0d9" ]
[ "pysph/sph/rigid_body.py", "examples/cpy/axpb_jit.py", "pysph/examples/surface_tension/square_droplet.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Rigid body related equations.\n\"\"\"\nfrom pysph.base.reduce_array import parallel_reduce_array\nfrom pysph.sph.equation import Equation\nfrom pysph.sph.integrator_step import IntegratorStep\nimport numpy as np\nimport numpy\nfrom math import sqrt\n\n\ndef skew(vec):\n import sym...
[ [ "numpy.log", "numpy.sum", "numpy.sqrt" ], [ "numpy.zeros_like", "numpy.linspace" ], [ "numpy.ones_like" ] ]
yoxu515/aot-benchmark
[ "99f74f051c91ac221e44f3edab3534ae4dd233f7", "99f74f051c91ac221e44f3edab3534ae4dd233f7" ]
[ "tools/train.py", "networks/layers/transformer.py" ]
[ "import importlib\nimport random\nimport sys\n\nsys.setrecursionlimit(10000)\nsys.path.append('.')\nsys.path.append('..')\n\nimport torch.multiprocessing as mp\n\nfrom networks.managers.trainer import Trainer\n\n\ndef main_worker(gpu, cfg, enable_amp=True):\n # Initiate a training manager\n trainer = Trainer(...
[ [ "torch.multiprocessing.spawn" ], [ "torch.nn.Dropout", "torch.nn.ModuleList", "torch.nn.LayerNorm", "torch.nn.Linear", "torch.nn.init.xavier_uniform_" ] ]
ghislainp/mishchenko_brf
[ "de7fe70730b53f17fb7e7aa9a45f08bf7d97abd1" ]
[ "tests/test_mishchenko_refllib.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"Tests for `mishchenko_brf` package.\"\"\"\n\nimport numpy as np\n\nfrom mishchenko_brf.lib.refl import brf\n\n\ndef test_brf():\n \"\"\"Sample pytest test function with the pytest fixture as an argument.\"\"\"\n # from bs4 import BeautifulSoup\n # assert 'GitHub' in Beautifu...
[ [ "numpy.array", "numpy.testing.assert_allclose" ] ]
ririw/scipy
[ "680ecf8c52966343827903e6b7983b1ef7323fe2" ]
[ "scipy/sparse/compressed.py" ]
[ "\"\"\"Base class for sparse matrix formats using compressed storage.\"\"\"\nfrom __future__ import division, print_function, absolute_import\n\n__all__ = []\n\nfrom warnings import warn\nimport operator\n\nimport numpy as np\nfrom scipy._lib._util import _prune_array\n\nfrom .base import spmatrix, isspmatrix, Spar...
[ [ "numpy.resize", "numpy.asarray", "numpy.issubdtype", "numpy.cumsum", "numpy.concatenate", "numpy.all", "numpy.unique", "numpy.empty_like", "numpy.arange", "numpy.diff", "numpy.repeat", "numpy.zeros", "numpy.multiply", "numpy.isnan", "numpy.atleast_2d", ...
athatheo/House-GANs-Reproduction
[ "00cc807f1e74f88eef5ed81615bfd87a39c52f94" ]
[ "src/models.py" ]
[ "import torch\nfrom torch import cat\nfrom torch.nn import Conv2d\nfrom torch.nn import Linear\nfrom torch.nn import Module\nfrom torch.nn import ConvTranspose2d\nfrom torch.nn import LeakyReLU\nfrom torch.nn import Tanh\nfrom torch.nn import MaxPool2d\nfrom torch import zeros_like\n\n\nclass ConvMPN(Module):\n ...
[ [ "torch.max", "torch.nn.ConvTranspose2d", "torch.cat", "torch.zeros", "torch.nn.Conv2d", "torch.zeros_like", "torch.nn.Tanh", "torch.nn.Linear", "torch.nn.LeakyReLU", "torch.where" ] ]
dyahadila/ood_cartography
[ "ff65bf2b1a170e2913f0019a15af3398a1808f0f" ]
[ "cartography/classification/glue_utils.py" ]
[ "import logging\nimport os\n\nfrom transformers import glue_compute_metrics\nfrom transformers import glue_convert_examples_to_features as convert_examples_to_features\nfrom transformers import glue_output_modes\nfrom transformers import glue_processors\n\nfrom transformers.data.processors.glue import MnliMismatche...
[ [ "tensorflow.TensorShape", "tensorflow.data.experimental.cardinality" ] ]
Forest216/BigDL
[ "840da9a2eaf395978dd83730b02aa5e5dfbd7989", "840da9a2eaf395978dd83730b02aa5e5dfbd7989", "840da9a2eaf395978dd83730b02aa5e5dfbd7989", "840da9a2eaf395978dd83730b02aa5e5dfbd7989", "840da9a2eaf395978dd83730b02aa5e5dfbd7989", "840da9a2eaf395978dd83730b02aa5e5dfbd7989" ]
[ "python/nano/src/bigdl/nano/automl/tf/objective.py", "python/chronos/src/bigdl/chronos/autots/tspipeline.py", "python/orca/test/bigdl/orca/ray/integration/test_yarn_reinit_raycontext.py", "python/dllib/src/bigdl/dllib/utils/file_utils.py", "python/orca/src/bigdl/orca/data/tf/data.py", "python/dllib/src/bi...
[ "#\n# Copyright 2016 The BigDL 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 ...
[ [ "tensorflow.keras.backend.clear_session", "tensorflow.keras.models.clone_model" ], [ "numpy.concatenate", "torch.cat", "torch.from_numpy", "torch.load" ], [ "numpy.random.seed" ], [ "numpy.array", "numpy.isscalar" ], [ "tensorflow.python.distribute.coordinat...
Khanhnn00/blind_sr_denoise
[ "3153f90d20fd884ab69b47c30c685e0175276055", "3153f90d20fd884ab69b47c30c685e0175276055", "3153f90d20fd884ab69b47c30c685e0175276055" ]
[ "DNCNN/common.py", "DNCNN/networks/__init__.py", "KernelGANFKP/model/model.py" ]
[ "import os\nimport random\nimport numpy as np\nimport scipy.misc as misc\nimport imageio\nfrom tqdm import tqdm\nimport cv2\nfrom PIL import Image\n\nimport torch\nimport torch.nn.functional as F\n\nIMG_EXTENSIONS = ['.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP']\nBINARY_EXTENSION...
[ [ "numpy.ascontiguousarray", "numpy.copy", "numpy.expand_dims", "numpy.transpose" ], [ "torch.nn.init.constant_", "torch.nn.init.normal_", "torch.nn.init.orthogonal_", "torch.cuda.is_available", "torch.nn.DataParallel", "torch.nn.init.kaiming_normal_" ], [ "torch....
tinyrobots/Generalized-PixelVAE
[ "ee99634be08c726c3da7e8ba2675c8d1448e15af" ]
[ "fast_pixel_cnn_pp/test_end_to_end.py" ]
[ "from . import model\nfrom . import fast_nn\n\nimport tensorflow as tf\nimport numpy as np\n\nimport os\nimport unittest\n\n\nclass FastPixelCNNPPEndToEndTest(tf.test.TestCase):\n def test_end_to_end(self):\n with self.test_session() as sess:\n print('Creating model')\n image_size = ...
[ [ "numpy.allclose", "numpy.random.seed", "tensorflow.global_variables", "tensorflow.variables_initializer", "tensorflow.placeholder", "numpy.ones", "tensorflow.train.ExponentialMovingAverage", "tensorflow.make_template", "numpy.prod", "tensorflow.train.Saver", "numpy.load...
zhangyanyu0722/EC523_Project
[ "72673713bb798023e82ccc257e8c05459c34a4b9" ]
[ "carla-data-export/dataexport.py" ]
[ "\"\"\"\nThis file contains all the methods responsible for saving the generated data in the correct output format.\n\n\"\"\"\nimport cv2\nimport numpy as np\nimport os\nimport logging\nfrom utils import degrees_to_radians\nimport json\n\n\ndef save_groundplanes(planes_fname, player_measurements, lidar_height):\n ...
[ [ "numpy.ravel", "numpy.array", "numpy.identity" ] ]
lizhipengTouch/CSA-inpainting
[ "50602607ddc9153af5bfe627e355b0466fc4944f" ]
[ "models/vgg16.py" ]
[ "import torch\nimport torchvision\nfrom torchvision import models\nfrom collections import namedtuple\n\nclass Vgg16(torch.nn.Module):\n def __init__(self, requires_grad=False):\n super(Vgg16, self).__init__()\n vgg_pretrained_features = models.vgg16(pretrained=True).features # 获取预训练vgg网络层\n ...
[ [ "torch.nn.Sequential" ] ]
alphaciel/Balancing-Robot-Raspberry-Pi-DIY
[ "8a61acf688ea0915017c40eaff3841a9b219f9b7" ]
[ "matplotlib/matplotlib_test/plot_lib_test.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nfrom matplotlib.widgets import Slider, Button, RadioButtons\n\nfig = plt.figure()\nax = fig.add_subplot(111)\nfig.subplots_adjust(left=0.25, bottom=0.25)\nmin0 = 0\nmax0 = 25000\n\nim = max0 * np.random.random((10,10))\nim1 = ax.imshow(im)\nfig.colorbar(im1)\n\n...
[ [ "matplotlib.widgets.Slider", "matplotlib.pyplot.show", "numpy.random.random", "matplotlib.pyplot.figure" ] ]
Honghe/AnchorDETR
[ "fc3d45441241cd689b28878d3aa4b0bffb33a8b8" ]
[ "models/transformer.py" ]
[ "# ------------------------------------------------------------------------\n# Copyright (c) 2021 megvii-model. All Rights Reserved.\n# ------------------------------------------------------------------------\n# Modified from Deformable DETR (https://github.com/fundamentalvision/Deformable-DETR)\n# Copyright (c) 20...
[ [ "torch.nn.Dropout", "torch.nn.init.uniform_", "torch.ones", "torch.nn.MultiheadAttention", "torch.cat", "torch.nn.init.constant_", "torch.nn.Embedding", "torch.nn.LayerNorm", "torch.nn.Linear", "torch.arange", "torch.nn.ReLU", "torch.meshgrid" ] ]
SIMEXP/nilearn
[ "4f51aea58f38689ca32c2edd748528d521e6cfb0", "4f51aea58f38689ca32c2edd748528d521e6cfb0", "4f51aea58f38689ca32c2edd748528d521e6cfb0", "4f51aea58f38689ca32c2edd748528d521e6cfb0", "4f51aea58f38689ca32c2edd748528d521e6cfb0" ]
[ "examples/01_plotting/plot_colormaps.py", "nilearn/plotting/surf_plotting.py", "nilearn/plotting/tests/test_html_stat_map.py", "nilearn/plotting/cm.py", "nilearn/decoding/tests/test_tv.py" ]
[ "\"\"\"\nMatplotlib colormaps in Nilearn\n================================\n\nVisualize HCP connectome workbench color maps shipped with Nilearn\nwhich can be used for plotting brain images on surface.\n\nSee :ref:`surface-plotting` for surface plotting details.\n\"\"\"\nimport numpy as np\nimport matplotlib.pyplot...
[ [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.get_cmap", "numpy.ones", "matplotlib.pyplot.subplot", "matplotlib.pyplot.axis", "matplotlib.pyplot.subplots_adjust", "matplotlib.pyplot.figure" ], [ "numpy.nanmax", "numpy.lins...
raznem/sac_ppo
[ "c18e9bd32a70fcc4bc413565c6b885d7560b8b5a" ]
[ "rltoolkit/rl.py" ]
[ "import logging\nfrom pathlib import Path\nfrom typing import Any, Optional, Tuple, Union\n\nimport gym\nimport torch\nimport pickle as pkl\n\nfrom rltoolkit import config, utils\nfrom rltoolkit.buffer import Memory\nfrom rltoolkit.stats_logger import StatsLogger\nfrom rltoolkit.tensorboard_logger import Tensorboar...
[ [ "torch.ones", "torch.zeros", "torch.tensor", "torch.cuda.is_available", "torch.device" ] ]
samggreenberg/pynndescent
[ "f97bc2fe01e4e59c5dad20ed23b9cb47e8182b6c" ]
[ "pynndescent/utils.py" ]
[ "# Author: Leland McInnes <leland.mcinnes@gmail.com>\n#\n# License: BSD 2 clause\n\nimport time\n\nimport numba\nfrom numba.core import types\nimport numba.experimental.structref as structref\nimport numpy as np\n\n\n@numba.njit(\"void(i8[:], i8)\", cache=True)\ndef seed(rng_state, seed):\n \"\"\"Seed the random...
[ [ "numpy.sqrt", "numpy.empty", "numpy.full" ] ]
RonnyLV/PRNet
[ "0c2ded7042ceee2b2f9bba02bc19d91d4c3993c5" ]
[ "prnet/utils/render_app.py" ]
[ "import numpy as np\nfrom prnet.utils.render import vis_of_vertices, render_texture\nfrom scipy import ndimage\n\ndef get_visibility(vertices, triangles, h, w):\n triangles = triangles.T\n vertices_vis = vis_of_vertices(vertices.T, triangles, h, w)\n vertices_vis = vertices_vis.astype(bool)\n for k in r...
[ [ "numpy.squeeze", "scipy.ndimage.binary_closing", "numpy.ones" ] ]
miramirakim227/SwapNeRF_single_GT
[ "55a842ec4155fa782ca1c48b5c6863aeca8ca295" ]
[ "im2scene/camera.py" ]
[ "import numpy as np\nimport torch\nfrom scipy.spatial.transform import Rotation as Rot\nimport pdb \nimport math \n\ndef get_camera_mat(fov=49.13, invert=True):\n # fov = 2 * arctan( sensor / (2 * focal))\n # focal = (sensor / 2) * 1 / (tan(0.5 * fov))\n # in our case, sensor = 2 as pixels are in [-1, 1]\...
[ [ "torch.sin", "torch.zeros", "numpy.cross", "torch.device", "torch.norm", "torch.ones", "torch.eye", "torch.from_numpy", "torch.inverse", "torch.tensor", "torch.rand", "torch.cos", "numpy.tan", "torch.stack", "scipy.spatial.transform.Rotation.from_euler",...
gerritholl/typhon
[ "dbde147be12922ec730bd072dc4797c9da9a6d6b" ]
[ "typhon/retrieval/common.py" ]
[ "from ast import literal_eval\nimport copy\nfrom importlib import import_module\nimport json\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.pipeline import Pipeline\nfrom typhon.utils import to_array\n\n__all__ = [\n 'RetrievalProduct',\n]\n\n\nclass NotTrainedError(Exception):\n \"\"\"Should be rai...
[ [ "numpy.array", "numpy.asscalar", "sklearn.pipeline.Pipeline", "pandas.DataFrame" ] ]
BernhardRiemann/iree
[ "471349762b316f7d6b83eb5f9089255d78052758" ]
[ "integrations/tensorflow/e2e/broadcasting_test.py" ]
[ "# Lint as: python3\n# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl...
[ [ "tensorflow.compat.v2.enable_v2_behavior", "tensorflow.compat.v2.TensorSpec", "tensorflow.compat.v2.test.main" ] ]
mannyray/sort
[ "f0ee0488aa4e7213d30ff50bcb848a843fedde42" ]
[ "python_implementation/example/example7.py" ]
[ "import commonExample\nimport math\nimport sys\nsys.path.insert(0,'..')\nimport generate\nimport constants\nfrom numpy import random\nimport intersection\nfrom PIL import Image, ImageDraw, ImageFont\n\ngif_file=\"example7\"\n\n\nxcoords = [constants.width,constants.width,constants.width,100,400,700,1000,1300]\nycoo...
[ [ "numpy.random.normal" ] ]
FastSense/rosbot-ros2
[ "063c897a16129d9aa88c2c7c52bdf6547af894e4", "063c897a16129d9aa88c2c7c52bdf6547af894e4" ]
[ "ros2_ws/src/utils/logger/logger/logger.py", "ros1_ws/src/hdf5_data_publisher/scripts/hdf5_pcd_publisher.py" ]
[ "import os\nimport pandas as pd\nfrom matplotlib import pyplot as plt\nimport rclpy\nimport numpy as np\n\nfrom rclpy.node import Node\nfrom geometry_msgs.msg import Twist\nfrom nav_msgs.msg import Odometry\nfrom std_srvs.srv import Empty\n\nfrom logger.utils import convert_ros2_time_to_float\nfrom logger.create_gr...
[ [ "numpy.float", "pandas.DataFrame" ], [ "numpy.eye", "numpy.array", "numpy.zeros" ] ]
bgpeyton/QCElemental
[ "2e84cd686d5fff0fc79accb28ffa985de4684704" ]
[ "qcelemental/util/misc.py" ]
[ "import math\nimport re\nfrom typing import Dict, List\n\nimport numpy as np\n\nfrom ..physical_constants import constants\n\n\ndef distance_matrix(a: np.ndarray, b: np.ndarray) -> np.ndarray:\n \"\"\"Euclidean distance matrix between rows of arrays `a` and `b`. Equivalent to\n `scipy.spatial.distance.cdist(a...
[ [ "numpy.einsum", "numpy.degrees", "numpy.linalg.norm", "numpy.arccos", "numpy.arctan2", "numpy.atleast_2d", "numpy.cross", "numpy.zeros" ] ]
DavidHurst/palbolts
[ "72f9ca3f82499b532f14d0e797426e1b425d3efe" ]
[ "conduit/fair/models/gpd.py" ]
[ "\"\"\"Zhang Gradient Projection Debiasing Baseline Model.\"\"\"\nfrom __future__ import annotations\nfrom typing import NamedTuple, cast\n\nimport ethicml as em\nfrom kit import implements\nfrom kit.torch import CrossEntropyLoss, TrainingMode\nimport pandas as pd\nimport pytorch_lightning as pl\nfrom pytorch_light...
[ [ "torch.finfo", "torch.sum", "torch.no_grad", "torch.rand_like" ] ]
Tulioas/dfp_analyser
[ "d66ff94ba0b88a5d421a992ad27661011db36091" ]
[ "primary_info.py" ]
[ "import pandas as pd\nfrom zipfile import ZipFile\nimport numpy as np\nimport re\nimport os\n\n\ndef year_identifier(file_name):\n\n '''\n Abstrait: identify the year of the file\n '''\n\n folder_regex = re.compile(r'20\\d\\d')\n match = folder_regex.search(str(file_name))\n year = match.group()\n...
[ [ "pandas.concat", "pandas.read_csv", "pandas.merge", "pandas.DataFrame", "numpy.array" ] ]
rabbitsun2/toy_python
[ "32f84b4d15b13c4daa4fa212a40e685abc0d2a5d", "32f84b4d15b13c4daa4fa212a40e685abc0d2a5d" ]
[ "practice/3_basic_tensorflow/Keras/Example_simpleLinearRegression.py", "practice/4_basic_tensorflow_2/220404_Pima_indian2.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\nx = np.arange(1, 6)\n\ny = 3 * x + 2\n\nprint(x)\nprint(y)\n\n# 시각화\nplt.plot(x, y)\nplt.title('y = 3x + 2')\nplt.show()\n", "import pandas as pd\n\ndf = pd.read_csv('dataset/pima-indians-diabetes.csv', \n names = [\"pregnant\", \"plasma\", \"pressure\", ...
[ [ "matplotlib.pyplot.plot", "numpy.arange", "matplotlib.pyplot.show", "matplotlib.pyplot.title" ], [ "pandas.read_csv" ] ]
manuelciosici/DeepSpeed
[ "3da841853ca07abf3a09e7bd325a576c4e642c11", "3da841853ca07abf3a09e7bd325a576c4e642c11", "3da841853ca07abf3a09e7bd325a576c4e642c11", "3da841853ca07abf3a09e7bd325a576c4e642c11" ]
[ "deepspeed/runtime/zero/linear.py", "deepspeed/module_inject/replace_module.py", "deepspeed/runtime/utils.py", "deepspeed/runtime/zero/utils.py" ]
[ "#Linear Module to use with ZeRO Stage 3 to allow for parameter memory release\n#after the module execution during forward\n#Instead of saving variables using save_for_backward, we save variable ids\n#Allowing us to retrieve the variable without creating pointer to it\n#Which allows for underlying tensor to be garb...
[ [ "torch.nn.init.uniform_", "torch.Tensor", "torch.distributed.get_rank", "torch.tensor", "torch.nn.init._calculate_fan_in_and_fan_out" ], [ "torch.nn.Parameter", "torch.empty", "torch.cat", "torch.cuda.current_device", "torch.nn.Embedding", "torch.matmul", "torch...
daniel-falk/nnabla
[ "3fe132ea52dc10521cc029a5d6ba8f565cf65ccf", "3fe132ea52dc10521cc029a5d6ba8f565cf65ccf", "3fe132ea52dc10521cc029a5d6ba8f565cf65ccf", "3fe132ea52dc10521cc029a5d6ba8f565cf65ccf", "3fe132ea52dc10521cc029a5d6ba8f565cf65ccf" ]
[ "python/test/function/refs.py", "python/test/experimental/test_tb_graph_writer.py", "python/test/function/test_gru.py", "python/test/function/test_squared_error.py", "python/test/solver/test_momentum.py" ]
[ "# Copyright 2017,2018,2019,2020,2021 Sony Corporation.\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...
[ [ "numpy.ix_", "numpy.linspace", "numpy.asarray", "numpy.arange", "numpy.cos", "numpy.stack", "numpy.ones", "numpy.concatenate", "numpy.sin", "numpy.floor", "numpy.repeat", "numpy.meshgrid", "numpy.zeros" ], [ "numpy.array", "numpy.sin" ], [ "n...
prannayk/MSRASI17
[ "f7277d90ffdd062c1ba94391b7f82c621e619743" ]
[ "models/wc3.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport operator\nimport collections\nimport math\nimport time\nimport os\nimport random\nimport zipfile\nimport time\nimport numpy as np\nimport sys\nfrom six.moves import urllib\nfrom six.moves import x...
[ [ "tensorflow.device", "tensorflow.zeros", "tensorflow.stack", "tensorflow.train.AdamOptimizer", "tensorflow.nn.nce_loss", "tensorflow.Graph", "numpy.save", "tensorflow.Session", "tensorflow.square", "tensorflow.train.Saver", "tensorflow.matmul", "tensorflow.placehold...
ruohoruotsi/pyro
[ "b54a4b42b9474eb3ecee11505e45fde85b1cdc54" ]
[ "pyro/distributions/relaxed_straight_through.py" ]
[ "from __future__ import absolute_import, division, print_function\n\nimport torch\n\nfrom pyro.distributions.torch import RelaxedOneHotCategorical, RelaxedBernoulli\nfrom pyro.distributions.util import copy_docs_from\nfrom torch.distributions.utils import clamp_probs\n\n\n@copy_docs_from(RelaxedOneHotCategorical)\n...
[ [ "torch.Size", "torch.zeros_like", "torch.distributions.utils.clamp_probs" ] ]
tsingqguo/ABA
[ "c32edbbe5705b0332a08951b5ee436b5f58c2e70", "c32edbbe5705b0332a08951b5ee436b5f58c2e70", "c32edbbe5705b0332a08951b5ee436b5f58c2e70" ]
[ "ltr/dataset/lasot.py", "utils/neuron/data/datasets/vot.py", "OSABA/pix2pix/models/copy_network.py" ]
[ "import os\nimport os.path\nimport torch\nimport numpy as np\nimport pandas\nimport csv\nimport random\nfrom collections import OrderedDict\nfrom .base_video_dataset import BaseVideoDataset\nfrom ltr.data.image_loader import jpeg4py_loader\nfrom ltr.admin.environment import env_settings\n\n\nclass Lasot(BaseVideoDa...
[ [ "pandas.read_csv", "torch.tensor" ], [ "numpy.sqrt", "numpy.min", "numpy.linalg.norm", "numpy.max", "numpy.mean", "numpy.array", "numpy.loadtxt" ], [ "torch.nn.Sequential", "torch.nn.functional.softmax", "torch.nn.ConvTranspose2d", "torch.cat", "torc...
anton-potapov/openvino
[ "84119afe9a8c965e0a0cd920fff53aee67b05108", "84119afe9a8c965e0a0cd920fff53aee67b05108", "84119afe9a8c965e0a0cd920fff53aee67b05108", "84119afe9a8c965e0a0cd920fff53aee67b05108", "84119afe9a8c965e0a0cd920fff53aee67b05108", "84119afe9a8c965e0a0cd920fff53aee67b05108" ]
[ "model-optimizer/mo/middle/passes/fusing/decomposition_test.py", "model-optimizer/extensions/back/InterpolateReshape_test.py", "model-optimizer/extensions/middle/ConvToBinaryConv.py", "tools/python_api_reproducer.py", "ngraph/python/test/ngraph/test_ops_unary.py", "model-optimizer/mo/front/onnx/extractors...
[ "\"\"\"\n Copyright (C) 2018-2020 Intel Corporation\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...
[ [ "numpy.array" ], [ "numpy.array" ], [ "numpy.unique", "numpy.ones", "numpy.round", "numpy.array", "numpy.zeros", "numpy.isclose" ], [ "numpy.load", "numpy.savez" ], [ "numpy.logical_not", "numpy.maximum", "numpy.allclose", "numpy.random.seed"...
DottD/pynger
[ "9a24b43a2170234e5059a54ed20329e036260b0a" ]
[ "pynger/fingerprint/FVC_utilities.py" ]
[ "import os\nimport re\nimport io\nimport numpy as np\nimport PIL.Image\nimport typing\nfrom pynger.types import Image, Mask, Field\nfrom pynger.fingerprint.tuning_lro import LROEstimator\nfrom pynger.fingerprint.sampling import convert_to_full, subsample\nfrom pynger.field.manipulation import polar2cart\nfrom pynge...
[ [ "numpy.array", "numpy.empty" ] ]
rhwhite/rhwhitepackages3
[ "91d5677ea57d7cc9a3643708cd8c82a74fb6188d" ]
[ "SSWs.py" ]
[ "# Module to search for and get data on SSWs\n# Using the definition of Charlton and Polvani (2007):\n\n# Author rachel.white@cantab.net\n\n# Created July 2017\n\nimport numpy as np\nimport xarray as xr\nimport math\nimport sys\n\ndef adddays(U,itime,ndays):\n # Find ndays consecutive days with easterlies\n n...
[ [ "numpy.timedelta64", "numpy.datetime64" ] ]
haihabi/GenerativeCRB
[ "d53c01bec7214bb087fbe17dba241e12eb60858e", "d53c01bec7214bb087fbe17dba241e12eb60858e", "d53c01bec7214bb087fbe17dba241e12eb60858e" ]
[ "experiments/analysis/edge_bound/training_nlf/camera_nlf_training.py", "experiments/models_architecture/simple_normalzing_flow.py", "experiments/data_model/doa/doa_signal_generator.py" ]
[ "import torch\nimport numpy as np\nfrom tqdm import tqdm\nfrom torch.utils.data import DataLoader\nfrom experiments.data_model.image_denoising.noise_dataset import NoiseDataSet\nfrom experiments.models_architecture.camera_nlf_flow import generate_nlf_flow\n\n\ndef train_step(in_noise, in_cond_vector):\n opt.zero...
[ [ "torch.permute", "torch.utils.data.DataLoader" ], [ "torch.nn.SiLU", "torch.eye", "torch.zeros" ], [ "torch.linspace", "torch.sin", "torch.zeros", "torch.randn", "torch.unsqueeze", "numpy.sin", "torch.matmul", "torch.pow", "torch.rand", "torch.st...
RelationRx/pyrelational
[ "41ededeff84158bd88b76d39006764de3388c821" ]
[ "pyrelational/models/mcdropout_model.py" ]
[ "import copy\nimport logging\nfrom abc import ABC\nfrom typing import Dict, Optional, Type, Union\n\nimport torch\nfrom pytorch_lightning import LightningModule\nfrom torch.nn.modules import Module\nfrom torch.utils.data import DataLoader\n\nfrom .generic_model import GenericModel\nfrom .lightning_model import Ligh...
[ [ "torch.stack", "torch.no_grad", "torch.cat" ] ]
ravish0007/fairml
[ "bdfb707ff9554c1a789dc8de3926c1ef3cfb1fc8", "bdfb707ff9554c1a789dc8de3926c1ef3cfb1fc8" ]
[ "fairml/tests/test_orthogonal_projection.py", "fairml/utils.py" ]
[ "from __future__ import division\n\n\nimport pytest\nimport numpy as np\nfrom random import randint\n\nfrom fairml.orthogonal_projection import audit_model\nfrom fairml.orthogonal_projection import get_orthogonal_vector\n\nfrom fairml.utils import mse\nfrom fairml.utils import accuracy\nfrom fairml.utils import det...
[ [ "numpy.random.binomial", "numpy.dot", "numpy.random.normal", "numpy.random.uniform" ], [ "numpy.square", "numpy.reshape", "numpy.mean", "numpy.repeat", "numpy.array", "numpy.sum" ] ]
mattboggess/pandas
[ "5551bcf9d297ea8a0aeffb70b17ae6730e8abf89", "5551bcf9d297ea8a0aeffb70b17ae6730e8abf89", "5551bcf9d297ea8a0aeffb70b17ae6730e8abf89", "5551bcf9d297ea8a0aeffb70b17ae6730e8abf89", "5551bcf9d297ea8a0aeffb70b17ae6730e8abf89" ]
[ "pandas/core/indexes/interval.py", "pandas/core/arrays/base.py", "scripts/validate_docstrings.py", "pandas/tests/extension/decimal/array.py", "pandas/tests/reshape/test_pivot.py" ]
[ "\"\"\" define the IntervalIndex \"\"\"\nimport textwrap\nimport warnings\n\nimport numpy as np\n\nfrom pandas.compat import add_metaclass\nfrom pandas.core.dtypes.missing import isna\nfrom pandas.core.dtypes.cast import find_common_type, maybe_downcast_to_dtype\nfrom pandas.core.dtypes.common import (\n ensure_...
[ [ "pandas.tseries.frequencies.to_offset", "pandas.core.common._all_not_none", "numpy.linspace", "pandas.core.dtypes.common.is_datetime64tz_dtype", "pandas._libs.interval.IntervalTree", "pandas.core.indexes.base.Index", "numpy.concatenate", "pandas._libs.interval.Interval", "numpy...
charliezjw/Neural-Signal-Decoder
[ "fb0df09ba0314724c7c90141bd47cc8fb0201b7a" ]
[ "try.py" ]
[ "import numpy as np\nimport tensorflow as tf\n\n# a = tf.placeholder(tf.int32, [None, 3])\n#\n# b = tf.convert_to_tensor(tf.argmax(tf.bincount(a[0])))\n# b = tf.stack([b, tf.argmax(tf.bincount(a[1]))], 0)\n# for i in range(2, 5):\n# max_indx = tf.argmax(tf.bincount(a[i]))\n# b = tf.concat([b, [max_indx]], 0...
[ [ "numpy.asarray", "numpy.zeros", "numpy.bincount", "numpy.equal" ] ]
lcintron/WhoopClient
[ "46ccc6c3e3b98f4b6c82cf8938056d72a22bd6b6" ]
[ "WhoopClient.py" ]
[ "import requests\nimport pandas as pd\nimport numpy as np\nimport configparser\nfrom datetime import datetime\nfrom dateutil import relativedelta, parser, rrule\nfrom dateutil.rrule import WEEKLY\n\n\nclass WhoopClient:\n '''A class to allow a user to login and store their authorization code,\n then perfo...
[ [ "pandas.concat", "pandas.to_datetime", "numpy.isnan", "pandas.json_normalize", "pandas.DataFrame", "pandas.isna" ] ]
swidi/poemo-generation
[ "3a349ac3a6fc3e82b24410013bced60a24c2d8bf", "3a349ac3a6fc3e82b24410013bced60a24c2d8bf", "3a349ac3a6fc3e82b24410013bced60a24c2d8bf" ]
[ "third_party/texar-0.2.0/examples/bert/utils/data_utils.py", "train_emosup.py", "split.py" ]
[ "\"\"\"\nThis is the Data Loading Pipeline for Sentence Classifier Task from\nhttps://github.com/google-research/bert/blob/master/run_classifier.py\n\"\"\"\n# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not us...
[ [ "tensorflow.logging.info", "tensorflow.train.Features", "tensorflow.gfile.Open", "tensorflow.python_io.TFRecordWriter" ], [ "tensorflow.reduce_max", "tensorflow.transpose", "tensorflow.local_variables_initializer", "tensorflow.Variable", "tensorflow.shape", "tensorflow....
simonlevine/x-transformer-icd
[ "17d0a84f8b8e1f69623a82c0afab26830c7a1eb8" ]
[ "app/lib/models.py" ]
[ "\"\"\"deserialize auto-icd models and provide a consistent interface\"\"\"\n\nimport typing as t\nimport json\nimport pickle\nfrom pathlib import Path\nimport numpy as np\nimport onnxruntime as rt\n\nAPP_ROOT = Path(\"./app\")\nASSETS_DIR = APP_ROOT/\"assets\"\n\n\nclass AutoICDModel:\n\n def __init__(self, onn...
[ [ "numpy.array" ] ]
kayaei/pands-problem-set
[ "a7c48059e3024955794c67d9e6f969a42f4e3a6d" ]
[ "plotfunction.py" ]
[ "# Etem Kaya 16-Mar-2019\n\n# Solution to Problem-10.\n# File name: \"plotfunction.py\".\n\n# Problem-10: Write a program that displays a plot of the functions x, x2 & 2x\n# in the range [0, 4].\n\n#Import matplotlib and numpy packages \nimport matplotlib.pyplot as plt\nimport numpy as np\n\n# setup the lenght and ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.plot", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
srio/shadow3-scripts
[ "10712641333c29ca9854e9cc60d86cb321f3762b" ]
[ "ID09/run_wofry_polychromatic_partial_coherence.py" ]
[ "\n\n\n#\n# Import section\n#\nimport numpy\n\nfrom syned.beamline.beamline_element import BeamlineElement\nfrom syned.beamline.element_coordinates import ElementCoordinates\nfrom wofry.propagator.propagator import PropagationManager, PropagationElements, PropagationParameters\n\nfrom wofry.propagator.wavefront1D.g...
[ [ "numpy.radians", "numpy.linspace" ] ]
brianzhang01/tskit
[ "e4d80810e19034cffa77bb14bc0b8d77537103ad" ]
[ "python/tests/test_metadata.py" ]
[ "# -*- coding: utf-8 -*-\n# MIT License\n#\n# Copyright (c) 2018-2019 Tskit Developers\n# Copyright (c) 2017 University of Oxford\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software w...
[ [ "numpy.array_equal" ] ]
mahnooranjum/Python_Programming
[ "ba251e0e855842112efeb968d06458c60eaf1bd3", "ba251e0e855842112efeb968d06458c60eaf1bd3", "ba251e0e855842112efeb968d06458c60eaf1bd3", "ba251e0e855842112efeb968d06458c60eaf1bd3", "ba251e0e855842112efeb968d06458c60eaf1bd3" ]
[ "Misc/d3_heatmap.py", "StatisticalTests_Snippets/U10_PvalWrappers8.py", "Research_Autocolorization/m15_llandmarks2ab.py", "Research_Autocolorization/m6_lhog2ab_n5.py", "Research_Autocolorization/m2_lsift2ab_n7.py" ]
[ "'''\n Mahnoor Anjum\n Python:\n Trivariate Analysis\n'''\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport numpy as np\nimport math\nimport random \nfrom mpl_toolkits.mplot3d import Axes3D\n# sns.set()\n\n\npath = 'data/private/savepath/'\nfilename = 'v3_1'\ngenpath ...
[ [ "pandas.read_csv", "pandas.DataFrame", "matplotlib.pyplot.figure" ], [ "scipy.stats.mannwhitneyu", "pandas.read_csv", "matplotlib.pyplot.subplots" ], [ "matplotlib.pyplot.legend", "pandas.read_csv", "tensorflow.keras.models.Model", "tensorflow.keras.layers.Dense", ...
mtzgroup/aimsprop
[ "464d88ad7a817da73027fd2ab7b12476bf59f83d", "464d88ad7a817da73027fd2ab7b12476bf59f83d" ]
[ "aimsprop/pes.py", "aimsprop/iam/diffraction.py" ]
[ "import numpy as np\n\nfrom .bundle import Bundle\n\n\ndef compute_pes(\n bundle: Bundle,\n carrier_frequency: float,\n alpha: float,\n eKT: np.ndarray,\n) -> Bundle:\n\n \"\"\"Compute the simple photoelectron spectroscopy, with Guassian blurring\n\n User is responsible for calculating and assigni...
[ [ "numpy.where", "numpy.exp", "numpy.zeros_like", "numpy.sqrt" ], [ "numpy.dot", "numpy.sqrt", "numpy.meshgrid", "numpy.arcsin", "numpy.abs", "numpy.eye", "numpy.cos", "numpy.sin", "numpy.zeros_like", "numpy.array", "numpy.sum" ] ]
frssp/pymatgen
[ "5cc42912a12a265a603df7e34c856561f76edc1f", "bdd977f065b66191557c7398b31a1571bc541fdb" ]
[ "dev_scripts/chemenv/equivalent_indices.py", "pymatgen/analysis/diffraction/xrd.py" ]
[ "# coding: utf-8\n# Copyright (c) Pymatgen Development Team.\n# Distributed under the terms of the MIT License.\n\nfrom __future__ import division, unicode_literals\n\n\"\"\"\nDevelopment script of the ChemEnv utility to get the equivalent indices of the model coordination environments\n\"\"\"\n\n__author__ = \"Dav...
[ [ "numpy.mod" ], [ "numpy.abs", "numpy.subtract", "numpy.transpose", "numpy.array", "numpy.exp" ] ]
MostaSchoolOfAI/crab
[ "1c1fc21e902e4ee422ab367d691df16978972f8c" ]
[ "scikits/crab/recommenders/knn/classes.py" ]
[ "\"\"\"\nGeneralized Recommender models.\n\nThis module contains basic memory recommender interfaces used throughout\nthe whole scikit-crab package.\n\nThe interfaces are realized as abstract base classes (ie., some optional\nfunctionality is provided in the interface itself, so that the interfaces\ncan be subclass...
[ [ "numpy.isnan", "numpy.lexsort", "numpy.setdiff1d", "numpy.vectorize", "numpy.array", "numpy.sum" ] ]
Dipeshtamboli/domain-shift
[ "3f29577df6ab7269ad69a5fc651b63ed78708f0b", "3f29577df6ab7269ad69a5fc651b63ed78708f0b" ]
[ "data_statistics.py", "plot_tsne.py" ]
[ "import pdb\r\nimport numpy as np\r\nimport os\r\nimport glob\r\nimport torch\r\nimport torch.nn as nn\r\nimport torchvision.models as models\r\nimport torchvision.transforms as transforms\r\nfrom torch.autograd import Variable\r\nfrom PIL import Image\r\nfrom tqdm import tqdm\r\n\r\nrelative_path = 'datasets/resne...
[ [ "numpy.load", "numpy.zeros", "numpy.unique" ], [ "matplotlib.pyplot.tight_layout", "numpy.unique", "matplotlib.pyplot.savefig", "sklearn.manifold.TSNE", "numpy.load", "numpy.zeros" ] ]
hephaex/probability
[ "740d0db0bf2b1e1a04cfd0b55481c44380b3cb05", "740d0db0bf2b1e1a04cfd0b55481c44380b3cb05", "740d0db0bf2b1e1a04cfd0b55481c44380b3cb05", "740d0db0bf2b1e1a04cfd0b55481c44380b3cb05", "740d0db0bf2b1e1a04cfd0b55481c44380b3cb05", "740d0db0bf2b1e1a04cfd0b55481c44380b3cb05" ]
[ "tensorflow_probability/python/distributions/poisson_lognormal.py", "tensorflow_probability/python/distributions/multivariate_student_t.py", "tensorflow_probability/python/bijectors/transpose.py", "tensorflow_probability/python/monte_carlo/expectation_test.py", "tensorflow_probability/python/bijectors/recip...
[ "# Copyright 2018 The TensorFlow Probability 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 a...
[ [ "tensorflow.convert_to_tensor", "tensorflow.concat", "numpy.sqrt", "tensorflow.zeros", "tensorflow.cast", "tensorflow.random.poisson", "tensorflow.linspace", "tensorflow.reduce_logsumexp", "tensorflow.broadcast_static_shape", "tensorflow.name_scope", "numpy.polynomial.h...
endymecy/NDIToolbox
[ "f7a0a642b4a778d9d0c131871f4bfb9822ecb3da", "f7a0a642b4a778d9d0c131871f4bfb9822ecb3da" ]
[ "models/tests/test_dataio.py", "models/tests/test_preview_window_model.py" ]
[ "\"\"\"test_dataio.py - tests the dataio module\n\nChris R. Coughlin (TRI/Austin, Inc.)\n\"\"\"\n\n__author__ = 'Chris R. Coughlin'\n\nimport unittest\nfrom models import dataio\nfrom controllers import pathfinder\nfrom utils.skiptest import skipIfModuleNotInstalled\nimport h5py\nimport numpy as np\nimport numpy.te...
[ [ "numpy.fromfile", "numpy.array_equal", "numpy.genfromtxt", "numpy.loadtxt", "numpy.load", "numpy.empty" ], [ "numpy.array_equal" ] ]
Kohulan/Decimer-Python
[ "17373e02faedb28ba94742f61001bb3c6b015798" ]
[ "Networks/4_layer_net_Parameter_optimization.py" ]
[ "'''\r\n * This Software is under the MIT License\r\n * Refer to LICENSE or https://opensource.org/licenses/MIT for more information\r\n * Written by Kohulan Rajan\r\n * © 2019\r\n'''\r\n#Parallelized datareading network\r\n\r\nimport tensorflow as tf\r\nimport os\r\nimport sys\r\nimport numpy as np\r\nimport matpl...
[ [ "matplotlib.pyplot.legend", "numpy.amax", "numpy.asarray", "tensorflow.cast", "matplotlib.pyplot.plot", "numpy.mean", "tensorflow.train.AdamOptimizer", "matplotlib.pyplot.gca", "matplotlib.pyplot.gcf", "tensorflow.ConfigProto", "matplotlib.pyplot.subplot", "matplotl...
PyJedi/quantum
[ "3f4a3c320e048b8a8faf3a10339975d2d5366fb6" ]
[ "tensorflow_quantum/core/ops/batch_util_test.py" ]
[ "# Copyright 2020 The TensorFlow Quantum 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# Unl...
[ [ "numpy.arange", "tensorflow.test.main", "numpy.pad", "scipy.stats.entropy" ] ]
maxgreat/dsve-loc
[ "dd6807d02c0d5fd3e215be8e5c7a88e73102e561" ]
[ "text_features_extraction.py" ]
[ "\"\"\"\r\n****************** COPYRIGHT AND CONFIDENTIALITY INFORMATION ******************\r\nCopyright (c) 2018 [Thomson Licensing]\r\nAll Rights Reserved\r\nThis program contains proprietary information which is a trade secret/business \\\r\nsecret of [Thomson Licensing] and is protected, even if unpublished, und...
[ [ "torch.load", "torch.utils.data.DataLoader", "torch.no_grad", "torch.device", "numpy.vstack" ] ]
MIRCen/brukerapi-python
[ "5455800895924c69bf839fa621fa7a06d343b4ff" ]
[ "test/test_jcampdx.py" ]
[ "from brukerapi.jcampdx import JCAMPDX\nimport numpy as np\nfrom pathlib import Path\nimport pytest\n\n@pytest.mark.skip(reason=\"in progress\")\ndef test_jcampdx(test_jcampdx_data):\n\n j = JCAMPDX(Path(test_jcampdx_data[1]) / test_jcampdx_data[0]['path'])\n for key, ref in test_jcampdx_data[0]['parameters']...
[ [ "numpy.array", "numpy.array_equal" ] ]
lkelvinm/OpenAeroStruct
[ "395075d28783c1b99b4ab25ddf034000caf9cd0d", "395075d28783c1b99b4ab25ddf034000caf9cd0d" ]
[ "openaerostruct/structures/section_properties_tube.py", "openaerostruct/structures/wingbox_geometry.py" ]
[ "from __future__ import division, print_function\nimport numpy as np\n\nfrom openmdao.api import ExplicitComponent\n\nclass SectionPropertiesTube(ExplicitComponent):\n \"\"\"\n Compute geometric properties for a tube element.\n The thicknesses are added to the interior of the element, so the\n 'radius' ...
[ [ "numpy.arange", "numpy.zeros", "numpy.ones" ], [ "numpy.arccos", "numpy.zeros", "numpy.sum", "numpy.ones" ] ]
mo-cmyk/wbgapi
[ "a0f8658b7a74ec79256d7b66ff58cb95726e89aa" ]
[ "wbgapi/data.py" ]
[ "\n'''Access World Bank API data\n'''\n\nimport wbgapi as w\ntry:\n import numpy as np\n import pandas as pd\nexcept ImportError:\n np = None\n pd = None\n\ndef fetch(series, economy='all', time='all', mrv=None, mrnev=None, skipBlanks=False, labels=False, skipAggs=False, numericTimeKeys=False, params={}...
[ [ "pandas.Series", "pandas.DataFrame" ] ]
kpoeppel/pytorch_probgraph
[ "b78595ab03bbe92595ad2f6b35f5dd8bf84d6da0" ]
[ "examples/Model_HM_RWS.py" ]
[ "\nimport site\nsite.addsitedir('..')\n\nimport torch\nfrom pytorch_probgraph import BernoulliLayer\nfrom pytorch_probgraph import InteractionLinear\nfrom pytorch_probgraph import HelmholtzMachine\nfrom itertools import chain\nfrom tqdm import tqdm\n\nclass Model_HM_RWS(torch.nn.Module):\n def __init__(self):\n ...
[ [ "torch.optim.Adam", "torch.zeros" ] ]
acmore/ray
[ "9f0f54266064e203b0bdcc9d3fa947cb4518ebc0", "9f0f54266064e203b0bdcc9d3fa947cb4518ebc0", "9f0f54266064e203b0bdcc9d3fa947cb4518ebc0" ]
[ "rllib/utils/torch_ops.py", "rllib/utils/memory.py", "rllib/agents/es/es_torch_policy.py" ]
[ "import numpy as np\n\nfrom ray.rllib.utils import try_import_tree\nfrom ray.rllib.utils.framework import try_import_torch\n\ntorch, _ = try_import_torch()\ntree = try_import_tree()\n\n\ndef explained_variance(y, pred):\n y_var = torch.var(y, dim=[0])\n diff_var = torch.var(y - pred, dim=[0])\n min_ = torc...
[ [ "numpy.asarray" ], [ "numpy.concatenate", "numpy.empty" ], [ "numpy.reshape", "numpy.random.randn", "numpy.prod" ] ]
kanekosh/openconcept
[ "7878e5725eed78a023136b58250361531c7c7654" ]
[ "openconcept/analysis/performance/solver_phases.py" ]
[ "from __future__ import division\nfrom openmdao.api import Group, ExplicitComponent, IndepVarComp, BalanceComp, ImplicitComponent\nimport openconcept.api as oc\nfrom openconcept.analysis.atmospherics.compute_atmos_props import ComputeAtmosphericProperties\nfrom openconcept.analysis.aerodynamics import Lift, StallSp...
[ [ "numpy.sqrt", "numpy.clip", "numpy.arcsin", "numpy.arange", "numpy.isnan", "numpy.less", "numpy.cos", "numpy.sin", "numpy.tan", "numpy.ones", "numpy.flip", "numpy.zeros" ] ]
jialeli1/From-Voxel-to-Point
[ "b4dba9c4e9cd83e04199d9224f6ec7bf06b71f93" ]
[ "pcdet/utils/loss_utils.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\n\nfrom . import box_utils\nfrom . import center_utils\n\ntry:\n from itertools import ifilterfalse\nexcept ImportError: # py3k\n from itertools import filterfalse as ifilterfalse\n...
[ [ "torch.abs", "torch.sigmoid", "torch.norm", "torch.isnan", "torch.nn.functional.l1_loss", "torch.nn.functional.cross_entropy", "torch.from_numpy", "torch.nn.functional.mse_loss", "torch.log", "torch.sort", "torch.where", "torch.nn.functional.smooth_l1_loss", "to...
Bharat-Runwal/path2vec
[ "f99188b882752ff9aa2c87334979b75483940ae0" ]
[ "wsd/graph_wsd_test_v1.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon May 7 17:13:25 2018\n\n@author: dorgham\n\"\"\"\n\nimport networkx as nx\nfrom nltk.corpus import wordnet as wn\nfrom nltk.corpus import wordnet_ic\nfrom nltk.stem import WordNetLemmatizer\nimport matplotlib.pyplot as plt\nimport xml.etree.ElementTree as ET\nfrom co...
[ [ "sklearn.metrics.precision_score", "matplotlib.pyplot.close", "sklearn.metrics.f1_score", "matplotlib.pyplot.show", "sklearn.metrics.recall_score" ] ]
oshapoval/WarpX
[ "84d687da21ee93db67fdc43efec8a9cc80d0e6f9", "84d687da21ee93db67fdc43efec8a9cc80d0e6f9" ]
[ "Examples/Tests/PythonWrappers/PICMI_inputs_2d.py", "Examples/Modules/laser_injection/analysis_2d.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.axes_grid1.axes_divider import make_axes_locatable\nfrom pywarpx import picmi\n\n# Number of time steps\nmax_steps = 100\n\n# Grid\nnx = 128\nnz = 128\n\n# Domain\nxmin = 0.e-6\nzmin = 0.e-6\nxmax = 50.e-6\nzmax = 50.e-6\n\n# Cell size\ndx = (x...
[ [ "numpy.outer", "numpy.array", "matplotlib.pyplot.suptitle", "numpy.abs" ], [ "numpy.fft.fft2", "numpy.cross", "matplotlib.pyplot.tight_layout", "numpy.sqrt", "numpy.arctan", "numpy.linspace", "numpy.meshgrid", "matplotlib.use", "numpy.abs", "numpy.linalg...
hlebars/YoutubeDataAnalysis
[ "0845effcdfdf6ab3281adc25840ed090e47498c8" ]
[ "Script/test.py" ]
[ "import pandas as pd\nimport datetime\nimport numpy as np\nimport os\nimport re\nimport matplotlib.pyplot as plot\n\nimport pytz\n# @timeit (repeat=3,number=10)\n\ndef EclatedSubPlot(SerieAfterGrpBy,ActivatePlotting,ListOfDateAndTime,Abbreviation):\n\n\n DicoDayOfWeek={\n \"00\":('Mon','Monday'), \"01\":(...
[ [ "pandas.to_datetime", "pandas.read_csv", "pandas.DataFrame", "pandas.DatetimeIndex", "matplotlib.pyplot.subplots_adjust", "pandas.to_timedelta", "matplotlib.pyplot.show" ] ]
binnietom/py21cmmc_wv-1
[ "2d5405700c1d99bd5f22c762999aea89d1ca1c23" ]
[ "devel/test_wv.py" ]
[ "from py21cmmc_wv import morlet\nimport numpy as np\n\nbw = 50.0\nnumin = 130.0\nN = 736\nnu = np.arange(N) * bw/N + numin\nmid = (nu[0] + nu[-1])/2\n\nspectrum = np.exp(-(nu-mid)**2/ (2*4.0**2))\n\ntrnsc, fc, _ = morlet.morlet_transform_c(spectrum, nu)\ntrnsc = np.abs(trnsc)**2\n" ]
[ [ "numpy.arange", "numpy.exp", "numpy.abs" ] ]
vgp314/Udacity-Arvato-Identify-Customer-Segments
[ "6be1d4f1eeac391c17c70fdf584bdc4813f80fd8" ]
[ "cluster.py" ]
[ "from sklearn.cluster import KMeans\nfrom sklearn.cluster import MiniBatchKMeans\nimport matplotlib.pyplot as plt\n\n\ndef plot_clustering(data):\n\t'''\n\t\tDefinition:\n\t\t\tThis function plot the squared error for the clustered points\n\t\targs:\n\t\t\tdata to be clusterd\n\t\treturns:\n\t\t\tNone\n\t\t\n\t'''\...
[ [ "sklearn.cluster.KMeans", "matplotlib.pyplot.xlabel", "sklearn.cluster.MiniBatchKMeans", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
tkhe/tkdetection
[ "54e6c112ef2930e755f457e38449736f5743a9ea", "54e6c112ef2930e755f457e38449736f5743a9ea", "54e6c112ef2930e755f457e38449736f5743a9ea" ]
[ "projects/PointRend/point_rend/coarse_mask_head.py", "projects/PointRend/train_net.py", "tkdet/structures/instances.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom tkdet.layers import Conv2d\nfrom tkdet.layers import ShapeSpec\nfrom tkdet.models.roi_head.mask_head import MASK_HEAD_REGISTRY\nfrom tkdet.utils import weight_init\n\n__all__ = [\"CoarseMaskHead\"]\n\n\n@MASK_HEAD_REGISTRY.register()\ncla...
[ [ "torch.nn.init.constant_", "torch.nn.Linear", "torch.nn.init.normal_", "torch.flatten" ], [ "torch.cuda.device_count" ], [ "torch.cat" ] ]
Chicoryn/dream-go
[ "6a4b71d7e1fcc28110ba859c0a2b59c10041c083" ]
[ "contrib/trainer/dream_tf/layers/policy_head.py" ]
[ "# Copyright (c) 2019 Karl Sundequist Blomdahl <karl.sundequist.blomdahl@gmail.com>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitati...
[ [ "tensorflow.cast", "tensorflow.nn.relu", "numpy.array", "tensorflow.reshape" ] ]
eblur/newdust
[ "7e843ae2604a844826606ea04c459694fdd5c178" ]
[ "newdust/graindist/composition/cmdrude.py" ]
[ "import numpy as np\nfrom newdust import constants as c\n\n__all__ = ['CmDrude']\n\nRHO_DRUDE = 3.0 # g cm^-3\nLAM_MAX = c.hc / 0.01 # maximal wavelength that we will allow for RG-Drude\n\nclass CmDrude(object):\n \"\"\"\n | **ATTRIBUTES**\n | cmtype : 'Drude'\n | rho : grain density [g cm^-3]\n...
[ [ "numpy.size", "numpy.power" ] ]
luvrpg/cleverhans
[ "1f2ee7a04cff1ec54c96dcba5294f6e2d7780d42", "1f2ee7a04cff1ec54c96dcba5294f6e2d7780d42" ]
[ "examples/nips17_adversarial_competition/dev_toolkit/sample_defenses/ens_adv_inception_resnet_v2/defense.py", "cleverhans/attacks.py" ]
[ "\"\"\"Implementation of sample defense.\n\nThis defense loads inception resnet v2 checkpoint and classifies all images\nusing loaded checkpoint.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\n\nimport numpy as np\nfrom scipy.m...
[ [ "tensorflow.Graph", "tensorflow.train.Scaffold", "tensorflow.gfile.Open", "tensorflow.flags.DEFINE_string", "tensorflow.train.MonitoredSession", "tensorflow.placeholder", "tensorflow.logging.set_verbosity", "scipy.misc.imread", "tensorflow.argmax", "numpy.zeros", "tenso...
YaoYao1995/mbpo
[ "b9571e469459ce3a632b19dc3fee68c9ac3857b2" ]
[ "mbpo/algorithms/meee.py" ]
[ "## adapted from https://github.com/rail-berkeley/softlearning/blob/master/softlearning/algorithms/sac.py\r\n\r\nimport os\r\nimport math\r\nimport pickle\r\nfrom collections import OrderedDict\r\nfrom numbers import Number\r\nfrom itertools import count\r\nimport gtimer as gt\r\nimport pdb\r\n\r\nimport numpy as n...
[ [ "tensorflow.get_variable", "tensorflow.python.training.training_util._increment_global_step", "tensorflow.keras.models.clone_model", "tensorflow.zeros", "numpy.concatenate", "numpy.mean", "tensorflow.train.AdamOptimizer", "tensorflow.group", "tensorflow.stop_gradient", "num...
RyoTTa/geopm
[ "74246c8ce70ee47f53bc5629638f51c2c391027b" ]
[ "test_integration/geopm_test_integration.py" ]
[ "#!/usr/bin/env python\n#\n# Copyright (c) 2015, 2016, 2017, 2018, 2019, Intel Corporation\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# * Redistributions of source code must retain the above ...
[ [ "pandas.set_option", "pandas.concat", "pandas.DataFrame" ] ]
lilleswing/Reinvent-1
[ "ac4e3e6fa6379c6f4af883478dfd1b3407933ada", "ac4e3e6fa6379c6f4af883478dfd1b3407933ada", "ac4e3e6fa6379c6f4af883478dfd1b3407933ada", "ac4e3e6fa6379c6f4af883478dfd1b3407933ada" ]
[ "running_modes/utils/general.py", "running_modes/transfer_learning/link_invent_actions/collect_stats.py", "running_modes/transfer_learning/link_invent_transfer_learning_runner.py", "running_modes/curriculum_learning/logging/remote_curriculum_logger.py" ]
[ "import time\n\nimport numpy as np\nimport torch\n\n\ndef to_tensor(tensor):\n if isinstance(tensor, np.ndarray):\n tensor = torch.from_numpy(tensor)\n if torch.cuda.is_available():\n return torch.autograd.Variable(tensor).cuda()\n return torch.autograd.Variable(tensor)\n\n\ndef set_default_d...
[ [ "torch.set_default_tensor_type", "torch.from_numpy", "torch.cuda.is_available", "torch.autograd.Variable" ], [ "scipy.stats.entropy", "numpy.histogram", "numpy.sum" ], [ "torch.utils.data.DataLoader" ], [ "numpy.mean" ] ]
Shreyashwaghe/monk_v1
[ "62f34a52f242772186ffff7e56764e958fbcd920", "62f34a52f242772186ffff7e56764e958fbcd920", "62f34a52f242772186ffff7e56764e958fbcd920", "62f34a52f242772186ffff7e56764e958fbcd920", "62f34a52f242772186ffff7e56764e958fbcd920", "62f34a52f242772186ffff7e56764e958fbcd920", "62f34a52f242772186ffff7e56764e958fbcd92...
[ "monk/system_unit_tests/pytorch/test_block_resnet_v2.py", "monk/system_unit_tests/pytorch/test_layer_average_pooling1d.py", "monk/system_unit_tests/gluon/test_layer_max_pooling1d.py", "monk/system_unit_tests/pytorch/test_activation_tanh.py", "monk/system_unit_tests/gluon/test_layer_convolution2d.py", "mon...
[ "import os\nimport sys\nsys.path.append(\"../../../monk/\");\nimport psutil\n\nfrom pytorch_prototype import prototype\nfrom compare_prototype import compare\nfrom common import print_start\nfrom common import print_status\n\nimport torch\nimport numpy as np\nfrom pytorch.losses.return_loss import load_loss\n\n\nde...
[ [ "torch.randn" ], [ "torch.randn" ], [ "numpy.random.rand" ], [ "torch.randn" ], [ "numpy.random.rand" ], [ "torch.randn" ], [ "tensorflow.placeholder" ] ]
teristam/spiketoolk
[ "0ae7adabce46cf620c3627ee0093d890996ef355" ]
[ "spiketoolkit/preprocessing/center.py" ]
[ "from spikeextractors import RecordingExtractor\nfrom .transform import TransformRecording\nimport numpy as np\n\n\nclass CenterRecording(TransformRecording):\n preprocessor_name = 'Center'\n\n def __init__(self, recording, mode, seconds, n_snippets):\n if not isinstance(recording, RecordingExtractor):...
[ [ "numpy.median", "numpy.mean" ] ]
DoubleE1/Keras-GAN
[ "775eb82b18cb146203295f19c937d4290de2953f", "775eb82b18cb146203295f19c937d4290de2953f" ]
[ "dcgan/mnist/InceptionScore.py", "dcgan/cifar10/dcgan_cifar10.py" ]
[ "# calculate inception score for cifar-10 in Keras\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom math import floor\nfrom numpy import ones, expand_dims, log, mean, std, exp\nfrom numpy.random import shuffle\nfrom keras.applications.inception_v3 import InceptionV3, preprocess_input\nfrom keras.datasets ...
[ [ "numpy.log", "numpy.asarray", "numpy.std", "numpy.mean", "numpy.exp" ], [ "matplotlib.pyplot.subplots", "numpy.ones", "numpy.random.normal", "matplotlib.pyplot.close", "numpy.add", "numpy.zeros", "numpy.vstack", "numpy.random.randint" ] ]
kaylode/Custom-Template
[ "b2f11bfacf2b03b793476a19781f9046fab6fd82", "b2f11bfacf2b03b793476a19781f9046fab6fd82", "b2f11bfacf2b03b793476a19781f9046fab6fd82", "b2f11bfacf2b03b793476a19781f9046fab6fd82" ]
[ "theseus/utilities/cuda.py", "theseus/classification/metrics/projection.py", "configs/semantic/infer.py", "theseus/base/trainer/supervised_trainer.py" ]
[ "\"\"\" CUDA / AMP utils\nHacked together by / Copyright 2020 Ross Wightman\n\"\"\"\nimport torch\nfrom typing import Any\nfrom theseus.utilities.loggers.observer import LoggerObserver\n\nLOGGER = LoggerObserver.getLogger('main')\n\ndef get_devices_info(device_names=\"0\"):\n\n if device_names.startswith('cuda')...
[ [ "torch.device", "torch.cuda.get_device_properties", "torch.is_tensor", "torch.cuda.is_available" ], [ "numpy.load", "numpy.stack", "numpy.save" ], [ "matplotlib.use", "torch.no_grad" ], [ "torch.cuda.synchronize", "torch.no_grad", "torch.cuda.amp.autocas...
wangx1996/CenterPillarNet
[ "4be3d53265b8ecb1f9572612fa87f7acd8c57669", "4be3d53265b8ecb1f9572612fa87f7acd8c57669" ]
[ "src/config/train_config.py", "src/evaluatefile.py" ]
[ "\"\"\"\n# -*- coding: utf-8 -*-\n-----------------------------------------------------------------------------------\n# Author: Nguyen Mau Dung\n# DoC: 2020.08.17\n# email: nguyenmaudung93.kstn@gmail.com\n-----------------------------------------------------------------------------------\n# Description: The config...
[ [ "torch.device", "torch.cuda.device_count" ], [ "numpy.amax", "numpy.sqrt", "torch.load", "numpy.concatenate", "numpy.max", "numpy.zeros_like", "torch.no_grad", "numpy.reshape", "numpy.sin", "torch.tensor", "numpy.min", "numpy.amin", "numpy.linalg.inv...
alimuldal/scipy
[ "713cf7df7b759e2aaeef0f81eb632f48c9b4bae0" ]
[ "scipy/special/__init__.py" ]
[ "\"\"\"\n========================================\nSpecial functions (:mod:`scipy.special`)\n========================================\n\n.. module:: scipy.special\n\nNearly all of the functions below are universal functions and follow\nbroadcasting and automatic array-looping rules. Exceptions are noted.\n\nError h...
[ [ "numpy.dual.register_func", "numpy.testing.Tester" ] ]
pradip026/passengerCOVIDscan
[ "1ebbe23beb91963679a97d8e9fe45354c47bbbff" ]
[ "passengerCOVIDscan/glove_detection/tensorflow_infer.py" ]
[ "# -*- coding:utf-8 -*-\nimport cv2\nimport time\nimport argparse\nimport os\nimport numpy as np\nfrom PIL import Image\n#from keras.models import model_from_json\nfrom .utils.anchor_generator import generate_anchors\nfrom .utils.anchor_decode import decode_bbox\nfrom .utils.nms import single_class_non_max_suppress...
[ [ "numpy.max", "numpy.expand_dims", "numpy.argmax" ] ]
KokBob/InitProject
[ "63b7cefb9a130118db9ff5405c5dd87bbe34e9f3" ]
[ "data_postprocessing_10.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\n20181010\r\nciklaminima\r\n\"\"\"\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport os \r\nimport pandas as pd\r\nimport _dataPostprLib_ as lib\r\nimport seaborn as sns\r\nimport importlib \r\n#%%\r\nsns.set()\r\n#sns.set_context(\"poster\")\r\nsns.set_context(...
[ [ "pandas.read_csv", "matplotlib.pyplot.close" ] ]