repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
siddharthdangwal/qiskit-terra | [
"af34eb06f28de18ef276e1e9029c62a4e35dd6a9",
"af34eb06f28de18ef276e1e9029c62a4e35dd6a9"
] | [
"qiskit/visualization/pulse/matplotlib.py",
"qiskit/circuit/library/standard_gates/swap.py"
] | [
"# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2019.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\... | [
[
"numpy.unravel_index",
"numpy.imag",
"numpy.abs",
"numpy.linspace",
"numpy.arange",
"numpy.nanmin",
"numpy.ones",
"numpy.real",
"matplotlib.pyplot.subplot",
"numpy.zeros_like",
"matplotlib.gridspec.GridSpec",
"numpy.floor",
"numpy.exp",
"numpy.zeros",
"m... |
perimosocordiae/numpylint | [
"67e6c077b393760bffe59524ede1d4904476a1ce"
] | [
"numpylint/lintbits.py"
] | [
"import numpy as np\n\n# Dict of all the patterns with their replacements.\n# Structure:\n# name of replacement -> list of (pattern, replacement, kwargs) tuples\n\nLINTBITS = {\n 'diagonal matrix dot product': [\n # diag(x).dot(y)\n ('${diag}(${x}).dot(${y})', '((${x}) * (${y}).T).T',\n d... | [
[
"numpy.lib.NumpyVersion"
]
] |
vecent-don/bert4keras | [
"3c31cbbf87d6574ddad038e4ea17a941ddd027dc",
"3c31cbbf87d6574ddad038e4ea17a941ddd027dc"
] | [
"bert4keras/snippets.py",
"bert4keras/models.py"
] | [
"#! -*- coding: utf-8 -*-\n# 代码合集\n\nimport os, sys, six, re, json\nimport logging\nimport numpy as np\nfrom collections import defaultdict\nfrom bert4keras.backend import K, keras, tf\n\n_open_ = open\nis_py2 = six.PY2\n\nif not is_py2:\n basestring = str\n\n\ndef to_array(*args):\n \"\"\"批量转numpy的array\n ... | [
[
"numpy.take_along_axis",
"numpy.log",
"numpy.pad",
"numpy.power",
"numpy.arange",
"numpy.repeat",
"numpy.cumsum",
"numpy.concatenate",
"numpy.argmax",
"numpy.shape",
"numpy.apply_along_axis",
"numpy.array",
"numpy.exp",
"numpy.zeros",
"numpy.roll",
"... |
lucainnocenti/ultrafast-critical-ground-state-preparation-2007.07381 | [
"29f80dcf914096555cee9bc2e18249a2c95d6a50",
"29f80dcf914096555cee9bc2e18249a2c95d6a50",
"29f80dcf914096555cee9bc2e18249a2c95d6a50",
"29f80dcf914096555cee9bc2e18249a2c95d6a50"
] | [
"results/rabi_and_lmg_optimizations_20190227/script_rabi_bangramp_neldermead.py",
"results/rabi_and_lmg_optimizations_crossingcriticalphase_20190305/insufficient_tf_optimizations/script_lmg_doublebang_powell_50spins_bound04.py",
"src/hamiltonians.py",
"results/lmg_optimizations_4spins_criticalpoint_fixed_2019... | [
"import os\nimport sys\nimport numpy as np\nimport pandas as pd\n\nimport logging\n\nif '../../' not in sys.path:\n sys.path.append('../../')\nimport src.optimization as optimization\n\n\nmodel = 'rabi'\nmodel_parameters = dict(N=100, Omega=100, omega_0=1.)\nprotocol = 'bangramp'\noptimization_method = 'Nelder-M... | [
[
"numpy.linspace"
],
[
"numpy.linspace"
],
[
"numpy.linspace"
],
[
"numpy.linspace"
]
] |
wainshine/tensorflow | [
"dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d",
"dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d",
"dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d",
"dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d",
"dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d",
"dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6d",
"dc7a8dc8546c679b9c7b3df7494ce4506bfc1a6... | [
"tensorflow/python/tpu/device_assignment.py",
"tensorflow/python/tpu/tpu_embedding_v2_utils.py",
"tensorflow/python/distribute/collective_util.py",
"tensorflow/python/data/experimental/kernel_tests/optimization/optimization_test.py",
"tensorflow/lite/testing/op_tests/pool3d.py",
"tensorflow/python/data/ke... | [
"# 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.python.platform.tf_logging.warning",
"numpy.meshgrid",
"numpy.asarray",
"numpy.arange",
"tensorflow.python.tpu.topology.Topology",
"tensorflow.python.util.tf_export.tf_export",
"numpy.full",
"numpy.concatenate",
"numpy.prod",
"numpy.array"
],
[
"tensorfl... |
OverFitted/ai-academy-2022 | [
"e58a68a13d81f203027cc367f5f335c2b22f0962"
] | [
"modules/feature_extraction.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\ndevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n\n\nclass VGG_FeatureExtractor(nn.Module):\n def __init__(self, input_channel, output_channel=512):\n super(VGG_FeatureExtractor, self).__init__()\n self.out... | [
[
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.functional.sigmoid",
"torch.nn.MaxPool2d",
"torch.nn.functional.relu",
"torch.cuda.is_available",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
StatMixedML/GPBoost | [
"786d8be61c5c28da0690e167af636a6d777bf9e1"
] | [
"examples/python-guide/Gaussian_process_mixed_effects_models_example.py"
] | [
"# coding: utf-8\n# pylint: disable = invalid-name, C0111\nimport gpboost as gpb\nimport numpy as np\n# import pandas as pd\nimport matplotlib.pyplot as plt\nplt.style.use('ggplot')\n\n# --------------------Grouped random effects model: single-level random effect----------------\n# Simulate data\nn = 100 # number ... | [
[
"numpy.diag",
"numpy.sqrt",
"numpy.exp",
"numpy.where",
"numpy.arange",
"numpy.column_stack",
"numpy.zeros",
"matplotlib.pyplot.style.use",
"matplotlib.pyplot.title",
"matplotlib.pyplot.xlabel",
"numpy.linalg.cholesky",
"numpy.array",
"matplotlib.pyplot.show",
... |
TangJiahui/cs107_system_devlopment | [
"c46d7769683d9be0c31973e3b0666e3fe2a4099b"
] | [
"homework/HW4/HW4-final/P1.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\n# Part A: Numerical Differentiation Closure\ndef numerical_diff(f,h):\n def inner(x):\n return (f(x+h) - f(x))/h\n return inner\n\n# Part B:\nf = np.log\nx = np.linspace(0.2, 0.4, 500)\nh = [1e-1, 1e-7, 1e-15]\ny_analytical = 1/x\nresult = {}\n\n\... | [
[
"matplotlib.pyplot.legend",
"numpy.linspace",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
UnacceptableBehaviour/pytorch_tut_00 | [
"ca74b9bde8485f651bda9314b8f4a7ed277db787"
] | [
"scripts/07_tensor_linear_regresssion.py"
] | [
"#! /usr/bin/env python\n\n# PyTorch Tutorial 07 - Linear Regression\n# https://www.youtube.com/watch?v=YAJ5XBwlN4o&list=PLqnslRFeH2UrcDBWF5mfPGpqQDSta6VK4&index=7\n\n#from __future__ import print_function\nimport torch\nprint(\"\\n\" * 20)\nprint(\"-\" * 80)\nprint(\"-\" * 80)\nprint(\"\\n\" * 2)\n\n#### Steps in ... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.plot",
"torch.nn.Linear",
"sklearn.datasets.make_regression",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"torch.nn.MSELoss",
"matplotlib.pyplot.ylabel"
]
] |
sergioalberto/rpi-deep-learning | [
"94024c2b2c225dc607954874bdcd345b805b1561"
] | [
"examples/image_classification/classify.py"
] | [
"# 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... | [
[
"numpy.argsort",
"numpy.array",
"numpy.expand_dims",
"tensorflow.lite.python.interpreter.Interpreter"
]
] |
mrhuytran/bnb-api-wrapper | [
"569e6eddc9c44f50a918b046cdb248bee60ac0e1"
] | [
"binance.py"
] | [
"import requests\nimport json\nfrom datetime import datetime\nimport time\nimport pandas as pd\nfrom pandas import DataFrame as df\nimport hmac\nimport hashlib\nfrom interval_enum import Interval\nfrom order_enum import Order\n\nclass BinanceClient:\n\n def __init__(self, api_key, api_secret):\n self.key ... | [
[
"pandas.DataFrame"
]
] |
Kushalshingote/Hands-On-Generative-Adversarial-Networks-with-Keras | [
"fccada4810ba1fe8b79c5a74420a590c95623b52",
"fccada4810ba1fe8b79c5a74420a590c95623b52"
] | [
"Chapter05/utils.py",
"Chapter06/utils.py"
] | [
"import matplotlib\nmatplotlib.use(\"Agg\")\nimport matplotlib.pylab as plt\nfrom math import ceil\nimport numpy as np\nimport argparse\nfrom functools import partial\nimport os\nfrom keras.models import Model, Sequential\nfrom keras.layers import Input, Dense, Reshape, Flatten\nfrom keras.layers.merge import _Merg... | [
[
"matplotlib.pylab.tight_layout",
"numpy.sqrt",
"matplotlib.use",
"matplotlib.pylab.imsave",
"matplotlib.pylab.figure",
"matplotlib.pylab.subplots",
"matplotlib.pylab.savefig",
"numpy.array",
"matplotlib.pylab.close"
],
[
"numpy.dstack",
"numpy.random.shuffle",
"... |
aPere3/MVAProject-RecVis16 | [
"83b581c37cb486ec855e4a40652860df4e56b363"
] | [
"data/mnist.py"
] | [
"#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nThis module contains a method to load mnist data. Based on David Larson work at:\nhttp://g.sweyla.com/blog/2012/mnist-numpy/a\n\"\"\"\n\nimport numpy\nimport os, struct\nfrom array import array as pyarray\n\n\ndef load_mnist(dataset=\"training\", digits=numpy.... | [
[
"numpy.arange",
"numpy.array",
"numpy.zeros"
]
] |
jnothman/sphinx-gallery | [
"b930662613a32fe05f16b39f86fafdb4c8d6f424"
] | [
"tutorials/plot_notebook.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n========================\nNotebook styled examples\n========================\n\nThe gallery is capable of transforming python files into reStructuredText files\nwith a notebook structure. For this to be used you need to respect some syntax\nrules.\n\nIt makes a lot of sense to cont... | [
[
"matplotlib.pyplot.imshow",
"numpy.linspace",
"matplotlib.pyplot.cm.get_cmap",
"numpy.cos",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"numpy.meshgrid",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
gatapia/py_ml_utils | [
"844d8b62a7c5cc0a80f4f62c0bfda092aac57ade"
] | [
"pml/engineer_tests.py"
] | [
"from __future__ import print_function, absolute_import\r\n\r\nimport unittest, math\r\nimport pandas as pd\r\nimport numpy as np\r\nfrom . import *\r\n\r\nclass T(base_pandas_extensions_tester.BasePandasExtensionsTester):\r\n def test_concat(self):\r\n df = pd.DataFrame({'c_1':['a', 'b', 'c'], 'c_2': ['d', 'e'... | [
[
"numpy.testing.assert_array_equal",
"numpy.array",
"pandas.DataFrame",
"numpy.testing.assert_allclose"
]
] |
bonesbb/HASPR | [
"856af4a480f4ff135591bbbcc1267898d88cbf0d"
] | [
"Analysis Scripts/co2_offset.py"
] | [
"# HASPR - High-Altitude Solar Power Research\r\n# Script to calculate CO2-equivalent offset given generation profiles\r\n# Version 0.1\r\n# Author: neyring\r\n\r\nfrom os import walk\r\nimport haspr\r\nfrom haspr import Result\r\nfrom haspr import Dataset\r\nimport numpy as np\r\nfrom numpy import genfromtxt\r\n\r... | [
[
"numpy.array",
"numpy.multiply",
"numpy.genfromtxt"
]
] |
jedbrown/PetIBM | [
"8584d824e0ffbbe2ea413dcf081e79a72b39bf5f",
"8584d824e0ffbbe2ea413dcf081e79a72b39bf5f"
] | [
"examples/decoupledibpm/flatplate3dRe100_GPU/scripts/plotForceCoefficients.py",
"examples/decoupledibpm/flatplate3dRe100_GPU/AoA90/scripts/createBody.py"
] | [
"\"\"\"\nPlots the steady-state force coefficients of an inclined flat-plate with\naspect-ratio 2 at Reynolds number 100 for angles of attack between 0 and 90\ndegrees.\nCompares with experimental results reported in Taira et al. (2007).\n_References:_\n* Taira, K., Dickson, W. B., Colonius,\n T., Dickinson, M. H.... | [
[
"numpy.logical_and",
"numpy.arange",
"matplotlib.pyplot.subplots",
"numpy.zeros_like",
"matplotlib.pyplot.show",
"matplotlib.pyplot.style.use",
"numpy.loadtxt"
],
[
"numpy.radians",
"numpy.linspace",
"numpy.ones"
]
] |
deciding/tf-kaldi-speaker | [
"ceaed721e502a71434d910fd73b202940ea2ce60"
] | [
"egs/voxceleb/v1/nnet/lib/extract.py"
] | [
"import argparse\nimport numpy as np\nimport os\nimport sys\nimport numpy, scipy, sklearn\nfrom model.trainer import Trainer\nfrom misc.utils import Params\nfrom dataset.kaldi_io import FeatureReader, open_or_fd, read_mat_ark, write_vec_flt\nfrom six.moves import range\n\nparser = argparse.ArgumentParser()\nparser.... | [
[
"numpy.square",
"numpy.expand_dims",
"tensorflow.reset_default_graph",
"tensorflow.logging.info",
"tensorflow.logging.set_verbosity",
"numpy.array",
"numpy.sum"
]
] |
uio-bmi/graph_peak_caller | [
"89deeabf3cd0b23fba49b1304f1c81222fb534d7",
"89deeabf3cd0b23fba49b1304f1c81222fb534d7"
] | [
"graph_peak_caller/analysis/diploratio_v_motifrate.py",
"tests/test_sparseholescleaning.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\n\ndef plot(base_name):\n def get_hist(s):\n return s[\"summary\"][0]*s[\"diplo_hist\"]\n motif = np.load(base_name + \"/limited_summits_alignments_motif_summary.npz\")\n nonmotif = np.load(base_name + \"/limited_summits_alignments_nonmotif_summ... | [
[
"matplotlib.pyplot.legend",
"numpy.linspace",
"numpy.cumsum",
"matplotlib.pyplot.xlabel",
"numpy.load",
"matplotlib.pyplot.show",
"numpy.where",
"matplotlib.pyplot.ylabel"
],
[
"numpy.array"
]
] |
UBCDingXin/cGAN-KD | [
"c32a4b014fe024222101ff11d63de518448f7f8d",
"c32a4b014fe024222101ff11d63de518448f7f8d",
"c32a4b014fe024222101ff11d63de518448f7f8d",
"c32a4b014fe024222101ff11d63de518448f7f8d",
"c32a4b014fe024222101ff11d63de518448f7f8d"
] | [
"Tiny-ImageNet/SSKD/cifar.py",
"Tiny-ImageNet/cGAN-based_KD/models/shufflenetv2.py",
"CIFAR/CIFAR_10K/Distiller/models/cifar10/shufflenetv2.py",
"CIFAR/CIFAR_10K/cGAN-based_KD/models/densenet.py",
"Tiny-ImageNet/cGAN-based_KD/models/efficientnet.py"
] | [
"from __future__ import print_function\nfrom PIL import Image\nimport os\nimport os.path\nimport numpy as np\nimport sys\n\nimport pickle\nimport torch\nimport torch.utils.data as data\n\nfrom itertools import permutations\n\nclass VisionDataset(data.Dataset):\n _repr_indent = 4\n\n def __init__(self, root, t... | [
[
"torch.stack",
"numpy.rot90",
"numpy.random.rand",
"numpy.vstack"
],
[
"torch.nn.Sequential",
"torch.cat",
"torch.randn",
"torch.nn.functional.avg_pool2d",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.BatchNorm2d",
"torch.nn.functional.max_pool2d"
],
[
... |
egaebel/diffwave | [
"c5d7d8d90b662f208ecdfba616782559146dc116"
] | [
"src/diffwave/inference.py"
] | [
"# Copyright 2020 LMNT, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | [
[
"torch.randn_like",
"torch.load",
"torch.randn",
"torch.from_numpy",
"torch.tensor",
"numpy.cumprod",
"torch.no_grad",
"torch.device",
"numpy.load",
"torch.clamp",
"numpy.array"
]
] |
wietsedv/transformers | [
"5e289f69bc564c94132f77c89a34e5f1dd69a592"
] | [
"transformers/modeling_tf_transfo_xl_utilities.py"
] | [
"# coding=utf-8\n# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance w... | [
[
"tensorflow.boolean_mask",
"tensorflow.concat",
"tensorflow.nn.log_softmax",
"tensorflow.gather_nd",
"tensorflow.range",
"tensorflow.zeros",
"tensorflow.stack",
"tensorflow.reduce_mean",
"tensorflow.zeros_initializer",
"tensorflow.einsum",
"tensorflow.nn.sparse_softmax_... |
wentaozhu/deep-mil-for-whole-mammogram-classification | [
"8c046bbd77d268499849319cf57254015778549c",
"8c046bbd77d268499849319cf57254015778549c"
] | [
"inbreast.py",
"roc_auc.py"
] | [
"#import dicom # some machines not install pydicom\r\nimport scipy.misc\r\nimport numpy as np \r\nfrom sklearn.model_selection import StratifiedKFold\r\nimport cPickle\r\n#import matplotlib\r\n#import matplotlib.pyplot as plt \r\nfrom skimage.filters import threshold_otsu\r\nimport os\r\nfrom os.path import join as... | [
[
"numpy.concatenate",
"numpy.random.permutation",
"sklearn.model_selection.StratifiedKFold"
],
[
"sklearn.metrics.roc_auc_score",
"numpy.log",
"numpy.ones_like",
"numpy.argmax",
"numpy.mean",
"numpy.argsort",
"numpy.sum"
]
] |
mv1388/AIToolbox | [
"1060435e6cbdfd19abcb726c4080b663536b7467",
"1060435e6cbdfd19abcb726c4080b663536b7467",
"1060435e6cbdfd19abcb726c4080b663536b7467"
] | [
"tests_gpu/test_multi_gpu/test_core_pytorch_compare/test_ddp/test_mnist_cnn.py",
"aitoolbox/experiment/local_load/local_model_load.py",
"aitoolbox/nlp/experiment_evaluation/NLP_metrics.py"
] | [
"import unittest\n\nimport os\nimport shutil\nimport random\nimport pickle\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nfrom torchvision import datasets, transforms\nfrom torch.utils.data import DataLoader\n\nimport torch.multiprocessing as ... | [
[
"torch.nn.Dropout2d",
"torch.utils.data.DataLoader",
"numpy.mean",
"torch.no_grad",
"torch.cuda.manual_seed_all",
"torch.flatten",
"torch.device",
"torch.nn.functional.relu",
"torch.nn.functional.max_pool2d",
"torch.nn.NLLLoss",
"torch.nn.Conv2d",
"torch.nn.Linear",... |
sankalpdayal5/numpy | [
"9713e86cc65ebed96464f4d81bb2637857b84f44"
] | [
"benchmarks/benchmarks/bench_function_base.py"
] | [
"from __future__ import absolute_import, division, print_function\n\nfrom .common import Benchmark\n\nimport numpy as np\n\n\nclass Histogram1D(Benchmark):\n def setup(self):\n self.d = np.linspace(0, 100, 100000)\n\n def time_full_coverage(self):\n np.histogram(self.d, 200, (0, 100))\n\n def... | [
[
"numpy.linspace",
"numpy.random.seed",
"numpy.arange",
"numpy.median",
"numpy.histogramdd",
"numpy.percentile",
"numpy.random.shuffle",
"numpy.ones",
"numpy.sort",
"numpy.bincount",
"numpy.select",
"numpy.argsort",
"numpy.array",
"numpy.histogram",
"nump... |
mohamedelbeih/Hairloss-Areas-Semantic-Segmentation | [
"49d8a07d600c538e3b706a531af4029823b70236"
] | [
"mrcnn/utils.py"
] | [
"\"\"\"\r\nMask R-CNN\r\nCommon utility functions and classes.\r\nCopyright (c) 2017 Matterport, Inc.\r\nLicensed under the MIT License (see LICENSE for details)\r\nWritten by Waleed Abdulla\r\n\"\"\"\r\n\r\nimport sys\r\nimport os\r\nimport logging\r\nimport math\r\nimport random\r\nimport numpy as np\r\nimport te... | [
[
"numpy.dot",
"numpy.minimum",
"numpy.sqrt",
"tensorflow.stack",
"numpy.around",
"tensorflow.cast",
"numpy.cumsum",
"numpy.concatenate",
"numpy.max",
"numpy.all",
"numpy.any",
"numpy.exp",
"numpy.where",
"numpy.divide",
"numpy.pad",
"numpy.reshape",
... |
tobiasaditya/datascience_beginner | [
"fa6868073951259e0a5f8a702de0bcc17c13d295"
] | [
"mlearning2.py"
] | [
"import seaborn as sb\nimport matplotlib.pyplot as plt\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn import metrics\n\nperson = {'finances':[1,2,3,4,5,6,7,8,7,6,5,4,3,2,1,7,4,1,8,5,2,9,6,3,9,8,7,6,5,4,3,2,1,1,9,7,3,8,2,7... | [
[
"pandas.crosstab",
"sklearn.linear_model.LogisticRegression",
"sklearn.model_selection.train_test_split",
"pandas.DataFrame",
"matplotlib.pyplot.show",
"sklearn.metrics.accuracy_score"
]
] |
dapatil211/deep_architect | [
"feadfb545d166216e27532ea47e8efa178e0d142",
"feadfb545d166216e27532ea47e8efa178e0d142",
"feadfb545d166216e27532ea47e8efa178e0d142"
] | [
"dev/enas/search_space/enas_search_space.py",
"deep_architect/helpers/tensorflow_eager_support.py",
"dev/examples/full_benchmarks/arch_search.py"
] | [
"\"\"\"\nSearch space from Efficient Neural Architecture Search (Pham'17)\n\"\"\"\nfrom __future__ import print_function\nfrom builtins import str\nfrom builtins import range\nfrom builtins import object\nfrom collections import OrderedDict\n\nimport tensorflow as tf\nimport numpy as np\n\nfrom deep_architect.helpe... | [
[
"numpy.load",
"tensorflow.device",
"tensorflow.add_n",
"numpy.save"
],
[
"tensorflow.trainable_variables"
],
[
"tensorflow.enable_eager_execution",
"tensorflow.logging.set_verbosity"
]
] |
elainevoice/backend | [
"9b5fef59001fd6c2040affc80cd5cb9690c73795"
] | [
"api/models/taco_models/fatchord_version.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom api.models.utils.distribution import sample_from_discretized_mix_logistic\nfrom api.models.utils.display import *\nfrom api.models.utils.dsp import *\nimport os\nimport numpy as np\nfrom pathlib import Path\nfrom typing import Union\n\n\ncl... | [
[
"torch.nn.functional.softmax",
"numpy.sqrt",
"numpy.linspace",
"torch.zeros",
"torch.cat",
"torch.load",
"torch.nn.GRU",
"numpy.concatenate",
"torch.no_grad",
"numpy.cumproduct",
"torch.nn.functional.relu",
"torch.nn.GRUCell",
"numpy.zeros",
"torch.nn.BatchN... |
Kthyeon/FINE | [
"ae8a24a4a2514feafd9a9ed394af87f397708ccf",
"ae8a24a4a2514feafd9a9ed394af87f397708ccf"
] | [
"dynamic_selection/trainer/archive/svd_classifier.py",
"dynamic_selection/loss/gce.py"
] | [
"import torch\nimport numpy as np\nfrom tqdm import tqdm\nfrom sklearn import cluster\n\n#bol_norm True -> Divide by norm of feature\ndef same_score(v_ortho_dict, features, labels, bol_norm=False):\n features = torch.from_numpy(features).cuda()\n scores = torch.zeros(features.shape[0])\n \n for indx, fe... | [
[
"torch.mean",
"numpy.linalg.svd",
"torch.norm",
"torch.nn.CrossEntropyLoss",
"sklearn.cluster.KMeans",
"numpy.unique",
"torch.zeros",
"torch.load",
"torch.eq",
"torch.from_numpy",
"torch.tensor",
"numpy.mean",
"torch.sort",
"torch.dot",
"numpy.sum",
... |
maria-kuruvilla/temp_collective_new | [
"c45b72cee7c17072507eb67790d1699f5684098a",
"c45b72cee7c17072507eb67790d1699f5684098a",
"c45b72cee7c17072507eb67790d1699f5684098a",
"c45b72cee7c17072507eb67790d1699f5684098a",
"c45b72cee7c17072507eb67790d1699f5684098a",
"c45b72cee7c17072507eb67790d1699f5684098a",
"c45b72cee7c17072507eb67790d1699f5684098... | [
"stats_csv_latency.py",
"dtc_csv.py",
"speed_before_loom.py",
"individual_based_speed.py",
"prop_ind_startles.py",
"percentile_speed.py",
"predictions_figures.py"
] | [
"\"\"\"\nGoal - to produce a csv file with temp, gs rep, loom and latency\n\"\"\" \n\nimport os\nimport pathlib\nfrom pprint import pprint\n\nimport numpy as np\nfrom scipy import stats\nfrom scipy.spatial import distance\nimport matplotlib.pyplot as plt\nfrom matplotlib.pyplot import figure\n\nimport trajectorytoo... | [
[
"numpy.isnan",
"numpy.linalg.norm",
"numpy.nanmean",
"numpy.zeros",
"numpy.empty"
],
[
"pandas.read_csv",
"numpy.nanmean"
],
[
"pandas.read_csv",
"numpy.nanmin",
"numpy.linalg.norm",
"numpy.nanmean",
"scipy.spatial.ConvexHull",
"numpy.empty"
],
[
... |
pyinduct/pyinduct | [
"f743ecfcee3b940505ec95b48fa07bb1648cfcc1"
] | [
"pyinduct/parabolic/general.py"
] | [
"from collections.abc import Callable\nimport warnings\n\nimport numpy as np\nfrom scipy.optimize import fsolve\n\nfrom ..core import Function, find_roots, ConstantFunction\nfrom ..eigenfunctions import SecondOrderOperator\nfrom ..placeholder import (ScalarFunction, TestFunction, FieldVariable, ScalarTerm,\n ... | [
[
"scipy.optimize.fsolve",
"numpy.cosh",
"numpy.abs",
"numpy.power",
"numpy.arange",
"numpy.cos",
"numpy.sinh",
"numpy.sin",
"numpy.round",
"numpy.log10",
"numpy.array",
"numpy.zeros"
]
] |
HudsonHuang/tacotron2 | [
"fa55a0b633abe358e1258e1dc3b40d85e17b3450"
] | [
"tacotron2/model.py"
] | [
"# *****************************************************************************\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# * Redis... | [
[
"torch.nn.BatchNorm1d",
"torch.nn.functional.softmax",
"torch.sigmoid",
"torch.max",
"torch.cat",
"torch.nn.functional.dropout",
"torch.nn.ModuleList",
"torch.sum",
"torch.nn.utils.rnn.pack_padded_sequence",
"torch.nn.Embedding",
"torch.nn.LSTMCell",
"torch.tanh",
... |
peter3125/WaveRNN | [
"ef34b9d91dfbff3197c8cc20d3ed272b222a5ec2"
] | [
"models/tacotron.py"
] | [
"import os\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass HighwayNetwork(nn.Module):\n def __init__(self, size):\n super().__init__()\n self.W1 = nn.Linear(size, size)\n self.W2 = nn.Linear(size, size)\n self.W1.bias.data.fill_(0.)... | [
[
"torch.nn.functional.softmax",
"torch.cat",
"torch.nn.functional.dropout",
"torch.zeros",
"torch.load",
"torch.nn.GRU",
"torch.nn.Embedding",
"torch.tanh",
"torch.tensor",
"torch.nn.LSTMCell",
"torch.nn.MaxPool1d",
"torch.nn.functional.relu",
"torch.nn.GRUCell",... |
skoppula/ternarynet | [
"1a67251f7f5a1cdf854f87f90f841655c7c9f11c",
"1a67251f7f5a1cdf854f87f90f841655c7c9f11c"
] | [
"tensorpack/RL/expreplay.py",
"tensorpack/utils/loadcaffe.py"
] | [
"#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n# File: expreplay.py\n# Author: Yuxin Wu <ppwwyyxxc@gmail.com>\n\nimport numpy as np\nfrom collections import deque, namedtuple\nimport threading\nfrom tqdm import tqdm\nimport six\nfrom six.moves import queue\n\nfrom ..dataflow import DataFlow\nfrom ..utils import ... | [
[
"numpy.clip",
"numpy.concatenate",
"numpy.max",
"numpy.argmax",
"numpy.mean",
"numpy.zeros_like",
"numpy.array"
],
[
"numpy.save"
]
] |
BlindBMan/Facial-Recognition | [
"1f0c65174de2223a81797fee7722227a712a37bc"
] | [
"Visualize.py"
] | [
"import cv2 as cv\nimport os\nimport numpy as np\nimport pdb\nimport ntpath\nimport glob\nfrom Parameters import *\n\n\ndef show_detections_without_ground_truth(detections, scores, file_names, params: Parameters):\n \"\"\"\n Afiseaza si salveaza imaginile adnotate.\n detections: numpy array de dimensiune N... | [
[
"numpy.uint8",
"numpy.where",
"numpy.loadtxt"
]
] |
VisualMine/PlaneNet | [
"88eb76d88bb678bd26b7f101f0bb273e4897e92d"
] | [
"pool/models/move_to_origin.py"
] | [
"import csv\nimport sys\nimport numpy as np\n\nwith open(sys.argv[1]) as modelFile:\n modelLoader = csv.reader(modelFile, delimiter=' ')\n xs = []\n ys = []\n zs = [] \n for lineIndex, line in enumerate(modelLoader):\n if len(line) == 0:\n continue\n if line[0] == 'v':... | [
[
"numpy.array"
]
] |
mfarrera/algorithm-reference-library | [
"7331812aa7cc3501a15d3392cecf6ea65b43f91e",
"7331812aa7cc3501a15d3392cecf6ea65b43f91e"
] | [
"tests/workflows/test_imaging_component_workflows.py",
"tests/libs/test_coordinate_support.py"
] | [
"\"\"\" Unit tests for pipelines expressed via dask.delayed\n\n\n\"\"\"\n\nimport logging\nimport sys\nimport unittest\n\nimport numpy\nfrom astropy import units as u\nfrom astropy.coordinates import SkyCoord\n\nfrom data_models.polarisation import PolarisationFrame\nfrom processing_components.image.operations impo... | [
[
"numpy.array",
"numpy.abs",
"numpy.linspace",
"numpy.power"
],
[
"numpy.radians",
"numpy.linalg.norm",
"numpy.transpose",
"numpy.array",
"numpy.sum",
"numpy.testing.assert_allclose"
]
] |
YujieLu10/tslam | [
"1341dbecdf02ee6b1b6cdd1a538272fffdea6ffd",
"1341dbecdf02ee6b1b6cdd1a538272fffdea6ffd"
] | [
"mjrl/algos/model_accel/sampling.py",
"mjrl/policies/gaussian_mlp_3d.py"
] | [
"import logging\nimport numpy as np\nfrom mjrl.utils.gym_env import GymEnv\nfrom mjrl.utils import tensor_utils\nlogging.disable(logging.CRITICAL)\nimport multiprocessing as mp\nfrom multiprocessing import set_start_method\ntry:\n set_start_method('spawn')\nexcept RuntimeError:\n pass\nimport time as timer\ni... | [
[
"numpy.swapaxes",
"numpy.random.seed",
"torch.manual_seed",
"torch.randn",
"numpy.tile",
"torch.from_numpy",
"torch.exp",
"numpy.random.normal",
"numpy.random.uniform",
"numpy.array",
"numpy.sum"
],
[
"torch.mean",
"numpy.log",
"torch.ones",
"numpy.r... |
emiliocuestaf/CycloRec | [
"cf0bf39ff185f0b1ef8d1c6fe1d424a23c7716f7"
] | [
"src/data_layers/ffeedbackcm100k_layer.py"
] | [
"import pandas as pd\nimport numpy as np\n#import random as rd\n#from sklearn.neighbors import NearestNeighbors\n#from scipy.sparse import csr_matrix\n\n# OWN\nfrom cyclorec.data_layers.data_layer import DataLayer\n\nclass FFeedbackCm100kLayer(DataLayer):\n \"\"\" The only difference between this layer and Cm100... | [
[
"numpy.isnan",
"pandas.read_csv"
]
] |
hellolele/PoseFromShape | [
"7daf9e4889af065861d2719cd2bca2de8a45d185"
] | [
"auxiliary/model.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.utils.data\nfrom torch.autograd import Variable\nimport resnet\n\n\n# ============================================================================ #\n# Baseline network #\n# =====... | [
[
"torch.nn.BatchNorm1d",
"torch.cat",
"torch.nn.Linear",
"torch.rand",
"torch.nn.ReLU"
]
] |
prestononeal/CS-7641-assignments | [
"c3a6815ba1be837084c60c3dd0dc8e8e702aa9b7"
] | [
"assignment1/learners/ANN.py"
] | [
"from sklearn import neural_network\n\nimport learners\n\n\nclass ANNLearner(learners.BaseLearner):\n def __init__(self,\n hidden_layer_sizes=(100,),\n activation=\"relu\",\n solver='adam',\n alpha=0.0001,\n batch_size='auto',\n ... | [
[
"sklearn.neural_network.MLPClassifier"
]
] |
MingzheWu418/plastering | [
"322531e934c3acf2ecc8f520b37a6d255b9959c2"
] | [
"plastering/evaluator.py"
] | [
"from copy import deepcopy\nfrom sklearn.metrics import f1_score\nfrom sklearn.preprocessing import LabelBinarizer, MultiLabelBinarizer\nfrom sklearn.preprocessing import LabelEncoder\nimport numpy as np\nimport pdb\n\ndef binarize_labels(true_labels, pred_labels):\n srcids = list(pred_labels.keys())\n tot_la... | [
[
"sklearn.preprocessing.MultiLabelBinarizer",
"numpy.bitwise_and",
"numpy.mean",
"sklearn.metrics.f1_score",
"sklearn.preprocessing.LabelEncoder"
]
] |
Ukasz09/Clothing-recognition | [
"9332b0d3eac59782c0e8a72078ba97d67805d512"
] | [
"app/utils/prediction_utils.py"
] | [
"import time\nimport datetime\nimport numpy as np\n\n__start_time = time.time()\n__end_time = time.time()\n\n\ndef calc_accuracy(predicted_labels, real_labels):\n correct_qty = 0\n for i in range(len(predicted_labels)):\n if predicted_labels[i] == real_labels[i]:\n correct_qty += 1\n retu... | [
[
"numpy.argmax"
]
] |
EquinoxOmega0/timedomain | [
"b9c6c2e6804d7dde56311d9402769be545d505d0"
] | [
"desitrip/py/desitrip/scripts/process.py"
] | [
"#!/usr/bin/env python\n\"\"\"Apply the DESITrIP CNN classifier to observed spectra,\nchosen by tile ID and date.\n\"\"\"\n\nfrom desispec.io import read_spectra, write_spectra\nfrom desispec.spectra import Spectra\nfrom desitarget.cmx.cmx_targetmask import cmx_mask\n\nfrom desitrip.preproc import rebin_flux, resca... | [
[
"tensorflow.keras.models.load_model",
"numpy.vstack"
]
] |
umd-huang-lab/reinforcement-learning-via-spectral-methods | [
"c7bd04d7eea6869807ed70af76960dcc542b0a82",
"c7bd04d7eea6869807ed70af76960dcc542b0a82"
] | [
"tensor_rl/agents/bandits/LinUCBAgentClass.py",
"tensor_rl/tasks/general/GeneralMDPClass.py"
] | [
"'''\nBasic LinUCB implementation.\n'''\n\n# Python imports.\nimport numpy as np\nfrom collections import defaultdict\n\n# Other imports.\nfrom tensor_rl.agents.AgentClass import Agent\n\nclass LinUCBAgent(Agent):\n '''\n From:\n Lihong Li, et al. \"A Contextual-Bandit Approach to Personalized\n ... | [
[
"numpy.random.random",
"numpy.random.choice",
"numpy.reshape",
"numpy.linalg.inv",
"numpy.identity",
"numpy.zeros"
],
[
"numpy.zeros"
]
] |
harshkasyap/PySyft | [
"4575a50f38b78728dafe2615aad9145dae17b085"
] | [
"test/generic/pointers/test_pointer_tensor.py"
] | [
"import torch\nimport torch as th\nimport syft\n\nfrom syft.frameworks.torch.tensors.interpreters.additive_shared import AdditiveSharingTensor\nfrom syft.frameworks.torch.tensors.interpreters.precision import FixedPrecisionTensor\nfrom syft.generic.pointers.pointer_tensor import PointerTensor\nimport pytest\n\n\nde... | [
[
"torch.LongTensor",
"torch.Size",
"torch.ones",
"torch.max",
"torch.Tensor",
"torch.tensor",
"torch.nn.Linear",
"torch.rand",
"torch.split",
"torch.device"
]
] |
jihuacao/Putil | [
"b753fc94bea4cbda00f483681c55f0e9f54adef2",
"b753fc94bea4cbda00f483681c55f0e9f54adef2",
"b753fc94bea4cbda00f483681c55f0e9f54adef2",
"b753fc94bea4cbda00f483681c55f0e9f54adef2"
] | [
"data/torch_151_data/sampler.py",
"demo/deep_learning/main.py",
"torch/pretrained_model/vgg.py",
"sampling/MCMC/metropolis_hasting.py"
] | [
"import torch\nfrom torch._six import int_classes as _int_classes\n\n\nclass Sampler(object):\n r\"\"\"Base class for all Samplers.\n\n Every Sampler subclass has to provide an :meth:`__iter__` method, providing a\n way to iterate over indices of dataset elements, and a :meth:`__len__` method\n that ret... | [
[
"torch.randperm",
"torch.randint",
"torch.multinomial",
"torch.as_tensor"
],
[
"torch.cuda.manual_seed",
"torch.cuda.set_device",
"torch.multiprocessing.get_all_start_methods",
"torch.cuda.empty_cache",
"torch.no_grad",
"torch.set_num_threads",
"torch.device",
"... |
leogao2/dask | [
"4e5dfe7463028a39a90e026c7fb9220969093ab3"
] | [
"dask/array/routines.py"
] | [
"from __future__ import annotations\n\nimport math\nimport warnings\nfrom collections.abc import Iterable\nfrom functools import partial, reduce, wraps\nfrom numbers import Integral, Real\n\nimport numpy as np\nfrom tlz import concat, interleave, sliding_window\n\nfrom dask.array import chunk\nfrom dask.array.core ... | [
[
"numpy.take",
"numpy.linspace",
"numpy.asarray",
"numpy.issubdtype",
"numpy.promote_types",
"numpy.cumsum",
"numpy.zeros_like",
"numpy.searchsorted",
"numpy.select",
"numpy.where",
"numpy.histogram",
"numpy.unique",
"numpy.empty_like",
"numpy.atleast_1d",
... |
mujtahidalam/pandas | [
"526468c8fe6fc5157aaf2fce327c5ab2a3350f49",
"ae6538f5df987aa382ec1499679982aaff1bfd86",
"526468c8fe6fc5157aaf2fce327c5ab2a3350f49",
"526468c8fe6fc5157aaf2fce327c5ab2a3350f49"
] | [
"pandas/tests/indexes/ranges/test_range.py",
"pandas/io/sas/sas_xport.py",
"pandas/core/arraylike.py",
"pandas/tests/extension/json/array.py"
] | [
"import numpy as np\nimport pytest\n\nfrom pandas.core.dtypes.common import ensure_platform_int\n\nimport pandas as pd\nfrom pandas import (\n Float64Index,\n Index,\n Int64Index,\n RangeIndex,\n)\nimport pandas._testing as tm\nfrom pandas.tests.indexes.test_numeric import Numeric\n\n# aliases to make s... | [
[
"pandas._testing.assert_produces_warning",
"pandas._testing.assert_numpy_array_equal",
"pandas.RangeIndex",
"numpy.arange",
"pandas.Index",
"pandas.Float64Index",
"numpy.array",
"pandas._testing.assert_index_equal"
],
[
"pandas.util._decorators.Appender",
"pandas.io.com... |
ggould256/twentyfortyeight | [
"7d2b88023077ba4c64b65617d493039c0a9998c3"
] | [
"twentyfortyeight/strategy/nn/data.py"
] | [
"#!/usr/bin/env python3\n\n\"\"\"Classes and functions related to dataset generation for learning Q\nfunctions. Datasets in this sense are mappings from board positions\n(represented as flattened arrays of tile numbers) to score values.\n\"\"\"\n\nimport argparse\nimport sys\n\nimport numpy as np\n\nfrom game.comm... | [
[
"numpy.savez",
"numpy.concatenate",
"numpy.append",
"numpy.load",
"numpy.zeros"
]
] |
rtu715/NAS-Bench-360 | [
"d075006848c664371855c34082b0a00cda62be67",
"d075006848c664371855c34082b0a00cda62be67",
"d075006848c664371855c34082b0a00cda62be67",
"d075006848c664371855c34082b0a00cda62be67",
"d075006848c664371855c34082b0a00cda62be67"
] | [
"backbone/model_audio.py",
"expert/Satellite/mlp.py",
"AMBER/amber/architect/commonOps.py",
"old/bananas/darts/cnn/train_class.py",
"docs/point.py"
] | [
"'''\nDetermined model def example:\nhttps://github.com/determined-ai/determined/tree/master/examples/computer_vision/cifar10_pytorch\n'''\nimport tempfile\nfrom typing import Any, Dict, Sequence, Tuple, Union, cast\nfrom functools import partial\n\nimport os\nimport boto3\nimport numpy as np\nfrom sklearn.metrics ... | [
[
"torch.sigmoid",
"torch.optim.lr_scheduler.LambdaLR",
"torch.nn.CrossEntropyLoss",
"numpy.asarray",
"torch.nn.BCEWithLogitsLoss",
"torch.no_grad",
"numpy.mean",
"sklearn.metrics.average_precision_score"
],
[
"torch.nn.CrossEntropyLoss",
"torch.max",
"torch.manual_se... |
reeechart/ricommender | [
"c5cdf1cb9db27b9fc4a2553aee2b705b9ad0b95a"
] | [
"music_extractor.py"
] | [
"import csv\nimport eyed3\nimport librosa\nimport numpy as np\nimport sys\n\ndef load_editorial_metadata(audiofile):\n '''Loads an audio file and extract its editorial metadata\n\n Args:\n audiofile (string): audio file to be extracted.\n\n Returns:\n title (string): title of the mp3 file\n ... | [
[
"numpy.median",
"numpy.argmax",
"numpy.mean"
]
] |
basarane/model-based-rl | [
"af7ba84c272054d1de0b8cf9cc91b571abe91c3d"
] | [
"src/old_code/utils_old.py"
] | [
"import keras.backend as K\nimport numpy as np\nfrom PIL import Image, ImageDraw\n\ndef get_activations(model, model_inputs, print_shape_only=False, layer_name=None):\n\tprint('----- activations -----')\n\tactivations = []\n\tinp = model.input\n\n\tmodel_multi_inputs_cond = True\n\tif not isinstance(inp, list):\n\t... | [
[
"numpy.reshape",
"numpy.squeeze",
"numpy.array",
"numpy.transpose"
]
] |
EmmaRenauld/dwi_ml | [
"f2f776199dd886509d15520aa68099a8c870a233",
"f2f776199dd886509d15520aa68099a8c870a233"
] | [
"dwi_ml/models/utils/fisher_von_mises.py",
"dwi_ml/models/utils/gaussians.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport numpy as np\nimport torch\n\n\"\"\"\nThe complete formulas and explanations are available in our doc:\nhttps://dwi-ml.readthedocs.io/en/latest/formulas.html\n\"\"\"\n\n\ndef fisher_von_mises_log_prob_vector(mus, kappa, targets):\n log_c = np.log(kappa) - np.log(2 * np.pi) - np.... | [
[
"numpy.log",
"torch.sum",
"torch.exp",
"torch.log",
"numpy.exp"
],
[
"numpy.log"
]
] |
quattro/numpyro | [
"b7b6e937297ea47c55760446134f84fc82936a9d",
"b7b6e937297ea47c55760446134f84fc82936a9d",
"b7b6e937297ea47c55760446134f84fc82936a9d"
] | [
"examples/annotation.py",
"numpyro/infer/util.py",
"examples/covtype.py"
] | [
"# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\n\"\"\"\nExample: Bayesian Models of Annotation\n======================================\n\nIn this example, we run MCMC for various crowdsourced annotation models in [1].\n\nAll models have discrete latent variables. Under the h... | [
[
"numpy.max",
"numpy.array"
],
[
"numpy.zeros",
"numpy.prod"
],
[
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show"
]
] |
listato/Logarithmic-Quantization-of-Parameters-in-Neural-Networks | [
"dbc6a48ab5e0bf4361be459a45598523f2344371"
] | [
"utils/logquant_v1.py"
] | [
"\"\"\"\nAuthor: CAI JINGYONG @ BeatCraft, Inc & Tokyo University of Agriculture and Technology\n\nplaceholder\n\ninput: numpy array\noutput: numpy array\n\"\"\"\nimport numpy\n\nclass LogQuant:\n def __init__(self,layer,bitwidth):\n self.layer_data = layer\n self.width = bitwidth\n self.max... | [
[
"numpy.amax",
"numpy.sqrt",
"numpy.power",
"numpy.amin",
"numpy.modf",
"numpy.sign",
"numpy.ceil",
"numpy.vectorize",
"numpy.floor"
]
] |
sa-y-an/open-source-autonomous-vehicle-controller | [
"b959a4fefa1d44d052436ff9129af386e15e0455",
"0cc415fb141d1b66ac45a7bf6b50add6814728fb"
] | [
"path-finding/yolo-v5/utils/datasets.py",
"python/generate_points.py"
] | [
"# Dataset utils and dataloaders\n\nimport glob\nimport hashlib\nimport json\nimport logging\nimport os\nimport random\nimport shutil\nimport time\nfrom itertools import repeat\nfrom multiprocessing.pool import ThreadPool, Pool\nfrom pathlib import Path\nfrom threading import Thread\n\nimport cv2\nimport math\nimpo... | [
[
"torch.zeros",
"torch.cat",
"torch.load",
"numpy.flipud",
"numpy.concatenate",
"numpy.all",
"torch.save",
"numpy.random.beta",
"torch.utils.data.distributed.DistributedSampler",
"numpy.clip",
"numpy.fliplr",
"numpy.arange",
"numpy.eye",
"numpy.unique",
"... |
Leyan529/ImageClassificationPL | [
"a4be75f4525828100d8d278e46ff5dccd829af1a"
] | [
"extra/face.py"
] | [
"import torch\r\nimport matplotlib.image as img \r\n\r\nimport cv2\r\nimport dlib\r\nfrom imutils.face_utils import *\r\n\r\nimport numpy as np\r\n\r\n# image = img.imread(\"extra//test.jpg\")\r\n# image = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR) # opencvImage\r\ndlib_path = 'extra//shape_predictor_68_face_... | [
[
"numpy.array",
"torch.max",
"torch.tensor"
]
] |
washcycle/mlflow | [
"5a60ab34a4cecfe0b9636f6df77c087faa8b6959"
] | [
"mlflow/pyfunc/__init__.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"\nThe ``mlflow.pyfunc`` module defines a generic :ref:`filesystem format <pyfunc-filesystem-format>`\nfor Python models and provides utilities for saving to and loading from this format. The format is\nself contained in the sense that it includes all necessary information for anyon... | [
[
"pandas.DataFrame"
]
] |
mattzakh/mattplotlib | [
"5e9bc779d8c1b7074549615ab6790a9f7163cd59",
"5e9bc779d8c1b7074549615ab6790a9f7163cd59"
] | [
".history/src/modules/test_plot/test_plot_20190927183934.py",
".history/src/modules/test_plot/test_plot_20190927183924.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n# plt.style.use('../notebooks/test.mplstyle')\nimport seaborn as sns\n\nfrom logs import logDecorator as lD \nimport jsonref, pprint\n\nconfig = jsonref.load(open('../config/config.json'))\nlogBase = config['logging']['logBase'] + '.modules.test_plot.test_plot'\... | [
[
"numpy.random.beta",
"numpy.random.multivariate_normal",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.style.context",
"matplotlib.pyplot.axes",
"numpy.random.randint",
"matplotlib.pyplot.figure"
],
[
"numpy.random.beta",
"numpy.random.multivariate_normal",
"matplotli... |
tusharsarkar3/XBNet | [
"01e385f1c0a446eb38f4dd59ee9c510170bf096b"
] | [
"XBNet/main.py"
] | [
"from kivymd.app import MDApp\nfrom kivy.uix.widget import Widget\nfrom kivy.uix.actionbar import ActionBar\nfrom kivy.uix.scrollview import ScrollView\nfrom kivy.uix.boxlayout import BoxLayout\nfrom kivymd.theming import ThemableBehavior\nfrom kivymd.uix.list import OneLineListItem, MDList, TwoLineListItem, ThreeL... | [
[
"torch.nn.CrossEntropyLoss",
"pandas.read_csv",
"sklearn.ensemble.RandomForestClassifier",
"numpy.unique",
"sklearn.model_selection.train_test_split",
"sklearn.tree.DecisionTreeClassifier",
"sklearn.preprocessing.LabelEncoder"
]
] |
DJRavinszkha/pykeen | [
"d79fe39f83bc2831137f22be6421b37568694cf4"
] | [
"src/pykeen/models/unimodal/trans_e.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"TransE.\"\"\"\n\nfrom typing import Any, ClassVar, Mapping, Optional\n\nimport torch\nimport torch.autograd\nfrom torch.nn import functional\n\nfrom ..base import EntityRelationEmbeddingModel\nfrom ...constants import DEFAULT_EMBEDDING_HPO_EMBEDDING_DIM_RANGE\nfrom ...losses import... | [
[
"torch.norm"
]
] |
jiaoml1996/mmaction2 | [
"777546f27f8f5a3c83e10d966e2149be2fc9fa31",
"777546f27f8f5a3c83e10d966e2149be2fc9fa31"
] | [
"mmaction/models/builder.py",
"mmaction/core/evaluation/ava_utils.py"
] | [
"import warnings\n\nimport torch.nn as nn\nfrom mmcv.utils import Registry, build_from_cfg\n\nfrom .registry import BACKBONES, HEADS, LOCALIZERS, LOSSES, NECKS, RECOGNIZERS\n\ntry:\n from mmdet.models.builder import DETECTORS, build_detector\nexcept (ImportError, ModuleNotFoundError):\n warnings.warn('Please ... | [
[
"torch.nn.Sequential"
],
[
"numpy.arange",
"numpy.array"
]
] |
IaaC/MACT21.22_Digital_tools_Big_Data_part_2 | [
"f0c50a5f7ac147f6e9753545767d2d9998075ebb"
] | [
"iop_data_flow/footfall/01_footfall_clip.py"
] | [
"import os\n\nimport pandas as pd\nimport geopandas as gpd\n\n## Config\n\n# Number of rows to read\nnrows = 1000\n#nrows = 1000000\n#nrows = None\n\n# Output file path\nday_num = 1\ninput_csv_filepath = f'../../data/footfall/footfall_20210217/day{day_num}Bcntrakingotherdays.csv'\n\n# Clip mask file path\n#clip_mas... | [
[
"pandas.read_csv"
]
] |
zerogerc/rnn-autocomplete | [
"39dc8dd7c431cb8ac9e15016388ec823771388e4",
"39dc8dd7c431cb8ac9e15016388ec823771388e4"
] | [
"zerogercrnn/experiments/ast_level/metrics.py",
"zerogercrnn/lib/attn.py"
] | [
"import json\nimport os\n\nimport numpy as np\nimport torch\n\nfrom zerogercrnn.lib.constants import EMPTY_TOKEN_ID, UNKNOWN_TOKEN_ID\nfrom zerogercrnn.experiments.ast_level.utils import read_non_terminals\nfrom zerogercrnn.lib.constants import EMPTY_TOKEN_ID, UNKNOWN_TOKEN_ID, EOF_TOKEN\nfrom zerogercrnn.lib.metri... | [
[
"torch.max",
"torch.sum",
"numpy.save",
"torch.nonzero",
"torch.index_select",
"numpy.zeros",
"torch.argmax"
],
[
"torch.nn.Linear",
"torch.nn.functional.softmax",
"torch.FloatTensor"
]
] |
PeterouZh/CIPS-3D | [
"9b8bfa0fb23f642af042e150ccd70408f9d137c6"
] | [
"exp/cips3d_inversion/models/generator_v2.py"
] | [
"from itertools import chain\nimport math\nimport logging\nimport collections\nfrom collections import OrderedDict\nimport tqdm\nimport random\nimport time\nfrom einops import rearrange, repeat\nimport numpy as np\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.cuda.amp import au... | [
[
"torch.mean",
"torch.sin",
"torch.cat",
"torch.randn",
"torch.nn.ModuleList",
"torch.nn.utils.spectral_norm",
"torch.nn.Tanh",
"torch.nn.Linear",
"torch.nn.Identity",
"torch.no_grad",
"torch.nn.LeakyReLU",
"torch.sort",
"torch.rand",
"torch.gather"
]
] |
cihuang123/pyrobot | [
"fe620097e31d11453b5ea7ac15e40f5f5721b29a",
"fe620097e31d11453b5ea7ac15e40f5f5721b29a"
] | [
"src/pyrobot/habitat/base.py",
"robots/LoCoBot/locobot_control/nodes/pointrobot3factor_ros_server.py"
] | [
"import numpy as np\nimport math\nimport pyrobot.utils.util as prutil\nimport rospy\nimport habitat_sim.agent as habAgent\nimport habitat_sim.utils as habUtils\nfrom habitat_sim.agent.controls import ActuationSpec\nimport habitat_sim.errors\n\nimport quaternion\nfrom tf.transformations import euler_from_quaternion,... | [
[
"numpy.dot",
"numpy.asarray",
"numpy.cos",
"numpy.arccos",
"numpy.sin",
"numpy.linalg.norm",
"numpy.array"
],
[
"numpy.amax",
"numpy.asarray",
"scipy.ndimage.distance_transform_edt",
"numpy.linalg.norm",
"numpy.cos",
"numpy.ones",
"numpy.sin",
"numpy... |
arkottke/MapIO | [
"dd6e347dce2d65b7bd4c489a03d8883d0e4210fc"
] | [
"test/shake_test.py"
] | [
"#!/usr/bin/env python\n\n#python 3 compatibility\nfrom __future__ import print_function\n\n#stdlib imports\nfrom xml.dom import minidom\nfrom datetime import datetime\nfrom collections import OrderedDict\nimport re\nimport sys\nimport tempfile\nimport time\nimport shutil\n\nif sys.version_info.major == 2:\n imp... | [
[
"numpy.arange",
"numpy.testing.assert_almost_equal",
"numpy.array",
"numpy.random.rand"
]
] |
palash247/modin | [
"ffea4ee2d3556dc48c05dac7abb54b62c66f3153",
"3f1e275b67a760f09db6944600c4b7f5e601cbde",
"3f1e275b67a760f09db6944600c4b7f5e601cbde"
] | [
"modin/pandas/test/dataframe/test_map_metadata.py",
"asv_bench/benchmarks/io/csv.py",
"modin/experimental/pandas/test/test_io_exp.py"
] | [
"# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the \"License\"); you... | [
[
"pandas.Series",
"numpy.array_equal",
"matplotlib.use",
"pandas.Index",
"pandas.DataFrame",
"pandas.get_dummies"
],
[
"numpy.arange"
],
[
"pandas.read_csv",
"pandas.read_sql"
]
] |
aiboyko/t3f | [
"0361b80f36a06eb5aa5d536650eef9e006289139"
] | [
"t3f/riemannian.py"
] | [
"import tensorflow.compat.v1 as tf\n\nfrom t3f.tensor_train import TensorTrain\nfrom t3f.tensor_train_batch import TensorTrainBatch\nfrom t3f import shapes\nfrom t3f import decompositions\n\n\ndef project_sum(what, where, weights=None):\n \"\"\"Project sum of `what` TTs on the tangent space of `where` TT.\n\n pro... | [
[
"tensorflow.compat.v1.ones",
"tensorflow.compat.v1.concat",
"tensorflow.compat.v1.expand_dims",
"tensorflow.compat.v1.add_n",
"tensorflow.compat.v1.convert_to_tensor",
"tensorflow.compat.v1.einsum",
"tensorflow.compat.v1.reshape",
"tensorflow.compat.v1.zeros",
"tensorflow.compa... |
agstephens/intake-esm | [
"25ead83497d025c37a80abdbefee9b286934308b"
] | [
"intake_esm/cat.py"
] | [
"import enum\nimport json\nimport os\nimport pathlib\nimport typing\n\nimport fsspec\nimport pandas as pd\nimport pydantic\nimport tlz\n\nfrom ._search import search, search_apply_require_all_on\n\n\nclass AggregationType(str, enum.Enum):\n join_new = 'join_new'\n join_existing = 'join_existing'\n union = ... | [
[
"pandas.read_csv",
"pandas.DataFrame"
]
] |
ivanov/numpy | [
"6d2665626e40f346bb5af8d780579f5a429ff9ba",
"6d2665626e40f346bb5af8d780579f5a429ff9ba",
"6d2665626e40f346bb5af8d780579f5a429ff9ba",
"6d2665626e40f346bb5af8d780579f5a429ff9ba",
"6d2665626e40f346bb5af8d780579f5a429ff9ba",
"6d2665626e40f346bb5af8d780579f5a429ff9ba"
] | [
"numpy/polynomial/hermite.py",
"numpy/polynomial/tests/test_hermite_e.py",
"numpy/numarray/__init__.py",
"numpy/testing/tests/test_doctesting.py",
"numpy/oldnumeric/arrayfns.py",
"numpy/oldnumeric/__init__.py"
] | [
"\"\"\"\nObjects for dealing with Hermite series.\n\nThis module provides a number of objects (mostly functions) useful for\ndealing with Hermite series, including a `Hermite` class that\nencapsulates the usual arithmetic operations. (General information\non how this module represents and works with such polynomia... | [
[
"numpy.rollaxis",
"numpy.square",
"numpy.linalg.eigvals",
"numpy.iterable",
"numpy.sqrt",
"numpy.abs",
"numpy.asarray",
"numpy.arange",
"numpy.multiply.accumulate",
"numpy.ones",
"numpy.all",
"numpy.linalg.lstsq",
"numpy.finfo",
"numpy.exp",
"numpy.array... |
oguzdemirbasci/DynamicVocabAbstractiveSummariser | [
"2e8ba9efd6eddd7d1870d540638f05c80bfe9894"
] | [
"fairseq/fairseq/data/indexed_dataset.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom functools import lru_cache\nimport os\nimport shutil\nimport struct\n\nimport numpy as np\nimport torch\n\nfrom . import Fairse... | [
[
"numpy.reshape",
"numpy.memmap",
"torch.from_numpy",
"numpy.frombuffer",
"numpy.array",
"numpy.empty"
]
] |
deciding/Voicefilter | [
"dda34da9d1cfca48102b2d1b4274bfd76e5a2e1c"
] | [
"utils/audio.py"
] | [
"# adapted from Keith Ito's tacotron implementation\n# https://github.com/keithito/tacotron/blob/master/util/audio.py\n\nimport librosa\nimport numpy as np\n\n\nclass Audio():\n def __init__(self, hp):\n self.hp = hp\n self.mel_basis = librosa.filters.mel(sr=hp.audio.sample_rate,\n ... | [
[
"numpy.dot",
"numpy.maximum",
"numpy.abs",
"numpy.clip",
"numpy.power",
"numpy.angle",
"numpy.exp"
]
] |
hummat/detectron2 | [
"ef2f4df474b4a07049cada4793392e8e36c3e746"
] | [
"demo/demo.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\nimport argparse\nimport glob\nimport multiprocessing as mp\nimport numpy as np\nimport os\nimport tempfile\nimport time\nimport warnings\nimport cv2\nimport tqdm\n\nfrom detectron2.config import get_cfg\nfrom detectron2.data.detection_utils import read_image\nfro... | [
[
"numpy.zeros"
]
] |
rserran/FLAML | [
"7d6822aa40883550e72c4ee24adb765c6e937ce7"
] | [
"flaml/model.py"
] | [
"# !\r\n# * Copyright (c) FLAML authors. All rights reserved.\r\n# * Licensed under the MIT License. See LICENSE file in the\r\n# * project root for license information.\r\nfrom contextlib import contextmanager\r\nfrom functools import partial\r\nimport signal\r\nimport os\r\nfrom typing import Callable, List\r\... | [
[
"pandas.to_datetime",
"sklearn.metrics.r2_score",
"scipy.sparse.issparse",
"numpy.log2",
"numpy.sqrt",
"sklearn.dummy.DummyClassifier",
"numpy.asarray",
"numpy.issubdtype",
"numpy.squeeze",
"sklearn.dummy.DummyRegressor",
"pandas.DataFrame",
"numpy.ones",
"numpy... |
Raniac/NEURO-LEARN | [
"3c3acc55de8ba741e673063378e6cbaf10b64c7a",
"3c3acc55de8ba741e673063378e6cbaf10b64c7a",
"3c3acc55de8ba741e673063378e6cbaf10b64c7a",
"3c3acc55de8ba741e673063378e6cbaf10b64c7a",
"3c3acc55de8ba741e673063378e6cbaf10b64c7a",
"3c3acc55de8ba741e673063378e6cbaf10b64c7a",
"3c3acc55de8ba741e673063378e6cbaf10b64c7... | [
"env/lib/python3.6/site-packages/nibabel/tests/test_image_load_save.py",
"env/share/doc/dipy/examples/quick_start.py",
"env/lib/python3.6/site-packages/dipy/reconst/tests/test_interpolate.py",
"env/lib/python3.6/site-packages/dipy/tracking/tests/test_life.py",
"env/lib/python3.6/site-packages/nibabel/tests/... | [
"# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##\n#\n# See COPYING file distributed along with the NiBabel package for the\n# copyright and license terms.\n#\n#... | [
[
"numpy.diag",
"numpy.arange",
"numpy.eye",
"numpy.ones",
"numpy.testing.assert_array_equal",
"numpy.prod"
],
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
],
[
"nu... |
inaber0420/glTF-Modo-IO | [
"57f99aee4e9b6177d25b465b87d731b54a625532"
] | [
"addons/io_scene_gltf2/blender/exp/gltf2_blender_extract.py"
] | [
"# Copyright 2018-2021 The glTF-Blender-IO authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app... | [
[
"numpy.power",
"numpy.unique",
"numpy.linalg.norm",
"numpy.dtype",
"numpy.repeat",
"numpy.array",
"numpy.where",
"numpy.divide"
]
] |
ichen20/oreilly_book | [
"8098d8096d9decca6aa5afbb267b9f05ce0570f2"
] | [
"07_train/privacy/tensorflow_privacy/privacy/membership_inference_attack/membership_inference_attack.py"
] | [
"# Copyright 2020, The TensorFlow Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable ... | [
[
"numpy.argmax",
"sklearn.metrics.roc_curve"
]
] |
fujibo/poseHG | [
"e582a6ca1badc9a894b8b7e2a5e0acf9eb348c5c"
] | [
"chainer/snap2model.py"
] | [
"import numpy as np\nimport tempfile\n\n\ndef snap2model_parser(path_snapshot, path_model=None):\n \"\"\"convert snapshot to model\n\n :param path_snapshot: str\n :param path_model: str, default None\n :return: file descriptor (path_model is None) or None (otherwise)\n \"\"\"\n snapshot = np.load(... | [
[
"numpy.load",
"numpy.savez"
]
] |
vltmedia/ROMP | [
"1d2d96bd39f67a0a86ce7e397e3af856b3c5ee00"
] | [
"romp/lib/loss_funcs/params_loss.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport torch\nimport torch.nn as nn\n\nimport time\nimport pickle\nimport numpy as np\n\nimport config\nimport constants\nfrom config import args\nfrom utils import batch_rodrigues, rotation_matrix_to_... | [
[
"torch.norm",
"torch.eye",
"torch.matmul",
"torch.stack",
"numpy.array"
]
] |
L-Net-1992/Paddle | [
"4d0ca02ba56760b456f3d4b42a538555b9b6c307",
"4d0ca02ba56760b456f3d4b42a538555b9b6c307",
"4d0ca02ba56760b456f3d4b42a538555b9b6c307",
"4d0ca02ba56760b456f3d4b42a538555b9b6c307",
"4d0ca02ba56760b456f3d4b42a538555b9b6c307",
"4d0ca02ba56760b456f3d4b42a538555b9b6c307",
"4d0ca02ba56760b456f3d4b42a538555b9b6c30... | [
"python/paddle/fluid/tests/unittests/xpu/test_expand_v2_op_xpu.py",
"python/paddle/distributed/auto_parallel/process_mesh.py",
"python/paddle/fluid/tests/unittests/test_dygraph_mnist_fp16.py",
"python/paddle/fluid/tests/unittests/ipu/test_elemetwise_x_op_ipu.py",
"python/paddle/fluid/tests/unittests/ipu/tes... | [
"# Copyright (c) 2018 PaddlePaddle 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 ... | [
[
"numpy.random.random",
"numpy.random.seed",
"numpy.tile",
"numpy.ones",
"numpy.array",
"numpy.random.randint"
],
[
"numpy.array"
],
[
"numpy.random.randn",
"numpy.random.randint"
],
[
"numpy.random.uniform"
],
[
"numpy.random.rand",
"numpy.array",
... |
Yvette1993/spinningup | [
"5094cf291fa24cf93d58b4507dab56dafe73dac1"
] | [
"envs/cell_place_gym/native/acp_state.py"
] | [
"import numpy as np\n\nfrom cell_place_gym.native.acp_placement import *\n\nclass acp_placement_state (object):\n\n def __init__ (self, place):\n self.place = place\n self.design = place.design\n l_inst_count = len (self.design.instances)\n # Non-Placed Nets Matrix\n self... | [
[
"numpy.zeros"
]
] |
Adri1bo/HEMS_API | [
"dca26e55696f9f2e36f29968a8c3a90871d6bc16"
] | [
"forecaster.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sun Jun 7 17:58:57 2020\r\n\r\n@author: adria.bove\r\n\"\"\"\r\n\r\nfrom BBDD import BBDD\r\nimport analytics\r\nimport pandas as pd\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nimport datetime as dt\r\n\r\nclass consumption:\r\n def __init__(self,... | [
[
"matplotlib.pyplot.plot",
"pandas.to_numeric",
"pandas.Series"
]
] |
ARAN1218/RealEstateRentPrediction_AI | [
"da537f3204fa1bc80a499a03b2fd015926ccc755"
] | [
"improved-ver1/6.Real_Estate_Own_Data_Prediction_improved1.py"
] | [
"#必要なライブラリをインポート\nimport numpy as np\nimport pandas as pd\nimport xgboost as xgb\nfrom sklearn.preprocessing import LabelEncoder\n\n\n#numpyのリスト表示制限を解除しておく\nnp.set_printoptions(threshold=np.inf)\n\n\n#既に学習データとREDP関数を用いてAIが作成されているものとする\n#model = RERL(df_l)\n\n\n#住所と路線と間取りはラベルエンコーディングの都合により学習データ/テストデータにあったものしか使えない為、予... | [
[
"numpy.set_printoptions",
"pandas.DataFrame"
]
] |
Lifebrain/p025_education_brain | [
"507cca3514b8ddbf65df7a047dba5bae1295badf"
] | [
"02_ukb/src/01_data_preparation/02_qdec_table/01_creat_qdec_table.py"
] | [
"#!/usr/bin/env python3\n# Purpose: Create qdec table\n\nimport pandas as pd\nimport numpy as np\nimport glob\nimport os.path as op\nimport os\n\ndata_csv = op.join(os.environ['TABULAR_DATA_DIR'],'data.csv')\n\noutput_file = op.join(os.environ['QDEC_DATA_DIR'],'qdec.table.dat')\n\nfs_dir = \"/cluster/projects/p23/d... | [
[
"pandas.read_csv"
]
] |
amiyapatanaik/U-Time | [
"a9ed4892da77d165a71dbfef1d069d782c909757",
"a9ed4892da77d165a71dbfef1d069d782c909757"
] | [
"utime/callbacks/callbacks.py",
"utime/train/trainer.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom carbontracker.tracker import CarbonTracker\nfrom tensorflow.keras.callbacks import Callback\nfrom utime.utils import get_memory_usage\nfrom mpunet.utils import highlighted\nfrom mpunet.logging import ScreenLogger\nfrom collections import defaultdict\nfrom datetime impo... | [
[
"pandas.DataFrame",
"numpy.mean",
"numpy.bincount",
"numpy.zeros_like",
"numpy.where",
"numpy.zeros"
],
[
"tensorflow.boolean_mask",
"tensorflow.not_equal",
"tensorflow.cast",
"tensorflow.reshape",
"tensorflow.ones_like",
"tensorflow.zeros_like",
"tensorflow... |
aditya9126/pipelines-azureml | [
"0c747f12e02ee3d3976746663bd1da0ab5935887"
] | [
"models/diabetes/train.py"
] | [
"# new update\n\nimport pickle\nimport os\nimport numpy as np\nfrom sklearn.datasets import load_diabetes\nfrom sklearn.linear_model import Ridge\nfrom sklearn.metrics import mean_squared_error\nfrom sklearn.model_selection import train_test_split\nfrom azureml.core.run import Run\n\nfrom utils import mylib\n\nos.m... | [
[
"sklearn.linear_model.Ridge",
"sklearn.model_selection.train_test_split",
"sklearn.datasets.load_diabetes",
"sklearn.metrics.mean_squared_error"
]
] |
pasindubawantha/just-copy | [
"919b1723c87cadc5946f891da53f4abc7d50ff6e"
] | [
"AC_Network.py"
] | [
"import tensorflow as tf\nimport tensorflow.contrib.slim as slim\n#import tensorflow.nn as slim\nimport numpy as np\nfrom helpers import *\n\nclass AC_Network():\n def __init__(self,s_size,a_size,scope,trainer,s_shape):\n with tf.variable_scope(scope):\n #Input and visual encoding layers\n ... | [
[
"tensorflow.nn.rnn_cell.BasicLSTMCell",
"tensorflow.nn.dynamic_rnn",
"tensorflow.nn.rnn_cell.LSTMStateTuple",
"tensorflow.shape",
"tensorflow.get_collection",
"tensorflow.reduce_sum",
"tensorflow.reshape",
"tensorflow.gradients",
"tensorflow.placeholder",
"tensorflow.expand... |
jishnujayakumar/meta-dataset | [
"fac43975e7e8931bd9c9a9171268758e26469646",
"fac43975e7e8931bd9c9a9171268758e26469646"
] | [
"meta_dataset/analysis/select_best_model.py",
"meta_dataset/data/sur_decoder.py"
] | [
"# coding=utf-8\n# Copyright 2021 The Meta-Dataset 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 require... | [
[
"numpy.convolve",
"numpy.pad",
"tensorflow.compat.v1.io.gfile.listdir",
"tensorflow.compat.v1.train.summary_iterator",
"tensorflow.compat.v1.flags.DEFINE_string",
"tensorflow.compat.v1.io.gfile.GFile",
"numpy.ones",
"numpy.argmax",
"tensorflow.compat.v1.flags.DEFINE_enum",
... |
sdrobert/pydrobert-pytorch | [
"7abad0dbb2e80b4267aebcee492aa9fd7d83ea3f",
"7abad0dbb2e80b4267aebcee492aa9fd7d83ea3f"
] | [
"tests/test_data.py",
"src/pydrobert/torch/command_line.py"
] | [
"# Copyright 2021 Sean Robertson\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 agree... | [
[
"torch.all",
"torch.LongTensor",
"torch.randint",
"torch.full",
"torch.cat",
"torch.Tensor",
"torch.manual_seed",
"torch.randn",
"torch.tensor",
"torch.any",
"torch.full_like",
"torch.rand",
"torch.arange",
"torch.stack",
"torch.allclose",
"torch.nn.... |
lidongyv/Monocular-depth-esitimation-with-region-support-cvpr | [
"7715c91b9c9f88de5c0233923c3a073edf9b2ca8",
"7715c91b9c9f88de5c0233923c3a073edf9b2ca8"
] | [
"back of code/RSCFN/rsden/models/rsn_cluster # without 0 fuse cluster.py",
"back of code/RSCFN/rsden/loader/NYU2-20181023212211.py"
] | [
"# -*- coding: utf-8 -*-\n# @Author: lidong\n# @Date: 2018-03-20 18:01:52\n# @Last Modified by: yulidong\n# @Last Modified time: 2018-11-06 20:45:11\n\nimport torch\nimport numpy as np\nimport torch.nn as nn\nimport math\nfrom math import ceil\nfrom torch.autograd import Variable\nfrom rsden.cluster_loss import... | [
[
"torch.nn.Sequential",
"torch.norm",
"torch.ones",
"torch.max",
"torch.cat",
"torch.zeros",
"torch.min",
"torch.nn.Conv2d",
"torch.sum",
"torch.tensor",
"torch.unique",
"torch.no_grad",
"torch.where",
"torch.arange",
"torch.nn.GroupNorm",
"torch.nn.R... |
sdss/apogee | [
"e134409dc14b20f69e68a0d4d34b2c1b5056a901",
"e134409dc14b20f69e68a0d4d34b2c1b5056a901",
"5112ea30a83d2ea308e552b985ff3584734d9df1"
] | [
"python/apogee/aspcap/teff.py",
"python/apogee/apred/target.py",
"external/doppler/doppler/cannongrid_cubic_norm_training.py"
] | [
"# routines for calibrating/comparing effective temperatures with photometric sample\n\nfrom apogee.utils import apload\nfrom apogee.utils import apselect\nfrom astropy.io import fits, ascii\nfrom tools import match\nfrom tools import plots\nfrom tools import fit\nfrom apogee.utils import bitmask\nfrom apogee.aspca... | [
[
"numpy.linspace",
"numpy.clip",
"numpy.isfinite",
"numpy.arange",
"numpy.median",
"matplotlib.pyplot.rc",
"matplotlib.pyplot.draw",
"numpy.chararray.strip",
"matplotlib.pyplot.close",
"matplotlib.cm.get_cmap",
"numpy.where"
],
[
"numpy.array",
"numpy.where"
... |
calvinfeng/openvino | [
"11f591c16852637506b1b40d083b450e56d0c8ac",
"11f591c16852637506b1b40d083b450e56d0c8ac",
"11f591c16852637506b1b40d083b450e56d0c8ac",
"11f591c16852637506b1b40d083b450e56d0c8ac",
"11f591c16852637506b1b40d083b450e56d0c8ac",
"11f591c16852637506b1b40d083b450e56d0c8ac",
"11f591c16852637506b1b40d083b450e56d0c8a... | [
"model-optimizer/extensions/middle/GatherNdNormalizer.py",
"model-optimizer/mo/middle/passes/fusing/fuse_grouped_conv.py",
"model-optimizer/extensions/ops/gatherelements.py",
"model-optimizer/extensions/front/binary_quantize_normalization.py",
"model-optimizer/extensions/front/Softplus_fusion.py",
"infere... | [
"\"\"\"\n Copyright (C) 2018-2021 Intel Corporation\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable... | [
[
"numpy.take"
],
[
"numpy.array",
"numpy.array_equal"
],
[
"numpy.ndindex",
"numpy.empty"
],
[
"numpy.array"
],
[
"numpy.allclose"
],
[
"numpy.int",
"numpy.ndarray"
],
[
"numpy.all"
],
[
"numpy.array_equal"
],
[
"numpy.argsort",
"n... |
shaunster0/kornia | [
"71acf455ee36f2050b7be5ea993b6db773f502eb",
"71acf455ee36f2050b7be5ea993b6db773f502eb",
"71acf455ee36f2050b7be5ea993b6db773f502eb"
] | [
"test/geometry/test_homography.py",
"tutorials/filter_edges.py",
"kornia/filters/sobel.py"
] | [
"import random\n\nimport pytest\nimport torch\nfrom torch.autograd import gradcheck\n\nimport kornia\nfrom kornia.geometry.homography import find_homography_dlt, find_homography_dlt_iterated\nfrom kornia.testing import assert_close\n\n\nclass TestFindHomographyDLT:\n def test_smoke(self, device, dtype):\n ... | [
[
"torch.ones",
"torch.rand_like",
"torch.manual_seed",
"torch.random.initial_seed",
"torch.rand",
"torch.autograd.gradcheck",
"torch.ones_like"
],
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.axis"
],
[
"torch.sqrt",
"torch.nn.functional.pad",
"torch.nn.f... |
jradavenport/helloTESS | [
"1bd4680640e7b92ae3b2eeba19cc63e8b834eead"
] | [
"code/combine_sectors.py"
] | [
"import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib.cm as cm\nimport matplotlib\nimport os\nfrom glob import glob\nfrom matplotlib.colors import LogNorm\n\nfrom scipy.optimize import curve_fit\n\nfrom astropy.table import Table\nimport astropy.io.fits as fits\nfrom astropy.s... | [
[
"numpy.nanmax",
"matplotlib.pyplot.legend",
"numpy.nanmedian",
"pandas.Series",
"matplotlib.pyplot.plot",
"numpy.nanstd",
"numpy.where",
"numpy.sin",
"numpy.size",
"numpy.argmax",
"matplotlib.pyplot.errorbar",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure... |
pavstar619/HackerRank | [
"eb6c95e16688c02921c1df6b6ea613667a251457"
] | [
"Python/Numpy/Shape and Reshape.py"
] | [
"import numpy as np\n\nclass Main:\n def __init__(self):\n self.li = list(map(int, input().split()))\n self.np_li = np.array(self.li)\n \n def output(self):\n print(np.reshape(self.np_li, (3,3)))\n \nif __name__ == '__main__':\n obj = Main()\n obj.output()\n"
] | [
[
"numpy.reshape",
"numpy.array"
]
] |
kundajelab/pylearn2 | [
"17ebf0c37b35637e337b3ae884806d2c99beb31c"
] | [
"pylearn2/models/dbm/layer.py"
] | [
"\"\"\"\nCommon DBM Layer classes\n\"\"\"\nfrom __future__ import print_function\n\n__authors__ = [\"Ian Goodfellow\", \"Vincent Dumoulin\"]\n__copyright__ = \"Copyright 2012-2013, Universite de Montreal\"\n__credits__ = [\"Ian Goodfellow\"]\n__license__ = \"3-clause BSD\"\n__maintainer__ = \"LISA Lab\"\n\nimport f... | [
[
"numpy.exp",
"numpy.zeros",
"numpy.transpose"
]
] |
Simon-Will/neuralmonkey | [
"b686a9d302cb10eda5fca991e1d7ee6b9e84b75a",
"b686a9d302cb10eda5fca991e1d7ee6b9e84b75a"
] | [
"neuralmonkey/processors/alignment.py",
"neuralmonkey/tests/test_model_part.py"
] | [
"import re\nfrom typing import List\n\nimport numpy as np\n\n# pylint: disable=too-few-public-methods\n\nID_SEP = re.compile(r\"[-:]\")\n\n\nclass WordAlignmentPreprocessor(object):\n \"\"\"A preprocessor for word alignments in a text format.\n\n One of the following formats is expected:\n\n s1-t1 s2-t... | [
[
"numpy.errstate",
"numpy.isnan",
"numpy.zeros"
],
[
"tensorflow.get_collection",
"tensorflow.global_variables_initializer",
"tensorflow.Session",
"numpy.all"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.