repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
ChAnYaNG97/datasets | [
"0a45e2ea98716d325fc1c5e5494f2575f3bdb908",
"0a45e2ea98716d325fc1c5e5494f2575f3bdb908",
"0a45e2ea98716d325fc1c5e5494f2575f3bdb908",
"0a45e2ea98716d325fc1c5e5494f2575f3bdb908",
"0a45e2ea98716d325fc1c5e5494f2575f3bdb908",
"0a45e2ea98716d325fc1c5e5494f2575f3bdb908",
"0a45e2ea98716d325fc1c5e5494f2575f3bdb90... | [
"tensorflow_datasets/object_detection/voc.py",
"tensorflow_datasets/summarization/opinion_abstracts.py",
"tensorflow_datasets/text/eraser_multi_rc.py",
"tensorflow_datasets/text/reddit_disentanglement.py",
"tensorflow_datasets/image_classification/cmaterdb.py",
"tensorflow_datasets/image_classification/di... | [
"# coding=utf-8\n# Copyright 2020 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.GFile"
],
[
"tensorflow.compat.v2.io.gfile.GFile"
],
[
"tensorflow.compat.v2.io.gfile.GFile"
],
[
"tensorflow.compat.v2.io.gfile.GFile"
],
[
"tensorflow.compat.v2.io.gfile.GFile",
"numpy.load"
],
[
"numpy.sqrt",
"tensorflow.compat.... |
codeproject/DeepStack | [
"d96368a3db1bc0266cb500ba3701d130834da0e6",
"d96368a3db1bc0266cb500ba3701d130834da0e6",
"d96368a3db1bc0266cb500ba3701d130834da0e6",
"d96368a3db1bc0266cb500ba3701d130834da0e6",
"d96368a3db1bc0266cb500ba3701d130834da0e6",
"d96368a3db1bc0266cb500ba3701d130834da0e6",
"d96368a3db1bc0266cb500ba3701d130834da0e... | [
"windows_packages_gpu/torch/nn/grad.py",
"windows_packages_gpu/torch/testing/_internal/jit_metaprogramming_utils.py",
"windows_packages_gpu/matplotlib/tests/test_mathtext.py",
"windows_packages_gpu/torch/testing/_internal/distributed/ddp_under_dist_autograd_test.py",
"windows_packages_gpu/torch/distribution... | [
"\"\"\"Gradient interface\"\"\"\r\n\r\nimport torch\r\nfrom .modules.utils import _single, _pair, _triple\r\nimport warnings\r\n\r\n\r\ndef _grad_input_padding(grad_output, input_size, stride, padding, kernel_size, dilation=None):\r\n if dilation is None:\r\n # For backward compatibility\r\n warnin... | [
[
"torch.conv2d",
"torch.conv3d",
"torch.conv_transpose1d",
"torch.conv1d",
"torch.conv_transpose2d",
"torch.conv_transpose3d"
],
[
"torch.testing._internal.common_methods_invocations.unpack_variables",
"torch.Size",
"torch.jit.trace",
"torch.randint",
"torch.jit._dis... |
gpspelle/pose-estimation | [
"1dec506ac8abf00616dc0fe76bf476ccdfd6b93e"
] | [
"tf_pose/slim/nets/mobilenet/mobilenet.py"
] | [
"# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.shape",
"tensorflow.zeros_initializer",
"tensorflow.identity",
"tensorflow.truncated_normal_initializer",
"tensorflow.squeeze",
"tensorflow.name_scope",
"tensorflow.pad",
"tensorflow.variable_scope"
]
] |
tao2020/Horizon | [
"0f9a1b16ddd6e5a8ac98e61acd227aae7c201b57"
] | [
"ml/rl/workflow/dqn_workflow.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n\nimport logging\nimport sys\nfrom typing import Dict\n\nimport numpy as np\nfrom ml.rl.evaluation.evaluator import Evaluator\nfrom ml.rl.preprocessing.preprocessor import Preprocessor\nfrom ml.rl.preprocessing.sparse_... | [
[
"numpy.array"
]
] |
yphsieh/rPPG_blink | [
"31be5b818d34892eb9f2c1abd3b00f370413e3db"
] | [
"evaluation.py"
] | [
"import os\nimport argparse\nfrom keras.models import load_model\nimport numpy as np\nfrom sklearn.metrics import accuracy_score, f1_score\n\nfrom data_preprocessing import *\n\nparser = argparse.ArgumentParser()\nparser.add_argument('-m', '--model_name', default='save/RDNN.h5', type=str)\nparser.add_argument('--sm... | [
[
"numpy.load",
"sklearn.metrics.f1_score",
"numpy.sum",
"sklearn.metrics.accuracy_score"
]
] |
decarlof/algotom | [
"3dce086bcc0c4df97700c60f8ec90e07ee95d040",
"3dce086bcc0c4df97700c60f8ec90e07ee95d040"
] | [
"tests/test_util/test_calibration.py",
"algotom/io/loadersaver.py"
] | [
"# ============================================================================\n# ============================================================================\n# Copyright (c) 2021 Nghia T. Vo. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file... | [
[
"numpy.abs",
"scipy.ndimage.label",
"numpy.std",
"numpy.zeros_like",
"numpy.random.rand",
"scipy.ndimage.binary_dilation",
"numpy.exp",
"numpy.zeros"
],
[
"numpy.max",
"numpy.argmin",
"numpy.mean",
"numpy.min"
]
] |
thompsonsed/pycoalescence | [
"eddce52ad7b3584e1fb208532d6851751b27dd4a"
] | [
"pycoalescence/tests/test_coalescence_tree.py"
] | [
"\"\"\"\nTests the coalescence tree object.\n\"\"\"\nimport os\nimport random\nimport shutil\nimport sqlite3\nimport sys\nimport unittest\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.testing import assert_frame_equal\nfrom setup_tests import setUpAll, tearDownAll, skipLongTest\n\nfrom pycoalescence impor... | [
[
"pandas.testing.assert_frame_equal",
"numpy.random.seed",
"pandas.DataFrame"
]
] |
cmougan/OODBenchmark | [
"e5d7b9540840afe64f6a00139cbc41a44ed01a80"
] | [
"xAIbenchmark.py"
] | [
"# %%\nfrom pmlb import fetch_data\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.model_selection import cross_val_predict, KFold\nfrom sklearn.metrics import mean_squared_error, roc_auc_score\nfrom tqdm import tqdm\nimport pandas as pd\nimport numpy as np\nfrom collections import defaultdict\nimpo... | [
[
"sklearn.metrics.roc_auc_score",
"sklearn.model_selection.cross_val_predict",
"pandas.DataFrame",
"sklearn.ensemble.GradientBoostingRegressor",
"numpy.concatenate",
"sklearn.metrics.mean_squared_error",
"sklearn.model_selection.KFold",
"sklearn.preprocessing.StandardScaler"
]
] |
andresmasegosa/PRML-CoreSets | [
"fb768debb15e3ff6f5b65b7224915a41c1493f3d",
"fb768debb15e3ff6f5b65b7224915a41c1493f3d",
"fb768debb15e3ff6f5b65b7224915a41c1493f3d",
"fb768debb15e3ff6f5b65b7224915a41c1493f3d",
"fb768debb15e3ff6f5b65b7224915a41c1493f3d"
] | [
"andres@programo.ual.es/bayesian_pca_DR.py",
"andres@programo.ual.es/evaluatePCA.py",
"andres@programo.ual.es/evaluateMoG.py",
"datareduction/using.py",
"datareduction/evaluateMoG.py"
] | [
"import numpy as np\nfrom prml.feature_extractions.pca import PCA\nfrom sklearn.cluster import KMeans, MiniBatchKMeans\nfrom sklearn.preprocessing import StandardScaler\n\n\nclass BayesianPCA_DR(PCA):\n\n def _clusteringError(self, X, kmeans):\n sum = 0\n for i in range(0, kmeans.cluster_centers_.s... | [
[
"numpy.diag",
"numpy.allclose",
"sklearn.cluster.MiniBatchKMeans",
"numpy.sqrt",
"numpy.linalg.inv",
"numpy.random.choice",
"numpy.eye",
"numpy.trace",
"numpy.concatenate",
"numpy.copy",
"numpy.cov",
"numpy.linalg.eigh",
"numpy.mean",
"numpy.size",
"nump... |
WERimagin/transformers | [
"cc7d14511c647f8147494df72f8b0575015e37ab",
"cc7d14511c647f8147494df72f8b0575015e37ab",
"cc7d14511c647f8147494df72f8b0575015e37ab",
"cc7d14511c647f8147494df72f8b0575015e37ab",
"cc7d14511c647f8147494df72f8b0575015e37ab",
"cc7d14511c647f8147494df72f8b0575015e37ab"
] | [
"tests/test_data_collator.py",
"examples/adversarial/utils_hans.py",
"src/transformers/tokenization_deberta.py",
"tests/test_benchmark_tf.py",
"tests/test_modeling_tf_xlnet.py",
"tests/test_tokenization_bert_generation.py"
] | [
"import unittest\n\nfrom transformers import AutoTokenizer, is_torch_available\nfrom transformers.testing_utils import require_torch, slow\n\n\nif is_torch_available():\n import torch\n\n from transformers import (\n DataCollatorForLanguageModeling,\n DataCollatorForNextSentencePrediction,\n ... | [
[
"torch.Size",
"torch.randint",
"torch.tensor"
],
[
"tensorflow.TensorShape",
"torch.save",
"torch.load"
],
[
"torch.save",
"torch.load"
],
[
"tensorflow.config.list_physical_devices"
],
[
"tensorflow.convert_to_tensor",
"tensorflow.concat",
"tensorfl... |
lucko515/cnn-raccoon | [
"e1c46544372751d82cc0c0f9cb2218d881a21f70"
] | [
"examples/tensorflow_example.py"
] | [
"import tensorflow as tf\n\nmodel = tf.keras.models.Sequential([\n # YOUR CODE HERE\n tf.keras.layers.BatchNormalization(input_shape=(32, 32, 3)),\n tf.keras.layers.Conv2D(filters=64, kernel_size=(3, 3), activation=\"relu\"),\n tf.keras.layers.MaxPool2D(2, 2),\n tf.keras.layers.Co... | [
[
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.MaxPool2D",
"tensorflow.keras.datasets.cifar10.load_data",
"tensorflow.keras.layers.BatchNormalization",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.Flatten"
]
] |
krystophny/chaospy | [
"18ff6c4fc56c632825e53fb24e17de51a7febd7d",
"18ff6c4fc56c632825e53fb24e17de51a7febd7d",
"18ff6c4fc56c632825e53fb24e17de51a7febd7d",
"18ff6c4fc56c632825e53fb24e17de51a7febd7d",
"18ff6c4fc56c632825e53fb24e17de51a7febd7d",
"18ff6c4fc56c632825e53fb24e17de51a7febd7d",
"18ff6c4fc56c632825e53fb24e17de51a7febd7... | [
"chaospy/distributions/collection/f.py",
"chaospy/distributions/operators/negative.py",
"chaospy/distributions/collection/laplace.py",
"chaospy/bertran/indices.py",
"chaospy/distributions/collection/alpha.py",
"chaospy/distributions/operators/arccos.py",
"chaospy/quadrature/gauss_legendre.py",
"chaosp... | [
"\"\"\"(Non-central) F distribution.\"\"\"\nimport numpy\nfrom scipy import special\n\nfrom ..baseclass import Dist\nfrom ..operators.addition import Add\n\n\nclass f(Dist):\n \"\"\"F distribution.\"\"\"\n\n def __init__(self, dfn, dfd, nc):\n Dist.__init__(self, dfn=dfn, dfd=dfd, nc=nc)\n\n def _pd... | [
[
"scipy.special.ncfdtri",
"scipy.special.ncfdtr",
"scipy.special.assoc_laguerre",
"scipy.special.gammaln",
"numpy.exp",
"scipy.special.beta"
],
[
"numpy.sum"
],
[
"numpy.log",
"numpy.abs",
"numpy.concatenate",
"numpy.sign",
"scipy.special.factorial"
],
[
... |
amgrigoriev/daal4py | [
"97fbe7a9181410dac348dc724178e8605492e3c4"
] | [
"tests/test_estimators.py"
] | [
"#*******************************************************************************\n# Copyright 2014-2020 Intel Corporation\n# All Rights Reserved.\n#\n# This software is licensed under the Apache License, Version 2.0 (the\n# \"License\"), the following terms apply:\n#\n# You may not use this file except in complian... | [
[
"sklearn.utils.estimator_checks.check_estimator"
]
] |
dvtrung/dl-torch | [
"b49e57d10d32bb223e2d7643f2579ccc32c63a9a",
"b49e57d10d32bb223e2d7643f2579ccc32c63a9a",
"b49e57d10d32bb223e2d7643f2579ccc32c63a9a"
] | [
"dlex/datasets/nlp/utils.py",
"dlex_impl/bert/src/models/bert.py",
"dlex/torch/models/attention/classifier.py"
] | [
"\"\"\"NLP Dataset\"\"\"\r\nimport os\r\nimport re\r\nfrom typing import List, Union, Dict, Tuple\r\n\r\nimport nltk\r\nimport unicodedata\r\nimport numpy as np\r\nfrom dlex.configs import ModuleConfigs\r\nfrom dlex.utils.logging import logger\r\n\r\n\r\n# nltk.download('punkt')\r\n\r\n\r\n# Turn a Unicode string t... | [
[
"numpy.zeros",
"numpy.random.rand"
],
[
"tensorflow.nn.bias_add",
"tensorflow.matmul",
"tensorflow.nn.log_softmax",
"tensorflow.compat.v1.metrics.auc",
"tensorflow.reduce_mean",
"tensorflow.compat.v1.metrics.accuracy",
"tensorflow.reduce_sum",
"tensorflow.zeros_initiali... |
annaproxy/udify-metalearning | [
"55206a3aac0aba74a3615a36192d03b6467cfd6f",
"55206a3aac0aba74a3615a36192d03b6467cfd6f",
"55206a3aac0aba74a3615a36192d03b6467cfd6f",
"55206a3aac0aba74a3615a36192d03b6467cfd6f"
] | [
"allennlp/tests/data/fields/sequence_label_field_test.py",
"allennlp/modules/scalar_mix.py",
"allennlp/tests/modules/highway_test.py",
"allennlp/models/semantic_parsing/quarel/quarel_semantic_parser.py"
] | [
"# pylint: disable=no-self-use,invalid-name\nfrom collections import defaultdict\n\nimport pytest\nimport numpy\n\nfrom allennlp.common.checks import ConfigurationError\nfrom allennlp.common.testing import AllenNlpTestCase\nfrom allennlp.data import Token, Vocabulary\nfrom allennlp.data.fields import TextField, Seq... | [
[
"numpy.array"
],
[
"torch.cat",
"torch.sqrt",
"torch.sum",
"torch.FloatTensor",
"torch.split"
],
[
"numpy.testing.assert_almost_equal",
"torch.FloatTensor",
"torch.ones"
],
[
"torch.nn.Dropout",
"torch.nn.functional.softmax",
"torch.transpose",
"torc... |
andrewliao11/Andrew_tensorpack | [
"735a2672e3d93b5b612a303b5b6d222e9b2d4280"
] | [
"tensorpack/dataflow/dataset/ilsvrc.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# File: ilsvrc.py\n# Author: Yuxin Wu <ppwwyyxxc@gmail.com>\nimport os\nimport tarfile\nimport cv2\nimport numpy as np\nfrom six.moves import range\nimport xml.etree.ElementTree as ET\n\nfrom ...utils import logger, get_rng, get_dataset_path\nfrom ...utils.loadcaffe ... | [
[
"numpy.asarray",
"numpy.array",
"numpy.expand_dims",
"numpy.transpose"
]
] |
droyston/spectralize | [
"572770e7358acc3ec433470659759c17453409f2"
] | [
"app/clean_test_app.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Jun 18 18:54:48 2020\n\n@author: dylanroyston\n\"\"\"\n\n\n# -*- coding: utf-8 -*-\n\n# import packages\n#import dash_player\nimport dash\nimport dash_table\nimport dash_core_components as dcc\nimport dash_html_components as html\nfrom dash.de... | [
[
"numpy.array",
"pandas.DataFrame"
]
] |
SoftwareUnderstanding/inspect4py | [
"9c4d7252535082ad938b26baf281d93f3a27285e",
"9c4d7252535082ad938b26baf281d93f3a27285e",
"9c4d7252535082ad938b26baf281d93f3a27285e",
"9c4d7252535082ad938b26baf281d93f3a27285e",
"9c4d7252535082ad938b26baf281d93f3a27285e"
] | [
"test/test_files/pylops/examples/plot_imag.py",
"test/test_files/pylops/pytests/test_lsm.py",
"test/test_files/pylops/examples/plot_tapers.py",
"test/test_files/pylops/pylops/signalprocessing/_Radon2D_numba.py",
"test/test_files/pylops/pytests/test_basicoperators.py"
] | [
"\"\"\"\nImag\n====\n\nThis example shows how to use the :py:class:`pylops.basicoperators.Imag`\noperator.\nThis operator returns the imaginary part of the data as a real value in\nforward mode, and the real part of the model as an imaginary value in\nadjoint mode (with zero real part).\n\"\"\"\nimport numpy as np\... | [
[
"numpy.imag",
"numpy.arange",
"matplotlib.pyplot.subplots",
"numpy.real",
"matplotlib.pyplot.close"
],
[
"numpy.meshgrid",
"numpy.arange",
"numpy.ones",
"numpy.array",
"numpy.zeros",
"numpy.testing.assert_array_almost_equal"
],
[
"matplotlib.pyplot.legend",
... |
shubhamkumaR630/datasets | [
"fe9ee91849cefed0953141ea3588f73b7def78fd",
"fe9ee91849cefed0953141ea3588f73b7def78fd",
"fe9ee91849cefed0953141ea3588f73b7def78fd",
"fe9ee91849cefed0953141ea3588f73b7def78fd",
"fe9ee91849cefed0953141ea3588f73b7def78fd",
"fe9ee91849cefed0953141ea3588f73b7def78fd",
"fe9ee91849cefed0953141ea3588f73b7def78f... | [
"tensorflow_datasets/summarization/summscreen/summscreen.py",
"tensorflow_datasets/audio/fuss.py",
"tensorflow_datasets/object_detection/kitti.py",
"tensorflow_datasets/image_classification/binary_alpha_digits.py",
"tensorflow_datasets/image_classification/eurosat.py",
"tensorflow_datasets/graphs/cardioto... | [
"# coding=utf-8\n# Copyright 2022 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.io.gfile.GFile"
],
[
"tensorflow.io.gfile.exists",
"tensorflow.io.gfile.GFile"
],
[
"numpy.random.get_state",
"numpy.random.set_state",
"numpy.random.seed"
],
[
"tensorflow.io.gfile.GFile"
],
[
"tensorflow.io.gfile.GFile"
],
[
"tensorflow.data.Da... |
AK391/mt3 | [
"d43c95ccbf9caa08d18e985ca2f2fc7e286a2f66"
] | [
"mt3/datasets.py"
] | [
"# Copyright 2021 The MT3 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 ag... | [
[
"tensorflow.io.FixedLenFeature",
"tensorflow.io.FixedLenSequenceFeature"
]
] |
Leonardodsch/house-rocket-insights | [
"dd8405b776e223ec5ff8392a027d4b0116fcd7ca"
] | [
"house_rocket_app.py"
] | [
"import pandas as pd\nimport numpy as np\nimport streamlit as st\nimport plotly.express as px\nimport ipywidgets as widgets\nfrom ipywidgets import fixed\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nsns.set_style('whitegrid')\n\nst.set_page_config(layout='wide')\n\n@st.cache(allow_output_mutation=True)\... | [
[
"matplotlib.pyplot.tight_layout",
"pandas.read_csv",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.figure"
]
] |
OSSDC/OSSDC-VisionBasedACC | [
"a9004c888e91b8becaebc22524f698ebb3c9746e"
] | [
"object_detection/test_mobilenet.py"
] | [
"import numpy as np\nimport os\nimport six.moves.urllib as urllib\nimport sys\nimport tarfile\nimport tensorflow as tf\nimport zipfile\n\nfrom collections import defaultdict\nfrom io import StringIO\nfrom matplotlib import pyplot as plt\nfrom PIL import Image\n\nimport cv2\n\nfrom webcamvideostream import *\n\nvide... | [
[
"tensorflow.Graph",
"tensorflow.import_graph_def",
"numpy.expand_dims",
"tensorflow.gfile.GFile",
"numpy.squeeze",
"tensorflow.Session",
"tensorflow.GraphDef"
]
] |
UBC-MDS/eazieda | [
"214f3907e71ddbaa1b64c7a201cb0f07661263ac"
] | [
"tests/test_missing_impute.py"
] | [
"from eazieda.missing_impute import missing_impute\nimport pandas as pd\nimport numpy as np\nfrom pytest import raises, fixture\n\n\n@fixture\ndef df_miss():\n df = pd.DataFrame(\n [[1.0, \"x\"], [np.nan, \"y\"], [2.0, np.nan], [3.0, \"y\"]],\n columns=[\"a\", \"b\"],\n )\n return df\n\n\n@fi... | [
[
"pandas.DataFrame.equals",
"pandas.DataFrame"
]
] |
hui2000ji/scETM | [
"0a34c345d70b262ebc38e033bae683fa4929ed3e"
] | [
"src/scETM/models/BatchClassifier.py"
] | [
"from typing import Sequence, Mapping\nfrom numpy import mod\nimport torch\nfrom torch import nn\nfrom torch import optim\nimport torch.nn.functional as F\n\nfrom .model_utils import get_fully_connected_layers\nfrom scETM.logging_utils import log_arguments\n\nclass BatchClassifier(nn.Module):\n \"\"\"Docstring ... | [
[
"torch.nn.functional.log_softmax",
"torch.nn.functional.cross_entropy",
"torch.zeros_like",
"torch.cuda.is_available"
]
] |
traindb-project/traindb-model | [
"9ffdb8c0195051630692dbe6dfd8b9fe816a619f"
] | [
"models/TVAE.py"
] | [
"\"\"\"\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, softwar... | [
[
"torch.load",
"pandas.DataFrame",
"torch.save"
]
] |
dan-zheng/tensorflow | [
"5e04065935920b0a07175283408297e73d2191fb"
] | [
"tensorflow/python/keras/engine/base_layer_test.py"
] | [
"# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.keras.optimizer_v2.rmsprop.RMSprop",
"tensorflow.python.ops.summary_ops_v2.create_file_writer_v2",
"tensorflow.python.keras.testing_utils.get_model_from_layers",
"tensorflow.python.ops.array_ops.constant",
"numpy.dot",
"tensorflow.python.ops.array_ops.shape",
"tensor... |
CRLarry/StyleTransfer | [
"ddea81f8570232743bd7b8dbd569cf77f7cb5a28"
] | [
"royg_train.py"
] | [
"import math, random, time, pygame, sys\nfrom pygame.locals import *\nfrom PIL import Image\nimport numpy as np\nimport json\n\nprint(\"i tried\")\n\ndef random_select(distribution, color, iteration):\n random_r = int(np.random.normal(color[0], distribution[0] * 60 / (20*(iteration+1))))\n random_g = int(np.r... | [
[
"numpy.std",
"numpy.random.normal"
]
] |
dominique120/12-steps-navier-stokes | [
"3e195bf7f7895f83f5f2248ef48dc13b76e8b5de"
] | [
"l3/plot.py"
] | [
"#!/usr/bin/env python\n\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nmatplotlib.rcParams[\"font.family\"] = \"Serif\"\nmatplotlib.rcParams[\"font.size\"] = 10\nmatplotlib.rcParams[\"axes.labelsize\"] = 10\nmatplotlib.rcParams[\"xtick.labelsize\"] = 10\nmatplotlib.rcParams[\"ytick.labe... | [
[
"numpy.array",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figure"
]
] |
romanbird/jeopardy-bot | [
"d47600d9261fefcb5f08d699ddf8b5fdcd072da1"
] | [
"assets/csv_counter.py"
] | [
"import csv\nimport pandas as pd\nfrom tqdm import tqdm\nfrom collections import Counter\ndbRead = open('db.csv', \"r\", newline='', encoding='utf8')\ndb = list(csv.reader(dbRead, delimiter=\",\"))\ncolumn = [row[-1] for row in db]\nfor row in tqdm(db):\n row[-2]=Counter(column)[row[-1]]\ndf=pd.DataFrame(data=db... | [
[
"pandas.DataFrame"
]
] |
xumm94/2018_data_science_bowl | [
"9f7a6b60b7c1e933c30acd8abbdeeb7bd869a3f6"
] | [
"train_nuclei.py"
] | [
"# coding: utf-8\n\n\"\"\"\nMask R-CNN - Train on Nuclei Dataset (Updated from train_shape.ipynb)\n\nThis notebook shows how to train Mask R-CNN on your own dataset. \nTo keep things simple we use a synthetic dataset of shapes (squares, \ntriangles, and circles) which enables fast training. You'd still \nneed a GPU... | [
[
"pandas.Series",
"numpy.multiply",
"pandas.DataFrame",
"numpy.mean",
"numpy.any",
"numpy.zeros"
]
] |
mitenjain/protpore | [
"06b779473c4bf9f9c8c4305aa08873ae75386886"
] | [
"proteinhmmvisualize.py"
] | [
"'''\r\nAuthor: Hannah Meyers\r\n\r\nThis file contains the experiment code for attempting to model\r\nprotein nanopore traces via HMMs. Please see inline comments\r\nfor an explanation of what each piece of the code is doing.\r\n'''\r\nfrom __future__ import print_function\r\n\r\nfrom PyPore.parsers import *\r\nfr... | [
[
"pandas.read_csv",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.figure"
]
] |
cloudscenes/geopandas | [
"409d8f0a1562df088ce28c39a48fe4df669660fe"
] | [
"geopandas/tools/tests/test_clip.py"
] | [
"\"\"\"Tests for the clip module.\"\"\"\n\nimport warnings\nfrom distutils.version import LooseVersion\n\nimport numpy as np\nimport pandas as pd\n\nimport shapely\nfrom shapely.geometry import (\n Polygon,\n Point,\n LineString,\n LinearRing,\n GeometryCollection,\n MultiPoint,\n)\n\nimport geopa... | [
[
"numpy.array",
"numpy.array_equal"
]
] |
mendelmaker/yolact | [
"83e7d08f03951c49a9731759e8458c51fe0922d7"
] | [
"eval.py"
] | [
"import json\nimport numpy as np\nimport torch\nimport pycocotools\nimport argparse\nfrom pycocotools.coco import COCO\nfrom pycocotools.cocoeval import COCOeval\nfrom terminaltables import AsciiTable\nfrom collections import OrderedDict\nimport torch.backends.cudnn as cudnn\n\nfrom data.coco import COCODetection\n... | [
[
"torch.set_default_tensor_type",
"torch.Tensor",
"torch.no_grad",
"torch.cuda.is_available",
"numpy.searchsorted",
"numpy.array"
]
] |
nealde/Ampere | [
"75fa9c34940a71ef865eb98b551b4a4a27da96c3",
"75fa9c34940a71ef865eb98b551b4a4a27da96c3"
] | [
"setup.py",
"ampere/models/P2D/solve.py"
] | [
"import setuptools\nimport pkg_resources\n\nfrom setuptools import setup, Extension\n\n\ndef is_installed(requirement):\n try:\n pkg_resources.require(requirement)\n except pkg_resources.ResolutionError:\n return False\n else:\n return True\n\n\nif not is_installed('numpy>=1.11.0'):\n ... | [
[
"numpy.get_include"
],
[
"numpy.concatenate",
"numpy.nonzero"
]
] |
hboshnak/mindarmour | [
"0609a4eaea875a84667bed279add9305752880cc",
"0609a4eaea875a84667bed279add9305752880cc",
"0609a4eaea875a84667bed279add9305752880cc",
"0609a4eaea875a84667bed279add9305752880cc"
] | [
"mindarmour/fuzz_testing/model_coverage_metrics.py",
"tests/ut/python/privacy/diff_privacy/test_monitor.py",
"examples/reliability/model_fault_injection.py",
"mindarmour/adv_robustness/attacks/black/genetic_attack.py"
] | [
"# Copyright 2019 Huawei Technologies Co., Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l... | [
[
"numpy.min",
"numpy.sort",
"numpy.logical_or",
"numpy.max",
"numpy.any",
"numpy.floor",
"numpy.transpose",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.random.random",
"numpy.random.randint"
],
[
"numpy.concatenate"
],
[
"numpy.expand_dims",
"numpy.asa... |
Exusial/jittor | [
"eca21d5bba5098bce4f492fa44908677b6e76588",
"eca21d5bba5098bce4f492fa44908677b6e76588",
"eca21d5bba5098bce4f492fa44908677b6e76588",
"eca21d5bba5098bce4f492fa44908677b6e76588",
"eca21d5bba5098bce4f492fa44908677b6e76588"
] | [
"python/jittor/test/test_argsort_op.py",
"python/jittor/contrib.py",
"python/jittor/test/test_broadcast_to_op.py",
"python/jittor/test/test_models.py",
"python/jittor/test/test_cub_cumsum.py"
] | [
"# ***************************************************************\n# Copyright (c) 2021 Jittor. All Rights Reserved. \n# Maintainers: \n# Guoye Yang <498731903@qq.com>\n# Dun Liang <randonlang@gmail.com>. \n# \n# This file is subject to the terms and conditions defined in\n# file 'LICENSE.txt', which is pa... | [
[
"numpy.allclose",
"numpy.sort"
],
[
"numpy.array"
],
[
"numpy.multiply.reduce",
"numpy.arange",
"numpy.broadcast_arrays"
],
[
"numpy.random.random",
"torch.no_grad",
"torch.cuda.empty_cache",
"torch.Tensor"
],
[
"numpy.allclose"
]
] |
6666ev/bert_seq2seq | [
"caa9b6c5629ae5783c733aebbbcf669d8ab5dde2",
"caa9b6c5629ae5783c733aebbbcf669d8ab5dde2",
"caa9b6c5629ae5783c733aebbbcf669d8ab5dde2"
] | [
"examples/roberta_coarsness_NER_CRF_train.py",
"my_gpt2_generate_article.py",
"bert_seq2seq/basic_bert.py"
] | [
"## 粗粒度ner加crf层的例子\nimport torch\nfrom tqdm import tqdm\nimport unicodedata\nimport os\nimport time\nfrom torch.utils.data import Dataset, DataLoader\nfrom bert_seq2seq import Tokenizer, load_chinese_base_vocab\nfrom bert_seq2seq import load_bert\n\ndata_path = \"./state_dict/corase_train_update.txt\"\n\nvocab_path... | [
[
"torch.optim.Adam",
"torch.cat",
"torch.utils.data.DataLoader",
"torch.tensor",
"torch.cuda.is_available",
"torch.arange"
],
[
"torch.optim.Adam",
"torch.utils.data.DataLoader",
"torch.cuda.is_available",
"torch.tensor"
],
[
"torch.load",
"torch.cuda.empty_c... |
panaali/qubovert | [
"d5ea46349d2a058954fb2cb06f559c0d3fb382c5"
] | [
"tests/problems/np/test_graphpartitioning.py"
] | [
"# Copyright 2020 Joseph T. Iosue\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 applicabl... | [
[
"numpy.allclose"
]
] |
JackKelly/Geocode | [
"b3cc89c7467384e41c5be6bcd80b36271cfc252c"
] | [
"geocode/latlons2llsoa.py"
] | [
"#!/usr/bin/env python3\n\"\"\"\nLoad a list of lat/lons from a CSV file and reverse-geocode them to LLSOA.\n\n- Jamie Taylor <jamie.taylor@sheffield.ac.uk>\n- First Authored: 2020-04-16\n\"\"\"\n\nimport sys\nimport os\nimport argparse\nimport time as TIME\nimport pandas as pd\n\nfrom geocode import Geocoder, quer... | [
[
"pandas.read_csv"
]
] |
Ishticode/kornia | [
"974abb43ec72d12dbd244a2fb247bbbab8498de0",
"974abb43ec72d12dbd244a2fb247bbbab8498de0",
"974abb43ec72d12dbd244a2fb247bbbab8498de0",
"974abb43ec72d12dbd244a2fb247bbbab8498de0",
"974abb43ec72d12dbd244a2fb247bbbab8498de0",
"974abb43ec72d12dbd244a2fb247bbbab8498de0",
"974abb43ec72d12dbd244a2fb247bbbab8498de... | [
"kornia/enhance/histogram.py",
"kornia/contrib/face_detection.py",
"docs/source/_static/image_registration.py",
"test/filters/test_unsharp_mask.py",
"test/feature/test_mkd.py",
"kornia/geometry/linalg.py",
"kornia/augmentation/random_generator/_2d/affine.py"
] | [
"from typing import Optional, Tuple\n\nimport torch\n\n\ndef marginal_pdf(\n values: torch.Tensor, bins: torch.Tensor, sigma: torch.Tensor, epsilon: float = 1e-10\n) -> Tuple[torch.Tensor, torch.Tensor]:\n \"\"\"Calculate the marginal probability distribution function of the input tensor based on the number o... | [
[
"torch.mean",
"torch.zeros_like",
"torch.sum",
"torch.exp",
"torch.arange",
"torch.ones_like"
],
[
"torch.cat",
"torch.nn.Conv2d",
"torch.nn.init.xavier_normal_",
"torch.tensor",
"torch.exp",
"torch.nn.BatchNorm2d",
"torch.device",
"torch.nn.ReLU",
"... |
Rosna/P4ML-UI | [
"edf0dd830588f03b197e4d6532830a5aedd88424"
] | [
"spider/featurization/load_subclip_audio.py"
] | [
"import argparse\nimport librosa\nimport numpy as np\n\ndef make_subclips(audio, sr, clip_size, pad=True):\n # Given a list of audio files and corresponding sample rates,\n # return a 2D list of subclips, each of size clip_size\n # Optional padding takes care of audio files shorter than clip size\n clip... | [
[
"numpy.zeros"
]
] |
Johnzhjw/CIT2FR-FL-NAS | [
"53e93075ff1834ab817ad6359025ddafd20e6ef4",
"53e93075ff1834ab817ad6359025ddafd20e6ef4"
] | [
"run_manager.py",
"moead.py"
] | [
"# Once for All: Train One Network and Specialize it for Efficient Deployment\n# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han\n# International Conference on Learning Representations (ICLR), 2020.\n\nimport os\nimport time\nimport json\nimport math\nfrom tqdm import tqdm\n\nimport numpy as np\n\nimport ... | [
[
"torch.nn.CrossEntropyLoss",
"torch.nn.functional.softmax",
"torch.nn.functional.mse_loss",
"numpy.mean",
"torch.nn.DataParallel"
],
[
"numpy.random.random",
"numpy.random.choice",
"numpy.reshape",
"numpy.isnan",
"scipy.spatial.distance.cdist",
"numpy.full",
"nu... |
crsqq/OpenNE | [
"0cecb2b5076b878d2f07ed1130682aeab6ce37f1"
] | [
"wrapper.py"
] | [
"from OpenNE.src.libnrl import graph\nfrom OpenNE.src.libnrl import grarep\nfrom OpenNE.src.libnrl import line\nfrom OpenNE.src.libnrl import node2vec\nfrom OpenNE.src.libnrl.gcn import gcnAPI\nfrom itertools import product\nimport networkx as nx\nimport numpy as np\nimport tensorflow as tf\n\ndef nx_to_openne_grap... | [
[
"numpy.arange",
"scipy.sparse.linalg.eigen.arpack.eigsh",
"numpy.random.normal",
"tensorflow.reset_default_graph",
"numpy.linalg.qr",
"numpy.array"
]
] |
thibnoel/solopython | [
"0977c6de8bcee2b8ecabaa46f6953e7a05334af1"
] | [
"minimal_controler.py"
] | [
"# coding: utf8\nfrom coll_avoidance_modules.solo_coll_wrapper_c import *\nfrom coll_avoidance_modules.collisions_controller import *\n\nfrom PA_utils_mpc import PyBulletSimulator\nimport numpy as np\nimport argparse\n# from solo12 import Solo12\n# from pynput import keyboard\n\nfrom PA_logger import Logger\n# from... | [
[
"numpy.zeros"
]
] |
ratt-ru/dask-ms | [
"becd3572f86a0ad78b55540f25fce6e129976a29"
] | [
"daskms/tests/test_ordering.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport dask\nimport dask.array as da\nfrom numpy.testing import assert_array_equal\nimport pyrap.tables as pt\nimport pytest\n\nfrom daskms.table_proxy import TableProxy\nfrom daskms.ordering import (ordering_taql,\n row_ordering,\n ... | [
[
"numpy.testing.assert_array_equal"
]
] |
TB5zhh/ViewpointBottleneck | [
"db0fe4b61ae42eceff21296844200d636e6e5e83"
] | [
"lib/distributed_utils.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\nimport os\nimport pickle\nimport socket\nimport struct\nimport subprocess\nimport warnings\n\nimport torch\nimport torch.distributed... | [
[
"torch.ByteTensor",
"torch.distributed.init_process_group",
"torch.zeros",
"torch.cuda.ByteTensor",
"torch.distributed.is_initialized",
"torch.cuda.is_available",
"torch.distributed.get_rank",
"torch.distributed.get_world_size",
"torch.distributed.all_reduce"
]
] |
ntgiwsvp/qiskit-terra | [
"206b8bcc930817d88f8244f7b984880aecde959d"
] | [
"qiskit/circuit/gate.py"
] | [
"# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any modifications or ... | [
[
"numpy.diag"
]
] |
dynasty-com/NeMo | [
"1ac828df423fbcec1b34c650b3a20266bb133dde",
"1ac828df423fbcec1b34c650b3a20266bb133dde",
"1ac828df423fbcec1b34c650b3a20266bb133dde"
] | [
"nemo/collections/asr/models/label_models.py",
"nemo/collections/asr/data/audio_to_text.py",
"nemo/collections/nlp/models/language_modeling/bert_lm_model.py"
] | [
"# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"torch.stack",
"torch.cat"
],
[
"torch.load",
"torch.tensor",
"torch.repeat_interleave",
"torch.stack",
"torch.nn.functional.pad"
],
[
"torch.stack"
]
] |
GBATZOLIS/CAFLOW | [
"ea33f84c424bd8e46999be59cd5d52bd8f0a3a77"
] | [
"caflow/models/modules/mri_to_pet/UnconditionalFlow.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Jan 19 22:02:53 2021\n\n@author: gbatz97\n\"\"\"\n\nimport torch.nn as nn\nimport torch\nfrom caflow.models.modules.blocks.FlowBlock import FlowBlock \nfrom caflow.models.modules.blocks.Dequantisation import Dequantisation, ... | [
[
"torch.distributions.normal.Normal",
"torch.nn.ModuleList",
"torch.cat"
]
] |
tech-srl/c3po | [
"a673a0514ee8c800efa12574ef8da3fcb8ef73b7",
"a673a0514ee8c800efa12574ef8da3fcb8ef73b7"
] | [
"LaserTagger/Models/TransformerCRF_V2.py",
"LaserTagger/Models/SequenceEncoder.py"
] | [
"from torch import nn\nfrom Models.CRF import CRF\nfrom Models.Transformer import Transformer\nfrom Models.TransformerCtx import TransformerCtx\nfrom Models.SequenceEncoder import SequenceEncoder\nfrom Models.Attention import Attention\nimport torch\nfrom torch.nn.utils.rnn import pack_padded_sequence, pad_packed_s... | [
[
"torch.Tensor",
"torch.cat",
"torch.nn.utils.rnn.pack_padded_sequence",
"torch.nn.Linear",
"torch.nn.init.xavier_uniform_"
],
[
"torch.nn.Dropout",
"torch.nn.LSTM",
"torch.cat",
"torch.nn.utils.rnn.pack_padded_sequence",
"torch.tanh",
"torch.nn.Linear",
"torch.n... |
kevinintel/neural-compressor | [
"b57645566aeff8d3c18dc49d2739a583c072f940",
"b57645566aeff8d3c18dc49d2739a583c072f940",
"b57645566aeff8d3c18dc49d2739a583c072f940",
"b57645566aeff8d3c18dc49d2739a583c072f940",
"b57645566aeff8d3c18dc49d2739a583c072f940",
"b57645566aeff8d3c18dc49d2739a583c072f940",
"b57645566aeff8d3c18dc49d2739a583c072f94... | [
"examples/pytorch/eager/image_recognition/cifar100/main.py",
"examples/pytorch/fx/object_detection/ssd_resnet34/ptq/python/main.py",
"test/test_tensorflow_set_tensor.py",
"examples/engine/nlp/mrpc/bert_base_sparse/utils.py",
"neural_compressor/adaptor/engine_utils/util.py",
"test/test_tensorflow_graph_cse... | [
"import os\nimport time\nimport shutil\nimport argparse\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision.models.vgg as vgg\nimport torchvision.datasets as datasets\nimport torchvision.transforms as transforms\n\nfrom plain_cnn_cifar import ConvNetMaker, p... | [
[
"numpy.random.seed",
"torch.load",
"torch.manual_seed",
"torch.utils.data.DataLoader",
"torch.no_grad",
"torch.cuda.manual_seed_all",
"numpy.load",
"numpy.array",
"torch.save"
],
[
"numpy.array",
"numpy.mean",
"numpy.percentile"
],
[
"tensorflow.math.add... |
ColinRTaylor/evalml | [
"5b372d0dfac05ff9b7e41eb494a9df1bf2da4a9d",
"5b372d0dfac05ff9b7e41eb494a9df1bf2da4a9d"
] | [
"evalml/tests/integration_tests/test_data_checks_and_actions_integration.py",
"evalml/model_understanding/_partial_dependence.py"
] | [
"import numpy as np\nimport pandas as pd\nimport pytest\nimport woodwork as ww\nfrom pandas.testing import assert_frame_equal, assert_series_equal\n\nfrom evalml.automl import get_default_primary_search_objective\nfrom evalml.data_checks import DefaultDataChecks, OutliersDataCheck\nfrom evalml.data_checks.invalid_t... | [
[
"pandas.testing.assert_series_equal",
"pandas.Series",
"numpy.arange",
"numpy.tile",
"pandas.DataFrame",
"pandas.testing.assert_frame_equal"
],
[
"pandas.Series",
"numpy.allclose",
"numpy.unique",
"numpy.asarray",
"numpy.linspace",
"pandas.Timestamp",
"numpy... |
markvilar/Cardinal | [
"a3d87d34ed253a7a4400ed056c5d59c20f15973b"
] | [
"Python/filter_dvl.py"
] | [
"import argparse\nimport datetime\nimport numpy as np\nimport pandas as pd\nimport matplotlib\nmatplotlib.use(\"TkAgg\")\nimport matplotlib.pyplot as plt\nplt.style.use(\"./Styles/Scientific.mplstyle\")\n\nfrom typing import Dict, List\n\nimport data\nimport filters\nimport utilities\nimport utm\n\ndef filter_dvl(d... | [
[
"pandas.read_csv",
"matplotlib.use",
"pandas.DataFrame",
"numpy.mean",
"numpy.array",
"matplotlib.pyplot.style.use"
]
] |
natalia-rubio/py_grama | [
"968c1c0238d7165de3b1b96534791feacc4aa960"
] | [
"docs/scripts/ex_sinews.py"
] | [
"import grama as gr\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nfrom grama.models import make_cantilever_beam\nmd_beam = make_cantilever_beam()\n\nmd_beam >> \\\n gr.ev_sinews(n_density=50, n_sweeps=10, df_det=\"nom\", skip=True) >> \\\n gr.pt_auto()\nplt.savefig(\"../images/ex_beam_sinews_doe.pn... | [
[
"matplotlib.pyplot.savefig"
]
] |
ahmed-f-alrefaie/forecaster | [
"25b73a533f6195f3e5c703730e63cb3e242c649a"
] | [
"forecaster/func.py"
] | [
"import numpy as np\nfrom scipy.stats import norm, truncnorm\nfrom numpy.random import default_rng\n\n\n### fix the number of different populations\nn_pop = 4\n\ndef pick_random_hyper(all_hyper, sample_size=None):\n\trng = default_rng()\n\tsize = sample_size or all_hyper.shape[0]\n\treturn rng.choice(all_hyper, siz... | [
[
"scipy.stats.norm.ppf",
"numpy.sum",
"scipy.stats.norm.pdf",
"numpy.zeros_like",
"numpy.insert",
"numpy.where",
"numpy.random.rand",
"numpy.array",
"numpy.zeros",
"scipy.stats.truncnorm.rvs",
"numpy.random.default_rng"
]
] |
drkostas/SemiSeg-Contrastive | [
"af6b133400368911ef77f401b7673894fe6aa05c"
] | [
"utils/transformsgpu.py"
] | [
"'''\nCode taken from https://github.com/WilhelmT/ClassMix\nSlightly modified\n'''\n\nimport kornia\nimport torch\nimport random\nimport torch.nn as nn\n\n\ndef normalize_rgb(data, dataset):\n \"\"\"\n\n Args:\n data: data to normalize BxCxWxH\n dataset: name of the dataset to normalize\n\n R... | [
[
"torch.nn.ConstantPad2d",
"torch.flip",
"torch.Tensor",
"torch.nn.functional.interpolate"
]
] |
krowck/ISDA-NCjDE-HJ | [
"44c33ba12542a88eaa39fe2b72398ffd7b439372"
] | [
"NDBSCANjDE/CF3.py"
] | [
"###############################################################################\n# Version: 1.1\n# Last modified on: 3 April, 2016 \n# Developers: Michael G. Epitropakis\n# email: m_(DOT)_epitropakis_(AT)_lancaster_(DOT)_ac_(DOT)_uk \n###########################################################################... | [
[
"numpy.eye",
"numpy.ones",
"numpy.random.rand",
"numpy.array",
"numpy.zeros",
"numpy.loadtxt"
]
] |
13rianlucero/CrabAgePrediction | [
"92bc7fbe1040f49e820473e33cc3902a5a7177c7",
"92bc7fbe1040f49e820473e33cc3902a5a7177c7",
"d73a6b7f68d7bab25d134d3f85c6b63a86c206c5",
"92bc7fbe1040f49e820473e33cc3902a5a7177c7",
"92bc7fbe1040f49e820473e33cc3902a5a7177c7",
"92bc7fbe1040f49e820473e33cc3902a5a7177c7",
"d73a6b7f68d7bab25d134d3f85c6b63a86c206c... | [
"crabageprediction/venv/Lib/site-packages/pandas/tests/extension/base/dim2.py",
"crabageprediction/venv/Lib/site-packages/pandas/tests/frame/methods/test_values.py",
"crabageprediction/venv/Lib/site-packages/numpy/f2py/tests/test_compile_function.py",
"crabageprediction/venv/Lib/site-packages/pandas/tests/io/... | [
"\"\"\"\nTests for 2D compatibility.\n\"\"\"\nimport numpy as np\nimport pytest\n\nfrom pandas._libs.missing import is_matching_na\n\nimport pandas as pd\nfrom pandas.core.arrays.integer import INT_STR_TO_DTYPE\nfrom pandas.tests.extension.base.base import BaseExtensionTests\n\n\nclass Dim2CompatTests(BaseExtension... | [
[
"numpy.dtype",
"pandas._libs.missing.is_matching_na",
"pandas.DataFrame"
],
[
"pandas._testing.assert_numpy_array_equal",
"pandas._testing.assert_equal",
"pandas.Timestamp",
"numpy.isnan",
"numpy.shares_memory",
"pandas.DataFrame",
"numpy.concatenate",
"pandas.date_... |
ssh0/growing-string | [
"2e43916e91157dfb4253775149b35ec9d81ef14d",
"2e43916e91157dfb4253775149b35ec9d81ef14d",
"2e43916e91157dfb4253775149b35ec9d81ef14d",
"2e43916e91157dfb4253775149b35ec9d81ef14d"
] | [
"triangular_lattice/diecutting/result_n2.py",
"triangular_lattice/fractal_dim_from_mass2.py",
"triangular_lattice/fill_bucket.py",
"triangular_lattice/diecutting/result_count_on_edge.py"
] | [
"#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n#\n# written by Shotaro Fujimoto\n# 2016-12-07\n\nimport matplotlib.pyplot as plt\n# from mpl_toolkits.mplot3d.axes3d import Axes3D\nimport matplotlib.cm as cm\nimport numpy as np\nfrom scipy.optimize import curve_fit\nfrom scipy.stats import gamma\nimport set_data_pa... | [
[
"matplotlib.pyplot.subplots",
"numpy.load",
"numpy.array",
"numpy.sum",
"matplotlib.pyplot.show"
],
[
"matplotlib.pyplot.show",
"numpy.array",
"matplotlib.pyplot.subplots",
"numpy.loadtxt"
],
[
"numpy.hstack",
"matplotlib.collections.PatchCollection",
"matpl... |
bilgetutak/pyroms | [
"cd0fe39075825f97a7caf64e2c4c5a19f23302fd",
"cd0fe39075825f97a7caf64e2c4c5a19f23302fd",
"cd0fe39075825f97a7caf64e2c4c5a19f23302fd",
"a4f6547bce872068a5bb5751231017bc3e4a4503",
"cd0fe39075825f97a7caf64e2c4c5a19f23302fd",
"cd0fe39075825f97a7caf64e2c4c5a19f23302fd",
"cd0fe39075825f97a7caf64e2c4c5a19f23302f... | [
"examples/Yellow_Sea/make_YELLOW_grd_v1.py",
"pyroms_toolbox/pyroms_toolbox/Grid_HYCOM/make_remap_grid_file.py",
"examples/Arctic_runoff/addto_runoff_file.py",
"pyroms_toolbox/pyroms_toolbox/rvalue.py",
"examples/make_tide/CGrid_TPXO8/CGrid_TPXO8.py",
"bathy_smoother/setup.py",
"examples/make_tide/CGrid... | [
"import os\nfrom pyroms import _iso\nimport numpy as np\nfrom mpl_toolkits.basemap import Basemap, shiftgrid\nfrom scipy.interpolate import griddata\nimport matplotlib.colors as colors\nfrom scipy.signal import medfilt2d\nimport netCDF4\n\nimport pyroms\nfrom bathy_smoother import *\n\n# Grid dimension\nLm = 140\nM... | [
[
"numpy.meshgrid",
"scipy.interpolate.griddata",
"numpy.array",
"numpy.where",
"numpy.zeros"
],
[
"numpy.zeros"
],
[
"numpy.meshgrid",
"numpy.size",
"numpy.array",
"numpy.zeros",
"numpy.where"
],
[
"numpy.isnan",
"numpy.maximum",
"numpy.diff",
... |
alinaselega/gap_statistic | [
"2b94c46b676eef839f7709441a89bdc5796b2d31"
] | [
"tests/test_optimalK.py"
] | [
"# -*- coding: utf-8 -*-\nimport os\nimport pytest\n\nimport numpy as np\nfrom sklearn.datasets import make_blobs\nfrom sklearn.cluster import KMeans, MeanShift\n\nfrom gap_statistic import OptimalK\n\n\ndef test_bad_init_config():\n \"\"\"\n Cannot define own clustering function and try to use Rust backend\n... | [
[
"numpy.arange",
"numpy.allclose",
"sklearn.datasets.make_blobs"
]
] |
noushadkhan01/my_methods | [
"fc467d5c34b9b5dd105e32cc5aad218d3f6408a8"
] | [
"my_methods/my_cap_curve.py"
] | [
"def my_cap_curve(model, X, y, figsize = (10, 5),legend_font_size = 10,loc = 'best',\n linewidth = 2,label_font_size = 10, poly_features = False, extra_name = None):\n import matplotlib.pyplot as plt\n import numpy as np\n import my_global_variables\n from sklearn.metrics import roc_curve, auc\n... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"numpy.arange",
"numpy.cumsum",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"sklearn.metrics.auc",
"matplotlib.pyplot.show",
"numpy.sum",
"matplotlib.pyplot.figure"
]
] |
akurniawan/jina-hub | [
"d89bc5e8f527f1212c3228a15775e222983c0087"
] | [
"encoders/audio/Wav2VecSpeechEncoder/__init__.py"
] | [
"__copyright__ = \"Copyright (c) 2020 Jina AI Limited. All rights reserved.\"\n__license__ = \"Apache-2.0\"\n\nimport os\nfrom typing import Optional\n\nimport numpy as np\n\nfrom jina.executors.decorators import batching, as_ndarray\nfrom jina.executors.encoders import BaseAudioEncoder\nfrom jina.executors.encoder... | [
[
"torch.device"
]
] |
vigneshyaadav27/Grid-world | [
"a5c4cab46cdafc6458526593ae31ac19a152001d"
] | [
"grid_world.py"
] | [
"#######################################################################\r\n# Copyright (C) #\r\n# 2016-2018 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #\r\n# 2016 Kenta Shimada(hyperkentakun@gmail.com) #\r\n# Permission gi... | [
[
"numpy.linalg.solve",
"numpy.abs",
"matplotlib.use",
"numpy.eye",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"numpy.round",
"matplotlib.table.Table",
"numpy.max",
"numpy.zeros_like",
"matplotlib.pyplot.close",
"numpy.ravel_multi_index",
"numpy.nd... |
seiyab/chainer | [
"39fffb9597a6e9646307fba27ad3233c65d38632"
] | [
"chainer/training/extensions/variable_statistics_plot.py"
] | [
"from __future__ import division\nimport os\nimport warnings\n\nimport numpy\nimport six\n\nimport chainer\nfrom chainer import backend\nfrom chainer.backends import cuda\nfrom chainer.training import extension\nfrom chainer.training import trigger as trigger_module\nfrom chainer.utils import argument\n\n\n_availab... | [
[
"numpy.random.random",
"numpy.asarray",
"matplotlib.pyplot.subplots",
"matplotlib.colors.ColorConverter",
"matplotlib.pyplot.close",
"numpy.argsort",
"numpy.zeros",
"numpy.random.randint"
]
] |
Gikiman/executors | [
"98658b4136859164390cfccbde8cf0f7cf843593"
] | [
"jinahub/encoders/audio/VGGISHAudioEncoder/vggish_audio_encoder.py"
] | [
"__copyright__ = \"Copyright (c) 2021 Jina AI Limited. All rights reserved.\"\n__license__ = \"Apache-2.0\"\n\nimport os\nfrom pathlib import Path\nfrom typing import Any, Optional, List, Iterable\n\nfrom jina import Executor, requests, DocumentArray\nfrom jina.logging.logger import JinaLogger\nimport requests as _... | [
[
"tensorflow.compat.v1.Session",
"tensorflow.compat.v1.disable_eager_execution"
]
] |
iguarna/uwb-ieee | [
"782813b8a6fc9effeb076c47cd5d497b6e62b330"
] | [
"uwb_channel.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\ndef gen_channel(parameters, fc=5E9, fs=2E9, dynamic_range=30):\n\n # Calculate samples/nanosec ratio\n nanosec_to_samples = int(1E-9 * fs)\n\n #####################################\n # Unpack parameters and convert units\n\n cluster_rate = param... | [
[
"numpy.random.lognormal",
"numpy.log",
"numpy.abs",
"numpy.fft.fft",
"numpy.power",
"numpy.linspace",
"numpy.multiply",
"numpy.random.exponential",
"numpy.fft.ifft",
"numpy.append",
"numpy.random.gamma",
"numpy.exp",
"numpy.random.uniform",
"matplotlib.pyplo... |
cbarros7/holbertonschool-machine_learning | [
"1edb4c253441f6319b86c9c590d1e7dd3fc32bf4",
"1edb4c253441f6319b86c9c590d1e7dd3fc32bf4",
"1edb4c253441f6319b86c9c590d1e7dd3fc32bf4",
"1edb4c253441f6319b86c9c590d1e7dd3fc32bf4"
] | [
"supervised_learning/0x03-optimization/12-learning_rate_decay.py",
"unsupervised_learning/0x03-hyperparameter_tuning/4-bayes_opt.py",
"supervised_learning/0x01-classification/1-neuron.py",
"supervised_learning/0x03-optimization/test/9-main.py"
] | [
"#!/usr/bin/env python3\n\"\"\"Learning Rate Decay Upgraded\"\"\"\nimport tensorflow as tf\n\n\ndef learning_rate_decay(alpha, decay_rate, global_step, decay_step):\n \"\"\"learning_rate_decay: creates a learning rate decay operation in\n tensorflow using inverse time decay:\n\n Arg... | [
[
"tensorflow.train.inverse_time_decay"
],
[
"scipy.stats.norm.cdf",
"numpy.linspace",
"numpy.min",
"scipy.stats.norm.pdf",
"numpy.max",
"numpy.argmax",
"numpy.zeros"
],
[
"numpy.random.normal"
],
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.tight_layout",... |
raphaottoni/youtube-hatespeech | [
"4467d065c2bddd86feec673ad74670c4c975f017"
] | [
"analyses/weat.py"
] | [
"from gensim import corpora, models, similarities\nimport json\nimport numpy\nimport random\nimport csv\nimport itertools\nimport gensim, copy\nfrom collections import defaultdict\nimport glob, os\n\ntarget_words = {}\nattribute_words= {}\nweats_name = []\n\n# 1 WEAT Immigrants\ntarget_words[\"1_a\"] = [\"immigrant... | [
[
"numpy.dot",
"numpy.std",
"numpy.linalg.norm"
]
] |
imisi-akande/disaster-response-pipeline | [
"d691e643c57e45b226ca3cb2c0b4a708c7edfe8b"
] | [
"app/run.py"
] | [
"import json\nimport plotly\nimport pandas as pd\nimport nltk\nfrom nltk.stem import WordNetLemmatizer\nfrom nltk.tokenize import word_tokenize, sent_tokenize\nfrom nltk import pos_tag, word_tokenize\nfrom nltk.stem import WordNetLemmatizer\nfrom nltk.tokenize import word_tokenize\n\nfrom flask import Flask\nfrom f... | [
[
"pandas.read_sql_table",
"pandas.Series",
"pandas.DataFrame"
]
] |
ess-dmsc/JustBinIt | [
"dc8242ed44f03e92f60618c96596025ec8cbc40e"
] | [
"tests/test_histogram2d.py"
] | [
"import numpy as np\nimport pytest\n\nfrom just_bin_it.histograms.histogram2d import Histogram2d\n\nIRRELEVANT_TOPIC = \"some-topic\"\n\n\nclass TestHistogram2dFunctionality:\n @pytest.fixture(autouse=True)\n def prepare(self):\n self.pulse_time = 1234\n self.num_bins = (5, 10)\n self.tof... | [
[
"numpy.array_equal"
]
] |
MGH-LMIC/CXR-autolabeling | [
"74eac30bb6eaa6c1d5a8b343743024ef6bd9db7d"
] | [
"autolabeling.py"
] | [
"import re\nimport pickle\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib.cm as mpl_color_map\n\nfrom tqdm import tqdm\nfrom pathlib import Path\nfrom prettytable import PrettyTable\nfrom scipy.ndimage import gaussian_filter\nfrom sklearn.metrics import roc_curve, precis... | [
[
"pandas.read_csv",
"torch.ones",
"torch.zeros",
"torch.cat",
"torch.from_numpy",
"pandas.DataFrame",
"matplotlib.pyplot.subplots",
"torch.nn.functional.sigmoid",
"numpy.mean",
"torch.no_grad",
"torch.where",
"torch.FloatTensor",
"numpy.array"
]
] |
aureocarneiro/sardana | [
"43644c9966d73c7a9023b53e97b530f3ea0dfb39",
"43644c9966d73c7a9023b53e97b530f3ea0dfb39"
] | [
"src/sardana/macroserver/macros/scan.py",
"src/sardana/macroserver/recorders/h5storage.py"
] | [
"##############################################################################\n##\n# This file is part of Sardana\n##\n# http://www.sardana-controls.org/\n##\n# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain\n##\n# Sardana is free software: you can redistribute it and/or modify\n# it under the terms o... | [
[
"numpy.linspace",
"numpy.min",
"numpy.gradient",
"numpy.ones",
"numpy.max",
"numpy.argmax",
"numpy.argmin",
"numpy.mean",
"numpy.any",
"numpy.array",
"numpy.sum"
],
[
"numpy.issubdtype",
"numpy.int8",
"numpy.isscalar",
"numpy.array",
"numpy.zeros... |
rdarie/kCSD-python | [
"4dd0015e9c5598e7eceeeb25668e696e495b2026"
] | [
"figures/kCSD_properties/targeted_basis.py"
] | [
"\"\"\"\n@author: mkowalska\n\"\"\"\nimport os\nfrom os.path import expanduser\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport datetime\nimport time\n\nfrom kcsd import ValidateKCSD, ValidateKCSD1D, SpectralStructure, KCSD1D\n\n__abs_file__ = os.path.abspath(__file__)\nhome = expanduser('~')\nDAY = dat... | [
[
"numpy.dot",
"matplotlib.pyplot.tight_layout",
"numpy.sqrt",
"numpy.linspace",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"numpy.max",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.close",
"numpy.exp",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.suptit... |
chanyh0/PyTorch-StudioGAN | [
"5a912affc1ec975d97a33a12d1c96d05d4b883f0",
"5a912affc1ec975d97a33a12d1c96d05d4b883f0",
"5a912affc1ec975d97a33a12d1c96d05d4b883f0",
"5a912affc1ec975d97a33a12d1c96d05d4b883f0"
] | [
"src/train_eval.py",
"src/train_eval_impgd.py",
"src/models/resnet.py",
"src/metrics/Accuracy.py"
] | [
"# PyTorch StudioGAN: https://github.com/POSTECH-CVLab/PyTorch-StudioGAN\n# The MIT License (MIT)\n# See license file or visit https://github.com/POSTECH-CVLab/PyTorch-StudioGAN for details\n\n# train_eval.py\n\n\nimport numpy as np\nimport sys\nimport glob\nfrom scipy import ndimage\nfrom os.path import join\nfrom... | [
[
"torch.mean",
"torch.sign",
"numpy.asarray",
"torch.utils.data.DataLoader",
"numpy.fft.fftshift",
"torch.cuda.amp.autocast",
"numpy.concatenate",
"torch.no_grad",
"torch.save",
"torch.nn.CrossEntropyLoss",
"torch.randn",
"scipy.ndimage.median_filter",
"torch.fro... |
KuangenZhang/pytorch_geometric | [
"0bfc79a5eaccfcd16a82395e8578a90c5e44759f"
] | [
"benchmark/points/edge_cnn_ke.py"
] | [
"import argparse\nimport torch\nimport torch.nn.functional as F\nfrom torch.nn import Sequential as Seq, Linear as Lin, ReLU, LeakyReLU\nfrom torch_geometric.nn import DynamicEdgeConv, global_max_pool\n\nfrom datasets import get_dataset\nfrom train_eval import run\n\nparser = argparse.ArgumentParser()\nparser.add_a... | [
[
"torch.nn.Linear",
"torch.nn.LeakyReLU",
"torch.nn.functional.log_softmax",
"torch.nn.functional.dropout"
]
] |
noahl/tensorflow | [
"b95d8cce7323d328565378e0d60d72603393f87d",
"b95d8cce7323d328565378e0d60d72603393f87d"
] | [
"tensorflow/python/ops/standard_ops.py",
"tensorflow/contrib/lite/testing/generate_examples.py"
] | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.util.all_util.remove_undocumented"
],
[
"tensorflow.get_variable",
"tensorflow.device",
"tensorflow.nn.batch_norm_with_global_normalization",
"tensorflow.nn.log_softmax",
"tensorflow.concat",
"tensorflow.zeros",
"tensorflow.control_dependencies",
"tensorf... |
neurodatascience/watts_up_compute | [
"1ed41e62690f99f699b44180208689cc19616bb7"
] | [
"run_scripts/FreeSurfer/nipype_reconall_with_tracker.py"
] | [
"# Import modules\nimport os\nimport sys\nfrom os.path import join as opj\nimport pandas as pd\nimport time\nfrom nipype.interfaces.freesurfer import ReconAll\nfrom nipype.interfaces.utility import IdentityInterface\nfrom nipype.pipeline.engine import Workflow, Node\nfrom pypapi import events, papi_high as high\nim... | [
[
"pandas.DataFrame"
]
] |
strint/myia | [
"3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a",
"3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a"
] | [
"examples/vae.py",
"myia/operations/prim_array_scan.py"
] | [
"\"\"\"Example of an MLP in Myia.\n\nMyia is still a work in progress, and this example may change in the future.\n\"\"\"\n\nimport time\nfrom dataclasses import dataclass\n\nimport numpy\nimport torch\nfrom numpy.random import RandomState\nfrom torchvision import datasets, transforms\n\nimport myia.public_api as p... | [
[
"torch.device",
"torch.manual_seed",
"numpy.tanh",
"numpy.random.RandomState"
],
[
"numpy.apply_along_axis",
"numpy.nditer"
]
] |
GlobalMaksimum/sadedegel | [
"8e28dbeabc3bf0d6f2222089ac5e3a849f9d3a6b"
] | [
"sadedegel/bblock/vocabulary.py"
] | [
"import warnings\nfrom collections import defaultdict\nfrom os.path import dirname\nfrom pathlib import Path\n\nimport h5py\nimport numpy as np\nfrom cached_property import cached_property\nfrom rich.console import Console\n\nfrom .util import tr_lower, normalize_tokenizer_name\n\nconsole = Console()\n\n\nclass Inv... | [
[
"numpy.array",
"numpy.zeros"
]
] |
xujing1994/open_spiel | [
"7663a2717f16ff84c0d6a6bfdf19a9c21b37b765"
] | [
"open_spiel/python/examples/hearts_supervised_learning.py"
] | [
"# Copyright 2019 DeepMind Technologies Ltd. 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 r... | [
[
"numpy.zeros",
"numpy.random.shuffle"
]
] |
efajardo-nv/cuml | [
"bc86714836284ed4752c267513e5d447e884e1c5"
] | [
"python/cuml/test/test_trustworthiness.py"
] | [
"# Copyright (c) 2018-2019, NVIDIA 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 applica... | [
[
"numpy.asarray",
"sklearn.datasets.samples_generator.make_blobs",
"sklearn.manifold.t_sne.trustworthiness"
]
] |
MikeXydas/MDSimsEval | [
"6c32bd8b74e421120beca18d18c3e58fc8f85247"
] | [
"MDSimsEval/pca_analysis.py"
] | [
"import math\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport numpy as np\nimport pandas as pd\n\nfrom tqdm import tqdm\n\n\ndef scree_plot(analysis_actors_dict, dir_path, pcs_on_scree_plot=50, variance_ratio_line=0.75):\n \"\"\"\n Creates a plot with the scree plots for each ligand and saves i... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.tight_layout",
"numpy.sqrt",
"matplotlib.pyplot.title",
"numpy.abs",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"matplotlib.pyplot.savefig",
"numpy.cumsum",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.ylabel",
... |
sudohainguyen/MONAI | [
"a42b563acf0c7504cee18ee84c8af2eff6e948a7",
"a42b563acf0c7504cee18ee84c8af2eff6e948a7",
"89f8a39a1c0bc6f480522c443ee7813cea21df47"
] | [
"tests/test_rand_spatial_crop_samples.py",
"tests/test_activationsd.py",
"tests/test_integration_classification_2d.py"
] | [
"# Copyright 2020 MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable law or agreed to i... | [
[
"numpy.random.randint"
],
[
"torch.tanh",
"torch.testing.assert_allclose",
"torch.tensor"
],
[
"torch.nn.CrossEntropyLoss",
"numpy.random.random",
"torch.load",
"numpy.unique",
"torch.manual_seed",
"numpy.asarray",
"torch.cat",
"torch.utils.data.DataLoader",... |
pau557/dimod | [
"d3c6d3abf23182b035e1100c46f7c947202edefb"
] | [
"dimod/generators/chimera.py"
] | [
"# Copyright 2018 D-Wave Systems Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
[
"numpy.zeros"
]
] |
chatto-hub-test2/Spaceboy2 | [
"7b6b91baf06290e6b047ae75e7ea61cee4846b3a",
"7b6b91baf06290e6b047ae75e7ea61cee4846b3a"
] | [
"chatto_transform/datastores/sqlalchemy_datastore.py",
"chatto_transform/transforms/mimic/bun_transform.py"
] | [
"import pandas\nfrom ..schema.schema_base import *\nfrom .datastore_base import DataStore\nfrom .odo_datastore import OdoDataStore\nfrom ..config import config\n\nfrom functools import lru_cache, partial\n\nfrom sqlalchemy import Table, MetaData, select\nfrom sqlalchemy.orm import sessionmaker\nfrom sqlalchemy.ext.... | [
[
"pandas.to_datetime",
"pandas.read_csv",
"pandas.read_sql"
],
[
"numpy.timedelta64",
"pandas.merge",
"numpy.floor",
"pandas.DataFrame"
]
] |
ml-evs/ilustrado | [
"3121ecaff9cb517f3946b2283bf50dce499caad9"
] | [
"ilustrado/util.py"
] | [
"# coding: utf-8\n\n\"\"\" Catch-all file for utility functions.\n\n\"\"\"\n\nimport sys\nimport logging\n\nimport numpy as np\nfrom matador.compute import ComputeTask\nfrom matador.utils.cell_utils import cart2frac, cart2abc\n\nLOG = logging.getLogger(\"ilustrado\")\nLOG.setLevel(logging.DEBUG)\n\n\ndef strip_usel... | [
[
"numpy.linalg.eig",
"numpy.random.rand",
"numpy.random.randint"
]
] |
Criscraft/pytorch_classification | [
"d5772963e55ce218ae4719fb7f85604263aab65f"
] | [
"pytorchtools/ptnetworks/ResNetCIFAR.py"
] | [
"from collections import OrderedDict \nimport torch\nfrom torch import Tensor\nimport torch.nn as nn\nfrom torch.utils.model_zoo import load_url as load_state_dict_from_url\nfrom ptnetworks.ActivationTracker import ActivationTracker\nfrom typing import Type, Any, Callable, Union, List, Optional\n\n\nclass ResNetCIF... | [
[
"torch.nn.Sequential",
"torch.nn.init.constant_",
"torch.nn.Conv2d",
"torch.nn.init.kaiming_uniform_",
"torch.nn.Linear",
"torch.nn.Identity",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.init.sparse_",
"torch.nn.init.orthogonal_",
"torch.flatten",
"torch.device",
"torch... |
pierg/wiseml-patterns | [
"2decf2954001296bd04261b00ae144f53359a2b8",
"2decf2954001296bd04261b00ae144f53359a2b8",
"2decf2954001296bd04261b00ae144f53359a2b8"
] | [
"gym_minigrid/extendedminigrid.py",
"pytorch_dqn/visualize.py",
"pytorch_a2c/enjoy.py"
] | [
"from gym_minigrid.minigrid import *\nfrom configurations import config_grabber as cg\n\nimport math\nimport operator\nfrom functools import reduce\n\nimport traceback\n\nimport numpy as np\n\nconfig = cg.Configuration.grab()\n\nAGENT_VIEW_SIZE = config.agent_view_size\nEXTRA_OBSERVATIONS_SIZE = 5\nOBS_ARRAY_SIZE =... | [
[
"numpy.append",
"numpy.array",
"numpy.zeros"
],
[
"numpy.array"
],
[
"torch.autograd.Variable",
"torch.from_numpy",
"torch.zeros"
]
] |
gohyun14/Game | [
"39e6e192590059daade40c95cc177acb0f3a581b"
] | [
"codenames/players/codemaster_glove_lookahead.py"
] | [
"import scipy.spatial.distance\nfrom nltk.stem import WordNetLemmatizer\nfrom nltk.stem.lancaster import LancasterStemmer\nfrom math import ceil\nimport numpy as np\nimport copy\nimport itertools\n\nfrom players.codemaster import Codemaster\nTHRESHOLD = np.inf\n\nclass AICodemaster(Codemaster):\n\n def __init__(... | [
[
"numpy.hstack"
]
] |
ATTPC/VAE-event-classification | [
"aae331d44bffffec2ca8a6cdef71208899db0052"
] | [
"src/event_representations.py"
] | [
"import numpy as np\n\ndef make_histograms(x, bins=40, interval=[1e-1, 1]):\n intervals = np.linspace(interval[0], interval[1], bins)\n flat_x = x.reshape((x.shape[0], -1))\n hist_x = np.zeros((x.shape[0], bins))\n for i in range(1, bins):\n mask = flat_x <= intervals[i]\n mask = np.logica... | [
[
"numpy.logical_and",
"numpy.zeros",
"numpy.linspace"
]
] |
handongke/tensorflow | [
"c6bb5cd0447a0af2764c195fb14d218df8ae6471",
"c6bb5cd0447a0af2764c195fb14d218df8ae6471",
"c6bb5cd0447a0af2764c195fb14d218df8ae6471",
"6aa83398ab03bfae822f36772757097bcb98b6ed",
"c6bb5cd0447a0af2764c195fb14d218df8ae6471",
"6aa83398ab03bfae822f36772757097bcb98b6ed"
] | [
"tensorflow/python/ops/nn_ops.py",
"tensorflow/python/keras/layers/recurrent.py",
"tensorflow/contrib/tensorrt/test/quantization_mnist_test.py",
"tensorflow/python/layers/convolutional.py",
"tensorflow/python/ops/control_flow_util.py",
"tensorflow/python/training/slot_creator.py"
] | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.framework.tensor_shape.scalar",
"tensorflow.python.ops.gen_nn_ops.relu6",
"tensorflow.python.ops.math_ops.subtract",
"tensorflow.python.compat.compat.forward_compatible",
"numpy.all",
"tensorflow.python.ops.array_ops.stop_gradient",
"tensorflow.python.framework.graph... |
cgangwar11/pandas | [
"972f491cb7fdcc3c1c2cb9f05644128f13457f87"
] | [
"pandas/core/indexes/datetimes.py"
] | [
"from datetime import date, datetime, time, timedelta, tzinfo\nimport operator\nfrom typing import Optional\nimport warnings\n\nimport numpy as np\n\nfrom pandas._libs import NaT, Period, Timestamp, index as libindex, lib\nfrom pandas._libs.tslibs import (\n Resolution,\n ints_to_pydatetime,\n parsing,\n ... | [
[
"pandas._libs.tslibs.ints_to_pydatetime",
"pandas.Series",
"pandas.core.arrays.datetimes.tz_to_dtype",
"pandas.io.formats.format._is_dates_only",
"pandas.core.dtypes.common.is_datetime64tz_dtype",
"pandas.core.arrays.datetimes.DatetimeArray",
"pandas.core.dtypes.common.is_datetime64_dt... |
csiu/kick | [
"0ebc9166074b702fc8b5835685ad102957ab349c"
] | [
"src/python/sim_doc.py"
] | [
"import sys\nsys.path.append(\"/Users/csiu/repo/kick/src/python\")\n\nimport argparse\nimport custom\nimport pandas as pd\nimport numpy as np\nimport re\nimport os\n\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.utils.extmath ... | [
[
"sklearn.metrics.pairwise_distances",
"sklearn.utils.extmath.randomized_svd",
"pandas.DataFrame",
"numpy.asmatrix",
"sklearn.feature_extraction.text.CountVectorizer",
"numpy.transpose",
"pandas.read_pickle",
"sklearn.feature_extraction.text.TfidfVectorizer"
]
] |
virgile-hernicot/SPIN | [
"21871e3d333ef37866402ae21498b331aa771b2d"
] | [
"datasets/preprocess/mpi_inf_3dhp.py"
] | [
"import os\nimport sys\nimport cv2\nimport glob\nimport h5py\nimport json\nimport numpy as np\nimport scipy.io as sio\nimport scipy.misc\nfrom .read_openpose import read_openpose\n\ndef read_calibration(calib_file, vid_list):\n Ks, Rs, Ts = [], [], []\n file = open(calib_file, 'r')\n content = file.readlin... | [
[
"numpy.savez",
"numpy.logical_and",
"numpy.reshape",
"scipy.io.loadmat",
"numpy.ones",
"numpy.load",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] |
4k4xs4pH1r3/tf_rl_tutorial | [
"c58d10c60cfd79b2e0661b4a49cccae8d4584c57"
] | [
"tf_rl_tutorial/models.py"
] | [
"# Copyright 2016 Mandiant, A FireEye Company\n# Authors: Brian Jones\n# License: Apache 2.0\n\n''' Model classes for \"Relational Learning with TensorFlow\" tutorial '''\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom .util import ContrastiveTrainingProvider\n\n\ndef least_squares_objective(output, target, ... | [
[
"tensorflow.scatter_update",
"tensorflow.concat",
"numpy.sqrt",
"tensorflow.reduce_sum",
"tensorflow.Graph",
"tensorflow.batch_matmul",
"tensorflow.Variable",
"tensorflow.initialize_all_variables",
"tensorflow.square",
"tensorflow.Session",
"tensorflow.train.AdagradOpti... |
aspuru-guzik-group/kraken | [
"4eaad505c1343e6083032b4a3fda47e004e19734",
"4eaad505c1343e6083032b4a3fda47e004e19734"
] | [
"conf_selection_and_DFT/PL_dft_library_201027.py",
"conf_selection_and_DFT/vmin4.py"
] | [
"# 201005: rename/restructure .yml files for consistency with xtb-level data\r\n# 201006: in read_conformer() fix error message when log files are missing \r\n\r\nimport os,re,itertools,time\r\n#import pybel\r\n#from openbabel import pybel\r\nimport numpy as np\r\nimport pandas as pd\r\nimport pathlib as pl\r\ncwd ... | [
[
"numpy.math.exp",
"numpy.asarray",
"numpy.linalg.norm",
"pandas.DataFrame",
"numpy.append",
"numpy.argmin",
"numpy.exp",
"numpy.array",
"numpy.zeros",
"numpy.vstack"
],
[
"numpy.math.exp",
"pandas.Series",
"numpy.amin",
"numpy.linalg.norm",
"numpy.ar... |
dptam/text-to-text-transfer-transformer | [
"3662823b126ebf39d9d8ed147a8af0c6973f0ba9"
] | [
"t5/seqio/dataset_providers.py"
] | [
"# Copyright 2021 The T5 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 agr... | [
[
"tensorflow.compat.v2.io.parse_single_example",
"tensorflow.compat.v2.io.gfile.GFile",
"tensorflow.compat.v2.io.gfile.exists",
"tensorflow.compat.v2.data.experimental.sample_from_datasets",
"tensorflow.compat.v2.cast",
"tensorflow.compat.v2.data.TFRecordDataset",
"tensorflow.compat.v2.... |
bmalezieux/unrolled_dl | [
"5854a6991e44db025a99a9f0d38be6b1e669aa83",
"5854a6991e44db025a99a9f0d38be6b1e669aa83"
] | [
"experiments_approximate/experiments/create_dico_alphacsc.py",
"experiments_approximate/experiments/optim_images.py"
] | [
"import numpy as np\n\natoms_to_save = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 15, 18])\n\nu_cdl = np.load(\"u_cdl.npy\")\nv_cdl = np.load(\"v_cdl.npy\")\n\nnp.save(\"u_cdl_modified.npy\", u_cdl[atoms_to_save])\nnp.save(\"v_cdl_modified.npy\", v_cdl[atoms_to_save])\n",
"import numpy as np\nimport pickle\nimport ... | [
[
"numpy.load",
"numpy.array",
"numpy.save"
],
[
"numpy.log",
"numpy.abs",
"numpy.sqrt",
"numpy.clip",
"numpy.linalg.norm",
"numpy.sign",
"numpy.log10",
"numpy.mean",
"numpy.array",
"numpy.zeros",
"numpy.random.default_rng"
]
] |
KevHg/reddit-sentiment | [
"383407105957b8a582a524fa29b9f21d7b2cbd23"
] | [
"main.py"
] | [
"import os\nfrom scrapy.crawler import CrawlerProcess\nimport pandas as pd\nimport logging\nimport nltk\n\nimport json_reader\nfrom sentiment_score import clean_text, calculate_sentiment_score\nfrom reddit_scraper.reddit_scraper.spiders.reddit_post_scraper import RedditPostCrawler\n\nif __name__ == '__main__':\n ... | [
[
"pandas.DataFrame"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.