repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
robes/chisel-benchmark
[ "dca6c0e3a779115d10f0589a866402616cf00d00" ]
[ "chiselbenchmark/plotter.py" ]
[ "\"\"\"Utility for plotting test results.\"\"\"\n\nimport argparse\nfrom collections import defaultdict\nimport csv\nimport numpy as np\nimport os.path\nimport sys\nimport matplotlib.pyplot as plt\n\n_TESTCASE, _DATASET, _PARAM, _CONDITION, _ROUND, _TIME = 'test', 'dataset', 'param', 'condition', 'round', 'time'\n\...
[ [ "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "numpy.std", "numpy.mean", "matplotlib.pyplot.show" ] ]
titusz/datasketch
[ "a483b39fe4e444c372792e5c91c86d9d8d27a4a5" ]
[ "examples/lsh_examples.py" ]
[ "'''\nSome examples for LSH\n'''\n\nfrom hashlib import sha1\nimport numpy as np\nfrom datasketch.minhash import MinHash\nfrom datasketch.weighted_minhash import WeightedMinHashGenerator\nfrom datasketch.lsh import WeightedMinHashLSH, MinHashLSH\n\ndata1 = ['minhash', 'is', 'a', 'probabilistic', 'data', 'structure'...
[ [ "numpy.random.uniform" ] ]
biolee3/SAMDNet
[ "9a0d70f976e22d512046b4aa5727dd26422d0aff", "9a0d70f976e22d512046b4aa5727dd26422d0aff" ]
[ "modules/sample_generator.py", "pretrain/data_prov.py" ]
[ "import numpy as np\nfrom PIL import Image\n\nfrom .utils import overlap_ratio\n\n\nclass SampleGenerator():\n def __init__(self, type_, img_size, trans=1, scale=1, aspect=None, valid=False):\n self.type = type_\n self.img_size = np.array(img_size) # (w, h)\n self.trans = trans\n self...
[ [ "numpy.sqrt", "numpy.linspace", "numpy.clip", "numpy.tile", "numpy.concatenate", "numpy.random.permutation", "numpy.mean", "numpy.random.rand", "numpy.random.randn", "numpy.prod", "numpy.array" ], [ "numpy.asarray", "torch.from_numpy", "numpy.concatenate...
arjunmajum/habitat-api
[ "1d374383e6e0d9fa2a7cca016d5b72986a94caf8" ]
[ "test/test_habitat_task.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport os\n\nimport numpy as np\nimport pytest\n\nimport habitat\nfrom habitat.utils.test_utils import sample...
[ [ "numpy.array" ] ]
ACPudding/FGO-py
[ "543043527f35ff9b4c1c7b6f366717610ad56048" ]
[ "FGO-py/fgoAndroid.py" ]
[ "import re\nimport threading\nimport time\n\nimport cv2\nimport numpy\nfrom airtest.core.android.adb import ADB\nfrom airtest.core.android.android import Android as Airtest\nfrom airtest.core.android.constant import CAP_METHOD\n\nfrom fgoConst import KEYMAP\nfrom fgoSchedule import schedule\nfrom fgoLogging import ...
[ [ "numpy.array", "numpy.linalg.norm" ] ]
alexus37/MasterThesisCode
[ "a7eada603686de75968acc8586fd307a91b0491b" ]
[ "deepexplain/tf/v2_x/methods.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport sys\nimport numpy as np\nfrom skimage.util import view_as_windows\nimport warnings\nimport logging\nimport tensorflow as tf\nfrom tqdm import tqdm\n\nfrom tensorflow.python.ops import nn_grad, m...
[ [ "tensorflow.compat.v1.get_default_graph", "numpy.linspace", "numpy.reshape", "numpy.arange", "numpy.isnan", "tensorflow.gradients", "tensorflow.ones_like", "numpy.ones", "tensorflow.zeros_like", "numpy.delete", "numpy.random.permutation", "numpy.zeros_like", "nu...
amboulouma/3aransia.api
[ "3efb495ac6b46ec2064969a29a39e2332201e67a" ]
[ "api/algorithms.py" ]
[ "import sys\n\nimport pandas as pd\nimport numpy as np\nimport nltk\n\nfrom api.constants import *\n\n# Translate a Moroccan letter to an Arabian letter\ndef morrocan_letter_to_arabian(letter, position, word_length): \n alphabet = pd.read_csv(BASE_DIR + DATA_DIR + MOROCCAN_ALPHABET)\n try:\n if positio...
[ [ "pandas.read_csv" ] ]
billy-horn/lightning-flash
[ "61c741d37182d137f39b771879254db8fd20308f" ]
[ "flash/vision/classification/model.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.nn.Linear", "torch.nn.AdaptiveAvgPool2d", "torch.nn.Flatten" ] ]
Marcel-Velez/CLMR
[ "730bd9078756650a53b4c6438b29e5aeb2c15134", "730bd9078756650a53b4c6438b29e5aeb2c15134", "730bd9078756650a53b4c6438b29e5aeb2c15134" ]
[ "clmr/models/TailedU2Expa.py", "clmr/models/preliminary_models/NoPadConnectNet5ENDDOWN.py", "clmr/models/preliminary_models/NoPadConnectNet4ENDDOWN.py" ]
[ "import torch\nimport torch.nn as nn\n\nfrom .SingleDeconv import SingleDeconv\n\n\nclass TailedU2Expa(nn.Module):\n def __init__(self, in_channels=35, n_classes=1):\n super(TailedU2Expa, self).__init__()\n\n padding = 0\n stride = 3\n self.pool = nn.MaxPool1d(3, stride=3)\n \n...
[ [ "torch.cat", "torch.nn.Linear", "torch.nn.MaxPool1d", "torch.nn.init.xavier_uniform_", "torch.nn.ConvTranspose1d", "torch.nn.AvgPool1d" ], [ "torch.nn.Sequential", "torch.nn.Dropout", "torch.nn.BatchNorm1d", "torch.cat", "torch.nn.MaxPool1d", "torch.nn.AvgPool1d...
kabilar/workflow-calcium-imaging
[ "0647d65af6a92caecdd5cc251b74153c68068ca8" ]
[ "tests/__init__.py" ]
[ "# run tests: pytest -sv --cov-report term-missing --cov=workflow-calcium-imaging -p no:warnings\n\nimport os\nimport pytest\nimport pandas as pd\nimport pathlib\nimport datajoint as dj\nimport numpy as np\n\nfrom workflow_calcium_imaging.paths import get_imaging_root_data_dir\n\n# ------------------- SOME CONSTANT...
[ [ "numpy.array", "pandas.DataFrame" ] ]
eco32i/biodata
[ "61d5fdd946bf10043fe2374e8c18a38cdc271b30" ]
[ "utils/utils.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom ggplot import *\n\ndef compute_prob_vector(ps_file, prob_paired=True):\n '''\n Given a text file derived from the RNAfold output of the form\n \n i j sqrt(prob) ubox\n \n computes a vector (dict) of probabilities for every nucleotide\n to b...
[ [ "pandas.concat", "numpy.zeros", "pandas.DataFrame" ] ]
erdc/pynirom
[ "7385333cb4804300a7a048d32e009c9c659f019d", "7385333cb4804300a7a048d32e009c9c659f019d" ]
[ "pynirom/node/main.py", "pynirom/rbf/main.py" ]
[ "#! usr/bin/env python\n\n\"\"\"\nBase module for PODNODE NIROM\n\"\"\"\n\nimport numpy as np\nimport pickle\nimport time\n\nimport pynirom\nfrom pynirom.node import node as node\n\nimport tensorflow as tf\nif tf.__version__ == '1.15.0':\n tf.compat.v1.enable_eager_execution()\nelif tf.__version__.split('.')[0] ...
[ [ "tensorflow.__version__.split", "numpy.sqrt", "tensorflow.keras.backend.set_floatx", "tensorflow.keras.layers.Dense", "tensorflow.compat.v1.enable_eager_execution", "numpy.linalg.norm", "numpy.floor", "tensorflow.keras.initializers.glorot_uniform", "numpy.zeros" ], [ "n...
NCBI-Hackathons/Machine_Learning_Immunogenicity
[ "6c6e9a3901f77a7e46ca2b00eb3352e4dc5563f1" ]
[ "src/generate_peptide_tensors.py" ]
[ "from argparse import ArgumentParser\nimport numpy as np\nimport pandas as pd\nfrom pickle import dump\nfrom tqdm import tqdm\n\nAA = ('A','C','D','E','F','G','H','I','K','L','M','N','P','Q','R','S','T','V','W','Y')\nAA_ENCODING = dict((a, 2**i) for i,a in enumerate(AA))\n\ndef generate_peptide_tensor(data, aaprops...
[ [ "pandas.read_csv", "numpy.zeros" ] ]
uafseismo/pysep
[ "e776c2a9e1a9a6d84daa6c60e982fe4f3a31d19f" ]
[ "record_section.py" ]
[ "#!/usr/bin/evn python3\n\"\"\"\nRecord Section plotting tool for seismic waveforms (observed and synthetic)\n\nThis is a refactor of Pysep's Python utility `plotw_rs`, a record section\nplotting script. The intent of this script is to plot multiple time series'\nbased on source-receiver characteristics (i.e., src-...
[ [ "matplotlib.ticker.MultipleLocator", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.axhline", "numpy.sqrt", "numpy.abs", "numpy.unique", "numpy.arange", "numpy.median", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "numpy.mean", "matplotlib.pyplot...
Lucs1590/panopticapi
[ "cf18e9a401fa0285cc5c10804fae0af1c45fee4e" ]
[ "panopticapi/combine_semantic_and_instance_predictions.py" ]
[ "#!/usr/bin/env python\n'''\nThe script uses a simple procedure to combine semantic segmentation and instance\nsegmentation predictions. The procedure is described in section 7 of the\npanoptic segmentation paper https://arxiv.org/pdf/1801.00868.pdf.\n\nOn top of the procedure described in the paper. This script re...
[ [ "numpy.logical_and", "numpy.zeros" ] ]
nvladimus/MiraoControl
[ "703e825daffa7718de9e14de5d77d8a98dfaf6e4" ]
[ "lib/Mirao52_utils.py" ]
[ " \n# Mirao 52e ERROR codes:\n# Error codes (status)\nerrors = {}\nerrors[0] = 'MRO_OK, No error'\nerrors[1] = 'MRO_UNKNOWN_ERROR'\nerrors[2] = 'MRO_DEVICE_NOT_OPENED_ERROR, mirao 52-e is not opened.'\nerrors[3] = 'MRO_DEFECTIVE_DEVICE_ERROR, mirao 52-e has been identified as defective.'\nerrors[4] = 'MRO_DEVICE_A...
[ [ "numpy.zeros" ] ]
sustainable-computing/ODToolk
[ "9328b930f7e522a89d82011e8ab91286a20bf66f", "9328b930f7e522a89d82011e8ab91286a20bf66f" ]
[ "core/preprocessing/fill.py", "core/preprocessing/upsample.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\ndef fill(dataset):\n \"\"\"\n Fill all nan value in the sensor data for given core.data.dataset.Dataset\n\n :parameter dataset: Dataset object that wants to fill in missing values\n :type dataset: core.data.dataset.Dataset\n\n :return: None\n \...
[ [ "numpy.isnan", "numpy.arange", "numpy.maximum.accumulate", "numpy.nonzero" ], [ "numpy.concatenate", "numpy.isnan", "numpy.array", "numpy.interp" ] ]
cstenkamp/skelshop
[ "6f4b26e28d4aa1050c8c3c15edd39ae072baca54" ]
[ "skelshop/track/spec.py" ]
[ "from abc import ABC, abstractmethod\nfrom dataclasses import dataclass\nfrom typing import List, Optional, cast\n\nimport numpy as np\n\nfrom ..pose import PoseBase\nfrom .metrics import Metric\n\nPENALTY_WEIGHT = 1e6\n\n\n@dataclass\nclass TrackingSpec:\n \"\"\"\n A domain specific language for threshold di...
[ [ "scipy.optimize.linear_sum_assignment", "numpy.mean" ] ]
soldierofhell/deep-text-recognition-benchmark
[ "74f5705a62bc1218bf9c0763eea390692f62712e" ]
[ "train.py" ]
[ "import os\nimport sys\nimport time\nimport random\nimport string\nimport argparse\n\nimport torch\nimport torch.backends.cudnn as cudnn\nimport torch.nn.init as init\nimport torch.optim as optim\nimport torch.utils.data\nimport numpy as np\n\nfrom utils import CTCLabelConverter, AttnLabelConverter, Averager\nfrom ...
[ [ "torch.optim.Adam", "torch.nn.CrossEntropyLoss", "torch.cuda.manual_seed", "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.nn.init.constant_", "torch.nn.DataParallel", "torch.no_grad", "torch.nn.CTCLoss", "torch.cuda.is_available", "torch.cuda.device_...
mareklovci/kky-zsur
[ "c41fbce53aa790b1f280cbca8d274845993e74f9" ]
[ "zsur/__main__.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"Main file to test the whole project\"\"\"\n\nimport logging\nfrom zsur.readfile import readfile\nfrom matplotlib import pyplot as plt\nfrom zsur.bayes import main as bayes\nfrom zsur.chain_map import main as chmap\nfrom zsur.cluster_levels import main as cluste...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.scatter" ] ]
tennisonliu/fair-cocco
[ "010ad85dac7c844089af172c99e2eba95685edd7" ]
[ "experiments/cal/students.py" ]
[ "'''\nExperiments on student dataset.\nContinuous sensitive attribute and continuous outcome.\n'''\nimport warnings\nwarnings.simplefilter(action='ignore', category=FutureWarning)\nimport sys\nsys.path.append('.')\nimport torch\nimport torch.nn as nn\nimport torch.utils.data as data_utils\nfrom torch.utils.tensorbo...
[ [ "numpy.random.seed", "torch.autograd.set_detect_anomaly", "torch.manual_seed", "torch.utils.data.TensorDataset", "torch.utils.data.DataLoader", "torch.unsqueeze", "torch.tensor", "torch.no_grad", "torch.utils.tensorboard.SummaryWriter", "torch.device", "torch.nn.MSELoss...
Thirty-OneR/Turbulence-initial-condition
[ "ec8438602bdd6ec7b5985215e56ff6916b82855e" ]
[ "convert_to_gamer_format.py" ]
[ "import h5py\nimport numpy as np\n\ndata = {}\n\nfor field in [\"density\", \"velocity_x\", \"velocity_y\", \"velocity_z\"]:\n f = h5py.File(\"./dataset.h5\")\n data[field] = f[field][:]\n f.close()\n\n#data['density'] -= (data['density'].min() * 1.001)\ndata['density'] = (data['density']-data['density'].m...
[ [ "numpy.asarray", "numpy.isnan", "numpy.maximum", "numpy.sqrt" ] ]
aojiu/a-neural-algorithm-of-artistic-style
[ "6f19abf42266f61c22d7e460e5cab421e37fd8e1" ]
[ "demo.py" ]
[ "\nimport numpy as np\nnp.random.seed(1)\n# from tensorflow import set_random_seed\n# set_random_seed(1)\nimport tensorflow as tf\ntf.random.set_seed(1)\nfrom neural_stylization.transfer_style import Stylizer\nfrom neural_stylization.optimizers import GradientDescent, L_BFGS, Adam\nfrom neural_stylization.util.buil...
[ [ "numpy.random.seed", "tensorflow.random.set_seed" ] ]
Rascof/tsid
[ "567982b46ab06522bf414cad180d941a7cc532a8" ]
[ "exercizes/tsid_manipulator.py" ]
[ "import pinocchio as se3\nimport tsid\nimport numpy as np\nimport numpy.matlib as matlib\nimport os\nimport gepetto.corbaserver\nimport time\nimport subprocess\n\n\nclass TsidManipulator:\n ''' Standard TSID formulation for a robot manipulator\n - end-effector task\n - Postural task\n - torq...
[ [ "numpy.zeros", "numpy.sqrt", "numpy.ones" ] ]
yss-al/dssgd
[ "df92025783e3589f1cd6cf6b943735d756601612" ]
[ "models/Nets.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Python version: 3.6\n\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\n\n\nclass MLP(nn.Module):\n def __init__(self, dim_in, dim_hidden, dim_out):\n super(MLP, self).__init__()\n self.layer_input = nn.Linear(dim_in, dim_hidden...
[ [ "torch.nn.Dropout", "torch.nn.Dropout2d", "torch.nn.functional.dropout", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.ReLU" ] ]
telegraphic/PyGSM
[ "af96a21ec2d735ccada31ef2d9ad1b8895dfc613" ]
[ "pygsm/pygsm2016.py" ]
[ "#from .pygsm import GlobalSkyModel\n\nimport numpy as np\nfrom scipy.interpolate import interp1d, pchip\nimport h5py\nfrom astropy import units\nimport healpy as hp\nimport ephem\nfrom datetime import datetime\n\nfrom pkg_resources import resource_filename\nGSM2016_FILEPATH = resource_filename(\"pygsm\", \"gsm2016...
[ [ "numpy.log2", "numpy.min", "numpy.arange", "numpy.logical_or", "numpy.max", "numpy.copy", "numpy.log10", "numpy.exp", "numpy.array", "numpy.sum" ] ]
MPinna/epidemic_broadcast
[ "c8c2cbe9c6398c7ed3a68749892b438bceca629a" ]
[ "python/test.py" ]
[ "#!/usr/bin/env python\n\nimport scipy.stats\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\ndef mean_confidence_interval(data, confidence=0.95):\n a = 1.0 * np.array(data)\n n = len(a)\n m, se = np.mean(a), scipy.stats.sem(a)\n h = se * scipy.stats.t.ppf((1 + confidence) / ...
[ [ "pandas.read_csv", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.subplots", "pandas.plotting.autocorrelation_plot", "numpy.mean", "matplotlib.pyplot.errorbar", "matplotlib.pyplot.grid", "numpy.insert", "matplotlib.pyplot.xlabel", "numpy.array", "matp...
lyp-deeplearning/MOS-Multi-Task-Face-Detect
[ "1bea754752e13fafdeb06f5fedcba1bd08e836de" ]
[ "test_scripts/detect_picture.py" ]
[ "from __future__ import print_function\nimport os\nimport argparse\nimport torch\nimport torch.backends.cudnn as cudnn\nfrom PIL import Image\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision.transforms as transforms\nimport numpy as np\nimport time\nfrom data.config import cfg_mobilenetv2...
[ [ "scipy.spatial.transform.Rotation.from_rotvec", "torch.load", "numpy.asarray", "scipy.spatial.transform.Rotation.from_matrix", "torch.sum", "numpy.concatenate", "numpy.max", "numpy.round", "torch.set_grad_enabled", "torch.FloatTensor", "torch.device", "numpy.where",...
swapnil3597/automl
[ "30807c4bac497bb6532c22fb7c5d3e8d2873de6f" ]
[ "efficientdet/keras_repo/postprocess.py" ]
[ "# Copyright 2020 Google Research. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ [ "tensorflow.concat", "tensorflow.stack", "tensorflow.reduce_sum", "tensorflow.cast", "tensorflow.equal", "tensorflow.map_fn", "tensorflow.raw_ops.NonMaxSuppressionV5", "tensorflow.math.argmax", "tensorflow.gather", "tensorflow.gather_nd", "tensorflow.shape", "tensor...
cihanongun/3D-CGAN
[ "3e8158b6764d3d93cfec8c1f2376ec9818ae1ee4" ]
[ "utils.py" ]
[ "import scipy.io\nfrom os import listdir\nfrom os.path import isfile, join\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\nimport os\nimport sys\nimport shutil\n\n# get a single 3D model from .mat file\ndef get_model(file_path): \n \n mat = scipy.io.loadmat( file...
[ [ "matplotlib.pyplot.tight_layout", "numpy.pad", "numpy.squeeze", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.close", "numpy.array", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
CogNLP/CogKGE
[ "70d851d6489600c1e90eb25b0388a3ceba2f078c", "70d851d6489600c1e90eb25b0388a3ceba2f078c" ]
[ "tests/test_fb15k_run_distmult.py", "examples/eventkg240k/example_eventkg240k_transe.py" ]
[ "import torch\nfrom torch.utils.data import RandomSampler\nfrom pathlib import Path\nimport sys\n\nFILE = Path(__file__).resolve()\nROOT = FILE.parents[0].parents[0] # CogKGE root directory\nif str(ROOT) not in sys.path:\n sys.path.append(str(ROOT)) # add CogKGE root directory to PATH\n\n\nfrom cogkge import *...
[ [ "torch.utils.data.RandomSampler", "torch.optim.lr_scheduler.ReduceLROnPlateau" ], [ "torch.utils.data.RandomSampler", "torch.optim.lr_scheduler.ReduceLROnPlateau" ] ]
clintonjwang/mmdetection
[ "f0d1aebdc162ab7e3748d7ac050b523476639818" ]
[ "mmdet/models/backbones/posenc_resnet.py" ]
[ "import torch, einops\nfrom ..builder import BACKBONES\nfrom .resnet import ResNet\n\n@BACKBONES.register_module()\nclass PositionalEncodingResNet(ResNet):\n def __init__(self, num_frequencies, in_channels=3, **kwargs):\n self.L = num_frequencies\n in_channels += self.L * 4\n super().__init_...
[ [ "torch.stack", "torch.linspace", "torch.arange", "torch.cat" ] ]
alexhepburn/rbig_jax
[ "706dd60d2049071be0fb3d311c83719121854678" ]
[ "tests/transforms/test_conv1x1ortho.py" ]
[ "import chex\nimport jax\nimport jax.numpy as np\nimport numpy as onp\nimport objax\nimport pytest\n\nfrom rbig_jax.transforms.conv import Conv1x1Householder\n\nseed = 123\nrng = onp.random.RandomState(123)\ngenerator = objax.random.Generator(123)\n\n\n@pytest.mark.parametrize(\"n_channels\", [1, 3, 12])\n@pytest.m...
[ [ "numpy.random.RandomState" ] ]
jheo4/incubator-tvm
[ "c4c61cb766608fb2f0fd8c9facc480a43afed3f5", "c4c61cb766608fb2f0fd8c9facc480a43afed3f5", "c4c61cb766608fb2f0fd8c9facc480a43afed3f5", "c4c61cb766608fb2f0fd8c9facc480a43afed3f5", "c4c61cb766608fb2f0fd8c9facc480a43afed3f5" ]
[ "tutorials/optimize/opt_matmul_auto_tensorcore.py", "tests/python/frontend/keras/test_forward.py", "tests/python/unittest/test_container.py", "topi/recipe/conv/test_conv_int8_arm.py", "tests/webgl/test_local_gemm.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.dot", "numpy.zeros", "numpy.random.uniform", "numpy.random.randint" ], [ "tensorflow.executing_eagerly", "tensorflow.config.experimental.set_memory_growth", "tensorflow.ConfigProto", "tensorflow.config.list_physical_devices", "numpy.random.rand", "tensorflow.Sess...
ariekahn/nilearn
[ "baa77b18ecee7c4507579214af59d715cc9292f9" ]
[ "nilearn/reporting/tests/test_reporting.py" ]
[ "import os\n\nimport nibabel as nib\nimport numpy as np\nimport pandas as pd\nimport pytest\n\nfrom nibabel.tmpdirs import InTemporaryDirectory\n# Set backend to avoid DISPLAY problems\nfrom nilearn.plotting import _set_mpl_backend\n\nfrom nilearn.glm.first_level.design_matrix import make_first_level_design_matrix\...
[ [ "numpy.linspace", "numpy.arange", "numpy.eye", "pandas.DataFrame", "numpy.full", "numpy.ones", "numpy.array", "numpy.zeros" ] ]
yxing0225/Masked_Face_Detection-Recognition
[ "126c5bebcefb5b5fbbb105007f32574cb9359064" ]
[ "Train_faceNet_model/Train+FaceNet+model/tf_slim/summaries_test.py" ]
[ "# coding=utf-8\n# coding=utf-8\n# 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/licens...
[ [ "tensorflow.python.summary.summary.FileWriter", "tensorflow.python.summary.summary_iterator.summary_iterator", "tensorflow.python.framework.ops.get_collection", "tensorflow.python.platform.test.main", "tensorflow.python.summary.summary.merge_all", "tensorflow.python.ops.array_ops.ones", ...
dmund95/CAN-LDADA
[ "6efe6a6d3312f268dfb638d7ca29e80bb5966dcc" ]
[ "solver/base_solver.py" ]
[ "import torch\nimport torch.nn as nn\nimport os\nfrom . import utils as solver_utils \nfrom utils.utils import to_cuda, mean_accuracy, accuracy\nfrom torch import optim\nfrom math import ceil as ceil\nfrom config.config import cfg\n\nclass BaseSolver:\n def __init__(self, net, dpn, dataloader, bn_domain_map={}, ...
[ [ "torch.optim.Adam", "torch.nn.CrossEntropyLoss", "torch.cat", "torch.cuda.is_available", "torch.optim.SGD" ] ]
pentschev/sparse
[ "948cee79dbfba9c69ea52f04806e0f9dc5e05032" ]
[ "sparse/coo/core.py" ]
[ "import copy as _copy\nimport operator\nfrom collections.abc import Iterable, Iterator, Sized\nfrom collections import defaultdict, deque\nfrom functools import reduce\nimport warnings\n\nimport numpy as np\nimport scipy.sparse\nfrom numpy.lib.mixins import NDArrayOperatorsMixin\n\nimport numba\n\nfrom .common impo...
[ [ "numpy.true_divide", "numpy.sqrt", "numpy.asarray", "numpy.vstack", "numpy.issubdtype", "numpy.dtype", "numpy.all", "numpy.divide", "numpy.unique", "numpy.add.reduce", "numpy.logical_and.reduce", "numpy.stack", "numpy.full", "numpy.logical_or.reduce", "n...
zcemjjw/MPHY0041_Segmentation
[ "5840eb6979bb9e3ad19898cd66e0ede8129e3680" ]
[ "UNet_2D/training.py" ]
[ "import tensorflow as tf\nimport numpy as np\nimport os\nimport matplotlib.pyplot as plt\nfrom keras.optimizers import Adam, SGD\nfrom tqdm import tqdm\nimport random\nfrom metrics import dice_coef, dice_coef_loss\n\nimg_width = 128\nimg_height = 128\nimg_channels = 1\n\npath_to_data = './data/datasets-promise12'\n...
[ [ "tensorflow.keras.callbacks.ModelCheckpoint", "tensorflow.keras.layers.Lambda", "matplotlib.pyplot.figure", "tensorflow.keras.layers.Conv2DTranspose", "tensorflow.keras.layers.Conv2D", "tensorflow.optimizers.Adam", "tensorflow.keras.layers.concatenate", "tensorflow.keras.Model", ...
juldou/seldon-core
[ "34021ee3ead41c729ff57efd1964ab3f0d37861e" ]
[ "components/alibi-detect-server/adserver/cd_model.py" ]
[ "import json\nfrom typing import List, Dict, Optional, Union\nimport logging\nimport numpy as np\nfrom .numpy_encoder import NumpyEncoder\nfrom adserver.base import AlibiDetectModel, ModelResponse\nfrom alibi_detect.utils.saving import load_detector, Data\n\n\ndef _append_drift_metrcs(metrics, drift, name):\n me...
[ [ "numpy.concatenate", "numpy.array" ] ]
asd249180/similarity_and_matching
[ "225cbc4850a790a37ea18d4c519a4306e9db3590" ]
[ "src/bin/plots/plot_resnet_cka_vs_crossentropy.py" ]
[ "import pandas as pd\nfrom matplotlib import pyplot as plt\nimport os\nimport sys\nimport seaborn as sns\nimport json\nimport argparse\nfrom dotmap import DotMap\nimport numpy as np\n\n# ================================================================\n# SETTINGS\n# =================================================...
[ [ "matplotlib.pyplot.legend", "pandas.concat", "pandas.read_csv", "matplotlib.pyplot.twinx", "numpy.logical_and.reduce", "pandas.DataFrame", "matplotlib.pyplot.savefig", "matplotlib.pyplot.tick_params", "matplotlib.pyplot.figure" ] ]
micromoon1997/ImageProcessingDSL
[ "fb59373267ac57ee7084631d951927e835b956fe" ]
[ "quantize_image.py" ]
[ "import numpy as np\r\nfrom kmeans import Kmeans\r\n\r\nclass ImageQuantizer:\r\n\r\n def __init__(self, b):\r\n self.b = b\r\n\r\n def quantize(self, img):\r\n b = self.b\r\n C, R, D = img.shape\r\n self.img = img\r\n X = np.reshape(img, (C * R, D))\r\n model = Kmean...
[ [ "numpy.reshape", "numpy.copy" ] ]
benvanwerkhoven/prnu
[ "57d8677e10a4f04a572c6b18b58ce640e6c4bedb" ]
[ "prnu/pipeline.py" ]
[ "#!/usr/bin/env python\nimport numpy\nimport kernel_tuner\n\nfrom scipy import misc\n#from matplotlib import pyplot\n\n#image = misc.imread(\"../test_small.jpg\", \"r\")\nimage = misc.imread(\"../test_small.jpg\", mode='RGB')\n\nmisc.imshow(image)\n\nprint (image.shape)\n\n\n\n\n\n\n\nexit()\n\n\nkernel_names = []\...
[ [ "numpy.int32", "numpy.random.randn", "scipy.misc.imread", "scipy.misc.imshow" ] ]
workingloong/elasticdl
[ "474146e4c347bab53c5f157441a6008dd204575c" ]
[ "model_zoo/census_model_sqlflow/wide_and_deep/wide_deep_functional_keras.py" ]
[ "import tensorflow as tf\n\nfrom elasticdl.python.elasticdl.callbacks import LearningRateScheduler\nfrom elasticdl_preprocessing.layers import SparseEmbedding\nfrom elasticdl_preprocessing.layers.concatenate_with_offset import (\n ConcatenateWithOffset,\n)\nfrom elasticdl_preprocessing.layers.discretization impo...
[ [ "tensorflow.keras.layers.Concatenate", "tensorflow.concat", "tensorflow.constant", "tensorflow.reduce_sum", "tensorflow.keras.layers.Dense", "tensorflow.reshape", "tensorflow.sigmoid", "tensorflow.keras.metrics.AUC", "tensorflow.keras.Model", "tensorflow.keras.optimizers.Ad...
alexrame/domainbedresearch
[ "6255da9aedf4584115324f8cf3a45be6e9004602", "6255da9aedf4584115324f8cf3a45be6e9004602", "6255da9aedf4584115324f8cf3a45be6e9004602" ]
[ "domainbed/lib/misc.py", "domainbed/scripts/sweep.py", "domainbed/scripts/train_coloredmnist_diversityshifts.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\n\"\"\"\nThings that don't belong anywhere else\n\"\"\"\n\nimport hashlib\nimport json\nimport os\nimport sys\nimport math\nfrom shutil import copyfile\nfrom collections import OrderedDict, defaultdict\nfrom numbers import Number\nimport oper...
[ [ "numpy.abs", "numpy.linspace", "torch.zeros_like", "torch.eye", "torch.no_grad", "numpy.mean", "numpy.logical_and", "numpy.random.RandomState" ], [ "numpy.random.shuffle" ], [ "torch.sum", "torch.nn.BCEWithLogitsLoss", "numpy.mean", "torch.tensor", "...
pd0wm/nn-morse
[ "f6a504aeb4b414d420058092d437c780aa74ca6d", "f6a504aeb4b414d420058092d437c780aa74ca6d" ]
[ "main.py", "morse.py" ]
[ "#!/usr/bin/env python3\nimport random\nfrom torch.utils.tensorboard import SummaryWriter\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nfrom torch.utils import data\n\n\nfrom morse import ALPHABET, generate_sample\nfrom itertools import groupby\n\nnum_tags = l...
[ [ "torch.nn.functional.log_softmax", "torch.nn.LSTM", "torch.load", "torch.nn.utils.rnn.pad_sequence", "torch.from_numpy", "torch.tensor", "torch.nn.Linear", "torch.utils.tensorboard.SummaryWriter", "torch.nn.CTCLoss", "torch.device", "torch.argmax" ], [ "numpy.hs...
yeshwanthv5/PruneFL
[ "ad1f7f33b0605d1d79abfbe42ef287fcc613a943" ]
[ "bases/nn/models/leaf.py" ]
[ "import torch\nfrom torch import nn as nn\nfrom torch.nn.functional import binary_cross_entropy_with_logits, cross_entropy\n\nfrom bases.nn.conv2d import DenseConv2d\nfrom bases.nn.linear import DenseLinear\nfrom bases.nn.models.base_model import BaseModel\nfrom bases.nn.sequential import DenseSequential\nfrom .uti...
[ [ "torch.nn.Sequential", "torch.nn.Parameter", "torch.zeros_like", "torch.tensor", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
anitksahu/GMRF
[ "2ae642589cfefac06bafbe0325154b1066fd367f" ]
[ "gmrf_mnist.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom gmrf_utils import gradient_hessian\nfrom torchvision.datasets import MNIST\nfrom torch.utils.data import DataLoader\nfrom torchvision import models, transforms\nfrom mnist_model import Net\n\ndef inv_cov_fft(alpha, beta, gamma, H, W):\n ...
[ [ "torch.cat", "torch.load", "torch.randn", "torch.zeros", "torch.zeros_like", "torch.unsqueeze", "torch.tensor", "torch.rfft", "torch.cuda.is_available", "torch.irfft" ] ]
houcharlie/federated
[ "b8b12f2f424f4c637be1e1fe8482ecc94ee3765a", "b8b12f2f424f4c637be1e1fe8482ecc94ee3765a", "5aaa33691ef342e8a2cf6f5b54f459a16029f336", "5aaa33691ef342e8a2cf6f5b54f459a16029f336" ]
[ "catalyst/shared/fed_avg_schedule_catalyst_test.py", "utils/training_loop.py", "utils/datasets/cifar100_dataset_test.py", "utils/training_utils_test.py" ]
[ "# Copyright 2019, Google 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 agree...
[ [ "tensorflow.Graph", "tensorflow.keras.losses.SparseCategoricalCrossentropy", "tensorflow.cast", "tensorflow.test.main", "numpy.ones", "tensorflow.data.Dataset.range", "tensorflow.TensorSpec", "tensorflow.keras.optimizers.SGD" ], [ "tensorflow.nest.flatten", "tensorflow....
umerkhan1995/testapi
[ "1cceefa82f30d8e4093167d8d9c1a549350db7cf" ]
[ "main.py" ]
[ "from fastapi import FastAPI\nimport uvicorn\nimport csv\nimport numpy as np\nimport pytest\n\n\napp = FastAPI()\n\nkwh_price = []\ngrid_fees = []\nunit_price = []\nhs_splitter = []\nzp_cde = []\ncty = []\nstrt = []\n\ndef tariff_gen(postal_code, city, street, house_number,ykc ):\n file = open('location_prices.c...
[ [ "numpy.array", "numpy.average" ] ]
sofiane87/pandas
[ "0de99558b497c5611cbe5d35d504763bd7692275", "4071dde86e33434e1bee8304fa62074949f813cc", "0de99558b497c5611cbe5d35d504763bd7692275" ]
[ "pandas/tests/indexes/datetimelike.py", "pandas/tests/series/test_rank.py", "pandas/tests/scalar/test_nat.py" ]
[ "\"\"\" generic datetimelike tests \"\"\"\nimport numpy as np\nimport pytest\n\nimport pandas as pd\nimport pandas.util.testing as tm\n\nfrom .common import Base\n\n\nclass DatetimeLike(Base):\n def test_argmax_axis_invalid(self):\n # GH#23081\n rng = self.create_index()\n with pytest.raises...
[ [ "pandas.util.testing.assert_index_equal", "pandas.util.testing.assert_produces_warning", "pandas.Series" ], [ "pandas.Series", "pandas.api.types.CategoricalDtype", "pandas._libs.algos.NegInfinity", "numpy.isnan", "numpy.arange", "pandas.Timestamp", "pandas.util.testing....
selwyn96/QuantCSGM
[ "cc89b361d9bded5b9e6be0f04cc1e93ce44c6e51" ]
[ "mnist_generate/model_def_2.py" ]
[ "# This file based on : https://jmetzen.github.io/notebooks/vae.ipynb\n# pylint: disable = C0103, C0111, C0301, R0913, R0903, R0914, R0902\n\n\nimport tensorflow as tf\nimport utils\n\n\nclass Hparams(object):\n def __init__(self):\n self.n_hidden_recog_1 = 500 # 1st layer encoder neurons\n self.n...
[ [ "tensorflow.matmul", "tensorflow.nn.sigmoid", "tensorflow.reduce_mean", "tensorflow.zeros", "tensorflow.exp", "tensorflow.nn.sigmoid_cross_entropy_with_logits", "tensorflow.square", "tensorflow.variable_scope", "tensorflow.random_normal" ] ]
IDl0T/bionic
[ "8eaa868a2e7af81bb561492c045feb414f7c6326" ]
[ "tests/test_flow/test_persistence_fuzz.py" ]
[ "import pytest\n\nfrom numpy.random import choice\nfrom textwrap import dedent\nfrom random import Random\n\nfrom bionic.exception import CodeVersioningError\nfrom bionic import interpret\nimport bionic as bn\nfrom ..helpers import import_code\n\n\nclass SimpleFlowModel:\n \"\"\"\n Manages a simple Bionic flo...
[ [ "numpy.random.choice" ] ]
emeryberger/scale
[ "12cf096547d6be3d7664d482e17f6b15d55b9b9a" ]
[ "test/issues/test-issue266.py" ]
[ "import pandas as pd\nimport numpy as np\nimport gc\n\ndef f():\n print('called f')\n #Uses around 4GB of memory when looped once\n df = np.ones(500000000)\n \n#Uses around 20GB of memory when looped 5 times\nfor i in range(0,5):\n f()\n" ]
[ [ "numpy.ones" ] ]
sky-dust-intelligence-bv/nni
[ "d38359e2f56603ddd5bad00ee2bcb7b38d9a88a5", "d38359e2f56603ddd5bad00ee2bcb7b38d9a88a5" ]
[ "nni/retiarii/hub/pytorch/nasnet.py", "nni/compression/pytorch/speedup/compress_modules.py" ]
[ "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\n\"\"\"File containing NASNet-series search space.\n\nThe implementation is based on NDS.\nIt's called ``nasnet.py`` simply because NASNet is the first to propose such structure.\n\"\"\"\n\nfrom collections import OrderedDict\nfrom functoo...
[ [ "torch.load" ], [ "torch.nn.BatchNorm1d", "torch.ones", "torch.nn.ConvTranspose2d", "torch.nn.PReLU", "torch.nn.Conv2d", "torch.sum", "torch.nn.PixelShuffle", "torch.nn.Linear", "torch.nn.Identity", "torch.nn.InstanceNorm2d", "torch.no_grad", "torch.nonzero"...
rajasekar-venkatesan/MachineLearning_Python
[ "eaeed630edcae4aa29283d1de21fa175f0d6dec6" ]
[ "kMeansCluster/my_kmeans.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\ndataset = pd.read_csv('Mall_Customers.csv')\nX = dataset.iloc[:,[3,4]].values\n\n#Using Elbow method\nfrom sklearn.cluster import KMeans\nwcss = []\nfor i in range(1,11):\n kmeans = KMeans(n_clusters = i, init = 'k-means++', max_iter = ...
[ [ "matplotlib.pyplot.legend", "pandas.read_csv", "matplotlib.pyplot.scatter", "sklearn.cluster.KMeans", "matplotlib.pyplot.title", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
jonaschn/networkx
[ "7b4168bdb09275a2ed860b01b9dbb77a151d85c6" ]
[ "networkx/algorithms/centrality/second_order.py" ]
[ "\"\"\"Copyright (c) 2015 – Thomson Licensing, SAS\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted (subject to the limitations in the\ndisclaimer below) provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyri...
[ [ "numpy.identity", "numpy.sum", "numpy.empty", "numpy.ones" ] ]
ucsky/opendata
[ "045de23706adf2166421d029ecc72456095dc76c", "045de23706adf2166421d029ecc72456095dc76c" ]
[ ".dataset/dvfplus/setup-3-to-csv.py", ".dataset/INSEE-pop-200m-mesh/02-convert.py" ]
[ "#!/usr/bin/env python\nfrom pdb import set_trace as bp\n\nimport json\nimport os\nimport re\nimport sys\nimport glob\n\nimport pandas as pd\nimport typer\nfrom typing import Optional\nfrom sqlalchemy import create_engine\nimport psycopg2\n\ndebug = False\nverbose = True\nuse_pandas = False\n\nif use_pandas:\n p...
[ [ "pandas.read_sql_query", "pandas.read_sql" ], [ "pandas.merge" ] ]
qi-zh/XenonPy
[ "e91c680c773022982b80686c9faaf962e304916d", "e91c680c773022982b80686c9faaf962e304916d" ]
[ "xenonpy/model/cgcnn.py", "tests/datatools/test_boxcox.py" ]
[ "# Copyright (c) 2019. TsumiNa. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n\nimport torch\nfrom torch import nn\n\n__all__ = ['ConvLayer', 'CrystalGraphConvNet']\n\n\nclass ConvLayer(nn.Module):\n \"\"\"\n Convolutional oper...
[ [ "torch.nn.BatchNorm1d", "torch.nn.Dropout", "torch.nn.LogSoftmax", "torch.nn.Softplus", "torch.mean", "torch.cat", "torch.sum", "torch.nn.Sigmoid", "torch.nn.Linear" ], [ "numpy.log", "numpy.allclose", "numpy.isnan", "scipy.stats.boxcox", "numpy.concaten...
claramaine/t-recs
[ "b7e66eda8ab2549119e81b95388fcbd5cb387f51" ]
[ "trecs/tests/test_components.py" ]
[ "from trecs.models.recommender import SystemStateModule\nfrom trecs.components import PredictedUserProfiles\nimport numpy as np\n\n\nclass TestComponents:\n def test_system_state(self):\n profiles = PredictedUserProfiles(np.zeros((5, 5)))\n sys = SystemStateModule()\n sys.add_state_variable(...
[ [ "numpy.zeros", "numpy.ones" ] ]
cboulay/lazy_ops
[ "4d9f1a91cb6a42d8c804a9c3f93e7a62e841162b" ]
[ "tests/test_dsetview.py" ]
[ "import numpy as np\nfrom lazy_ops import DatasetView, lazy_transpose\nimport secrets\nfrom numpy.testing import assert_array_equal\nimport unittest\nimport tempfile\nfrom functools import wraps\nimport h5py\nimport zarr\nimport pytest\n\n# Define decorator to iterate over dset_list\ndef dset_iterator(f):\n @wra...
[ [ "numpy.testing.assert_array_equal", "numpy.prod", "numpy.transpose" ] ]
chengcchn/OpenPCDet
[ "a7cf5368d9cbc3969b4613c9e61ba4dcaf217517" ]
[ "pcdet/datasets/dataset.py" ]
[ "from collections import defaultdict\nfrom pathlib import Path\n\nimport numpy as np\nimport torch.utils.data as torch_data\n\nfrom ..utils import common_utils\nfrom .augmentor.data_augmentor import DataAugmentor\nfrom .processor.data_processor import DataProcessor\nfrom .processor.point_feature_encoder import Poin...
[ [ "numpy.pad", "numpy.stack", "numpy.concatenate", "numpy.array", "numpy.zeros" ] ]
mohi7solanki/ludwig
[ "fd20d91c72928a69f219dd018e0e64a7e6d6ae64" ]
[ "ludwig/features/vector_feature.py" ]
[ "#! /usr/bin/env python\n# coding=utf-8\n# Copyright (c) 2019 Uber Technologies, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENS...
[ [ "tensorflow.matmul", "tensorflow.nn.softmax", "tensorflow.reduce_mean", "tensorflow.compat.v1.get_variable", "tensorflow.compat.v1.placeholder" ] ]
bostongfx/TRAKO
[ "81ea3b56d4a4debf9eb5bd1aed916567ab00ef1b" ]
[ "IPY/MICCAI/sprinter.py" ]
[ "import numpy as np\nimport runner\n\nclass Sprinter:\n\n @staticmethod\n def createfulltable(dataset, originalsize, runs, verbose=False):\n\n print('\\\\textbf{'+dataset+'} & '+str(np.round(originalsize/1000000.,2))+'M\\\\\\\\')\n\n for r in runs.keys():\n\n selector = runs[r][0]\n rest = {r:runs...
[ [ "numpy.round", "matplotlib.ticker.FormatStrFormatter", "numpy.array" ] ]
johnjz30/Phy-Net
[ "8f7a610d6ed36f734dad7d2d0c9d0ffa2a29aaf1", "8f7a610d6ed36f734dad7d2d0c9d0ffa2a29aaf1" ]
[ "test/generate_runtime.py", "test/generate_compression_error_plot.py" ]
[ "\nimport os\nimport time\n\nimport numpy as np\nimport tensorflow as tf\nimport cv2\n\nimport sys\nsys.path.append('../')\n\nfrom model.lat_net import *\nfrom model.loss import *\nfrom model.lattice import *\nfrom utils.experiment_manager import *\n\nfrom tqdm import *\n\nFLAGS = tf.app.flags.FLAGS\n\n# get restor...
[ [ "tensorflow.Graph", "tensorflow.global_variables_initializer", "tensorflow.Session", "numpy.zeros", "tensorflow.app.run" ], [ "tensorflow.train.get_checkpoint_state", "tensorflow.all_variables", "tensorflow.Graph", "tensorflow.nn.l2_loss", "tensorflow.Session", "ten...
CompPsy/pytorch
[ "05f50309d227991659e143889e309019b648ee94" ]
[ "test/test_linalg.py" ]
[ "# -*- coding: utf-8 -*-\nimport torch\nimport numpy as np\n\nimport unittest\nimport itertools\nimport warnings\nimport math\nfrom math import inf, nan, isnan\nimport random\nfrom random import randrange\nfrom itertools import product\nfrom functools import reduce\n\nfrom torch.testing._internal.common_utils impor...
[ [ "torch.all", "torch.addmv", "torch.lu_unpack", "torch.randint", "torch.testing._internal.common_utils.random_sparse_matrix", "torch.zeros", "torch.testing._internal.common_utils.iter_indices", "torch.testing.get_all_complex_dtypes", "torch.linalg.householder_product", "torc...
MahdadJafarzadeh/Zzzscoring
[ "f5d22cb7a457412fcc575c5cc6d331286f117dbf" ]
[ "Zzzscoring_v0.1.6.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Jun 24 00:23:30 2020\n\n@author: mahda\n\n# =============================================================================\n# \n# Copyright (c) 2020 Mahdad Jafarzadeh\n# \n# Zzzscoring: A GUI-based package for sleep scoring!\n# ========================================...
[ [ "numpy.expand_dims", "numpy.round", "sklearn.metrics.multilabel_confusion_matrix", "numpy.row_stack", "numpy.shape", "numpy.column_stack", "numpy.loadtxt" ] ]
inzva/emotion-recognition-drawings
[ "56435f42d76c10c10fa58149ccbcc8d05efccdc0", "56435f42d76c10c10fa58149ccbcc8d05efccdc0" ]
[ "src/models/modules/visual_bert_classifier.py", "src/datamodules/datasets/emoreccom.py" ]
[ "import torch\nfrom torch import nn\nfrom transformers import BertTokenizer, VisualBertModel, VisualBertConfig\nimport numpy as np\n\n\nclass VisualBertClassifier(nn.Module):\n def __init__(self,\n visual_bert_model,\n num_classes: int = 8,\n initial_visual_embeddi...
[ [ "torch.nn.Dropout", "torch.ones", "torch.from_numpy", "torch.unsqueeze", "torch.nn.Linear", "numpy.load" ], [ "numpy.zeros_like" ] ]
cformosa/transformers
[ "708d6fbfcf30b45e051d9783b5f637d3afaf4103" ]
[ "transformers/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.Dropout", "torch.nn.CrossEntropyLoss", "torch.zeros", "torch.nn.Embedding", "torch.tanh", "torch.nn.Linear", "torch.arange", "torch.nn.MSELoss" ] ]
tuxedcat/PER-D3QN
[ "c3a5edf87f93fba5cbd391a59e93826b615bdbba" ]
[ "Pretrained/w1model.py" ]
[ "import torch as tc\nimport torch.nn as nn\nimport torch.nn.init as init\nfrom config import NROW,NCOL\nfrom core import DEVICE\n\nclass Conv(nn.Module):\n\tdef __init__(self, chn_in, chn_out, ker_sz=3):\n\t\tsuper().__init__()\n\t\tself.c=nn.Conv2d(chn_in,chn_out,ker_sz,padding=ker_sz//2,padding_mode=\"circular\",...
[ [ "torch.nn.Dropout", "torch.nn.Conv2d", "torch.nn.Flatten", "torch.nn.Linear", "torch.nn.init.xavier_uniform_", "torch.nn.LeakyReLU", "torch.nn.BatchNorm2d", "torch.nn.init.zeros_" ] ]
gawy/CarND-Semantic-Segmentation
[ "f628807eb411844dfbc0396f072c381d93d03a0c" ]
[ "main.py" ]
[ "#!/usr/bin/env python3\nimport os.path\nimport tensorflow as tf\nimport helper\nimport warnings\nfrom distutils.version import LooseVersion\nimport project_tests as tests\nfrom glob import glob\nfrom tqdm import tqdm\n\n\nCOLLECTION_ASSERTS = 'ASSERTS'\nCOLLECTION_METRICS = 'METRICS'\nCOLLECTION_METRICS_UPDATES = ...
[ [ "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.test.gpu_device_name", "tensorflow.control_dependencies", "tensorflow.reduce_sum", "tensorflow.variables_initializer", "tensorflow.layers.conv2d_transpose", "tensorflow.train.AdamOptimizer", "tensorflow.get_default_grap...
huachao2017/goodsdl
[ "3616d53b90696a97a5d56a064e2a14d484b821d7", "3616d53b90696a97a5d56a064e2a14d484b821d7", "3616d53b90696a97a5d56a064e2a14d484b821d7" ]
[ "dl/imagedetectionV3.py", "dl/test_load.py", "goods2/dl/imagedetection.py" ]
[ "import tensorflow as tf\nimport os\nfrom PIL import Image\nimport numpy as np\nimport logging\nimport time\nfrom goods.models import ProblemGoods\nfrom dl.step1_cnn import Step1CNN\nfrom dl.step2_cnn import Step2CNN\nfrom dl.step3_cnn import Step3CNN\nfrom dl.tradition_match import TraditionMatch\nfrom dl.util imp...
[ [ "tensorflow.gfile.Exists", "numpy.squeeze", "tensorflow.ConfigProto", "tensorflow.gfile.MakeDirs", "numpy.array" ], [ "tensorflow.Graph", "tensorflow.image.resize_bilinear", "tensorflow.train.latest_checkpoint", "tensorflow.image.decode_jpeg", "tensorflow.multiply", ...
gcinbis/deep-generative-models-spring20
[ "d377bd63d5e79539477cca47c71462e5cc12adfa", "d377bd63d5e79539477cca47c71462e5cc12adfa" ]
[ "SphereGAN/resnet.py", "U-GAT-IT/lib/eval/kid.py" ]
[ "from torch import nn\nfrom torch.autograd import grad\nimport torch\n\nfrom model_utils import *\n\nclass conv3x3(nn.Module):\n '''\n 3x3 Conv utility class\n '''\n def __init__(self, input_dim, output_dim = None, bias = False):\n super(conv3x3, self).__init__()\n \n if output_...
[ [ "torch.nn.Conv2d", "torch.nn.LayerNorm", "torch.nn.Tanh", "torch.nn.Linear", "torch.nn.AdaptiveAvgPool2d", "torch.nn.LeakyReLU", "torch.nn.Upsample", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ], [ "numpy.trace", "torch.from_numpy", "numpy.stack", "sklearn.metr...
jeremiedecock/snippets
[ "4bd4e7f459eee610d5cf19f845299ca942ff4b64", "4bd4e7f459eee610d5cf19f845299ca942ff4b64", "4bd4e7f459eee610d5cf19f845299ca942ff4b64", "4bd4e7f459eee610d5cf19f845299ca942ff4b64", "4bd4e7f459eee610d5cf19f845299ca942ff4b64" ]
[ "python/tkinter/python3/matplotlib_canvas_with_animation.py", "python/matplotlib/tkinter_with_navigation_toolbar.py", "python/opencv/opencv_2/image_processing/hough_circle_transform_using_color_extraction.py", "python/matplotlib/contours/contours_only.py", "python/doctest/numpy_example.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org)\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, i...
[ [ "numpy.arange", "matplotlib.use", "matplotlib.pyplot.figure", "numpy.sin", "matplotlib.backends.backend_tkagg.FigureCanvasTkAgg" ], [ "numpy.sqrt", "matplotlib.use", "numpy.arange", "matplotlib.pyplot.figure", "matplotlib.backends.backend_tkagg.NavigationToolbar2TkAgg",...
adriangrepo/segmentl
[ "9b520bf6cfd005eef9bba3db36ee6b3bb373b085" ]
[ "similarity/experimental.py" ]
[ "\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\nfrom math import exp\nimport numpy as np\nfrom segmentl.utils import get_activation_fn\nfrom skimage.feature import masked_register_translation\nfrom skimage import data, img_as_float\nfrom skimage.metrics import structural_similarity as ssim\n...
[ [ "torch.mean", "matplotlib.pyplot.imshow", "torch.norm", "torch.max", "torch.isnan", "torch.nn.functional.conv2d", "torch.min", "torch.nn.functional.avg_pool2d", "torch.from_numpy", "matplotlib.pyplot.savefig", "torch.tensor", "torch.FloatTensor", "torch.nonzero"...
anonymous-user-256/mlrc-cgn
[ "64f43fcb89b3a13c0ae46db4f19060d9f204a6b1" ]
[ "cgn_framework/utils/train_utils.py" ]
[ "import functools\n\nimport torch\nfrom torch import nn\n\nclass Optimizers():\n def __init__(self):\n self._modules = {}\n\n def set(self, k, model, lr=3e-3, betas=(0.9, 0.999)):\n self._modules[k] = torch.optim.Adam(model.parameters(), lr=lr, betas=betas)\n\n def step(self, k_list=[], zero=...
[ [ "torch.nn.init.constant_", "torch.nn.init.xavier_normal_", "torch.nn.Identity", "torch.nn.init.normal_", "torch.nn.init.orthogonal_", "torch.cuda.is_available", "torch.nn.DataParallel", "torch.nn.init.kaiming_normal_" ] ]
overhacked/tensorflow
[ "892ffbc922e31be803e4182b39fb9e647c9d796f" ]
[ "tensorflow/python/keras/layers/normalization.py" ]
[ "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.framework.tensor_shape.TensorShape", "tensorflow.python.keras.backend.constant", "tensorflow.python.ops.array_ops.constant", "tensorflow.python.ops.array_ops.shape", "tensorflow.python.ops.state_ops.assign_sub", "tensorflow.python.keras.regularizers.get", "tensorflow...
guyujun/RFDesign
[ "9fea2bafbbb7cbf702c9884e8b3ec69ed50ff2f5", "9fea2bafbbb7cbf702c9884e8b3ec69ed50ff2f5", "9fea2bafbbb7cbf702c9884e8b3ec69ed50ff2f5", "9fea2bafbbb7cbf702c9884e8b3ec69ed50ff2f5" ]
[ "hallucination/models/rf_v01/SE3_network.py", "inpainting/model/performer_pytorch.py", "inpainting/pred_util.py", "inpainting/model/_autofold.py" ]
[ "import torch\nimport torch.nn as nn\n\nimport sys, os\nscript_dir = os.path.dirname(os.path.realpath(__file__))\nsys.path.insert(0,script_dir+'/../../equivariant_attention/')\nfrom equivariant_attention.modules import get_basis_and_r, GSE3Res, GNormBias\nfrom equivariant_attention.modules import GConvSE3, GNormSE3...
[ [ "torch.nn.ModuleList", "torch.cuda.amp.autocast" ], [ "torch.nn.Dropout", "torch.norm", "torch.ones", "torch.max", "torch.cat", "torch.einsum", "torch.randn", "torch.sum", "torch.nn.LayerNorm", "torch.tensor", "torch.matmul", "torch.nn.Linear", "torc...
harryh5427/gpi
[ "c438ea68851cd05577dfc06e2a29e834327d3559", "c438ea68851cd05577dfc06e2a29e834327d3559" ]
[ "testshots/hv_meas_browse.py", "testshots/1180613.py" ]
[ "\"\"\"\n\n\"\"\"\nfrom MDSplus import *\nimport sys\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ns=int(sys.argv[1])\nmyTree=Tree(\"spectroscopy\",s)\nfor i in range(1,33):\n if i<10:\n node_sig=myTree.getNode(\"GPI.APD_ARRAY.HARDWARE:ACQ196.INPUT_0\"+str(i))\n else:\n node_sig=myTree...
[ [ "numpy.mean" ], [ "matplotlib.pyplot.plot", "matplotlib.pyplot.show" ] ]
pchavanne/dl
[ "6114234a8a25cfda7a596b9a6e75bb121de6f4d2" ]
[ "examples/lstm_example.py" ]
[ "#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n\n\"\"\"\nThis example show you how to train an LSTM for text generation.\n\"\"\"\nimport numpy as np\nimport yadll\n\nimport logging\n\nlogging.basicConfig(level=logging.DEBUG, format='%(message)s')\n\nalphabet = 'abcdefghijklmnopqrstuvwxyz'\nsequence_length = 2\nnu...
[ [ "numpy.asarray", "numpy.argmax", "numpy.zeros" ] ]
SebastianMuszynski/pytorch-pretrained-BERT
[ "1892015692a28096859a46243ae458f9f8aa003f" ]
[ "examples/run_classifier.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...
[ [ "numpy.squeeze", "sklearn.metrics.matthews_corrcoef", "torch.utils.data.DataLoader", "torch.no_grad", "torch.cuda.manual_seed_all", "torch.cuda.is_available", "torch.device", "scipy.stats.spearmanr", "sklearn.metrics.f1_score", "torch.distributed.get_rank", "torch.nn.Cr...
j-groeneveld/covid
[ "a8d993c866dcd56bf1c5f6f0a2120eae883aa029" ]
[ "sim/lib/plot.py" ]
[ "import time\nimport bisect\nimport numpy as np\nimport pandas as pd\nimport networkx as nx\nimport scipy\nimport scipy.optimize\nfrom scipy.interpolate import interp1d\nimport scipy as sp\nimport random as rd\nimport os, math\nfrom datetime import datetime\nimport matplotlib\nimport matplotlib.pyplot as plt\nimpor...
[ [ "pandas.to_datetime", "numpy.sqrt", "numpy.linspace", "numpy.max", "numpy.mean", "numpy.where", "numpy.square", "numpy.clip", "numpy.std", "matplotlib.pyplot.close", "matplotlib.pyplot.axis", "matplotlib.pyplot.subplots_adjust", "numpy.zeros", "matplotlib.py...
yimaverickxia/csld
[ "002cc1d4bd644cbd7adffb8f2bcc8675cbd7f4bb" ]
[ "csld/common_main.py" ]
[ "#!/usr/bin/env python3\n\n\"\"\"\nMisc subroutines for linear fitting:\n * init correlation matrix A, value vector b\n * fit to get unknown coefficients x\n * predict using fitted x\n\"\"\"\n\nimport re\nimport glob\nimport logging\nimport numpy as np\nimport scipy\nimport scipy.sparse\nfrom cssolve.csfit import c...
[ [ "scipy.io.mmwrite", "numpy.argmin", "numpy.transpose", "numpy.savetxt", "numpy.array", "numpy.zeros", "numpy.loadtxt" ] ]
aporia-ai/aporia-mars
[ "fbebef726f80282b151971849d0b2bc0246c9b58", "faf098a8113b402197a5bdccd175768bc353cb27", "faf098a8113b402197a5bdccd175768bc353cb27" ]
[ "mars/tensor/spatial/distance/tests/test_distance_execution.py", "mars/lib/groupby_wrapper.py", "mars/learn/utils/core.py" ]
[ "# Copyright 1999-2021 Alibaba Group Holding 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 appl...
[ [ "scipy.spatial.distance.cdist", "numpy.testing.assert_array_equal", "scipy.spatial.distance.pdist", "numpy.random.rand", "scipy.spatial.distance.squareform", "numpy.random.RandomState" ], [ "pandas.core.groupby.DataFrameGroupBy", "pandas.core.groupby.SeriesGroupBy", "numpy....
fuzihaofzh/pytorch-1
[ "d865ea084a9572777d8af657ecc4730712926a0f" ]
[ "torch/fx/_symbolic_trace.py" ]
[ "import builtins\nimport functools\nimport inspect\nimport math\nimport os\nfrom types import CodeType, FunctionType, ModuleType\nfrom typing import Any, Dict, NamedTuple, Optional, Set, Tuple, Type, List, Callable, Union\nfrom itertools import chain\nimport torch\nimport torch._C._fx # type: ignore[import]\nfrom ...
[ [ "torch.utils._pytree.tree_flatten", "torch._assert", "torch.warnings.warn", "torch.utils._pytree.tree_map", "torch.nn.Module", "torch._C._fx.patch_function" ] ]
heejinohn/lzho
[ "3c34e4dfb499224d3991ac0493c31c2c274122cb" ]
[ "ticker-2014.py" ]
[ "import pandas as pd, numpy as np, wrds\nimport datetime as dt\n\ndb = wrds.Connection()\n\n# Create a set including OptionMetrics tickers\nom_name = (db.get_table('optionm','secnmd')\n .groupby(['secid','ticker','issuer'])['effect_date']\n .agg(['min','max']).reset_index().rename({'min':'start'...
[ [ "pandas.read_parquet", "numpy.where" ] ]
torsteinb36/Salmon_lice_simulator
[ "8319da4fb6743ad2a444ab58fe327191c0445783", "8319da4fb6743ad2a444ab58fe327191c0445783" ]
[ "Simulator_engine/Farm.py", "Simulator_engine/Lice_agent_female.py" ]
[ "from .Lice_agent_female import Lice_agent_f\nfrom .Lice_agent_male import Lice_agent_m\nimport numpy as np\nfrom scipy.interpolate import interp1d\nfrom .Planktonic_agent import Planktonic_agent\nimport pandas as pd\nfrom matplotlib import dates\n\nclass Farm:\n '''\n Ein klassi til at fylgja við støðuni á t...
[ [ "numpy.sum", "numpy.sqrt", "numpy.logical_and", "numpy.alen", "numpy.isnan", "numpy.arange", "scipy.interpolate.interp1d", "numpy.exp", "numpy.array", "matplotlib.dates.num2date" ], [ "numpy.isin" ] ]
jwokaty/curatedMetagenomicAnalyses
[ "61b81db0db81eecc001ceadb35600f2870124b6a" ]
[ "python_tools/aggregate_taxa_profile.py" ]
[ "#!/usr/bin/env python\n\n\nimport pandas as pd\nimport numpy as np\nimport argparse as ap\nimport sys, os\n\n\ndef read_params():\n p = ap.ArgumentParser()\n add = p.add_argument\n add(\"metaphlan_profile\", type=str, help=\\\n \"This must be a metaphlan-species table to aggregate. \"\n \"It...
[ [ "pandas.read_csv", "numpy.zeros" ] ]
ajpina/pyleecan
[ "f8d1fce7d108cf443f5767e35d59ff15905fb49f", "f8d1fce7d108cf443f5767e35d59ff15905fb49f", "f8d1fce7d108cf443f5767e35d59ff15905fb49f" ]
[ "pyleecan/Methods/Geometry/Arc3/rotate.py", "Tests/Methods/Slot/test_SlotM14_meth.py", "pyleecan/Methods/Slot/SlotW23/_comp_point_coordinate.py" ]
[ "# -*- coding: utf-8 -*-\nfrom numpy import exp\n\n\ndef rotate(self, angle):\n \"\"\"Rotation of the Arc3 of angle\n\n Parameters\n ----------\n self : Arc3\n An Arc3 Object\n\n angle : float\n the angle of rotation [rad]\n\n\n Returns\n -------\n None\n \"\"\"\n if not ...
[ [ "numpy.exp" ], [ "numpy.angle" ], [ "numpy.exp", "numpy.sqrt", "numpy.arcsin" ] ]
GeneralLi95/PyTorch-CIFAR10
[ "ee9bf4144ea2a15afd855d3f0f6d320296225519" ]
[ "main.py" ]
[ "#!usr/bin/env python \n# -*- coding:utf-8 _*-\n\"\"\" \n@author:yaoli \n@file: main.py.py \n@time: 2019/12/03 \n\"\"\"\n\nimport torch\nimport torchvision\nimport torchvision.transforms as transforms\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport torch.backends.cudnn ...
[ [ "torch.nn.CrossEntropyLoss", "torch.max", "torch.load", "torch.cuda.device_count", "torch.utils.data.DataLoader", "torch.no_grad", "torch.cuda.is_available", "torch.nn.DataParallel", "torch.save" ] ]
hengfei-wang/srf
[ "0f5d5e24638edb856b39f2c87a77c23c701ba211" ]
[ "data/load_xgaze.py" ]
[ "import os\nimport torch\nimport numpy as np\nimport imageio\nimport cv2\nimport pickle as pkl\nimport random\n\n\ndef image_projection_wo_dist_mat(XX, c2w, ref_pose_idx):\n XXc = np.matmul(XX, c2w[:3, :3]) - np.matmul(c2w[:3, 3], c2w[:3, :3])\n pts = XXc[:, :2] / XXc[:, 2][:, np.newaxis]\n\n pts = pts * ...
[ [ "numpy.linspace", "torch.Tensor", "numpy.matmul", "torch.tensor", "torch.matmul", "numpy.array", "numpy.zeros", "numpy.vstack" ] ]
Adhmir/mcdm
[ "c1d8bec4f3628f5d95ee7cd3bfdfb9ff54783dce" ]
[ "algoritmo_dp2_1.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Fri Jun 25 14:17:29 2021\r\n\r\n@author: Adhmir Renan Voltolini Gomes\r\n\r\nAlgoritmo para cálculo do DP2\r\n\r\n\"\"\"\r\n\"\"\"\r\nA distância DP2 é um indicador sintético elaborado por Trapero (1977) que tem\r\npor finalidade a comparação interespacial e/ou inter...
[ [ "numpy.dot", "pandas.concat", "numpy.abs", "numpy.reshape", "pandas.DataFrame", "numpy.array", "numpy.sum" ] ]
no-name-xiaosheng/PaddleViT
[ "c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7", "c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7", "c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7", "c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7", "c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7" ]
[ "image_classification/VOLO/tests/test_fold.py", "image_classification/ConvMixer/main_multi_gpu.py", "image_classification/DeiT/tests/test_mixup.py", "image_classification/Shuffle_Transformer/port_weights/load_pytorch_weights_base.py", "image_classification/ResMLP/port_weights/load_pytorch_weights.py" ]
[ "import unittest\nimport numpy as np\nimport paddle\nimport paddle.nn as nn\nfrom fold import fold\n\n\nclass FoldTest(unittest.TestCase):\n @classmethod\n def setUpClass(cls):\n paddle.set_device('cpu')\n \n @classmethod\n def tearDown(cls):\n pass\n\n #@unittest.skip('skip for debu...
[ [ "numpy.array" ], [ "numpy.random.seed" ], [ "numpy.sqrt" ], [ "numpy.allclose", "torch.Tensor", "torch.load", "numpy.random.randn", "torch.device" ], [ "torch.device", "numpy.random.randn", "numpy.allclose", "torch.Tensor" ] ]
drammock/expyfun
[ "b92bf5291318ee4cb1692e7bcb9757a422f48304", "b92bf5291318ee4cb1692e7bcb9757a422f48304" ]
[ "examples/stimuli/stimulus_power.py", "examples/basic_experiment.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n=====================================\nExamine and manipulate stimulus power\n=====================================\n\nThis shows how to make stimuli that play at different SNRs and db SPL.\n\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom expyfun.stimuli impor...
[ [ "numpy.arange", "scipy.fft.rfft", "matplotlib.pyplot.subplots", "numpy.log10", "numpy.mean", "numpy.random.RandomState" ], [ "numpy.sqrt" ] ]
gf91597/summer
[ "d3096fc66636a3247bc6d6dbfa5f4ca5414d57ff", "d3096fc66636a3247bc6d6dbfa5f4ca5414d57ff" ]
[ "test/t2.py", "DrawK.py" ]
[ "#!/usr/local/bin/python3\n\nfrom matplotlib import pyplot as plt\nimport mpl_finance as mpf\n#from matplotlib import finance as mpf\nfrom matplotlib.pylab import date2num\nimport pandas as pd\nimport datetime\n\nplt.bar([1, 3, 5, 7, 9], [5, 4, 8, 12, 7], label='graph 1')\n\nplt.bar([2, 4, 6, 8, 10], [4, 6, 8, 13, ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.bar", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ], [ "matplotlib.pyplot.gca", "pandas.read_csv", "matplotlib.pyplot.title", "matplotlib.pyplot.subplots", ...
gonzzza007/Russian-gpt-2
[ "22bc186d6320b315cd0066bd21bff9c5c9457c77" ]
[ "src/sample.py" ]
[ "import tensorflow as tf\n\nimport model\n\ndef top_k_logits(logits, k):\n if k == 0:\n # no truncation\n return logits\n\n def _top_k():\n values, _ = tf.nn.top_k(logits, k=k)\n min_values = values[:, -1, tf.newaxis]\n return tf.where(\n logits < min_values,\n ...
[ [ "tensorflow.TensorShape", "tensorflow.nn.softmax", "tensorflow.fill", "tensorflow.concat", "tensorflow.sort", "tensorflow.equal", "tensorflow.ones_like", "tensorflow.squeeze", "tensorflow.nn.top_k", "tensorflow.reduce_min", "tensorflow.name_scope", "tensorflow.to_fl...
KabohaJeanMark/tensorflow
[ "c6156aaaa110ec7091648123bf8c04c52d832ddb", "c6156aaaa110ec7091648123bf8c04c52d832ddb" ]
[ "tensorflow/python/keras/engine/training.py", "tensorflow/examples/speech_commands/train.py" ]
[ "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.keras.distribute.distributed_training_utils.global_batch_size_supported", "tensorflow.python.keras.engine.training_generator.GeneratorOrSequenceTrainingLoop", "tensorflow.python.framework.ops.executing_eagerly_outside_functions", "tensorflow.python.keras.backend.function", "...
Pad0y/imagepy
[ "23f41b64ade02f94b566b0d23a4b6459c1a1578d", "23f41b64ade02f94b566b0d23a4b6459c1a1578d", "23f41b64ade02f94b566b0d23a4b6459c1a1578d", "23f41b64ade02f94b566b0d23a4b6459c1a1578d", "23f41b64ade02f94b566b0d23a4b6459c1a1578d", "23f41b64ade02f94b566b0d23a4b6459c1a1578d" ]
[ "sciwx/__init__.py", "imagepy/menus/Image/Adjust/brightcons_plg.py", "sciwx/canvas/mcanvas.py", "sciwx/demo/grid_demo.py", "sciwx/plugins/channels.py", "imagepy/ipyalg/hydrology/edt.py" ]
[ "from sciapp import Manager\nimport numpy as np\n\nColorManager = Manager()\nimport matplotlib.pyplot as plt\n\nfor i in plt.colormaps()[::-1]:\n cm = plt.get_cmap(i)\n if i[-2:] == \"_r\":\n continue\n vs = np.linspace(0, cm.N, 256, endpoint=False)\n lut = cm(vs.astype(np.int), bytes=True)[:, :3...
[ [ "matplotlib.pyplot.colormaps", "matplotlib.pyplot.get_cmap", "numpy.linspace" ], [ "numpy.arctan", "numpy.multiply", "numpy.subtract", "numpy.tan", "numpy.mean" ], [ "numpy.linspace" ], [ "numpy.random.randn" ], [ "numpy.where", "numpy.cumsum" ], ...
vigsterkr/FlowKet
[ "61238afd3fe1488d35c57d280675f544c559bd01", "0d8f301b5f51a1bab83021f10f65cfb5f2751079", "0d8f301b5f51a1bab83021f10f65cfb5f2751079", "61238afd3fe1488d35c57d280675f544c559bd01", "61238afd3fe1488d35c57d280675f544c559bd01", "0d8f301b5f51a1bab83021f10f65cfb5f2751079" ]
[ "examples/rbm_heisenberg_1d_sr.py", "src/flowket/optimizers/stochastic_reconfiguration/optimizer.py", "examples/evaluate_with_2d_obc_invariant.py", "src/flowket/layers/dihedral_4_invariants.py", "tests/test_tensorflow_complex_numbers_ops.py", "src/flowket/deepar/samplers/fast_autoregressive.py" ]
[ "from tensorflow.keras.layers import Input\nfrom tensorflow.keras.models import Model\n\nimport numpy\n\nfrom flowket.callbacks.monte_carlo import TensorBoardWithGeneratorValidationData, \\\n default_wave_function_stats_callbacks_factory, MCMCStats\nfrom flowket.machines import RBMSym\nfrom flowket.operators imp...
[ [ "numpy.prod", "tensorflow.keras.models.Model", "tensorflow.keras.layers.Input" ], [ "tensorflow.math.abs", "tensorflow.python.keras.backend.update_add", "tensorflow.concat", "tensorflow.python.keras.backend.name_scope", "tensorflow.control_dependencies", "tensorflow.count_n...
yeqingli/ml-testing-accelerators
[ "d33a18e1782875dfe647c149553d54cc0c5e88cd", "d33a18e1782875dfe647c149553d54cc0c5e88cd", "d33a18e1782875dfe647c149553d54cc0c5e88cd" ]
[ "metrics_v2/handler/collectors/tensorboard_collector_test.py", "metrics_v2/handler/collectors/base.py", "metrics_handler/metrics.py" ]
[ "# Copyright 2020 Google 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.median", "tensorflow.summary.scalar", "numpy.mean", "tensorflow.summary.create_file_writer" ], [ "numpy.std", "numpy.mean" ], [ "numpy.frombuffer", "numpy.std", "tensorflow.dtypes.as_dtype", "numpy.mean" ] ]