repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
Nstats/cs_capsule
[ "e45a8518a41117d4b5f105bcc2c96a3d621e40ea" ]
[ "examples/evaluate.py" ]
[ "#*#*#*./examples/evaluate.py\n\"\"\"Official evaluation script for SQuAD version 2.0.\n\nIn addition to basic functionality, we also compute additional statistics and\nplot precision-recall curves if an additional na_prob.json file is provided.\nThis file is expected to map question ID's to the model's predicted p...
[ [ "numpy.ones_like", "matplotlib.pyplot.title", "matplotlib.pyplot.ylim", "matplotlib.use", "matplotlib.pyplot.step", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlim", "matplotlib.pyplot.clf", "matplotlib.pyplot.fill_between", "matplotlib.pyplot.xlabel", "matplotlib....
yeralin/qiskit-terra
[ "251930a7b5d83af121ea0f3aafb33a54a1860e14", "251930a7b5d83af121ea0f3aafb33a54a1860e14", "251930a7b5d83af121ea0f3aafb33a54a1860e14", "251930a7b5d83af121ea0f3aafb33a54a1860e14" ]
[ "qiskit/circuit/library/standard_gates/s.py", "qiskit/circuit/library/standard_gates/rx.py", "qiskit/extensions/quantum_initializer/uc.py", "test/python/quantum_info/test_pauli.py" ]
[ "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any modifications or ...
[ [ "numpy.array" ], [ "numpy.array", "numpy.cos", "numpy.sin" ], [ "numpy.sqrt", "numpy.ones", "numpy.linalg.det", "numpy.binary_repr", "numpy.exp", "numpy.array", "numpy.flip", "numpy.conjugate" ], [ "numpy.asarray", "numpy.array" ] ]
krumo/SPIN
[ "0e2f17e70f06de46e062683ea6d5b233eeaa73c1" ]
[ "spin/models/smpl.py" ]
[ "import torch\nimport numpy as np\nimport smplx\nfrom smplx import SMPL as _SMPL\nfrom smplx.body_models import ModelOutput\nfrom smplx.lbs import vertices2joints\n\nimport spin.config as config\nimport spin.constants as constants\n\nclass SMPL(_SMPL):\n \"\"\" Extension of the official SMPL implementation to su...
[ [ "numpy.load", "torch.cat", "torch.tensor" ] ]
yketa/UBC---Spring-2018---code
[ "b065544639a483dda48cda89bcbb11c1772232aa" ]
[ "analysis/coarse_graining.py" ]
[ "\"\"\"\nModule coarse_graining implements a Gaussian coarse-graining adapted from\nIlling et al., Phys. Rev. Lett. 117, 208002 (2016) following Goldhirsch and\nGoldenberg, Eur. Phys. J. E 9, 245–251 (2002).\n\"\"\"\n\nimport numpy as np\n\nclass GaussianCG:\n \"\"\"\n Gaussian coarse-graining.\n \"\"\"\n\...
[ [ "numpy.array", "numpy.exp", "numpy.sum" ] ]
Nexuscompute/Cirq
[ "640ef8f82d6a56ec95361388ce7976e096cca906", "640ef8f82d6a56ec95361388ce7976e096cca906", "640ef8f82d6a56ec95361388ce7976e096cca906", "640ef8f82d6a56ec95361388ce7976e096cca906", "640ef8f82d6a56ec95361388ce7976e096cca906" ]
[ "cirq-core/cirq/work/observable_measurement_data_test.py", "cirq-core/cirq/neutral_atoms/neutral_atom_devices.py", "cirq-core/cirq/ops/global_phase_op.py", "cirq-core/cirq/sim/density_matrix_simulator_test.py", "examples/bb84.py" ]
[ "# Copyright 2020 The Cirq Developers\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 o...
[ [ "numpy.testing.assert_equal", "numpy.sqrt", "numpy.asarray", "numpy.random.RandomState", "numpy.array", "numpy.vstack" ], [ "numpy.sqrt" ], [ "numpy.array" ], [ "numpy.diag", "numpy.testing.assert_equal", "numpy.random.random", "numpy.allclose", "num...
alexcornier/INSEE
[ "a5dc6e1267834754ac1cd1331203b5e835828946" ]
[ "request.py" ]
[ "#================================================================\n# Ensemble de requêtes SQL sur une base de données SQL\n# hébergées sur un serveur local postgresql\n#\n# Modules pythons nécessaires\n# psycopg2 (SQL connection)\n# pandas (DataFrame et HTML)\n# matplotlib\n# jinja2 (styles HTML)\n#\n# Ale...
[ [ "pandas.to_numeric", "pandas.DataFrame" ] ]
myelintek/results
[ "11c38436a158c453e3011f8684570f7a55c03330", "11c38436a158c453e3011f8684570f7a55c03330", "11c38436a158c453e3011f8684570f7a55c03330", "11c38436a158c453e3011f8684570f7a55c03330", "11c38436a158c453e3011f8684570f7a55c03330", "11c38436a158c453e3011f8684570f7a55c03330", "11c38436a158c453e3011f8684570f7a55c0333...
[ "v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/t2t/tensor2tensor/utils/metrics_hook_test.py", "v0.5.0/google/cloud_v3.8/ssd-tpuv3-8/code/ssd/model/tpu/models/official/amoeba_net/model_builder.py", "v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/t2t/tensor2tensor/models/revnet.py", "v0...
[ "# coding=utf-8\n# Copyright 2018 The Tensor2Tensor Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requir...
[ [ "tensorflow.get_variable", "tensorflow.assign_add", "tensorflow.test.main", "tensorflow.train.create_global_step", "tensorflow.train.MonitoredTrainingSession", "tensorflow.summary.scalar", "tensorflow.test.get_temp_dir" ], [ "tensorflow.cond", "tensorflow.nn.relu", "ten...
stillmatic/PyTorch-BigGraph
[ "d7d6576281faa54ec5850e204ffc07b1268fdb04" ]
[ "torchbiggraph/train_cpu.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE.txt file in the root directory of this source tree.\n\nimport logging\nimport math\nimport time\nfrom collections import defaul...
[ [ "torch.Generator", "torch.nn.Parameter", "torch.randint", "torch.randperm", "torch.distributed.barrier", "torch.distributed.is_available", "torch.FloatTensor" ] ]
EricRemmerswaal/tensorflow
[ "141ff27877579c81a213fa113bd1b474c1749aca", "141ff27877579c81a213fa113bd1b474c1749aca", "141ff27877579c81a213fa113bd1b474c1749aca", "141ff27877579c81a213fa113bd1b474c1749aca", "141ff27877579c81a213fa113bd1b474c1749aca", "141ff27877579c81a213fa113bd1b474c1749aca", "141ff27877579c81a213fa113bd1b474c1749ac...
[ "tensorflow/python/ops/ragged/ragged_getitem_test.py", "tensorflow/python/framework/sparse_tensor_test.py", "tensorflow/python/training/tracking/resource.py", "tensorflow/python/distribute/cluster_resolver/kubernetes_cluster_resolver.py", "tensorflow/python/tpu/tpu_embedding_v2.py", "tensorflow/python/fra...
[ "# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.eager.context.executing_eagerly", "tensorflow.python.ops.ragged.ragged_tensor.RaggedTensor.from_nested_row_splits", "tensorflow.python.ops.ragged.ragged_factory_ops.constant", "tensorflow.python.platform.googletest.main", "tensorflow.python.ops.ragged.ragged_tensor.RaggedTen...
ChenjunZou/katib
[ "6a07daae796c29d24f63375cce71b75c4eee8d9c", "6a07daae796c29d24f63375cce71b75c4eee8d9c" ]
[ "examples/v1alpha3/nas/darts-cnn-cifar10/model.py", "pkg/suggestion/v1alpha3/bayesianoptimization/global_optimizer.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom operations import FactorizedReduce, StdConv, MixedOp\n\n\nclass Cell(nn.Module):\n \"\"\" Cell for search\n Each edge is mixed and continuous relaxed.\n \"\"\"\n\n def __init__(self, num_nodes, c_prev_prev, c_prev, c_cur, reduct...
[ [ "torch.nn.functional.softmax", "torch.cat", "torch.randn", "torch.nn.ModuleList", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.AdaptiveAvgPool2d", "torch.nn.ParameterList", "torch.nn.BatchNorm2d" ], [ "numpy.mod", "numpy.zeros", "numpy.random.rand" ] ]
enourbakhsh/skylink
[ "83270f3351ff637abeb0af25786412d4dd09134a" ]
[ "tests/test_networkx.py" ]
[ "import os\nimport skylink\nfrom skylink import testing\nimport numpy as np\nfrom astropy.table import Table\nimport FoFCatalogMatching\nimport pytest # noqa\n\n# TODO: test the matching with more than two catalogs\n# TODO: test N-way matching with `linking_lengths` as a dictionary\n# TODO: test if we catch illega...
[ [ "numpy.random.uniform", "numpy.repeat", "numpy.random.seed" ] ]
radiantprism/StarCraft-2
[ "1f159ae84feaed17c5e0bd70e272c06992ae0c48", "1f159ae84feaed17c5e0bd70e272c06992ae0c48" ]
[ "pysc2/lib/features_test.py", "pysc2/lib/renderer_human.py" ]
[ "#!/usr/bin/python\n# 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# Unl...
[ [ "numpy.array", "numpy.random.randint" ], [ "numpy.array" ] ]
ccoulombe/thinc
[ "8d891b61ddef3ca00266ca0ec7c47e2d063a3a83" ]
[ "examples/wrap_pytorch.py" ]
[ "import plac\nimport numpy\n\nimport torch\nfrom torch import autograd\nfrom torch import nn\nimport torch.optim\nimport torch.cuda\nfrom thinc.neural.ops import CupyOps\n\nfrom thinc.extra.wrappers import PyTorchWrapper\nfrom thinc.v2v import Model\n\n\ndef main(length=1000, nO=32, nI=32):\n if CupyOps.xp != No...
[ [ "torch.nn.Linear", "torch.set_default_tensor_type" ] ]
mdraw/AlphaPose
[ "bed8e0798f6deed4789b9ae2646f72b9fd138c5b" ]
[ "video_demo.py" ]
[ "import torch\nfrom torch.autograd import Variable\nimport torch.nn.functional as F\nimport torchvision.transforms as transforms\n\nimport torch.nn as nn\nimport torch.utils.data\nimport numpy as np\nfrom opt import opt\n\nfrom dataloader import VideoLoader, DetectionLoader, DetectionProcessor, DataWriter, Mscoco\n...
[ [ "torch.multiprocessing.set_start_method", "torch.cat", "torch.no_grad", "numpy.mean", "torch.multiprocessing.set_sharing_strategy" ] ]
aiedward/OCR-1
[ "82ce764fb0071917360ea8b1ec5372035d0897b5" ]
[ "ctpn/show_model.py" ]
[ "from tensorflow.python import pywrap_tensorflow\ncheckpoint_path = 'checkpoints/VGGnet_fast_rcnn_iter_50000.ckpt'\nreader = pywrap_tensorflow.NewCheckpointReader(checkpoint_path)\nvar_to_shape_map = reader.get_variable_to_shape_map()\nfor key in var_to_shape_map:\n print(\"tensor_name: \", key)\n" ]
[ [ "tensorflow.python.pywrap_tensorflow.NewCheckpointReader" ] ]
fligt/inktime
[ "45f20602ef07cc8f62e0192318913cf910eb925b" ]
[ "inktime/rgbkm.py" ]
[ "# AUTOGENERATED! DO NOT EDIT! File to edit: notebooks/00_rgbkm.ipynb (unless otherwise specified).\n\n__all__ = ['reflectance']\n\n# Cell\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.cm as cm\nimport cv2\n\nimport scipy.optimize as optimize\n\n\ndef reflectance(K, S, D, Rg):\n '''Calc...
[ [ "numpy.sqrt", "numpy.clip", "numpy.ones", "numpy.array", "numpy.exp" ] ]
beldonl/gpkit
[ "4c422d3f3b65b85f5baacc36305064aee4341ebe" ]
[ "gpkit/constraints/sgp.py" ]
[ "\"\"\"Implement the SequentialGeometricProgram class\"\"\"\nfrom time import time\nfrom collections import OrderedDict\nimport numpy as np\nfrom ..exceptions import InvalidGPConstraint, Infeasible, UnnecessarySGP\nfrom ..keydict import KeyDict\nfrom ..nomials import Variable\nfrom .gp import GeometricProgram\nfrom...
[ [ "numpy.exp" ] ]
romain-fontugne/roa-counter
[ "35413f036a0a75088ae318dfa3df58b3cbce6095" ]
[ "count.py" ]
[ "from datetime import datetime\nfrom matplotlib import pylab as plt\nfrom requests_cache import CachedSession\n\nCACHE_EXPIRATION_SECS = 3600*24*356\nYEAR_RANGE = range(2018, 2022)\nMARKERS = [\"o\", \"s\", \"d\", \"+\", \"*\"]\n\nRIRS = {\n 'AFRINIC': {\n 'url': 'https://ftp.ripe.net/ripe/rpki/af...
[ [ "matplotlib.pylab.tight_layout", "matplotlib.pylab.grid", "matplotlib.pylab.xticks", "matplotlib.pylab.figure", "matplotlib.pylab.ylabel", "matplotlib.pylab.plot", "matplotlib.pylab.legend", "matplotlib.pylab.savefig" ] ]
NagisaZj/ProMP
[ "539739ae2b7d5fdcad00855da695f643b23df4b3", "539739ae2b7d5fdcad00855da695f643b23df4b3" ]
[ "rlkit/torch/networks.py", "pro-mp_run_cheetah.py" ]
[ "\"\"\"\nGeneral networks for pytorch.\n\nAlgorithm-specific networks should go else-where.\n\"\"\"\nimport torch\nfrom torch import nn as nn\nfrom torch.nn import functional as F\n\nfrom rlkit.policies.base import Policy\nfrom rlkit.torch import pytorch_util as ptu\nfrom rlkit.torch.core import PyTorchModule\nfrom...
[ [ "torch.nn.Sequential", "torch.nn.functional.softmax", "torch.nn.LSTM", "torch.cat", "torch.zeros", "torch.nn.Linear", "torch.bmm", "torch.nn.Conv1d", "torch.triu" ], [ "numpy.prod" ] ]
ShellySrivastava/Machine-Learning
[ "bfdea30c06abe4228c103ae525adcf990015983f" ]
[ "ML_CW1/assgn_1_part_1/2_multiple_variables/plot_cost.py" ]
[ "import matplotlib.pyplot as plt\nimport os\n\ndef plot_cost(cost):\n \n fig, ax1 = plt.subplots()\n ax1.set_xlabel('Iterations')\n ax1.set_ylabel('Cost')\n plt.plot(cost)\n fig.tight_layout()\n plot_filename = os.path.join(os.getcwd(), 'figures', 'cost.png')\n plt.savefig(plot_filename)\n ...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig" ] ]
e2thenegpii/EnergyCalc
[ "6036b08d01eafae33e80e8754c0e0215c78db6fe" ]
[ "src/TOU.py" ]
[ "from enum import Enum\n\nfrom datetime import datetime, date\nfrom dateutil.relativedelta import relativedelta, MO\nimport argparse\nimport holidays\nimport pandas as pd\n\nclass BGEHolidays(holidays.HolidayBase):\n def _populate(self, year):\n holidays.UnitedStates._populate(self, year)\n\n # Rem...
[ [ "pandas.read_csv" ] ]
AshwinRameshP/AttendanceSystem_FaceRecognition
[ "23c590c10ac296816d7cff23445d28c3863d0138" ]
[ "FRAMS_STUDENT.py" ]
[ "import tkinter as tk\nfrom tkinter import *\nimport cv2\nimport csv\nimport os\nimport numpy as np\nfrom PIL import Image,ImageTk\nimport pandas as pd\nimport datetime\nimport time\n\n\n##Error screen2\ndef del_sc2():\n sc2.destroy()\ndef err_screen1():\n global sc2\n sc2 = tk.Tk()\n sc2.geometry('300x...
[ [ "pandas.read_csv", "pandas.DataFrame" ] ]
hanneshapke/text
[ "8bebbbe28749de5509be474bc475cef83490f013" ]
[ "tensorflow_text/python/ops/bert_tokenizer.py" ]
[ "# coding=utf-8\n# Copyright 2020 TF.Text 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 appl...
[ [ "tensorflow.python.ops.lookup_ops.TextFileIdTableInitializer", "tensorflow.python.ops.lookup_ops.StaticVocabularyTableV1", "tensorflow.python.ops.array_ops.expand_dims", "tensorflow.python.ops.string_ops.regex_replace" ] ]
riotu-lab/tf2trt_with_onnx
[ "f9828ed99af5530836bf6ee608e631502dfb0f02" ]
[ "inference.py" ]
[ "import tensorrt as trt\nimport pycuda.driver as cuda\nimport numpy as np\nimport pycuda.autoinit \n\ndef allocate_buffers(engine, batch_size, data_type):\n\n \"\"\"\n This is the function to allocate buffers for input and output in the device\n Args:\n engine : The path to the TensorRT engine. \n b...
[ [ "numpy.copyto", "numpy.asarray" ] ]
adines/imagepy
[ "d7cdf3273d25e06046626ef2ef9200b1846ea49a", "d7cdf3273d25e06046626ef2ef9200b1846ea49a" ]
[ "imagepy/menus/File/Import/roi_plg.py", "imagepy/menus/Process/Hydrology/hydrology_plgs.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on 12/21/2018\n@author: BioinfoTongLI\n\"\"\"\nimport numpy as np\nimport read_roi\nfrom imagepy.core.engine import Free\nfrom imagepy import IPy\nfrom skimage.draw import polygon\n\nclass Plugin(Free):\n \"\"\"load_ij_roi: use read_roi and th pass to shapely objects\"\"...
[ [ "numpy.zeros" ], [ "numpy.maximum", "scipy.ndimage.gaussian_filter", "numpy.multiply", "numpy.minimum", "numpy.ones", "numpy.zeros_like" ] ]
bagustris/emotion
[ "5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36", "5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36", "5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36", "5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36" ]
[ "ertk/stats.py", "scripts/results/view_history.py", "ertk/tensorflow/utils.py", "scripts/utils/combine_datasets.py" ]
[ "from functools import partial\nfrom typing import Callable, List, Union\n\nimport numpy as np\nimport pandas as pd\nfrom scipy.stats import friedmanchisquare, rankdata\nfrom sklearn.metrics.pairwise import pairwise_distances\nfrom statsmodels.stats.libqsturng import qsturng\n\nMatrix = List[List[float]]\n\n\ndef f...
[ [ "numpy.sqrt", "numpy.unique", "numpy.linalg.inv", "numpy.linalg.slogdet", "numpy.matmul", "numpy.seterr", "numpy.max", "numpy.cov", "numpy.mean", "numpy.bincount", "numpy.linalg.pinv", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.empty" ], [ ...
sdickler/FINE
[ "3114fd009e80a7eadacffe26bf5ff8e6a126ac61" ]
[ "FINE/expansionModules/robustPipelineSizing.py" ]
[ "\"\"\"\nLast edited: January 20 2020\n\n|br| @author: FINE Developer Team (FZJ IEK-3) \\n\\n\nThe approaches used are described in\nRobinius et. al. (2019) \"Robust Optimal Discrete Arc Sizing for Tree-Shaped Potential Networks\"\nand they are further developed with the help of\nTheorem 10 of Labbé et. al. (2019) ...
[ [ "pandas.concat", "scipy.optimize.fsolve", "pandas.Series", "numpy.sqrt", "matplotlib.pyplot.subplots", "pandas.DataFrame", "matplotlib.pyplot.Normalize", "numpy.round", "numpy.log10", "numpy.floor", "matplotlib.cm.get_cmap", "numpy.exp", "matplotlib.pyplot.show"...
ydai94/tdqn
[ "83c66263cb47016414dbe47ad3b252bb9e681ca8" ]
[ "drrn/drrn.py" ]
[ "import pickle\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom os.path import join as pjoin\nfrom memory import ReplayMemory, Transition, State\nfrom model import DRRN\nfrom util import *\nimport logger\nimport sentencepiece as spm\n\n\ndevice = torch.device(\"cuda\" if torch.cuda.is_ava...
[ [ "torch.tensor", "torch.cuda.is_available", "torch.cat" ] ]
dustalov/mnogoznal
[ "bacea1576d31e0d2ad5456159a57950899a116f6" ]
[ "mnogoznal/wsd.py" ]
[ "import abc\nimport csv\nfrom collections import namedtuple, defaultdict, OrderedDict, Counter\n\nimport numpy as np\nfrom sklearn.feature_extraction import DictVectorizer\nfrom sklearn.feature_extraction.text import TfidfTransformer\nfrom sklearn.metrics.pairwise import cosine_similarity as sim\nfrom sklearn.pipel...
[ [ "sklearn.feature_extraction.DictVectorizer", "sklearn.feature_extraction.text.TfidfTransformer", "sklearn.metrics.pairwise.cosine_similarity" ] ]
HabibMrad/uncertainty
[ "1646a9b07d1179045dd0375149250d5ac7501004", "1646a9b07d1179045dd0375149250d5ac7501004" ]
[ "project/systems/ecgresnet_ensemble_auxout.py", "project/systems/ecgresnet_ssensemble.py" ]
[ "import sys\nimport os\nimport torch\nimport pandas as pd\nimport datetime\nfrom argparse import ArgumentParser\nimport numpy as np\nfrom torch import nn, optim\nimport torch.nn.functional as F\nfrom torch.utils.data import DataLoader, random_split\nfrom icecream import ic\n\nimport pytorch_lightning as pl\nfrom py...
[ [ "torch.mean", "torch.empty", "torch.cat", "torch.tensor", "numpy.mean", "torch.var" ], [ "torch.mean", "torch.empty", "torch.load", "torch.cat", "numpy.cos", "torch.tensor", "torch.var" ] ]
jacobhjkim/ray
[ "936cb5929c455102d5638ff5d59c80c4ae94770f" ]
[ "python/ray/tune/tests/test_function_api.py" ]
[ "import json\nimport os\nimport sys\nimport shutil\nimport tempfile\nimport unittest\n\nimport ray\nimport ray.cloudpickle as cloudpickle\nfrom ray.rllib import _register_all\n\nfrom ray import tune\nfrom ray.tune.logger import NoopLogger\nfrom ray.tune.utils.trainable import TrainableUtil\nfrom ray.tune.function_r...
[ [ "numpy.random.rand" ] ]
takuto0831/Competition-utils
[ "c738e199c6a771a0c58b9cd237660bb76b4be4fb" ]
[ "pyscript/torch/utils.py" ]
[ "import os\nimport random\nimport subprocess\nimport numpy as np\nimport torch\nimport time\ntry:\n import torch_xla\n import torch_xla.core.xla_model as xm\n XLA = True\nexcept ModuleNotFoundError:\n XLA = False\n\n\ndef freeze_module(module):\n for i, param in enumerate(module.parameters()):\n ...
[ [ "torch.cuda.manual_seed", "numpy.random.seed", "torch.manual_seed", "torch.cuda.is_available", "torch.device", "torch.cuda.device_count" ] ]
mwcvitkovic/Supervised-Learning-on-Relational-Databases-with-GNNs
[ "57195ccab62d23dcbcac1a317f8a9811a9fd6cb5" ]
[ "models/GNN/GIN.py" ]
[ "from dgl import BatchedDGLGraph\nfrom dgl.nn.pytorch.conv import GINConv\nfrom torch import nn\n\nfrom models.GNN.GNNModelBase import GNNModelBase\nfrom models.utils import TypeConditionalLinear\n\n\nclass GIN(GNNModelBase):\n \"\"\"\n Graph Isomorphism Network as described in https://arxiv.org/pdf/1810.0082...
[ [ "torch.nn.Linear", "torch.nn.Sequential", "torch.nn.ModuleList", "torch.nn.Dropout" ] ]
jlvdb/the-wizz
[ "21e88888472d2598a0db861aef31076078628b8e", "21e88888472d2598a0db861aef31076078628b8e", "21e88888472d2598a0db861aef31076078628b8e" ]
[ "pdf_maker.py", "the_wizz/pdf_maker_utils.py", "the_wizz/kdtree_utils.py" ]
[ "#!/usr/bin/env python3\n\n\"\"\"This code is the main access point for the majority of users of The-wiZZ. It\ntakes an input subselection of a survey catalog, a The-wiZZ HDF5 data file, and\nmatches the two together to create a resultant clustering redshift estimate\nthat can then be turned into a redshift PDF. Th...
[ [ "numpy.loadtxt" ], [ "numpy.linspace", "numpy.mean", "numpy.zeros_like", "numpy.searchsorted", "numpy.nanmean", "numpy.any", "numpy.nanstd", "numpy.random.randint", "scipy.interpolate.InterpolatedUnivariateSpline", "numpy.arange", "numpy.zeros", "numpy.logic...
Agyey/fsdl-text-recognizer-2021-labs
[ "4bd85042ab9f6decd78849bb655c197cc13ffc11" ]
[ "lab4/text_recognizer/models/line_cnn.py" ]
[ "from typing import Any, Dict\nimport argparse\nimport math\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nCONV_DIM = 64\nFC_DIM = 128\nWINDOW_WIDTH = 28\nWINDOW_STRIDE = 28\n\n\nclass ConvBlock(nn.Module):\n \"\"\"\n Simple 3x3 conv with padding size 1 (to leave the input size uncha...
[ [ "torch.nn.Dropout", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.init.normal_", "torch.nn.init._calculate_fan_in_and_fan_out", "torch.nn.ReLU", "torch.nn.init.kaiming_normal_" ] ]
addschile/qtps
[ "3220af82d409526463dc4fe9e4ea869d655c0bd8" ]
[ "data/compute_rates.py" ]
[ "import numpy as np\nfrom sys import argv\n\ntobs = int(argv[1])\np0 = np.zeros(10)\np2 = np.zeros(10)\np1 = np.zeros(10)\nZab = np.zeros(10)\nrate = np.zeros(10)\n\nfor i in range(10):\n da = np.loadtxt('tobs%d/reweighted_hist_%d.dat'%(tobs,i))\n p0[i] = np.exp(-da[-2,1])\n p2[i] = np.exp(-da[-1,1])\n p...
[ [ "numpy.exp", "numpy.zeros", "numpy.sum", "numpy.loadtxt" ] ]
TillBeemelmanns/OpenPCDet
[ "b7553c879d0ba36477931efe07a55adbc39823b9", "b7553c879d0ba36477931efe07a55adbc39823b9" ]
[ "tools/test.py", "pcdet/utils/common_utils.py" ]
[ "import os\nimport torch\nfrom tensorboardX import SummaryWriter\nimport time\nimport glob\nimport re\nimport datetime\nimport argparse\nfrom pathlib import Path\nimport torch.distributed as dist\nfrom pcdet.datasets import build_dataloader\nfrom pcdet.models import build_network\nfrom pcdet.utils import common_uti...
[ [ "torch.distributed.get_world_size", "torch.no_grad" ], [ "torch.cat", "torch.sin", "torch.multiprocessing.get_start_method", "torch.distributed.get_rank", "torch.multiprocessing.set_start_method", "torch.distributed.init_process_group", "torch.from_numpy", "torch.distri...
anthowen/duplify
[ "846d01c1b21230937fdf0281b0cf8c0b08a8c24e", "9444dce96954c546333d5aecc92a06c3bfd19aa5", "846d01c1b21230937fdf0281b0cf8c0b08a8c24e", "846d01c1b21230937fdf0281b0cf8c0b08a8c24e", "846d01c1b21230937fdf0281b0cf8c0b08a8c24e", "846d01c1b21230937fdf0281b0cf8c0b08a8c24e", "846d01c1b21230937fdf0281b0cf8c0b08a8c24...
[ "env/lib/python3.6/site-packages/pandas/core/panel.py", "env/lib/python3.6/site-packages/scipy/optimize/tests/test__spectral.py", "env/lib/python3.6/site-packages/pandas/stats/fama_macbeth.py", "env/lib/python3.6/site-packages/matplotlib/tests/test_tightlayout.py", "env/lib/python3.6/site-packages/numpy/lin...
[ "\"\"\"\nContains data structures designed for manipulating panel (3-dimensional) data\n\"\"\"\n# pylint: disable=E1103,W0231,W0212,W0621\nfrom __future__ import division\n\nimport warnings\n\nimport numpy as np\n\nfrom pandas.types.cast import (_infer_dtype_from_scalar,\n _possibly_ca...
[ [ "pandas.core.generic.NDFrame.__init__", "pandas.types.cast._infer_dtype_from_scalar", "numpy.asarray", "pandas.compat.numpy.function.validate_round", "pandas.compat.range", "pandas.compat.map", "pandas.core.internals.create_block_manager_from_blocks", "pandas.core.generic.NDFrame._...
eric-czech/FaST-LMM
[ "497ac732f0cb25e328282cff42045afb70a99076" ]
[ "fastlmm/inference/fastlmm_predictor.py" ]
[ "from __future__ import print_function #Python 2 & 3 compatibility\nfrom __future__ import absolute_import\nimport numpy as np\nimport logging\nimport unittest\nimport os\nimport scipy.linalg as LA\nimport time\n\nfrom pysnptools.snpreader import Bed,Pheno\nfrom pysnptools.snpreader import SnpData,SnpReader\nfrom p...
[ [ "numpy.dot", "numpy.array_equal", "numpy.arange", "numpy.eye", "numpy.ones", "scipy.stats.multivariate_normal", "numpy.array", "numpy.zeros", "numpy.empty" ] ]
jnettels/reegis
[ "fe50c124aa041b9faa494611cba6b833675115e4", "fe50c124aa041b9faa494611cba6b833675115e4" ]
[ "reegis/mobility.py", "reegis/entsoe.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"Calculate the mobility demand.\n\nSPDX-FileCopyrightText: 2016-2019 Uwe Krien <krien@uni-bremen.de>\n\nSPDX-License-Identifier: MIT\n\"\"\"\n__copyright__ = \"Uwe Krien <krien@uni-bremen.de>\"\n__license__ = \"MIT\"\n\n\nimport os\nimport pandas as pd\nfrom collections import named...
[ [ "pandas.read_excel", "pandas.MultiIndex.from_arrays", "pandas.DataFrame" ], [ "pandas.notnull", "pandas.read_hdf", "pandas.read_csv", "pandas.to_datetime" ] ]
MoriZSJ/GVB
[ "9b954660ef377ead81c8e631c4a0f4a17075b2ea" ]
[ "CDAN-GD/pre_process.py" ]
[ "import numpy as np\nfrom torchvision import transforms\nimport os\nfrom PIL import Image, ImageOps\nimport numbers\nimport torch\n\n\nclass ResizeImage():\n def __init__(self, size):\n if isinstance(size, int):\n self.size = (int(size), int(size))\n else:\n self.size = size\n...
[ [ "numpy.load" ] ]
Halimaz/tensorflow-1
[ "3437fba39d5bca77fd7627aad15ba76fb75f5731" ]
[ "tensorflow/contrib/rnn/python/kernel_tests/core_rnn_test.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.core.protobuf.config_pb2.RunMetadata", "tensorflow.python.framework.tensor_shape.TensorShape", "tensorflow.python.ops.array_ops.shape", "tensorflow.python.ops.rnn_cell.GRUCell", "tensorflow.python.ops.state_ops.assign_add", "tensorflow.core.protobuf.config_pb2.RunOptions", ...
oricou/pandas
[ "9405e58d9268041f5416711c051cf5429a19bf49", "9405e58d9268041f5416711c051cf5429a19bf49", "9405e58d9268041f5416711c051cf5429a19bf49", "9405e58d9268041f5416711c051cf5429a19bf49", "9405e58d9268041f5416711c051cf5429a19bf49", "9405e58d9268041f5416711c051cf5429a19bf49", "9405e58d9268041f5416711c051cf5429a19bf4...
[ "pandas/tests/indexing/common.py", "pandas/tests/indexing/multiindex/test_chaining_and_caching.py", "pandas/tests/series/methods/test_convert_dtypes.py", "pandas/tests/arrays/sparse/test_arithmetics.py", "pandas/tests/io/pytables/test_round_trip.py", "pandas/tests/indexes/multi/test_integrity.py", "pand...
[ "\"\"\" common utilities \"\"\"\nimport itertools\n\nimport numpy as np\n\nfrom pandas import (\n DataFrame,\n Float64Index,\n MultiIndex,\n Series,\n UInt64Index,\n date_range,\n)\nimport pandas._testing as tm\n\n\ndef _mklbl(prefix, n):\n return [f\"{prefix}{i}\" for i in range(n)]\n\n\ndef _...
[ [ "pandas._testing.assert_almost_equal", "pandas.Series", "numpy.arange", "pandas.DataFrame", "numpy.random.randn", "numpy.random.rand", "pandas.MultiIndex.from_product", "pandas.date_range" ], [ "pandas.MultiIndex.from_tuples", "pandas.DataFrame", "numpy.ones", "...
Napkin-DL/PyTorch-GAN
[ "4668fb434a74a4e4771631944e4abfb0ec1c8795", "4668fb434a74a4e4771631944e4abfb0ec1c8795", "4668fb434a74a4e4771631944e4abfb0ec1c8795", "4668fb434a74a4e4771631944e4abfb0ec1c8795" ]
[ ".history/implementations/pixelda/pixelda_20190101201505.py", ".history/implementations/pixelda/pixelda_20190101224024.py", ".history/implementations/pixelda/pixelda_try_20190106200949.py", ".history/implementations/pixelda/pixelda_try_20190106200556.py" ]
[ "import argparse\nimport os\nimport numpy as np\nimport math\nimport itertools\n\nimport torchvision.transforms as transforms\nfrom torchvision.utils import save_image\n\nfrom torch.utils.data import DataLoader\nfrom torchvision import datasets\nfrom torch.autograd import Variable\n\nfrom mnistm import MNISTM\n\nim...
[ [ "torch.nn.Sequential", "torch.nn.CrossEntropyLoss", "torch.nn.Softmax", "torch.nn.ConvTranspose2d", "torch.cat", "torch.nn.init.constant_", "torch.nn.Conv2d", "torch.nn.Tanh", "torch.nn.Linear", "torch.nn.init.normal_", "torch.nn.LeakyReLU", "torch.cuda.is_available...
hrayatnia/SciPy
[ "a50dcbb6b8adffbc526eec93f5009f09943786e3" ]
[ "plotting-beginner-plotting-cookbook/pltcp.py" ]
[ "import numpy as np\nimport matplotlib.patches as patches\nimport matplotlib.pyplot as plt\nax = plt.axes(polar = True)\ntheta = np.linspace(0, 2 * np.pi, 8, endpoint = False)\nradius = .25 + .75 * np.random.random(size = len(theta))\npoints = np.vstack((theta, radius)).transpose()\nplt.gca().add_patch(patches.Poly...
[ [ "matplotlib.pyplot.gca", "numpy.linspace", "matplotlib.pyplot.axes", "matplotlib.pyplot.show", "matplotlib.patches.Polygon", "numpy.vstack" ] ]
mitchellgordon95/lottery-ticket-hypothesis
[ "3b2abee4b1e9ba00fe8501ac86652e2604736405", "3b2abee4b1e9ba00fe8501ac86652e2604736405", "3b2abee4b1e9ba00fe8501ac86652e2604736405" ]
[ "lottery_ticket/foundations/trainer.py", "lottery_ticket/mnist_fc/big_two_layer_exp.py", "lottery_ticket/mnist_fc/one_layer_exp.py" ]
[ "# Copyright (C) 2018 Google 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 applicable law or agreed ...
[ [ "tensorflow.global_variables_initializer", "tensorflow.Summary" ], [ "tensorflow.reset_default_graph", "tensorflow.Session" ], [ "tensorflow.reset_default_graph", "tensorflow.Session" ] ]
jakee417/probability-1
[ "ae7117f37ac441bc7a888167ea23e5e620c5bcde", "ae7117f37ac441bc7a888167ea23e5e620c5bcde", "ae7117f37ac441bc7a888167ea23e5e620c5bcde", "ae7117f37ac441bc7a888167ea23e5e620c5bcde", "ae7117f37ac441bc7a888167ea23e5e620c5bcde", "ae7117f37ac441bc7a888167ea23e5e620c5bcde", "ae7117f37ac441bc7a888167ea23e5e620c5bcd...
[ "tensorflow_probability/python/experimental/mcmc/windowed_sampling_test.py", "tensorflow_probability/python/distributions/student_t_process_regression_model_test.py", "tensorflow_probability/python/experimental/mcmc/gradient_based_trajectory_length_adaptation_test.py", "tensorflow_probability/python/distribut...
[ "# Copyright 2021 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 ...
[ [ "tensorflow.compat.v2.zeros_like", "tensorflow.compat.v2.linalg.diag_part", "tensorflow.compat.v2.function", "tensorflow.compat.v2.einsum", "tensorflow.compat.v2.linalg.matmul", "tensorflow.compat.v2.TensorSpec", "tensorflow.compat.v2.linalg.matvec", "tensorflow.compat.v2.ones", ...
andybi7676/s3prl
[ "0e5acc5d499a629f946d561d87e8924ba3eb004b" ]
[ "s3prl/downstream/voxceleb1/expert.py" ]
[ "# -*- coding: utf-8 -*- #\n\"\"\"*********************************************************************************************\"\"\"\n# FileName [ expert.py ]\n# Synopsis [ the phone linear downstream wrapper ]\n# Author [ S3PRL ]\n# Copyright [ Copyleft(c), Speech Lab, NTU, Taiwan ]\n\"\"...
[ [ "torch.nn.CrossEntropyLoss", "torch.LongTensor", "torch.utils.data.DistributedSampler", "torch.ones", "torch.zeros", "torch.nn.utils.rnn.pad_sequence", "torch.utils.data.DataLoader", "torch.distributed.is_initialized", "torch.nn.Linear", "torch.FloatTensor" ] ]
arielclj/singa-easy
[ "fd4bc601a5501062936f874df14711a3cefa1346" ]
[ "singa_easy/modules/mod_modelslicing/utils/lr_scheduler.py" ]
[ "from torch.optim.lr_scheduler import _LRScheduler\nfrom torch.optim.lr_scheduler import ReduceLROnPlateau\nfrom torch.optim.lr_scheduler import CosineAnnealingLR\n\nclass GradualWarmupScheduler(_LRScheduler):\n \"\"\" Gradually warm-up(increasing) learning rate in optimizer.\n Proposed in 'Accurate, Large Mi...
[ [ "torch.optim.SGD", "torch.optim.lr_scheduler.CosineAnnealingLR", "torch.zeros" ] ]
ThomasHoppe/pyflux
[ "297f2afc2095acd97c12e827dd500e8ea5da0c0f", "297f2afc2095acd97c12e827dd500e8ea5da0c0f", "297f2afc2095acd97c12e827dd500e8ea5da0c0f" ]
[ "pyflux/arma/tests/test_arima_laplace.py", "pyflux/results.py", "pyflux/gas/tests/gas_llt_tests_skewt.py" ]
[ "import numpy as np\nfrom pyflux.arma import ARIMA\nfrom pyflux.families import Laplace\n\nnoise = np.random.normal(0,1,100)\ndata = np.zeros(100)\n\nfor i in range(1,len(data)):\n data[i] = 0.9*data[i-1] + noise[i]\n\ndef test_no_terms():\n \"\"\"\n Tests an ARIMA model with no AR or MA terms, and that\n ...
[ [ "numpy.isnan", "numpy.all", "numpy.random.normal", "numpy.array", "numpy.zeros" ], [ "numpy.diag", "numpy.log", "matplotlib.pyplot.figure", "matplotlib.pyplot.plot", "numpy.round", "numpy.exp", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplo...
modichirag/21cm_cleaning
[ "1615fea4e2d617bb6ef00770a49698901227daa8", "1615fea4e2d617bb6ef00770a49698901227daa8" ]
[ "code/plotting/plot_evalrep.py", "code/plotting/plot_lsstallic.py" ]
[ "#!/usr/bin/env python3\n#\n# Plots the power spectra and Fourier-space biases for the HI.\n#\nimport numpy as np\nimport os, sys\nimport matplotlib.pyplot as plt\nfrom pmesh.pm import ParticleMesh\nfrom scipy.interpolate import InterpolatedUnivariateSpline as ius\nfrom nbodykit.lab import BigFileMesh, BigFileCatal...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.font_manager.FontProperties", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "numpy.round", "numpy.loadtxt" ], [ "matplotlib.pyplot.tight_layout", "matplotlib.font_manager.FontProperties", "matplotlib.pyplot.subplots...
ashwanikumar04/ml-recommendation-engine
[ "57a7c0d5ac073b976e40c17d8892a4b7291d08ed" ]
[ "matrix_factorization/mf_keras.py" ]
[ "import pickle\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom sklearn.utils import shuffle\n\nimport tensorflow as tf\nfrom tensorflow import keras\n\nfrom tensorflow.keras.models import Model\nfrom tensorflow.keras.layers import Input, Embedding, Dot, Add, Flatten\nfrom tensorflow....
[ [ "tensorflow.keras.models.load_model", "numpy.array", "pandas.read_csv" ] ]
RandolphVI/Question-Difficulty-Prediction
[ "77b4b83b5bc747c5074926d7a37545a5d46ed343", "77b4b83b5bc747c5074926d7a37545a5d46ed343" ]
[ "TF/TARNN/test_tarnn.py", "TMLA/SVM/train_svm.py" ]
[ "# -*- coding:utf-8 -*-\n__author__ = 'Randolph'\n\nimport os\nimport sys\nimport time\nimport logging\n\nsys.path.append('../')\nlogging.getLogger('tensorflow').disabled = True\n\nimport tensorflow as tf\nfrom utils import checkmate as cm\nfrom utils import data_helpers as dh\nfrom utils import param_parser as par...
[ [ "tensorflow.Graph", "tensorflow.train.latest_checkpoint", "sklearn.metrics.r2_score", "sklearn.metrics.mean_squared_error", "tensorflow.ConfigProto", "tensorflow.Session" ], [ "sklearn.svm.SVR", "sklearn.externals.joblib.dump" ] ]
Ambattz/Intelligent_Traffic_Management_System
[ "51c3100ddb3479538d8a6accbcc0ea9f751481a7" ]
[ "test_model_images.py" ]
[ "import numpy as np\r\nimport os\r\nimport six.moves.urllib as urllib\r\nimport sys\r\nimport tarfile\r\nimport tensorflow.compat.v1 as tf\r\ntf.disable_v2_behavior()\r\nimport zipfile\r\n\r\nfrom collections import defaultdict\r\nfrom io import StringIO\r\nfrom matplotlib import pyplot as plt\r\nfrom PIL import Im...
[ [ "matplotlib.pyplot.imshow", "numpy.expand_dims", "tensorflow.compat.v1.import_graph_def", "tensorflow.compat.v1.disable_v2_behavior", "numpy.squeeze", "tensorflow.compat.v1.Session", "tensorflow.compat.v1.Graph", "tensorflow.compat.v1.gfile.GFile", "tensorflow.compat.v1.GraphDe...
intel-analytics/WorldBankPoC
[ "49c19268601ff1aa7e396ddc5a8a23abfe73880e" ]
[ "vegnoveg/vegnonveg-fulltraining-nnframe.py" ]
[ "# Databricks notebook source\n\nimport pandas as pd\nfrom os import listdir\nfrom os.path import join, basename\nimport struct\nimport pickle\nimport json\nimport os\nfrom scipy import misc\nimport datetime as dt\nfrom pyspark.sql.types import *\nfrom pyspark.sql.functions import udf\nfrom pyspark.ml.evaluation im...
[ [ "pandas.read_csv" ] ]
TUM-AAS/motron
[ "2f8800d1d6e297fc4baab555ceb2d37f55841406" ]
[ "motion/components/structural.py" ]
[ "from typing import Tuple, Optional, List, Union\n\nimport torch\nfrom torch.nn import *\nimport math\n\ndef gmm(x: torch.Tensor, w: torch.Tensor) -> torch.Tensor:\n return torch.einsum('ndo,bnd->bno', w, x)\n\n\nclass GraphLinear(Module):\n def __init__(self, in_features: int, out_features: int):\n su...
[ [ "torch.nn.functional.normalize", "torch.sigmoid", "torch.ones", "torch.floor", "torch.Tensor", "torch.zeros", "torch.einsum", "torch.eye", "torch.zeros_like", "torch.tensor", "torch.tanh", "torch.matmul", "torch.mul", "torch.arange", "torch.stack" ] ]
EternalImmortal/Real-time-emotion-classifier-mini-Xception
[ "161f295d4be511f7e4cc700399ca37c48ea81f6a" ]
[ "src/utils/preprocessor.py" ]
[ "import numpy as np\n# from scipy.misc import imread, imresize\nfrom scipy import misc\n\n\ndef preprocess_input(x, v2=True):\n x = x.astype('float32')\n x = x / 255.0\n if v2:\n x = x - 0.5\n x = x * 2.0\n return x\n\n\ndef _imread(image_name):\n return misc.imread(image_name)\n\n\ndef...
[ [ "scipy.misc.imresize", "numpy.asarray", "numpy.arange", "scipy.misc.imread", "numpy.zeros" ] ]
randommm/pytorch-lightning
[ "10e87b7b7acbbad8fc12ec5c07638ed093547ef8" ]
[ "pytorch_lightning/plugins/training_type/parallel.py" ]
[ "# Copyright The PyTorch Lightning team.\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...
[ [ "torch.cuda.empty_cache", "torch.cuda.is_available", "torch.nn.SyncBatchNorm.convert_sync_batchnorm" ] ]
cremerlab/useless_expression
[ "a6020674f0ae73b4cc6173de60a0ea93016ee562", "a6020674f0ae73b4cc6173de60a0ea93016ee562", "a6020674f0ae73b4cc6173de60a0ea93016ee562", "a6020674f0ae73b4cc6173de60a0ea93016ee562", "a6020674f0ae73b4cc6173de60a0ea93016ee562" ]
[ "code/processing/growth_rates/2021-08-14_r1_DoubleKO_acetate/analysis.py", "code/processing/growth_rates/2021-08-12_r1_DoubleKO_acetate/processing.py", "code/processing/growth_rates/2021-07-27_r2_SingleKO_acetate/analysis.py", "code/processing/growth_rates/2021-07-23_r1_SingleKO_glucose/analysis.py", "code/...
[ "#%%\nimport numpy as np \nimport pandas as pd \nimport futileprot.viz\nimport altair as alt\nimport altair_saver\nimport scipy.stats\ncolors, palette = futileprot.viz.altair_style()\n\n# Add metadata\nDATE = '2021-08-14'\nRUN_NO = 1\nSTRAINS = 'DoubleKO'\nMEDIUM = 'acetate'\n\n# Load the measurement data\ndata = p...
[ [ "numpy.exp", "numpy.log", "pandas.read_csv", "pandas.DataFrame" ], [ "pandas.to_timedelta", "numpy.arange", "pandas.concat", "pandas.read_csv" ], [ "numpy.exp", "numpy.log", "pandas.read_csv", "pandas.DataFrame" ], [ "numpy.log", "pandas.read_csv...
Fred159/3D-Perception
[ "a23a42dc19d0a38e48beb5e7c0725e6d14c542f3" ]
[ "sensor_stick/src/sensor_stick/features.py" ]
[ "import matplotlib.colors\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom pcl_helper import *\n\nprint('run features.py')\n\n\ndef rgb_to_hsv(rgb_list):\n rgb_normalized = [1.0 * rgb_list[0] / 255, 1.0 * rgb_list[1] / 255, 1.0 * rgb_list[2] / 255]\n hsv_normalized = matplotlib.colors.rgb_to_hsv([[r...
[ [ "numpy.concatenate", "numpy.histogram", "numpy.sum" ] ]
Complicateddd/Complicateddd-ROITransformer
[ "2adfbf98892d569c460d100c6e2169c5fa3a9b82" ]
[ "submit.py" ]
[ "from mmdet.apis import init_detector, inference_detector, show_result, draw_poly_detections\nimport mmcv\nfrom mmcv import Config\nfrom mmdet.datasets import get_dataset\nimport cv2\nimport os\nimport numpy as np\nfrom tqdm import tqdm\nimport DOTA_devkit.polyiou as polyiou\nimport math\nimport pdb\n\ndef py_cpu_n...
[ [ "numpy.maximum", "numpy.minimum", "numpy.min", "numpy.max", "numpy.where", "numpy.zeros" ] ]
Isaac-JenkinsRA/Stone-Soup
[ "54c9c7dca8162dadaa58e85933cf10a0f86ce1e1" ]
[ "stonesoup/predictor/tests/test_kalman.py" ]
[ "# coding: utf-8\nimport datetime\nimport pytest\nimport numpy as np\n\nfrom ...models.transition.linear import ConstantVelocity\nfrom ...predictor.kalman import (\n KalmanPredictor, ExtendedKalmanPredictor, UnscentedKalmanPredictor,\n SqrtKalmanPredictor)\nfrom ...types.prediction import GaussianStatePredict...
[ [ "numpy.diag", "numpy.array", "numpy.allclose", "numpy.linalg.cholesky" ] ]
jials/CS4243-project
[ "100d7ed1cbd379de3b2e65c16e037bf4afec0fb1" ]
[ "changeDetection.py" ]
[ "import numpy as np\nimport cv2\nimport imageMarker\n\nlucas_kanade_params = dict(\n winSize= (4, 4),\n maxLevel= 3, #level of pyramids used\n criteria= (cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 10, 0.03)\n)\n\ndef mark_features_on_all_images(images, features_coordinates):\n marked_images = []\n...
[ [ "numpy.array", "numpy.zeros_like", "numpy.float32" ] ]
zmlabe/ModelBiasesANN
[ "df28842a8594870db3282682b1261af5058af832", "df28842a8594870db3282682b1261af5058af832", "df28842a8594870db3282682b1261af5058af832" ]
[ "Scripts/ANN_AllAnalysis_ClimateModels_v4-RandomNoise-TestWarmthGFDL.py", "Dark_Scripts/ANN_AllAnalysis_ClimateModels_v4-LINEAR-SMOOTHER_RandomNoise.py", "Scripts/ANN_AllAnalysis_ClimateModels_v4-RandomNoise-StandarizeMethodsSeparate.py" ]
[ "\"\"\"\nANN for evaluating model biases, differences, and other thresholds using \nexplainable AI (add warmth/cool GFDL-CM3 model only)\n\nReference : Barnes et al. [2020, JAMES]\nAuthor : Zachary M. Labe\nDate : 20 July 2021\nVersion : 4 - subsamples random weight class (#8) for mmmean\n\"\"\"\n\n##...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.contourf", "matplotlib.pyplot.rc", "pandas.DataFrame", "matplotlib.pyplot.plot", "numpy.round", "numpy.nanmean", "tensorflow.get_default_graph", "numpy.nanstd", "numpy.random.randint", "numpy.swapaxes", "numpy.unique", ...
fengxia41103/stock
[ "1bba08f77e9038ebdd3905fe734bb51e5fb1bdf1" ]
[ "backend/stock/workers/get_valuation_ratio.py" ]
[ "import logging\n\nimport pandas as pd\n\nfrom stock.models import MyStock\nfrom stock.models import ValuationRatio\nfrom yahooquery import Ticker\n\nlogger = logging.getLogger(\"stock\")\n\n\nclass MyValuationRatio:\n def __init__(self, symbol):\n self.stock = MyStock.objects.get(symbol=symbol)\n\n de...
[ [ "pandas.notnull" ] ]
ss18/shapenet
[ "5a605bee6b2750f3a586ca9a740165e66b5dd7d8", "5a605bee6b2750f3a586ca9a740165e66b5dd7d8" ]
[ "shapenet/networks/utils.py", "shapenet/scripts/train_single_shapenet.py" ]
[ "# author: Justus Schock (justus.schock@rwth-aachen.de)\n\nimport torch\n\n\nclass CustomGroupNorm(torch.nn.Module):\n \"\"\"\n Custom Group Norm which adds n_groups=2 as default parameter\n \"\"\"\n\n def __init__(self, n_features, n_groups=2):\n \"\"\"\n\n Parameters\n ----------\...
[ [ "torch.nn.GroupNorm" ], [ "torch.nn.MSELoss", "torch.nn.L1Loss" ] ]
DevD1092/Retinaface_DLIB
[ "455e393f1bd688cf2d1cc41960105af9ea8a26c6" ]
[ "test_widerface.py" ]
[ "from __future__ import print_function\nimport os\nimport sys\nimport argparse\nimport torch\nimport torch.backends.cudnn as cudnn\nimport numpy as np\nfrom data import cfg_mnet, cfg_re50\nfrom layers.functions.prior_box import PriorBox\nfrom utils.nms.py_cpu_nms import py_cpu_nms\nimport cv2\nfrom models.retinafac...
[ [ "numpy.hstack", "torch.Tensor", "torch.cuda.current_device", "torch.load", "numpy.min", "torch.from_numpy", "numpy.concatenate", "numpy.max", "numpy.round", "torch.set_grad_enabled", "numpy.float32", "torch.device", "numpy.where" ] ]
bluetyson/archai
[ "50f70ccccf536466cc0370c8a63401e05dec33fd" ]
[ "archai/datasets/providers/svhn_provider.py" ]
[ "# Copyright (c) Microsoft Corporation.\r\n# Licensed under the MIT license.\r\n\r\nfrom typing import List, Tuple, Union, Optional\r\n\r\nfrom overrides import overrides, EnforceOverrides\r\nfrom torch.utils.data.dataset import Dataset\r\n\r\nimport torchvision\r\nfrom torchvision.transforms import transforms\r\nf...
[ [ "torch.utils.data.ConcatDataset" ] ]
shinh/dldt
[ "edd86d090592f7779f4dbb2681546e1f4e81284f", "edd86d090592f7779f4dbb2681546e1f4e81284f", "edd86d090592f7779f4dbb2681546e1f4e81284f", "edd86d090592f7779f4dbb2681546e1f4e81284f", "edd86d090592f7779f4dbb2681546e1f4e81284f", "edd86d090592f7779f4dbb2681546e1f4e81284f", "edd86d090592f7779f4dbb2681546e1f4e81284...
[ "model-optimizer/extensions/middle/Reduce_test.py", "model-optimizer/mo/front/caffe/extractors/inner_product_test.py", "model-optimizer/mo/middle/passes/infer_test.py", "tools/accuracy_checker/tests/test_segmentation_metrics.py", "model-optimizer/mo/front/common/partial_infer/split.py", "model-optimizer/m...
[ "\"\"\"\n Copyright (c) 2018-2019 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.testing.assert_array_equal", "numpy.array" ], [ "numpy.array", "numpy.zeros", "numpy.array_equal" ], [ "numpy.array" ], [ "numpy.add.reduce", "numpy.array", "numpy.argwhere" ], [ "numpy.delete" ], [ "numpy.array" ]...
Yfyangd/Computer_Vision_CS665
[ "59dca3ce42f43b4aea446497a578f4a0eb93995d" ]
[ "Homography/hw2-2/homography.py" ]
[ "\n# coding: utf-8\n\n# In[1]:\n\n\nimport numpy as np\ndef get_homograph(u,v):\n A = np.array([[u[0][0], u[0][1], 1, 0, 0, 0, -1 * u[0][0] * v[0][0], -1 * u[0][1] * v[0][0]],\n [0, 0, 0, u[0][0], u[0][1], 1, -1 * u[0][0] * v[0][1], -1 * u[0][1] * v[0][1]],\n [u[1][0], u[1][1], ...
[ [ "numpy.linalg.inv", "numpy.array", "numpy.zeros" ] ]
The-SocialLion/Speech-Emotion-Recognition-using-MLP-Classifier
[ "5c4101ebbe2b43db28dbb97f94dc3001bdf56ff8" ]
[ "sp.py" ]
[ "import librosa\r\nimport soundfile\r\nimport os, glob, pickle\r\nimport numpy as np\r\nfrom sklearn.model_selection import train_test_split\r\nfrom sklearn.neural_network import MLPClassifier\r\nfrom sklearn.metrics import accuracy_score\r\n\r\ndef extract_feature(file_name, mfcc, chroma, mel):\r\n with soundfi...
[ [ "sklearn.neural_network.MLPClassifier", "numpy.hstack", "numpy.array", "sklearn.metrics.accuracy_score" ] ]
brohrer/nn_methods
[ "acf3d1369e240971e5ee05696610c59c4c993a30" ]
[ "cottonwood/core/layers/dense.py" ]
[ "import numpy as np\nfrom cottonwood.core.activation import Tanh\nfrom cottonwood.core.initializers import LSUV\nfrom cottonwood.core.layers.generic_layer import GenericLayer\nfrom cottonwood.core.optimizers import SGD\nimport cottonwood.core.toolbox as tb\n\n\nclass Dense(GenericLayer):\n def __init__(\n ...
[ [ "numpy.logical_not", "numpy.ones", "numpy.concatenate", "numpy.random.uniform", "numpy.zeros" ] ]
TinghuiWang/pyActLearn
[ "d858136e86324fac51b0943765ef60bd405e31d1", "d858136e86324fac51b0943765ef60bd405e31d1" ]
[ "pyActLearn/sensors/sensor2vec.py", "pyActLearn/learning/gcforest.py" ]
[ "import math\nimport numpy as np\nimport tensorflow as tf\nfrom ..learning.nn.injectors import SkipGramInjector\n\n\ndef sensor2vec(num_sensors, sensor_event_list, embedding_size=20,\n batch_size=128, num_skips=8, skip_window=5,\n num_neg_samples=64, learning_rate=1.0):\n \"\"\"Sensor...
[ [ "tensorflow.Graph", "tensorflow.matmul", "tensorflow.device", "tensorflow.zeros", "tensorflow.placeholder", "numpy.max", "tensorflow.initialize_all_variables", "tensorflow.train.GradientDescentOptimizer", "tensorflow.Session", "tensorflow.square", "tensorflow.nn.nce_los...
Yelloooowww/Deep-Reinforcement-Learning-Hands-On
[ "d1a3a1272d7ceff8796fe412deb4e4d5bd6665a5" ]
[ "Chapter03/03_atari_gan.py" ]
[ "#!/usr/bin/env python\nimport random\nimport argparse\nimport cv2\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom tensorboardX import SummaryWriter\n\nimport torchvision.utils as vutils\n\nimport gym\nimport gym.spaces\n\nimport numpy as np\n\nlog = gym.logger\nlog.set_level(gym.logger.IN...
[ [ "torch.ones", "torch.nn.ConvTranspose2d", "torch.zeros", "torch.nn.Conv2d", "torch.nn.BCELoss", "torch.nn.Sigmoid", "torch.nn.Tanh", "torch.tensor", "numpy.mean", "torch.FloatTensor", "torch.nn.BatchNorm2d", "numpy.moveaxis", "torch.device", "torch.nn.ReLU",...
csjtx1021/CAGG
[ "67fde2f1488ee6e2ff137e87860b5243c5b5fe7c" ]
[ "CAGG-NAS/tools/nn/nn_visualise.py" ]
[ "\"\"\"\n Harness for visualising a neural network.\n -- kandasamy@cs.cmu.edu\n\"\"\"\n\n# pylint: disable=invalid-name\n\nimport functools\nimport graphviz as gv\nimport os\nimport networkx as nx\nimport numpy as np\n\n# Parameters for plotting\n_SAVE_FORMAT = 'eps'\n# _SAVE_FORMAT = 'png'\n_LAYER_SHAPE = 'recta...
[ [ "numpy.ones", "numpy.array", "numpy.random.choice" ] ]
songzy12/MatchZoo
[ "a43dc3b1d43b3f2a1b43b11d3fc4009616507e23" ]
[ "matchzoo/layers/matching_layer.py" ]
[ "\"\"\"An implementation of Matching Layer.\"\"\"\nimport typing\n\nimport tensorflow as tf\nfrom tensorflow.keras import layers\n\n\nclass MatchingLayer(layers.Layer):\n \"\"\"\n Layer that computes a matching matrix between samples in two tensors.\n\n :param normalize: Whether to L2-normalize samples alo...
[ [ "tensorflow.stack", "tensorflow.math.l2_normalize", "tensorflow.concat", "tensorflow.einsum" ] ]
738844605/DualResidualNetworks
[ "6d025e074d4c914fae86f51cd8b93569a2c05335", "6d025e074d4c914fae86f51cd8b93569a2c05335" ]
[ "test/noise.py", "train/haze.py" ]
[ "# python 2.7, pytorch 0.3.1\n\nimport os, sys\nsys.path.insert(1, '../')\nimport torch\nimport cv2\nimport shutil\nimport torchvision\nimport numpy as np\nimport itertools\nimport subprocess\nimport random\n\nimport matplotlib.pyplot as plt\nimport torch.nn as nn\nimport torch.optim as optim\nimport torchvision.tr...
[ [ "torch.autograd.Variable", "torch.utils.data.DataLoader", "torch.load" ], [ "torch.utils.data.DataLoader", "torch.nn.L1Loss", "torch.autograd.Variable" ] ]
sayabiws/simple-image-recommender
[ "27162c544fc08b5774049039694f0fa7c7faac3f" ]
[ "main.py" ]
[ "# Simple image recommender\n#\n# required:\n# data/images: a folder containing your images dataset\n# data/users: can be empty, but the folder needs to exist (for now ?)\n# \n# optional:\n# data/tags.csv: a comma-separated list containing the names of your \n# images and the corresponding semicolon-separated tags\...
[ [ "pandas.read_csv", "sklearn.ensemble.RandomForestClassifier", "numpy.arange", "pandas.DataFrame", "sklearn.cluster.MiniBatchKMeans", "numpy.array", "numpy.histogram" ] ]
Nickmeagan70/tensorflow
[ "6bfedde8466daced9f40a0e11840f5ce274abc7d", "6bfedde8466daced9f40a0e11840f5ce274abc7d" ]
[ "tensorflow/python/pywrap_tensorflow.py", "tensorflow/compiler/mlir/tfrt/jit/python_binding/tfrt_fallback.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 requ...
[ [ "tensorflow.python.platform.self_check.preload_check", "tensorflow.python.pywrap_dlopen_global_flags.reset_dlopen_flags", "tensorflow.python.pywrap_dlopen_global_flags.set_dlopen_flags" ], [ "tensorflow.compiler.mlir.tfrt.jit.python_binding._tfrt_fallback.run_tfrt_fallback" ] ]
nvaytet/scipp
[ "f14f56ed19cccb4162d55b1123df7225eeedb395", "f14f56ed19cccb4162d55b1123df7225eeedb395", "f14f56ed19cccb4162d55b1123df7225eeedb395", "f14f56ed19cccb4162d55b1123df7225eeedb395" ]
[ "src/scipp/plotting/tools.py", "lib/core/test/generate_arithmetic_parameters.py", "tests/datasetslice_test.py", "src/scipp/plotting/figure1d.py" ]
[ "# SPDX-License-Identifier: BSD-3-Clause\n# Copyright (c) 2021 Scipp contributors (https://github.com/scipp)\n# @author Neil Vaytet\n\nfrom .. import config\nfrom ..core import concatenate, values, dtype, units, nanmin, nanmax, histogram, \\\n full_like\nfrom ..core import Variable, DataArray\nfrom ..core im...
[ [ "numpy.product", "numpy.sqrt", "numpy.nonzero", "numpy.arange", "numpy.nan_to_num", "numpy.geomspace", "matplotlib.pyplot.close", "matplotlib.cm.get_cmap", "numpy.errstate", "matplotlib.colors.LinearSegmentedColormap.from_list", "numpy.flip" ], [ "numpy.true_div...
alishameli/CS231n-Sample-Code-1
[ "e47e593026c80530f7c387c4feca24f88c1618a2" ]
[ "tensorflow/predict.py" ]
[ "import argparse\nimport os\nimport numpy as np\nimport tensorflow as tf\nfrom matplotlib import pyplot as plt\nfrom PIL import Image\n\nimport models\n\ndef predict(model_data_path, image_path):\n\n # Default input size\n height = 228\n width = 304\n channels = 3\n batch_size = 1\n \n # Read i...
[ [ "matplotlib.pyplot.imshow", "numpy.asarray", "tensorflow.global_variables", "tensorflow.variables_initializer", "tensorflow.placeholder", "tensorflow.Session", "numpy.array", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
dbusbridge/spektral
[ "a95807603c2bb96c80f34d326f663273c72ca3fc" ]
[ "spektral/datasets/delaunay.py" ]
[ "from __future__ import absolute_import\n\nimport numpy as np\nfrom scipy.spatial import Delaunay\n\nfrom spektral.utils import label_to_one_hot, numpy_to_nx\n\nRETURN_TYPES = {'numpy', 'networkx'}\nMAX_K = 7 # Maximum number of nodes in a graph\n\n\ndef generate_data(return_type='networkx', classes=0, n_samples_i...
[ [ "numpy.random.seed", "numpy.clip", "scipy.spatial.Delaunay", "numpy.cos", "numpy.sin", "numpy.concatenate", "numpy.random.normal", "numpy.random.uniform", "numpy.repeat", "numpy.array", "numpy.zeros" ] ]
finagle29/PypeIt
[ "418d6d24d24054ad590d2f06c0b4688ea18f492e", "418d6d24d24054ad590d2f06c0b4688ea18f492e" ]
[ "pypeit/scripts/flux_setup.py", "pypeit/spectrographs/magellan_fire.py" ]
[ "#!/usr/bin/env python\nimport argparse\nimport os,time\nimport numpy as np\nfrom astropy.io import fits\nfrom astropy.table import Table\nfrom pypeit import msgs\nfrom pypeit.par.util import make_pypeit_file\n\n\nclass SmartFormatter(argparse.HelpFormatter):\n\n def _split_lines(self, text, width):\n if ...
[ [ "numpy.sort", "numpy.unique" ], [ "numpy.log", "numpy.asarray", "numpy.arange", "numpy.full", "numpy.atleast_1d", "numpy.log10", "numpy.array", "numpy.vstack" ] ]
LamannaLeonardo/OLAM
[ "7a6611912ebb40d39a934dd454efec4cbb7913d3" ]
[ "Util/Latex_generator.py" ]
[ "# Copyright (c) 2022, Leonardo Lamanna\n# All rights reserved.\n# This source code is licensed under the MIT-style license found in the\n# LICENSE file in the root directory of this source tree.\n\n\nimport pandas as pd\nimport os\n\npd.options.display.max_colwidth = 100\n\ndef generate_latex_table(data_file, labe...
[ [ "pandas.read_excel", "pandas.DataFrame" ] ]
RichardoLuo/ColossalAI
[ "797a9dc5a9e801d7499b8667c3ef039a38aa15ba", "797a9dc5a9e801d7499b8667c3ef039a38aa15ba", "797a9dc5a9e801d7499b8667c3ef039a38aa15ba", "797a9dc5a9e801d7499b8667c3ef039a38aa15ba", "797a9dc5a9e801d7499b8667c3ef039a38aa15ba", "797a9dc5a9e801d7499b8667c3ef039a38aa15ba", "797a9dc5a9e801d7499b8667c3ef039a38aa15b...
[ "tests/components_to_test/repeated_computed_layer.py", "tests/test_tensor/test_tensor.py", "colossalai/kernel/jit/bias_gelu.py", "tests/test_layers/test_3d/test_3d.py", "colossalai/cli/benchmark/utils.py", "colossalai/nn/optimizer/cpu_adam.py", "tests/test_moe/test_moe_zero_optim.py" ]
[ "#!/usr/bin/env python\n\nimport torch\nimport torch.nn as nn\nfrom colossalai.nn import CheckpointModule\nfrom .utils.dummy_data_generator import DummyDataGenerator\nfrom .registry import non_distributed_component_funcs\n\n\nclass NetWithRepeatedlyComputedLayers(CheckpointModule):\n \"\"\"\n This model is to...
[ [ "torch.nn.Linear", "torch.nn.CrossEntropyLoss", "torch.randint", "torch.rand" ], [ "torch.randn", "torch.allclose" ], [ "torch.tanh" ], [ "torch.cuda.empty_cache", "torch.multiprocessing.spawn" ], [ "torch.cuda.synchronize", "torch.cuda.empty_cache", ...
wlm2019/Neural-Arithmetic-Units
[ "f9de9d004bb2dc2ee28577cd1760d0a00c185836", "f9de9d004bb2dc2ee28577cd1760d0a00c185836" ]
[ "stable_nalu/layer/hard_softmax_nac.py", "stable_nalu/functional/nac_weight_test.py" ]
[ "\nimport math\nimport torch\n\nfrom ..abstract import ExtendedTorchModule\nfrom ..functional import sparsity_error\nfrom ._abstract_recurrent_cell import AbstractRecurrentCell\n\nclass HardSoftmaxNACLayer(ExtendedTorchModule):\n \"\"\"Implements the NAC (Neural Accumulator)\n\n Arguments:\n in_feature...
[ [ "torch.nn.functional.softmax", "torch.LongTensor", "torch.Tensor", "torch.cat", "torch.nn.init.constant_", "torch.tensor", "torch.nn.functional.linear" ], [ "torch.randn" ] ]
ZhaoJ9014/Multi-Human-Parsing-MHP-
[ "a24eae67e9b4e730c75bcd8aec3e2ed06cb4b046" ]
[ "Nested_Adversarial_Networks/NAN_rework/modeleag.py" ]
[ "# Rework of model.py\n# https://github.com/ddddwee1/sul\n# This wrap-up is targeted for better touching low-level implementations \nimport layers2 as L \nimport tensorflow as tf \nconfig = tf.ConfigProto()\nconfig.gpu_options.allow_growth=True\ntf.enable_eager_execution(config=config)\nimport numpy as np \nimport ...
[ [ "tensorflow.convert_to_tensor", "tensorflow.enable_eager_execution", "tensorflow.train.latest_checkpoint", "numpy.eye", "tensorflow.cast", "tensorflow.train.get_or_create_global_step", "tensorflow.ConfigProto", "tensorflow.contrib.checkpoint.Checkpointable", "tensorflow.contrib...
cuis15/xorder
[ "6dde5a18552ffa07f29100038464a38c49495527" ]
[ "data/utils.py" ]
[ "import numpy as np\nfrom sklearn.metrics import roc_auc_score\nfrom numba import jit\n\n\ndef array2str(tmp_array, sep = \" \"):\n str_list = [\"{:.3f}\".format(tmp_item) for tmp_item in tmp_array]\n return sep.join(str_list)\n\n\ndef generate_sorted_groups(pred, y, a):\n a_idx = np.where(a == 0)\n b_i...
[ [ "sklearn.metrics.roc_auc_score", "numpy.concatenate", "numpy.argsort", "numpy.array", "numpy.where", "numpy.sum", "numpy.zeros" ] ]
mathuvu/nevergrad
[ "8e116190a8a29c238e655d728fc4816f7b4e0415", "8e116190a8a29c238e655d728fc4816f7b4e0415", "8e116190a8a29c238e655d728fc4816f7b4e0415", "8e116190a8a29c238e655d728fc4816f7b4e0415", "8e116190a8a29c238e655d728fc4816f7b4e0415" ]
[ "nevergrad/optimization/recastlib.py", "nevergrad/functions/unitcommitment/test_core.py", "nevergrad/optimization/multiobjective/test_hypervolume.py", "nevergrad/parametrization/mutation.py", "nevergrad/benchmark/frozenexperiments.py" ]
[ "# Copyright (c) Meta Platforms, Inc. and affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n\nimport functools\nimport math\nimport warnings\nimport weakref\nimport numpy as np\nfrom scipy import optimize as scipyoptimize\...
[ [ "numpy.asarray", "numpy.ones", "numpy.tan", "numpy.random.uniform", "numpy.array", "numpy.zeros" ], [ "numpy.allclose", "numpy.random.seed", "numpy.ones" ], [ "numpy.array" ], [ "numpy.concatenate", "numpy.roll", "numpy.array", "numpy.zeros", ...
pplonski/automlbenchmark
[ "f49ddfa2583643173296ed8ab45a8c14c62a6987" ]
[ "reports/report/visualizations/linplot.py" ]
[ "import matplotlib as mp\nimport pandas as pd\nimport seaborn as sb\n\nimport report.config as config\nfrom ..util import create_file, sort_dataframe\nfrom .util import savefig, set_scales, set_labels, task_labels\n\n\ndef draw_parallel_coord(df, class_column,\n x_labels=True, yscale='linear'...
[ [ "matplotlib.cm.get_cmap", "pandas.plotting.parallel_coordinates", "matplotlib.pyplot.figure" ] ]
semeniuta/pdata
[ "5eb6ece8e2fb1856bc87ed76290240cd901f7654" ]
[ "pdata/dirstructure.py" ]
[ "import os\nfrom glob import glob\nimport pandas as pd\n\n\ndef get_list_of_full_child_dirs(d):\n \"\"\"\n For a directory d (full path), \n return a list of its subdirectories \n in a full path form.\n \"\"\"\n\n children = (os.path.join(d, child) for child in os.listdir(d))\n dirs = filter(os...
[ [ "pandas.DataFrame" ] ]
wjmaddox/pytorch_ess
[ "8e189666ce7381cf760666464384c634abbc4be2" ]
[ "pytorch_ess/mean_elliptical_slice.py" ]
[ "import torch\n\nfrom .elliptical_slice import EllipticalSliceSampler\n\n\nclass MeanEllipticalSliceSampler(EllipticalSliceSampler):\n def __init__(self, f_init, dist, lnpdf, nsamples, pdf_params=()):\n \"\"\"\n Implementation of elliptical slice sampling (Murray, Adams, & Mckay, 2010).\n f_...
[ [ "torch.Size" ] ]
tbcole/majoranaJJ
[ "dcf31f7786fa0a4874a940b7d8dcdd55f3921a46", "dcf31f7786fa0a4874a940b7d8dcdd55f3921a46", "dcf31f7786fa0a4874a940b7d8dcdd55f3921a46", "dcf31f7786fa0a4874a940b7d8dcdd55f3921a46" ]
[ "demos/sparse_op/wfuncs/H0/donut.py", "lattice/nbrs.py", "demos/dense_op/bands/HBDG/square.py", "nodular_JJ/finite_sc/phase_diagrams/fxd_gam_gap.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport scipy.sparse.linalg as spLA\n\nimport majoranaJJ.operators.sparse.qmsops as spop #sparse operators\nimport majoranaJJ.lattice.nbrs as nb #neighbor arrays\nimport majoranaJJ.lattice.shapes as shps #lattice shapes\nimport majoranaJJ.modules.plots as plots #...
[ [ "scipy.sparse.linalg.eigsh" ], [ "numpy.ones" ], [ "numpy.shape", "numpy.zeros", "numpy.linspace" ], [ "numpy.linspace", "matplotlib.pyplot.title", "numpy.save", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlim", "matplotlib.pyplot.xlabel", "scipy.signa...
Grusinator/BirdClassification
[ "c78ca3dbf70c2509c79ca4641102a2d725084d2a" ]
[ "lib/utils/SegDataGenerator.py" ]
[ "from keras.preprocessing.image import *\nfrom keras.applications.imagenet_utils import preprocess_input\nfrom keras import backend as K\nfrom PIL import Image\nimport numpy as np\nimport os\n#import cv2\n\n\ndef center_crop(x, center_crop_size, data_format, **kwargs):\n if data_format == 'channels_first':\n ...
[ [ "numpy.lib.pad", "numpy.dot", "numpy.random.random", "numpy.random.seed", "numpy.reshape", "numpy.load", "numpy.cos", "numpy.sin", "numpy.copy", "numpy.std", "numpy.mean", "numpy.isscalar", "numpy.random.uniform", "numpy.array", "numpy.zeros", "numpy...
AyishaR/deepC
[ "1dc9707ef5ca9000fc13c3da7f1129685a83b494", "1dc9707ef5ca9000fc13c3da7f1129685a83b494", "1dc9707ef5ca9000fc13c3da7f1129685a83b494" ]
[ "test/swig/Less.py", "test/swig/LogSoftmax.py", "test/swig/IsInf.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.reshape", "numpy.less", "numpy.random.randn" ], [ "numpy.reshape", "numpy.max", "numpy.random.randn", "numpy.exp", "numpy.sum" ], [ "numpy.random.choice", "numpy.reshape", "numpy.zeros_like", "numpy.random.randn", "numpy.isinf" ] ]
ksboy/superglue
[ "12b5bf6d729ba5b95b8a29682f6bfa584131ae9c" ]
[ "run_classifier.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, 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...
[ [ "numpy.squeeze", "torch.utils.data.DataLoader", "torch.no_grad", "torch.FloatTensor", "torch.cuda.manual_seed_all", "torch.cuda.is_available", "torch.device", "torch.distributed.get_rank", "scipy.special.softmax", "torch.save", "torch.nn.CrossEntropyLoss", "torch.di...
AghaSaad04/mlops-v2
[ "d312ae108c93bacfb3541968bb913874af060ab2" ]
[ "sales_forecast/scoring/score.py" ]
[ "import numpy\r\nimport os\r\nimport math\r\nfrom azureml.core.model import Model\r\nfrom azureml.core.dataset import Dataset\r\nfrom inference_schema.schema_decorators \\\r\n import input_schema, output_schema\r\nfrom inference_schema.parameter_types.numpy_parameter_type \\\r\n import NumpyParameterType\r\ni...
[ [ "pandas.to_datetime", "pandas.Timestamp", "pandas.Timedelta", "numpy.array", "sklearn.preprocessing.MinMaxScaler" ] ]
victorchen276/CarND-Advanced-Lane-Lines
[ "436d81150107c181e3f328adfd3f1c31d6a5cb15" ]
[ "source/Project.py" ]
[ "\nfrom source.camera import camera\nfrom source.LaneDetect import LaneDetect\n\nfrom moviepy.editor import VideoFileClip\nimport glob\nimport matplotlib.pyplot as plt\nimport matplotlib.gridspec as gridspec\nimport matplotlib.image as mpimg\nimport numpy as np\nimport cv2\n\n#\n# def process_video(input_video_file...
[ [ "numpy.dot" ] ]
Lee-Ft/RHA
[ "8a832a9afebc9204148bbd340c31e26c83138024" ]
[ "model/stage.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\nimport pprint\nfrom collections import defaultdict\nfrom .context_query_attention import StructuredAttention\nfrom .encoder import StackedEncoder\nfrom .cnn import DepthwiseSeparableConv\nfrom .model_utils import save_pickle,...
[ [ "torch.nn.functional.softmax", "torch.max", "torch.cat", "torch.FloatTensor", "torch.nn.Dropout", "torch.nn.CrossEntropyLoss", "torch.from_numpy", "torch.sort", "torch.nonzero", "torch.arange", "torch.nn.Sequential", "numpy.nonzero", "torch.nn.ReLU", "torch....
janewen134/catsdogs
[ "051dc0d4bf695ca2db03df6fc3cf758331df4aaa" ]
[ "cats_and_dogs_classification.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# # Cats and Dogs Classification\n\n# Data Loading and Exploring\n\n# In[1]:\n\n\nimport os\nbase_dir = './cats_and_dogs_filtered'\ntrain_dir = os.path.join(base_dir, 'train')\nvalidation_dir = os.path.join(base_dir, 'validation')\n\n# cat training pictures\ntrain_cats_dir...
[ [ "matplotlib.pyplot.imshow", "tensorflow.keras.preprocessing.image.ImageDataGenerator", "matplotlib.pyplot.title", "tensorflow.keras.preprocessing.image.load_img", "matplotlib.pyplot.figure", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.optimi...