repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
LeftThink/pytorch-lighthead | [
"5f4bf1c87b9be77bf7242ad89900239a9d66914c"
] | [
"lib/datasets/adas.py"
] | [
"# coding: utf-8\n# --------------------------------------------------------\n# Fast R-CNN\n# Copyright (c) 2015 Microsoft\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Ross Girshick\n# --------------------------------------------------------\nfrom __future__ import print_function\n\nimp... | [
[
"numpy.mean",
"scipy.io.loadmat",
"numpy.zeros"
]
] |
mehulfollytobevice/MachineLearning | [
"7d442907df4e8560bf5067d8bac660a3cb303393"
] | [
"K-NN Classification/KNN Classification from scratch/knn_from_scratch.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Thu Apr 9 21:03:57 2020\r\n\r\n@author: Mehul\r\n\"\"\"\r\n\r\n#importing the libraries\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport pandas as pd\r\nimport random\r\nimport warnings\r\nfrom matplotlib import style\r\nfrom collections import Cou... | [
[
"numpy.array",
"pandas.read_csv",
"matplotlib.style.use"
]
] |
WonMian/coach | [
"67978248927f24ee09df6f1df842a14103aaf11b"
] | [
"rl_coach/agents/actor_critic_agent.py"
] | [
"#\n# Copyright (c) 2017 Intel Corporation\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable ... | [
[
"numpy.expand_dims",
"numpy.vstack",
"numpy.zeros",
"numpy.append"
]
] |
kuantan/pandas | [
"e18921eb0cc86f71c84a4aa0bd6d0c1b7de89def",
"e18921eb0cc86f71c84a4aa0bd6d0c1b7de89def"
] | [
"pandas/io/parquet.py",
"pandas/tests/io/test_common.py"
] | [
"\"\"\" parquet compat \"\"\"\nfrom __future__ import annotations\n\nimport io\nimport os\nfrom typing import Any\nfrom warnings import catch_warnings\n\nfrom pandas._typing import (\n FilePath,\n ReadBuffer,\n StorageOptions,\n WriteBuffer,\n)\nfrom pandas.compat._optional import import_optional_depend... | [
[
"pandas.BooleanDtype",
"pandas.UInt64Dtype",
"pandas.io.common.is_fsspec_url",
"pandas.Int8Dtype",
"pandas.io.common.is_url",
"pandas.io.common.stringify_path",
"pandas.UInt16Dtype",
"pandas.errors.AbstractMethodError",
"pandas.util._decorators.doc",
"pandas.Int16Dtype",
... |
AlumiK/bagel-tensorflow | [
"791a89a54f15aeed0c4e1ea43afb9300f18b60cd"
] | [
"bagel/testing.py"
] | [
"import bagel\nimport numpy as np\n\nfrom sklearn.metrics import precision_recall_curve\nfrom typing import Sequence, Tuple, Dict, Optional\n\n\ndef _adjust_scores(labels: np.ndarray,\n scores: np.ndarray,\n delay: Optional[int] = None,\n inplace: bool = False) ... | [
[
"numpy.max",
"sklearn.metrics.precision_recall_curve",
"numpy.copy",
"numpy.shape",
"numpy.where",
"numpy.argmax",
"numpy.clip",
"numpy.maximum"
]
] |
dreamflake/GADA | [
"9891ce06e15e53abc72ce57b144e288799967d8c"
] | [
"_3DDFA_V2/TDDFA.py"
] | [
"# coding: utf-8\n\n__author__ = 'cleardusk'\n\nimport os.path as osp\nimport time\nimport numpy as np\nimport cv2\nimport torch\nfrom torchvision.transforms import Compose\nimport torch.backends.cudnn as cudnn\n\nimport _3DDFA_V2.models as models\nfrom _3DDFA_V2.bfm import BFMModel\nfrom _3DDFA_V2.utils.io import ... | [
[
"torch.set_grad_enabled"
]
] |
enikon/MACP | [
"2de004d4eaf09f3b02dde3b7041ce6d693d0c25c",
"2de004d4eaf09f3b02dde3b7041ce6d693d0c25c",
"2de004d4eaf09f3b02dde3b7041ce6d693d0c25c"
] | [
"experiments/experiments/Test6.py",
"multiagent/scenarios/simple_push.py",
"multiagent/scenarios/simple_reference.py"
] | [
"from experiments.experiments.PubIntegBackground import PubIntegBackground\nimport numpy as np\n\nif __name__ == \"__main__\":\n for i in np.arange(0.0, 10.0, 0.1):\n PubIntegBackground(correlation=False, listing=True, pub='None', intensity=i)\n",
"import numpy as np\nfrom multiagent.core import World, ... | [
[
"numpy.arange"
],
[
"numpy.concatenate",
"numpy.square",
"numpy.array",
"numpy.random.choice",
"numpy.zeros",
"numpy.random.uniform"
],
[
"numpy.concatenate",
"numpy.square",
"numpy.array",
"numpy.random.choice",
"numpy.zeros",
"numpy.random.uniform"
]... |
JoshuaAnickat/mlflow | [
"6dee5cb250460e8dc7accb487e54df8c95921e0e"
] | [
"mlflow/pytorch/__init__.py"
] | [
"\"\"\"\nThe ``mlflow.pytorch`` module provides an API for logging and loading PyTorch models. This module\nexports PyTorch models with the following flavors:\n\nPyTorch (native) format\n This is the main flavor that can be loaded back into PyTorch.\n:py:mod:`mlflow.pyfunc`\n Produced for use by generic pyfun... | [
[
"torch.jit.ScriptModule.save",
"torch.save",
"torch.no_grad",
"torch.jit.load",
"torch.load"
]
] |
dhruvramani/CodeFunDo-2017 | [
"e102202ef0219c249a1666daa3dd6426ab899800"
] | [
"src/random/weights.py"
] | [
"import os\nimport cv2\nimport imutils\nimport numpy as np\nfrom imutils import contours\nfrom imutils import perspective\nfrom scipy.spatial import distance as dist\n\n\ndef detect_shape(filepath, min_width=15, debug=False):\n image = cv2.imread(filepath, 0)\n\n resized = imutils.resize(image, width=300)\n ... | [
[
"numpy.array",
"scipy.spatial.distance.euclidean"
]
] |
spitzc32/CropMe | [
"6f3c0c9512cbf56d64b40c5c05a33627d6eaf51d"
] | [
"utils/data_operations.py"
] | [
"import numpy as np\n\n\ndef euclidean_distance(p1,p2):\n\t\"\"\"\n\treturns euclidean distance between matrices\t\n\t@params:\n\t\tp1, p2: np.ndarray\n\t\t\tmatrices to perform operation to.\n\t\"\"\"\n\treturn np.sqrt(np.sum((p1-p2)**2, axis=1))\n\n\ndef entropy(p):\n\t\t\"\"\"\n\t\tWill be our measurement for un... | [
[
"numpy.sum",
"numpy.log2"
]
] |
linamnt/PySyft | [
"4b60a86c003acbe1967d6c3d611df3d5f2d377ee",
"4b60a86c003acbe1967d6c3d611df3d5f2d377ee"
] | [
"test/generic/test_object_storage.py",
"test/torch/test_functions.py"
] | [
"import torch\n\nfrom syft.generic import object_storage\n\n\ndef test_clear_objects():\n obj_storage = object_storage.ObjectStorage()\n\n x = torch.tensor(1)\n obj_storage.set_obj(x)\n\n objs = obj_storage.current_objects()\n\n assert len(objs) == 1\n assert objs[x.id] == x\n\n ret_val = obj_s... | [
[
"torch.tensor"
],
[
"torch.tensor"
]
] |
xuyuandong/sequence_behavior_ctr_model | [
"e1bb71b4579456b1c6fbf3b432a84a3cb52611b7"
] | [
"script/utils.py"
] | [
"import tensorflow as tf\n#from tensorflow.python.ops.rnn_cell import *\n#from tensorflow.python.ops.rnn_cell_impl import _Linear\nfrom tensorflow.contrib.rnn.python.ops.core_rnn_cell import *\n#from tensorflow import keras\nfrom tensorflow.python.ops import math_ops\nfrom tensorflow.python.ops import init_ops\nfr... | [
[
"tensorflow.constant_initializer",
"tensorflow.python.ops.variable_scope.variable_scope",
"tensorflow.tensordot",
"tensorflow.matmul",
"tensorflow.ones_like",
"tensorflow.tanh",
"tensorflow.nn.softmax",
"tensorflow.random_normal",
"tensorflow.shape",
"tensorflow.concat",
... |
boutproject/VECMA-hackathon | [
"07632a267fcaff582bf410eba13f7bc81d8ea6eb"
] | [
"workflows/sc_adaptive_restartable/example_restartable_sc_adaptive.py"
] | [
"#!/usr/bin/env python3\n\nimport argparse\nimport boutvecma\nimport easyvvuq as uq\nimport chaospy\nimport os\nimport numpy as np\nimport time\nimport matplotlib.pyplot as plt\n\n\nCAMPAIGN_NAME = \"Conduction.\"\n\n\ndef refine_sampling_plan(campaign, analysis, number_of_refinements):\n \"\"\"\n Refine the ... | [
[
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.figure",
"numpy.arange"
]
] |
mchelem/cref2 | [
"3324c34892dfaba2c99a0a564ede9f0c40ad65a5"
] | [
"cref/structure/plot.py"
] | [
"import os\nfrom collections import OrderedDict\n\nimport matplotlib.pyplot as plt\nimport pandas\n\n\n_ramachandran_densities = pandas.read_csv(\n 'data/rama500-general.data',\n skiprows=6,\n delimiter=' ',\n names=['phi', 'psi', 'value']\n)\n\n\"\"\"\nDSSP output:\n H = α-helix\n B = residue in ... | [
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.close",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.tick_params",
"matplotlib.pyplot.margins",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.scatter",
"pandas.read_csv"... |
buctlab/NIO | [
"094e688dd1cd3def7f31cd16ff927d4324651422"
] | [
"visualizer/plot_mf_param_opt/plot_time_cost_bar.py"
] | [
"import matplotlib.pyplot as plt\nimport pandas as pd\nfrom numpy import arange, array\nimport os\nimport logging\n\nlogging.basicConfig()\nlogger = logging.getLogger('PlotTimeCost')\nlogger.setLevel('INFO')\n\n\nclass PlotTimeCostBar:\n\n def __init__(self, data, path, show=False):\n self.data = data\n ... | [
[
"numpy.array",
"matplotlib.pyplot.figure",
"numpy.arange",
"matplotlib.pyplot.show",
"matplotlib.pyplot.bar"
]
] |
bernardolemos/Automatic_Face_Blurt | [
"7f9127763b391dacc0f89b62a05fe149f02a065b"
] | [
"blur_faces.py"
] | [
"import os\nimport cv2\nimport time\nimport argparse\nimport numpy as np\nfrom mtcnn import detect_face\nimport tensorflow as tf\nfrom PIL import Image, ImageDraw\n\n## MTCNN face localizer\ndef mtcnn_localize_faces(image, pnet, rnet, onet, minsize=20, threshold=[0.7, 0.8, 0.85], factor=0.75):\n \"\"\"\n Loca... | [
[
"numpy.reshape",
"numpy.zeros",
"tensorflow.Graph",
"tensorflow.ConfigProto",
"numpy.ravel",
"tensorflow.GPUOptions"
]
] |
mcuntz/pyjams | [
"1393c68a9e21a1e7b88291229120641fdaddc998"
] | [
"tests/test_gridcellarea.py"
] | [
"#!/usr/bin/env python\n\"\"\"\nThis is the unittest for gridcellarea module.\n\npython -m unittest -v tests/test_gridcellarea.py\npython -m pytest --cov=pyjams --cov-report term-missing -v tests/test_gridcellarea.py\n\n\"\"\"\nimport unittest\n\n\ndef _flatten(itr):\n import numpy as np\n fitr = np.array(itr... | [
[
"numpy.around",
"numpy.array",
"numpy.finfo",
"numpy.isfinite"
]
] |
sudheernaidu53/other_utils | [
"8e7f32ff0a3ded3910a957d821d6f4eb15bae3d8"
] | [
"loan_estimator/loan_estimator.py"
] | [
"# This file is to get a rough estimation of how much you need to pay or how many months you need to pay for a loan\n\nimport pandas as pd\nimport numpy as np\nfrom IPython.display import display\n\ndef group(number):\n \"\"\"show money in laks and crores (indian way of presenting money)\"\"\"\n s = '%d' % nu... | [
[
"pandas.DataFrame",
"numpy.power",
"numpy.log"
]
] |
hmhuy2000/Reinforcement-Learning-SuttonBartoI | [
"97ca9dc11c4cb4fda74b144e658c3eac756131ff"
] | [
"chap 5/5_5.py"
] | [
"import numpy as np \nimport matplotlib.pyplot as plt\nfrom tqdm import trange\nimport seaborn as sns\nimport random\n\n# ========================== CFG =======================\n\nclass CFG:\n HIT = 1\n STOP = 0\n actions = [STOP, HIT]\n WIN = 1\n DRAW = 0\n LOSE = -1\n\n\n# ======================... | [
[
"numpy.max",
"numpy.zeros",
"matplotlib.pyplot.savefig",
"numpy.ones",
"matplotlib.pyplot.close",
"numpy.random.randint",
"numpy.argmax"
]
] |
SebastianMM-96/regex-wordToken | [
"1e707f03638ebe9365974bcced8ab8b0d42c1295"
] | [
"fake-news/training-testing-classification-model/fakeNewsModel-CountVectorizer.py"
] | [
"# Import the necessary modules\nfrom sklearn.naive_bayes import MultinomialNB\nfrom sklearn import metrics\n\n# Instantiate a Multinomial Naive Bayes classifier: nb_classifier\nnb_classifier = MultinomialNB()\n\n# Fit the classifier to the training data\nnb_classifier.fit(count_train, y_train)\n\n# Create the pred... | [
[
"sklearn.naive_bayes.MultinomialNB",
"sklearn.metrics.confusion_matrix",
"sklearn.metrics.accuracy_score"
]
] |
MagiaSN/pytorch | [
"7513455c743d3d644b45a804902c1a0d14b69f45",
"7513455c743d3d644b45a804902c1a0d14b69f45",
"7513455c743d3d644b45a804902c1a0d14b69f45"
] | [
"torch/nn/quantized/modules/__init__.py",
"torch/nn/modules/lazy.py",
"torch/utils/tensorboard/_pytorch_graph.py"
] | [
"import torch\nfrom torch.nn.modules.pooling import MaxPool2d\n\nfrom .activation import ReLU6, Hardswish, ELU, LeakyReLU, Sigmoid\nfrom .batchnorm import BatchNorm2d, BatchNorm3d\nfrom .normalization import LayerNorm, GroupNorm, InstanceNorm1d, \\\n InstanceNorm2d, InstanceNorm3d\nfrom .conv import _ConvNd, Con... | [
[
"torch.tensor"
],
[
"torch.no_grad"
],
[
"torch._C._jit_pass_inline",
"torch.onnx.select_model_mode_for_export",
"torch.jit.trace"
]
] |
hirano1412/bdpy | [
"cee6f36dcdf4f4d29fc3a6980777e1c3d7c66cbb"
] | [
"test/test_preproc.py"
] | [
"'''Tests for bdpy.preprocessor'''\n\n\nfrom unittest import TestCase, TestLoader, TextTestRunner\n\nimport numpy as np\nfrom scipy.signal import detrend\n\nfrom bdpy import preproc\n\n\nclass TestPreprocessor(TestCase):\n '''Tests of 'preprocessor' module'''\n\n @classmethod\n def test_average_sample(cls)... | [
[
"numpy.array",
"numpy.random.rand",
"numpy.testing.assert_array_equal",
"scipy.signal.detrend",
"numpy.mean",
"numpy.average",
"numpy.vstack"
]
] |
ogarokpeter/gene_network_sirius_2019 | [
"419cc430dbde4332acf5cd6eb5cfa669270c53af"
] | [
"RankAggregation/SimpleRankAggregation.py"
] | [
"# RUN WITH /usr/bin/python3 minet.py (python 3.6)\n\nimport sys\nimport numpy as np\nfrom sklearn.metrics import roc_curve, auc\nimport pandas as pd\n\n\ndef compute_aggregated_matrix(matrixfiles_num, matrixfiles, savematrixfile, saveresultfile, coeffs=[1, 1, 1, 1]):\n # matrixfiles_num = int(sys.argv[1])\n ... | [
[
"numpy.triu_indices",
"numpy.zeros",
"pandas.DataFrame",
"sklearn.metrics.auc",
"pandas.read_csv",
"numpy.empty_like",
"sklearn.metrics.roc_curve"
]
] |
Yoshi-0921/MAEXP | [
"cc03fdd46db9b1838df8f7782b4bd1b2bb3f11d5"
] | [
"core/agents/models/customs/da3.py"
] | [
"\"\"\"Source code for distributed attentional actor architecture (DA3) model.\n\nAuthor: Yoshinari Motokawa <yoshinari.moto@fuji.waseda.jp>\n\"\"\"\nfrom typing import List\n\nimport torch\nfrom core.utils.logging import initialize_logging\nfrom omegaconf import DictConfig\nfrom torch import nn\n\nfrom ..hard_shri... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.nn.LayerNorm",
"torch.zeros"
]
] |
joeferg425/ws281x_lightberries | [
"c6a5a3ffeeb3642b34e3e6e3b759af9e4725efce"
] | [
"LightBerries/LightStrings.py"
] | [
"\"\"\"Defines basic light string data and functions.\"\"\"\nimport os\nimport sys\nimport atexit\nimport inspect\nimport time\nimport logging\nfrom typing import Any, Optional, Sequence, Union, overload\nfrom nptyping import NDArray\nimport numpy as np\nfrom LightBerries.LightBerryExceptions import LightStringExce... | [
[
"numpy.zeros"
]
] |
xadupre/mlprodict | [
"f82c8a26a60104948c67849b1c4af95ca812c153"
] | [
"mlprodict/onnxrt/ops_cpu/op_solve.py"
] | [
"# -*- encoding: utf-8 -*-\n# pylint: disable=E0203,E1101,C0111\n\"\"\"\n@file\n@brief Runtime operator.\n\"\"\"\nfrom scipy.linalg import solve\nfrom ._op import OpRunBinaryNum\nfrom ._new_ops import OperatorSchema\n\n\nclass Solve(OpRunBinaryNum):\n\n atts = {'lower': False,\n 'transposed': False}\n... | [
[
"scipy.linalg.solve"
]
] |
smellslikeml/rikai | [
"179526dfe98b21059371d83f7540e3d43aa1200f"
] | [
"python/rikai/types/vision.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, software\n# ... | [
[
"numpy.asarray"
]
] |
JamesTheZ/BladeDISC | [
"e6c76ee557ebfccd560d44f6b6276bbc4e0a8a34",
"e6c76ee557ebfccd560d44f6b6276bbc4e0a8a34"
] | [
"pytorch_blade/tests/tensorrt/test_support_info.py",
"pytorch_blade/tests/disc/test_is_mlir_mhlo_supported.py"
] | [
"# Copyright 2022 The BladeDISC 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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applic... | [
[
"torch.nn.Linear",
"torch.nn.functional.relu_",
"torch.parse_ir",
"torch.nn.Dropout",
"torch.zeros",
"torch.nn.BatchNorm2d",
"torch._C._freeze_module",
"torch.ones",
"torch.nn.Conv2d",
"torch.jit.trace",
"torch.nn.functional.relu",
"torch.Tensor"
],
[
"torch... |
Gattocrucco/sipmfilter | [
"74215d6c53b998808fc6c677b46030234d996bdf"
] | [
"figthesis/figlaserpos.py"
] | [
"from matplotlib import pyplot as plt\n\nimport figlatex\nimport afterpulse_tile21\nimport textbox\nimport colormap\n\nvov = 5.5\n\n################\n\nap21 = afterpulse_tile21.AfterPulseTile21(vov)\n\nfig = plt.figure(num='figlaserpos-0', clear=True, figsize=[4.5, 3])\n\nap21.sim.hist('mainpos-offset', 'mainnpe==1... | [
[
"matplotlib.pyplot.figure"
]
] |
egpbos/amuse | [
"64b3bc5b7fef9496012b023578c4d71cecef92b7",
"64b3bc5b7fef9496012b023578c4d71cecef92b7"
] | [
"examples/simple/salpeter.py",
"examples/simple/unstable_binary.py"
] | [
"\"\"\"\nGenerates a cluster using a plummer model with a salpeter Initial Mass Function.\nCompares the generated IMF against the expected line.\n\"\"\"\n\nimport numpy \nfrom matplotlib import pyplot\nfrom amuse.units import units\nfrom amuse.units import nbody_system\nfrom amuse.ic.plummer import new_plummer_mode... | [
[
"numpy.histogram",
"numpy.linspace",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
],
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.margins",
"matplotlib.pyplot.figure"
]
] |
suyukun666/UFO | [
"ba481b39b80d78c98e11cc22444d69de9e010439"
] | [
"Intra_MLP.py"
] | [
"import torch\nimport numpy\n\n# codes of this function are borrowed from https://github.com/yanx27/Pointnet_Pointnet2_pytorch/blob/master/models/pointnet2_utils.py\ndef index_points(device, points, idx):\n \"\"\"\n\n Input:\n points: input points data, [B, N, C]\n idx: sample index data, [B, S]... | [
[
"torch.arange",
"numpy.zeros",
"torch.norm",
"numpy.ones",
"torch.topk"
]
] |
triplet02/KoSpeech | [
"74d267b76ec72cf8bc916982af9a58df2dc1ee4e"
] | [
"kospeech/data/audio/parser.py"
] | [
"import numpy as np\nfrom torch import Tensor, FloatTensor\nfrom kospeech.data.audio.core import load_audio\nfrom kospeech.data.audio.augment import NoiseInjector, SpecAugment\nfrom kospeech.data.audio.feature import MelSpectrogram, MFCC, Spectrogram, FilterBank\n\n\nclass AudioParser(object):\n \"\"\"\n Prov... | [
[
"torch.FloatTensor",
"numpy.swapaxes"
]
] |
ZhangJianAI-CV/Awesome-project | [
"b07c8c270bd511246133541c4aee28c2472c633f"
] | [
"PaddleDetection/deploy/pptracking/python/mot/tracker/jde_tracker.py"
] | [
"# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"numpy.logical_and"
]
] |
tkhe/simple-mtcnn | [
"f39b66ec958efc745e1af8a4e0c65a63e0d4a6d8"
] | [
"tools/train_net.py"
] | [
"import argparse\nimport pprint\nimport sys\n\nimport torch\nimport torchvision.transforms as transforms\nfrom torch.utils.data import DataLoader\n\nfrom mtcnn.config import cfg\nfrom mtcnn.datasets.iteration_based_batch_sampler import build_batch_sampler\nfrom mtcnn.datasets.roidb import get_roidb\nfrom mtcnn.engi... | [
[
"torch.device",
"torch.utils.data.DataLoader"
]
] |
NegriLuca/pigasus | [
"d5057b771f81cfa05bb08ea4b0fd99088150cd7a",
"d5057b771f81cfa05bb08ea4b0fd99088150cd7a",
"d5057b771f81cfa05bb08ea4b0fd99088150cd7a"
] | [
"python/fem/norm.py",
"python/plugin/figa_circ.py",
"python/plugin/grad_shafranov.py"
] | [
"# -*- coding: UTF-8 -*-\n#! /usr/bin/python\n\n# To change this template, choose Tools | Templates\n# and open the template in the editor.\n\n__author__=\"ARA\"\n__all__ = ['norm']\n__date__ =\"$Feb 14, 2012 11:40:06 AM$\"\n\nfrom . import common_obj as _com\nfrom . import constants as _cst\nimport numpy as _np\nf... | [
[
"numpy.zeros"
],
[
"numpy.genfromtxt",
"scipy.sparse.linalg.LinearOperator",
"numpy.random.random",
"scipy.sparse.linalg.gmres",
"scipy.sparse.kron",
"numpy.zeros_like",
"numpy.linalg.norm",
"scipy.sparse.diags",
"numpy.eye",
"scipy.sparse.csr_matrix",
"scipy.op... |
iacolippo/octconv-pytorch | [
"032641413f1e8ece2893118e13cd1815d71ce0a9"
] | [
"octconv.py"
] | [
"import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass OctConv(nn.Module):\n def __init__(self, ch_in, ch_out, kernel_size, stride=1, alphas=(0.5, 0.5)):\n super(OctConv, self).__init__()\n self.alpha_in, self.alpha_out = alphas\n assert 0 <= sel... | [
[
"torch.cat",
"numpy.isclose",
"torch.nn.functional.avg_pool2d",
"torch.Tensor",
"torch.randn",
"torch.nn.functional.conv2d"
]
] |
you74674/pytorch | [
"06838ce8b16b2cc2f9e903f3ebdd46659a0e66bb",
"06838ce8b16b2cc2f9e903f3ebdd46659a0e66bb",
"06838ce8b16b2cc2f9e903f3ebdd46659a0e66bb"
] | [
"test/fx2trt/converters/acc_op/test_reshape.py",
"test/fx_acc/test_acc_tracer.py",
"test/fx2trt/passes/test_fuse_permute_linear_trt.py"
] | [
"# Owner(s): [\"oncall: fx\"]\n\nimport torch\nimport torch.fx.experimental.fx_acc.acc_ops as acc_ops\nfrom torch.testing._internal.common_fx2trt import AccTestCase, InputTensorSpec\nfrom parameterized import parameterized\nfrom torch.testing._internal.common_utils import run_tests\n\n\nclass TestReshapeConverter(A... | [
[
"torch.testing._internal.common_fx2trt.InputTensorSpec",
"torch.testing._internal.common_utils.run_tests",
"torch.randn",
"torch.reshape"
],
[
"torch.nn.Linear",
"torch.nn.EmbeddingBag",
"torch.cat",
"torch.stack",
"torch.tile",
"torch.nn.BatchNorm2d",
"torch.argmin... |
joybanerjee08/imgaug | [
"e9d3515b52f2205cee1d3c9a913fcc638d15993b"
] | [
"test/augmenters/test_blur.py"
] | [
"from __future__ import print_function, division, absolute_import\n\nimport time\n\nimport matplotlib\nmatplotlib.use('Agg') # fix execution of tests involving matplotlib on travis\nimport numpy as np\nimport six.moves as sm\nimport cv2\nfrom scipy import ndimage\n\nimport imgaug as ia\nfrom imgaug import augmente... | [
[
"matplotlib.use",
"numpy.max",
"numpy.array",
"numpy.zeros_like",
"numpy.array_equal",
"numpy.zeros",
"numpy.round",
"numpy.copy",
"numpy.tile",
"numpy.float64",
"numpy.allclose",
"numpy.float32",
"numpy.all",
"numpy.dtype"
]
] |
mdodici/trojan-WD-pollution | [
"ec79a96f0d9517a53df4c82ca1be0d5d38f3346b"
] | [
"3-Trojan_Results/Scripts/1kB_Evals.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\ntarget = '1kB'\nradeg = np.pi/180\n\ndef cart_to_pol(x,y):\n r = np.sqrt(x**2 + y**2)\n phi = np.arctan2(y,x)\n return r, phi\n\ndef pol_to_cart(r... | [
[
"numpy.max",
"numpy.zeros_like",
"numpy.array",
"numpy.sin",
"numpy.ones_like",
"numpy.zeros",
"numpy.median",
"numpy.min",
"matplotlib.pyplot.subplots",
"numpy.amin",
"numpy.amax",
"numpy.arctan2",
"numpy.sqrt",
"numpy.cos",
"numpy.power",
"numpy.li... |
PowerOlive/mindspore | [
"665ec683d4af85c71b2a1f0d6829356f2bc0e1ff",
"665ec683d4af85c71b2a1f0d6829356f2bc0e1ff",
"665ec683d4af85c71b2a1f0d6829356f2bc0e1ff",
"665ec683d4af85c71b2a1f0d6829356f2bc0e1ff",
"665ec683d4af85c71b2a1f0d6829356f2bc0e1ff",
"665ec683d4af85c71b2a1f0d6829356f2bc0e1ff",
"665ec683d4af85c71b2a1f0d6829356f2bc0e1f... | [
"tests/st/pynative/data_parallel/test_pynative_hccl_allreduce.py",
"tests/st/auto_monad/test_auto_monad_layer.py",
"tests/st/ops/cpu/test_broadcast_to_op.py",
"tests/st/scipy_st/test_utils.py",
"tests/st/auto_monad/test_effect_random.py",
"tests/ut/python/parallel/test_auto_parallel_shard_propagation2.py"... | [
"# Copyright 2021 Huawei Technologies Co., Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l... | [
[
"numpy.random.seed",
"numpy.array",
"numpy.ones"
],
[
"numpy.array",
"numpy.random.uniform",
"numpy.random.randn",
"numpy.vstack"
],
[
"numpy.arange",
"numpy.ones",
"numpy.broadcast_to",
"numpy.random.rand"
],
[
"numpy.allclose",
"numpy.sum",
"nu... |
navin3011/Seminar-Energy-economy | [
"ddff1bf28f445d5a447fab119d7a6192f231d9c3"
] | [
"simbench/converter/voltLvl.py"
] | [
"# -*- coding: utf-8 -*-\n\n# Copyright (c) 2019 by University of Kassel, Tu Dortmund, RWTH Aachen University and Fraunhofer\n# Institute for Energy Economics and Energy System Technology (IEE) Kassel and individual\n# contributors (see AUTHORS file for details). All rights reserved.\n\nimport numpy as np\nfrom pan... | [
[
"numpy.array",
"numpy.ones",
"pandas.Series"
]
] |
freol35241/pysim | [
"36faf67d00ff644a593f20994c0f15053d600886"
] | [
"pysim/systems/python_systems.py"
] | [
"\"\"\"Example systems created in Python\n\"\"\"\nimport numpy as np\n\nfrom pysim.cythonsystem import Sys\n\nclass VanDerPol(Sys):\n \"\"\"Simple example of a class representing a VanDerPol oscillator.\n \"\"\"\n def __init__(self):\n self.add_state_scalar(\"x\", \"dx\")\n self.add_state_sca... | [
[
"numpy.ones",
"numpy.zeros"
]
] |
GrapeBaBa/ibis | [
"507bb14efdcfd719a0487ee23fe1c85c177517f6"
] | [
"ibis/tests/benchmarks/test_benchmarks.py"
] | [
"import numpy as np\nimport pandas as pd\nimport pytest\n\nimport ibis\nimport ibis.expr.datatypes as dt\nfrom ibis.backends.pandas.udf import udf\n\n\ndef make_t():\n return ibis.table(\n [\n ('_timestamp', 'int32'),\n ('dim1', 'int32'),\n ('dim2', 'int32'),\n ... | [
[
"numpy.average",
"pandas.date_range",
"numpy.random.choice",
"numpy.random.rand"
]
] |
aman-gupta-1995/Machine-Learning-Mindware | [
"8b3050720711730520683c89949e3dbdfb168961",
"8b3050720711730520683c89949e3dbdfb168961",
"8b3050720711730520683c89949e3dbdfb168961"
] | [
"examples/cls_exp_user_defined_model.py",
"test/exps/basics/evaluate_text2vector.py",
"mindware/components/models/regression/extra_trees.py"
] | [
"import argparse\nimport os\nimport sys\nimport time\nimport numpy as np\n\nfrom ConfigSpace.configuration_space import ConfigurationSpace\nfrom ConfigSpace.hyperparameters import UniformFloatHyperparameter, \\\n UniformIntegerHyperparameter, CategoricalHyperparameter, \\\n UnParametrizedHyperparameter, Const... | [
[
"numpy.round",
"sklearn.metrics.balanced_accuracy_score",
"sklearn.tree.DecisionTreeClassifier",
"sklearn.model_selection.train_test_split",
"sklearn.datasets.load_iris"
],
[
"numpy.array"
],
[
"sklearn.ensemble.ExtraTreesRegressor"
]
] |
maybeLee/keras | [
"793620ae1bdda7e37edd485b034e8962fff57f3e",
"793620ae1bdda7e37edd485b034e8962fff57f3e"
] | [
"keras/preprocessing/image.py",
"keras/optimizers/optimizer_v2/rmsprop_test.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... | [
[
"numpy.dot",
"scipy.ndimage.interpolation.affine_transform",
"numpy.random.choice",
"numpy.rollaxis",
"numpy.copy",
"numpy.min",
"numpy.mean",
"numpy.cos",
"numpy.deg2rad",
"numpy.random.random",
"numpy.max",
"numpy.sin",
"tensorflow.python.util.tf_export.keras_... |
sunpy/xrayvision | [
"905042be8227688c4088800423dfa8db79e56566"
] | [
"xrayvision/tests/test_clean.py"
] | [
"import numpy as np\nimport astropy.units as u\nfrom astropy.convolution.kernels import Gaussian2DKernel\n\nfrom scipy import signal\n\nfrom ..clean import clean, ms_clean, component, radial_prolate_sphereoidal,\\\n vec_radial_prolate_sphereoidal\nfrom ..transform import dft_map, idft_map\n\n\ndef test_clean_ide... | [
[
"numpy.repeat",
"numpy.log10",
"numpy.pad",
"numpy.sin",
"numpy.array_equal",
"numpy.zeros",
"numpy.ones",
"numpy.allclose",
"numpy.cos",
"numpy.all",
"numpy.linspace",
"scipy.signal.convolve2d",
"scipy.signal.convolve"
]
] |
DedeKite/wxPlotLab | [
"808d457aeb897ceb37535bcd11d15b65a0a14cd1"
] | [
"mplotlab/graphics/Navigation.py"
] | [
"# -*-coding:Utf-8 -*\r\n\r\nfrom mplotlab import App\r\nfrom matplotlib.backend_bases import NavigationToolbar2\r\n\r\nimport wx\r\n\r\nclass Cursors:\r\n # this class is only used as a simple namespace\r\n HAND, POINTER, SELECT_REGION, MOVE = list(range(4))\r\ncursors = Cursors()\r\n\r\ncursord = {\r\n c... | [
[
"matplotlib.backend_bases.NavigationToolbar2.__init__"
]
] |
Walon1998/dace | [
"95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0",
"95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0",
"95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0",
"95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0",
"95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0",
"95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0",
"95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a... | [
"samples/polybench/lu.py",
"tests/symbol_dependent_transients_test.py",
"samples/tensorflow/dataset_reader.py",
"tests/transformations/maptoforloop_test.py",
"tests/fpga/vector_reduce_test.py",
"tests/chained_nested_tasklet_test.py",
"tests/blas/nodes/blas_nodes_test.py",
"tests/wcr_cudatest.py"
] | [
"# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.\nimport math\nimport numpy as np\nimport dace\nimport polybench\n\nN = dace.symbol('N')\n\n#datatypes = [dace.float64, dace.int32, dace.float32]\ndatatype = dace.float64\n\n# Dataset sizes\nsizes = [{N: 40}, {N: 120}, {N: 400}, {N: 2000}, ... | [
[
"numpy.transpose"
],
[
"numpy.sum",
"numpy.random.randn",
"numpy.allclose",
"numpy.ndarray",
"numpy.cumsum"
],
[
"tensorflow.data.TFRecordDataset",
"tensorflow.decode_raw",
"tensorflow.FixedLenFeature",
"tensorflow.Session",
"tensorflow.reshape",
"numpy.mult... |
Theomat/MPSEAS | [
"91f9c991e2061a7d230e491210d2c93005fd2236"
] | [
"pseas/runnable/print_table_step1.py"
] | [
"import pandas as pd\nimport numpy as np\n\nCOLORS_QTY: int = 5\n# =============================================================================\n# Argument parsing.\n# =============================================================================\nimport argparse\n\nfrom scipy import integrate\nargument_parser: arg... | [
[
"numpy.max",
"scipy.integrate.trapezoid",
"numpy.zeros",
"numpy.min",
"pandas.read_csv"
]
] |
KoutaOhishi/burger_war_dev | [
"9a7e21d631dc7e82f5341450ddafdc8ed32d2ac1"
] | [
"burger_war_dev/scripts/waypoint.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport csv\nimport math\nimport numpy as np\n\nFIELD_SCORE_NUM_OFFSET=6\n\nclass Waypoints:\n\n def __init__(self, path, side):\n self.points = []\n self.number = 0\n self.Waypoints_Lap = 0\n self.next_target_idx = -1\n self.al... | [
[
"numpy.ones"
]
] |
kiss2u/google-research | [
"5b70d349a6af2f5ec1694bfd5341e6b3fb526947",
"2cd66234656f9e2f4218ed90a2d8aa9cf3139093",
"2c0043ecd507e75e2df9973a3015daf9253e1467",
"2c0043ecd507e75e2df9973a3015daf9253e1467",
"2c0043ecd507e75e2df9973a3015daf9253e1467",
"2c0043ecd507e75e2df9973a3015daf9253e1467",
"2c0043ecd507e75e2df9973a3015daf9253e146... | [
"saccader/visual_attention/saccader_classnet.py",
"correct_batch_effects_wdn/transform_test.py",
"meta_reward_learning/semantic_parsing/nsm/model_factory.py",
"norml/config_maml.py",
"concept_explanations/toy_helper.py",
"video_structure/hyperparameters.py",
"cnn_quantization/tf_cnn_benchmarks/models/de... | [
"# coding=utf-8\n# Copyright 2020 The Google Research Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.compat.v1.reshape",
"tensorflow.compat.v1.variables_initializer",
"tensorflow.compat.v1.concat",
"tensorflow.compat.v1.variable_scope",
"tensorflow.compat.v1.global_variables",
"tensorflow.compat.v1.reduce_mean"
],
[
"numpy.array",
"pandas.util.testing.assert_frame_... |
qzhong0605/tensorboardplugins | [
"92bfc7ca96b933cdbdf074a08f26f5c715d8421d"
] | [
"tensorboard/plugins/interactive_inference/witwidget/notebook/base.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.train.Example",
"tensorflow.logging.set_verbosity",
"tensorflow.train.SequenceExample"
]
] |
J-Z-Z/akshare | [
"0a9ca71b381a272e2f56211e455ff2493dfed17a",
"0a9ca71b381a272e2f56211e455ff2493dfed17a",
"0a9ca71b381a272e2f56211e455ff2493dfed17a",
"0a9ca71b381a272e2f56211e455ff2493dfed17a"
] | [
"akshare/futures_derivative/nh_index_price.py",
"akshare/stock/stock_rank_forecast.py",
"akshare/index/index_cflp.py",
"akshare/stock_feature/stock_wencai.py"
] | [
"#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n\"\"\"\nDate: 2021/12/20 14:52\nDesc: 南华期货-商品指数历史走势-价格指数-数值\nhttp://www.nanhua.net/nhzc/varietytrend.html\n1000 点开始, 用收益率累计\nhttp://www.nanhua.net/ianalysis/varietyindex/price/A.json?t=1574932974280\n\"\"\"\nimport time\n\nimport requests\nimport pandas as pd\n\n\ndef... | [
[
"pandas.to_datetime",
"pandas.DataFrame"
],
[
"pandas.DataFrame",
"pandas.to_numeric"
],
[
"pandas.to_datetime",
"pandas.DataFrame",
"pandas.to_numeric"
],
[
"pandas.DataFrame",
"pandas.to_numeric"
]
] |
ZhangXiao96/RecommenderSystems4Python | [
"f125536436f83696e133e6b98c22430a47df287d"
] | [
"TraditionalRecommenderSystems/MatrixFactorization/MatrixFactorization.py"
] | [
"from lib.utils import top_k\nfrom TraditionalRecommenderSystems.MatrixFactorization.Models import BaseMF\nimport numpy as np\nimport pandas as pd\nimport torch\nfrom torch import nn\nimport torch.utils.data as data\nfrom tqdm import tqdm\n\n\nclass MatrixFactorization(object):\n def __init__(self, user_item_pai... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.isnan",
"torch.nn.MSELoss",
"pandas.DataFrame",
"torch.no_grad",
"torch.from_numpy",
"torch.utils.data.TensorDataset"
]
] |
cww97/Jordan | [
"00234927d5c33e2dd301c5dae57eb89cd5e54c79"
] | [
"brain/mcts_alphaZero.py"
] | [
"import numpy as np\nimport copy \n\n\ndef softmax(x):\n probs = np.exp(x - np.max(x))\n probs /= np.sum(probs)\n return probs\n\nclass TreeNode(object):\n \"\"\"A node in the MCTS tree. Each node keeps track of its own value Q, prior probability P, and\n its visit-count-adjusted prior score u.\n ... | [
[
"numpy.max",
"numpy.array",
"numpy.random.choice",
"numpy.zeros",
"numpy.sum",
"numpy.sqrt"
]
] |
zqma/IIC | [
"9d4e30b51535c6ca381389d9c22ce45be4d11883"
] | [
"proj/archs/segmentation/baselines/net10a_doersch.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom proj.archs.cluster.vgg import VGGNet\nfrom proj.archs.segmentation.net10a import SegmentationNet10aTrunk, \\\n SegmentationNet10a\nfrom proj.utils.segmentation.baselines.general import get_patches\n\n__all__ = [\"SegmentationNet10aDoer... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.nn.Dropout",
"torch.nn.BatchNorm2d",
"torch.nn.functional.interpolate",
"torch.nn.ReLU",
"torch.nn.Conv2d"
]
] |
sdc50/bokeh | [
"4f0a77c96f0045d380e5e9edb606a9f3c7832d9f"
] | [
"tests/unit/bokeh/core/test_properties.py"
] | [
"#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.\n# All rights reserved.\n#\n# The full license is in the file LICENSE.txt, distributed with this software.\n#---------------------------------------------------------... | [
[
"numpy.array"
]
] |
omshinde/dfc2019 | [
"2e48cc8442c2c33aef7e1a0de27041709ef160e8"
] | [
"track2/icnet/memory_saving_gradients.py"
] | [
"from toposort import toposort\nimport contextlib\nimport numpy as np\nimport tensorflow as tf\nimport tensorflow.contrib.graph_editor as ge\nimport time\nimport sys\nsys.setrecursionlimit(10000)\n# refers back to current module if we decide to split helpers out\nutil = sys.modules[__name__]\n\n# getting rid of \"W... | [
[
"tensorflow.contrib.graph_editor.reroute_ts",
"tensorflow.contrib.graph_editor.filter_ts_from_regex",
"tensorflow.get_default_graph",
"tensorflow.expand_dims",
"tensorflow.contrib.graph_editor.get_backward_walk_ops",
"tensorflow.contrib.graph_editor.add_control_inputs",
"tensorflow.sca... |
katekaseth/Project_One | [
"0eae5928b92ff99cc27815b73acc751d0348fca8"
] | [
"server/db/Data/data_cleaner.py"
] | [
"import pandas as pd\nimport re\n\ndata = pd.read_csv(\"BIPMetadata_current.csv\")\n\ndef format_date(date_column):\n # formatting the date data to display as yyyy-mm-dd\n new_dates = []\n for date in date_column:\n month = date[0:date.find('/')]\n date = date[date.find('/')+1:]\n day ... | [
[
"pandas.read_csv"
]
] |
kirtanp/MAMO-fair | [
"fd0fc39383f11a9e1ec401233b89c2399860fb94"
] | [
"utils/utilities.py"
] | [
"#!/usr/bin/env python\nimport numpy as np\nfrom collections import defaultdict\nimport itertools\nfrom sklearn.metrics import confusion_matrix\n\ndef print_data_stats(sens_attr, class_labels):\n \"\"\"Print a few numbers about the data: Total number of points, number of\n protected examples and unprotected e... | [
[
"numpy.max",
"sklearn.metrics.confusion_matrix",
"numpy.min"
]
] |
changwoolee/gradient-rescaling-attention-model | [
"2f1d819e8cee03a9d06312e700a5c474bed48c70"
] | [
"util.py"
] | [
"import tensorflow as tf\n\nfrom contextlib import contextmanager\nfrom PIL import Image\n\nfrom keras import backend as K\nfrom keras.utils.data_utils import OrderedEnqueuer\n\ndef heteroscedastic_loss(attention=False, \n\t\t\t\t\t\t\t\t\t\t\t\t block_attention_gradient=False, \n\t\t\t\t\t\t\t\t\t\t\t\t mode='l2')... | [
[
"tensorflow.exp",
"tensorflow.ConfigProto",
"tensorflow.Session"
]
] |
jie311/vega | [
"1bba6100ead802697e691403b951e6652a99ccae",
"1bba6100ead802697e691403b951e6652a99ccae",
"1bba6100ead802697e691403b951e6652a99ccae",
"1bba6100ead802697e691403b951e6652a99ccae",
"1bba6100ead802697e691403b951e6652a99ccae",
"1bba6100ead802697e691403b951e6652a99ccae"
] | [
"vega/algorithms/nas/fis/autogate_s2_trainer_callback.py",
"vega/datasets/transforms/RandomMirrow_pair.py",
"vega/algorithms/data_augmentation/cyclesr/cyclesr_trainer_callback.py",
"vega/datasets/transforms/ImageTransform.py",
"vega/datasets/transforms/Cutout.py",
"vega/datasets/tensorflow/adapter.py"
] | [
"# -*- coding: utf-8 -*-\r\n\r\n# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.\r\n# This program is free software; you can redistribute it and/or modify\r\n# it under the terms of the MIT License.\r\n# This program is distributed in the hope that it will be useful,\r\n# but WITHOUT ANY WAR... | [
[
"pandas.DataFrame"
],
[
"numpy.random.choice"
],
[
"numpy.asarray",
"torch.no_grad",
"torch.clamp",
"torch.unsqueeze",
"torch.cuda.is_available",
"torch.mean"
],
[
"numpy.array"
],
[
"numpy.ones",
"numpy.random.randint",
"torch.from_numpy",
"nump... |
aauss/DSND_Term2 | [
"ff1ff8edc208652c29bfc25f18c610a02dc9d299"
] | [
"lessons/CRISP_DM/RemovingData.py"
] | [
"import pandas as pd\r\nimport numpy as np\r\nfrom collections import defaultdict\r\nimport RemovingDataSolns as s\r\n\r\n# Question 1\r\ndef prop_sals_test(prop_sals):\r\n '''\r\n INPUT prop_sals - a float as the percent of missing values in the salary column\r\n\r\n Prints statement related to the correc... | [
[
"numpy.allclose"
]
] |
pengshuang/allennlp | [
"91d0fa1a51485c4118e48426d76328acd8049587"
] | [
"allennlp/interpret/saliency_interpreters/simple_gradient.py"
] | [
"import math\n\nfrom typing import List\nimport numpy\n\nfrom allennlp.common.util import JsonDict, sanitize\nfrom allennlp.interpret.saliency_interpreters.saliency_interpreter import SaliencyInterpreter\nfrom allennlp.nn import util\n\n\n@SaliencyInterpreter.register(\"simple-gradient\")\nclass SimpleGradient(Sali... | [
[
"numpy.sum",
"numpy.linalg.norm"
]
] |
webdeveloper0012/Tensor2tensor | [
"48bce065278eba461c8a2840e4132becbc822c7c",
"48bce065278eba461c8a2840e4132becbc822c7c",
"48bce065278eba461c8a2840e4132becbc822c7c",
"48bce065278eba461c8a2840e4132becbc822c7c"
] | [
"tensor2tensor/data_generators/problem.py",
"tensor2tensor/layers/common_hparams.py",
"tensor2tensor/data_generators/gene_expression_test.py",
"tensor2tensor/data_generators/desc2code_test.py"
] | [
"# coding=utf-8\n# Copyright 2017 The Tensor2Tensor 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 requir... | [
[
"tensorflow.concat",
"tensorflow.contrib.slim.tfexample_decoder.Tensor",
"tensorflow.logging.info",
"tensorflow.VarLenFeature",
"tensorflow.contrib.data.TFRecordDataset",
"tensorflow.contrib.slim.tfexample_decoder.TFExampleDecoder",
"tensorflow.contrib.slim.parallel_reader.get_data_fil... |
A-Charvin/cv-tricks.com | [
"3c6da9c62665abefa6114e0b7f0c39a0a012f496"
] | [
"Tensorflow-tutorials/tutorial-2-image-classifier/predict2.py"
] | [
"import tensorflow as tf\nimport numpy as np\nimport os,glob,cv2\nimport sys,argparse\n\n\n# First, pass the path of the image\ndir_path = os.path.dirname(os.path.realpath(__file__))\nimage_path=sys.argv[1] \nfilename = dir_path +'/' +image_path\nimage_size=128\nnum_channels=3\nimages = []\n# Reading the image usin... | [
[
"numpy.array",
"tensorflow.train.latest_checkpoint",
"tensorflow.get_default_graph",
"tensorflow.train.import_meta_graph",
"tensorflow.Session",
"numpy.multiply"
]
] |
87003697/Segmentation | [
"5973a64768632fc52c55f9ffc9f0b43746699b37"
] | [
"utils/losses.py"
] | [
"import numpy as np\nimport torch\nimport torch.nn.functional as F\nimport torch.nn as nn\nfrom sklearn.utils import class_weight \nfrom utils.lovasz_losses import lovasz_softmax\nimport pdb\n\ndef make_one_hot(labels, classes):\n one_hot = torch.FloatTensor(labels.size()[0], classes, labels.size()[2], labels.si... | [
[
"numpy.median",
"numpy.ones",
"torch.from_numpy",
"torch.nn.functional.softmax",
"torch.exp",
"torch.nn.CrossEntropyLoss",
"numpy.unique"
]
] |
meeseeksmachine/pandas | [
"27ebb3e1e40513ad5f8919a5bbc7298e2e070a39"
] | [
"pandas/core/sparse/frame.py"
] | [
"\"\"\"\nData structures for sparse float data. Life is made simpler by dealing only\nwith float64 data\n\"\"\"\nfrom __future__ import division\n# pylint: disable=E1101,E1103,W0231,E0202\n\nimport warnings\nfrom pandas.compat import lmap\nfrom pandas import compat\nimport numpy as np\n\nfrom pandas.core.dtypes.mis... | [
[
"pandas.compat.numpy.function.validate_cumsum",
"pandas.io.pickle._unpickle_array",
"pandas.core.ops.add_flex_arithmetic_methods",
"pandas.core.internals.create_block_manager_from_arrays",
"pandas.core.dtypes.cast.find_common_type",
"pandas._libs.sparse.get_blocks",
"pandas.core.sparse... |
jamesdu0504/760GroupProject | [
"dd870b3af7958fb2088c627ab02c781412b2a20f"
] | [
"dataset_characteristics.py"
] | [
"import datasets.import_datasets as im\nimport pandas as pd\n\n#Takes a very long time to run, probably not worth running when the output \n\ndatasets = [\"BMS1\", \n \"BMS2\", \n \"toydata\"\n \"uci_retail\",\n \"mushroom\", \n \"Belgian_retail\",\n ... | [
[
"pandas.DataFrame"
]
] |
gaozhangyang/DecST | [
"116ce9efa28a07793900d09345abab4cb512db98",
"116ce9efa28a07793900d09345abab4cb512db98"
] | [
"ex_ablation/exp_conv.py",
"ex_TM_comparison/modules/e3d_lstm.py"
] | [
"\nimport sys; sys.path.append('..')\nfrom API.tools import EarlyStopping\nfrom API.exp_basic import Exp_Basic\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom torch import optim\nfrom ex_ablation.model import ConvUnet\nfrom API.dataloader import load_data\nimport json\n\nimport os\nimport time\nimp... | [
[
"numpy.concatenate",
"numpy.array",
"torch.nn.MSELoss",
"numpy.save",
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"torch.load",
"numpy.average"
],
[
"numpy.concatenate",
"torch.device",
"torch.cat",
"torch.stack",
"torch.nn.MSELoss",
"torch.nn.Conv3d",
... |
cvitolo/DataScienceVM | [
"97e1b780de572266dcdab89d443af55d5b930f42"
] | [
"Tutorials/MLADS-spring-2018/CNTK_distributed/CNTK_distributed.py"
] | [
"import numpy as np\nimport os\nimport sys\nimport cntk\nfrom cntk.layers import Convolution2D, MaxPooling, Dense, Dropout\nfrom utils import *\nimport argparse\nfrom cntk.train.distributed import Communicator, mpi_communicator\n\n# Hyperparams\nEPOCHS = 1\nBATCHSIZE = 64 * 4\nLR = 0.01\nMOMENTUM = 0.9\nN_CLASSES =... | [
[
"numpy.argmax",
"numpy.zeros"
]
] |
jjjjohnson/OpenTransformer | [
"9a6371095ee83896d886addf55bda3a42c3918f6"
] | [
"otrans/encoder/transformer.py"
] | [
"# File : transformer.py\n# Author : Zhengkun Tian\n# Email : zhengkun.tian@outlook.com\n\nimport logging\nimport torch\nimport torch.nn as nn\nfrom otrans.module.pos import MixedPositionalEncoding, RelPositionalEncoding\nfrom otrans.module.ffn import PositionwiseFeedForward\nfrom otrans.module.attention import ... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.nn.Dropout",
"torch.nn.LayerNorm"
]
] |
haruiz/models | [
"4dfcf48f7e15646dca2089a0e9f583d24661924c",
"2db2501bc9928f68e225282f3884b81680a9cccb"
] | [
"research/object_detection/utils/visualization_utils.py",
"research/object_detection/utils/test_utils.py"
] | [
"# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.compat.v1.executing_eagerly",
"tensorflow.compat.v1.map_fn",
"numpy.ones_like",
"tensorflow.compat.v1.ones_like",
"tensorflow.compat.v1.shape",
"numpy.sort",
"numpy.cumsum",
"tensorflow.compat.v1.constant",
"numpy.histogram",
"numpy.uint8",
"numpy.zeros_like... |
huy-ha/dreamer-pytorch | [
"98561a5fe4ee5323b955f5fc79bbebf483f08d58"
] | [
"dreamer/models/rnns.py"
] | [
"import torch\nimport torch.distributions as td\nimport torch.nn as nn\nimport torch.nn.functional as tf\nfrom rlpyt.utils.collections import namedarraytuple\nfrom rlpyt.utils.buffer import buffer_method\n\nfrom dreamer.utils.module import FreezeParameters\n\nRSSMState = namedarraytuple('RSSMState', ['mean', 'std',... | [
[
"torch.nn.Linear",
"torch.zeros",
"torch.cat",
"torch.stack",
"torch.nn.functional.softplus",
"torch.nn.Sequential",
"torch.distributions.Normal",
"torch.nn.GRUCell"
]
] |
PhilaController/phl-budget-data | [
"fd249937c843aaff2375624160e2bec0b8043e3c",
"fd249937c843aaff2375624160e2bec0b8043e3c"
] | [
"src/phl_budget_data/etl/collections/monthly/school.py",
"src/phl_budget_data/etl/collections/monthly/city.py"
] | [
"\"\"\"Module for parsing montly school collections data.\"\"\"\nfrom typing import ClassVar\n\nimport pandas as pd\nimport pdfplumber\n\nfrom ...utils.misc import rename_tax_rows\nfrom ...utils.pdf import extract_words, words_to_table\nfrom .core import COLLECTION_TYPES, MonthlyCollectionsReport, get_column_names\... | [
[
"pandas.concat"
],
[
"pandas.concat"
]
] |
code-backdoor/code-backdoor | [
"1eeb3d79aa8a54c8f08e8d0156b569de5edd974e",
"1eeb3d79aa8a54c8f08e8d0156b569de5edd974e",
"9c3329dd8387c8242deb52bf590ebe3ac795f8de",
"1eeb3d79aa8a54c8f08e8d0156b569de5edd974e",
"9c3329dd8387c8242deb52bf590ebe3ac795f8de"
] | [
"Birnn_Transformer/ncc/utils/graph.py",
"Birnn_Transformer/ncc/eval/summarization/transformer_generator.py",
"Birnn_Transformer/ncc/eval/retrieval/retrieval_metrics.py",
"Birnn_Transformer/ncc/modules/seq2seq/lstm_decoder.py",
"Birnn_Transformer/ncc/eval/inference/type_predictor.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport dgl\nimport networkx as nx\nimport numpy as np\nimport torch\n\nfrom dataset.codesearchnet import MAX_SUB_TOKEN_LEN\n\n\ndef build_graph(tree_dict, dictionary, tree_leaf_subtoken=1, DGLGraph_PAD_WORD=-1) -> dgl.DGLGraph:\n # 叶子节点存的是拆开后的subtoken ,当然,如果token拆不开,那就还是一个token\n ... | [
[
"numpy.array"
],
[
"torch.zeros",
"torch.cat",
"torch.stack",
"torch.max",
"torch.no_grad",
"torch.multinomial",
"torch.Tensor"
],
[
"torch.range"
],
[
"torch.nn.functional.dropout",
"torch.cat",
"torch.nn.functional.linear",
"torch.nn.functional.sof... |
jphacks/C_2111 | [
"df87580614d7e5c225ea30746e5f2cd0576bbc98"
] | [
"bert/wtfml/data_loaders/nlp/classification.py"
] | [
"import pandas as pd\r\nimport torch\r\nfrom transformers import BertJapaneseTokenizer\r\nfrom wtfml.data_loaders.nlp.utils import clean_sentence\r\nimport transformers\r\n\r\nclass BERTSimpleDataset:\r\n \"\"\"\r\n Dataset for bert which can accept clearning function\r\n \"\"\"\r\n\r\n def __init__(sel... | [
[
"torch.tensor"
]
] |
Evelkos/CellularEvolutionaryAlgorithm | [
"9633337a00e20cb0c4d8a679e72755e165113468"
] | [
"src/cec2017/utils.py"
] | [
"# cec2017.utils\n# Author: Duncan Tilley\n# Additional functions for graphing and benchmarking\n\n\ndef surface_plot(function, domain=(-100, 100), points=30, dimension=2, ax=None):\n \"\"\"\n Creates a surface plot of a function.\n\n Args:\n function (function): The objective function to be called ... | [
[
"numpy.concatenate",
"numpy.zeros",
"matplotlib.pyplot.show",
"numpy.linspace",
"matplotlib.pyplot.axes"
]
] |
chamwen/NT-Benchmark | [
"d5a17a07fdfa89d80d47843c35ecf3e078b94371",
"d5a17a07fdfa89d80d47843c35ecf3e078b94371",
"d5a17a07fdfa89d80d47843c35ecf3e078b94371",
"d5a17a07fdfa89d80d47843c35ecf3e078b94371",
"d5a17a07fdfa89d80d47843c35ecf3e078b94371",
"d5a17a07fdfa89d80d47843c35ecf3e078b94371"
] | [
"NT_UDA/demo_syn_atdoc.py",
"NT_UDA/demo_syn_shot.py",
"NT_SSDA/demo_seed_dann.py",
"NT_UDA/utils/utils.py",
"NT_Noise/demo_uda_seed_mcc.py",
"NT_UDA/demo_seed_fixbi.py"
] | [
"# -*- coding: utf-8 -*-\n# A Survey on Negative Transfer\n# https://github.com/chamwen/NT-Benchmark\nimport numpy as np\nimport argparse\nimport os\nimport torch as tr\nimport torch.nn as nn\nimport torch.optim as optim\nfrom utils import network, loss, utils\nfrom utils.network import calc_coeff\nfrom utils.datal... | [
[
"torch.cat",
"torch.nn.Softmax",
"torch.max",
"torch.nn.Sequential",
"torch.norm",
"numpy.round",
"torch.nn.CrossEntropyLoss",
"torch.no_grad",
"numpy.mean",
"torch.sort",
"torch.utils.data.DataLoader",
"torch.load",
"torch.utils.data.TensorDataset",
"torch.... |
yangwenbo99/UNIQUE | [
"50136f3169b82f20c8677f36c1b0882905b6d809"
] | [
"plot1.py"
] | [
"#!/bin/python3\n\n'''\nThis file is to plot a graph with the following setting.\n\n1. We first select an image x_0\n2. We then add some pertubation to the image to get x_1 (its type shall\n configurable in the future, but we set it to be random or loaded from file\n currently)\n3. Next, we plot f(x) for all x ... | [
[
"torch.rand",
"torch.save",
"matplotlib.pyplot.plot",
"torch.load",
"matplotlib.pyplot.show",
"numpy.linspace"
]
] |
AlexErfan/Image_manipulation_detection | [
"f07008b86112ae7d40a3728c715c53b6054ecc70"
] | [
"lib/datasets/dist_fake.py"
] | [
"# --------------------------------------------------------\n# Fast R-CNN\n# Copyright (c) 2015 Microsoft\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Peng Zhou\n# --------------------------------------------------------\nfrom __future__ import absolute_import\nfrom __future__ import di... | [
[
"matplotlib.use",
"matplotlib.pyplot.xlim",
"numpy.zeros",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.plot",
"numpy.mean",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.ylabel"
]
] |
andrerubeis/AIF360 | [
"c0ce6f2e3eff9cab0ccce0bc0a05b681a5df7e44"
] | [
"examples/demo_optim_data_preproc..py"
] | [
"# %% md\n\n#### This notebook demonstrates the use of an optimized data pre-processing algorithm for bias mitigation\n\n# - The\n# debiasing\n# function\n# used is implemented in the\n# `OptimPreproc`\n\n#\n# class .\n# - Define\n# parameters\n# for optimized pre - processing specific to the dataset.\n... | [
[
"numpy.max",
"numpy.array",
"numpy.zeros",
"sklearn.preprocessing.StandardScaler",
"numpy.random.seed",
"matplotlib.pyplot.subplots",
"sklearn.linear_model.LogisticRegression",
"numpy.where",
"numpy.linspace"
]
] |
kasmith/geometry | [
"805b525ae8ffebb6bb1d84c094f76533d88dbb7a"
] | [
"geometry/shapes.py"
] | [
"\"\"\"Functions that work on collections of shapes\n\"\"\"\n\nfrom __future__ import division, print_function\nimport numpy as np\nfrom .convex import convex_area, convex_centroid\n\n__all__ = ['recenter_polygon', 'centroid_for_shapes',\n 'centroid_for_uncomputed_shapes', 'recenter_system',\n '... | [
[
"numpy.array",
"numpy.dot",
"numpy.sin",
"numpy.zeros",
"numpy.sqrt",
"numpy.cos"
]
] |
krfricke/pytorch-lightning | [
"fbd887df9d487da4c57d884e01b3401af140b1bc",
"fbd887df9d487da4c57d884e01b3401af140b1bc",
"fbd887df9d487da4c57d884e01b3401af140b1bc"
] | [
"tests/strategies/test_ddp_strategy_with_comm_hook.py",
"tests/utilities/test_apply_func_torchtext.py",
"pytorch_lightning/utilities/__init__.py"
] | [
"# Copyright The PyTorch Lightning 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/LICENSE-2.0\n#\n# Unless required by applicable law... | [
[
"torch.distributed.is_available",
"torch.distributed.algorithms.ddp_comm_hooks.default_hooks.fp16_compress_wrapper",
"torch.distributed.algorithms.ddp_comm_hooks.powerSGD_hook.PowerSGDState",
"torch.distributed.algorithms.ddp_comm_hooks.post_localSGD_hook.PostLocalSGDState"
],
[
"torch.dev... |
nathanheidacker/AlphaGradient | [
"cf031058f3e91381575e2df44cc029bcc7f4cc73"
] | [
"alphagradient/utils.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"Standard utility functions used throughout AlphaGradient\"\"\"\n\n# Standard Imports\nfrom __future__ import annotations\n\nfrom abc import ABC, abstractmethod\nimport builtins\nfrom datetime import (\n date,\n datetime,\n time,\n timedelta,\n)\nimport math\nfrom pathlib ... | [
[
"pandas.Timestamp"
]
] |
ozcell/gym_wmgds_ma | [
"c2cb22943913361947216b908d50decc46616e99",
"c2cb22943913361947216b908d50decc46616e99",
"c2cb22943913361947216b908d50decc46616e99"
] | [
"gym_wmgds/envs/mujoco/ant.py",
"gym_wmgds/envs/mujoco/thrower.py",
"gym_wmgds/envs/box2d/bipedal_walker.py"
] | [
"import numpy as np\nfrom gym_wmgds import utils\nfrom gym_wmgds.envs.mujoco import mujoco_env\n\nclass AntEnv(mujoco_env.MujocoEnv, utils.EzPickle):\n def __init__(self):\n mujoco_env.MujocoEnv.__init__(self, 'ant.xml', 5)\n utils.EzPickle.__init__(self)\n\n def step(self, a):\n xposbefo... | [
[
"numpy.square",
"numpy.isfinite",
"numpy.clip"
],
[
"numpy.square",
"numpy.linalg.norm"
],
[
"numpy.sign",
"numpy.array",
"numpy.abs",
"numpy.clip"
]
] |
SivilTaram/dialogue-utterance-rewriter-pytorch | [
"92c2254958b7a1ee9199836f7f2236575270983f",
"92c2254958b7a1ee9199836f7f2236575270983f",
"92c2254958b7a1ee9199836f7f2236575270983f"
] | [
"onmt/encoders/bert.py",
"bert_ckpt_convert.py",
"onmt/train_single.py"
] | [
"\"\"\"\nImplementation from: https://raw.githubusercontent.com/Zenglinxiao/OpenNMT-py/bert/onmt/encoders/bert.py\n@Author: Zenglinxiao\n\"\"\"\n\nimport torch.nn as nn\nfrom onmt.encoders.transformer import TransformerEncoderLayer\nfrom onmt.utils.misc import sequence_mask\n\n\nclass BertEncoder(nn.Module):\n \... | [
[
"torch.nn.Linear",
"torch.nn.Tanh",
"torch.nn.LayerNorm"
],
[
"torch.save",
"torch.load"
],
[
"torch.cuda.set_device",
"torch.load"
]
] |
emaballarin/phytorch | [
"68cf0a630e2fee9dd98f08639edcceb2389adf35"
] | [
"tests/cosmology/test_cosmology_apsuite.py"
] | [
"# Based on the astropy test suite (v4.2.1)\n# (https://github.com/astropy/astropy/blob/v4.2.1/astropy/cosmology/tests/test_cosmology.py)\nfrom io import StringIO\nfrom typing import Type\n\nimport numpy as np\nimport pytest\nimport torch\nfrom pytest import mark\nfrom torch import tensor\n\nimport phytorch.cosmolo... | [
[
"torch.zeros",
"torch.get_default_dtype",
"torch.tensor",
"torch.ones"
]
] |
Ankuraxz/gan | [
"b956c7d571539fd1053b3df3dddddbcbd27be65c",
"b956c7d571539fd1053b3df3dddddbcbd27be65c",
"b956c7d571539fd1053b3df3dddddbcbd27be65c"
] | [
"tensorflow_gan/examples/progressive_gan/networks_test.py",
"tensorflow_gan/examples/cifar/networks.py",
"tensorflow_gan/python/eval/sliced_wasserstein_test.py"
] | [
"# coding=utf-8\n# Copyright 2020 The TensorFlow GAN Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi... | [
[
"tensorflow.compat.v1.placeholder",
"numpy.random.normal",
"tensorflow.compat.v1.global_variables_initializer",
"tensorflow.random.normal",
"tensorflow.gradients",
"tensorflow.executing_eagerly",
"tensorflow.constant",
"tensorflow.compat.v1.trainable_variables",
"numpy.argmax",... |
adrienxu/SATE | [
"a932859287b2d3a944f7b0ae6670c84c98db7965"
] | [
"examples/speech_to_text/prep_covost_data.py"
] | [
"#!/usr/bin/env python3\n# 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 argparse\nimport logging\nfrom pathlib import Path\nimport shutil\nfrom tempfile import NamedTemporar... | [
[
"pandas.DataFrame.from_dict",
"pandas.merge"
]
] |
bderembl/mitgcm_configs | [
"8aa0343fc56e9da831e7a8b857838c4f4a76aa9a",
"8aa0343fc56e9da831e7a8b857838c4f4a76aa9a",
"8aa0343fc56e9da831e7a8b857838c4f4a76aa9a"
] | [
"corner/input/plot_field.py",
"eddy_airsea/analysis/ode_wave.py",
"floats/input/mygendata.py"
] | [
"#!/usr/bin/env python\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport scipy.io.netcdf as netcdf\n\nplt.ion()\n\nflag_mov = 0\nflag_traj = 0\n\ndir0 = '../run/'\n\nfile1 = 'diags.0000000000.t001.nc'\nfile2 = 'grid.t001.nc'\n\nf1 = netcdf.netcdf_file(dir0 + file1)\nf2 = netcdf.netcdf_file(dir0 + file2... | [
[
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.ion",
"matplotlib.pyplot.text",
"matplotlib.pyplot.contourf",
"numpy.zeros",
"numpy.argmin",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"numpy.min",
"matplotlib.pyplot.figure",
"... |
kzeiler/modflow6 | [
"a185d95b91985e965f8a04ae353305dff19b9637",
"a185d95b91985e965f8a04ae353305dff19b9637",
"a185d95b91985e965f8a04ae353305dff19b9637"
] | [
"autotest/test_gwf_maw04.py",
"autotest/test_gwf_npf_tvk01.py",
"autotest/test_gwt_prudic2004t2fmiats.py"
] | [
"import os\nimport pytest\nimport sys\nimport numpy as np\n\ntry:\n import pymake\nexcept:\n msg = \"Error. Pymake package is not available.\\n\"\n msg += \"Try installing using the following command:\\n\"\n msg += \" pip install https://github.com/modflowpy/pymake/zipball/master\"\n raise Exception(... | [
[
"numpy.array",
"numpy.sqrt",
"numpy.zeros"
],
[
"numpy.ones"
],
[
"numpy.array",
"numpy.genfromtxt",
"numpy.where",
"numpy.allclose",
"numpy.loadtxt"
]
] |
deep-spin/SIGMORPHON2019 | [
"60cf3b53be42e76238e7928405b2916cd9aed6c4",
"60cf3b53be42e76238e7928405b2916cd9aed6c4"
] | [
"onmt/tests/test_attention.py",
"onmt/modules/sparse_losses.py"
] | [
"\"\"\"\nHere come the tests for attention types and their compatibility\n\"\"\"\nimport unittest\nimport torch\nfrom torch.autograd import Variable\n\nimport onmt\n\n\nclass TestAttention(unittest.TestCase):\n\n def test_masked_global_attention(self):\n\n source_lengths = torch.IntTensor([7, 3, 5, 2])\n ... | [
[
"torch.IntTensor",
"torch.randn"
],
[
"torch.einsum",
"torch.full_like"
]
] |
GingerBear/texar | [
"46e006f9349893a3015cd937bee9914c516e26af",
"46e006f9349893a3015cd937bee9914c516e26af"
] | [
"texar/tf/data/data/tfrecord_data_test.py",
"texar/tf/modules/classifiers/conv_classifiers.py"
] | [
"# -*- coding: utf-8 -*-\n#\n\"\"\"\nUnit tests for data related operations.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport os\nimport sys\nimport copy\nimport shutil\nimport tempfile\nimpor... | [
[
"tensorflow.train.BytesList",
"tensorflow.train.Int64List",
"tensorflow.train.Features",
"tensorflow.compat.as_bytes",
"tensorflow.python_io.TFRecordWriter",
"tensorflow.test.TestCase.setUp",
"tensorflow.test.main",
"tensorflow.tables_initializer",
"tensorflow.local_variables_i... |
Jeasonlee313/paperdev_Phy_SORT- | [
"24c9ee5d3fc18ed6d3d85e4f95195d39bdf527e2"
] | [
"deep_sort/sort/tracker.py"
] | [
"# vim: expandtab:ts=4:sw=4\nfrom __future__ import absolute_import\nimport numpy as np\nfrom . import kalman_filter\nfrom . import linear_assignment\nfrom . import iou_matching\nfrom .track import Track\n\n\nclass Tracker:\n \"\"\"\n This is the multi-target tracker.\n\n Parameters\n ----------\n me... | [
[
"numpy.identity",
"numpy.array",
"numpy.asarray"
]
] |
moojink/drq | [
"e05c337aeb6fcae30c2db6e4afaca65e94511bbd"
] | [
"meta_logger.py"
] | [
"import csv\nimport json\nimport os\nimport shutil\nfrom collections import defaultdict\n\nimport numpy as np\n\nimport torch\nimport torchvision\nfrom termcolor import colored\nfrom torch.utils.tensorboard import SummaryWriter\n\nCOMMON_TRAIN_FORMAT = [('episode', 'E', 'int'), ('step', 'S', 'int'),\n ... | [
[
"numpy.array",
"torch.utils.tensorboard.SummaryWriter"
]
] |
G-Thor/merlin | [
"33fa6e65ddb903ed5633ccb66c74d3e7c128667f"
] | [
"src/logplot/logging_plotting.py"
] | [
"################################################################################\n# The Neural Network (NN) based Speech Synthesis System\n# https://svn.ecdf.ed.ac.uk/repo/inf/dnn_tts/\n#\n# Centre for Speech Technology Research\n# University of Edinburgh... | [
[
"matplotlib.use",
"numpy.asarray",
"numpy.flipud",
"matplotlib.pyplot.figure"
]
] |
Mirwaisse/tutorials | [
"18ec63ce8c85ef11af92685cc1436fd3034efc74"
] | [
"intermediate_source/model_parallel_tutorial.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nModel Parallel Best Practices\n*************************************************************\n**Author**: `Shen Li <https://mrshenli.github.io/>`_\n\nData parallel and model parallel are widely-used in distributed training\ntechniques. Previous posts have explained how to use\n`Dat... | [
[
"matplotlib.pyplot.switch_backend",
"torch.nn.Linear",
"torch.cat",
"torch.zeros",
"torch.nn.MSELoss",
"torch.nn.Sequential",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots",
"numpy.mean",
"torch.nn.ReLU",
"numpy.std",
"torch... |
kichiro09/object-detection | [
"e498d28503fd4a12d1fa9ade41891f2f9601c674",
"e498d28503fd4a12d1fa9ade41891f2f9601c674"
] | [
"official/recommendation/ncf_test.py",
"research/object_detection/models/feature_map_generators_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... | [
[
"numpy.array",
"tensorflow.logging.set_verbosity",
"tensorflow.zeros",
"tensorflow.Graph",
"tensorflow.test.main",
"tensorflow.local_variables_initializer",
"tensorflow.global_variables_initializer"
],
[
"tensorflow.trainable_variables",
"tensorflow.random_uniform",
"te... |
End-of-an-Era/PCN | [
"043c3063014166d831c07197d4e6748e824a5587"
] | [
"PCN/PyPCN.py"
] | [
"#!/usr/bin/python3\nfrom ctypes import *\nimport cv2\nimport numpy as np\nimport sys\nimport os\nimport time\nfrom ipdb import set_trace as dbg\nfrom enum import IntEnum\n\nclass CPoint(Structure):\n _fields_ = [(\"x\", c_int),\n (\"y\", c_int)]\n\nFEAT_POINTS = 14\nclass CWindow(Structure):\n ... | [
[
"numpy.array"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.