repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
shiomasa1218/zi2zi | [
"546025f59690b7c7c85de0146aba6f24f26f6b9d"
] | [
"export.py"
] | [
"# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nfrom __future__ import absolute_import\n\nimport tensorflow as tf\nimport argparse\nfrom model.unet import UNet\n\nparser = argparse.ArgumentParser(description='Export generator weights from the checkpoint file')\nparser.add_argument('--model_dir', de... | [
[
"tensorflow.ConfigProto",
"tensorflow.app.run",
"tensorflow.Session"
]
] |
BingLiHanShuang/AutoGluon_IntegrateSimpleFeedforward | [
"12089bfeb66a77b207547d13bd5a5b4f584f01cc"
] | [
"autogluon/utils/tabular/ml/utils.py"
] | [
"import logging\nimport multiprocessing\nimport os\nfrom collections import defaultdict\nfrom datetime import datetime\n\nimport numpy as np\nimport pandas as pd\nfrom pandas import DataFrame, Series\nfrom sklearn.model_selection import KFold, StratifiedKFold, RepeatedKFold, RepeatedStratifiedKFold, train_test_spli... | [
[
"numpy.logical_not",
"numpy.clip",
"sklearn.model_selection.StratifiedKFold",
"numpy.random.seed",
"pandas.DataFrame",
"numpy.sum",
"numpy.min",
"sklearn.model_selection.RepeatedKFold",
"sklearn.model_selection.RepeatedStratifiedKFold",
"sklearn.model_selection.KFold",
... |
vik748/contrast_manipulation_toolbox | [
"ccf04cdf323e0cf16475a8873090fa87b5fdf6f3"
] | [
"analyse_image_contrast.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu May 21 23:10:35 2020\n\n@author: vik748\n\"\"\"\nfrom cmtpy.histogram_warping_ace import HistogramWarpingACE\nfrom cmtpy import contrast_measurement as cm\nimport cv2\nimport numpy as np\nimport sys, os\nfrom matplotlib import pyplot as plt\n\... | [
[
"numpy.divide",
"numpy.ndenumerate",
"numpy.empty",
"matplotlib.pyplot.subplots",
"numpy.arange",
"matplotlib.pyplot.pause",
"matplotlib.pyplot.gcf",
"numpy.meshgrid"
]
] |
deeptavker/pysph | [
"6a9014fe225879b6f81f514f4db1270ad669c1ce"
] | [
"pysph/tools/tests/test_geometry_stl.py"
] | [
"import numpy as np\nimport unittest\nimport pytest\nimport tempfile\n\npytest.importorskip(\"stl\")\n\nimport pysph.tools.geometry_stl as G\nfrom pysph.base.utils import get_particle_array\n\ncube_stl = \"\"\"solid cube\n facet normal 0 0 0\n outer loop\n vertex 0 0 0\n vertex 0 1 0\n vertex 1 1... | [
[
"numpy.array",
"numpy.linalg.norm",
"numpy.zeros",
"numpy.ones",
"numpy.finfo"
]
] |
RDxR10/Linear_Feedback_Shift_Register | [
"9ab797b91f191e49d9a9fc3f77ecad339b3e7ae9"
] | [
"pylfsr/pylfsr.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\n'''\nAuthor @ Nikesh Bajaj\nfirst created : Date: 22 Oct 2017\nUpdated on : 29 Apr 2021\n : fixed bugs (1) not counting first outbit correctly (2) Exception in info method\n\t\t : added test properties (1) Balanc... | [
[
"numpy.isclose",
"matplotlib.pyplot.xlim",
"numpy.min",
"numpy.mean",
"numpy.where",
"matplotlib.patches.Rectangle",
"numpy.max",
"matplotlib.pyplot.subplots",
"numpy.logical_and",
"numpy.prod",
"numpy.arange",
"numpy.random.randint",
"numpy.append",
"numpy.... |
imatiach-msft/EconML | [
"289c5412f4492035b794c2833e7f6f6f48807dd1"
] | [
"econml/score/ensemble_cate.py"
] | [
"# Copyright (c) Microsoft Corporation. All rights reserved.\r\n# Licensed under the MIT License.\r\n\r\nimport numpy as np\r\nfrom sklearn.utils.validation import check_array\r\nfrom .._cate_estimator import BaseCateEstimator, LinearCateEstimator\r\n\r\n\r\nclass EnsembleCateEstimator:\r\n \"\"\" A CATE estimat... | [
[
"numpy.any",
"sklearn.utils.validation.check_array"
]
] |
markmorr/side | [
"90e9f822ea7976f402798af3bdf2901a21b31f15"
] | [
"start_to_elections.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nSpyder Editor\n\nThis is a temporary script file.\n\"\"\"\n\nfrom __future__ import unicode_literals, print_function, division\nfrom io import open\nimport glob\nimport os\nimport torch\n\n\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn impo... | [
[
"torch.nn.Linear",
"torch.cat",
"pandas.concat",
"pandas.read_csv",
"pandas.DataFrame",
"matplotlib.pyplot.subplots",
"sklearn.metrics.accuracy_score",
"torch.zeros",
"matplotlib.ticker.MultipleLocator",
"sklearn.ensemble.RandomForestClassifier",
"matplotlib.pyplot.titl... |
koso019003/espnet | [
"7735c992b3d71fabbc0f0c48c1d8f78d72785e17"
] | [
"espnet/nets/pytorch_backend/rnn/decoders.py"
] | [
"from distutils.version import LooseVersion\nimport logging\nimport math\nimport random\nimport six\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\n\nfrom argparse import Namespace\n\nfrom espnet.nets.ctc_prefix_score import CTCPrefixScore\nfrom espnet.nets.ctc_prefix_score import CTCPrefixSco... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.stack",
"torch.nn.ModuleList",
"torch.LongTensor",
"torch.topk",
"numpy.argmax",
"torch.index_select",
"torch.div",
"torch.zeros",
"torch.nn.LSTMCell",
"torch.fmod",
"torch.nn.Module.__init__",
"torch.nn.functional.log_... |
ertanusta/Faust | [
"fc47575174756a7e2aca695c42640db356fde98e"
] | [
"public/script/web.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*- \nimport numpy as np\nimport re\nimport sys\nimport pickle\nfrom sklearn.datasets import load_files\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer\nfrom sklearn.metrics import accurac... | [
[
"numpy.array",
"numpy.vectorize"
]
] |
eisen-ai/eisen-deploy | [
"ab1cdf0f8726cbfbdc7029616b1c753706b0039c",
"ab1cdf0f8726cbfbdc7029616b1c753706b0039c"
] | [
"eisen_deploy/serving/handlers.py",
"eisen_deploy/utils.py"
] | [
"import logging\nimport os\nimport torch\nimport dill\nimport json\nimport pickle\nimport msgpack\n\nfrom eisen.utils import EisenModuleWrapper\nfrom eisen_deploy.utils import encode_data, decode_data\n\n\nlogger = logging.getLogger(__name__)\n\n\ndef json_file_to_dict(json_file):\n if not os.path.exists(json_fi... | [
[
"torch.cuda.is_available",
"torch.Tensor",
"torch.load"
],
[
"numpy.frombuffer"
]
] |
holazzer/transformers | [
"8e908c8c74f556a82534f4cf1e7a1b4f7b55d24c"
] | [
"src/transformers/models/big_bird/modeling_big_bird.py"
] | [
"# coding=utf-8\n# Copyright 2021 Google Research and The HuggingFace Inc. team. 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... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.einsum",
"torch.ones",
"torch.nn.BCEWithLogitsLoss",
"torch.transpose",
"torch.nn.functional.pad",
"torch.nn.CrossEntropyLoss",
"numpy.concatenate",
"torch.nn.LayerNorm",
"torch.minimum",
"tensorflow.train.list_variables",
... |
kimandsharp/dockeye_multi | [
"f9e987024ba796fd2c12a17ef06b9bf3bd0eb69f"
] | [
"src/dockeyeM_c.py"
] | [
"#############################################\n# Author: Kim Sharp\n# Date: 7/21/2017\n# \n# branch off dockeye_c_v2.3.py to dock multiple conformations\n# of ligand simultaneously\n# usage inside pymol command window: de('protein_target.pdb','ligand.pdb')\n# target protein 1st, then ligand- ligand pdb file ... | [
[
"numpy.zeros"
]
] |
nudlesoup/OpticalFlow-Flownet | [
"0938756f5ed8dd03b5ba65af3533eea48efa15cd",
"0938756f5ed8dd03b5ba65af3533eea48efa15cd"
] | [
"book.py",
"warping.py"
] | [
"#!/usr/bin/env python\n\nimport cv2\nimport numpy as np\ndef getPerspectiveTransformMatrix(p1, p2):\n matrixIndex = 0\n A=[]\n for i in range(0, len(p1)):\n x, y = p1[i][0], p1[i][1]\n u, v = p2[i][0], p2[i][1]\n A.append([x, y, 1, 0, 0, 0, -u * x, -u * y, -u])\n A.append([0, 0... | [
[
"numpy.array",
"numpy.dot",
"numpy.reshape",
"numpy.asarray",
"numpy.set_printoptions",
"numpy.linalg.svd"
],
[
"numpy.max",
"numpy.zeros_like",
"numpy.min",
"numpy.mean",
"numpy.std",
"numpy.arange",
"numpy.fromfile"
]
] |
mdzh10/covid19_ultrasound | [
"8a1192053554e0a08649c35d9686dc842f0fe026"
] | [
"pocovidnet/pocovidnet/evaluate_covid19.py"
] | [
"\"\"\"\nEvaluation class that performs forward pass through trained models\n\"\"\"\nimport os\n\nimport cv2\nimport numpy as np\n\nfrom pocovidnet import MODEL_FACTORY\nfrom tensorflow.keras.preprocessing.image import ImageDataGenerator\n\nDIR_PATH = os.path.dirname(os.path.realpath(__file__))\nNUM_FOLDS = 5\nCLAS... | [
[
"numpy.array",
"tensorflow.keras.preprocessing.image.ImageDataGenerator",
"numpy.mean"
]
] |
stevemats/mne-python | [
"732bb1f994e64e41a8e95dcc10dc98c22cac95c0",
"732bb1f994e64e41a8e95dcc10dc98c22cac95c0",
"47051833f21bb372d60afc3adbf4305648ac7f69"
] | [
"mne/preprocessing/tests/test_realign.py",
"tutorials/simulation/80_dics.py",
"examples/inverse/psf_ctf_label_leakage.py"
] | [
"# Author: Mark Wronkiewicz <wronk@uw.edu>\n#\n# License: BSD-3-Clause\n\nimport numpy as np\nfrom numpy.testing import assert_allclose\nfrom scipy.interpolate import interp1d\nimport pytest\n\nfrom mne import create_info, find_events, Epochs\nfrom mne.io import RawArray\nfrom mne.preprocessing import realign_raw\n... | [
[
"numpy.testing.assert_allclose",
"scipy.interpolate.interp1d",
"numpy.random.RandomState",
"numpy.arange",
"numpy.corrcoef"
],
[
"scipy.signal.unit_impulse",
"scipy.signal.coherence",
"numpy.random.RandomState",
"matplotlib.pyplot.subplots",
"numpy.arange",
"scipy.s... |
YangChenye/Python-Code | [
"66a7edff84143ed6cc9518717c555399683e334c",
"66a7edff84143ed6cc9518717c555399683e334c"
] | [
"Data-Processing/for_txt/write_txt.py",
"Algorithm/Least-Squares/Least squares.py"
] | [
"# 将列表写入txt\nimport numpy as np\na = [1, 2, 3]\n\nnp.savetxt('11.txt', a, fmt='%i', delimiter=',')\n ",
"import pandas as pd\n\nsales=pd.read_csv('train_data.csv',sep='\\s*,\\s*',engine='python') #读取CSV\nX=sales['X'].values #存csv的第一列\nY=sales['Y'].values #存csv的第二列\n\n#初始化赋值\ns1 = 0\ns2 = 0\ns3 = 0\ns4 =... | [
[
"numpy.savetxt"
],
[
"pandas.read_csv"
]
] |
itamaker/delta | [
"0a0eae8f860c28131b4543ecaa933e3dfbe3efde"
] | [
"delta/utils/solver/raw_solver.py"
] | [
"# Copyright (C) 2017 Beijing Didi Infinity Technology and Development Co.,Ltd.\n# 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.o... | [
[
"numpy.concatenate",
"tensorflow.Graph",
"tensorflow.Session",
"tensorflow.train.Saver",
"numpy.shape",
"tensorflow.add_n",
"tensorflow.train.Scaffold",
"numpy.isscalar",
"tensorflow.name_scope",
"tensorflow.tables_initializer",
"tensorflow.train.MonitoredTrainingSessio... |
NK-CS-ZZL/Neural_Network | [
"4de6c4b94e87e2e154e94aca26b7d03c40124e05"
] | [
"BasicMultiLayerPerceptron/mlpModel.py"
] | [
"import numpy as np\nimport math\n\ndef sigmoid(z):\n\treturn np.array([1/(np.exp(-x)+1) for x in z])\n\n\nclass MLPModel:\n\t# w^(l)_(j,k) = weight[l][j][k]\n\t# b^(l)_(k) = biases[l][k]\n\t# z^(l)_(j) = ∑(k)w^(l)_(j,k)*a^(l-1)_(k) + b^(l)_(j)\n\t# = ∑(k)weight[l][j][k]*record[l-1][k] + biases[j]\n\t# a^... | [
[
"numpy.array",
"numpy.random.randn",
"numpy.exp"
]
] |
Janik135/AttentionDeepMIL | [
"03609a56a6527b9cab666d07037b0513be682577"
] | [
"mains/main_featureimportance.py"
] | [
"import numpy as np\nfrom torch.utils.data import Dataset, DataLoader\nimport os\nimport torch\nfrom tqdm import tqdm\nfrom sklearn.metrics import balanced_accuracy_score\nfrom uv_dataloader import LeafDataset as DatasetGerste\nimport uuid\nimport argparse\n\nimport matplotlib.pyplot as plt\nimport matplotlib as mp... | [
[
"torch.optim.lr_scheduler.StepLR",
"numpy.minimum",
"numpy.mean",
"torch.load",
"torch.nn.CrossEntropyLoss",
"matplotlib.ticker.MaxNLocator",
"matplotlib.pyplot.subplots",
"torch.manual_seed",
"torch.tensor",
"torch.utils.data.DataLoader",
"matplotlib.pyplot.gca",
"... |
basanto/HistomicsTK | [
"f3dbd93a7f31c7825574f9ccf0b86e09e9fee360",
"f3dbd93a7f31c7825574f9ccf0b86e09e9fee360",
"f3dbd93a7f31c7825574f9ccf0b86e09e9fee360"
] | [
"histomicstk/deeplab/evaluation/panoptic_quality.py",
"histomicstk/segmentation/nuclear/gvf_tracking.py",
"histomicstk/preprocessing/color_normalization/deconvolution_based_normalization.py"
] | [
"# Lint as: python2, python3\n# Copyright 2019 The TensorFlow Authors All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/L... | [
[
"numpy.logical_not",
"numpy.zeros",
"numpy.not_equal",
"numpy.mean",
"numpy.logical_and",
"numpy.multiply",
"numpy.any",
"numpy.unique"
],
[
"numpy.max",
"numpy.ceil",
"numpy.arccos",
"numpy.asarray",
"numpy.zeros",
"numpy.min",
"numpy.nonzero",
... |
force-h2020/force-bdss-plugin-enthought-example | [
"c56d47521233e369d42fe82282ed8e113a3747f7"
] | [
"eggbox_potential_sampler/scripts/plot_sigma.py"
] | [
"# (C) Copyright 2010-2020 Enthought, Inc., Austin, TX\n# All rights reserved.\n\nfrom unittest import mock\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom force_bdss.api import BaseDataSourceFactory, DataValue\nfrom eggbox_potential_sampler.eggbox_pes_data_source.data_source import (\n EggboxPESD... | [
[
"matplotlib.pyplot.colorbar",
"numpy.random.rand",
"numpy.asarray",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.tight_layout",
"numpy.linspace",
"numpy.meshgrid"
]
] |
LostCow/KLUE | [
"73b1b0526cf6b1b6f5ef535b9527d8abe6ca1a77"
] | [
"re/dataset.py"
] | [
"# coding=utf-8\n\nimport json\nimport logging\nimport os\nfrom typing import List, Tuple\n\nimport torch\nimport transformers\nfrom torch.utils.data import DataLoader, Dataset, TensorDataset\nfrom utils import InputExample, InputFeatures\nimport re\n\nlogger = logging.getLogger(__name__)\n\n\nclass KlueReProcessor... | [
[
"torch.tensor",
"torch.utils.data.TensorDataset"
]
] |
JRhodes95/big-data-cw | [
"874d517ebe4efd0704592df1d2815f102f3012d7"
] | [
"plots.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.cm as cm\n\nimport pandas as pd\n\n\ndef plot_grid_search(file_name, title):\n \"\"\"Function to plot the results of the grid search optimisation process.\"\"\"\n\n data = pd.read_csv(file_name) # Read the data to a pandas DataFrame\n ... | [
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.suptitle",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.clabel",
"matplotlib.pyplot.show",
"pandas.read_csv",
"matplotlib.pyplot.contour",
"numpy.meshgrid",
"matplotl... |
ZongSingHuang/random-key | [
"24daf307e0dfc719c9f92d1b53394bcab2880707"
] | [
"random key.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Fri Sep 24 14:27:25 2021\r\n\r\n@author: zongsing.huang\r\n\"\"\"\r\n\r\nimport numpy as np\r\n\r\n# dim size\r\nD = 6\r\n\r\n# method 1\r\n\r\nRK1 = np.random.uniform(low=0, high=D, size=[D])\r\n\r\n# method2\r\nRK2 = [ np.random.uniform(low=i, high=i+1) for i in ra... | [
[
"numpy.random.uniform",
"numpy.random.shuffle"
]
] |
nuswgg/QUANTAXIS | [
"8c88985538dde0903510d3368520b6624b03a396"
] | [
"QUANTAXIS/QASU/save_binance.py"
] | [
"# coding: utf-8\n# Author: Will\n# Contributor: 阿财(Rgveda@github)(11652964@qq.com)\n# Created date: 2018-06-08\n#\n# The MIT License (MIT)\n#\n# Copyright (c) 2016-2018 yutiansut/QUANTAXIS\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated document... | [
[
"pandas.DataFrame"
]
] |
EasternEdgeRobotics/2019 | [
"19f833262e7bdd026fffc0ac894327369d6bb66f"
] | [
"topsides/benthicSpecies4.py"
] | [
"import numpy as np\nimport cv2 as cv\nimport cmath\n\n#cap = cv.VideoCapture(0)\ncap = cv.VideoCapture('udpsrc port=5004 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! avdec_h264 ! videoconvert ! appsink', cv.CAP_GSTREAMER)\n \n\nPI = 3.14159\n\nwhile(1):\n # read the video capture fr... | [
[
"numpy.array"
]
] |
mrtichou/JumpFloodingAlgorythm | [
"d7bd56e74aa527cf27a14efe986f98fed4c18d2b"
] | [
"jumpflood/jumpflood.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Nov 13 10:50:55 2021\n\n@author: marti\n\"\"\"\nif __name__ == '__main__':\n import os, sys\n depth = 1\n root_folder = os.path.realpath(os.path.join(__file__,'../' * (1+depth)))\n os.chdir(root_folder)\n sys.path.append(root_folder)\n \nfrom jumpfl... | [
[
"numpy.save",
"matplotlib.pyplot.figure",
"numpy.nanmin",
"numpy.tanh",
"numpy.nanmax",
"matplotlib.pyplot.imshow"
]
] |
jinfagang/mmdetection | [
"707c90ff1621c509eecba21ee7a9b97955003873"
] | [
"mmdet/models/necks/rssh_fpn.py"
] | [
"# Copyright (C) 2020 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 law or a... | [
[
"torch.cat"
]
] |
bartnikm/tardis-bartnikm | [
"2b0f3110fefd6740349ca7b33fe72bf025c88452"
] | [
"tardis/montecarlo/montecarlo_numba/vpacket.py"
] | [
"import math\n\nimport numpy as np\nfrom numba import float64, int64\nfrom numba import njit\nfrom numba.experimental import jitclass\n\nfrom tardis.montecarlo.montecarlo_numba import njit_dict_no_parallel\nfrom tardis.montecarlo import (\n montecarlo_configuration as montecarlo_configuration,\n)\n\nfrom tardis.... | [
[
"numpy.random.random"
]
] |
luk036/corr-solver | [
"efc48c6d85183ad1a3dfa6b319f5bd532c10f089"
] | [
"src/corr_solver/mle_corr_oracle.py"
] | [
"# -*- coding: utf-8 -*-\n# import cvxpy as cvx\nfrom typing import Optional, Tuple, Union\n\nimport numpy as np\nfrom lmi_solver.lmi0_oracle import lmi0_oracle\nfrom lmi_solver.lmi_oracle import lmi_oracle\n\nArr = Union[np.ndarray]\nCut = Tuple[Arr, float]\n\n\nclass mle_oracle:\n def __init__(self, Sig: Arr, ... | [
[
"numpy.trace",
"numpy.log",
"numpy.zeros",
"numpy.linalg.inv",
"numpy.diag"
]
] |
Ryoich/python_zero | [
"fe4a5fd8b11c8c059d82b797cd1668f96d54e541"
] | [
"samples/popmap/popmap.py"
] | [
"import matplotlib.cm as cm\nimport matplotlib.pyplot as plt\n\nd_pop = {}\n\nwith open(\"population.csv\") as f:\n for line in f:\n code, _, pop = line.split(\",\")\n d_pop[int(code)] = int(pop)\n\ndata = []\nwith open(\"position.csv\") as f:\n for line in f:\n a = line.strip().split(\",... | [
[
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figure"
]
] |
bmurdata/sktime | [
"fb079e76e3f3dfbb849fb805e53f09adec6cdf79",
"fb079e76e3f3dfbb849fb805e53f09adec6cdf79",
"fb079e76e3f3dfbb849fb805e53f09adec6cdf79"
] | [
"sktime/forecasting/compose/_pipeline.py",
"sktime/transformers/panel/tests/test_hog1d_transformer.py",
"sktime/contrib/basic_benchmarking.py"
] | [
"#!/usr/bin/env python3 -u\n# -*- coding: utf-8 -*-\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\n__author__ = [\"Markus Löning\"]\n__all__ = [\"TransformedTargetForecaster\"]\n\nfrom sklearn.base import clone\n\nfrom sktime.base import _HeterogenousMetaEstimator\nfrom sktime.forecasti... | [
[
"sklearn.base.clone"
],
[
"numpy.array",
"pandas.testing.assert_frame_equal",
"pandas.DataFrame",
"numpy.ones",
"pandas.Series"
],
[
"sklearn.preprocessing.FunctionTransformer",
"numpy.asarray",
"numpy.fft.fft",
"sklearn.tree.DecisionTreeClassifier",
"sklearn.pi... |
BywinTec/cogdl | [
"3c0abcfe364a69061c84c8170d4f5e6a17a4668d",
"3c0abcfe364a69061c84c8170d4f5e6a17a4668d"
] | [
"cogdl/models/nn/diffpool.py",
"cogdl/tasks/attributed_graph_clustering.py"
] | [
"import numpy as np\nimport random\n\nfrom scipy.linalg import block_diag\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom .. import BaseModel, register_model\nfrom .gin import split_dataset_general\nfrom .graphsage import GraphSAGELayer\n\n\nclass EntropyLoss(nn.Module):\n # Return ... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.distributions.Categorical",
"torch.nn.ModuleList",
"torch.isnan",
"torch.eye",
"torch.sparse_coo_tensor",
"torch.nn.functional.nll_loss",
"torch.sum",
"torch.nn.init.constant_",
"scipy.linalg.block_diag",
"torch.unsqueeze",
... |
ashkan-software/captum | [
"b8b7d4b10a9646e4da827635d6947499fbde3326"
] | [
"tests/attr/layer/test_grad_cam.py"
] | [
"#!/usr/bin/env python3\n\nimport unittest\nfrom typing import List, Tuple, Union, Any\n\nimport torch\nfrom torch import Tensor\nfrom torch.nn import Module\nfrom captum.attr._core.layer.grad_cam import LayerGradCam\n\nfrom ..helpers.basic_models import BasicModel_MultiLayer, BasicModel_ConvNet_One_Conv\nfrom ..he... | [
[
"torch.tensor",
"torch.arange",
"torch.ones"
]
] |
davide97l/DI-engine | [
"268d77db3cb54401b2cfc83e2bc3ec87c31e7b83"
] | [
"ding/framework/wrapper/step_timer.py"
] | [
"from collections import deque, defaultdict\nfrom functools import wraps\nfrom types import GeneratorType\nfrom typing import Callable\nimport numpy as np\nimport time\nfrom ditk import logging\n\n\nclass StepTimer:\n\n def __init__(self, print_per_step: int = 1, smooth_window: int = 10) -> None:\n self.p... | [
[
"numpy.mean"
]
] |
qilutong/pyutil | [
"e1119d2b8251e14acde65f5e0134366bc6209329"
] | [
"pyutil/classes/dataset.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n@FileName : dataset.py\n@Description : 数据集类,仿照Tensorflow功能编写\n@Author : 齐鲁桐\n@Email : qilutong@yahoo.com\n@Time : 2019-05-28 15:11\n@Modify : None\n\"\"\"\nfrom __future__ import absolute_import, division, print_function\n\nimport numpy as np\n\nimport fai... | [
[
"numpy.array",
"numpy.random.shuffle"
]
] |
tomassosorio/audio | [
"0f8fa5f82af47543a68f1d3fb8921f8f9b6b15f8"
] | [
"torchaudio/datasets/utils.py"
] | [
"import csv\nimport errno\nimport hashlib\nimport logging\nimport os\nimport sys\nimport tarfile\nimport threading\nimport zipfile\nfrom queue import Queue\n\nimport torch\nimport urllib\nfrom torch.utils.data import Dataset\nfrom torch.utils.model_zoo import tqdm\n\n\ndef unicode_csv_reader(unicode_csv_data, **kwa... | [
[
"torch.utils.model_zoo.tqdm",
"torch.save",
"torch.load"
]
] |
edmundsj/sugarplot | [
"4e25eebfc6045482b0a3add978a1047d8fc696db"
] | [
"sugarplot/source/plotters.py"
] | [
"\"\"\"\nContains plotters for various types of datasets which require special plotting requirements.\n\"\"\"\nfrom matplotlib.figure import Figure\nimport sys, pathlib\nfrom sugarplot import normalize_pandas, prettifyPlot, ureg, plt, weibull, fit_weibull, \\\n fit_lia, fit_impedance, cmap\nfrom sciparse im... | [
[
"numpy.array",
"scipy.optimize.curve_fit",
"numpy.angle",
"numpy.log",
"pandas.DataFrame",
"numpy.sort",
"numpy.sqrt",
"numpy.abs",
"matplotlib.figure.Figure",
"numpy.cos",
"numpy.log10",
"numpy.logspace"
]
] |
piercus/triplet-reid | [
"0e82c86f4a8440a44850be0d64544f14034e88ad"
] | [
"heads/fc1024_normalize.py"
] | [
"import tensorflow as tf\nimport tf_slim as slim\n\ndef head(endpoints, embedding_dim, is_training):\n endpoints['head_output'] = slim.fully_connected(\n endpoints['model_output'], 1024, normalizer_fn=slim.batch_norm,\n normalizer_params={\n 'decay': 0.9,\n 'epsilon': 1e-5,\n ... | [
[
"tensorflow.compat.v1.orthogonal_initializer",
"tensorflow.nn.l2_normalize"
]
] |
dylanirion/wildbook-ia | [
"3b7c30a6e123d87999950bfbb5035c4d9c1a6f5d",
"ac433d4f2a47b1d905c421a36c497f787003afc3"
] | [
"wbia/unstable/_scriptvsone_grave.py",
"wbia/plottool/__MPL_INIT__.py"
] | [
"# -*- coding: utf-8 -*-\n# flake8: noqa\nimport logging\nimport utool as ut\n\n(print, rrr, profile) = ut.inject2(__name__)\nlogger = logging.getLogger('wbia')\n\n\ndef load_multiclass_scores(self):\n # convert simple scores to multiclass scores\n import vtool as vt\n\n self.multiclass_scores = {}\n fo... | [
[
"sklearn.metrics.classification.coo_matrix"
],
[
"matplotlib.use",
"matplotlib.style.use",
"matplotlib.cycler",
"matplotlib.rcParams.keys",
"matplotlib.rcParams.update",
"matplotlib.get_backend"
]
] |
madphysicist/qutip | [
"297776737cf91df0468022ba2b1a3090af0d6549"
] | [
"qutip/mcsolve.py"
] | [
"# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are... | [
[
"numpy.array",
"numpy.dot",
"numpy.empty",
"numpy.zeros",
"numpy.random.RandomState",
"numpy.random.seed",
"numpy.real",
"numpy.mean",
"numpy.stack",
"numpy.abs",
"numpy.all",
"numpy.inner",
"scipy.integrate.ode"
]
] |
KyrieHee/LeNet-tensorflow | [
"7e9347b646f2892d836e164e8ab901dfe021146b"
] | [
"train.py"
] | [
"import tensorflow.examples.tutorials.mnist.input_data as input_data\nimport tensorflow as tf\nimport config as cfg\nimport os\nimport lenet\nfrom lenet import Lenet\n\n\ndef main():\n mnist = input_data.read_data_sets(\"MNIST_data/\", one_hot=True)\n sess = tf.Session()\n batch_size = cfg.BATCH_SIZE\n ... | [
[
"tensorflow.Session",
"tensorflow.examples.tutorials.mnist.input_data.read_data_sets",
"tensorflow.train.Saver",
"tensorflow.initialize_all_variables"
]
] |
ratnania/mhd | [
"89f383695075aa26fc805ffbf6ba458f0cdd6f4e"
] | [
"pic/bsplines.py"
] | [
"from pyccel.decorators import types\n\n#==============================================================================\n@types('double[:]','int','double')\ndef find_span( knots, degree, x ):\n \"\"\"\n Determine the knot span index at location x, given the\n B-Splines' knot sequence and polynomial degree.... | [
[
"numpy.empty"
]
] |
juwangvsu/AugmentedAutoencoder_new | [
"f29d657f369332a6284cf39e615af24758add624"
] | [
"auto_pose/meshrenderer/scenerenderer.py"
] | [
"# -*- coding: utf-8 -*-\nimport os\nimport glob\n\nimport math\nimport numpy as np\nfrom .write_xml import *\nimport auto_pose.meshrenderer.meshrenderer as mr\nimport auto_pose.meshrenderer.meshrenderer_phong as mr_phong\nimport cv2\n\nfrom .pysixd import view_sampler\nfrom .pysixd import transform\n\nclass SceneR... | [
[
"numpy.array",
"numpy.linalg.norm",
"numpy.random.choice",
"numpy.minimum",
"numpy.random.triangular",
"numpy.random.uniform",
"numpy.random.randint",
"numpy.dstack",
"numpy.maximum"
]
] |
yujialuo/erdos | [
"7a631b55895f1a473b0f4d38a0d6053851e65b5d",
"7a631b55895f1a473b0f4d38a0d6053851e65b5d"
] | [
"tests/subgraph_test.py",
"examples/pylot/segmented_video_operator.py"
] | [
"from __future__ import print_function\n\nimport time\nfrom absl import app\nfrom absl import flags\nfrom multiprocessing import Process\nimport numpy as np\n\ntry:\n from std_msgs.msg import Int64\nexcept ModuleNotFoundError:\n # ROS not installed\n Int64 = int\n\nfrom erdos.data_stream import DataStream\... | [
[
"numpy.int64"
],
[
"numpy.uint8",
"numpy.array"
]
] |
AndresJejen/pruebaQuantil | [
"780ec3426f2539631c8d9457a5de192622de35a0"
] | [
"data/cargar_data.py"
] | [
"import json\nimport requests\nimport pandas as pd\nimport pickle\n#from utiles import *\n\nimport numpy as np\n\n\"\"\"Setting the headers to send and accept json responses\n\"\"\"\nheader = {'Content-Type': 'application/json', \\\n 'Accept': 'application/json'}\n\n# creamos un dataset de pruebas\... | [
[
"pandas.read_csv"
]
] |
xuyu0010/ARID_UG2_2.1 | [
"bd487c5d6c7d5aa1be775536a1aa7ea4cf59662d"
] | [
"train_model.py"
] | [
"import os\nimport logging\n\nimport torch\nimport torch.nn as nn\nimport torchvision\nimport torch.backends.cudnn as cudnn\nimport torch.distributed as dist\n\nfrom data import iterator_factory as iter_fac\nfrom train import metric\nfrom train.model import model\nfrom train.lr_scheduler import MultiFactorScheduler... | [
[
"torch.distributed.get_world_size",
"torch.initial_seed",
"torch.optim.SGD",
"torch.distributed.is_initialized",
"torch.cuda.is_available",
"torch.nn.CrossEntropyLoss",
"torch.nn.DataParallel"
]
] |
MaxwellFX/Advanced_Lane_Finding | [
"55dde1716d662323438152000eb88812843919bb"
] | [
"PracticeCodes/HLS.py"
] | [
"import matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\nimport numpy as np\nimport cv2\n\n# Read in an image, you can also try test1.jpg or test4.jpg\nimage = mpimg.imread('test6.jpg') \n\n# Define a function that thresholds the S-channel of HLS\n# Use exclusive lower bound (>) and inclusive upper (<=)\... | [
[
"numpy.zeros_like",
"matplotlib.image.imread",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.subplots"
]
] |
gavinuhma/tf-encrypted | [
"48c9dc7419163425e736ad05bb19980d134fc851"
] | [
"tests/test_tanh.py"
] | [
"# pylint: disable=missing-docstring\nimport unittest\n\nimport numpy as np\nimport tensorflow as tf\nimport tf_encrypted as tfe\nfrom tf_encrypted.layers.activation import Tanh\n\n\nclass TestTanh(unittest.TestCase):\n def setUp(self):\n tf.reset_default_graph()\n\n def test_forward(self):\n input_shape = ... | [
[
"numpy.array",
"numpy.isclose",
"tensorflow.Session",
"tensorflow.reset_default_graph",
"tensorflow.Variable",
"tensorflow.nn.tanh",
"tensorflow.global_variables_initializer"
]
] |
ackim-fsi/AI-IDS | [
"36f65a038da7a09567979cbbfdbd43f94a223856"
] | [
"inv_app/inv_app_crd_parse.py"
] | [
"# -*- coding: utf-8 -*-\nimport os\nimport numpy as np\nimport gc\nimport multiprocessing\nimport pandas\nimport datetime\nimport sys\nfrom pandas.errors import EmptyDataError\n\nfrom functools import partial\n\n\n\ndef convert_content(content_string, x_dim, pad_before=True):\n\n int_list = list(map(np.uint8, s... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.uint8",
"numpy.ceil",
"pandas.read_csv"
]
] |
Tikquuss/speech2speech | [
"0ab5879afa6b6593b62fffb0af2851584cd280ba"
] | [
"NMT/XLM/src/data/loader.py"
] | [
"# Copyright (c) 2019-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the\n# LICENSE file in the root directory of this source tree.\n#\n\nfrom logging import getLogger\nimport os\nimport numpy as np\nimport torch\n\nfrom .dataset import StreamDataset, D... | [
[
"torch.load"
]
] |
codacy-badger/flopy | [
"de874b02661f59ef4e99f18272883a13a4d55f16",
"de874b02661f59ef4e99f18272883a13a4d55f16"
] | [
"flopy/utils/formattedfile.py",
"flopy/modflow/mfhob.py"
] | [
"\"\"\"\nModule to read MODFLOW formatted output files. The module contains one\nimportant classes that can be accessed by the user.\n\n* FormattedHeadFile (Formatted head file. Can also be used for drawdown)\n\n\"\"\"\n\nimport numpy as np\nfrom ..utils.datafile import Header, LayerFile\n\n\ndef is_int(s):\n ... | [
[
"numpy.max",
"numpy.where",
"numpy.array",
"numpy.empty"
],
[
"numpy.reshape",
"numpy.array",
"numpy.isclose",
"numpy.dtype"
]
] |
DreamBlack/APCNet | [
"d76bc9e46c3b631035c5c67e2367b6fb80621333"
] | [
"finetune_pf_four.py"
] | [
"import os\nimport sys\nimport argparse\nimport random\nimport torch\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.utils.data\nimport torchvision.transforms as transforms\nfrom torch.autograd import Variable\nimport utils\nfrom utils import PointLoss\nfrom utils import distance_squre... | [
[
"torch.cat",
"torch.optim.lr_scheduler.StepLR",
"torch.cuda.manual_seed_all",
"torch.nn.init.constant_",
"torch.autograd.Variable",
"torch.FloatTensor",
"torch.cuda.device_count",
"torch.manual_seed",
"torch.unsqueeze",
"torch.nn.init.normal_",
"torch.cuda.is_available"... |
stefanDeveloper/bomberman | [
"20a424cca97cf8df6fb7c2ff4b41ce834031077d"
] | [
"replay.py"
] | [
"import pickle\nfrom time import sleep\n\nimport numpy as np\n\nimport settings as s\nfrom agents import Agent\nfrom environment import GenericWorld, WorldArgs\nfrom fallbacks import pygame\nfrom items import Coin\n\n\nclass ReplayWorld(GenericWorld):\n def __init__(self, args: WorldArgs):\n super().__ini... | [
[
"numpy.array"
]
] |
shalijiang/bo | [
"af13f0a38b579ab504f49a01f1ced13532a3ad49",
"af13f0a38b579ab504f49a01f1ced13532a3ad49"
] | [
"botorch/acquisition/monte_carlo.py",
"enbo/util/test_rollout.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\nr\"\"\"\nBatch acquisition functions using the reparameterization trick in combination\nwith (quasi) Monte-C... | [
[
"torch.is_tensor",
"torch.sigmoid"
],
[
"numpy.zeros",
"torch.max",
"numpy.round",
"torch.no_grad",
"torch.linspace",
"matplotlib.pyplot.subplots",
"torch.manual_seed",
"numpy.polynomial.hermite.hermgauss",
"matplotlib.pyplot.show",
"torch.Tensor"
]
] |
jscastanoc/wyrm | [
"c3593efe3cb5507ac525be4d650df7ce504aab00"
] | [
"test/test_blockbuffer.py"
] | [
"from __future__ import division\n\nimport unittest\n\nimport numpy as np\n\nfrom wyrm.types import Data, BlockBuffer\nfrom wyrm.processing import append_cnt\nfrom functools import reduce\n\n\nclass TestBlockBuffer(unittest.TestCase):\n\n def setUp(self):\n self.empty_dat = Data(np.array([]), [], [], [])\... | [
[
"numpy.array"
]
] |
suqi/gym-sandbox | [
"3e8f4139796953c0e81b5669ac9b396f306c45a5"
] | [
"test_algos/MADDPG_Morvan/a3c_commnet.py"
] | [
"import multiprocessing\nimport threading\nimport tensorflow as tf\nimport numpy as np\nimport gym\nimport os\nimport shutil\nimport matplotlib.pyplot as plt\nimport gym_sandbox\nimport time\nimport multiprocessing\nGAME = 'police-commnet-discret-2agent-v0'\n\nOUTPUT_GRAPH = True\nLOG_DIR = './.tf-log'\nN_WORKERS =... | [
[
"tensorflow.gradients",
"tensorflow.clip_by_value",
"tensorflow.one_hot",
"tensorflow.global_variables_initializer",
"tensorflow.random_normal_initializer",
"tensorflow.subtract",
"tensorflow.train.Saver",
"tensorflow.variable_scope",
"tensorflow.layers.dense",
"tensorflow.... |
dtasev/Savu | [
"acb2578c85472e76cb292c4242c1ed2f2332f3e3"
] | [
"savu/plugins/segmentation/gaussian_mixtures/gmm_segment3D.py"
] | [
"# Copyright 2019 Diamond Light Source 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 ... | [
[
"numpy.max",
"sklearn.mixture.GaussianMixture",
"numpy.shape"
]
] |
uci-uav-forge/2020_path_planning | [
"a0d95a2a9a54418c66d5575aa569a92dcbe9865b"
] | [
"forge_pathplanner/bdc.py"
] | [
"from polyskel import polyskel\nimport networkx as nx\nimport numpy as np\nimport copy, enum\nimport matplotlib.pyplot as plt\nfrom . import polygon\nfrom shapely import geometry\n\n\nclass Event(enum.Enum):\n CLOSE = 1\n OPEN = 2\n SPLIT = 3\n MERGE = 4\n INFLECTION = 5\n INTERSECT = 6\n\n\ndef r... | [
[
"numpy.max",
"numpy.array",
"numpy.dot",
"numpy.linalg.norm",
"numpy.sin",
"numpy.zeros",
"numpy.min",
"numpy.arange",
"numpy.cos"
]
] |
JuliaSprenger/nixpy | [
"46d15954db664ae394ff2e19163958f6ed3c1fad",
"46d15954db664ae394ff2e19163958f6ed3c1fad"
] | [
"nixio/property.py",
"nixio/test/test_multi_tag.py"
] | [
"# -*- coding: utf-8 -*-\n# Copyright © 2014, German Neuroinformatics Node (G-Node)\n#\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted under the terms of the BSD License. See\n# LICENSE file in the root of the Project.\n\ntry:\n from... | [
[
"numpy.array",
"numpy.shape"
],
[
"numpy.sin",
"numpy.isclose",
"numpy.array_equal",
"numpy.array",
"numpy.zeros",
"numpy.testing.assert_almost_equal",
"numpy.sum",
"numpy.testing.assert_array_equal",
"numpy.random.randn",
"numpy.random.random_sample",
"nump... |
valeriehk/tf-pose-estimation | [
"da6e9fd5f43bdcaffd20df4d55d60c5dfbb5a39f"
] | [
"src/assignment.py"
] | [
"import argparse\nimport logging\nimport time\n\nimport cv2\nimport numpy as np\n\nimport common\nfrom estimator import TfPoseEstimator\nfrom networks import get_graph_path, model_wh\n\nimport platform\nimport os\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'\n\nlogger = logging.getLogger('TfPoseEstimator-WebCam')\nlogg... | [
[
"numpy.zeros_like"
]
] |
dyfloveslife/DeblurGANv2 | [
"d56508704d0b0463f84bca0ad39f700eb91c2aae"
] | [
"metric_counter.py"
] | [
"import logging\nfrom collections import defaultdict\n\nimport numpy as np\nfrom tensorboardX import SummaryWriter\n\nWINDOW_SIZE = 100\n\n\nclass MetricCounter:\n def __init__(self, exp_name):\n self.writer = SummaryWriter(exp_name)\n logging.basicConfig(filename='{}.log'.format(exp_name), level=l... | [
[
"numpy.array",
"numpy.mean"
]
] |
linzhiqiu/avalanche | [
"947fccb9a1c204b76d26057719e8932801b36132"
] | [
"avalanche/benchmarks/datasets/lvis_dataset/lvis_dataset.py"
] | [
"################################################################################\n# Copyright (c) 2022 ContinualAI #\n# Copyrights licensed under the MIT License. #\n# See the accompanying LICENSE file for terms. ... | [
[
"torch.zeros",
"torch.utils.data.dataloader.DataLoader",
"matplotlib.pyplot.gca",
"torch.tensor",
"matplotlib.pyplot.show",
"torch.as_tensor",
"matplotlib.patches.Rectangle",
"torch.empty"
]
] |
dionresearch/hotelling | [
"ac6ef7d3674f1e9af7511d3a1fb205ee40b321b7"
] | [
"hotelling/plots.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"plot.py.\n\nHotelling's T-Squared multivariate control charts\n\nSee:\n\n - Hotelling, Harold. (1931). The Generalization of Student's Ratio. Ann. Math. Statist. 2,\n no. 3, 360--378. doi:10.1214/aoms/1177732979.\n - Tukey, J. W. (1960). A survey of sampling from contaminated di... | [
[
"matplotlib.pyplot.text",
"scipy.stats.f",
"pandas.DataFrame",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.tight_layout",
"scipy.stats.beta"
]
] |
arvind1998/Generative-Adversarial-Networks | [
"939a2aa30fbaf5cd6ea419ebb0b93f403015a278"
] | [
"MNIST/dcgan.py"
] | [
"\nfrom __future__ import print_function\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.optim as optim\nimport torch.utils.data\nimport torchvision.datasets as dset\nimport torchvision.transforms as transforms\nimport torchvision.utils as vutils\nfrom torch.autograd import Variable\n\n... | [
[
"torch.nn.Sigmoid",
"torch.autograd.Variable",
"torch.nn.Tanh",
"torch.nn.BatchNorm2d",
"torch.nn.ConvTranspose2d",
"torch.nn.LeakyReLU",
"torch.nn.Conv2d",
"torch.utils.data.DataLoader",
"torch.nn.BCELoss"
]
] |
tiandiao123/deep_learning | [
"e7dbc617eff80d62f66068294b81f76ba48a25a6"
] | [
"PyTorch_Tutorial/example_simple.py"
] | [
"# -*- coding: utf-8 -*-\nimport random\nimport torch\n\n\nclass DynamicNet(torch.nn.Module):\n def __init__(self, D_in, H, D_out):\n \"\"\"\n In the constructor we construct three nn.Linear instances that we will use\n in the forward pass.\n \"\"\"\n super(DynamicNet, self).__... | [
[
"torch.nn.MSELoss",
"torch.nn.Linear",
"torch.randn"
]
] |
sherjilozair/Rainbow | [
"d7b4bd2d0fbe542e223e409229c4d867da1314cd"
] | [
"memory.py"
] | [
"# -*- coding: utf-8 -*-\nfrom __future__ import division\nimport numpy as np\nimport torch\n\n\nTransition_dtype = np.dtype([('timestep', np.int32), ('state', np.uint8, (1, 512)), ('action', np.int32), ('reward', np.float32), ('nonterminal', np.bool_)])\nblank_trans = (0, np.zeros((1, 512), dtype=np.uint8), 0, 0.0... | [
[
"numpy.minimum",
"numpy.copy",
"numpy.dtype",
"numpy.max",
"numpy.zeros_like",
"numpy.arange",
"torch.tensor",
"numpy.greater",
"numpy.expand_dims",
"numpy.logical_or",
"numpy.array",
"torch.device",
"numpy.zeros",
"numpy.power",
"torch.matmul",
"num... |
rcyndie/paraphase | [
"3be47bf46b2d9b432e94fc997e59092bb73a7b81"
] | [
"paraphase/calibration/basis_compute.py"
] | [
"import numpy as np\n\ndef make_basis_vec(n_par, l_d, m_d):\n \"\"\"\n Generating the basis polynomial to compute the phase equation. Right now, \n it is of the form [1, l_d, m_d, l_d**2, m_d**2, ...] with l_d and m_d being \n scalars. The function returns a vector of length n_par.\n\n \"\"\"\n \n... | [
[
"numpy.zeros",
"numpy.ones",
"numpy.tile",
"numpy.exp",
"numpy.eye",
"numpy.arange",
"numpy.insert"
]
] |
fardal/galpy | [
"93a1b6fc8d138899922127086cc66184919c8cba"
] | [
"galpy/orbit_src/integrateFullOrbit.py"
] | [
"import sys\nimport sysconfig\nimport warnings\nimport numpy as nu\nimport ctypes\nimport ctypes.util\nfrom numpy.ctypeslib import ndpointer\nimport os\nfrom galpy import potential\nfrom galpy.util import galpyWarning\nfrom galpy.orbit_src.integratePlanarOrbit import _parse_integrator, _parse_tol\n#Find and load th... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.asfortranarray",
"numpy.ctypeslib.ndpointer",
"numpy.require"
]
] |
tiagovla/fdtd.py | [
"c2b98c054f2471f5d92e760768b94d97b590f468"
] | [
"fdtd/sources.py"
] | [
"\"\"\"This module implement sources.\"\"\"\nfrom __future__ import annotations\n\nimport logging\nfrom functools import partial\nfrom typing import Callable, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom .bases import FDTDElementBase\nfrom .constants import FREESPACE_PERMITTIVITY as EPS_0\nfrom .constants i... | [
[
"numpy.meshgrid",
"numpy.abs"
]
] |
artkuli/openvino | [
"5939cb1b363ebb56b73c2ad95d8899961a084677"
] | [
"src/bindings/python/tests/test_onnx/test_ops_nonlinear.py"
] | [
"# -*- coding: utf-8 -*-\n# Copyright (C) 2018-2022 Intel Corporation\n# SPDX-License-Identifier: Apache-2.0\n\nimport numpy as np\nimport onnx\nimport pytest\n\nfrom tests.test_onnx.utils import run_node\n\n\ndef import_and_compute(op_type, input_data, **node_attrs):\n data_inputs = [np.array(input_data)]\n ... | [
[
"numpy.array",
"numpy.exp",
"numpy.allclose",
"numpy.where",
"numpy.maximum"
]
] |
ikkoham/qiskit-core | [
"a7d66f9aa7b5d61fa6ead7ac3ac4348dec9f5c93"
] | [
"qiskit/circuit/library/arithmetic/weighted_adder.py"
] | [
"# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2020.\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 modificatio... | [
[
"numpy.round",
"numpy.isclose"
]
] |
vkola-lab/ar2021 | [
"2fd98776c5329fef8ece9be02f0281d366ca47df"
] | [
"loaders/loader_imorphics.py"
] | [
"import os, glob, torch, time\nimport numpy as np\nimport pandas as pd\nfrom PIL import Image\nfrom torchvision import transforms\nimport torch.nn as nn\nfrom torch.utils.data import DataLoader, Dataset\nfrom loaders.OAI_imorphics_extras import get_ids_by_subjects, imorphics_info\nfrom loaders.loader_utils import i... | [
[
"numpy.array",
"torch.cat",
"numpy.expand_dims",
"torch.from_numpy"
]
] |
uchuhimo/Ptolemy | [
"5c8ae188af30ee49d38f27d54c67af2eab9489e7"
] | [
"src/nninst/plot/plot_layerwise_similarity_alexnet_imagenet_attack.py"
] | [
"import numpy as np\nimport pandas as pd\nimport seaborn as sns\n\nfrom nninst.backend.tensorflow.model import AlexNet\nfrom nninst.op import Conv2dOp, DenseOp\nfrom nninst.utils.fs import abspath\n\nthreshold = 0.5\n\npath_template = \"alexnet_imagenet_real_metrics_per_layer_{0:.1f}_{1}_{2}.csv\"\nattack_name = \"... | [
[
"numpy.concatenate",
"pandas.DataFrame"
]
] |
kayoyin/DialogueMT | [
"aa426ebcdbdfe0366ed06081a842945f2108e85f"
] | [
"fairseq/tasks/no_context_tag.py"
] | [
"from argparse import Namespace\n\nimport os\nimport torch\nimport logging\nimport json\n\nimport numpy as np\nfrom tqdm import tqdm\nfrom fairseq import metrics, options, utils\nfrom fairseq.data import Dictionary, TaggedDataset\nfrom fairseq.tasks import FairseqTask, register_task\nimport sentencepiece as spm\nEV... | [
[
"numpy.array",
"torch.argmax"
]
] |
DavianYang/yolo.ai | [
"0856d4f1e84428667046ee27270ff1bf742e658a",
"0856d4f1e84428667046ee27270ff1bf742e658a"
] | [
"yolo/utils/utils.py",
"yolo/models/modules/modules.py"
] | [
"import torch\n\ndef corner_to_center(xmin, ymin, xmax, ymax):\n cx, cy = (xmin + xmax) / 2, (ymin + ymax) / 2\n w = xmax - xmin\n h = ymax - ymin\n return cx, cy, w, h\n\ndef center_to_corner(cx, cy, w, h):\n xmin, ymin = cx - 0.5 * w, cy - 0.5 * h\n xmax, ymax = cx + 0.5 * w, cy + 0.5 * h\n r... | [
[
"torch.sigmoid",
"torch.cat",
"torch.exp",
"torch.arange"
],
[
"torch.rand",
"torch.nn.Sigmoid",
"torch.div",
"torch.nn.SiLU",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.nn.Upsample",
"torch.nn.Conv2d",
"torch.nn.AdaptiveAvgPool2d"
]
] |
enricor2/CS437LAB1 | [
"71b3533c22bc56083dd0ae785a176dcd5a4b75af"
] | [
"server/showImg.py"
] | [
"import matplotlib.pyplot as plt\nx=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]\n,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.imshow"
]
] |
PranavSudersan/Buggee | [
"5767d1c259d3570086d7c389440605fa0f681336",
"5767d1c259d3570086d7c389440605fa0f681336"
] | [
"analysis/forceanalysis.py",
"process/imagetransform.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Fri Jun 21 19:42:45 2019\r\n\r\n@author: adwait\r\n\"\"\"\r\n# import matplotlib.pyplot as plt\r\nimport numpy as np\r\n# import glob\r\nimport os.path\r\n# from tkinter import filedialog\r\nfrom PyQt5.QtWidgets import QFileDialog\r\nimport tkinter as tk\r\nfrom stat... | [
[
"scipy.integrate.simps",
"numpy.empty",
"scipy.signal.savgol_filter",
"scipy.signal.medfilt",
"numpy.append",
"numpy.linspace"
],
[
"numpy.zeros",
"numpy.fft.ifftshift",
"numpy.ones",
"numpy.float32",
"numpy.fft.fftshift",
"numpy.expand_dims"
]
] |
erdeq-upenn/stock | [
"f62ebd2d87bb853c2ff1c0583e1b5efc1549d6de"
] | [
"wk3/example.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Jun 13 21:53:10 2020\n\n@author: Dequan\n\"\"\"\n\n# Python ≥3.5 is required\nimport sys\nassert sys.version_info >= (3, 5)\n\n# Scikit-Learn ≥0.20 is required\nimport sklearn\nassert sklearn.__version__ >= \"0.20\"\n\n# Common imports\nimport... | [
[
"numpy.random.rand",
"sklearn.linear_model.LinearRegression",
"sklearn.pipeline.Pipeline",
"matplotlib.pyplot.savefig",
"numpy.random.randint",
"matplotlib.pyplot.tight_layout",
"numpy.sqrt",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.subplot",
"numpy.array",
"numpy.r... |
POFK/tftool | [
"ed82edc48fed86e93df3860bd629ebb7089733bf"
] | [
"model/model_base.py"
] | [
"#!/usr/bin/env python\n# coding=utf-8\nimport tensorflow as tf\n\n#============================ setting ===========================================\ntf.logging.set_verbosity(tf.logging.INFO)\n#layers = tf.layers\nlayer = tf.contrib.framework.add_arg_scope(tf.layers.conv1d)\nslim = tf.contrib.slim\nprint_fn = tf.lo... | [
[
"tensorflow.contrib.layers.batch_norm",
"tensorflow.logging.set_verbosity",
"tensorflow.nn.relu",
"tensorflow.contrib.layers.xavier_initializer",
"tensorflow.contrib.framework.add_arg_scope",
"tensorflow.contrib.layers.l2_regularizer"
]
] |
Yaozeng/roberta-tf | [
"4c1ddca94c87e4c04f51b3cfc90fb642fe81ae7e"
] | [
"modeling_roberta.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may... | [
[
"torch.nn.Linear",
"torch.zeros",
"torch.nn.Dropout",
"torch.nn.MSELoss",
"torch.arange",
"torch.nn.CrossEntropyLoss",
"torch.tanh",
"torch.nn.Embedding"
]
] |
xiaowuhu/sklearn-onnx | [
"e85674a67a0a043e19c2ffe181e5d31eca8ce40b",
"e85674a67a0a043e19c2ffe181e5d31eca8ce40b",
"e85674a67a0a043e19c2ffe181e5d31eca8ce40b"
] | [
"tests/test_custom_transformer_ordwoe.py",
"skl2onnx/operator_converters/label_binariser.py",
"docs/tutorial/plot_kcustom_converter_wrapper.py"
] | [
"# SPDX-License-Identifier: Apache-2.0\n\n\"\"\"\nTests scikit-learn's binarizer converter.\n\"\"\"\nimport unittest\nimport numpy as np\nfrom numpy.testing import assert_almost_equal\nfrom onnxruntime import InferenceSession\nfrom sklearn.base import BaseEstimator, TransformerMixin\nfrom sklearn.datasets import lo... | [
[
"sklearn.preprocessing.MaxAbsScaler",
"sklearn.preprocessing.StandardScaler",
"numpy.testing.assert_almost_equal",
"sklearn.preprocessing.OrdinalEncoder",
"sklearn.base.TransformerMixin.__init__",
"sklearn.datasets.load_iris",
"sklearn.base.BaseEstimator.__init__"
],
[
"numpy.i... |
yz-cnsdqz/TemporalActionParsing-FineGrained | [
"c5bb289b9d51a47d617a49d60f9111eba6460a80"
] | [
"code/utils_ablation_plot.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport pandas as pd\nimport os, os.path\n\nimport argparse\nparser = argparse.ArgumentParser()\n\nparser.add_argument('--dataset', type=str, default='50', help='50 or gtea')\nparser.add_argument('--pooling', type=str, help='gaussian or bin... | [
[
"numpy.concatenate",
"pandas.DataFrame",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figure",
"numpy.loadtxt",
"matplotlib.pyplot.show"
]
] |
JohannesTheo/SurvivalBox | [
"e4d4c754bdc28961dc5e8fa5ce74eb1875f043e3"
] | [
"survivalbox/game_objects.py"
] | [
"__author__ = 'Johannes Theodoridis'\n\n# standard imports\nimport os\nimport copy\n\n# third party imports\nimport numpy as np\nimport pygame\nfrom pygame import K_UP, K_DOWN, K_LEFT, K_RIGHT, K_COMMA, K_PERIOD, K_F15\n\n# local imports\nfrom . import map\nfrom . import utils\n\nMANUAL=False\n#RANDOM=False\nRANDOM... | [
[
"numpy.random.random",
"numpy.array",
"numpy.random.choice"
]
] |
ucgmsim/slurm_gm_workflow | [
"6fd7e11f3c3163dbd219b6783c32fa8085db5d35",
"6fd7e11f3c3163dbd219b6783c32fa8085db5d35",
"6fd7e11f3c3163dbd219b6783c32fa8085db5d35"
] | [
"scripts/test_binary.py",
"scripts/emod3d_scripts/check_emod3d_subdomains.py",
"e2e_tests/E2ETests.py"
] | [
"#!/usr/bin/env python3\n\nimport sys\nimport argparse\nimport numpy as np\n\nfrom qcore.timeseries import BBSeis\nfrom qcore.timeseries import HFSeis\n\n# the ratio of allowed zero's before being flagged as failed, 0.01 = 1%\nZERO_COUNT_THRESHOLD = 0.01\n\nif __name__ == \"__main__\":\n parser = argparse.Argume... | [
[
"numpy.trim_zeros",
"numpy.count_nonzero",
"numpy.min"
],
[
"numpy.log",
"numpy.where",
"numpy.float32",
"numpy.arange",
"numpy.int32"
],
[
"pandas.DataFrame",
"numpy.random.poisson",
"pandas.testing.assert_frame_equal",
"pandas.read_csv"
]
] |
kcyu1993/ML_course_kyu | [
"99671281bcf83cbcd75d1c57772bdfdf79d28aff",
"99671281bcf83cbcd75d1c57772bdfdf79d28aff"
] | [
"labs/ex04/template/plots.py",
"labs/ex04/template/ridge_regression.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"a function of ploting figures.\"\"\"\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\ndef cross_validation_visualization(lambds, mse_tr, mse_te):\n \"\"\"visualization the curves of mse_tr and mse_te.\"\"\"\n plt.semilogx(lambds, mse_tr, marker=\".\", color='b', label=... | [
[
"matplotlib.pyplot.semilogx",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.title",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylim",
"numpy.mean",
"matplotlib.pyplot.ylabel"
],
[
... |
mfrichtl/pycalphad | [
"a06715a27861cf801d69650468bb683956928db4"
] | [
"pycalphad/tests/test_codegen.py"
] | [
"\"\"\"\nTests for code generation from SymPy/SymEngine objects.\n\"\"\"\n\nimport pickle\nimport pytest\nimport numpy as np\nfrom symengine.lib.symengine_wrapper import LambdaDouble, LLVMDouble\nfrom symengine import zoo\nfrom pycalphad import Model, variables as v\nfrom pycalphad.codegen.callables import build_ph... | [
[
"numpy.all",
"numpy.array",
"numpy.isclose"
]
] |
simonjayhawkins/pandas | [
"9f571c58d7796dac8fd1aa2301cf4aa30ad7143a"
] | [
"bisect/38714.py"
] | [
"import pandas as pd\nimport pandas.testing as tm\n\nprint(pd.__version__)\n\ndf = pd.DataFrame({\"a\": [1] * 2188})\n\np = \"test.csv.zip\" # replace with available path\ndf.to_csv(p)\nresult = pd.read_csv(p)\nprint(result)\n\ntm.assert_frame_equal(result[[\"a\"]], df)\n"
] | [
[
"pandas.DataFrame",
"pandas.read_csv",
"pandas.testing.assert_frame_equal"
]
] |
ZhengKeli/PositronSpector | [
"be0281fe50fe634183b6f239f03b7140c1dc0b7f",
"be0281fe50fe634183b6f239f03b7140c1dc0b7f"
] | [
"src/dbspy/core/analyze/curve/_curve.py",
"src/dbspy/core/utils/variance.py"
] | [
"import numpy as np\n\nfrom dbspy.core import base\nfrom dbspy.core.analyze import _analyze as analyze\nfrom dbspy.core.utils.variance import add_var, minus_var, divide_var, sum_var\n\n\n# define\n\nclass Conf(analyze.Conf):\n fold_modes = ('fold', 'none', 'right', 'left')\n compare_modes = ('ratio', 'differe... | [
[
"numpy.array",
"numpy.ones_like",
"numpy.zeros_like",
"numpy.shape",
"numpy.take",
"numpy.argmax",
"numpy.flip",
"numpy.linalg.inv",
"numpy.expand_dims"
],
[
"numpy.square",
"numpy.sum"
]
] |
kevinyx2/FYPagain | [
"1efffcbfdd66be93318276bb183485100ea754cc"
] | [
"utils/utils.py"
] | [
"import numpy as np\nimport cv2\n\ndef draw_boxes(output_filename, classes_filename, inputs, original_image, resized_image):\n \"\"\"\n Draws identified boxes along with class probabilities on the original image\n and then saves the image with the output file name.\n\n Parameters\n ----------\n ou... | [
[
"numpy.ones_like",
"numpy.random.rand",
"numpy.minimum",
"numpy.concatenate",
"numpy.logical_and",
"numpy.nonzero",
"numpy.argmax",
"numpy.arange",
"numpy.expand_dims",
"numpy.array",
"numpy.zeros",
"numpy.random.shuffle",
"numpy.floor",
"numpy.array_split",... |
zlin888/e2e-coref | [
"67e99bee9b497e904d55470c4a0cd30a1d69116b"
] | [
"extract_xlnet_features.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team 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# Unl... | [
[
"tensorflow.trainable_variables",
"tensorflow.logging.set_verbosity",
"tensorflow.contrib.tpu.TPUEstimatorSpec",
"tensorflow.contrib.tpu.TPUEstimator",
"tensorflow.TensorShape",
"tensorflow.logging.info",
"tensorflow.train.Scaffold",
"tensorflow.train.init_from_checkpoint",
"te... |
kchoudhu/numpy | [
"2cf38000274a94c1b118f1a38e2a6e2c7401eb16"
] | [
"numpy/core/tests/test_umath.py"
] | [
"import platform\nimport warnings\nimport fnmatch\nimport itertools\nimport pytest\nimport sys\nfrom fractions import Fraction\n\nimport numpy.core.umath as ncu\nfrom numpy.core import _umath_tests as ncu_tests\nimport numpy as np\nfrom numpy.testing import (\n assert_, assert_equal, assert_raises, assert_raises... | [
[
"numpy.add.reduceat",
"numpy.core.umath.radians",
"numpy.random.rand",
"numpy.sign",
"numpy.core.umath.add.__doc__.startswith",
"numpy.logspace",
"numpy.longdouble",
"numpy.empty",
"numpy.add.reduce",
"numpy.log",
"numpy.core.umath.arctan2",
"numpy.core.umath.multip... |
weiwang2330/conditional-motion-propagation | [
"66ca0ca7c20d7724d1dcea74855376a7957da0cf"
] | [
"dataset.py"
] | [
"import numpy as np\nimport io\nfrom PIL import Image\n\nimport torch\nimport torchvision.transforms as transforms\nfrom torch.utils.data import Dataset\n\nfrom utils.flowlib import read_flo_file\nfrom utils import image_crop, image_resize, image_flow_crop, image_flow_resize, flow_sampler, image_flow_aug, flow_aug\... | [
[
"numpy.concatenate",
"numpy.array",
"torch.mm",
"torch.LongTensor",
"torch.zeros_like",
"torch.Tensor"
]
] |
snowmanyukari/Keras-GAN-master | [
"44d3320e84ca00071de8a5c0fb4566d10486bb1d"
] | [
"wgan_gp/wgan_gp.py"
] | [
"\n# Large amount of credit goes to:\n# https://github.com/keras-team/keras-contrib/blob/master/examples/improved_wgan.py\n# which I've used as a reference for this implementation\n\nfrom __future__ import print_function, division\n\nfrom keras.datasets import mnist\nfrom keras.layers.merge import _Merge\nfrom kera... | [
[
"numpy.random.normal",
"numpy.zeros",
"numpy.ones",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots",
"numpy.random.randint",
"numpy.expand_dims"
]
] |
Konano/arknights-mower | [
"dc43270e3232a9e282207f4f0c778f2f91823be7"
] | [
"arknights_mower/utils/recognize.py"
] | [
"from __future__ import annotations\n\nimport cv2\nimport time\nimport numpy as np\nfrom typing import Optional, List\n\nfrom .. import __rootdir__\nfrom . import config, detector\nfrom .log import logger, save_screenshot\nfrom .scene import Scene, SceneComment\nfrom .image import bytes2img, loadimg, thres2, cropim... | [
[
"numpy.max"
]
] |
cyyever/DALI | [
"e2b2d5a061da605e3e9e681017a7b2d53fe41a62",
"e2b2d5a061da605e3e9e681017a7b2d53fe41a62",
"e2b2d5a061da605e3e9e681017a7b2d53fe41a62",
"e2b2d5a061da605e3e9e681017a7b2d53fe41a62"
] | [
"dali/test/python/test_operator_affine_transforms.py",
"dali/test/python/test_operator_reshape.py",
"dali/test/python/test_operator_gridmask.py",
"dali/test/python/test_operator_lookup_table.py"
] | [
"# Copyright (c) 2020-2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.... | [
[
"numpy.sin",
"numpy.array",
"numpy.dot",
"numpy.linalg.norm",
"numpy.minimum",
"numpy.tan",
"numpy.identity",
"numpy.allclose",
"numpy.float32",
"numpy.cos",
"scipy.spatial.transform.Rotation.from_rotvec",
"numpy.maximum"
],
[
"numpy.array",
"numpy.empty... |
MattGreav/test | [
"f6bc7dcefd8b498b71fb92808ee70496f2206231",
"f6bc7dcefd8b498b71fb92808ee70496f2206231"
] | [
"armi/reactor/composites.py",
"armi/utils/__init__.py"
] | [
"# Copyright 2019 TerraPower, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agr... | [
[
"numpy.array",
"numpy.zeros"
],
[
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.savefig",
"scipy.optimize.minimize",
"numpy.vstack",
"numpy.array",
"matplotlib.pyplot.title",
"matplotlib.pyplot.close",
"matplotlib.pyplot.yticks",
"... |
WinVector/data_algebra | [
"3d6002ddf8231d310e03537a0435df0554b62234"
] | [
"build/lib/data_algebra/cdata.py"
] | [
"import re\n\nimport numpy\n\nimport data_algebra\nimport data_algebra.util\n\n\nclass RecordSpecification:\n \"\"\"\n Class to represent a multi-row data record.\n \"\"\"\n def __init__(\n self,\n control_table,\n *,\n record_keys=None,\n control_table_keys=None,\n ... | [
[
"numpy.asarray",
"numpy.sum",
"numpy.ones",
"numpy.logical_and",
"numpy.any"
]
] |
melaniebeck/video-classification | [
"145eb44ac70e7669a706d5f67914a7d28fd931fe"
] | [
"vidbench/predict.py"
] | [
"# ###########################################################################\n#\n# CLOUDERA APPLIED MACHINE LEARNING PROTOTYPE (AMP)\n# (C) Cloudera, Inc. 2021\n# All rights reserved.\n#\n# Applicable Open Source License: Apache 2.0\n#\n# NOTE: Cloudera open source products are modular software products\n# ... | [
[
"pandas.DataFrame",
"numpy.take",
"tensorflow.constant",
"numpy.take_along_axis",
"numpy.argmax",
"numpy.argsort",
"tensorflow.nn.softmax"
]
] |
tum-pbs/VOLSIM | [
"795a31c813bf072eb88289126d7abd9fba8b0e54"
] | [
"src/volsim/loss.py"
] | [
"import numpy as np\nimport scipy.stats.stats as sciStats\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport logging\n\n\nfrom volsim.params import *\n\nclass CorrelationLoss(nn.modules.loss._Loss):\n def __init__(self, params:Params, useGPU:bool):\n super(CorrelationLoss, self)... | [
[
"numpy.concatenate",
"numpy.max",
"torch.isnan",
"numpy.zeros",
"torch.nn.functional.l1_loss",
"torch.norm",
"torch.max",
"numpy.min",
"torch.zeros_like",
"torch.pow",
"torch.nn.functional.mse_loss",
"numpy.stack",
"torch.tensor",
"numpy.repeat",
"numpy.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.