repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
zdadadaz/jcc_dfdc
[ "672b61771e22b369c7950c89299b0a7a2f7586ad", "672b61771e22b369c7950c89299b0a7a2f7586ad" ]
[ "tmp.py", "playground/tmp1.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Jan 12 19:28:12 2020\n\n@author: zdadadaz\n\"\"\"\n\nimport json\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pylab as plt\n\n# dir_json = './../fb_whole/metadata_21.json'\n# train_list =[]\n# with open(dir_json) as json_file:\n...
[ [ "pandas.read_csv", "matplotlib.pylab.show", "numpy.random.randn", "matplotlib.pylab.legend", "numpy.array" ], [ "numpy.random.random" ] ]
antonvs88/crowddynamics-research
[ "61260aa26a6d5bc213252bf96eaa472a551918e3" ]
[ "data_analysis/calculate_field_data.py" ]
[ "from scipy.spatial import Voronoi, voronoi_plot_2d\n\nimport h5py\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport os\nimport sys\nfrom shapely.geometry import Polygon, MultiLineString, Point\nfrom shapely.ops import polygonize\nfrom descartes import PolygonPatch\nfrom voronoi_finite_polygons_2d import...
[ [ "scipy.spatial.Voronoi", "numpy.maximum", "numpy.sqrt", "numpy.linspace", "numpy.minimum", "numpy.reshape", "numpy.arange", "numpy.flipud", "numpy.round", "numpy.size", "numpy.where", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.hypot" ] ]
doublefloyd/beluga
[ "740bda376634945ef51bf1cf946fcbe002e9bc7f", "740bda376634945ef51bf1cf946fcbe002e9bc7f" ]
[ "beluga/numeric/compilation/component_compilation.py", "examples/Oscillators/Rayleigh/plotresults.py" ]
[ "import numpy as np\nfrom scipy.integrate import simps\n\nfrom beluga.numeric.compilation import jit_lambdify, jit_compile_func\nfrom beluga.symbolic.data_classes.components_structures import CostStruct\n\n\ndef compile_control(control_options, args, ham_func, lambdify_func=jit_lambdify):\n\n num_options = len(c...
[ [ "scipy.integrate.simps" ], [ "matplotlib.pyplot.figure", "matplotlib.pyplot.plot", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
ptrbortolotti/WISDEM
[ "2b7e44716d022e2f62140073dd078c5deeb8bf0a", "2b7e44716d022e2f62140073dd078c5deeb8bf0a", "2b7e44716d022e2f62140073dd078c5deeb8bf0a", "2b7e44716d022e2f62140073dd078c5deeb8bf0a" ]
[ "wisdem/drivetrainse/rna.py", "wisdem/aeroelasticse/Turbsim_mdao/wind_profile_writer.py", "wisdem/test/test_pymap/main.py", "wisdem/test/test_orbit/phases/install/cable_install/test_array_install.py" ]
[ "from __future__ import print_function\nimport numpy as np\nfrom openmdao.api import ExplicitComponent, Group, IndepVarComp\n\nfrom wisdem.commonse.utilities import hstack, vstack\nfrom wisdem.commonse.csystem import DirectionVector\nfrom wisdem.commonse import gravity\n\n# This is an extremely simple RNA mass calc...
[ [ "numpy.dot", "numpy.eye", "numpy.copy", "numpy.outer", "numpy.array", "numpy.zeros", "numpy.vstack" ], [ "numpy.arange", "numpy.zeros" ], [ "numpy.array", "numpy.set_printoptions", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "pandas...
baajur/google-research
[ "9049acf9246c1b75170f0c6757e62a8f619a9db6" ]
[ "kws_streaming/layers/stream_test.py" ]
[ "# coding=utf-8\n# Copyright 2020 The Google Research Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "numpy.expand_dims", "numpy.zeros", "numpy.random.randint" ] ]
michaelsilverstein/scikit-bio
[ "876efcf688a8f15e89bb70fa835a2f2a84b534c1" ]
[ "skbio/stats/distance/tests/test_anosim.py" ]
[ "# ----------------------------------------------------------------------------\n# Copyright (c) 2013--, scikit-bio development team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed with this software.\n# ---------------------------------...
[ [ "pandas.Series", "numpy.random.seed" ] ]
eldar/acsm
[ "04069e8bb4c12185473dc10c3355e5367fa98968", "04069e8bb4c12185473dc10c3355e5367fa98968" ]
[ "acsm/benchmark/pck_eval.py", "acsm/data/base2.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport json\nimport os.path as osp\nimport numpy as np\nimport pprint\nimport pdb\nfrom . import evaluate_pr\nimport scipy.io as sio\n'''\nintervals : Define thresholds to evaluate pck score \nkpnames : ...
[ [ "numpy.nanmedian", "numpy.isnan", "numpy.stack", "numpy.concatenate", "numpy.nanmean", "scipy.io.savemat", "numpy.nanstd", "numpy.array", "numpy.where", "numpy.sum" ], [ "numpy.diag", "numpy.hstack", "numpy.logical_not", "numpy.expand_dims", "numpy.p...
mthrok/ctcdecode
[ "b1a30d7a65342012e0d2524d9bae1c5412b24a23" ]
[ "example/evalutate_wav2vec2/evaluate_wav2vec2_librispeech.py" ]
[ "#!/usr/bin/env python3\n\"\"\"Generate `trn` files for Librispeech\n\nGiven a Librispeech directory, parse transcript files,\ntranscribe the corresponding audio, and generate hypothesis files.\n\"\"\"\nimport os\nimport time\nimport logging\nimport argparse\nfrom pathlib import Path\n\nimport torch\nimport torchau...
[ [ "torch.zeros_like", "torch.set_num_threads" ] ]
reuvenperetz/model_optimization
[ "40de02d56750ee4cc20e693da63bc2e70b4d20e6", "40de02d56750ee4cc20e693da63bc2e70b4d20e6", "40de02d56750ee4cc20e693da63bc2e70b4d20e6" ]
[ "tests/pytorch_tests/layer_tests/base_pytorch_layer_test.py", "tests/keras_tests/feature_networks_tests/feature_networks/tanh_activation_test.py", "tests/common_tests/function_tests/test_collectors_manipulation.py" ]
[ "# Copyright 2022 Sony Semiconductors Israel, 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# Un...
[ [ "torch.fx.symbolic_trace", "torch.abs", "numpy.abs", "torch.randn" ], [ "numpy.isclose" ], [ "numpy.random.random", "numpy.allclose", "numpy.min", "numpy.max", "numpy.random.rand" ] ]
myu-wp/coveragecalc
[ "e2fac3baba3f240c8d776f7d28331899333a05c2" ]
[ "coveragecalc/fields.py" ]
[ "import numpy as np\n\n\nOUTPUTS = [\n 'primary phone is valid',\n 'primary phone to name',\n 'primary phone to address',\n 'primary phone line type',\n 'primary phone is prepaid',\n 'primary phone is commercial',\n 'primary address is valid',\n 'primary address diagnostic',\n 'primary ad...
[ [ "numpy.arange" ] ]
aksingh-fb/glow
[ "c50603a1885c9bffd935fbd1c7c10766b062cef9" ]
[ "torch_glow/tests/nodes/floor_test.py" ]
[ "from __future__ import absolute_import, division, print_function, unicode_literals\n\nimport unittest\n\nimport torch\nfrom tests import utils\n\n\nclass SimpleFloorModule(torch.nn.Module):\n def forward(self, a, b):\n c = a + b\n return torch.floor(c)\n\n\nclass TestFloor(unittest.TestCase):\n ...
[ [ "torch.randn", "torch.floor" ] ]
rapirent/DSAI-HW3
[ "ee83990f511049b8d53be5765040ab2068af6c3f" ]
[ "addition-subtractor.py" ]
[ "\n# coding: utf-8\nfrom keras.models import Sequential\nfrom keras import layers\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom six.moves import range\n\nimport os\nimport argparse\n\nparser = argparse.ArgumentParser()\nparser.add_argument('--data_size', default='45000')\nparser.add_argument('--train_s...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "numpy.random.shuffle", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.clf", "numpy.random.randint", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.ylabel" ] ]
yyong119/EE208-Teamproject
[ "4cfecbf83981d89a98e811fcc7eefa9134036c43" ]
[ "train/pytorch-train/crnn_main.py" ]
[ "# -*- coding: utf-8 -*-\r\nfrom __future__ import print_function\r\nimport argparse\r\nimport random\r\nimport torch\r\nimport torch.backends.cudnn as cudnn\r\nimport torch.optim as optim\r\nimport torch.utils.data\r\nfrom torch.autograd import Variable\r\nimport numpy as np\r\nfrom warpctc_pytorch import CTCLoss\...
[ [ "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.FloatTensor", "torch.cuda.is_available", "torch.IntTensor", "torch.autograd.Variable" ] ]
cebarbosa/summer_project_hydra
[ "386a01253d92075ff00396229e83caf44eed07a3" ]
[ "source_extraction.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n\nCreated on 28/10/2017\n\n@author: Carlos Eduardo Barbosa\n\nDetection of sources in data and separation of bins prior to Voronoi\ntesselation\n\n\"\"\"\nfrom __future__ import division, print_function\nimport os\n\nimport pyregion\nimport numpy as np\nfrom astropy.io import fits\...
[ [ "numpy.radians", "numpy.power", "numpy.reshape", "numpy.arange", "numpy.cos", "numpy.sin", "numpy.copy", "numpy.zeros_like", "numpy.array", "numpy.where" ] ]
google/init2winit
[ "62ec9fd31bd7b38bb7c220f15d4187bf0706506d", "62ec9fd31bd7b38bb7c220f15d4187bf0706506d" ]
[ "init2winit/mt_eval/main.py", "init2winit/test_hyperparameters.py" ]
[ "# coding=utf-8\n# Copyright 2021 The init2winit 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 ...
[ [ "tensorflow.compat.v2.io.gfile.GFile", "tensorflow.compat.v2.enable_v2_behavior" ], [ "tensorflow.compat.v1.enable_v2_behavior" ] ]
Jacks0nJ/Importance-Sampling-Code
[ "f41fac451e9f78ab2130600ca83e1a6406ee43a5", "f41fac451e9f78ab2130600ca83e1a6406ee43a5" ]
[ "pyfpt/numerics/is_simulation.py", "pyfpt/analytics/gaussian_deviation.py" ]
[ "'''\nImportance Sampling Simulation\n------------------------------\nThis is the main module of the PyFPT code, as it runs the simulations, post\nprocesses and exports the data ready for plotting.\n'''\n\nfrom timeit import default_timer as timer\nimport multiprocessing as mp\nfrom multiprocessing import Process, ...
[ [ "numpy.argsort", "numpy.array" ], [ "scipy.optimize.root_scalar" ] ]
HaeckelK/bookkeeping
[ "6f8b62f1322fe1c409f397222653382d302d9754" ]
[ "ledger.py" ]
[ "from abc import ABC, abstractmethod\nfrom typing import List\n\nimport numpy as np\n\n\nclass Ledger(ABC):\n @abstractmethod\n def get_next_batch_id(self) -> int:\n \"\"\"Return next available batch id.\"\"\"\n\n @abstractmethod\n def get_next_transaction_id(self) -> int:\n \"\"\"Return n...
[ [ "numpy.arange" ] ]
lamyiowce/training
[ "498b945dd914573bdbf7a871eaeebd9388b60b76", "da4c959b5a7b65091b850872cdd4014d768c087c", "498b945dd914573bdbf7a871eaeebd9388b60b76" ]
[ "object_detection/pytorch/tools/test_net.py", "speech_recognition/pytorch/eval_model.py", "rnn_speech_recognition/pytorch/common/sampler.py" ]
[ "# Copyright (c) 2021, 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 req...
[ [ "torch.distributed.init_process_group", "torch.cuda.set_device" ], [ "torch.cuda.synchronize", "torch.no_grad", "torch.autograd.Variable" ], [ "torch.Generator", "torch.cat", "torch.randperm", "torch.from_numpy", "numpy.argsort", "numpy.array_split" ] ]
ahmadianlab/tc-gan
[ "06c549e8ae74bc6af62fddeed698565ea1f548c5", "06c549e8ae74bc6af62fddeed698565ea1f548c5", "06c549e8ae74bc6af62fddeed698565ea1f548c5" ]
[ "tc_gan/networks/tests/test_tuning_curve.py", "tc_gan/loaders/tests/test_gen_moments_records.py", "tc_gan/tests/test_ctc_stats_recorder.py" ]
[ "import numpy as np\nimport pytest\n\nfrom ...core import consume_config\nfrom ..cwgan import ConditionalTuningCurveGenerator\nfrom ..ssn import emit_tuning_curve_generator, ssn_type_choices\nfrom ..wgan import DEFAULT_PARAMS\nfrom .test_euler_ssn import JDS\n\nTEST_PARAMS = dict(\n DEFAULT_PARAMS,\n # Stimul...
[ [ "numpy.array", "numpy.allclose" ], [ "numpy.asarray", "numpy.arange", "pandas.testing.assert_frame_equal", "numpy.prod" ], [ "numpy.testing.assert_equal", "numpy.array", "numpy.tile", "numpy.random.RandomState" ] ]
manivaradarajan/tensorboard
[ "6ba7155a614cf1cfab97f8ec7c561adb0a609b0d" ]
[ "tensorboard/plugins/core/core_plugin_test.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...
[ [ "tensorflow.test.main" ] ]
madcpt/MachineWontLie
[ "992156f3916bafeaa01a3685eae285550391132e" ]
[ "models/PCA.py" ]
[ "import torch\nfrom torch import nn\nfrom torch.nn import init\nfrom torch.utils.data import DataLoader\nfrom overrides import overrides\nimport numpy as np\nimport time\n\nfrom models.BaseModel import BaseModel\n\n\nclass PCAModel(BaseModel):\n def __init__(self, configs: object):\n super().__init__(conf...
[ [ "sklearn.decomposition.PCA", "sklearn.svm.SVC", "torch.flatten" ] ]
thentgesMindee/doctr
[ "f97e92ba1b7bcb785a60f2cf549f13f88e510609", "f97e92ba1b7bcb785a60f2cf549f13f88e510609", "f97e92ba1b7bcb785a60f2cf549f13f88e510609", "f97e92ba1b7bcb785a60f2cf549f13f88e510609" ]
[ "doctr/models/recognition/predictor/pytorch.py", "doctr/models/backbones/resnet/tensorflow.py", "references/recognition/train_tensorflow.py", "doctr/io/image/base.py" ]
[ "# Copyright (C) 2021, Mindee.\n\n# This program is licensed under the Apache License version 2.\n# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.\n\nfrom typing import Any, List, Tuple, Union\n\nimport numpy as np\nimport torch\nfrom torch import nn\n\nfrom doctr.m...
[ [ "torch.no_grad" ], [ "tensorflow.keras.layers.Activation", "tensorflow.keras.layers.Lambda", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.MaxPool2D", "tensorflow.keras.layers.BatchNormalization" ], [ "tensorflow.Variable", "tensorflow.config.experimental.set_m...
goodcq/CommPy
[ "af3a9acba32d2f9c6b723705f709fee2cb9352e2" ]
[ "commpy/tests/test_channels.py" ]
[ "# Authors: CommPy contributors\n# License: BSD 3-Clause\n\nfrom __future__ import division, print_function # Python 2 compatibility\n\nfrom math import cos\n\nfrom numpy import ones, inf, sqrt, array, identity, zeros, dot, trace, einsum, absolute, exp, pi, fromiter, kron, \\\n zeros_like, empty\nfrom numpy.ran...
[ [ "numpy.dot", "numpy.sqrt", "numpy.kron", "numpy.random.randn", "numpy.zeros_like", "numpy.exp", "numpy.trace", "numpy.testing.assert_equal", "numpy.zeros", "numpy.random.choice", "numpy.testing.assert_raises", "numpy.identity", "numpy.testing.assert_allclose", ...
hovey/py3DViewer
[ "7ae1697aa4860430d0d94b854f8b1f2a4b2d895f" ]
[ "Py3DViewer/structures/Trimesh.py" ]
[ "from .Abstractmesh import AbstractMesh\nimport numpy as np\nfrom ..utils import IO, ObservableArray, deprecated, utilities\nfrom ..utils.load_operations import get_connectivity_info_surface as get_connectivity_info \nfrom ..utils.load_operations import compute_vertex_normals, compute_face_normals\nfrom ..utils.loa...
[ [ "numpy.sqrt", "numpy.logical_and", "numpy.einsum", "numpy.linalg.norm", "numpy.all", "numpy.delete", "numpy.flip", "numpy.repeat", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
tianjiashuo/akg
[ "a9cbf642063fb1086a93e8bc6be6feb145689817", "a9cbf642063fb1086a93e8bc6be6feb145689817", "a9cbf642063fb1086a93e8bc6be6feb145689817", "a9cbf642063fb1086a93e8bc6be6feb145689817", "a9cbf642063fb1086a93e8bc6be6feb145689817", "a9cbf642063fb1086a93e8bc6be6feb145689817", "a9cbf642063fb1086a93e8bc6be6feb14568981...
[ "tests/common/test_run/sqrt_run.py", "tests/common/test_run/ascend/logsigmoid_ad_run.py", "tests/common/test_run/ascend/upsampling_run.py", "tests/common/test_run/ascend/reduce_logsumexp_run.py", "tests/common/test_run/ascend/im2col_run.py", "tests/common/test_run/ascend/selu_run.py", "tests/common/test...
[ "# Copyright 2019-2021 Huawei Technologies Co., Ltd\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 applica...
[ [ "numpy.sqrt", "numpy.abs", "numpy.full" ], [ "numpy.reciprocal", "numpy.exp", "numpy.full" ], [ "numpy.repeat", "numpy.full" ], [ "numpy.log", "numpy.exp", "numpy.sum", "numpy.full" ], [ "numpy.zeros", "numpy.full" ], [ "numpy.maximum...
zcdzcdzcd/models
[ "a31b526a7617a152a138a865b5689bf5b59f655d", "a31b526a7617a152a138a865b5689bf5b59f655d", "a31b526a7617a152a138a865b5689bf5b59f655d", "a31b526a7617a152a138a865b5689bf5b59f655d", "a31b526a7617a152a138a865b5689bf5b59f655d", "a31b526a7617a152a138a865b5689bf5b59f655d", "a31b526a7617a152a138a865b5689bf5b59f655...
[ "official/nlp/optimization.py", "research/attention_ocr/python/datasets/unittest_utils.py", "official/transformer/utils/tokenizer_test.py", "official/transformer/v2/transformer_main.py", "samples/cookbook/regression/custom_regression.py", "official/r1/transformer/embedding_layer.py", "research/gan/image...
[ "# Copyright 2019 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.keras.optimizers.schedules.PolynomialDecay", "tensorflow.constant", "tensorflow.control_dependencies", "tensorflow.cast", "tensorflow.clip_by_global_norm", "tensorflow.no_op", "tensorflow.name_scope", "tensorflow.math.pow" ], [ "tensorflow.train.Example", "n...
ffcccc/MachineLearning
[ "78bc9c5df08b14f5d70ad5d6774c74f85a585c7e", "78bc9c5df08b14f5d70ad5d6774c74f85a585c7e" ]
[ "KNN.py", "examples/SVM_TEST.py" ]
[ "\"\"\"\n@Filename: KNN.py\n@Author: Danc1elion\n@Author: ffcccc\n@Create Date: 2019-04-29\n@Update Date: 2019-05-03\n@Description: Implement of KNN\n\"\"\"\n\nimport numpy as np\nimport operator as op\nimport AClassifier\nimport preProcess\n\nclass KNNClassifier(AClassifier.aClassifi...
[ [ "numpy.zeros", "numpy.tile" ], [ "numpy.delete", "sklearn.svm.SVC" ] ]
EricLi404/tensorflow
[ "23759800d89f7b5362c338d9a3fd72a6810c3e22", "23759800d89f7b5362c338d9a3fd72a6810c3e22", "be084bd7a4dd241eb781fc704f57bcacc5c9b6dd", "23759800d89f7b5362c338d9a3fd72a6810c3e22", "23759800d89f7b5362c338d9a3fd72a6810c3e22", "be084bd7a4dd241eb781fc704f57bcacc5c9b6dd", "23759800d89f7b5362c338d9a3fd72a6810c3e2...
[ "tensorflow/python/kernel_tests/conv_ops_test.py", "tensorflow/python/distribute/tpu_values.py", "tensorflow/python/keras/benchmarks/keras_examples_benchmarks/mnist_conv_custom_training_benchmark_test.py", "tensorflow/python/keras/utils/layer_utils.py", "tensorflow/python/distribute/mirrored_strategy.py", ...
[ "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.ops.gradient_checker.compute_gradient", "tensorflow.python.framework.test_util.run_in_graph_and_eager_modes", "tensorflow.python.platform.tf_logging.debug", "tensorflow.python.ops.array_ops.split", "numpy.issubdtype", "numpy.fabs", "tensorflow.python.ops.nn_ops.conv2...
vikranth22446/PyHessian
[ "e8b1fbadb24349eef8f3a137ecfd27dfc6e3bb53" ]
[ "density_plot.py" ]
[ "#*\n# @file Different utility functions\n# Copyright (c) Zhewei Yao, Amir Gholami\n# All rights reserved.\n# This file is part of PyHessian library.\n#\n# PyHessian is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software F...
[ [ "matplotlib.pyplot.semilogy", "matplotlib.pyplot.yticks", "matplotlib.pyplot.tight_layout", "numpy.sqrt", "numpy.linspace", "numpy.min", "matplotlib.use", "matplotlib.pyplot.savefig", "numpy.max", "numpy.mean", "numpy.exp", "matplotlib.pyplot.xlabel", "matplotli...
nokia/integratedimputation
[ "ca72bda54cb66e99d79ff0b174cf8f99ccb554ba", "ca72bda54cb66e99d79ff0b174cf8f99ccb554ba", "ca72bda54cb66e99d79ff0b174cf8f99ccb554ba" ]
[ "evals/gain/gain_fixm.py", "common/wgain_.py", "common/gain_.py" ]
[ "#!/usr/bin/env python3\n\n# © 2021 Nokia\n#\n# Licensed under the BSD 3 Clause license\n# SPDX-License-Identifier: BSD-3-Clause\n\n# http://proceedings.mlr.press/v80/yoon18a/yoon18a.pdf\n\nimport sys\n\nsys.path.append('../../common/')\nfrom defaults import *\nfrom gain_ import train\nfrom data_mobile imp...
[ [ "torch.utils.data.DataLoader", "torch.tensor" ], [ "torch.mean", "torch.nn.MSELoss", "torch.rand_like", "torch.cat", "torch.sum", "torch.no_grad", "torch.rand", "torch.gather", "torch.ones_like" ], [ "torch.mean", "torch.rand_like", "torch.cat", ...
aimimi2015/LDA_patent
[ "e5df0b8e1b741c19352485b5b2dca560e1a961f1" ]
[ "matplotlib/line.py" ]
[ "# coding: utf-8\nfrom __future__ import print_function\nfrom __future__ import print_function\nfrom __future__ import print_function\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pickle\nimport pprint\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pymysql\nimport pickle\nfrom sympy imp...
[ [ "matplotlib.pyplot.legend", "numpy.polyfit", "numpy.poly1d", "matplotlib.pyplot.title", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "numpy.std", "matplotlib.pyplot.xlabel", "numpy.array", "numpy.sum", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ...
Ceyron/Lattice-Boltzmann-Method-JAX
[ "f18e136e6e12fa575104053818c53b1689e50948" ]
[ "lattice_boltzmann_method_python_jax.py" ]
[ "r\"\"\"\nSolves the incompressible Navier Stokes equations using the Lattice-Boltzmann\nMethod¹. The scenario is the flow around a cylinder in 2D which yields a van\nKarman vortex street.\n\n\n periodic\n +-------------------------------------------------------------+\n ...
[ [ "matplotlib.pyplot.gca", "matplotlib.pyplot.contourf", "matplotlib.pyplot.pause", "matplotlib.pyplot.draw", "matplotlib.pyplot.Circle", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.subplot", "matplotlib.pyplot.clf", "matplotlib.pyplot.show", "matplotlib.pyplot.style.use...
take2rohit/monk_v1
[ "9c567bf2c8b571021b120d879ba9edf7751b9f92", "9c567bf2c8b571021b120d879ba9edf7751b9f92", "9c567bf2c8b571021b120d879ba9edf7751b9f92", "9c567bf2c8b571021b120d879ba9edf7751b9f92", "9c567bf2c8b571021b120d879ba9edf7751b9f92", "9c567bf2c8b571021b120d879ba9edf7751b9f92", "9c567bf2c8b571021b120d879ba9edf7751b9f9...
[ "monk/system_unit_tests/keras/test_block_squeezenet_fire.py", "monk/pip_unit_tests/pytorch/test_block_inception_d.py", "monk/system_unit_tests/pytorch/test_loss_l1.py", "monk/pip_unit_tests/keras/test_layer_global_average_pooling2d.py", "monk/pip_unit_tests/pytorch/test_activation_rrelu.py", "monk/pip_uni...
[ "import os\nimport sys\nsys.path.append(\"../../../../monk_v1/\");\nsys.path.append(\"../../../monk/\");\nimport psutil\n\nfrom keras_prototype import prototype\nfrom compare_prototype import compare\nfrom common import print_start\nfrom common import print_status\n\nimport tensorflow as tf\nif(tf.__version__[0] ==...
[ [ "tensorflow.compat.v1.placeholder", "tensorflow.compat.v1.disable_v2_behavior" ], [ "torch.randn" ], [ "torch.randn" ], [ "tensorflow.compat.v1.placeholder", "tensorflow.compat.v1.disable_v2_behavior" ], [ "torch.randn" ], [ "tensorflow.compat.v1.placeholder", ...
wangqingyu985/OpenStereo
[ "91d605357d65281b99b0d8cf45e3f15f0543c9fa", "91d605357d65281b99b0d8cf45e3f15f0543c9fa" ]
[ "models/CFPNet/submodule.py", "GFLOPs/HSMNet_GFLOPs/loss.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 numpy as np\n\n\ndef convbn(in_planes, out_planes, kernel_size, stride, pad, dilation):\n return nn.Sequential(nn.Conv2d(in_planes, ou...
[ [ "torch.nn.Sequential", "torch.cat", "torch.nn.Conv2d", "torch.sum", "torch.nn.Conv3d", "torch.nn.AvgPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.nn.BatchNorm3d" ], [ "torch.nn.functional.smooth_l1_loss" ] ]
vincentadam87/SVGPs
[ "0de1194bf0f24997148dfce0cd6fbffae16fb3bc" ]
[ "SVGPs/functions.py" ]
[ "# Copyright 2016 James Hensman, alexggmatthews\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 ...
[ [ "tensorflow.convert_to_tensor", "tensorflow.TensorShape", "tensorflow.matmul", "tensorflow.concat", "numpy.sqrt", "tensorflow.shape", "tensorflow.Dimension", "tensorflow.stack", "tensorflow.reshape", "tensorflow.rank", "tensorflow.sqrt", "tensorflow.add_n" ] ]
ttung/napari
[ "fa97a05b763dacc71d4c47e6b4b2a97c208e3551" ]
[ "napari/components/add_layers_mixin.py" ]
[ "import itertools\nimport numpy as np\n\nfrom .. import layers\nfrom ..utils import colormaps\nfrom ..utils.misc import ensure_iterable, is_iterable\nfrom ..utils import io\n\n\nclass AddLayersMixin:\n \"\"\"A mixin that adds add_* methods for adding layers to the ViewerModel.\n\n Each method corresponds to a...
[ [ "numpy.take", "numpy.empty" ] ]
askerlee/craft
[ "921a47a4e81017e5baf49c2823958cf86a0c1fc2" ]
[ "core/gma.py" ]
[ "import torch\nfrom torch import nn, einsum\nfrom einops import rearrange\n\n# max_pos_size = 160\nclass RelPosEmb(nn.Module):\n def __init__(\n self,\n max_pos_size,\n dim_head\n ):\n super().__init__()\n self.rel_height = nn.Embedding(2 * max_pos_size - 1, dim_...
[ [ "torch.zeros", "torch.randn", "torch.einsum", "torch.nn.Conv2d", "torch.nn.Embedding", "torch.arange" ] ]
ThomasGmeinder/incubator-mxnet
[ "0f3c5da37bf1647e18fce26beb9f06f5d6183846" ]
[ "python/mxnet/ndarray/numpy/_op.py" ]
[ "# pylint: disable=C0302\n# 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....
[ [ "numpy.unravel_index", "numpy.reshape", "numpy.around", "numpy.nan_to_num", "numpy.isscalar", "numpy.polyval", "numpy.flip" ] ]
michigg/web-simultaneous-recording-tool
[ "67db83f6e34d9cb726c69b4e448fed3604a43618" ]
[ "analyser/analysis/pen_calculation_deviation_box_plots.py" ]
[ "\"\"\"\n\n\"\"\"\nimport sys\n\nimport numpy as np\nimport pandas as pd\nfrom scipy.signal import argrelextrema\n\nfrom analysis.frog_click_mean_calculation import calc_click_mean_quantil_based\nfrom utils import dataframe_index, audio_calcs\nfrom utils.data_exporter import Exporter\nfrom utils.data_loader import ...
[ [ "pandas.set_option", "pandas.concat" ] ]
Ali-Tahir/spaCy
[ "9e210fa7fdb8e376655e7a7ab7debd3ffd718a63" ]
[ "spacy/cli/pretrain.py" ]
[ "# coding: utf8\nfrom __future__ import print_function, unicode_literals\n\nimport plac\nimport random\nimport numpy\nimport time\nimport re\nfrom collections import Counter\nfrom pathlib import Path\nfrom thinc.v2v import Affine, Maxout\nfrom thinc.misc import LayerNorm as LN\nfrom thinc.neural.util import prefer_...
[ [ "numpy.asarray", "torch.set_default_tensor_type" ] ]
k-stacke/ssl-pathology
[ "d440ce11712a5c1b6631d698dc3cafe7c04e2786" ]
[ "simclr/model.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.cuda import amp\nfrom torchvision.models import resnet50\n\nclass Identity(nn.Module):\n def __init__(self):\n super(Identity, self).__init__()\n\n def forward(self, x):\n return x\n\nclass Model(nn.Module):\n d...
[ [ "torch.nn.functional.normalize", "torch.nn.BatchNorm1d", "torch.cuda.amp.autocast", "torch.nn.Linear", "torch.flatten", "torch.nn.ReLU" ] ]
dina-fouad/pyccel
[ "f4d919e673b400442b9c7b81212b6fbef749c7b7", "f4d919e673b400442b9c7b81212b6fbef749c7b7", "f4d919e673b400442b9c7b81212b6fbef749c7b7", "f4d919e673b400442b9c7b81212b6fbef749c7b7" ]
[ "tests/codegen/ccode/scripts/arrays_pointers.py", "tests/codegen/fcode/scripts/complex_numbers.py", "doc/scripts/scripts/decorators_elemental.py", "tests/epyccel/modules/openmp.py" ]
[ "# pylint: disable=missing-function-docstring, missing-module-docstring/\n#==============================================================================\n\ndef allocatable_to_pointer():\n\n from numpy import array\n\n a = array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])\n c = a #pylint:disable=unused-variable\n\nde...
[ [ "numpy.array" ], [ "numpy.array", "numpy.zeros", "numpy.ones" ], [ "numpy.array", "numpy.zeros_like" ], [ "numpy.array", "numpy.matmul", "numpy.zeros" ] ]
MaxCodeXTC/symmetrynet
[ "f42810be95ecaa85a32a836213cb8d0687184574" ]
[ "train.py" ]
[ "#!/usr/bin/env python3\n\"\"\"Training and Evaluate the Neural Network\nUsage:\n train.py [options] <yaml-config>\n train.py (-h | --help )\n\nArguments:\n yaml-config Path to the yaml hyper-parameter file\n\nOptions:\n -h --help Show this screen.\n -d --de...
[ [ "torch.cuda.manual_seed", "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.cuda.is_available", "torch.device", "torch.cuda.device_count" ] ]
williamscales/pytopocomplexity
[ "f739b7695066f5da40a9610d21579983a12e76ad" ]
[ "tests/test_entropy.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"Tests for `pytopocomplexity.entropy`\"\"\"\n\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nfrom future.builtins import (ascii, bytes, chr, dict, filter, hex, input, int,\n ...
[ [ "numpy.random.random_sample" ] ]
jkomyno/lattice-submodular-maximization
[ "e03c8bcc5fcf5bf79a6ae81f145757cf3fdff7cb" ]
[ "python/benchmark/utils/powerset.py" ]
[ "import numpy as np\nimport itertools\nfrom nptyping import NDArray\nfrom typing import Iterator\nfrom ..objective import Objective\n\n\ndef powerset(f: Objective) -> Iterator[NDArray[int]]:\n \"\"\"\n Inumerate b^n possible vectors in the integer lattice.\n :param f: integer-lattice submodular function ob...
[ [ "numpy.array" ] ]
JingqingZ/tensorlayer2
[ "289a0402bd64f6a423aa574f10ac8ad8efcb7b66", "289a0402bd64f6a423aa574f10ac8ad8efcb7b66", "289a0402bd64f6a423aa574f10ac8ad8efcb7b66" ]
[ "examples/basic_tutorials/tutorial_cifar10_placeholder.py", "tests/layers/test_layers_merge.py", "tests/layers/test_layers_lambda.py" ]
[ "#! /usr/bin/python\n# -*- coding: utf-8 -*-\n\nimport time\n\nimport numpy as np\nimport tensorflow as tf\n\nimport tensorlayer as tl\nfrom tensorlayer.layers import *\n\ntf.logging.set_verbosity(tf.logging.DEBUG)\ntl.logging.set_verbosity(tl.logging.DEBUG)\n\nsess = tf.InteractiveSession()\n\nX_train, y_train, X_...
[ [ "tensorflow.InteractiveSession", "tensorflow.cast", "tensorflow.truncated_normal_initializer", "tensorflow.placeholder", "tensorflow.constant_initializer", "tensorflow.global_variables_initializer", "numpy.std", "numpy.mean", "tensorflow.logging.set_verbosity", "tensorflow....
hotchilianalytics/zipline-broker
[ "fb475cf89ec8886db4ee6420bd9aca70c1821eab" ]
[ "tests/test_finance.py" ]
[ "#\n# Copyright 2013 Quantopian, 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...
[ [ "pandas.Timestamp" ] ]
anonymous29387491/iclr2022
[ "60c5727f8519e64610b632d074510587fb7ff692", "60c5727f8519e64610b632d074510587fb7ff692" ]
[ "Tests/attribution_calculation/ShapleyExcess/iterate_drug.py", "Tests/attribution_calculation/Interaction-kernelshap/iterate_census_intKS.py" ]
[ "from torchvision import datasets, transforms\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nfrom torch.utils.data import DataLoader\r\nfrom argparse import ArgumentParser \r\nfrom tqdm import tqdm\r\nimport time\r\nimport numpy as np\r\n\r\n\r\n###########\r\n# file imports / path i...
[ [ "numpy.array", "torch.utils.data.DataLoader", "numpy.zeros_like", "numpy.zeros" ], [ "numpy.array", "pandas.read_pickle", "numpy.zeros", "numpy.loadtxt" ] ]
zhangyuejoslin/Recurrent-VLN-BERT
[ "f9bc81c297d6ad04b6b846b4d702a8f7bb4544ab", "f9bc81c297d6ad04b6b846b4d702a8f7bb4544ab" ]
[ "r2r_src_update/train.py", "r2r_src/vlnbert/vlnbert_PREVALENT.py" ]
[ "import torch\n\nimport os\nimport time\nimport json\nimport random\nimport numpy as np\nfrom collections import defaultdict\n\nfrom utils import read_vocab, write_vocab, build_vocab, padding_idx, timeSince, read_img_features, print_progress, roi_img_features\nimport utils\nfrom env import R2RBatch\nfrom agent impo...
[ [ "torch.manual_seed", "numpy.load", "numpy.random.seed", "torch.cuda.manual_seed" ], [ "torch.nn.Softmax", "torch.nn.Dropout", "torch.sigmoid", "torch.cat", "torch.zeros_like", "torch.nn.Embedding", "torch.nn.Tanh", "torch.nn.Linear", "torch.matmul", "tor...
alexjercan/unsupervised-segmentation
[ "172273fef52df3771d8de7c167fb0910f4079733" ]
[ "fcntest.py" ]
[ "from metrics import MetricFunctionNYUv2, print_single_error\nfrom model import SupervisedLossFunction\nfrom torch.utils.data import DataLoader\nfrom torchvision import transforms\nfrom nyuv2 import NYUv2\nfrom tqdm import tqdm\nfrom general import generate_layers, load_checkpoint, tensors_to_device\nimport torch\n...
[ [ "torch.stack", "torch.no_grad", "torch.utils.data.DataLoader", "torch.cuda.is_available" ] ]
dccastro/NDFlow
[ "1e46cf00e78068d3c78281b42aa8aaed310e53c9" ]
[ "ndflow/util.py" ]
[ "import os\n\nimport numpy as np\n\nimport ndflow\nfrom ndflow.models.mixture import MixtureModel\n\n\ndef list_images(imgs_dir):\n import SimpleITK as sitk\n\n for filename in os.listdir(imgs_dir):\n path = os.path.join(imgs_dir, filename)\n reader = sitk.ImageFileReader()\n reader.SetFi...
[ [ "matplotlib.pyplot.gca", "numpy.asarray", "numpy.bincount", "numpy.histogram", "numpy.empty" ] ]
AIVIS-inc/mmsegmentation
[ "e2b13de52e970215be566067cab7bd880010f062" ]
[ "mmseg/models/backbones/resnet.py" ]
[ "import warnings\n\nimport torch.nn as nn\nimport torch.utils.checkpoint as cp\nfrom mmcv.cnn import build_conv_layer, build_norm_layer, build_plugin_layer\nfrom mmcv.runner import BaseModule\nfrom mmcv.utils.parrots_wrapper import _BatchNorm\n\nfrom ..builder import BACKBONES\nfrom ..utils import ResLayer\n\n\ncla...
[ [ "torch.nn.MaxPool2d", "torch.nn.ReLU", "torch.utils.checkpoint.checkpoint" ] ]
edawson/parliament2
[ "2632aa3484ef64c9539c4885026b705b737f6d1e", "2632aa3484ef64c9539c4885026b705b737f6d1e", "2632aa3484ef64c9539c4885026b705b737f6d1e", "2632aa3484ef64c9539c4885026b705b737f6d1e", "2632aa3484ef64c9539c4885026b705b737f6d1e", "2632aa3484ef64c9539c4885026b705b737f6d1e", "2632aa3484ef64c9539c4885026b705b737f6d1...
[ "resources/usr/local/lib/python2.7/dist-packages/sklearn/cluster/bicluster/spectral.py", "resources/usr/local/lib/python2.7/dist-packages/sklearn/cluster/k_means_.py", "resources/usr/local/lib/python2.7/dist-packages/sklearn/feature_selection/rfe.py", "resources/usr/local/lib/python2.7/dist-packages/sklearn/p...
[ "\"\"\"Implements spectral biclustering algorithms.\n\nAuthors : Kemal Eren\nLicense: BSD 3 clause\n\n\"\"\"\nfrom abc import ABCMeta, abstractmethod\n\nimport numpy as np\n\nfrom scipy.sparse import dia_matrix\nfrom scipy.sparse import issparse\n\nfrom sklearn.base import BaseEstimator, BiclusterMixin\nfrom sklear...
[ [ "sklearn.utils.extmath.randomized_svd", "sklearn.utils.extmath.make_nonnegative", "sklearn.externals.six.with_metaclass", "numpy.log", "scipy.sparse.issparse", "sklearn.utils.validation.check_arrays", "sklearn.utils.validation.assert_all_finite", "numpy.isnan", "sklearn.utils.e...
sailxjx/DI-engine
[ "c6763f8e2ba885a2a02f611195a1b5f8b50bff00", "c6763f8e2ba885a2a02f611195a1b5f8b50bff00", "c6763f8e2ba885a2a02f611195a1b5f8b50bff00", "c6763f8e2ba885a2a02f611195a1b5f8b50bff00", "c6763f8e2ba885a2a02f611195a1b5f8b50bff00", "c6763f8e2ba885a2a02f611195a1b5f8b50bff00", "c6763f8e2ba885a2a02f611195a1b5f8b50bff0...
[ "ding/utils/time_helper.py", "ding/hpc_rl/tests/test_lstm.py", "ding/model/template/ppg.py", "dizoo/overcooked/envs/overcooked_env.py", "ding/policy/a2c.py", "ding/rl_utils/tests/test_ppg.py", "ding/policy/cql.py" ]
[ "import signal\nimport time\nfrom typing import Any, Callable\n\nimport torch\nfrom easydict import EasyDict\nfrom .time_helper_base import TimeWrapper\nfrom .time_helper_cuda import get_cuda_time_wrapper\n\n\ndef build_time_helper(cfg: EasyDict = None, wrapper_type: str = None) -> Callable[[], 'TimeWrapper']:\n ...
[ [ "torch.cuda.is_available" ], [ "torch.cuda.synchronize", "torch.cat", "torch.randn", "torch.rand", "torch.cuda.is_available", "torch.flatten" ], [ "torch.nn.ReLU" ], [ "numpy.random.seed", "numpy.random.choice", "numpy.stack", "numpy.concatenate", "n...
Shivakoreddi/CryptoDataApplication
[ "ad620231a0614ed6f4f587dfcfb83249d1d16689" ]
[ "connectingPipelines/coins_ld.py" ]
[ "from apiWrapper import coinAPI\nfrom sqlalchemy import create_engine\nfrom sqlalchemy import Table,Column,Integer,String,MetaData,ForeignKey\nimport sqlite3\nfrom sqlite3 import Error\nimport pandas as pd\nimport os\n\n\ndef main():\n path = \"/CryptoDataApplication/\"\n for filename in os.listdir(path):\n ...
[ [ "pandas.read_csv" ] ]
Nikolay-Lysenko/gpn
[ "a59f43e90536f85f8b0051c5ce6d0497081a5a8f" ]
[ "tests/test_graph.py" ]
[ "\"\"\"\nTest `graph.py` module.\n\nAuthor: Nikolay Lysenko\n\"\"\"\n\n\nfrom typing import List, Tuple\n\nimport pytest\nimport tensorflow as tf\nimport numpy as np\n\nfrom gpn.graph import sample_multiple_fragments\n\n\n@pytest.mark.parametrize(\n \"images, corners, fragment_size, frame_size, n_channels, expec...
[ [ "tensorflow.Graph", "tensorflow.placeholder", "numpy.testing.assert_array_equal", "tensorflow.Session", "numpy.array" ] ]
caserwin/daily-learning-python
[ "01fea4c5d4e86cbea2dbef8817146f018b5f1479" ]
[ "demo_sklearn/model/model_test.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# @Time : 2019/5/19 下午2:08\n# @Author : Erwin\nfrom common.pickle_helper import read_model\nimport numpy as np\n# noinspection PyUnresolvedReferences\nfrom sklearn.neighbors import LocalOutlierFactor\n# noinspection PyUnresolvedReferences\nfrom sklearn.ensemble impo...
[ [ "numpy.array" ] ]
doffing81/lambdata-AshleyBrooks213
[ "9c5d4b5f49094e1b2d43f51e7e42ece2e98e3bb6" ]
[ "lambdata/helper_functions.py" ]
[ "\"\"\"A collection of Data Science helper functions\"\"\"\n\nimport pandas as pd \nimport numpy as np \nimport random\n\ndef df_cleaner(df):\n \"\"\"Clean a df of nulls\"\"\"\n return df.dropna()\n\n\n\"\"\"Check to make sure that code works\"\"\"\nprint(\"df_cleaner is working!\") \n\n\ndef null_count(df):\...
[ [ "pandas.DataFrame" ] ]
tianjuxue/AmorFEA
[ "5ddf6c1c9d4489e74a207d5d63ca00af57911ab0" ]
[ "src/opt/optimizer_robot.py" ]
[ "import numpy as np\nimport torch\nimport scipy.optimize as opt\nimport time\nfrom .optimizer import Optimizer\nfrom ..ml.trainer_robot import TrainerRobot\nfrom ..ml.models import RobotNetwork, RobotSolver\nfrom .. import arguments\nfrom ..graph.visualization import scalar_field_paraview\n\n\nclass OptimizerRobot(...
[ [ "numpy.linalg.solve", "numpy.expand_dims", "numpy.linspace", "torch.load", "numpy.asarray", "numpy.matmul", "numpy.cos", "torch.tensor", "numpy.concatenate", "numpy.sin", "numpy.ones", "scipy.optimize.minimize", "numpy.array", "numpy.zeros", "torch.autog...
alfrunesiq/SemanticSegmentationActiveLearning
[ "3f953a22c8fd95828c9bd4c5ce52a53e991391e4" ]
[ "active_learning.py" ]
[ "# Python standard libraries\nimport argparse\nimport glob\nimport json\nimport logging\nimport logging.config\nimport os\nimport sys\n\n# Non-standard includes\nimport numpy as np\nimport tensorflow as tf\n# Maybe import tqdm\nshow_progress = False\ntry:\n import tqdm\n show_progress = True\nexcept ImportErr...
[ [ "tensorflow.device", "tensorflow.control_dependencies", "tensorflow.cast", "numpy.concatenate", "tensorflow.where", "tensorflow.train.AdamOptimizer", "tensorflow.keras.regularizers.l1_l2", "tensorflow.group", "tensorflow.summary.scalar", "tensorflow.math.argmax", "tenso...
naveenarun/MolGAN
[ "c304707144ec9a4870390011aa73cdc7078a0e9d" ]
[ "utils/sparse_molecular_dataset.py" ]
[ "import pickle\nimport numpy as np\n\nfrom rdkit import Chem\n\nif __name__ == '__main__':\n from progress_bar import ProgressBar\nelse:\n from utils.progress_bar import ProgressBar\n\nfrom datetime import datetime\n\n\nclass SparseMolecularDataset():\n\n def load(self, filename, subset=1):\n\n with...
[ [ "numpy.nonzero", "numpy.stack", "numpy.random.shuffle", "numpy.linalg.eigh", "numpy.count_nonzero", "numpy.array", "numpy.zeros" ] ]
YufengChenK/scVI-1
[ "c05237c384c59f1fd783ee1f45e75d108bcabf4e" ]
[ "scvi/dataset/csv.py" ]
[ "from .dataset import GeneExpressionDataset\nimport pandas as pd\nimport numpy as np\nimport os\n\n\nclass CsvDataset(GeneExpressionDataset):\n r\"\"\" Loads a `.csv` file.\n\n Args:\n :filename: Name of the `.csv` file.\n :save_path: Save path of the dataset. Default: ``'data/'``.\n :url...
[ [ "numpy.array", "numpy.unique" ] ]
Holmeswww/Text_Infilling
[ "f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3", "f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3", "f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3", "f63cd24bee5c62d7dedd8fb35c4e52aee20c39f3" ]
[ "texar/modules/policies/policy_nets_test.py", "texar/data/data_decoders.py", "text_infilling/self_attn.py", "texar/losses/adv_losses.py" ]
[ "#\n\"\"\"\nTests policy nets.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport tensorflow as tf\n\nfrom texar.modules.policies.policy_nets import CategoricalPolicyNet\n\nclass CategoricalPoli...
[ [ "tensorflow.random_uniform", "tensorflow.test.main" ], [ "tensorflow.reduce_max", "tensorflow.concat", "tensorflow.shape", "tensorflow.reshape", "tensorflow.cast", "tensorflow.minimum", "numpy.append", "tensorflow.map_fn", "tensorflow.string_split", "tensorflow....
tramtran2/prlab_image_colorization
[ "3ec7f3ad60d6235c5bb232713f1b3ec5f06f4d67" ]
[ "sources/image_colorization/datasets/quantized_colors/utils.py" ]
[ "\"\"\"\nFunctions:\n def read_image(img_path, is_resize = True, width = 224, height = 224, interpolation = cv2.INTER_AREA)\n \n def cielab_color_space()\n def view_db_info(db_root, db_files, db_name)\n \n def compute_prior_prob(image_files, width, height, do_plot, pts_in_hull_path, prior_prob_pat...
[ [ "numpy.linspace", "numpy.max", "matplotlib.pylab.legend", "matplotlib.pylab.close", "numpy.ones_like", "matplotlib.pylab.yticks", "matplotlib.pylab.xlim", "numpy.unique", "numpy.arange", "numpy.save", "matplotlib.pylab.subplot", "scipy.interpolate.interp1d", "ma...
HarshCasper/mars
[ "4c12c968414d666c7a10f497bc22de90376b1932", "4c12c968414d666c7a10f497bc22de90376b1932", "4c12c968414d666c7a10f497bc22de90376b1932", "4c12c968414d666c7a10f497bc22de90376b1932" ]
[ "mars/tensor/linalg/cholesky.py", "mars/tensor/tests/test_utils.py", "mars/learn/neighbors/tree.py", "mars/tensor/random/beta.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2020 Alibaba Group Holding Ltd.\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/li...
[ [ "numpy.array", "numpy.linalg.LinAlgError" ], [ "numpy.printoptions", "numpy.get_printoptions", "numpy.testing.assert_array_equal", "numpy.random.rand", "numpy.array" ], [ "numpy.dtype" ], [ "numpy.random.RandomState", "numpy.dtype" ] ]
hatrungduc/spark-nlp
[ "b38260543524507e34cbcb7fa2006923091634ad" ]
[ "python/tensorflow/lib/ner/embeddings_resolver.py" ]
[ "import shutil\nimport numpy as np\nimport plyvel\nimport os.path\nimport sys\nsys.path.append('../')\nfrom bert.modeling import *\nfrom bert.tokenization import *\nimport json\nimport os.path\nimport numpy as np\n\n\nclass TokenEmbeddings:\n def __init__(self, piece, is_word_start, vector):\n self.piece ...
[ [ "numpy.frombuffer", "numpy.squeeze", "numpy.array", "numpy.shape" ] ]
colibri-coruscans/pyGSTi
[ "da54f4abf668a28476030528f81afa46a1fbba33", "da54f4abf668a28476030528f81afa46a1fbba33", "da54f4abf668a28476030528f81afa46a1fbba33", "da54f4abf668a28476030528f81afa46a1fbba33", "da54f4abf668a28476030528f81afa46a1fbba33", "da54f4abf668a28476030528f81afa46a1fbba33" ]
[ "pygsti/algorithms/germselection.py", "pygsti/report/vbplot.py", "test/test_packages/drivers/testTimeDep.py", "pygsti/layouts/matrixlayout.py", "pygsti/report/colormaps.py", "pygsti/report/python.py" ]
[ "\"\"\"\nFunctions for selecting a complete set of germs for a GST analysis.\n\"\"\"\n#***************************************************************************************************\n# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).\n# Under the terms of Contract DE-NA0...
[ [ "numpy.dot", "numpy.expand_dims", "numpy.kron", "numpy.max", "numpy.argmin", "numpy.any", "numpy.where", "numpy.trace", "numpy.conjugate", "numpy.linalg.eig", "numpy.tensordot", "numpy.zeros", "numpy.linalg.inv", "numpy.array", "numpy.sum", "numpy.li...
ClarePan/Tax-Calculator
[ "d2d6cb4b551f34017db7166d91d982b5c4670816", "d2d6cb4b551f34017db7166d91d982b5c4670816" ]
[ "taxcalc/tests/test_calculate.py", "taxcalc/calculate.py" ]
[ "# CODING-STYLE CHECKS:\n# pycodestyle test_calculate.py\n\nimport os\nimport json\nfrom io import StringIO\nimport tempfile\nimport copy\nimport six\nimport pytest\nimport numpy as np\nimport pandas as pd\nfrom taxcalc import Policy, Records, Calculator, Behavior, Consumption\n\n\nRAWINPUTFILE_FUNITS = 4\nRAWINPUT...
[ [ "numpy.array", "numpy.zeros", "numpy.allclose", "numpy.array_equal" ], [ "pandas.concat", "numpy.allclose", "pandas.DataFrame", "numpy.column_stack", "numpy.where", "numpy.zeros" ] ]
shivgarg/alfred_transformers
[ "3eab07d3a218eb9b809dec8b7120b92ebd00c890" ]
[ "models/model/seq2seq_im_mask_cnn_finetune.py" ]
[ "import os\nimport torch\nimport numpy as np\nimport nn.vnn as vnn\nimport collections\nfrom torch import nn\nfrom torch.nn import functional as F\nfrom torch.nn.utils.rnn import pad_sequence, pack_padded_sequence, pad_packed_sequence\nfrom model.seq2seq import Module as Base\nfrom models.utils.metric import comput...
[ [ "torch.nn.Dropout", "numpy.expand_dims", "torch.nn.LSTM", "torch.cat", "torch.nn.functional.cross_entropy", "torch.zeros_like", "torch.nn.utils.rnn.pad_sequence", "torch.nn.utils.rnn.pack_padded_sequence", "torch.tensor", "torch.nn.functional.sigmoid", "torch.nn.BCEWith...
GarnixJu2015/GamestonkTerminal
[ "ec400e46ddce4ac934af836b863528f14a13d865" ]
[ "tests/gamestonk_terminal/etf/discovery/test_disc_controller.py" ]
[ "# IMPORTATION STANDARD\nimport os\n\n# IMPORTATION THIRDPARTY\nimport pandas as pd\nimport pytest\n\n# IMPORTATION INTERNAL\nfrom gamestonk_terminal.etf.discovery import disc_controller\n\n# pylint: disable=E1101\n# pylint: disable=W0603\n# pylint: disable=E1111\n\nEMPTY_DF = pd.DataFrame()\n\n\n@pytest.mark.vcr(r...
[ [ "pandas.DataFrame" ] ]
maij/pyGSTi
[ "4f8bf5337b01b7afcb7b0580b717b5d1fe281be4", "4f8bf5337b01b7afcb7b0580b717b5d1fe281be4" ]
[ "pygsti/models/modelconstruction.py", "pygsti/report/workspacetables.py" ]
[ "\"\"\"\nFunctions for the construction of new models.\n\"\"\"\n#***************************************************************************************************\n# Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS).\n# Under the terms of Contract DE-NA0003525 with NTESS, the...
[ [ "numpy.dot", "numpy.log2", "numpy.sqrt", "numpy.allclose", "numpy.arange", "numpy.kron", "numpy.linalg.norm", "scipy.linalg.expm", "numpy.real", "numpy.identity", "numpy.array", "numpy.zeros" ], [ "numpy.dot", "numpy.log2", "numpy.sqrt", "numpy.a...
OmarJabri7/SAIA
[ "54dfee4684dbfd5bf6cb58cc3974abc051022022" ]
[ "data/get_data.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom nltk.corpus import words\nimport nltk\nimport re\nimport string\nfrom data_processing import DisasterProcessor\n\nX = pd.read_csv(\"emotion_data/tweet_emotions.csv\")\n\nstop_wrds = nltk.corpus.stopwords.words(\"english\")\ncolumns = X.columns\ncolumns = [\"content\"]\...
[ [ "pandas.read_csv", "pandas.DataFrame", "numpy.unique" ] ]
AustinHellerRepo/GameManager
[ "2eee8e821f551b4683e59ea8cde7e61c26cf8878" ]
[ "test/latency_position_test.py" ]
[ "from __future__ import annotations\nimport unittest\nimport time\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom typing import List, Tuple, Dict, Set, Callable, Type\n\n\nclass Dot():\n\n\tdef __init__(self, position: Tuple[float, float], velocity: Tuple[float, float], acceleration: Tuple[float, float])...
[ [ "matplotlib.pyplot.ylim", "matplotlib.pyplot.subplots", "matplotlib.pyplot.draw", "matplotlib.pyplot.xlim", "matplotlib.pyplot.waitforbuttonpress", "matplotlib.pyplot.ion", "matplotlib.pyplot.pause" ] ]
luisangel86a/tensorflow
[ "77ee5e02721ba797fe01d47019e6017d2bb09ab7" ]
[ "tensorflow/python/keras/optimizer_v2/utils.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.tf_logging.warning", "tensorflow.python.distribute.distribution_strategy_context.get_strategy", "tensorflow.python.ops.clip_ops.clip_by_norm", "tensorflow.python.ops.clip_ops.clip_by_value", "tensorflow.python.distribute.distribution_strategy_context.get_replica_con...
qgallouedec/stable-baselines3
[ "a6f5049a99a4c21a6f0bcce458ca3306cef310e0" ]
[ "stable_baselines3/common/vec_env/subproc_vec_env.py" ]
[ "import multiprocessing as mp\nfrom collections import OrderedDict\nfrom typing import Any, Callable, List, Optional, Sequence, Tuple, Type, Union\n\nimport gym\nimport numpy as np\n\nfrom stable_baselines3.common.vec_env.base_vec_env import (\n CloudpickleWrapper,\n VecEnv,\n VecEnvIndices,\n VecEnvObs...
[ [ "numpy.stack", "numpy.random.randint" ] ]
rartino/httk-rsttools
[ "57c46362899105a72b3b6efc45b50bcda8e574a7" ]
[ "rstslide/plugins/Matplotlib/XKCDify.py" ]
[ "\"\"\"\nXKCD plot generator\n-------------------\nAuthor: Jake Vanderplas\n\nThis is a script that will take any matplotlib line diagram, and convert it\nto an XKCD-style plot. It will work for plots with line & text elements,\nincluding axes labels and titles (but not axes tick labels).\n\nThe idea for this come...
[ [ "numpy.sqrt", "numpy.asarray", "numpy.arange", "scipy.interpolate.splprep", "scipy.interpolate.splev", "numpy.random.normal", "scipy.signal.lfilter", "numpy.array", "scipy.signal.firwin" ] ]
bubbliiiing/yolox-tf2
[ "0407c77858d436a6b370e591eea7963cc807f3b4" ]
[ "utils/utils_fit.py" ]
[ "import os\r\n\r\nimport tensorflow as tf\r\nfrom nets.yolo import get_yolo_loss\r\nfrom tqdm import tqdm\r\n\r\n\r\n#------------------------------#\r\n# 防止bug\r\n#------------------------------#\r\ndef get_train_step_fn(strategy):\r\n @tf.function\r\n def train_step(imgs, targets, net, yolo_loss, optimize...
[ [ "tensorflow.reduce_sum", "tensorflow.GradientTape" ] ]
aaronspring/doppyo
[ "e29e21fbb997f024f39d2e5e67decfc235b0dcca" ]
[ "doppyo/sugar.py" ]
[ "\"\"\"\n Collection of old doppyo functions and useful tidbits for internal dcfp use\n Authors: Dougie Squire and Thomas Moore\n Date created: 01/10/2018\n Python Version: 3.6\n\"\"\"\n\n# ===================================================================================================\n# Packages\n#...
[ [ "pandas.infer_freq", "matplotlib.pyplot.tight_layout", "numpy.linspace", "numpy.unique", "numpy.isnan", "numpy.ndarray.flatten", "numpy.datetime64", "numpy.timedelta64", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.subplot", "matplotlib.rcParams.update", "numpy....
gonzalo-munillag/Private_AI_OpenMined
[ "c23da9cc1c914d10646a0c0bc1a2497fe2cbaaca", "c23da9cc1c914d10646a0c0bc1a2497fe2cbaaca" ]
[ "Foundations_of_Private_Computation/Split_Learning/concepts-definitions-code/ite-repo/demos/analytical_values/demo_k_ejt1.py", "Foundations_of_Private_Computation/Split_Learning/concepts-definitions-code/ite-repo/demos/analytical_values/demo_i_renyi.py" ]
[ "#!/usr/bin/env python3\n\n\"\"\" Demo for exponentiated Jensen-Tsallis kernel-1 estimators.\n\nAnalytical vs estimated value is illustrated for spherical normal random\nvariables.\n\n\"\"\"\n\nfrom numpy import eye\nfrom numpy.random import rand, multivariate_normal, randn\nfrom scipy import arange, zeros, ones\ni...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "scipy.zeros", "numpy.eye", "numpy.random.randn", "numpy.random.rand", "scipy.arange", "scipy.ones", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ], [ "matplotlib.pyplot.l...
jiangzoi/incubator-tvm
[ "144c6f45f7217b9df2f5605e06f0903e470ac11c", "144c6f45f7217b9df2f5605e06f0903e470ac11c", "144c6f45f7217b9df2f5605e06f0903e470ac11c", "144c6f45f7217b9df2f5605e06f0903e470ac11c", "144c6f45f7217b9df2f5605e06f0903e470ac11c", "144c6f45f7217b9df2f5605e06f0903e470ac11c", "144c6f45f7217b9df2f5605e06f0903e470ac11...
[ "tests/python/contrib/test_gemm_acc32_vnni.py", "tests/python/relay/test_pass_auto_quantize.py", "topi/tests/python/test_topi_dense_tensorcore.py", "apps/extension/tests/test_ext.py", "tests/python/relay/test_adt.py", "tests/python/relay/dyn/test_dynamic_op_level3.py", "apps/ios_rpc/tests/ios_rpc_mobile...
[ "# 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.dot", "numpy.zeros", "numpy.random.uniform" ], [ "numpy.random.uniform" ], [ "numpy.random.uniform", "numpy.dot" ], [ "numpy.random.uniform", "numpy.zeros" ], [ "numpy.split", "numpy.expand_dims", "numpy.stack", "numpy.concatenate", "numpy...
kifarid/ray
[ "43c97c2afb979987be82fa50048674e9b6776d5d", "bc08c6cdcc7ddf4da751ca2a972defd3db509061", "43c97c2afb979987be82fa50048674e9b6776d5d", "43c97c2afb979987be82fa50048674e9b6776d5d", "bc08c6cdcc7ddf4da751ca2a972defd3db509061" ]
[ "rllib/agents/marwil/tests/test_marwil.py", "rllib/env/wrappers/atari_wrappers.py", "rllib/policy/torch_policy.py", "python/ray/_private/parameter.py", "rllib/evaluation/episode.py" ]
[ "import numpy as np\nimport os\nfrom pathlib import Path\nimport unittest\n\nimport ray\nimport ray.rllib.agents.marwil as marwil\nfrom ray.rllib.evaluation.postprocessing import compute_advantages\nfrom ray.rllib.offline import JsonReader\nfrom ray.rllib.utils.framework import try_import_tf, try_import_torch\nfrom...
[ [ "numpy.square", "numpy.exp", "numpy.mean", "numpy.sqrt" ], [ "numpy.squeeze", "numpy.sign", "numpy.concatenate", "numpy.array", "numpy.zeros" ], [ "numpy.asarray", "numpy.array" ], [ "numpy.__version__.split" ], [ "numpy.zeros_like" ] ]
LucaMalavolta/q2
[ "d4cd62c3ea898c99334ea84e2b41ec75db9558f7" ]
[ "config.py" ]
[ "import os\r\nimport logging\r\nimport matplotlib.pyplot as plt\r\n\r\nlogger = logging.getLogger(__name__)\r\n\r\n\r\npath = os.path.dirname(os.path.realpath(__file__))\r\npath = os.path.join(path, 'Data')\r\n\r\nCOLORTEFF_PATH = os.path.join(path, 'ColorTeff')\r\nMODATM_PATH = os.path.join(path, 'ModelAtmosp...
[ [ "matplotlib.pyplot.rc" ] ]
SeHwanJoo/mmdetection_body
[ "1e1cadc6df91926fc99c4afbae383df0ea9cfed3" ]
[ "mmdet/models/seg_heads/panoptic_fpn_head.py" ]
[ "import torch\nimport torch.nn as nn\nfrom mmcv.runner import ModuleList\n\nfrom ..builder import HEADS\nfrom ..utils import ConvUpsample\nfrom .base_semantic_head import BaseSemanticHead\n\n\n@HEADS.register_module()\nclass PanopticFPNHead(BaseSemanticHead):\n \"\"\"PanopticFPNHead used in Panoptic FPN.\n\n ...
[ [ "torch.stack", "torch.nn.Conv2d", "torch.nn.init.normal_", "torch.where" ] ]
AndresGarciaEscalante/bstld
[ "cc37fb3388b7731be9e76fd1c4e2be13b6716afe" ]
[ "tf_object_detection/to_tfrecords.py" ]
[ "#!/usr/bin/env python3\n\"\"\"\nCreates full-image tfrecords to use the Bosch Small Traffic Lights Dataset\nwith the Tensorflow Object Detection API.\n\nThe training set is split into training and validation. Tfrecords are created\nfor a training, validation, and test set. Labels are grouped by their respective\nc...
[ [ "tensorflow.io.TFRecordWriter", "tensorflow.train.BytesList" ] ]
soyoung9306/-3-keras
[ "4090fcc86072cda816d1d6056b5113ace49534ae", "e65f40171aadef3fe0b59c649b55b3f0bd09ca41" ]
[ "ex9_1_applications_agumentation.py", "old/gan_cnn_mnist_org.py" ]
[ "\"\"\"\nCH 9.1 Applications/Image Augmentation\n\"\"\"\nfrom sklearn import model_selection\nfrom keras import datasets\nimport keras\nassert keras.backend.image_data_format() == 'channels_last'\n\nfrom keraspp import aigen\n\n\nclass Machine(aigen.Machine_Generator):\n def __init__(self):\n (x_train, y_...
[ [ "sklearn.model_selection.train_test_split" ], [ "numpy.savetxt", "numpy.random.uniform", "numpy.zeros", "numpy.concatenate" ] ]
yangheng95/PyABSA
[ "f5b46047a58fa8054a0469486be3f1cada933814" ]
[ "pyabsa/core/tc/prediction/text_classifier.py" ]
[ "# -*- coding: utf-8 -*-\n# file: text_classifier.py\n# author: yangheng <yangheng@m.scnu.edu.cn>\n# Copyright (C) 2020. All Rights Reserved.\nimport json\nimport os\nimport pickle\nimport random\n\nimport numpy\nimport torch\nfrom findfile import find_file\nfrom termcolor import colored\nfrom torch.utils.data impo...
[ [ "torch.softmax", "torch.cuda.manual_seed", "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.utils.data.DataLoader", "torch.tensor", "torch.no_grad" ] ]
fqnchina/NeuralRouting
[ "333dc95cb2d9a779de88e2349883a0002111d1b3" ]
[ "dataset_loader.py" ]
[ "import numpy as np\r\nimport torch\r\nfrom torch.utils.data import Dataset, DataLoader\r\nfrom torchvision import transforms as tfs\r\nfrom PIL import Image\r\nimport os, cv2, copy, time\r\nfrom config import *\r\n\r\n\r\n# args.\r\nimage_height, image_width = opt.image_height, opt.image_width\r\nintrinsics = opt....
[ [ "torch.zeros", "numpy.concatenate", "numpy.max", "numpy.mean", "numpy.random.randint", "numpy.arange", "numpy.linalg.eig", "numpy.stack", "numpy.save", "numpy.load", "numpy.zeros", "numpy.min", "numpy.isnan", "numpy.random.rand", "numpy.logical_and", ...
ischrot/scipy_rmt_bsc
[ "1dd8f7f0ee7ac1311ed1735ca6b6025150524418" ]
[ "scipy/optimize/tests/test_linesearch.py" ]
[ "\"\"\"\nTests for line search routines\n\"\"\"\nfrom numpy.testing import (assert_, assert_equal, assert_array_almost_equal,\n assert_array_almost_equal_nulp, assert_warns,\n suppress_warnings)\nimport scipy.optimize.linesearch as ls\nimport scipy.optimize.nonlin...
[ [ "numpy.dot", "scipy.optimize.nonlin.asjacobian", "scipy.optimize.linesearch.line_search_armijo", "numpy.random.randn", "numpy.exp", "numpy.testing.assert_equal", "scipy.optimize.nonlin._array_like", "scipy.optimize.linesearch.scalar_search_wolfe2", "numpy.testing.suppress_warni...
lxchen2019/Python-Baseball
[ "0498830e92c67de8221aac1777651ae141df0ec6" ]
[ "stats/attendance.py" ]
[ "import pandas as pd\nimport matplotlib.pyplot as plt\n\nfrom data import games\n\nattendance = games.loc[(games['type'] == 'info') & (games['multi2'] == 'attendance'), ['year', 'multi3']]\nattendance.columns = ['year', 'attendance']\n\nattendance.loc[:, 'attendance'] = pd.to_numeric(attendance.loc[:, 'attendance']...
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "pandas.to_numeric", "matplotlib.pyplot.ylabel" ] ]
xinglu/Tensorflow-2.0-Computer-Vision-Cookbook
[ "92ea6713f664cff9eccaaccea8ac756f808e2066", "92ea6713f664cff9eccaaccea8ac756f808e2066" ]
[ "ch1/recipe4/load_save_model.py", "ch1/recipe2/load_image_keras.py" ]
[ "import numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import LabelBinarizer\nfrom tensorflow.keras.datasets import mnist\nfrom tensorflow.keras.layers import *\nfrom tensorflow.keras.models import *\n\n\ndef load_data():\n (X_train, y_train), (X_test, y_test) = mni...
[ [ "numpy.expand_dims", "sklearn.preprocessing.LabelBinarizer", "sklearn.model_selection.train_test_split", "tensorflow.keras.datasets.mnist.load_data" ], [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.subplot", "tensorflow.keras.utils.get_file", "matplotlib.pyplot.axis", "m...
hadi-gharibi/pupil
[ "9d266572cc1ebf659e87206be6e5f1548959d510" ]
[ "pupil/models/clustering.py" ]
[ "from abc import ABC, abstractmethod\nfrom typing import Dict, Protocol, Tuple\n\nimport faiss\nimport numpy as np\nfrom pupil.types import NDArray2D\nfrom sklearn.cluster import AgglomerativeClustering\n\n\nclass Clustering(Protocol):\n n_clusters: int\n\n def fit(self, X: NDArray2D):\n ...\n\n def...
[ [ "sklearn.cluster.AgglomerativeClustering", "numpy.diff", "numpy.linalg.norm" ] ]
h1-the-swan/paper_collection
[ "f07ad5cd8c40ddd75df2031b15c49eee60f1d914" ]
[ "tests/test_paper_collection.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"Tests for `paper_collection` package.\"\"\"\n\n\nimport unittest\n\nfrom paper_collection import paper_collection\n\nimport pandas as pd\nimport numpy as np\n\n\nclass TestPaper_collection(unittest.TestCase):\n \"\"\"Tests for `paper_collection` package.\"\"\"\n\n def setUp(sel...
[ [ "pandas.read_csv" ] ]
mindspore-ai/mindspore
[ "a9fbb25530a2874166ff0045ddcdfc73207bf5eb", "a9fbb25530a2874166ff0045ddcdfc73207bf5eb", "a9fbb25530a2874166ff0045ddcdfc73207bf5eb", "a9fbb25530a2874166ff0045ddcdfc73207bf5eb" ]
[ "mindspore/nn/optim/thor.py", "mindspore/dataset/engine/datasets.py", "tests/st/pynative/test_tensor_getitem.py", "tests/st/ops/graph_kernel/custom/test_custom_akg.py" ]
[ "# Copyright 2021 Huawei Technologies Co., Ltd\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 l...
[ [ "numpy.eye", "numpy.identity", "numpy.zeros" ], [ "numpy.fromfile", "scipy.io.loadmat", "numpy.frombuffer", "numpy.equal", "numpy.array" ], [ "numpy.arange", "numpy.ndarray", "numpy.ones", "numpy.array", "numpy.zeros", "numpy.random.randint" ], [...
XiaoqiMa/shapSD
[ "545f61c9e8329c7271051f22f99ba32508ba74a1" ]
[ "shapSD/pysubgroup/nominal_target.py" ]
[ "'''\nCreated on 29.09.2017\n\n@author: lemmerfn\n'''\nimport numpy as np\nimport scipy.stats\nfrom functools import total_ordering\n\nfrom .measures import AbstractInterestingnessMeasure, BoundedInterestingnessMeasure\nfrom .utils import effective_sample_size, powerset\nfrom .subgroup import SubgroupDescription, S...
[ [ "numpy.dot", "numpy.logical_and", "numpy.sum" ] ]
designer357/MSLSTM
[ "923f29f5a274ae41dbfe79d99e1ea28bb0cf5109" ]
[ "train.py" ]
[ "# -*- coding:utf-8 -*-\n\"\"\"\nmincheng:mc.cheng@my.cityu.edu.hk\n\"\"\"\nfrom __future__ import division\nimport sys\nimport printlog\nimport datetime\nimport os\nimport time\nimport sklearn\nfrom sklearn.metrics import confusion_matrix\nfrom baselines import sclearn\nimport evaluation\nfrom collections import d...
[ [ "tensorflow.Graph", "numpy.arange", "tensorflow.cast", "tensorflow.argmax", "tensorflow.placeholder", "numpy.random.shuffle", "sklearn.metrics.confusion_matrix", "tensorflow.ConfigProto", "tensorflow.global_variables_initializer", "numpy.mean", "tensorflow.Session", ...
erinfolami/ZazuML
[ "c5247859353cacf0e4a58f9c530a07038d9e12cf" ]
[ "ObjectDetNet/retinanet/dataloaders/custom_transforms.py" ]
[ "import math\nimport torch\nimport random\nimport numpy as np\nimport torch.nn as nn\nfrom numpy import int64 as int64\nimport torchvision.transforms as transforms\n\nfrom PIL import Image, ImageOps, ImageFilter\n\n\nclass Normalize(object):\n \"\"\"Normalize a tensor image with mean and standard deviation.\n ...
[ [ "numpy.array", "torch.from_numpy" ] ]
DwaraknathT/sparsify
[ "bbe3b6e492c2bc8fdd9dd37d87ffc5f51f520792" ]
[ "models/resnet.py" ]
[ "'''\nProperly implemented ResNet-s for CIFAR10 as described in paper [1].\n\nThe implementation and structure of this file is hugely influenced by [2]\nwhich is implemented for ImageNet and doesn't have option A for identity.\nMoreover, most of the implementations on the web is copy-paste from\ntorchvision's resne...
[ [ "torch.nn.Sequential", "torch.nn.init.xavier_normal_", "torch.nn.Linear", "torch.nn.functional.relu", "torch.nn.BatchNorm2d" ] ]
sweetpand/tensorflow_mri
[ "7a483cbbbe515ad395928311759505707bd72503", "7a483cbbbe515ad395928311759505707bd72503" ]
[ "recommendation_system_demos/Basic-CMN-Demo/util/gmf.py", "recommendation_system_demos/Basic-DIEN-Demo/source_code/utils.py" ]
[ "import sonnet as snt\nimport tensorflow as tf\n\nfrom util.helper import GraphKeys, add_to_collection\nfrom util.layers import DenseLayer, LossLayer, OptimizerLayer, ModelBase\n\n\nclass PairwiseGMF(ModelBase):\n\n def __init__(self, config):\n \"\"\"\n :param config:\n \"\"\"\n # su...
[ [ "tensorflow.get_collection", "tensorflow.placeholder", "tensorflow.truncated_normal_initializer", "tensorflow.summary.merge_all", "tensorflow.contrib.layers.xavier_initializer", "tensorflow.contrib.layers.l2_regularizer", "tensorflow.add_to_collection" ], [ "tensorflow.concat",...
chaoannricardo/NTU_CARDO_Database
[ "5fbfa1383f2e65a04fabd863c68373f45bbf05fd" ]
[ "DBUIScripts/db_update.py" ]
[ "# -*- coding: utf8 -*-\nimport pandas as pd\nimport pymysql\n\n# import configuration in parent dir\nimport os, sys, inspect\n\ncurrent_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))\nparent_dir = os.path.dirname(current_dir)\nsys.path.insert(0, parent_dir)\nimport configuration as...
[ [ "pandas.read_sql" ] ]
hellwue/TreeSpeciesClassification
[ "8fd8dc6496d8317923c6112d3da46844d419e49f" ]
[ "PointCNN/pointcnn_geom+i+ms.py" ]
[ "import pickle\nfrom myutils import load_dataset, call_home, CMDisplay\nfrom itertools import chain\n\nimport torch\nimport torch.nn.functional as F\nfrom torch.nn import Linear as Lin\nfrom torch.optim import Adam\n\nfrom torch_geometric.nn import XConv, fps, global_mean_pool\n\nimport pytorch_lightning as pl\nfro...
[ [ "torch.nn.functional.log_softmax", "torch.nn.functional.dropout", "torch.cat", "torch.nn.functional.nll_loss", "sklearn.metrics.confusion_matrix", "matplotlib.pyplot.savefig", "torch.nn.Linear", "sklearn.metrics.classification_report" ] ]