repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
nbortych/AEVNMT.pt | [
"360a885a3bab9212a67922f3a9bb44f26c9512fc",
"360a885a3bab9212a67922f3a9bb44f26c9512fc"
] | [
"aevnmt/generate.py",
"aevnmt/dist/priors.py"
] | [
"import torch\nimport numpy as np\nimport sys\nimport time\n\nfrom aevnmt.hparams import Hyperparameters\nfrom aevnmt.data import TextDataset, RawInputTextDataset, remove_subword_tokens, postprocess\nfrom aevnmt.train_monolingual import create_model\nfrom aevnmt.train_utils import load_vocabularies, load_vocabulari... | [
[
"torch.device",
"numpy.array",
"torch.utils.data.DataLoader",
"torch.load",
"numpy.argsort"
],
[
"torch.rand",
"torch.stack",
"torch.nn.ModuleList",
"torch.distributions.Normal",
"torch.ones",
"torch.full",
"torch.distributions.Beta",
"torch.ones_like",
... |
MuhammadFadhilArkan/gym-pybullet-drones | [
"b0670e4b0289210954632c6919ff9b5dc740a61f",
"b0670e4b0289210954632c6919ff9b5dc740a61f"
] | [
"experiments/performance/script.py",
"assignments/aer1216_fall2020_hw1_sim.py"
] | [
"\"\"\"Only used to spawn multiple simulations and evaluate performance.\n\nThis script is similar to `examples/fly.py` and used by `parallelism.sh`.\n\n\"\"\"\nimport os\nimport time\nimport argparse\nfrom datetime import datetime\nimport pdb\nimport math\nimport random\nimport numpy as np\nimport pybullet as p\ni... | [
[
"numpy.array",
"numpy.sin",
"numpy.zeros",
"numpy.cos",
"numpy.hstack",
"numpy.floor"
],
[
"numpy.zeros"
]
] |
AbhilashReddyM/curvpack | [
"74351624ec9ec50ec4445c7be85a48a4eabb029a"
] | [
"curvpack/CurvatureISF.py"
] | [
"\r\n\"\"\"\r\nAbhilash Reddy Malipeddi. January 2017\r\nCalculate the mean and gaussian curvature at a vertex in a tri mesh using\r\nusing an iterative fitting method similar to what is given in [Garimella and Swartz],\r\n[Yazdani and Bagchi], etc.\r\n\r\n\"\"\"\r\n\r\nimport numpy as np\r\nfrom numpy.linalg impor... | [
[
"numpy.zeros_like",
"numpy.array",
"numpy.linalg.norm",
"numpy.setdiff1d",
"numpy.zeros",
"numpy.dot",
"numpy.sqrt",
"numpy.hstack",
"numpy.cross"
]
] |
Khushbu0610/allennlp | [
"60deece9fca2da6b66bfcde44484384bdefa3fe7"
] | [
"allennlp/modules/token_embedders/pretrained_transformer_embedder.py"
] | [
"import math\nfrom typing import Optional, Tuple\n\nfrom overrides import overrides\n\nimport torch\nimport torch.nn.functional as F\nfrom transformers import XLNetConfig\n\nfrom allennlp.data.tokenizers import PretrainedTransformerTokenizer\nfrom allennlp.modules.token_embedders.token_embedder import TokenEmbedder... | [
[
"torch.zeros_like",
"torch.nn.functional.pad",
"torch.cat",
"torch.arange"
]
] |
Frandium/nni | [
"a8c12fb75af3c695b61f48a2525fd2d520860a99"
] | [
"examples/model_compress/pruning/v2/activation_pruning_torch.py"
] | [
"# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\n'''\nNNI example for supported ActivationAPoZRank and ActivationMeanRank pruning algorithms.\nIn this example, we show the end-to-end pruning process: pre-training -> pruning -> fine-tuning.\nNote that pruners use masks to simulate the re... | [
[
"torch.rand",
"torch.no_grad",
"torch.nn.CrossEntropyLoss",
"torch.cuda.is_available",
"torch.randn"
]
] |
taconite/MetaAvatar-release | [
"c9403a478ee82232633d25f65f108befd21d04e9"
] | [
"evaluation/lib/mesh_distance.py"
] | [
"\"\"\"\nOriginal Author: Garvita\nEdited by: Bharat\n\"\"\"\n\nimport torch\nimport kaolin as kal\nfrom kaolin.rep import Mesh\nimport kaolin.cuda.tri_distance as td\nimport numpy as np\nfrom kaolin.metrics.mesh import _compute_edge_dist, _compute_planar_dist, TriangleDistance, point_to_surface\nfrom kaolin.rep im... | [
[
"numpy.array",
"torch.cat",
"scipy.spatial.cKDTree",
"torch.stack",
"numpy.linalg.norm",
"torch.norm",
"torch.abs",
"numpy.where",
"torch.nn.PReLU",
"torch.cross",
"torch.ones_like",
"torch.mean"
]
] |
ddrake/convex_m | [
"6e506133c03bb1e0cf38143a907ac595082d524c"
] | [
"admm/check_output.py"
] | [
"from matplotlib import pyplot as plt\nfrom mat_util import *\n\ndatadir = 'from_coeus/data'\nnxs = load('nxs', datadir)\nfs = load('fs', datadir)\n\nplt.plot(fs)\nplt.xlabel(\"Steps\")\nplt.ylabel(\"Objective Function Values\")\nplt.title(\"Convergence of Objective Function\")\nplt.show()\n\ninput(\"press a key\")... | [
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show"
]
] |
jgori-ouistiti/CoopIHC-zoo | [
"5efb1e1f9e773d793b4634b4671124d43aae3e7d"
] | [
"coopihczoo/eye/tests/test_PlIE.py"
] | [
"from coopihc.space.Space import Space\nfrom coopihc.space.State import State\nfrom coopihc.space.StateElement import StateElement\nfrom coopihc.space.utils import autospace\n\nfrom coopihczoo.eye.utils import ProvideLikelihoodInferenceEngine\n\nimport numpy\n\ngame_state = State(\n game_info=State(\n tur... | [
[
"numpy.array"
]
] |
RPGroup-PBoC/mwc_activation | [
"6ef3f02a53ecd80877082006ecc4b8fe4204c1d6",
"6ef3f02a53ecd80877082006ecc4b8fe4204c1d6"
] | [
"act/_fit_bivariate_normal_AstroML.py",
"code/processing/20190206_r1_28yfp_xan_titration/viz.py"
] | [
"\"\"\"\nNotes:\n These functions were used with modification from the astroML python\n function `fit_bivariate_normal` which can be found [here]\n (http://www.astroml.org/book_figures/chapter3/fig_robust_pca.html). In\n this modified version, the percentiles are computed using the numpy\n function `... | [
[
"numpy.asarray",
"numpy.nanpercentile",
"numpy.mean",
"scipy.stats.pearsonr",
"numpy.std",
"numpy.arctan2",
"numpy.sqrt"
],
[
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.tight_layout",
"pandas.concat",
"pandas.read_csv"
]
] |
syuqings/Fashion-MMT | [
"809c88cade3328176b202db543e686bce99ef76a"
] | [
"readers/data.py"
] | [
"from __future__ import print_function\nfrom __future__ import division\n\nimport os\nimport json\nimport numpy as np\nimport random\nimport pdb\nimport math\n\nfrom cytoolz import partition_all\nimport torch.utils.data\nfrom torch.utils.data import Sampler\n\nUNK, PAD, BOS, EOS, MASK = 0, 1, 2, 3, 4\n\n\nclass MMT... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.load",
"numpy.zeros"
]
] |
workingyifei/display-pattern-generator | [
"9444dce96954c546333d5aecc92a06c3bfd19aa5",
"9444dce96954c546333d5aecc92a06c3bfd19aa5",
"b27be84c6221fa93833f283109870737b05bfbf6",
"b27be84c6221fa93833f283109870737b05bfbf6",
"9444dce96954c546333d5aecc92a06c3bfd19aa5"
] | [
"VENV/lib/python3.6/site-packages/pandas/tests/indexes/common.py",
"VENV/lib/python3.6/site-packages/pandas/tests/series/test_api.py",
"VENV/lib/python3.6/site-packages/numpy/testing/_private/utils.py",
"VENV/lib/python3.6/site-packages/numpy/lib/histograms.py",
"VENV/lib/python3.6/site-packages/pandas/test... | [
"# -*- coding: utf-8 -*-\n\nimport pytest\n\nfrom pandas import compat\nfrom pandas.compat import PY3\n\nimport numpy as np\n\nfrom pandas import (Series, Index, Float64Index, Int64Index, UInt64Index,\n RangeIndex, MultiIndex, CategoricalIndex, DatetimeIndex,\n TimedeltaIndex, ... | [
[
"pandas.util.testing.assert_numpy_array_equal",
"numpy.repeat",
"pandas.Index",
"numpy.array",
"pandas.isna",
"numpy.errstate",
"pandas.util.testing.round_trip_pickle",
"pandas.compat.iteritems",
"pandas.CategoricalIndex",
"pandas.util.testing.assert_index_equal",
"pand... |
hyunynim/im2avatar | [
"db7f01b79f7edf200815351b6d5821044605c0fd"
] | [
"train_color_human.py"
] | [
"import tensorflow as tf\nimport numpy as np\nimport os\nimport sys\nsys.path.append('./utils')\nsys.path.append('./models')\n\nimport dataset_human as dataset\nimport model_color as model\n\nFLAGS = tf.app.flags.FLAGS\ntf.app.flags.DEFINE_string('train_dir', './train_color_human',\n \"\"\... | [
[
"tensorflow.app.flags.DEFINE_integer",
"tensorflow.minimum",
"tensorflow.train.AdamOptimizer",
"tensorflow.app.flags.DEFINE_string",
"tensorflow.Graph",
"tensorflow.Session",
"tensorflow.Variable",
"tensorflow.train.Saver",
"tensorflow.train.get_checkpoint_state",
"tensorfl... |
vsobolmaven/python-statlib | [
"f0dc8c1a93c5536c3c4a32fa425ddd081349dccd",
"f0dc8c1a93c5536c3c4a32fa425ddd081349dccd"
] | [
"statlib/pstat.py",
"statlib/anova.py"
] | [
"# Copyright (c) 1999-2007 Gary Strangman; All Rights Reserved.\r\n#\r\n# Permission is hereby granted, free of charge, to any person obtaining a copy\r\n# of this software and associated documentation files (the \"Software\"), to deal\r\n# in the Software without restriction, including without limitation the right... | [
[
"numpy.concatenate",
"numpy.equal",
"numpy.array",
"numpy.reshape",
"numpy.sum",
"numpy.shape",
"numpy.take",
"numpy.where",
"numpy.resize",
"numpy.ravel",
"numpy.sort"
],
[
"numpy.array",
"numpy.compress",
"numpy.add.reduce",
"numpy.zeros",
"num... |
nbl97/nni | [
"1530339d3e964a5ea95a0afde1775ec9167cdcc0"
] | [
"nni/retiarii/nn/pytorch/cell.py"
] | [
"# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport copy\nimport warnings\nfrom typing import Callable, Dict, List, Union, Optional, Tuple, Sequence, cast\ntry:\n from typing import Literal\nexcept ImportError:\n from typing_extensions import Literal\n\nimport torch\nimport to... | [
[
"torch.cat",
"torch.stack"
]
] |
LBJ-Wade/MultiLens | [
"0d88d734b07c178725f926b0a055c6084b91f6d7"
] | [
"MultiLens/MultiLens.py"
] | [
"#! /usr/bin/env python\n\n# Copyright (C) 2016 ETH Zurich, Institute for Astronomy\n\n# System imports\nfrom __future__ import print_function, division, absolute_import, unicode_literals\n\n\n# External modules\nimport numpy as np\nimport copy\n\n# MultiLens imports\nfrom MultiLens.analytic_lens import AnalyticLen... | [
[
"numpy.zeros_like"
]
] |
kizzhang/langevinSimulation | [
"98e0c3f33e4c9d6ecb11972e5fbe9388626274f8"
] | [
"abp_modified.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Tue Oct 19 12:08:47 2021\r\n\r\n@author: Kaneki\r\n\"\"\"\r\n# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Mon Oct 18 17:28:36 2021\r\n\r\n@author: Kaneki\r\n\"\"\"\r\n\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.animation import Fun... | [
[
"numpy.sin",
"numpy.random.randn",
"matplotlib.pyplot.figure",
"numpy.random.uniform",
"numpy.sqrt",
"numpy.cos",
"numpy.hstack",
"matplotlib.pyplot.axes"
]
] |
cathyzhyi/mlir-npcomp | [
"79a3f639bfb449ba1409ff6dff161badf5a11b44"
] | [
"frontends/pytorch/test/ivalue_import/list.py"
] | [
"# -*- Python -*-\n# This file is licensed under a pytorch-style license\n# See frontends/pytorch/LICENSE for license information.\n\nimport typing\n\nimport torch\nimport torch_mlir\n\n# RUN: %PYTHON %s | npcomp-opt | FileCheck %s\n\nmb = torch_mlir.ModuleBuilder()\n\nclass TestModule(torch.nn.Module):\n def __... | [
[
"torch.jit.script"
]
] |
LeoLugoF/TDSpectrum | [
"bec2a86294ab563db889e8a4b1f9c9d7c4599871"
] | [
"TDSpectrum.py"
] | [
"import matplotlib\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nimport os\r\nimport sys\r\nimport platform\r\nfrom math import exp\r\n\r\n#########################################################################\r\n# TDSpectrum #\r\n# Made by... | [
[
"numpy.array",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.subplots",
"numpy.arange",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show"
]
] |
anyboby/ConstrainedMBPO | [
"036f4ffefc464e676a287c35c92cc5c0b8925fcf",
"036f4ffefc464e676a287c35c92cc5c0b8925fcf",
"036f4ffefc464e676a287c35c92cc5c0b8925fcf"
] | [
"softlearning/samplers/model_sampler.py",
"mbpo/models/nn.py",
"softlearning/policies/safe_utils/logx.py"
] | [
"from collections import defaultdict\nfrom collections import deque, OrderedDict\nfrom itertools import islice\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport random\n\nfrom softlearning.samplers.cpo_sampler import CpoSampler\nfrom softlearning.policies.safe_utils.logx import EpochLogger\nfrom softle... | [
[
"numpy.logical_not",
"numpy.max",
"numpy.zeros_like",
"numpy.zeros",
"numpy.sum",
"numpy.tile",
"numpy.mean",
"numpy.any",
"numpy.arange",
"numpy.random.randint",
"numpy.repeat",
"numpy.squeeze",
"numpy.var"
],
[
"tensorflow.square",
"tensorflow.shap... |
solsword/fleece | [
"f2259b67add9a660cc3185cb89681520d0e61b33"
] | [
"ngen.py"
] | [
"#!/usr/bin/env python\n\"\"\"\nGenerates images that resemble input images.\n\nStacked denoising autoencoder-style neural network code using theano.\n\nWritten with reference to tutorial code from:\n https://github.com/lisa-lab/DeepLearningTutorials.git\nTutorial page:\n http://deeplearning.net/tutorial/SdA.html... | [
[
"numpy.max",
"numpy.full",
"numpy.random.random_integers",
"numpy.asarray",
"numpy.zeros",
"numpy.random.RandomState",
"numpy.random.shuffle",
"numpy.random.uniform",
"numpy.argmax",
"numpy.argsort",
"numpy.sqrt"
]
] |
PhoeniXuzoo/NU-Projects | [
"a217ad46e6876ceffb3dec1d6e52f775674b2e8b"
] | [
"EE475/Ch6P16.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\ndef readData(csvname):\n data = np.loadtxt(csvname, delimiter=',')\n x = data[:-1, :]\n y = data[-1:, :]\n\n return x, y\n\nfot = lambda x : np.exp(-x) / (1 + np.exp(-x))\nsot = lambda x : ( 1 / (1 + np.exp(x))) * (1 - ( 1 / (1 + np.exp(x))))\n\n# ... | [
[
"numpy.dot",
"numpy.zeros",
"matplotlib.pyplot.plot",
"numpy.ones",
"numpy.exp",
"numpy.loadtxt",
"matplotlib.pyplot.show",
"numpy.transpose",
"numpy.size",
"matplotlib.pyplot.scatter",
"numpy.linalg.inv"
]
] |
vbelz/Lyrics_classifier | [
"57d4fec9b00b3835a71ebdd3c234fed629079f22"
] | [
"prepare_for_training.py"
] | [
"import spacy as spacy_en\nimport pandas as pd\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.feature_extraction.text import TfidfTransformer\nimport pickle\nimport os\n\nmodel = spacy_en.load('en_core_web_md')\n\ndef clean_my_text(song):\n\n \"\"\" It filters punctuation, numbers, st... | [
[
"sklearn.feature_extraction.text.TfidfTransformer",
"sklearn.feature_extraction.text.CountVectorizer"
]
] |
readthedocs-assistant/autocnet | [
"579cccd0edc4cd870b5d9671165ebd830f1112b8",
"579cccd0edc4cd870b5d9671165ebd830f1112b8"
] | [
"autocnet/matcher/tests/test_cpu_ring_matcher.py",
"autocnet/spatial/surface.py"
] | [
"from unittest import mock\n\nimport numpy as np\nimport pytest\n\nfrom autocnet.matcher import cpu_ring_matcher as rm\n\n@pytest.mark.parametrize('arr, expected', [\n (np.array([[1,0],[1,1], [2,3]]), (1,2)),\n (np.array([[0,0], [1,1], [2,2]]), (3,2)\n ... | [
[
"numpy.array",
"numpy.testing.assert_array_equal",
"numpy.ones",
"numpy.arange",
"numpy.issubdtype"
],
[
"numpy.deg2rad",
"numpy.sqrt"
]
] |
horseriver/csgm | [
"0f77d9c749dd31ce03b104dc2d355267e3ced038"
] | [
"celebA_dcgan/model_def.py"
] | [
"# pylint: disable = C0103, C0111, C0301, R0914\n\n\"\"\"Model definitions for celebA\n\nThis file is partially based on\nhttps://github.com/carpedm20/DCGAN-tensorflow/blob/master/main.py\nhttps://github.com/carpedm20/DCGAN-tensorflow/blob/master/model.py\n\nThey come with the following license: https://github.com/... | [
[
"tensorflow.nn.tanh",
"tensorflow.nn.sigmoid",
"tensorflow.get_variable_scope",
"tensorflow.reshape"
]
] |
bmedishe/pytorch | [
"7fc73285da2c8918cf039a2c3e0eeed241478e40"
] | [
"test/run_test.py"
] | [
"#!/usr/bin/env python3\n\nimport argparse\nimport copy\nfrom datetime import datetime\nfrom distutils.util import strtobool\nfrom distutils.version import LooseVersion\nimport functools\nimport os\nimport pathlib\nimport shutil\nimport signal\nimport subprocess\nimport sys\nimport tempfile\n\nimport torch\nfrom to... | [
[
"torch.distributed.is_available",
"torch.distributed.is_nccl_available",
"torch.distributed.is_mpi_available",
"torch.distributed.is_gloo_available",
"torch.utils.cpp_extension.verify_ninja_availability",
"torch.cuda.device_count",
"torch.testing._internal.common_utils.set_cwd",
"t... |
danielkentwood/fireTS | [
"3b00ae932e13997a0d069515273c09fc24e0593d"
] | [
"fireTS/core.py"
] | [
"import numpy as np\r\nfrom sklearn.base import BaseEstimator, RegressorMixin\r\nfrom sklearn.utils.validation import check_X_y\r\nfrom fireTS.utils import shift, MetaLagFeatureProcessor\r\nfrom sklearn.model_selection import GridSearchCV\r\n\r\n\r\nclass TimeSeriesRegressor(BaseEstimator, RegressorMixin):\r\n \... | [
[
"numpy.array",
"numpy.isnan",
"numpy.empty",
"sklearn.utils.validation.check_X_y",
"sklearn.model_selection.GridSearchCV"
]
] |
havanagrawal/ml-from-scratch | [
"1f5aacc3bb8f831dadf5f27cf8d6fa867b4ec3ab"
] | [
"examples/spam_trainer.py"
] | [
"import os\nimport sys\n\nimport logging\nlogging.basicConfig(format='%(asctime)s %(levelname)-8s [%(process)d] %(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S')\n\nimport numpy as np\n\nfrom sklearn import preprocessing\nfrom sklearn.model_selection import GridSearchCV\nfrom sklearn.metrics import acc... | [
[
"numpy.linspace"
]
] |
obulrdy6881/Drowsinss | [
"61cb9281d7dd22aee282b517e2fbf500f0ff9935"
] | [
"my_env/Lib/site-packages/sklearn/cluster/_birch.py"
] | [
"# Authors: Manoj Kumar <manojkumarsivaraj334@gmail.com>\r\n# Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\r\n# Joel Nothman <joel.nothman@gmail.com>\r\n# License: BSD 3 clause\r\n\r\nimport warnings\r\nimport numbers\r\nimport numpy as np\r\nfrom scipy import sparse\r\nfrom math i... | [
[
"scipy.sparse.issparse",
"numpy.dot",
"numpy.zeros",
"numpy.argmin"
]
] |
cdds-uiuc/simles-book | [
"79f0fe1133d44f6b94b4bdcd0f05ff65434240c9"
] | [
"_build/jupyter_execute/content/Module02/M02_N02_Optimization.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# # Optimization\n\n# In[101]:\n\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom scipy import stats\n\n# These are some parameters to make figures nice (and big)\n\n#%matplotlib inline\n#%config InlineBackend.figure_format = 'retina' \nparams = {'legend.fontsi... | [
[
"matplotlib.pyplot.rcParams.update",
"matplotlib.pyplot.colorbar",
"scipy.stats.norm.rvs",
"numpy.zeros",
"matplotlib.cm.get_cmap",
"numpy.exp",
"matplotlib.pyplot.subplots",
"scipy.optimize.minimize",
"numpy.array2string",
"numpy.linspace",
"numpy.meshgrid",
"matpl... |
KaviyaSubramanian706/bt-gate-classifier | [
"082775587ccc795c54845572d45743008a8dc892"
] | [
"video_classify.py"
] | [
"import time\nfrom absl import app, flags, logging\nfrom absl.flags import FLAGS\nimport os\nimport numpy as np\nimport argparse\nimport pandas as pd\nimport cv2\nimport csv\nfrom sklearn.metrics import classification_report, confusion_matrix\nfrom normalizer import Normalizer\n\nimport tensorflow as tf\nconfig = t... | [
[
"numpy.max",
"numpy.array",
"tensorflow.keras.preprocessing.image.load_img",
"tensorflow.expand_dims",
"tensorflow.compat.v1.ConfigProto",
"tensorflow.compat.v1.Session",
"tensorflow.keras.models.load_model",
"numpy.argmax",
"numpy.sqrt",
"tensorflow.nn.softmax",
"tenso... |
Alchemist101010/genesis | [
"1280f7e6af439f6eb9173804d2931078a82190d3"
] | [
"arch1.py"
] | [
"import tensorflow as tf\r\nimport keras\r\nimport numpy as np \r\nimport matplotlib.pyplot as plt\r\nimport seaborn as sb\r\nimport sys \r\nsys.setrecursionlimit(100000)\r\n\r\nfashion = keras.datasets.fashion_mnist\r\n(train_images, train_labels), (test_images, test_labels) = fashion.load_data()\r\nclass_names = ... | [
[
"numpy.max",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.colorbar",
"tensorflow.train.AdamOptimizer",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.figure",
"numpy.argmax",
"matplotlib.... |
LarsNeR/stellargraph | [
"ee993bb600745a37d994fa4da628268b1cd657dc"
] | [
"tests/data/test_metapath_walker.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# Copyright 2017-2020 Data61, CSIRO\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requir... | [
[
"pandas.DataFrame"
]
] |
Werni2A/galois | [
"97c35afdd1ad38705f2b1e643237fbd2f87bb6e3"
] | [
"tests/fields/test_instantiation.py"
] | [
"\"\"\"\nA pytest module to test instantiation of new Galois field arrays.\n\"\"\"\nimport random\n\nimport pytest\nimport numpy as np\n\nimport galois\n\nfrom ..helper import array_equal\n\n\nDTYPES = galois.dtypes.DTYPES + [np.object_]\n\n\ndef test_cant_instantiate_GF():\n v = [0, 1, 0, 1]\n with pytest.ra... | [
[
"numpy.array"
]
] |
MAWUT0R/PokerRL | [
"95708a5f7a16cb151bc4253132bdfd22ea7a9b25"
] | [
"PokerRL/cfr/_MCCFRBase.py"
] | [
"# Copyright (c) 2019 Eric Steinberger\n\n\nimport copy\n\nimport numpy as np\nimport sys\n\nfrom PokerRL.game._.tree.MCPublicTree import MCPublicTree\nfrom PokerRL.game.wrappers import HistoryEnvBuilder\nfrom PokerRL.rl.rl_util import get_env_cls_from_str\n\n\nclass MCCFRBase:\n \"\"\"\n base class to all fu... | [
[
"numpy.zeros",
"numpy.sum",
"numpy.copy",
"numpy.mean",
"numpy.nonzero",
"numpy.expand_dims"
]
] |
BouchardLab/pylearn2 | [
"4cab785b870d22cd9e85a5f536d4cac234b6bf60",
"4cab785b870d22cd9e85a5f536d4cac234b6bf60"
] | [
"pylearn2/energy_functions/tests/test_rbm_energy.py",
"pylearn2/models/tests/test_autoencoder.py"
] | [
"import theano\ntheano.config.compute_test_value = 'off'\nfrom pylearn2.energy_functions.rbm_energy import GRBM_Type_1\nimport numpy as N\nfrom theano.compat.six.moves import xrange\nimport theano.tensor as T\nfrom theano import function\nfrom pylearn2.utils import as_floatX\nfrom pylearn2.utils import sharedX\nfro... | [
[
"numpy.allclose",
"numpy.exp",
"numpy.zeros",
"numpy.random.RandomState"
],
[
"numpy.dot",
"numpy.random.randn"
]
] |
SchubertLab/mvTCR | [
"d815749e24650f69ef68054e0078d490af91b71d"
] | [
"tcr_embedding/models/mixture_modules/separate_model.py"
] | [
"import torch\nimport torch.nn as nn\n\nfrom tcr_embedding.models.architectures.transformer import TransformerEncoder, TransformerDecoder\nfrom tcr_embedding.models.architectures.mlp import MLP\nfrom tcr_embedding.models.architectures.mlp_scRNA import build_mlp_encoder, build_mlp_decoder\nfrom tcr_embedding.models.... | [
[
"torch.nn.Embedding",
"torch.cat",
"torch.FloatTensor",
"torch.randn_like",
"torch.ones_like",
"torch.exp",
"torch.randn"
]
] |
Qin-Ming/nilearn | [
"82f4075d8a8ea9aec25e66bd87ebb79a6be6d32f"
] | [
"nilearn/plotting/tests/test_html_document.py"
] | [
"import os\nimport time\nimport pytest\nimport tempfile\nimport webbrowser\nfrom nilearn.plotting import html_document\n\nfrom numpy.testing import assert_no_warnings\n\n# Note: html output by nilearn view_* functions\n# should validate as html5 using https://validator.w3.org/nu/ with no\n# warnings\n\n\ndef _open_... | [
[
"numpy.testing.assert_no_warnings"
]
] |
brechtvl/embree | [
"ae029e2ff83bebbbe8742c88aba5b0521aba1a23"
] | [
"scripts/generate_motion_derivative_coefficients.py"
] | [
"#!/usr/bin/python\n\n## Copyright 2009-2021 Intel Corporation\n## SPDX-License-Identifier: Apache-2.0\n\nimport sympy as sp\nimport numpy as np\nimport math\n\n\n################################################################################\n#### Utils\n###########################################################... | [
[
"numpy.empty"
]
] |
Mingzheng01/pointnet | [
"401692e08441ff459b63786b9c65c11f78ea599e"
] | [
"sample_from_mesh.py"
] | [
"import open3d as o3d\nimport os\nimport numpy as np\nimport h5py\n\npoint_clouds = []\nfor dirpath, dirnames, filenames in os.walk(\"F:\\\\cases\\\\tooth_11_stls\"):\n for filename in filenames:\n print(os.path.splitext(filename)[-1])\n if os.path.splitext(filename)[-1] != \".stl\":\n c... | [
[
"numpy.array"
]
] |
rkansal47/weaver | [
"7e9d3d8c9ee43acb2a95f2d3f76c384822e04699"
] | [
"utils/data/tools.py"
] | [
"import numpy as np\nimport math\n\ntry:\n import awkward0 as awkward\nexcept ImportError:\n import awkward\n if awkward.__version__[0] == '1':\n raise ImportError('Please install awkward0 with `pip install awkward0`.')\n\n\ndef _concat(arrays, axis=0):\n if len(arrays) == 0:\n return np.a... | [
[
"numpy.concatenate",
"numpy.array",
"scipy.spatial.cKDTree",
"numpy.random.shuffle",
"numpy.stack",
"numpy.arange",
"numpy.argsort",
"numpy.clip"
]
] |
VXallset/deep-high-resolution-net.TensorFlow | [
"d885abc6f8699f5dfd09b270170f3c68fbf32ac2"
] | [
"src/utils.py"
] | [
"\"\"\"\nThis is the utils for deep learning, implemented with TensorFlow.\n\n@ Author: Yu Sun. vxallset@outlook.com\n\n@ Date created: Jun 04, 2019\n\n@ Last modified: Jun 06, 2019\n\n\"\"\"\nimport tensorflow as tf\n\n\ndef leaky_Relu(input, name=''):\n return tf.nn.leaky_relu(input, alpha=0.1, name=name + '_r... | [
[
"tensorflow.nn.leaky_relu",
"tensorflow.layers.max_pooling2d",
"tensorflow.layers.batch_normalization",
"tensorflow.image.resize_nearest_neighbor",
"tensorflow.variable_scope",
"tensorflow.layers.conv2d",
"tensorflow.add",
"tensorflow.random_normal_initializer"
]
] |
cgyqu/python_learning | [
"55c8df4a963c40ace050d3454b72538190cb0517"
] | [
"ml/time_series02.py"
] | [
"#%%\nfrom numpy import array\nfrom numpy import hstack\nfrom keras.models import Sequential\nfrom keras.layers import LSTM\nfrom keras.layers import Dense\nfrom keras.layers import RepeatVector\nfrom keras.layers import TimeDistributed\n#%%\n# split a multivariate sequence into samples\ndef split_sequences(sequenc... | [
[
"numpy.hstack",
"numpy.array"
]
] |
aacsspkt/autodealerappliation | [
"c7ab3ae8e57e91c797129e87a13bd00d41bc4753"
] | [
"app/customer/views.py"
] | [
"from django.views.generic import ListView, DetailView, FormView\nfrom django.views.generic.edit import CreateView, UpdateView, DeleteView\nfrom django.contrib.messages.views import SuccessMessageMixin\nfrom django.contrib.auth.decorators import login_required\nfrom django.utils.decorators import method_decorator\n... | [
[
"pandas.read_csv"
]
] |
Ascend-Huawei/AVOD | [
"ea62372517bbfa9d4020bc5ab2739ee182c63c56"
] | [
"avod/datasets/kitti/kitti_aug.py"
] | [
"# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"numpy.concatenate",
"numpy.logical_not",
"numpy.cov",
"numpy.asarray",
"numpy.linalg.eigh",
"numpy.copy",
"numpy.random.randn",
"numpy.sqrt",
"numpy.clip",
"numpy.fliplr"
]
] |
streamlit-badge-bot/a3-thanos | [
"3c673ce6a1321a9229a34a09e4e5f29313825e4f"
] | [
"streamlit_app.py"
] | [
"import streamlit as st\nimport pandas as pd\nimport altair as alt\nfrom vega_datasets import data\n\nst.title(\"Let's analyze some CO2 emission data 🌎\")\nMAX_WIDTH = 1000\n@st.cache # add caching so we load the data only once\ndef load_data():\n climate_url = \"https://raw.githubusercontent.com/ZeningQ... | [
[
"pandas.read_table",
"pandas.read_csv"
]
] |
minhhoccode/Interpolate-with-flask | [
"7f8cb8f551e9bd36beca911e0987b6c1bc168356"
] | [
"NoiSuy.py"
] | [
"from sympy import *\r\nimport numpy as np\r\nimport array as arr\r\n\r\ndef TongQuat(X, Y):\r\n list ( zip(X , Y ) )\r\n x = symbols('x')\r\n m = len(X)\r\n A = [[X[i] ** j for j in range (m) ] for i in range (m) ] \r\n kq = np.linalg.solve(A,Y)\r\n hamSo = ''\r\n for i in range (len(kq)):\r\n... | [
[
"numpy.linalg.solve"
]
] |
Xi-L/PMOCO | [
"81dc7c66e5bee34f401d16c29cc39b5e2c3a62e6"
] | [
"MOKP/POMO/test_mokp_n100.py"
] | [
"##########################################################################################\r\n# Machine Environment Config\r\nDEBUG_MODE = False\r\nUSE_CUDA = not DEBUG_MODE\r\nCUDA_DEVICE_NUM = 0\r\n\r\n##########################################################################################\r\n# Path Config\r\n... | [
[
"torch.zeros",
"numpy.array",
"matplotlib.style.use",
"numpy.zeros",
"matplotlib.pyplot.axhline",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.axvline",
"torch.sum"
]
] |
AntonMu/albert | [
"f928a488380d359520e407e7862b031ffa5bb603"
] | [
"run_classifier.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Team 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 requi... | [
[
"tensorflow.compat.v1.gfile.MakeDirs",
"tensorflow.compat.v1.logging.info",
"tensorflow.compat.v1.gfile.Remove",
"tensorflow.compat.v1.flags.DEFINE_string",
"tensorflow.contrib.tpu.TPUConfig",
"tensorflow.contrib.tpu.TPUEstimator",
"tensorflow.compat.v1.gfile.Exists",
"tensorflow.c... |
CsatiZoltan/imagepy | [
"9a60ad3b1e8f79f2dcc47e4f246a4f31a96f99f5",
"df44caef2822f2c543b9fa4ef6132a7b1014623e"
] | [
"imagepy/tools/Draw/floodfill_tol.py",
"imagepy/tools/Measure/profile_tol.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Oct 19 17:35:09 2016\n\n@author: yxl\n\"\"\"\n\nfrom imagepy.core.engine import Tool\nimport numpy as np\nfrom imagepy.core.manager import ColorManager\n# from imagepy.core.draw.fill import floodfill\nfrom skimage.morphology import flood_fill, flood\n\nclass Plugin(T... | [
[
"numpy.ones",
"numpy.mean"
],
[
"numpy.array",
"numpy.arccos",
"numpy.linalg.norm",
"pandas.DataFrame",
"numpy.sign"
]
] |
neonbjb/tortoise-tts | [
"a9e64e216d871f52c091465f2a2a8e503737a69c"
] | [
"tortoise/utils/wav2vec_alignment.py"
] | [
"import re\n\nimport torch\nimport torchaudio\nfrom transformers import Wav2Vec2ForCTC, Wav2Vec2FeatureExtractor, Wav2Vec2CTCTokenizer, Wav2Vec2Processor\n\nfrom tortoise.utils.audio import load_audio\n\n\ndef max_alignment(s1, s2, skip_character='~', record=None):\n \"\"\"\n A clever function that aligns s1 ... | [
[
"torch.cat",
"torch.save",
"torch.no_grad"
]
] |
thunlp/EntityDuetNeuralRanking | [
"3efbc1f6ccffb5b149d08030fde8dd059fce0fa1"
] | [
"data/preprocess.py"
] | [
"''' Handling the data io '''\nimport argparse\nimport torch\nimport sys\n\n\n\ndef read_vocab_idx(vocab_path):\n ''' build vocab '''\n\n word2idx = {\"_PAD\" : 0}\n\n with open(vocab_path) as f:\n for line in f:\n tokens = line.strip(\"\\n\").split(\"\\t\")\n no = int(tokens[1... | [
[
"torch.save"
]
] |
fantamat/gtrain | [
"9538697768deb0f88c3efdbd617e882d0ecc2bc4"
] | [
"gtrain/utils.py"
] | [
"import numpy as np\nimport os\nfrom tensorboard.backend.event_processing.event_accumulator import EventAccumulator\n\n\ndef get_loss_and_accuracy(save_dir):\n \"\"\"\n loads scalars from training procedure saved in summaries created by gtrain\n :param save_dir: same as save_dir in gtrain method\n :retu... | [
[
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.load",
"numpy.eye",
"numpy.argmax",
"numpy.savez_compressed"
]
] |
mariesig/privacy-evaluator | [
"4e6ced65cc71bb661aef4518192517e23e22595e",
"4e6ced65cc71bb661aef4518192517e23e22595e"
] | [
"privacy_evaluator/metrics/basics.py",
"privacy_evaluator/models/tf/dcti.py"
] | [
"import numpy as np\n\n\ndef accuracy(y: np.ndarray, y_prediction: np.ndarray) -> np.float32:\n \"\"\"Calculates accuracy for true labels and predicted labels.\n\n :params y: True labels.\n :params y_prediction: Predicted labels.\n :return: Accuracy\n :raises ValueError: If true labels and predicted ... | [
[
"numpy.argmax"
],
[
"tensorflow.keras.layers.SpatialDropout2D",
"tensorflow.keras.layers.Flatten",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.models.load_model",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.layers.Dropout",... |
glassroom/torch_train_test_loop | [
"fbd575c59cbf2823d13eb1df86b5d90f29febd23"
] | [
"torch_train_test_loop.py"
] | [
"import torch\nimport contextlib\n\nTRAIN_DESC, VALID_DESC, TEST_DESC = ('train', 'valid', 'test')\n\nclass EarlyStopException(Exception):\n pass\n\nclass LoopComponent():\n r\"\"\"\n Base class for loop components. Each method is a callback to be\n invoked by a `TrainTestLoop` instance, which is passed... | [
[
"torch.no_grad"
]
] |
JulianKu/megastep | [
"21ac85510d03f20600d438618a02569c6f1e34e1"
] | [
"rebar/stats/gpu.py"
] | [
"import torch\nimport pandas as pd\nfrom io import BytesIO\nfrom subprocess import check_output\nfrom . import writing\nimport time\n\n\ndef memory(device=0):\n total_mem = torch.cuda.get_device_properties(f'cuda:{device}').total_memory\n writing.max(f'gpu-memory/cache/{device}', torch.cuda.max_memory_cached(... | [
[
"torch.cuda.max_memory_cached",
"torch.cuda.get_device_properties",
"torch.cuda.reset_max_memory_allocated",
"torch.cuda.max_memory_allocated",
"torch.cuda.reset_max_memory_cached"
]
] |
GeWu-Lab/MUSIC-AVQA_CVPR2022 | [
"f704130f37a342b5ff861780282c75cc875221b2"
] | [
"net_grd_baseline/nets_qa_grd_baseline.py"
] | [
"import torch\nimport torchvision.models as models\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nimport numpy as np\nfrom visual_net import resnet18\n\n\ndef batch_organize(audio_data, posi_img_data, nega_img_data):\n\n # print(\"audio data: \", audio_data.shape)\n (B, T, C) = audio_data.size()\n... | [
[
"torch.zeros",
"torch.nn.Linear",
"torch.cat",
"torch.nn.Dropout",
"torch.nn.LSTM",
"torch.nn.LayerNorm",
"torch.mul",
"torch.nn.Tanh",
"torch.nn.MultiheadAttention",
"torch.nn.ReLU",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.Embedding"
]
] |
edgardeng/machine-learning-pytorch | [
"24a060894f5226b5ef20cc311db72f1adc037548",
"24a060894f5226b5ef20cc311db72f1adc037548"
] | [
"practice-ocr/train_code/train_ctpn/data/dataset.py",
"practice-ocr/detect/ctpn_utils.py"
] | [
"#-*- coding:utf-8 -*-\n#'''\n# Created on 18-12-27 上午10:34\n#\n# @Author: Greg Gao(laygin)\n#'''\n\nimport os\nimport xml.etree.ElementTree as ET\nimport numpy as np\nimport cv2\nfrom torch.utils.data import Dataset\nimport torch\nfrom config import IMAGE_MEAN\nfrom ctpn_utils import cal_rpn\n\n\ndef readxml(path)... | [
[
"numpy.array",
"numpy.random.randint",
"numpy.expand_dims",
"torch.from_numpy"
],
[
"numpy.minimum",
"numpy.exp",
"numpy.min",
"numpy.mean",
"numpy.where",
"numpy.max",
"numpy.empty",
"numpy.log",
"numpy.fabs",
"numpy.arange",
"numpy.polyfit",
"n... |
rom1mouret/kak | [
"e6edb931d94f8a675ed6eb441a6b796dd8b35894"
] | [
"shoputils/shoputils/data_fitter.py"
] | [
"import yaml\nimport numpy as np\nimport re\nimport os\nimport time\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom .util import (\n to_gpu, split_chunk, slice_tensors,\n build_vocab, clean_strings, generate_uid,\n yaml_serializable, hash_strings\n)\n\n\nclass Ne... | [
[
"torch.nn.NLLLoss",
"torch.nn.Linear",
"torch.nn.EmbeddingBag",
"torch.cat",
"numpy.array",
"torch.nn.Dropout",
"numpy.log",
"torch.nn.LogSoftmax",
"numpy.percentile",
"numpy.random.permutation",
"torch.nn.LeakyReLU",
"torch.nn.functional.linear",
"torch.LongTen... |
pvalienteverde/MeetUpIntroMLySistemasRecomendacion | [
"50e24dfc5303b0d4a9edaf4ff634d25388351343"
] | [
"scripts/Introduccion/utiles.py"
] | [
"import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndef to_hot_encoding(datos,caracteristicas_categoricas): \n for cat in caracteristicas_categoricas:\n one_encoding=pd.get_dummies(datos[cat],prefix=cat)\n datos=pd.concat([datos,one_encoding],axis=1)\n del datos[c... | [
[
"pandas.concat",
"pandas.get_dummies",
"matplotlib.pyplot.figure"
]
] |
Timsbim/Show-COVID-19-Data | [
"170109015eef03d0639fb48840aeb46133beb139"
] | [
"lib/showing.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom matplotlib import pyplot as plt\n\nfrom lib.basics import *\nfrom lib.prepping import get_base_data\n\n\n# Showing the data\n\n\ndef get_country_data_to_show(date_, plots, *countries, length=1000):\n \"\"\"Returns the data from day date_ for the categories and varia... | [
[
"pandas.DataFrame",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots",
"pandas.Series",
"matplotlib.pyplot.show"
]
] |
wclark3/machine-learning | [
"f4f09d6d1efa022d9c34647883e49ae8e2f1fe6c"
] | [
"final-project/old/gpu-tutorial/kfkd.py"
] | [
"# file kfkd.py\nimport os\n\nimport numpy as np\nfrom pandas.io.parsers import read_csv\nfrom sklearn.utils import shuffle\n\n# Implicit import needed in newer theano versions\n# https://groups.google.com/forum/#!msg/lasagne-users/gEtFrC8mkms/0oNCDbSKbTkJ\nimport lasagne.layers.cuda_convnet\n\nFTRAIN = '../data/tr... | [
[
"numpy.fromstring",
"numpy.vstack",
"sklearn.utils.shuffle"
]
] |
nanfeng1101/DBQA | [
"56b0a320e4641f46e80db78039d4ca79e9037d7e"
] | [
"torch_models/qa_cnn.py"
] | [
"# -*- coding:utf-8 -*-\n__author__ = 'chenjun'\n\nimport torch\nimport torch.nn as nn\nfrom torch_models.layers import InteractLayer, BatchNormLayer, MLP, MLPDropout\n\n\nclass CNNModule(nn.Module):\n \"\"\"\n qa_cnn module.\n \"\"\"\n def __init__(self, feature_maps, filter_shape, pool_size, channels=... | [
[
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.cat",
"torch.nn.MaxPool2d"
]
] |
haifeng-jin/SMAC3 | [
"999d04408f084ec085844255b592e485dba241dd"
] | [
"examples/rf.py"
] | [
"import logging\nimport os\nimport inspect\n\nimport numpy as np\nfrom sklearn.metrics import make_scorer\nfrom sklearn.cross_validation import cross_val_score\nfrom sklearn.ensemble import RandomForestRegressor\nfrom sklearn.datasets import load_boston\n\nfrom smac.configspace import ConfigurationSpace\nfrom Confi... | [
[
"numpy.random.RandomState",
"numpy.mean",
"sklearn.cross_validation.cross_val_score",
"sklearn.ensemble.RandomForestRegressor",
"sklearn.metrics.make_scorer",
"sklearn.datasets.load_boston"
]
] |
igctty/pydy | [
"ea1b6902a6625e66d0f41d06e12bbd1e7096fdf9"
] | [
"src/dl_iris_data_processing.py"
] | [
"# coding: UTF-8\n\nimport numpy as np\nfrom sklearn import datasets\nimport chainer\nfrom chainer import Variable,Chain\nimport chainer.links as L\nimport chainer.functions as F\nimport chainer.optimizers as O\n\n# データ読み込み\niris_data = datasets.load_iris()\n# print(iris_data)\n\n# データの取り出し\nx = iris_data.data.asty... | [
[
"numpy.arange",
"numpy.zeros",
"sklearn.datasets.load_iris"
]
] |
IceCreamWW/ESPnet-informed-se | [
"38471b7749b7df0fadeae500cf8a050ac66872d2"
] | [
"espnet2/enh/espnet_enh_informed_model.py"
] | [
"from distutils.version import LooseVersion\nfrom functools import reduce\nfrom itertools import permutations\nfrom typing import Dict\nfrom typing import Optional\nfrom typing import Tuple\n\nimport torch\nfrom torch_complex.tensor import ComplexTensor\nfrom typeguard import check_argument_types\n\nfrom espnet2.en... | [
[
"torch.get_default_dtype",
"torch.stack",
"torch.min",
"torch.arange",
"torch.unbind",
"torch.norm",
"torch.bmm",
"torch.log10",
"torch.ones",
"torch.tensor",
"torch.sum"
]
] |
adiyen/codeday_sf_obj_detection_flask | [
"7b134e454303a79377b7b7ec54ada9c8dccf3f7a"
] | [
"object_detection.py"
] | [
"import matplotlib; matplotlib.use(\"Agg\")\n\nfrom imageai.Detection import ObjectDetection\nimport os, glob\n\ndef runner():\n execution_path = os.getcwd()\n\n detector = ObjectDetection()\n detector.setModelTypeAsRetinaNet()\n detector.setModelPath(os.path.join(execution_path , \"resnet50_coco_best_v... | [
[
"matplotlib.use"
]
] |
tayuny/Chicago_Business_Prodictor | [
"c9076b93ddaacb619d4eefef830d3b7276174528"
] | [
"pipeline/evaluator.py"
] | [
"import numpy as np\r\nfrom sklearn.metrics import accuracy_score\r\nfrom sklearn.metrics import precision_score\r\nfrom sklearn.metrics import recall_score\r\nfrom sklearn.metrics import f1_score\r\nfrom sklearn.metrics import roc_curve\r\nfrom sklearn.metrics import roc_auc_score\r\nfrom sklearn.metrics import au... | [
[
"matplotlib.pyplot.xlim",
"sklearn.metrics.f1_score",
"sklearn.metrics.precision_recall_curve",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.subplots",
"sklearn.metrics.accuracy_score",
"numpy.array",
"matplotlib.pyplot.title",
"matplotlib.pyplot.close",
"numpy.argsort",... |
ysx001/IIC | [
"e72eb0833785e867ded0a9bac47ce1d1f9f47b4b"
] | [
"iic/code/utils/segmentation/segmentation_eval.py"
] | [
"from __future__ import print_function\n\nimport sys\nfrom datetime import datetime\n\nimport torch\n\nfrom code.utils.cluster.cluster_eval import cluster_subheads_eval\nfrom code.utils.cluster.transforms import sobel_process\n\n\ndef segmentation_eval(config, net,\n mapping_assignment_dataload... | [
[
"torch.zeros",
"torch.cuda.empty_cache",
"torch.argmax",
"torch.no_grad"
]
] |
sa-mustafa/incubator-mxnet | [
"03654eeea3f3ab30dc43fabb7229945970a358b2"
] | [
"tests/python/unittest/test_gluon_data.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.pad",
"numpy.random.rand",
"numpy.asarray",
"numpy.ones",
"numpy.random.uniform"
]
] |
greyzor/dash-worldmap-metrics | [
"6895544edba0ccc0a00df9b88da0a3936d11c695"
] | [
"helpers.py"
] | [
"\"\"\"\nPrecomputing, App Layout (Layers/Markers), Callbacks helpers.\n\"\"\"\nimport dash_core_components as dcc\nimport dash_html_components as html\nfrom dash.dependencies import Input, Output, State\n# import dash_colorscales\n# import cufflinks as cf\nimport pandas as pd\nimport numpy as np\nimport re\nimport... | [
[
"numpy.max",
"numpy.random.rand",
"pandas.DataFrame",
"numpy.mean",
"pandas.concat",
"pandas.read_csv"
]
] |
MalikIdreesHasanKhan/NeMo | [
"984fd34921e81659c4594a22ab142311808b3bb7"
] | [
"nemo/collections/asr/models/clustering_diarizer.py"
] | [
"# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"torch.cuda.is_available",
"torch.cuda.amp.autocast",
"torch.softmax"
]
] |
ZephyrZhuQi/vqa-maskrcnn-benchmark | [
"16f6c7c9a2e75e8877901e17d6536c108b66e694"
] | [
"maskrcnn_benchmark/modeling/detector/generalized_rcnn.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n# Modified by Qi Zhu, November 2019\n\"\"\"\nImplements the Generalized R-CNN framework\n\"\"\"\n\nimport torch\nfrom torch import nn\n\nfrom maskrcnn_benchmark.structures.image_list import to_image_list\nfrom maskrcnn_benchmark.structures.bo... | [
[
"numpy.asarray",
"numpy.zeros",
"torch.from_numpy"
]
] |
Kin-Zhang/LAV | [
"0a5068c0fad3ecc2f2616801c6d3b00bc0ff03f3"
] | [
"team_code/planner.py"
] | [
"import os\nfrom collections import deque\n\nimport numpy as np\nimport math\n\nclass RoutePlanner(object):\n \n EARTH_RADIUS = 6371e3 # 6371km\n\n def __init__(self, global_plan, curr_threshold=20, next_threshold=75, debug=False):\n self.route = deque()\n self.curr_threshold = curr_threshold... | [
[
"numpy.array",
"numpy.linalg.norm"
]
] |
chengzee/disease_predict | [
"d7a3c57b710ab2e93d56c8d73aeaa21120d3e98c",
"d7a3c57b710ab2e93d56c8d73aeaa21120d3e98c"
] | [
"orchid_DiseasePredict/datasets/Attention_in_several_test/LSTM64_LSTM64_LSTM64_LSTM64_A_LSTM64_LSTM64.py",
"orchid_DiseasePredict/datasets/Attention_in_several_test/LSTM128_LSTM128_LSTM128_LSTM128_A_LSTM64_LSTM64_LSTM64.py"
] | [
"import pandas as pd\nimport numpy as np\nimport csv\nfrom keras.layers import Dense, Lambda, dot, Activation, concatenate\nfrom keras.layers import Layer\nimport keras.backend as K\n\n# Parameters\n# -------------------------------------------------------------------------------------------------------------------... | [
[
"numpy.max",
"numpy.array",
"numpy.count_nonzero",
"numpy.min",
"numpy.mean",
"numpy.arange",
"numpy.searchsorted",
"pandas.read_csv"
],
[
"numpy.max",
"numpy.array",
"numpy.count_nonzero",
"numpy.min",
"numpy.mean",
"numpy.arange",
"numpy.searchsort... |
aemoser/PyWake | [
"889a2c10882195af21339e9bcf2ede0db9b58319",
"889a2c10882195af21339e9bcf2ede0db9b58319"
] | [
"py_wake/utils/area_overlapping_factor.py",
"py_wake/deficit_models/gcl.py"
] | [
"from numpy import newaxis as na\n\nimport numpy as np\n\n\nclass AreaOverlappingFactor():\n\n def overlapping_area_factor(self, wake_radius_ijlk, dw_ijlk, cw_ijlk, D_src_il, D_dst_ijl):\n \"\"\"Calculate overlapping factor\n\n Parameters\n ----------\n dw_jl : array_like\n ... | [
[
"numpy.zeros_like",
"numpy.asarray",
"numpy.minimum",
"numpy.where",
"numpy.sqrt",
"numpy.abs",
"numpy.all",
"numpy.broadcast_to",
"numpy.maximum"
],
[
"numpy.warnings.catch_warnings",
"numpy.warnings.filterwarnings",
"numpy.log",
"matplotlib.pyplot.title",
... |
keyboardbear/IzunaDSP | [
"2e4a93dc1e09775f23aebec70e2f51f8706a7635"
] | [
"izunadsp/parts/apply_eq.py"
] | [
"# External Libraries\nfrom essentia.standard import FFT, IFFT\nimport numpy as np\n\n# IzunaDSP\nfrom izunadsp import DSPPart, AudioSequence\n\n\nclass ApplyEQ(DSPPart):\n def __init__(self):\n super().__init__()\n self._eq = np.array([1])\n self.eq = [1]\n self.fft = FFT()\n ... | [
[
"numpy.array",
"numpy.delete"
]
] |
leelabcnbc/keras-vis | [
"0af75c03b8eed2e488c122fcd3f535d27a4ede8f"
] | [
"vis/visualization/__init__.py"
] | [
"from __future__ import absolute_import\n\n\nfrom .activation_maximization import visualize_activation_with_losses\nfrom .activation_maximization import visualize_activation\n\nfrom .saliency import visualize_saliency_with_losses\nfrom .saliency import visualize_saliency\nfrom .saliency import visualize_cam_with_lo... | [
[
"tensorflow.keras.backend.ndim",
"tensorflow.keras.backend.int_shape",
"tensorflow.keras.backend.image_data_format"
]
] |
tomspur/scipy | [
"5309706537dbd96e0409f890a20fc6f5badfbac3"
] | [
"scipy/sparse/csc.py"
] | [
"\"\"\"Compressed Sparse Column matrix format\"\"\"\nfrom __future__ import division, print_function, absolute_import\n\n__docformat__ = \"restructuredtext en\"\n\n__all__ = ['csc_matrix', 'isspmatrix_csc']\n\nfrom warnings import warn\n\nimport numpy as np\nfrom scipy.lib.six import xrange\n\nfrom .base import iss... | [
[
"scipy.lib.six.xrange",
"numpy.empty",
"numpy.lexsort"
]
] |
otanan/STP | [
"85e6f6ff7bfe1bdd832dc5c2f32d0fdb084c55fa"
] | [
"stp/info.py"
] | [
"#!/usr/bin/env python3\n\"\"\"Entropy and information theory related calculations.\n\n**Author: Jonathan Delgado**\n\n\"\"\"\n\n######################## Imports ########################\n\n\nimport numpy as np\n\nimport stp\n\n\n######################## Helper functions ########################\n\n\ndef _eps_filte... | [
[
"numpy.full",
"numpy.array",
"numpy.dot",
"numpy.isclose",
"numpy.zeros",
"numpy.log",
"numpy.arange",
"numpy.vstack",
"numpy.unique"
]
] |
I--P/scipy | [
"ad02ef083824d195f04f267b141716e0f047197f"
] | [
"scipy/stats/_distn_infrastructure.py"
] | [
"#\n# Author: Travis Oliphant 2002-2011 with contributions from\n# SciPy Developers 2004-2011\n#\nfrom __future__ import division, print_function, absolute_import\n\nfrom scipy._lib.six import string_types, exec_\nfrom scipy._lib._util import getargspec_no_self as _getargspec\n\nimport sys\nimport keywor... | [
[
"numpy.extract",
"numpy.product",
"numpy.min",
"numpy.exp",
"scipy._lib._util.check_random_state",
"numpy.cumsum",
"numpy.max",
"numpy.vectorize",
"scipy._lib.six.exec_",
"numpy.log",
"scipy.optimize.brentq",
"numpy.seterr",
"scipy._lib._util.getargspec_no_self"... |
tomztyang/DSGN | [
"135dabf96183f4502532dea0a45230bf9a23e2d8"
] | [
"dsgn/models/submodule.py"
] | [
"from __future__ import print_function\nimport torch\nimport torch.nn as nn\nimport torch.utils.data\nfrom torch.autograd import Variable\nimport torch.nn.functional as F\nimport math\nimport numpy as np\nfrom torch.nn import BatchNorm2d\n\ndef convbn(in_planes, out_planes, kernel_size, stride, pad, dilation, gn=Fa... | [
[
"torch.cat",
"torch.nn.Sequential",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ConvTranspose2d",
"torch.nn.GroupNorm",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.Conv3d",
"torch.nn.functional.relu",
"torch.nn.BatchNorm3d",
"torch.nn.ConvTranspose3d",... |
aegissystems/yolact | [
"29ee13f41a83b62a8946a86cb01e49d8fce0676c"
] | [
"utils/functions.py"
] | [
"import torch\nimport torch.nn as nn\nimport os\nimport math\nfrom collections import deque\nfrom pathlib import Path\nfrom YOLACT.layers.interpolate import InterpolateModule\n\nclass MovingAverage():\n \"\"\" Keeps an average window of the specified number of items. \"\"\"\n\n def __init__(self, max_window_s... | [
[
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.ConvTranspose2d",
"torch.nn.ReLU"
]
] |
bio-ontology-research-group/deeppheno | [
"8a58c6efcdd6861c2e5c380bb81690618e58b629"
] | [
"results.py"
] | [
"#!/usr/bin/env python\n\nimport numpy as np\nimport pandas as pd\nimport click as ck\nfrom sklearn.metrics import classification_report\nfrom sklearn.metrics.pairwise import cosine_similarity\nimport sys\nfrom collections import deque\nimport time\nimport logging\nfrom sklearn.metrics import roc_curve, auc, matthe... | [
[
"numpy.array",
"numpy.abs",
"numpy.mean"
]
] |
souravsingh/chainercv | [
"8f76510472bc95018c183e72f37bc6c34a89969c",
"8f76510472bc95018c183e72f37bc6c34a89969c",
"8f76510472bc95018c183e72f37bc6c34a89969c",
"8f76510472bc95018c183e72f37bc6c34a89969c"
] | [
"tests/utils_tests/testing_tests/assertions_tests/test_assert_is_bbox_dataset.py",
"tests/visualizations_tests/test_vis_bbox.py",
"chainercv/visualizations/vis_image.py",
"chainercv/experimental/links/model/fcis/utils/proposal_target_creator.py"
] | [
"import numpy as np\nimport unittest\n\nfrom chainer.dataset import DatasetMixin\nfrom chainer import testing\n\nfrom chainercv.utils import assert_is_bbox_dataset\nfrom chainercv.utils import generate_random_bbox\n\n\nclass BboxDataset(DatasetMixin):\n\n def __init__(self, options=(), empty_bbox=False):\n ... | [
[
"numpy.random.randint"
],
[
"numpy.array",
"numpy.random.uniform",
"numpy.random.randint"
],
[
"matplotlib.pyplot.figure"
],
[
"numpy.concatenate",
"numpy.array",
"numpy.random.choice",
"numpy.round",
"numpy.where",
"numpy.append"
]
] |
berlinchen7/EXOSIMS | [
"0c46945ae0b915f97157fb17de3eb344f5945e74"
] | [
"EXOSIMS/SurveySimulation/tieredScheduler_DD_SLSQP.py"
] | [
"from EXOSIMS.SurveySimulation.tieredScheduler_SLSQP import tieredScheduler_SLSQP\nimport EXOSIMS, os\nimport astropy.units as u\nimport astropy.constants as const\nimport numpy as np\nimport itertools\nfrom scipy import interpolate\ntry:\n import cPickle as pickle\nexcept:\n import pickle\nimport time\nimpor... | [
[
"numpy.argmin",
"numpy.min",
"numpy.mean",
"numpy.where",
"numpy.invert",
"numpy.max",
"numpy.logical_and",
"numpy.arange",
"numpy.sqrt",
"numpy.in1d",
"numpy.array",
"numpy.zeros",
"numpy.round",
"numpy.intersect1d",
"numpy.hstack",
"numpy.isinf",
... |
turnmanh/scikit-opt | [
"8d9fc314081cc25b767e22a15db4f7ec9d20203b"
] | [
"sko/PSO.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# @Time : 2019/8/20\n# @Author : github.com/guofei9987\n\nimport numpy as np\nfrom sko.tools import func_transformer\nfrom .base import SkoBase\nfrom tqdm import trange\n\n\nclass PSO(SkoBase):\n \"\"\"\n Do PSO (Particle swarm optimization) algorithm.\n\n... | [
[
"numpy.array",
"numpy.random.rand",
"numpy.ones",
"numpy.where",
"numpy.amin",
"numpy.random.uniform",
"numpy.amax",
"numpy.clip",
"numpy.all"
]
] |
yuanz271/PyDSTool | [
"886c143cdd192aea204285f3a1cb4968c763c646",
"886c143cdd192aea204285f3a1cb4968c763c646",
"886c143cdd192aea204285f3a1cb4968c763c646",
"886c143cdd192aea204285f3a1cb4968c763c646"
] | [
"PyDSTool/Toolbox/optimizers/line_search/backtracking_search.py",
"PyDSTool/ModelContext.py",
"tests/generator/test_events.py",
"PyDSTool/Generator/Radau_ODEsystem.py"
] | [
"\n# Matthieu Brucher\n# Last Change : 2007-08-26 19:43\n\nimport numpy\n\nclass BacktrackingSearch(object):\n \"\"\"\n The backtracking algorithm for enforcing Armijo rule\n \"\"\"\n def __init__(self, rho = 0.1, alpha_step = 1., alpha_factor = 0.5, **kwargs):\n \"\"\"\n Can have :\n - a coefficient... | [
[
"numpy.dot"
],
[
"numpy.isnan",
"numpy.ones",
"numpy.nonzero",
"numpy.alltrue",
"numpy.isfinite"
],
[
"numpy.testing.assert_almost_equal",
"numpy.linspace",
"numpy.sin"
],
[
"numpy.array",
"numpy.int",
"numpy.argmax",
"numpy.isfinite"
]
] |
JohanComparat/nbody-npt-functions | [
"a034db4e5a9b2f87dc42eeb6059c4dd280589e4a"
] | [
"bin/bin_SMHMr/MD10_add_Ms_2.py"
] | [
"# overall python packages\nimport glob\nimport astropy.io.fits as fits\nimport os\nimport time\nimport numpy as n\nimport sys \n# specific functions\nfrom scipy.stats import norm\n# dedicated packages\n#import StellarMass\n\nmeanSM= lambda Mh, z : n.log10(Mh * 2. * ( 0.0351 - 0.0247 * z/(1.+z)) / ((Mh/ (10**(11.79... | [
[
"numpy.zeros_like",
"numpy.log10",
"scipy.stats.norm.rvs"
]
] |
kellielu/ReAgent | [
"c538992672220453cdc95044def25c4e0691a8b0",
"c538992672220453cdc95044def25c4e0691a8b0"
] | [
"reagent/optimizer/soft_update.py",
"reagent/gym/preprocessors/replay_buffer_inserters.py"
] | [
"#!/usr/bin/env python3\n\nimport torch\n\n\nclass SoftUpdate(torch.optim.Optimizer):\n def __init__(self, target_params, source_params, tau=0.1):\n \"\"\"\n Perform soft-update on target_params. Soft-update gradually blends\n source_params into target_params with this update equation:\n\n ... | [
[
"torch.no_grad",
"torch.enable_grad"
],
[
"numpy.array",
"numpy.stack",
"numpy.zeros"
]
] |
snandasena/udacity-dl | [
"7ea13ec7ebd992f1199f43bd5300782436ed71e5"
] | [
"src/direction_of_the_gradient.py"
] | [
"import numpy as np\nimport cv2\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\nimport pickle\n\n\n# Read in an image\nimage = mpimg.imread('../images/signs_vehicles_xygrad.png')\n\ndef dir_threshold(img, sobel_kernel=3, thresh=(0, np.pi/2)):\n\n # Apply the following steps to img\n # 1) C... | [
[
"numpy.zeros_like",
"matplotlib.image.imread",
"matplotlib.pyplot.subplots",
"numpy.absolute",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots_adjust"
]
] |
jakedolan443/search-algorithm-visualizer | [
"331c22886ef8017add16bc63a8e75df9643f4fe9"
] | [
"gui.py"
] | [
"import tkinter as tk\nimport tktools\nfrom algs.astar import astar\nfrom algs.dijkstra import dijkstra\nimport numpy as np\nimport threading\nfrom tkinter import filedialog\nimport random\nfrom grid import Grid\n\n\n\nclass Frame(tk.Frame):\n def __init__(self, *args):\n tk.Frame.__init__(self, *args)\n ... | [
[
"numpy.asarray"
]
] |
modichirag/fm_eor | [
"1615fea4e2d617bb6ef00770a49698901227daa8"
] | [
"codes/cosmo4d/pmeshengine.py"
] | [
"from __future__ import absolute_import\n\nimport numpy\nfrom abopt.vmad2 import ZERO, Engine, statement, programme, CodeSegment, Literal\nfrom abopt.abopt2 import VectorSpace\nfrom pmesh.pm import ParticleMesh, RealField, ComplexField\n\ndef nyquist_mask(factor, v):\n # any nyquist modes are set to 0 if the tra... | [
[
"numpy.bincount",
"numpy.ndindex",
"numpy.array",
"numpy.dot",
"numpy.digitize",
"numpy.sign",
"numpy.std",
"numpy.isscalar",
"numpy.imag"
]
] |
thisisiron/nmt-attention-tf2 | [
"ddcd3b4ed2a20d5a7a1eeac3292abb5e39a95bde"
] | [
"run.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport os\nimport re\nimport sys\nimport json\nimport datetime as dt\nimport time\n\nfrom argparse import ArgumentParser, Namespace\nfrom sklearn.model_selection import train_test_split\n\nimport tensorflow as tf # TF 2.0\n\nfrom utils import load_dataset, load_vocab, convert_vocab, sel... | [
[
"tensorflow.keras.preprocessing.sequence.pad_sequences",
"tensorflow.convert_to_tensor",
"tensorflow.zeros",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.train.CheckpointManager",
"tensorflow.expand_dims",
"tensorflow.GradientTape",
"tensorflow.argmax",
"tensorflow... |
DaceT/dask-sql | [
"c545f2bf9a786b0e9ff7f68c90da4dcc39cdcd73"
] | [
"dask_sql/physical/rel/logical/sample.py"
] | [
"import logging\nfrom typing import TYPE_CHECKING\n\nimport numpy as np\n\nfrom dask_sql.datacontainer import DataContainer\nfrom dask_sql.physical.rel.base import BaseRelPlugin\n\nif TYPE_CHECKING:\n import dask_sql\n from dask_sql.java import org\n\nlogger = logging.getLogger(__name__)\n\n\nclass SamplePlug... | [
[
"numpy.random.RandomState"
]
] |
ibaiGorordo/depthai-experiments | [
"cde67e277120ddac815cbad6360695759cca900f",
"cde67e277120ddac815cbad6360695759cca900f",
"cde67e277120ddac815cbad6360695759cca900f",
"cde67e277120ddac815cbad6360695759cca900f"
] | [
"gen2-efficientnet-classification/main.py",
"gen2-nn-sync/main.py",
"gen2-display-detections/3-stretch_img.py",
"gen2-rgbd-projection/projector_3d.py"
] | [
"#!/usr/bin/env python3\nimport argparse\nfrom pathlib import Path\nimport sys\n\nimport blobconverter\nimport cv2\nimport depthai as dai\nimport numpy as np\nfrom classes import class_names\n\n# Get Argument First\nparser = argparse.ArgumentParser()\nparser.add_argument('-nd', '--no-debug', action=\"store_true\", ... | [
[
"numpy.max",
"numpy.ascontiguousarray",
"numpy.argmax"
],
[
"numpy.ascontiguousarray",
"numpy.where",
"numpy.array"
],
[
"numpy.array"
],
[
"numpy.array"
]
] |
lamorton/FIDASIM | [
"d4f68c17d4fcb08107768346d47bee7a4bf0586c"
] | [
"lib/python/fidasim/utils.py"
] | [
"#!/bin/sh\n\"exec\" \"$FIDASIM_DIR/deps/python\" \"$0\" \"$@\"\n# -*- coding: utf-8 -*-\n\n#+#FIDASIM Utilities\n#+This file contains useful FIDASIM utilities\n#+***\nfrom __future__ import print_function\nimport os\nfrom os.path import dirname\nimport subprocess\nimport platform\nimport numpy as np\nimport copy\n... | [
[
"numpy.dot",
"numpy.arccos",
"numpy.string_",
"numpy.tile",
"numpy.exp",
"numpy.mean",
"numpy.min",
"numpy.sign",
"numpy.where",
"numpy.cos",
"scipy.io.netcdf.netcdf_file",
"numpy.max",
"numpy.sin",
"numpy.log",
"numpy.arcsin",
"numpy.logical_and",
... |
laceyg/ternarynet | [
"b17744c2aba3aba7e7e72decb3b8a02792d33b54",
"b17744c2aba3aba7e7e72decb3b8a02792d33b54",
"b17744c2aba3aba7e7e72decb3b8a02792d33b54"
] | [
"tools/tensorpack/tensorpack/tfutils/gradproc.py",
"tools/tensorpack/examples/Inception/inception-bn.py",
"tools/tensorpack/tensorpack/train/trainer.py"
] | [
"#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n# File: gradproc.py\n# Author: Yuxin Wu <ppwwyyxx@gmail.com>\n\nimport tensorflow as tf\nfrom abc import ABCMeta, abstractmethod\nimport re\nimport inspect\nfrom ..utils import logger\nfrom .symbolic_functions import rms\nfrom .summary import add_moving_summary\n\n__... | [
[
"tensorflow.check_numerics",
"tensorflow.clip_by_global_norm",
"tensorflow.histogram_summary"
],
[
"tensorflow.concat",
"tensorflow.train.MomentumOptimizer",
"tensorflow.add_n",
"tensorflow.variable_scope",
"tensorflow.nn.softmax",
"tensorflow.reduce_mean",
"tensorflow.... |
ScSteffen/neuralEntropy | [
"796e0b38ac9c01f59772d49be3368b8ac9ad24d7",
"796e0b38ac9c01f59772d49be3368b8ac9ad24d7"
] | [
"experimental/sandBoxGeneral.py",
"experimental/convexNetworkComparison.py"
] | [
"### imports\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow import keras\nfrom tensorflow.keras import layers\nfrom tensorflow.keras import initializers\n\nimport src.utils as utils\n\n# import tensorflow.keras.backend as K\nimport matplotlib.pyplot as plt\n\nfrom src.utils import finiteDiff, integra... | [
[
"tensorflow.keras.initializers.Zeros",
"numpy.linalg.norm",
"tensorflow.keras.Input",
"numpy.asarray",
"numpy.zeros",
"numpy.log",
"matplotlib.pyplot.plot",
"tensorflow.keras.callbacks.ModelCheckpoint",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.initializers.RandomN... |
amzkit/nilmtk | [
"9c9add85f3e85ee549412b0a50d46781f7bfbe22"
] | [
"nilmtk/dataset_converters/combed/convert_combed.py"
] | [
"from __future__ import print_function, division\nfrom os.path import join, isdir, dirname, abspath\nfrom os import getcwd\nimport os\nfrom sys import getfilesystemencoding\nfrom inspect import currentframe, getfile, getsourcefile\nfrom collections import OrderedDict\nfrom six import iteritems\n\nimport pandas as p... | [
[
"pandas.to_datetime",
"pandas.read_csv",
"pandas.MultiIndex.from_tuples",
"pandas.concat"
]
] |
skailuxspa/OpenCV-Tools | [
"ef0d16533722779e3a3dd40de494e28c1aa1a39e"
] | [
"calibration.py"
] | [
"import numpy as np\r\nimport cv2\r\n\r\ncalibration_state = 0\r\ndebug_state = 1\r\nrunning_state = 2\r\nstate = calibration_state\r\n\r\ncalibration_frame_max = 100\r\ncalibration_frame_current = 0\r\nHmin, Hmax, Hmean, Hstdv = 0, 0, 0, 0\r\nSmin, Smax, Smean, Sstdv = 0, 0, 0, 0\r\nlower_bound, upper_bound = 0, 0... | [
[
"numpy.array",
"numpy.ones",
"numpy.clip"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.