repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
jasmainak/ephypype | [
"257603cbb099cef7847a96c8eb141332fb85ebfa"
] | [
"ephypype/compute_inv_problem.py"
] | [
"# Created on Thu Oct 8 17:53:07 2015\n# @author: pasca\n\n\ndef compute_noise_cov(cov_fname, raw):\n \"\"\"\n Compute noise covariance data from a continuous segment of raw data.\n Employ empty room data (collected without the subject) to calculate\n the full noise covariance matrix.\n This is reco... | [
[
"numpy.save"
]
] |
tanacchi/machine_learning_intro | [
"c3776fb54b499b106d7f84c3acf759e96b87f1f4",
"c3776fb54b499b106d7f84c3acf759e96b87f1f4"
] | [
"pytorch/capter_8/frozen_lake_dqn.py",
"samples/scipy/sample_01.py"
] | [
"import gym\nimport numpy as np\n\nimport torch\nfrom torch import nn\nfrom torch.autograd import Variable\nfrom torch import optim\nfrom torch.nn import functional as F\n\n\nenv = gym.make('FrozenLake-v0')\n\nclass Net(nn.Module):\n def __init__(self):\n super(Net, self).__init__()\n self.fc1 = nn... | [
[
"torch.Tensor",
"torch.from_numpy",
"torch.nn.Linear",
"numpy.copy",
"numpy.argmax",
"numpy.max",
"numpy.random.rand",
"numpy.array",
"numpy.zeros",
"torch.nn.MSELoss",
"torch.autograd.Variable"
],
[
"scipy.sparse.coo_matrix",
"numpy.arange",
"numpy.eye"... |
mlaai/mentornet | [
"76d6be2db1be39714dec6db6bb3bcbb77855ce6e",
"76d6be2db1be39714dec6db6bb3bcbb77855ce6e"
] | [
"code/cifar_data_provider.py",
"code/inception_model.py"
] | [
"# Copyright 2018 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app... | [
[
"tensorflow.image.resize_image_with_crop_or_pad",
"tensorflow.image.random_flip_left_right",
"tensorflow.contrib.slim.one_hot_encoding",
"tensorflow.squeeze",
"tensorflow.random_crop",
"tensorflow.image.per_image_standardization",
"tensorflow.to_float",
"tensorflow.pad",
"tenso... |
tdml13/NiftyNet | [
"b35fa19ca307e81d229e2fe8269a417724833da2",
"b35fa19ca307e81d229e2fe8269a417724833da2",
"b35fa19ca307e81d229e2fe8269a417724833da2",
"b35fa19ca307e81d229e2fe8269a417724833da2",
"b35fa19ca307e81d229e2fe8269a417724833da2",
"b35fa19ca307e81d229e2fe8269a417724833da2",
"b35fa19ca307e81d229e2fe8269a417724833da... | [
"tests/handler_early_stopping_test.py",
"niftynet/contrib/csv_reader/classification_application.py",
"niftynet/contrib/csv_reader/applications_maybe/label_driven_registration.py",
"niftynet/evaluation/segmentation_evaluations.py",
"niftynet/application/regression_application.py",
"tests/scalenet_test.py",... | [
"# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, print_function\n\nimport tensorflow as tf\nimport numpy as np\n\nfrom niftynet.engine.handler_early_stopping import check_should_stop\nfrom tests.niftynet_testcase import NiftyNetTestCase\n\nclass EarlyStopperTest(NiftyNetTestCase):\n\n def test_m... | [
[
"numpy.arange",
"tensorflow.test.main"
],
[
"tensorflow.contrib.layers.python.layers.regularizers.l1_regularizer",
"tensorflow.confusion_matrix",
"tensorflow.contrib.layers.python.layers.regularizers.l2_regularizer",
"tensorflow.reduce_mean",
"tensorflow.get_collection",
"tenso... |
andre-cavalheiro/datascience-project | [
"f9e7187faacc2e3e676c7db0e34e354e8c659c3c"
] | [
"src/libs/plot.py"
] | [
"import pandas as pd\nimport matplotlib.pyplot as plt\nfrom pandas.plotting import register_matplotlib_converters\nfrom sklearn.tree import export_graphviz\nimport seaborn as sns\nfrom subprocess import call\nfrom sklearn.decomposition import PCA\nfrom mpl_toolkits.mplot3d import Axes3D\nimport numpy as np\nfrom sk... | [
[
"sklearn.tree.export_graphviz",
"pandas.read_csv",
"numpy.unique",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.imread",
"matplotlib.pyplot.subplots",
"numpy.sort",
"pandas.DataFrame",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.close",
... |
ceostroff/transformers | [
"3095ee9dab739f212a8753b5be4e1a72ba42e28e",
"3095ee9dab739f212a8753b5be4e1a72ba42e28e",
"3095ee9dab739f212a8753b5be4e1a72ba42e28e"
] | [
"src/transformers/models/albert/modeling_albert.py",
"src/transformers/models/reformer/modeling_reformer.py",
"tests/test_modeling_ctrl.py"
] | [
"# coding=utf-8\n# Copyright 2018 Google AI, Google Brain and the HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LIC... | [
[
"torch.nn.Softmax",
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"torch.zeros",
"torch.einsum",
"torch.from_numpy",
"torch.nn.Embedding",
"torch.nn.LayerNorm",
"tensorflow.train.load_variable",
"torch.nn.Linear",
"torch.matmul",
"torch.nn.Tanh"... |
Neoyanghc/Bigscity-LibCity | [
"44c0bff537c20d8a9db8f814ffbe3540c65bdf82"
] | [
"libcity/evaluator/traffic_state_evaluator.py"
] | [
"import os\nimport json\nimport datetime\nimport pandas as pd\nfrom libcity.utils import ensure_dir\nfrom libcity.model import loss\nfrom logging import getLogger\nfrom libcity.evaluator.abstract_evaluator import AbstractEvaluator\n\n\nclass TrafficStateEvaluator(AbstractEvaluator):\n\n def __init__(self, config... | [
[
"pandas.set_option"
]
] |
ishine/DiffSinger-1 | [
"9a5baf553f635f088ca110aa22e87b67ece6e947",
"9a5baf553f635f088ca110aa22e87b67ece6e947"
] | [
"usr/diffsinger_task.py",
"utils/pitch_utils.py"
] | [
"import torch\n\nimport utils\nfrom utils.hparams import hparams\nfrom .diff.net import DiffNet\nfrom .diff.shallow_diffusion_tts import GaussianDiffusion, OfflineGaussianDiffusion\nfrom .diffspeech_task import DiffSpeechTask\nfrom vocoders.base_vocoder import get_vocoder_cls, BaseVocoder\nfrom modules.fastspeech.p... | [
[
"numpy.load",
"torch.LongTensor",
"torch.FloatTensor"
],
[
"numpy.log",
"numpy.log2",
"numpy.rint",
"torch.log2",
"torch.FloatTensor",
"numpy.where"
]
] |
JustinLokHinWu/TextGAN-PyTorch | [
"427f08890056a96fde7e5b67c26c3bb9f5a420a4"
] | [
"models/OurGAN_D.py"
] | [
"# -*- coding: utf-8 -*-\n# @Author : William\n# @Project : TextGAN-william\n# @FileName : RelGAN_D.py\n# @Time : Created at 2019-04-25\n# @Blog : http://zhiweil.ml/\n# @Description : \n# Copyrights (C) 2018. All Rights Reserved.\nimport math\n\nimport torch\nimport torch.autograd as... | [
[
"torch.nn.Dropout",
"torch.nn.init.uniform_",
"torch.zeros",
"torch.sin",
"torch.nn.Tanh",
"torch.nn.Sigmoid",
"torch.nn.Linear",
"torch.nn.TransformerEncoderLayer",
"torch.nn.LayerNorm",
"torch.nn.init.normal_",
"torch.nn.LeakyReLU",
"torch.arange",
"torch.cos"... |
Xraydylan/Arducam-OV2640-Pico-Package | [
"0875dd8b5dcfeb69e1c80a554966818fce8d8cb0"
] | [
"Arducam2640/Arducam2640.py"
] | [
"import os\nfrom serial import Serial\nimport time\nimport numpy as np\nfrom PIL import Image, JpegImagePlugin\nimport io\n\n# Default Serial settings\nPORT = \"COM4\"\nBAUDRATE = 921600\nTIMEOUT = 1\n\n# Image types\nYUV = 0\nJPEG = 1\n\nYUV_SIZE = [96, 96]\n\n# JPEG Compressions\nCompression_Off = 0\nCompression_... | [
[
"numpy.uint8",
"numpy.load",
"numpy.array",
"numpy.save"
]
] |
OscarFlores-IFi/CDINP19 | [
"7fb0cb6ff36b9a10bcfa0772b172c5e49996df48",
"7fb0cb6ff36b9a10bcfa0772b172c5e49996df48"
] | [
"code/p7.py",
"code/p3.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Feb 25 09:37:23 2019\n\n@author: if715029\n\"\"\"\n\n# limpieza de base de datos y manejod de texto\nimport pandas as pd\nimport string\nfrom datetime import datetime\n\n#%% Importar tabla\ndirty = pd.read_csv('../data//dirty_data_v3.csv', encoding='latin-1')\n\n#%% ... | [
[
"pandas.read_csv"
],
[
"pandas.read_excel",
"numpy.arange",
"pandas.DataFrame",
"numpy.sort",
"scipy.spatial.distance.pdist",
"numpy.mean",
"numpy.argsort",
"scipy.spatial.distance.squareform"
]
] |
buildist/VideoEnhancer | [
"0d38c4892c65273a273ed23d3a8cce03f76f92f9"
] | [
"DAIN_extensions/InterpolationCh/setup.py"
] | [
"#!/usr/bin/env python3\nimport os\nimport torch\n\nfrom setuptools import setup, find_packages\nfrom torch.utils.cpp_extension import BuildExtension, CUDAExtension\n\ncxx_args = ['-std=c++11']\n\nnvcc_args = [\n '-gencode', 'arch=compute_50,code=sm_50',\n '-gencode', 'arch=compute_52,code=sm_52',\n '-genc... | [
[
"torch.utils.cpp_extension.CUDAExtension"
]
] |
christopher-salomon-smith/vip-mab | [
"61a120254673b54770b744b19e18d28ffff15f1f",
"61a120254673b54770b744b19e18d28ffff15f1f"
] | [
"code/KL_UCB/UCB1.py",
"code/resilient-bandit/malicious_bernoulli.py"
] | [
"import numpy as np\nimport scipy.stats as sps\nimport matplotlib.pyplot as plt\n\n\nclass UCB1:\n ''' Representation of a single agent bandit problem and a method to run the UCB1 algorithm on this problem\n\n Attributes\n ----------\n T: The number of time steps the UCB1 algorithm will run ... | [
[
"numpy.log",
"numpy.asarray",
"matplotlib.pyplot.plot",
"numpy.argmax",
"matplotlib.pyplot.show",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.log",
"matplotlib.pyplot.subplots",
"numpy.cumsum",
"numpy.argmax",
"numpy.mean",
"numpy.argmin",
"numpy.transpose",
... |
vlad-user/parallel-tempering | [
"42ebecdea2a597e706382462dc90aab7e7ca098f"
] | [
"simulator/simulator.py"
] | [
"\"\"\"A class that performs simulations.\"\"\"\nimport sys\nimport os\nimport gc\nimport json\nfrom time import time\nimport math\n\nimport tensorflow as tf\nimport sklearn\nimport numpy as np\n\nfrom simulator.graph.simulator_graph import SimulatorGraph\nfrom simulator import simulator_utils as s_utils\nfrom simu... | [
[
"sklearn.utils.shuffle",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.global_variables",
"tensorflow.variables_initializer",
"tensorflow.is_variable_initialized",
"tensorflow.ConfigProto",
"numpy.mean"
]
] |
hebafer/sqlflow | [
"d77416ae1dced412728783abee2d1008720d51f9",
"d77416ae1dced412728783abee2d1008720d51f9"
] | [
"python/runtime/xgboost/evaluate.py",
"python/runtime/xgboost/predict.py"
] | [
"# Copyright 2020 The SQLFlow Authors. All rights reserved.\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 ap... | [
[
"numpy.array"
],
[
"numpy.array"
]
] |
gzaraunitn/TA3N | [
"d83ae5d9c8f4452ff69dd9002bb4016a695a4be8"
] | [
"dataset.py"
] | [
"import torch.utils.data as data\n\nimport os\nimport os.path\nimport numpy as np\nfrom numpy.random import randint\nimport torch\n\nfrom colorama import init\nfrom colorama import Fore, Back, Style\n\nimport random\nfrom os import listdir\nfrom os.path import join, splitext\n\nimport numpy as np\nimport torch\nimp... | [
[
"torch.load",
"numpy.ones",
"numpy.append",
"torch.stack",
"torch.utils.data.append",
"numpy.zeros",
"numpy.random.randint"
]
] |
naotohori/cafysis | [
"9d8534121c01ea75ae965cf39a1e307052ff8523",
"9d8534121c01ea75ae965cf39a1e307052ff8523"
] | [
"mtx_coord_transform.py",
"20130630_1.py"
] | [
"#!/usr/bin/env python\n# coding: UTF-8\n'''\nCreated on 2013/06/28 (based on matrix_transform_make.py)\n@author: Naoto Hori\n'''\n\nimport numpy as np\nfrom numpy import identity, dot\nfrom math import cos, sin\n\nclass mtx_crd_transform():\n def __init__(self):\n self.mtx = identity(4)\n \n de... | [
[
"numpy.concatenate",
"numpy.dot",
"numpy.identity",
"numpy.empty"
],
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.clf",
"numpy.zeros",
"numpy.histogram2d"
]
] |
jakelishman/qiskit-experiments | [
"f4d23506ac5ea4af22721496d8d5c9bcb4562916"
] | [
"test/test_qubit_spectroscopy.py"
] | [
"# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2021.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any modifications or ... | [
[
"numpy.exp",
"numpy.linspace"
]
] |
Quansight/pandas | [
"511fd46e68b12317eb925d4bf7405c2d33daba6c",
"511fd46e68b12317eb925d4bf7405c2d33daba6c",
"511fd46e68b12317eb925d4bf7405c2d33daba6c",
"511fd46e68b12317eb925d4bf7405c2d33daba6c",
"511fd46e68b12317eb925d4bf7405c2d33daba6c",
"4071dde86e33434e1bee8304fa62074949f813cc"
] | [
"pandas/tests/io/excel/test_writers.py",
"pandas/core/internals/construction.py",
"pandas/core/aggregation.py",
"asv_bench/benchmarks/indexing.py",
"pandas/tests/base/test_ops.py",
"pandas/tests/scalar/timestamp/test_arithmetic.py"
] | [
"from datetime import date, datetime, timedelta\nfrom functools import partial\nfrom io import BytesIO\nimport os\n\nimport numpy as np\nimport pytest\n\nimport pandas.util._test_decorators as td\n\nimport pandas as pd\nfrom pandas import DataFrame, Index, MultiIndex, get_option, set_option\nimport pandas._testing ... | [
[
"pandas.read_excel",
"pandas.io.excel.ExcelFile",
"pandas.MultiIndex.from_tuples",
"pandas.DataFrame",
"numpy.random.random_sample",
"numpy.random.randn",
"numpy.random.sample",
"pandas._testing.assert_frame_equal",
"numpy.random.randint",
"pandas.Index",
"pandas._testi... |
jainyk/package-outlier | [
"f1f8206f0d01ad7bf1b25f2cf551381ebe0ba1ed"
] | [
"testing methods/testing_angle_based.py"
] | [
"import scipy\nimport scipy.stats as ss\nimport numpy as np\nimport matplotlib\nimport pandas as pd\nimport random\nimport math\n\n\ndef iqr_threshold_method(scores, margin):\n q1 = np.percentile(scores, 25, interpolation='midpoint')\n q3 = np.percentile(scores, 75, interpolation='midpoint')\n iqr = q3-q1\... | [
[
"numpy.random.seed",
"numpy.array_equal",
"numpy.random.multivariate_normal",
"numpy.subtract",
"numpy.arccos",
"numpy.percentile",
"numpy.linalg.norm",
"numpy.concatenate",
"numpy.var",
"numpy.array"
]
] |
ccp4/metrix_ml | [
"61646355d9218d590b99937cf289713763df1d23",
"61646355d9218d590b99937cf289713763df1d23"
] | [
"metrix_ml/utils/ColumnTransformation.py",
"metrix_ml/pre_processing/feature_pairplot_plotting.py"
] | [
"import pandas as pd\nimport os\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom datetime import datetime\nfrom sklearn.base import BaseEstimator, TransformerMixin\n\nclass ColumnTransformation(BaseEstimator, TransformerMixin):\n '''A class to run various column transformation steps to prepare the\n ... | [
[
"numpy.exp"
],
[
"matplotlib.pyplot.gca",
"matplotlib.pyplot.tight_layout",
"pandas.read_csv",
"scipy.stats.pearsonr",
"sklearn.model_selection.train_test_split"
]
] |
agnes-yang/PytorchNetHub | [
"e6bcb57b8ffb61b53ebdb9a09f6b25e516b4efc7",
"e6bcb57b8ffb61b53ebdb9a09f6b25e516b4efc7"
] | [
"Yolov1_pytorch/models/net.py",
"Yolov1_pytorch/utils/predictUtils.py"
] | [
"#encoding:utf-8\nimport torch.nn as nn\nimport torch.utils.model_zoo as model_zoo\nimport math\nimport torch.nn.functional as F\n'''\n只用了vgg16方法\n'''\n\n__all__ = [\n 'VGG', 'vgg11', 'vgg11_bn', 'vgg13', 'vgg13_bn', 'vgg16', 'vgg16_bn',\n 'vgg19_bn', 'vgg19',\n]\n\n\nmodel_urls = {\n 'vgg11': 'https://dow... | [
[
"torch.nn.Sequential",
"torch.nn.Dropout",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.functional.sigmoid",
"torch.nn.MaxPool2d",
"torch.rand",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.utils.model_zoo.load_url",
"torch.autograd.Variable"
],
[
"numpy.m... |
CIDARLAB/genetic-circuit-partitioning | [
"b748e111e100eecc70b5978d6133ba816b8d7f5f",
"b748e111e100eecc70b5978d6133ba816b8d7f5f"
] | [
"2021.4/bin/test.py",
"2021.4/bin/plot_partition.py"
] | [
"import timeit\nfrom copy import deepcopy\n# import genetic_partition_test as gp \nimport networkx as nx\nimport numpy as np\nimport ujson\n\nm1 = np.zeros(shape=(6,6))\nm2 = np.array([[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]])\n\nfor i in range(m2.shape[0]):\n\tfor j in range(m2.shape[1]):\n\t\tm1[i][j] = m2... | [
[
"numpy.array",
"numpy.zeros"
],
[
"matplotlib.pyplot.show"
]
] |
jarilq/aura-core | [
"7880ed265396bf8c89b783835853328e6d7d1589"
] | [
"tools/auralink/current.py"
] | [
"import math\n\nfrom props import root, getNode\n\nairdata_node = getNode('/sensors/airdata', True)\nfilter_node = getNode('/filters/filter[0]', True)\npilot_node = getNode('/sensors/pilot_input', True)\nstatus_node = getNode('/status', True)\npos_node = getNode(\"/position\", True)\nvel_node = getNode(\"/velocity\... | [
[
"scipy.interpolate.interp1d"
]
] |
shashwat9kumar/datasets | [
"99b055408025f8e934fcbb0fc054488aa087ebfb",
"99b055408025f8e934fcbb0fc054488aa087ebfb",
"99b055408025f8e934fcbb0fc054488aa087ebfb",
"99b055408025f8e934fcbb0fc054488aa087ebfb",
"99b055408025f8e934fcbb0fc054488aa087ebfb",
"99b055408025f8e934fcbb0fc054488aa087ebfb",
"99b055408025f8e934fcbb0fc054488aa087ebf... | [
"tensorflow_datasets/scripts/documentation/doc_utils.py",
"tensorflow_datasets/image_classification/bigearthnet.py",
"tensorflow_datasets/image_classification/cars196.py",
"tensorflow_datasets/core/utils/image_utils.py",
"tensorflow_datasets/object_detection/waymo_open_dataset.py",
"tensorflow_datasets/te... | [
"# coding=utf-8\n# Copyright 2021 The TensorFlow Datasets 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 ... | [
[
"tensorflow.compat.v2.io.gfile.exists"
],
[
"numpy.clip"
],
[
"tensorflow.compat.v2.io.gfile.GFile",
"tensorflow.compat.v2.io.gfile.listdir"
],
[
"tensorflow.compat.v2.image.encode_jpeg",
"tensorflow.compat.v2.image.decode_png"
],
[
"tensorflow.compat.v2.data.TFRecordDa... |
FedeMPouzols/cngi_prototype | [
"421a99c460f4092b79120f5bec122de7ce9b8b96",
"421a99c460f4092b79120f5bec122de7ce9b8b96"
] | [
"cngi/vis/timeaverage.py",
"ngcasa/arachne/_imaging_utils/_dask_utils.py"
] | [
"# Copyright 2019 AUI, Inc. Washington DC, USA\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... | [
[
"numpy.full"
],
[
"pandas.DataFrame"
]
] |
MaayanLab/jupyter-template-catalog | [
"212b455e62d49f04dcee73bb6eeb5312b71ba8ef",
"212b455e62d49f04dcee73bb6eeb5312b71ba8ef"
] | [
"appyters/STEAP_post_processing_analysis/scripts/convert_output_to_dataframe.py",
"appyters/scRNA_seq/utils.py"
] | [
"# to allow importing to work correctly (in a dirty way)\nimport os\nimport sys\nimport inspect\nfilepath = os.path.abspath(inspect.getfile(inspect.currentframe()))\ncurrentdir = os.path.dirname(filepath)\nparentdir = os.path.dirname(currentdir)\nsys.path.insert(0, parentdir)\n\nimport constants\nimport pandas as p... | [
[
"pandas.concat",
"pandas.merge",
"pandas.read_csv"
],
[
"pandas.concat",
"pandas.read_csv",
"numpy.min",
"numpy.issubdtype",
"numpy.repeat",
"pandas.DataFrame",
"matplotlib.pyplot.savefig",
"matplotlib.colorbar.ColorbarBase",
"numpy.ceil",
"matplotlib.pyplot... |
lhmtriet/PUMiner_MSR | [
"cbaa126bc56b0968f4b709374c59b87f16b6811d"
] | [
"Code/analysis/psf_baseline/predict.py"
] | [
"import pandas as pd\nimport sanalytics.estimators.pu_estimators as pu\nfrom gensim.models.doc2vec import Doc2Vec\nimport sanalytics.evaluation.evaluation_metric as see\nfrom progressbar import progressbar\nimport sanalytics.algorithms.utils as sau\nfrom time import time\nimport numpy as np\n\n## Read threshold\nar... | [
[
"pandas.read_parquet",
"pandas.DataFrame"
]
] |
yoheikikuta/robust_physical_perturbations | [
"9c3d4da7fad727a531da7437bf3823bd56ac91c3"
] | [
"lisa-cnn-attack/cleverhans/attacks.py"
] | [
"from abc import ABCMeta\nimport numpy as np\nfrom six.moves import xrange\nimport warnings\n\n\nclass Attack(object):\n\n \"\"\"\n Abstract base class for all attack classes.\n \"\"\"\n __metaclass__ = ABCMeta\n\n def __init__(self, model, back='tf', sess=None):\n \"\"\"\n :param model... | [
[
"tensorflow.clip_by_value",
"tensorflow.reduce_max",
"tensorflow.equal",
"tensorflow.placeholder",
"tensorflow.abs",
"tensorflow.square",
"tensorflow.py_func"
]
] |
Maluuba/bokeh | [
"1e6695b7001dd4440a035754d4e085c317ae1122"
] | [
"bokeh/models/tests/test_sources.py"
] | [
"from __future__ import absolute_import\n\nimport unittest\nfrom unittest import skipIf\nimport warnings\n\nimport numpy as np\ntry:\n import pandas as pd\n is_pandas = True\nexcept ImportError as e:\n is_pandas = False\n\nfrom bokeh.models.sources import DataSource, ColumnDataSource\nfrom bokeh.util.seria... | [
[
"numpy.arange",
"numpy.array_equal",
"pandas.DataFrame",
"numpy.ones"
]
] |
SURGroup/UncertaintyQuantification | [
"a94c8db47d07134ea2b3b0a3ca53ca818532c3e6",
"a94c8db47d07134ea2b3b0a3ca53ca818532c3e6",
"a94c8db47d07134ea2b3b0a3ca53ca818532c3e6",
"a94c8db47d07134ea2b3b0a3ca53ca818532c3e6"
] | [
"docs/code/sampling/latin_hypercube/plot_latin_hypercube_simple.py",
"src/UQpy/sampling/mcmc/DRAM.py",
"docs/code/sampling/adaptive_kriging/adaptive_kriging_normal.py",
"docs/code/inference/mle/plot_learn_distribution_model.py"
] | [
"\"\"\"\n\nLatin Hypercube Sampling\n==================================\n\nThis example shows the use of the Latin Hypercube sampling class. In particular:\n\"\"\"\n\n# %% md\n#\n# - How to define the Latin Hypercube sampling method supported by UQpy\n# - How to use different sampling criteria\n# - How to plot the ... | [
[
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
],
[
"numpy.log",
"numpy.eye",
"numpy.matmul",
"numpy.tile",
"numpy.zeros_like",
"numpy.exp",
"numpy.zeros"
],
[
"matplotlib.pyplot.legend",
"matpl... |
marineLM/Impute_then_Regress | [
"d59f61dab8008b852c6c613806797614cf6184dd"
] | [
"python/launch_all.py"
] | [
"'''\nDefines:\n - the paramaters of data simulations, \n - the list of methods to compare and their hyperparameters,\nAnd launches all experiments.\n'''\n\nimport pandas as pd\nimport argparse\nfrom run_all import run\n\nparser = argparse.ArgumentParser()\nparser.add_argument('mdm', help='missing data mechanism',\... | [
[
"pandas.concat",
"pandas.DataFrame"
]
] |
WingsBrokenAngel/MSR-VTT-DataCleaning | [
"4eb2f4736e9b606e9296487c3b70351b2cde1dfa"
] | [
"msrvtt_model/train_model.py"
] | [
"# -*- coding: utf-8 -*-\n# Author: Haoran Chen\n# Date: 2019-10-07\nimport tensorflow as tf\nimport pickle\nimport numpy as np\nimport sys\nfrom pprint import pprint\nfrom collections import defaultdict\nimport time\nsys.path.append('..')\nfrom utils import *\n\n\nnp.random.seed(42)\ndata_dict = None\nmodel = None... | [
[
"numpy.expand_dims",
"numpy.random.seed",
"numpy.arange",
"numpy.squeeze",
"tensorflow.train.get_or_create_global_step",
"tensorflow.trainable_variables",
"numpy.random.shuffle",
"tensorflow.global_variables_initializer",
"numpy.mean",
"tensorflow.app.flags.DEFINE_string",
... |
CurryYuan/X-Trans2Cap | [
"c78a27209f14fcbbec74fe8b5edc06faea2e7d44",
"c78a27209f14fcbbec74fe8b5edc06faea2e7d44"
] | [
"lib/reference_dataset.py",
"lib/pointnet2/pytorch_utils.py"
] | [
"import os\nimport json\nimport pickle\nimport numpy as np\nfrom itertools import chain\nfrom collections import Counter\nfrom torch.utils.data import Dataset\n\nfrom lib.config import CONF\nfrom data.scannet.model_util_scannet import ScannetDatasetConfig\n\n# data setting\nDC = ScannetDatasetConfig()\n\n\nclass Re... | [
[
"numpy.arange",
"numpy.array",
"numpy.zeros"
],
[
"torch.nn.init.constant_",
"torch.nn.Linear",
"torch.nn.ReLU"
]
] |
ssalonen/financedatahoarder | [
"c24c856837b0114dce7ecd7a1d1ffef66e2e6c62"
] | [
"financedatahoarder/scraper/scrapers/parsers/morningstar_overview.py"
] | [
"# -*- coding: utf-8 -*-\nimport scrapy\nimport pandas as pd\nfrom lxml import html\nfrom lxml.html.clean import Cleaner\nfrom pytz import UTC, timezone, FixedOffset\nimport logging\nfrom financedatahoarder.scraper.scrapers.items import OverviewKeyStats\n\nOSUUDEN_ARVO = 'Osuuden arvo' # Fund\nLOPETUSHINTA = 'Lope... | [
[
"pandas.to_datetime",
"pandas.read_html"
]
] |
alexarnimueller/MolGAN | [
"cfc9902c49c47995eab40381082a8b6acf5f0525"
] | [
"utils/utils.py"
] | [
"import numpy as np\n\nfrom sklearn.metrics import classification_report as sk_classification_report\nfrom sklearn.metrics import confusion_matrix\n\nfrom rdkit import Chem\nfrom rdkit.Chem import AllChem\nfrom rdkit.Chem import Draw\n\nfrom .molecular_metrics import MolecularMetrics\n\n\ndef strip_salt(mols, stere... | [
[
"numpy.argmax",
"numpy.vstack"
]
] |
luanft/lstm-cnn-model | [
"dde8121f8fc0f9c4745759e07af301c3b60214da"
] | [
"charts.py"
] | [
"import os\nimport numpy as np\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nfrom matplotlib.axes import Axes\nfrom matplotlib.figure import Figure\nfrom mplfinance.original_flavor import candlestick2_ohlc\nfrom util import convert_to_list, decode_img\nfrom setting import DPI, IMG_H, I... | [
[
"matplotlib.use",
"matplotlib.pyplot.cla",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.close",
"numpy.array"
]
] |
mark-koren/AdaptiveStressTestingToolbox | [
"60ad5d590c949a53ab0fb004fbf42717e970f6a1"
] | [
"examples/hifi/EnvironmentPrediction/Predictions/SensorMeasurements/GroundSeg.py"
] | [
"'''Implementation of Random Markov Field ground segmentation described in:\n\nG. Postica, A. Romanoni, and M. Matteucci. Robust moving objects detection in LiDAR\ndata exploiting visual cues. In IEEE/RSJ International Conference on Intelligent Robots and\nSystems (IROS), pages 1093-1098, 2016.\n\nINPUT: point_clou... | [
[
"numpy.nanmax",
"numpy.isnan",
"numpy.vstack",
"numpy.ndarray.tolist",
"numpy.zeros",
"numpy.empty"
]
] |
sberbank-ai/ru-prompts | [
"4eeedae92cb5234c70adc787ace7cfceb76b0be0"
] | [
"ruprompts/callbacks.py"
] | [
"import os\n\nimport torch\nfrom transformers import TrainerControl, TrainerState\nfrom transformers.file_utils import WEIGHTS_NAME\nfrom transformers.modeling_utils import PreTrainedModel\nfrom transformers.trainer_callback import TrainerCallback\nfrom transformers.trainer_utils import PREFIX_CHECKPOINT_DIR\nfrom ... | [
[
"torch.save",
"torch.load"
]
] |
onepanelio/ensembleObjectDetection | [
"ddc742b553ba7e18d5dcdcf30f61f5858f369d3a"
] | [
"TestTimeAugmentation/predict_batch_retinanet.py"
] | [
"# USAGE\n# python predict_batch.py --model output.h5 --labels logos/retinanet_classes.csv\n#\t--input logos/images --output output\n\n# import the necessary packages\nfrom keras_retinanet.utils.image import preprocess_image\nfrom keras_retinanet.utils.image import read_image_bgr\nfrom keras_retinanet.utils.image i... | [
[
"numpy.expand_dims"
]
] |
flylo/spotify-tensorflow | [
"0514eba60148278c2093c50eb4801575710f2988"
] | [
"tests/tf_schema_utils_test.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# Copyright 2017-2019 Spotify AB.\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.SparseFeature",
"tensorflow.FixedLenFeature",
"tensorflow.VarLenFeature"
]
] |
momenator/spine_uda | [
"3d6c9cd2431bcdb084d7603d0cc3101163b0902c",
"3d6c9cd2431bcdb084d7603d0cc3101163b0902c"
] | [
"train_refine.py",
"train_shape_aware.py"
] | [
"import glob\nimport random\nimport os\nos.environ['CUDA_VISIBLE_DEVICES'] = '2'\nimport torch\nimport torch.nn as nn\nimport numpy as np\nfrom torch.utils.data.dataset import random_split\nfrom torch.utils.data import DataLoader\nimport torch.optim as optim\nimport torch.optim.lr_scheduler as lr_scheduler\nimport ... | [
[
"torch.max",
"numpy.random.seed",
"torch.manual_seed",
"torch.round",
"torch.utils.data.DataLoader",
"torch.nn.BCELoss",
"numpy.mean",
"torch.no_grad",
"torch.nn.L1Loss"
],
[
"torch.max",
"numpy.random.seed",
"torch.manual_seed",
"torch.round",
"torch.ut... |
aptsunny/SinglePathOneShot | [
"07ae9d6d4ecc2ef4e1f4a8b4aaff0768ab54f57a"
] | [
"src/Search_cifar/flops.py"
] | [
"import torch\nimport torch.nn as nn\n\n\nclass Shufflenet(nn.Module):\n\n def __init__(self, inp, oup, mid_channels, *, ksize, stride):\n super(Shufflenet, self).__init__()\n self.stride = stride\n assert stride in [1, 2]\n assert ksize in [3, 5, 7]\n\n self.base_mid_channel =... | [
[
"torch.nn.Sequential",
"torch.nn.Dropout",
"torch.nn.init.constant_",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.AvgPool2d",
"torch.nn.init.normal_",
"torch.rand",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
JackLidge/FPLTransfers | [
"d458770b658a5dedfe7379871afc424949427cb5"
] | [
"FPLTransfers/FPLTransfers.py"
] | [
"import asyncio\nimport aiohttp\nimport pandas\nfrom concurrent.futures import ThreadPoolExecutor\nfrom fpl import FPL\nfrom fpl.constants import API_URLS\nfrom fpl.utils import fetch, logged_in\n\nclass FPLTransfers():\n '''\n '''\n \n def __init__(self, email=None, password=None):\n '''\n ... | [
[
"pandas.DataFrame.from_records",
"pandas.concat",
"pandas.DataFrame"
]
] |
inspur-hsslab/iMIX | [
"99898de97ef8b45462ca1d6bf2542e423a73d769",
"99898de97ef8b45462ca1d6bf2542e423a73d769",
"99898de97ef8b45462ca1d6bf2542e423a73d769",
"99898de97ef8b45462ca1d6bf2542e423a73d769"
] | [
"imix/models/vqa_models/oscar/modeling/oscarplus_pretrain.py",
"imix/data/infocomp/visual_dialog_infocpler.py",
"imix/data/vqadata/answerprocessor.py",
"imix/solver/optimization.py"
] | [
"from imix.models.builder import VQA_MODELS\nfrom imix.models.vqa_models.base_model import BaseModel\nfrom copy import deepcopy\nfrom pytorch_transformers import BertConfig\nfrom .modeling_bert import BertImgForPreTraining\n\nfrom imix.utils.registry import Registry\nfrom collections import OrderedDict\nimport torc... | [
[
"torch.stack"
],
[
"torch.LongTensor",
"torch.Tensor",
"torch.cat"
],
[
"torch.zeros"
],
[
"torch.nn.utils.clip_grad_norm_",
"torch.zeros_like",
"torch.cos"
]
] |
edouardoyallon/kymatio | [
"eeed6ac9e59bc6645b90fc4e7ff8ce4f693887bc",
"eeed6ac9e59bc6645b90fc4e7ff8ce4f693887bc",
"eeed6ac9e59bc6645b90fc4e7ff8ce4f693887bc"
] | [
"kymatio/scattering2d/backend/torch_backend.py",
"kymatio/scattering3d/backend/numpy_backend.py",
"kymatio/scattering2d/frontend/torch_frontend.py"
] | [
"# Authors: Edouard Oyallon, Sergey Zagoruyko\n\nimport torch\nfrom torch.nn import ReflectionPad2d\nfrom collections import namedtuple\n\nBACKEND_NAME = 'torch'\n\ndef iscomplex(x):\n return x.size(-1) == 2\n\ndef isreal(x):\n return x.size(-1) == 1\n\nclass Pad(object):\n def __init__(self, pad_size, inp... | [
[
"torch.nn.ReflectionPad2d",
"torch.cat",
"torch.zeros_like",
"torch.unsqueeze",
"torch.ifft",
"torch.fft",
"torch.irfft"
],
[
"numpy.expand_dims",
"numpy.sqrt",
"numpy.abs",
"numpy.multiply",
"numpy.ascontiguousarray",
"numpy.fft.fftn",
"numpy.concatenat... |
andreamusso96/RSE-Distance | [
"4f1ec9d25f9de71d258de15c55491c30a3e76d05"
] | [
"RandomWalkSimulatorCUDA.py"
] | [
"import cupy as cp # noqa\nimport cupyx.scipy.sparse as sparse # noqa\nimport numpy as np\nfrom graph_tool.spectral import adjacency\nfrom tqdm import tqdm\nimport torch\nfrom torch.utils.dlpack import to_dlpack\n\n\nclass RandomWalkSimulator:\n \"\"\"\n\n The class RandomWalkSimulator is designed to run a fa... | [
[
"numpy.ndarray.flatten",
"torch.utils.dlpack.to_dlpack",
"torch.multinomial"
]
] |
EfficientAI/efficient_cv | [
"e308f229e4d99da86ad56f87f3a78b2c81f27ca5"
] | [
"model_prototype/utils/data_transformation_utils.py"
] | [
"import numpy as np\nfrom scipy.signal import resample\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.preprocessing import MinMaxScaler\nfrom sklearn.preprocessing import RobustScaler\n\n\ndef upsample_signal(data, sampling_factor, sampler=None):\n \"\"\"\n data is a time series sequence(nd_a... | [
[
"sklearn.preprocessing.RobustScaler",
"numpy.random.multivariate_normal",
"scipy.signal.resample",
"sklearn.preprocessing.StandardScaler",
"numpy.array",
"sklearn.preprocessing.MinMaxScaler"
]
] |
bossauh/vocale | [
"5d6c515a8ab82076e37039846fc3d2e676c3a0e4"
] | [
"vocale/recognizer.py"
] | [
"import asyncio\nimport json\nimport os\nimport time\nimport warnings\nimport wave\nfrom queue import Queue\nfrom typing import Callable\n\nimport numpy as np\nimport pvporcupine\nimport sounddevice as sd\nimport vosk\nfrom fluxhelper import osInterface\nfrom speech_recognition import AudioFile, Recognizer, Unknown... | [
[
"tensorflow.keras.models.load_model",
"numpy.fft.rfft",
"numpy.round",
"numpy.frombuffer",
"numpy.array"
]
] |
juliuskunze/eve | [
"628ad445397a9872849c9c25b4e841ba8130ea39"
] | [
"wmt/main.py"
] | [
"# Copyright 2021 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or a... | [
[
"tensorflow.config.experimental.set_visible_devices"
]
] |
mfkiwl/PW_from_GPS | [
"fa0b0b9e1325a055ce884f79c14d24148348886b"
] | [
"aux_gps.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Jun 10 14:33:19 2019\n\n@author: ziskin\n\"\"\"\nfrom PW_paths import work_yuval\nfrom pathlib import Path\ncwd = Path().cwd()\n# TODO: build curve fit tool with various function model: power, sum of sin ...\n# TODO: no need to build it, use l... | [
[
"sklearn.metrics.explained_variance_score",
"matplotlib.pyplot.legend",
"matplotlib.patheffects.Normal",
"pandas.read_excel",
"pandas.to_datetime",
"pandas.Series",
"numpy.sqrt",
"matplotlib.ticker.AutoMinorLocator",
"matplotlib.pyplot.rc",
"numpy.cumsum",
"pandas.DataF... |
microsoft/goodpoints | [
"d1b1e30a49bfe24feeca73421bc47f5f45572908",
"d1b1e30a49bfe24feeca73421bc47f5f45572908",
"d1b1e30a49bfe24feeca73421bc47f5f45572908"
] | [
"examples/compress/util_sample.py",
"examples/gkt/submit_gkt_jobs.py",
"examples/compress/construct_st_coresets.py"
] | [
"\r\nimport numpy as np\r\nimport numpy.random as npr\r\nimport numpy.linalg as npl\r\nimport os\r\nimport pickle as pkl\r\n\r\n'''\r\nFile containing helper functions for details about target P and\r\ndrawing samples / loading mcmc samples from file\r\n'''\r\n######## functions related to setting P and sampling fr... | [
[
"numpy.log2",
"numpy.sqrt",
"numpy.linspace",
"numpy.arange",
"numpy.vstack",
"numpy.eye",
"numpy.cos",
"numpy.ones",
"numpy.sin",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.random.default_rng"
],
[
"numpy.array"
],
[
"numpy.arange",
"... |
vivid-k/Global-Encoding | [
"9105925f371cf427083625100497a98ad8fcdbdf"
] | [
"models/SubLayers.py"
] | [
"''' Define the sublayers in encoder/decoder layer '''\nimport numpy as np\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom models.Modules import ScaledDotProductAttention\n\n__author__ = \"Yu-Hsiang Huang\"\n\nclass MultiHeadAttention(nn.Module):\n ''' Multi-Head Attention module '''\n\n def __i... | [
[
"torch.nn.Dropout",
"numpy.sqrt",
"numpy.power",
"torch.nn.init.xavier_normal_",
"torch.nn.LayerNorm",
"torch.nn.Linear",
"torch.nn.Conv1d"
]
] |
epiviz/parser | [
"bba301db40458b6666653c77a446db8778ee07f8"
] | [
"src/epivizFileParser/GtfParsedFile.py"
] | [
"import pysam\nfrom .utils import toDataFrame\nfrom .Helper import get_range_helper\nimport pandas as pd\nfrom aiocache import cached, Cache\nfrom aiocache.serializers import JsonSerializer, PickleSerializer\n\n__author__ = \"Jayaram Kancherla\"\n__copyright__ = \"jkanche\"\n__license__ = \"mit\"\n\n\nclass GtfPars... | [
[
"pandas.read_csv",
"pandas.DataFrame"
]
] |
empyriumz/TAPER-EHR | [
"fc89a27730a6eb6d4b321832e017c7e9662fa2e3"
] | [
"model/seq_model.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom base import BaseModel\nfrom model.mem_transformer import MemTransformerLM\nfrom model.gru_ae import *\nimport numpy as np\nclass Seq_Attention(BaseModel):\n def __init__(\n self,\n transformer_state_path,\n num_class... | [
[
"torch.nn.Dropout",
"torch.sigmoid",
"torch.nn.functional.log_softmax",
"torch.load",
"torch.cat",
"torch.nn.Linear",
"torch.no_grad",
"torch.nn.ReLU"
]
] |
NEUdeep/TileDetection | [
"77b5ef4bb4db29f5ffe6a6fa9f87b4bfe8516e4c",
"f453ac868de195a7859b9bf07c813e46eb35d2d0"
] | [
"mmdet/core/evaluation/mean_ap.py",
"utils/util.py"
] | [
"from multiprocessing import Pool\n\nimport mmcv\nimport numpy as np\nfrom mmcv.utils import print_log\nfrom terminaltables import AsciiTable\n\nfrom .bbox_overlaps import bbox_overlaps\nfrom .class_names import get_classes\n\n\ndef average_precision(recalls, precisions, mode='area'):\n \"\"\"Calculate average p... | [
[
"numpy.hstack",
"numpy.minimum",
"numpy.maximum",
"numpy.arange",
"numpy.cumsum",
"numpy.empty",
"numpy.ones",
"numpy.finfo",
"numpy.zeros_like",
"numpy.any",
"numpy.where",
"numpy.argsort",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.vstack"
... |
TUDelft-DataDrivenControl/FRED | [
"f837f4a126e693519fa5ab7c913cb26570ca5278"
] | [
"tools/mwe.py"
] | [
"from fenics import *\nfrom fenics_adjoint import *\nimport numpy as np\nfrom pyadjoint import Block\nfrom pyadjoint.overloaded_function import overload_function\n\n\ndef get_coefficient(func, coord1, coord2, gradient=False, grad_idx=None):\n return func(coord1, coord2)\n\n\nbackend_get_coefficient = get_coeffic... | [
[
"numpy.random.rand",
"numpy.isin"
]
] |
larrybradley/numpy | [
"4e11da37bf94a0f496f236e9706205ac81683058",
"4e11da37bf94a0f496f236e9706205ac81683058"
] | [
"benchmarks/benchmarks/bench_avx.py",
"benchmarks/benchmarks/bench_core.py"
] | [
"from __future__ import absolute_import, division, print_function\n\nfrom .common import Benchmark\n\nimport numpy as np\n\navx_ufuncs = ['sqrt',\n 'absolute',\n 'reciprocal',\n 'square',\n 'rint',\n 'floor',\n 'ceil' ,\n 'tr... | [
[
"numpy.seterr",
"numpy.ones"
],
[
"numpy.diag",
"numpy.linspace",
"numpy.vstack",
"numpy.tril",
"numpy.hstack",
"numpy.arange",
"numpy.eye",
"numpy.packbits",
"numpy.count_nonzero",
"numpy.triu",
"numpy.zeros",
"numpy.diagflat",
"numpy.identity",
... |
sarvex/TFace | [
"490cf90a1f042b86d7d03042f26d0a7cf6b1f0c0",
"490cf90a1f042b86d7d03042f26d0a7cf6b1f0c0"
] | [
"torchkit/head/localfc/cosface.py",
"torchkit/backbone/model_mobilefacenet.py"
] | [
"from __future__ import print_function\nfrom __future__ import division\nimport math\nimport torch\nimport torch.nn as nn\nfrom torch.nn import Parameter\nfrom torchkit.head.localfc.common import calc_logits\n\n\nclass CosFace(nn.Module):\n \"\"\" Implement of CosFace (https://arxiv.org/abs/1801.09414)\n\n \"... | [
[
"torch.FloatTensor",
"torch.nn.init.normal_"
],
[
"torch.nn.PReLU",
"torch.nn.Conv2d",
"torch.nn.Sequential",
"torch.nn.BatchNorm2d"
]
] |
Durabun/QWell | [
"746c6e53441556d28bdbdeb6d07561e9dd75842a"
] | [
"index_plot.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\nevenR = np.array([1.212,3.368])\noddR = np.array([2.381])\nS = evenR.size+oddR.size\nprop = np.zeros(S)\ntunn = np.zeros(S)\ni=0\nj=1\na=0.469\n\ndef rad(x):\n\treturn np.sqrt((1.1*np.pi)**2-x**2)\n\t\nprint (S)\n\nprint (prop)\nprint (tunn)\n\nwhile i< evenR.... | [
[
"numpy.sqrt",
"numpy.arange",
"numpy.cos",
"numpy.sin",
"numpy.exp",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.show"
]
] |
sevagh/Music-Separation-TF | [
"1e21d3802b7df8f6c25778bca6a6c576f805fc4a"
] | [
"algorithms/umx.py"
] | [
"import torch\nimport numpy as np\nimport argparse\nimport soundfile as sf\nimport norbert\nimport json\nfrom pathlib import Path\nimport scipy.signal\nimport resampy\nimport warnings\nimport tqdm\nfrom contextlib import redirect_stderr\nimport io\n\nimport os\nimport sys\n\nvendor_path = os.path.join(\n os.path... | [
[
"torch.hub.load",
"torch.load",
"torch.tensor",
"torch.cuda.is_available",
"torch.device",
"numpy.repeat",
"numpy.array",
"numpy.zeros"
]
] |
cartertroy/datarobot-user-models | [
"d2c2b47e0d46a0ce8d07f1baa8d57155a829d2fc"
] | [
"model_templates/inference/python3_keras_vizai_joblib/model_utils.py"
] | [
"# keras imports\nfrom keras.models import load_model\nfrom keras.applications.vgg16 import preprocess_input\n\n# scikit-learn imports\nfrom sklearn.pipeline import Pipeline\n\n# pandas/numpy imports\nimport pandas as pd\nimport numpy as np\n\nimport joblib\nimport io\nimport base64\nimport h5py\nfrom PIL import Im... | [
[
"numpy.asarray",
"numpy.zeros",
"sklearn.pipeline.Pipeline",
"pandas.DataFrame"
]
] |
ericwang0701/AlphaPose | [
"1f17dbf4b41ad7452430b69f72d58a0585ed09af",
"1f17dbf4b41ad7452430b69f72d58a0585ed09af"
] | [
"alphapose/models/fastpose.py",
"alphapose/utils/metrics.py"
] | [
"# -----------------------------------------------------\n# Copyright (c) Shanghai Jiao Tong University. All rights reserved.\n# Written by Jiefeng Li (jeff.lee.sjtu@gmail.com)\n# -----------------------------------------------------\n\nimport torch.nn as nn\n\nfrom .builder import SPPE\nfrom .layers.DUC import DUC... | [
[
"torch.nn.init.constant_",
"torch.nn.Conv2d",
"torch.nn.PixelShuffle",
"torch.nn.init.normal_"
],
[
"numpy.maximum",
"numpy.less",
"torch.nn.functional.binary_cross_entropy_with_logits",
"numpy.linalg.norm",
"numpy.ones",
"numpy.not_equal",
"numpy.array",
"numpy... |
FrankLeeeee/ColossalAI-Examples | [
"a7eae54278f3e5bcaa4d2a54552ff4a18ead9cc5",
"a7eae54278f3e5bcaa4d2a54552ff4a18ead9cc5"
] | [
"language/bert/zero/finetuning/glue/main.py",
"image/vision_transformer/colo_vit/test_vit.py"
] | [
"import colossalai\nimport transformers\nimport torch\nfrom argparse import ArgumentError\nfrom pathlib import Path\nfrom colossalai.core import global_context as gpc\nfrom colossalai.logging import get_dist_logger\nfrom arguments import parse_args\nfrom processors import PROCESSORS\nfrom utils import (get_model, g... | [
[
"torch.nn.CrossEntropyLoss",
"torch.cuda.current_device",
"torch.load"
],
[
"torch.allclose",
"torch.multiprocessing.spawn",
"torch.tensor"
]
] |
marcorossignolo/QuOCS | [
"5ed631e2aebc42b226f5992daf27e2da75a89af9",
"5ed631e2aebc42b226f5992daf27e2da75a89af9",
"5ed631e2aebc42b226f5992daf27e2da75a89af9"
] | [
"src/quocslib/tools/linearalgebra.py",
"src/quocslib/timeevolution/piecewise_integrator.py",
"src/quocslib/optimalcontrolproblems/OneQubitProblem.py"
] | [
"# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n# Copyright 2021- QuOCS Team\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# ... | [
[
"numpy.diag",
"numpy.dot",
"numpy.ones_like",
"numpy.sqrt",
"numpy.eye",
"numpy.kron",
"numpy.linalg.norm",
"numpy.ones",
"numpy.append",
"numpy.size",
"numpy.random.rand",
"numpy.zeros"
],
[
"scipy.linalg.expm"
],
[
"numpy.abs",
"numpy.asarray",... |
bpinsard/nipy | [
"d49e8292adad6619e3dac710752131b567efe90e",
"d49e8292adad6619e3dac710752131b567efe90e",
"d49e8292adad6619e3dac710752131b567efe90e",
"d49e8292adad6619e3dac710752131b567efe90e",
"d49e8292adad6619e3dac710752131b567efe90e"
] | [
"nipy/labs/datasets/volumes/volume_img.py",
"examples/formula/fir.py",
"nipy/modalities/fmri/fmristat/setup.py",
"examples/labs/need_data/one_sample_t_test.py",
"nipy/algorithms/statistics/onesample.py"
] | [
"# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"\nAn image that stores the data as an (x, y, z, ...) array, with an\naffine mapping to the world space\n\"\"\"\nfrom __future__ import absolute_import\nimport copy\n\nimport numpy as np\nfrom s... | [
[
"numpy.diag",
"numpy.dot",
"numpy.rollaxis",
"numpy.abs",
"numpy.get_printoptions",
"numpy.linalg.inv",
"numpy.reshape",
"numpy.eye",
"numpy.set_printoptions",
"numpy.sort",
"numpy.all",
"numpy.concatenate",
"numpy.ceil",
"numpy.diff",
"numpy.linalg.qr",... |
jmitz/daymetDataExtraction | [
"40b393a8ba31d1969e197cf97dd7096147bdc2de"
] | [
"daymetExtractor.py"
] | [
"# -------------------------------------------------------------------------------\n# Name: daymetFileDownload.py\n# Purpose:\n#\n# Author: jmitzelfelt\n#\n# Created: 7/2/2017\n# Copyright: (c) jmitzelfelt 2017\n# Licence: Unlicense\n# ----------------------------------------------------------... | [
[
"numpy.round",
"numpy.multiply"
]
] |
adgaudio/ietk-ret | [
"a93328f0a787fadf20817c75b6c5e0e33d39a720",
"a93328f0a787fadf20817c75b6c5e0e33d39a720"
] | [
"ietk/methods/sharpen_img.py",
"ietk/methods/dehaze.py"
] | [
"import cv2.ximgproc\nimport numpy as np\nfrom matplotlib import pyplot as plt\nimport scipy.ndimage as ndi\nimport logging\n\nfrom ietk.data import IDRiD\nfrom ietk import util\n\nlog = logging.getLogger(__name__)\n\n\ndef check_and_fix_nan(A, replacement_img):\n nanmask = np.isnan(A)\n if nanmask.any():\n ... | [
[
"numpy.expand_dims",
"numpy.min",
"numpy.isnan",
"matplotlib.pyplot.subplots",
"numpy.shape",
"scipy.ndimage.morphological_laplace",
"matplotlib.pyplot.show",
"numpy.zeros"
],
[
"numpy.expand_dims",
"numpy.linspace",
"matplotlib.pyplot.subplots",
"numpy.outer",
... |
dk25021999/mmf | [
"218057265a3fc175f656b5ebe8fb44ef5ccca2e9",
"218057265a3fc175f656b5ebe8fb44ef5ccca2e9",
"c8f47a23b85a87d14616c2f53e81693a25ea929a"
] | [
"mmf/utils/env.py",
"tests/datasets/test_iteration_strategies.py",
"tools/scripts/features/lmdb_conversion.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n\nimport glob\nimport importlib\nimport logging\nimport os\nimport random\nimport sys\nfrom datetime import datetime\n\nimport numpy as np\nimport torch\nfrom omegaconf import OmegaConf, open_dict\n\n\ndef set_seed(seed):\n if seed:\n if seed == -1:\n ... | [
[
"torch.manual_seed",
"numpy.random.seed"
],
[
"numpy.random.seed"
],
[
"numpy.load"
]
] |
luogan1234/prerequisite-prediction-co-training | [
"28e3f241ada5afe75a73525375087be230735c2a",
"28e3f241ada5afe75a73525375087be230735c2a"
] | [
"config.py",
"model/text_model.py"
] | [
"import numpy as np\nimport torch\nfrom sklearn.decomposition import PCA\n\nclass Config:\n def __init__(self, dataset, text_encoder, graph_layer, init_num, max_change_num, seed, cpu):\n self.dataset = dataset\n self.text_encoder = text_encoder\n self.graph_layer = graph_layer\n self.... | [
[
"numpy.diag",
"numpy.abs",
"numpy.isinf",
"torch.zeros",
"torch.cat",
"numpy.eye",
"numpy.matmul",
"torch.from_numpy",
"sklearn.decomposition.PCA"
],
[
"torch.zeros",
"torch.cat"
]
] |
tw-yshuang/NTU_2020S_ML_HW3 | [
"59d155bc3dbcb0bcd85fc10278ad00501770f738"
] | [
"src/food_img_transform.py"
] | [
"import cv2\nimport skimage\nimport random\nimport numpy as np\nfrom torchvision import transforms\ntry:\n from src.Model.find_file_name import get_filenames\n from src.Model.Img_DIP import get_filter_img\nexcept ModuleNotFoundError:\n from Model.find_file_name import get_filenames\n from Model.Img_DIP ... | [
[
"matplotlib.pyplot.imshow",
"numpy.asarray",
"numpy.uint8",
"matplotlib.pyplot.cla",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.show",
"matplotlib.pyplot.pause"
]
] |
phamhe/mmdetection3d | [
"bc97d76ada58872eb84b08bb316f6a5a0526d706",
"bc97d76ada58872eb84b08bb316f6a5a0526d706"
] | [
"mmdet3d/models/roi_heads/bbox_heads/h3d_bbox_head.py",
"mmdet3d/datasets/kitti_dataset.py"
] | [
"import torch\nfrom mmcv.cnn import ConvModule\nfrom torch import nn as nn\nfrom torch.nn import functional as F\n\nfrom mmdet3d.core.bbox import DepthInstance3DBoxes\nfrom mmdet3d.core.post_processing import aligned_3d_nms\nfrom mmdet3d.models.builder import build_loss\nfrom mmdet3d.models.losses import chamfer_di... | [
[
"torch.nn.Sequential",
"torch.nn.functional.softmax",
"torch.Size",
"torch.max",
"torch.cat",
"torch.nn.ModuleList",
"torch.min",
"torch.sum",
"torch.zeros_like",
"torch.nonzero",
"torch.nn.Conv1d",
"torch.stack",
"torch.argmax"
],
[
"numpy.minimum",
... |
ferdinandwp/MyPython | [
"46a5b41b1914b3bfab2d18e72cc866acb3842119",
"46a5b41b1914b3bfab2d18e72cc866acb3842119"
] | [
"practice_array_manipulation/pd_create_df.py",
"practice_charts/8-pair_plot.py"
] | [
"import pandas as pd\n\ndef pretty_print(name, to_print):\n print(f'{name}:')\n print(f'{to_print}\\n\\n')\n\n# Creating Dataframe from Lists\norders = pd.DataFrame(data=[['XB4Z34', 11, 25.50],\n ['SZA1123', 34, 60],\n ['P4FF2S', 2, 123.40],\n ... | [
[
"pandas.DataFrame"
],
[
"matplotlib.pyplot.close",
"pandas.read_csv",
"matplotlib.pyplot.show"
]
] |
armavox/rls-med | [
"d653c1277b4d8be0585a7128faf8f71f9f13ec60"
] | [
"src/models/auxiliary.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.nn.init as init\n\n\nclass ConvGRUCell(nn.Module):\n \"\"\"\n Generate a convolutional GRU cell\n \"\"\"\n\n def __init__(self, input_size, hidden_size, kernel_size):\n super().__init__()\n padding = kernel... | [
[
"torch.sigmoid",
"torch.cat",
"torch.zeros",
"torch.nn.Conv2d",
"torch.tanh",
"torch.nn.init.orthogonal",
"torch.nn.init.constant",
"torch.nn.functional.linear"
]
] |
Takahiro-Funahashi/o-reilly-deep-learning-clone | [
"043bfe69a4bec7c6063fd8b71d337f99f13ad26e"
] | [
"ch05/gradient_check.py"
] | [
"# coding: utf-8\nimport numpy as np\nimport sys\n\nsys.path.append('./ch05/')\nsys.path.append('./dataset/')\n\nif __name__ == '__main__':\n from two_layer_net import TwoLayerNet\n from mnist import load_mnist\n\n # データの読み込み\n (x_train, t_train), (x_test, t_test) = load_mnist(\n normalize=True, ... | [
[
"numpy.abs"
]
] |
mrtzh/folktables | [
"5dd61a1b650adbf5afdb9a2cdae76903e1017c66"
] | [
"folktables/load_acs.py"
] | [
"\"\"\"Load ACS PUMS data from Census CSV files.\"\"\"\nimport os\nimport random\nimport io\nimport requests\nimport zipfile\n\nimport numpy as np\nimport pandas as pd\n\n\nstate_list = ['AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'FL', 'GA', 'HI',\n 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', ... | [
[
"pandas.read_csv"
]
] |
ibara1454/pyss | [
"69b47d89f88f04876bdabd504d202a1ced7bb5e4",
"69b47d89f88f04876bdabd504d202a1ced7bb5e4"
] | [
"pyss/util/coefficient.py",
"mpi_test/test_pyss.py"
] | [
"#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport numpy as np\nimport numpy.linalg\n\n\ndef newton_cotes_coeff(h, n, tr=None):\n \"\"\"Return array of weights of Newton-Cotes method.\n\n Parameters\n ----------\n h : float\n Length of each two nearest sampling points.\n n : int\n ... | [
[
"numpy.linspace",
"numpy.arange",
"numpy.linalg.lstsq",
"numpy.linalg.pinv",
"numpy.zeros"
],
[
"numpy.eye"
]
] |
HeegonJin/ssd_face_mask_detection | [
"0e5c91f7d286cf1e03f7d718958d7ff957b0062d"
] | [
"train.py"
] | [
"from data import *\nfrom utils.augmentations import SSDAugmentation\nfrom layers.modules import MultiBoxLoss\nfrom ssd import build_ssd\nimport os\nimport os.path as osp\nimport torch\nfrom torch.autograd import Variable\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.backends.cudnn as cudnn\nimp... | [
[
"torch.set_default_tensor_type",
"torch.ones",
"torch.Tensor",
"torch.load",
"torch.zeros",
"torch.utils.data.DataLoader",
"torch.cuda.is_available",
"torch.nn.init.xavier_uniform_",
"torch.nn.DataParallel",
"torch.autograd.Variable"
]
] |
piotrjurkiewicz/flow_stats | [
"cc97a8381275cb9dd23ed0c3432abffaf4198431"
] | [
"flow_models/lib/kde.py"
] | [
"# Taken from SciPy\n# scipy/stats/kde.py at 79ed161bf603dc3af3986efe7064df79212c4dd4\n\n# Weighted KDE computation based on:\n# https://stackoverflow.com/a/27623920/2178047\n# https://gist.github.com/tillahoffmann/f844bce2ec264c1c8cb5\n\n# Weighted KDE computation using FFT based on:\n# https://github.com/scipy/sc... | [
[
"numpy.dot",
"numpy.max",
"numpy.mean",
"numpy.exp",
"numpy.histogram",
"numpy.reshape",
"scipy.interpolate.RegularGridInterpolator",
"numpy.linalg.det",
"numpy.real",
"scipy.interpolate.interp1d",
"scipy.linalg.inv",
"numpy.zeros",
"scipy.signal.fftconvolve",
... |
AndreasZS/pychop3d | [
"5261e0b491d25f1824b0a541981dfd3887faf9e4"
] | [
"pychop3d/configuration.py"
] | [
"import numpy as np\nimport yaml\nimport os\n\n\nclass Configuration:\n \"\"\"\n This class will hold all of the configuration settings for a run. It will not hold any BSPTree data or mesh data.\n The settings will be saved and loaded from YAML files. Maybe later implement this as a singleton if necessary.... | [
[
"numpy.meshgrid",
"numpy.arange",
"numpy.cos",
"numpy.sin",
"numpy.array",
"numpy.sum"
]
] |
ChrisBNEU/RMG-Py | [
"5fd68810cfb45a666dc223df0720e6dd8314139f"
] | [
"rmgpy/rmg/model.py"
] | [
"#!/usr/bin/env python3\n\n###############################################################################\n# #\n# RMG - Reaction Mechanism Generator #\n# ... | [
[
"numpy.argsort",
"scipy.sparse.dok_matrix",
"numpy.zeros",
"numpy.isinf"
]
] |
maxiwelian/deepqmc | [
"0d243e2c5f5964a79929294e62e46819653b137b"
] | [
"src/deepqmc/wf/ferminet/pretrainer.py"
] | [
"from torch.distributions import Normal\nimport numpy as np\nfrom torch import nn\nfrom typing import Tuple\nfrom tqdm.auto import trange\nimport torch\n\nfrom deepqmc import Molecule\nfrom deepqmc.pyscfext import eval_ao_normed, pyscf_from_mol\nfrom deepqmc.wf import WaveFunction\nfrom deepqmc.wf.paulinet.molorb i... | [
[
"torch.normal",
"torch.diagonal",
"torch.cat",
"torch.from_numpy",
"torch.tensor",
"numpy.concatenate",
"torch.exp",
"numpy.random.normal",
"torch.rand",
"torch.where",
"torch.distributions.Normal"
]
] |
data301-2021-winter1/project-group33-project | [
"52ea0628521e12f98ef2d3d977350a526bd10600"
] | [
"notebooks/ungraded/project_functions1.py"
] | [
"# Imports\nimport os\nfrom os import listdir\nimport pandas as pd\nimport datetime\n\nmonths = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"]\n\ndef addMissingMonths(df):\n count = 0\n for year in df[\"Year\"]... | [
[
"pandas.Categorical",
"pandas.merge",
"pandas.read_csv",
"pandas.DataFrame"
]
] |
ollyparryevans/mrcnn_deployment | [
"184d6475ecbc8c15db38701a1f0b9e5e060686a5"
] | [
"mrcnn/model.py"
] | [
"\"\"\"\nMask R-CNN\nThe main Mask R-CNN model implementation.\n\nCopyright (c) 2017 Matterport, Inc.\nLicensed under the MIT License (see LICENSE for details)\nWritten by Waleed Abdulla\n\"\"\"\n\nimport os\nimport random\nimport datetime\nimport re\nimport math\nimport logging\nfrom collections import OrderedDict... | [
[
"numpy.amax",
"numpy.expand_dims",
"tensorflow.concat",
"tensorflow.control_dependencies",
"tensorflow.stack",
"tensorflow.reduce_sum",
"tensorflow.minimum",
"tensorflow.cast",
"tensorflow.image.non_max_suppression",
"tensorflow.equal",
"tensorflow.image.crop_and_resize... |
matthew-brett/regreg | [
"8a10a79cbaf771c2a6d70e8094ab753ec075aab7",
"8a10a79cbaf771c2a6d70e8094ab753ec075aab7"
] | [
"regreg/affine/tests/test_normalize.py",
"regreg/affine/tests/test_fused_lasso.py"
] | [
"from itertools import product\nimport numpy as np\nimport scipy.sparse\n\nimport regreg.api as rr\nfrom regreg.identity_quadratic import identity_quadratic as sq\nimport nose.tools as nt\n\n\ndef test_centering():\n \"\"\"\n This test verifies that the normalized transform\n of affine correctly implements... | [
[
"numpy.diag",
"numpy.dot",
"numpy.sqrt",
"numpy.random.standard_normal",
"numpy.linalg.norm",
"numpy.ones",
"numpy.testing.assert_almost_equal",
"numpy.std",
"numpy.random.normal",
"numpy.array",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.random.standard_normal"... |
rdelfin/learning_robots_simulation | [
"5a212eac66683cc8a8d43f9a0346cb3a135586c7"
] | [
"test.py"
] | [
"from unittest import main, TestCase\nfrom nn.neuralnet import NeuralNet\n\nimport numpy as np\n\ndelta = 0.00000001\n\nclass NeuralNetTest(TestCase):\n def test_cost(self):\n training_x = np.mat([[1, 2], [3, 4]], dtype=np.float64)\n training_y = np.mat([[2], [2]], dtype=np.float64)\n traini... | [
[
"numpy.array",
"numpy.mat",
"numpy.zeros_like",
"numpy.linalg.norm"
]
] |
JiaZhou-PU/raven | [
"a1fd82facb0f02f20770ea4df39d55a999c49017",
"a1fd82facb0f02f20770ea4df39d55a999c49017",
"a1fd82facb0f02f20770ea4df39d55a999c49017"
] | [
"framework/CodeInterfaces/Utilities/csvUtilities.py",
"framework/SupervisedLearning/GaussPolynomialRom.py",
"framework/Samplers/AdaptiveDynamicEventTree.py"
] | [
"# Copyright 2017 Battelle Energy Alliance, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable ... | [
[
"sklearn.neighbors.KNeighborsRegressor",
"numpy.atleast_2d",
"numpy.array"
],
[
"scipy.spatial.KDTree"
],
[
"numpy.asarray"
]
] |
tensorflow/lingvo | [
"f72c353b76b345fe6d9d02c20466b7e60492fadd",
"f72c353b76b345fe6d9d02c20466b7e60492fadd"
] | [
"lingvo/core/py_utils.py",
"lingvo/jax/train.py"
] | [
"# Lint as: python3\n# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2... | [
[
"numpy.sqrt",
"numpy.get_printoptions",
"numpy.asarray",
"tensorflow.python.framework.function.get_extra_vars",
"tensorflow.python.ops.init_ops.random_uniform_initializer",
"tensorflow.python.ops.init_ops.constant_initializer",
"numpy.random.randint",
"tensorflow.python.tpu.tpu_fun... |
y-yao/pyscf | [
"9b6589109be372334c51053d48fc1b80ce10ce23"
] | [
"pyscf/cc/gccsd_t_rdm.py"
] | [
"#!/usr/bin/env python\n# Copyright 2014-2018 The PySCF Developers. 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/LIC... | [
[
"numpy.diag_indices",
"numpy.where",
"numpy.asarray",
"numpy.einsum"
]
] |
signals-dev/sintel | [
"e1b296d356854323d4582c074fa90c25adfd6573"
] | [
"sintel/resources/computing/similar_windows.py"
] | [
"import logging\n\nimport numpy as np\nimport pandas as pd\nfrom flask_restful import Resource, reqparse\nfrom sklearn.preprocessing import MinMaxScaler\n\nfrom sintel.db import DBExplorer, schema\nfrom sintel.resources.auth_utils import verify_auth\nfrom sintel.resources.computing.utils.search_similars import retu... | [
[
"numpy.asarray",
"pandas.DataFrame",
"sklearn.preprocessing.MinMaxScaler"
]
] |
Eshan-Agarwal/magenta | [
"21f4cbf8ac2717df6a6fbff8cc6a027fbf3e4057",
"21f4cbf8ac2717df6a6fbff8cc6a027fbf3e4057",
"21f4cbf8ac2717df6a6fbff8cc6a027fbf3e4057",
"21f4cbf8ac2717df6a6fbff8cc6a027fbf3e4057",
"21f4cbf8ac2717df6a6fbff8cc6a027fbf3e4057",
"21f4cbf8ac2717df6a6fbff8cc6a027fbf3e4057"
] | [
"magenta/music/events_lib_test.py",
"magenta/models/arbitrary_image_stylization/export_hub.py",
"magenta/music/mfcc_mel_test.py",
"magenta/models/shared/sequence_generator_bundle.py",
"magenta/pipelines/pianoroll_pipeline_test.py",
"magenta/models/onsets_frames_transcription/metrics_test.py"
] | [
"# Copyright 2020 The Magenta Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law o... | [
[
"tensorflow.compat.v1.test.main"
],
[
"tensorflow.compat.v1.train.Checkpoint",
"tensorflow.compat.v1.Session",
"tensorflow.compat.v1.initialize_all_variables",
"tensorflow.compat.v1.compat.v1.app.run",
"tensorflow.compat.v1.logging.info",
"tensorflow.compat.v1.TensorSpec",
"ten... |
diegcr/2D-Motion-Retargeting | [
"2b4acedb45a281d2867c812fce6063dc68b8e88b"
] | [
"train.py"
] | [
"from dataset import get_dataloader\nfrom common import config\nfrom model import get_autoencoder\nfrom functional.utils import cycle\nfrom agent import get_training_agent\nfrom functional.visualization import visulize_motion_in_training\nimport torch\nimport os\nfrom collections import OrderedDict\nfrom tqdm impor... | [
[
"torch.from_numpy"
]
] |
mathPi/shap | [
"8cd9b3567352ac6751e54d73a4dbce1848f786a0",
"8cd9b3567352ac6751e54d73a4dbce1848f786a0"
] | [
"shap/plots/_scatter.py",
"tests/explainers/test_tree.py"
] | [
"from __future__ import division\n\nimport numpy as np\nimport warnings\ntry:\n import matplotlib.pyplot as pl\n import matplotlib\nexcept ImportError:\n warnings.warn(\"matplotlib could not be loaded!\")\n pass\nfrom ._labels import labels\nfrom . import colors\nfrom ..utils import convert_name, approx... | [
[
"numpy.nanmax",
"numpy.hstack",
"matplotlib.colors.BoundaryNorm",
"numpy.invert",
"numpy.unique",
"numpy.isnan",
"numpy.arange",
"numpy.min",
"numpy.nanmin",
"matplotlib.pyplot.sca",
"numpy.random.shuffle",
"numpy.sort",
"matplotlib.pyplot.colorbar",
"numpy.... |
konpat/psi4numpy | [
"dc0b51d9a05286023474e1e5b4828705676bf60d",
"dc0b51d9a05286023474e1e5b4828705676bf60d",
"dc0b51d9a05286023474e1e5b4828705676bf60d",
"dc0b51d9a05286023474e1e5b4828705676bf60d",
"dc0b51d9a05286023474e1e5b4828705676bf60d"
] | [
"Response-Theory/Coupled-Cluster/RHF/helper_ccpert.py",
"Self-Consistent-Field/RHF.py",
"Coupled-Cluster/RHF/helper_ccenergy.py",
"Self-Consistent-Field/RHF_EFP.py",
"Configuration-Interaction/CI_DL.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nA simple python script to compute RHF-CCSD linear response function \nfor calculating properties like dipole polarizabilities, optical\nrotations etc. \n\nReferences: \n1. A Whirlwind Introduction to Coupled Cluster Response Theory, T.D. Crawford, Private Notes,\n (pdf in the cur... | [
[
"numpy.sqrt",
"numpy.einsum"
],
[
"numpy.einsum",
"numpy.asarray",
"numpy.set_printoptions",
"numpy.linalg.eigh",
"numpy.zeros_like",
"numpy.mean"
],
[
"numpy.diag",
"numpy.sqrt",
"numpy.einsum",
"numpy.asarray",
"numpy.zeros"
],
[
"numpy.allclos... |
ddonatien/mmcv | [
"5532275712dc2bae516e50fa8fda585dff737cba"
] | [
"mmcv/cnn/utils/weight_init.py"
] | [
"# Copyright (c) Open-MMLab. All rights reserved.\nimport copy\nimport math\nimport warnings\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom torch import Tensor\n\nfrom mmcv.utils import Registry, build_from_cfg, get_logger, print_log\n\nINITIALIZERS = Registry('initializer')\n\n\ndef constant_init... | [
[
"torch.nn.init.uniform_",
"numpy.log",
"torch.nn.init.constant_",
"torch.nn.init.xavier_normal_",
"torch.nn.init.kaiming_uniform_",
"torch.no_grad",
"torch.nn.init.normal_",
"torch.nn.init.xavier_uniform_",
"torch.nn.init.kaiming_normal_"
]
] |
simonthor/zfit | [
"97a18cd6cf14240be2cf52185681d0132f866179"
] | [
"docs/plots/fftconv_spline_linear.py"
] | [
"# Copyright (c) 2020 zfit\n\nimport matplotlib.pyplot as plt\nimport tensorflow as tf\n\nimport zfit\n\n\ndef plot_conv_comparison():\n # test special properties here\n n_point_plotting = 2000\n obs = zfit.Space(\"obs1\", limits=(-5, 5))\n param1 = zfit.Parameter('param1', -3)\n param2 = zfit.Para... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"tensorflow.linspace",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
jeongho2/ssd.myPytorch | [
"fdb30a309cd3378afe7510493b1363161f54545c",
"fdb30a309cd3378afe7510493b1363161f54545c"
] | [
"setuptest.py",
"data/raccoon.py"
] | [
"import torch\n\nprint(torch.__version__)\nprint(torch.cuda.is_available())\n\nimport cv2\n",
"\"\"\" \nCOCO Raccon Dataset Classes\n\"\"\"\n\nfrom .config import HOME\nimport os\nimport os.path as osp\nimport sys\nimport torch\nimport torch.utils.data as data\nimport torchvision.transforms as transforms\nimport ... | [
[
"torch.cuda.is_available"
],
[
"numpy.array",
"numpy.expand_dims",
"torch.from_numpy"
]
] |
bharathjatoth/Reinforcement_learning | [
"c3baecd02cbc2d2d4f7a33a57d961c5cd1a3bee6"
] | [
"Algotrade.py"
] | [
"'''\npredicting the stock prices with the help of reinforcement learning\nthis tutorial goes in step by step procedure and uses q learning\ndata used: from yahoo finance\nauthor : Bharath Kumar (bharathjatoth.github.io)\nStep 1 : import all the libraries which are used by the algo\n'''\nimport keras\nimport numpy ... | [
[
"numpy.array",
"numpy.argmax"
]
] |
elviva404/food-detection-yolov5 | [
"796a0c1df6e9c9a705dff7782b3f9b213344f11b",
"796a0c1df6e9c9a705dff7782b3f9b213344f11b"
] | [
"model/models/classifier.py",
"model/models/backbone.py"
] | [
"import torch\nfrom .base_model import BaseModel\n\nclass Classifier(BaseModel):\n def __init__(self, model, **kwargs):\n super(Classifier, self).__init__(**kwargs)\n self.model = model\n self.model_name = self.model.name\n if self.optimizer is not None:\n self.optimizer = ... | [
[
"torch.nn.functional.softmax",
"torch.max",
"torch.argmax"
],
[
"torch.nn.Linear",
"torch.nn.DataParallel",
"numpy.array",
"torch.load"
]
] |
AntonioCCosta/wormpose | [
"a92c0459f940d6e1f517b90d3a445ad3c0689ed8",
"a92c0459f940d6e1f517b90d3a445ad3c0689ed8"
] | [
"wormpose/dataset/features.py",
"wormpose/dataset/image_processing/frame_preprocessor.py"
] | [
"\"\"\"\nThis module deals with loading features from a dataset.\n\nIt will calculate extra features such as the worm length.\n\"\"\"\n\nfrom typing import Dict, Tuple\n\nimport numpy as np\n\n\nclass Features(object):\n def __init__(self, raw_features: dict):\n\n _validate_features(raw_features)\n\n ... | [
[
"numpy.isnan",
"numpy.issubdtype",
"numpy.stack",
"numpy.nanmean",
"numpy.where",
"numpy.sum"
],
[
"numpy.max",
"numpy.copy",
"numpy.where",
"numpy.min"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.