repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
AranKomat/Diff-DALLE
[ "9418e98e97b599c5c65f16ee168fedf76a29095f" ]
[ "diff_dalle/unet.py" ]
[ "from abc import abstractmethod\n\nimport math\n\nimport numpy as np\nimport torch as th\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom .fp16_util import convert_module_to_f16, convert_module_to_f32, convert_module_to_f16_2\nfrom .nn import (\n checkpoint,\n conv_nd,\n linear,\n avg_poo...
[ [ "torch.nn.functional.normalize", "torch.nn.Dropout", "torch.cat", "torch.nn.Identity", "torch.nn.functional.softplus", "torch.einsum", "torch.nn.ModuleList", "numpy.log", "torch.nn.SiLU", "torch.nn.functional.interpolate", "torch.arange", "torch.ones", "torch.Do...
azhou42/tensorflow-models-private
[ "e9cf8d1b84a3842c85b1ad9621fb2f3b1c5523a9" ]
[ "research/pcl_rl/env_spec.py" ]
[ "# Copyright 2017 The TensorFlow Authors All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi...
[ [ "numpy.zeros", "numpy.ones", "numpy.prod", "numpy.hstack", "numpy.mod" ] ]
kamakazikamikaze/wotc-bot-twitter
[ "d5f16654529ac3bb7ba936f156d8d20cbc26ef29" ]
[ "bot.py" ]
[ "from argparse import ArgumentParser\nfrom collections import OrderedDict\nfrom datetime import datetime, timedelta\nfrom elasticsearch6 import Elasticsearch\nfrom json import dump, load\nfrom math import pi, sin, cos\nfrom matplotlib import pyplot as plt\nfrom matplotlib import dates as mdates\nfrom matplotlib imp...
[ [ "matplotlib.pyplot.get_cmap", "matplotlib.dates.DateFormatter", "matplotlib.pyplot.figure", "matplotlib.ticker.PercentFormatter", "matplotlib.pyplot.subplot2grid", "matplotlib.pyplot.clf", "matplotlib.pyplot.axes" ] ]
leakyH/PaddleDetection
[ "aa15eb945711baf248177a02d4d3dd3bd3abc4e8" ]
[ "ppdet/modeling/heads/s2anet_head.py" ]
[ "# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re...
[ [ "numpy.repeat", "numpy.log", "numpy.concatenate" ] ]
isayev/torchani
[ "f8edffe384e2cb2eebe3a7e04faa01b6f5e26b37" ]
[ "examples/nnp_training.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n.. _training-example:\n\nTrain Your Own Neural Network Potential\n=======================================\n\nThis example shows how to use TorchANI to train a neural network potential\nwith the setup identical to NeuroChem. We will use the same configuration as\nspecified in `input...
[ [ "torch.nn.Linear", "torch.nn.MSELoss", "torch.nn.CELU", "torch.optim.SGD", "torch.nn.init.kaiming_normal_", "torch.cuda.is_available", "torch.tensor", "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.load", "torch.nn.init.zeros_", "torch.utils.tensorboard.SummaryWri...
rwill128/baselines
[ "24dd0c80db01623bb1224ab044b64da3fbec63cc" ]
[ "baselines/deepq/build_graph.py" ]
[ "\"\"\"Deep Q learning graph\n\nThe functions in this file can are used to create the following functions:\n\n======= act ========\n\n Function to chose an action given an observation\n\n Parameters\n ----------\n observation: object\n Observation that can be feed into the output of make_obs_ph\n...
[ [ "tensorflow.constant_initializer", "tensorflow.group", "tensorflow.compat.v1.get_variable_scope", "tensorflow.compat.v1.trainable_variables", "tensorflow.clip_by_norm", "tensorflow.stack", "tensorflow.control_dependencies", "tensorflow.nn.softmax", "tensorflow.one_hot", "te...
eshan-rg/deep-neural-networks
[ "1f34ac6572b3d5e9dcb25edc888a0df094458c25" ]
[ "MNIST dataset - FCNN/FCNN.py" ]
[ "import keras\r\nimport numpy as np\r\n\r\nfrom keras.datasets import mnist\r\n(x_train,y_train),(x_test,y_test)=mnist.load_data()\r\n\r\nx_train = x_train.reshape(60000,784)\r\nx_test = x_test.reshape(10000,784)\r\nx_train = x_train/255.0\r\nx_test = x_test/255.0\r\n\r\nfrom keras.utils import to_categorical\r\ny_...
[ [ "sklearn.metrics.classification_report" ] ]
daxiongshu/cupy
[ "a8dfcd66d89c8e66a60e4b7272f95a15c26fc907" ]
[ "tests/cupy_tests/sorting_tests/test_search.py" ]
[ "import unittest\n\nimport numpy\nimport pytest\n\nimport cupy\nimport cupy.core._accelerator as _acc\nfrom cupy.core import _cub_reduction\nfrom cupy import testing\n\n\n@testing.gpu\nclass TestSearch(unittest.TestCase):\n\n @testing.for_all_dtypes(no_complex=True)\n @testing.numpy_cupy_allclose()\n def t...
[ [ "numpy.array", "numpy.random.randn", "numpy.random.randint", "numpy.empty" ] ]
elishatofunmi/ReinEnv
[ "ad86203d3f4bddc7a8239cefdfa31c1a8e5e9af8" ]
[ "pytennis/play.py" ]
[ "from keras.utils import to_categorical\nimport tensorflow as tf\nimport pygame\n\nclass pytennis:\n def __init__(self, fps = 50):\n self.net = Network(150,450,100,600)\n self.updateRewardA = 0\n self.updateRewardB = 0\n self.updateIter = 0\n self.lossA = 0\n self.lossB ...
[ [ "tensorflow.keras.utils.to_categorical" ] ]
scribbler00/mtl-sps_ern-and-hps_taskembbedding
[ "d8e9de4919cdf8f5b3167f8cb0c0b50ea89b4341" ]
[ "dies/dies/tests/test_regression.py" ]
[ "import random\nimport pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\nfrom sklearn.metrics import mean_squared_error as mse\nfrom sklearn import datasets\n\nimport unittest\n\nimport torch\nfrom fastai.basic_train import Learner\nfrom fastai.callbacks import OneCycleSche...
[ [ "pandas.to_datetime", "sklearn.metrics.mean_squared_error", "torch.nn.MSELoss", "numpy.random.seed", "pandas.date_range", "torch.manual_seed", "numpy.random.randint", "sklearn.datasets.make_regression" ] ]
Jianxun-Wang/PICNNSR
[ "b12ed0cb89b8136a23d213c6c2fb0663e6064299" ]
[ "demo0/foamFileOperation.py" ]
[ "# Python function to manipulate OpenFOAM files\n# Developer: Jian-Xun Wang (jwang33@nd.edu)\n\n###############################################################################\n\n# system import\nimport numpy as np\nimport numpy.matlib\nimport sys # Add extra path/directory\nimport os\nimport os.path as ospt\nimpor...
[ [ "numpy.loadtxt" ] ]
rakmakan/Chatbot
[ "d04bc1526b56961a16c25148d9ef18c4f157e9c4", "901ac307b68486d8289105c159ca702318bea5b0", "901ac307b68486d8289105c159ca702318bea5b0", "d04bc1526b56961a16c25148d9ef18c4f157e9c4", "d04bc1526b56961a16c25148d9ef18c4f157e9c4", "d04bc1526b56961a16c25148d9ef18c4f157e9c4", "d04bc1526b56961a16c25148d9ef18c4f157e9c...
[ "chatbot_env/Lib/site-packages/scipy/fftpack/tests/gen_fftw_ref.py", "chatbot_env/Lib/site-packages/sklearn/manifold/_isomap.py", "chatbot_env/Lib/site-packages/sklearn/preprocessing/tests/test_common.py", "chatbot_env/Lib/site-packages/sklearn/impute/_iterative.py", "chatbot_env/Lib/site-packages/scipy/int...
[ "from __future__ import division, print_function, absolute_import\n\nfrom subprocess import Popen, PIPE, STDOUT\n\nimport numpy as np\n\nSZ = [2, 3, 4, 8, 12, 15, 16, 17, 32, 64, 128, 256, 512, 1024]\n\n\ndef gen_data(dt):\n arrays = {}\n\n if dt == np.float128:\n pg = './fftw_longdouble'\n elif dt ...
[ [ "numpy.savez" ], [ "numpy.sum", "numpy.min", "numpy.zeros" ], [ "sklearn.preprocessing.MaxAbsScaler", "numpy.isnan", "numpy.random.RandomState", "sklearn.preprocessing.StandardScaler", "sklearn.preprocessing.PowerTransformer", "sklearn.preprocessing.QuantileTransfor...
larsmans/astroML
[ "01ee67ea6e1c5a8dedc2498ec7397653d65b2c8d", "01ee67ea6e1c5a8dedc2498ec7397653d65b2c8d", "01ee67ea6e1c5a8dedc2498ec7397653d65b2c8d", "01ee67ea6e1c5a8dedc2498ec7397653d65b2c8d" ]
[ "book_figures/chapter3/fig_cauchy_median_mean.py", "book_figures/chapter5/fig_likelihood_gaussian.py", "book_figures/chapter5/fig_odds_ratio_coin.py", "book_figures/chapter5/fig_cauchy_mcmc.py" ]
[ "\"\"\"\nMedian and Mean for Cauchy distribution\n---------------------------------------\n\nThis plot shows graphically that mean-based statistics are not robust for\nthe Cauchy distribution. Median-based statistics should be used instead.\n\"\"\"\n# Author: Jake VanderPlas\n# License: BSD\n# The figure produce...
[ [ "scipy.stats.norm.pdf", "numpy.array", "numpy.random.seed", "numpy.median", "numpy.ones", "numpy.mean", "matplotlib.pyplot.figure", "numpy.std", "scipy.optimize.fmin", "scipy.stats.cauchy", "matplotlib.pyplot.show", "matplotlib.pyplot.NullFormatter" ], [ "ma...
aotuai/capsule-zoo
[ "bb0093799cf035a88153a9be6ed1e58df9923a8e" ]
[ "capsules/detector_text_openvino/backend.py" ]
[ "from typing import Dict, List, Any\n\nimport numpy as np\nimport cv2\n\nfrom vcap import (\n DetectionNode,\n DETECTION_NODE_TYPE,\n OPTION_TYPE,\n BaseStreamState,\n BaseBackend,\n rect_to_coords)\nfrom vcap_utils import (\n BaseOpenVINOBackend,\n)\n\nSOS_INDEX = 0\nEOS_INDEX = 1\nMAX_SEQ_LEN...
[ [ "numpy.reshape", "numpy.asarray", "numpy.zeros", "numpy.ones", "numpy.transpose", "numpy.argmax" ] ]
xupingxie/deep-learning-models
[ "cc76aedf9631317452f9cd7df38998e2de727816" ]
[ "NN_buildingblock/SingleNN.py" ]
[ "#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nSingle NN\n\n@author: xuping\n\"\"\"\nimport numpy as np\nimport scipy.io\n#from threeNN import sigmoid\n\ndef layer_sizes(X, Y):\n n_in = X.shape[0]\n n_out = Y.shape[0]\n return(n_in, n_out)\n\ndef initialize_parameters(dim):\n np.random.seed(3...
[ [ "numpy.square", "numpy.dot", "numpy.zeros", "numpy.random.seed", "numpy.sum", "numpy.random.randn" ] ]
infected-mushroom/catboost
[ "77a1ae1d5cf997b55c52658585ce0dd0196a9e43" ]
[ "catboost/python-package/catboost/utils.py" ]
[ "from .core import Pool, CatboostError, get_catboost_bin_module, ARRAY_TYPES\nfrom collections import defaultdict\nimport numpy as np\n\n_catboost = get_catboost_bin_module()\n_eval_metric_util = _catboost._eval_metric_util\n_get_roc_curve = _catboost._get_roc_curve\n_select_threshold = _catboost._select_threshold\...
[ [ "numpy.array" ] ]
pnposch/runpandas
[ "25388c18b52dfcc168e81922b8ba20ca93adad20" ]
[ "runpandas/tests/test_strava_parser.py" ]
[ "\"\"\"\nTest module for Strava API reader base module\n\"\"\"\n\nimport os\nimport json\nimport pytest\nfrom pandas import DataFrame, Timedelta, Timestamp\nfrom runpandas import read_strava\nfrom runpandas import types\nfrom stravalib.protocol import ApiV3\nfrom stravalib.client import Client\nfrom stravalib.model...
[ [ "pandas.Timestamp", "pandas.Timedelta" ] ]
hklion/WarpX
[ "3c2d0ee2815ab1df21b9f78d899fe7b1a9651758" ]
[ "Examples/Tests/particle_fields_diags/analysis_particle_diags_impl.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright 2019-2022 Luca Fedeli, Yinjian Zhao, Hannah Klion\n#\n# This file is part of WarpX.\n#\n# License: BSD-3-Clause-LBNL\n\n# This script tests the reduced particle diagnostics.\n# The setup is a uniform plasma with electrons, protons and photons.\n# Various particle and field qua...
[ [ "numpy.all", "numpy.where", "numpy.zeros" ] ]
rgerkin/psiz
[ "d540738462b6436a08a472d5e349ca2b813e6d47" ]
[ "examples/rank/mle_3g.py" ]
[ "# -*- coding: utf-8 -*-\n# Copyright 2020 The PsiZ Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2....
[ [ "numpy.empty", "scipy.stats.pearsonr", "tensorflow.keras.layers.Embedding", "tensorflow.keras.initializers.RandomNormal", "tensorflow.keras.losses.CategoricalCrossentropy", "numpy.argsort", "tensorflow.keras.metrics.CategoricalCrossentropy", "tensorflow.stack", "tensorflow.kera...
jsiloto/adaptive-cob
[ "eb38e3b52c4927e3ac0a897142ad26fbc4eb82de" ]
[ "src/mimic_fix.py" ]
[ "import argparse\nimport datetime\nimport time\n\nimport torch\nfrom torch import distributed as dist\nfrom torch.nn import DataParallel\nfrom torch.nn.parallel.distributed import DistributedDataParallel\n\nfrom distillation.tool import DistillationBox\nfrom models import load_ckpt, get_model, save_ckpt, set_bottle...
[ [ "torch.cuda.is_available" ] ]
iacChris/ROAR
[ "9404b41cd751bd3c5d644e80bf2f1d4ace392a58" ]
[ "Bridges/carla_bridge.py" ]
[ "import carla\nfrom carla import ColorConverter as cc\nfrom ROAR_Sim.carla_client.util.sensors import IMUSensor\nfrom Bridges.bridge import Bridge\nfrom typing import Union\nfrom ROAR.utilities_module.vehicle_models import (\n VehicleControl,\n Vehicle,\n)\nfrom ROAR.utilities_module.data_structures_models im...
[ [ "numpy.reshape", "numpy.dtype" ] ]
rgerum/saenopy
[ "18197afac266ef9f35c1c9c89c195db96dc782ab" ]
[ "docs/regularization.py" ]
[ "#!/usr/bin/env python\r\n# coding: utf-8\r\n\r\n\r\nfrom saenopy import Solver\r\n \r\n# initialize the object\r\nM = Solver()\r\n\r\nfrom saenopy.materials import SemiAffineFiberMaterial\r\n\r\n# provide a material model\r\nmaterial = SemiAffineFiberMaterial(1645, 0.0008, 1.0075, 0.033)\r\nM.setMaterialModel(m...
[ [ "numpy.array" ] ]
gmum/cwae
[ "50592903c321de25f339f3b00cbd2143741e5037" ]
[ "src/cw.py" ]
[ "import tensorflow as tf\nimport math as m\nfrom rec_errors import euclidean_norm_squared\n\n\ndef silverman_rule_of_thumb(N: int):\n return tf.pow(4/(3*N), 0.4)\n\n\ndef cw_1d(X, y=None):\n\n def N0(mean, variance):\n return 1.0/(tf.sqrt(2.0 * m.pi * variance)) * tf.exp((-(mean**2))/(2*variance))\n\n ...
[ [ "tensorflow.exp", "tensorflow.shape", "tensorflow.zeros", "tensorflow.minimum", "tensorflow.expand_dims", "tensorflow.ones", "tensorflow.sqrt", "tensorflow.maximum", "tensorflow.pow", "tensorflow.cast" ] ]
j2slab/MLStudio
[ "7d7c4b1073617968c28f0e496020e4720b552451", "7d7c4b1073617968c28f0e496020e4720b552451" ]
[ "tests/test_data_services/test_preprocessing.py", "MLStudio/supervised/algorithms/optimization/gradient_descent.py" ]
[ "# -*- coding:utf-8 -*-\n# =========================================================================== #\n# Project : MLStudio #\n# File : \\test_preprocessing.py #\n# Python : 3.8.3 ...
[ [ "numpy.sum", "numpy.random.choice", "numpy.unique" ], [ "numpy.linalg.norm", "numpy.random.RandomState" ] ]
RanganThaya/ggnn.pytorch.sparse
[ "66be8c87c8fec83bb02c8046203e7faa9de55f41" ]
[ "utils/train.py" ]
[ "import torch\nfrom torch.autograd import Variable\n\n\ndef train(epoch, dataloader, net, criterion, optimizer, opt):\n net.train()\n for i, (adj_matrix, annotation, target) in enumerate(dataloader, 0):\n net.zero_grad()\n\n padding = torch.zeros(len(annotation),\n o...
[ [ "torch.autograd.Variable", "torch.cat" ] ]
McCoyGroup/Coordinerds
[ "058a4f5b29f157e499cec3c8f2da8b216f0210ef" ]
[ "Psience/Molecools/CoordinateSystems.py" ]
[ "\"\"\"\nDefines useful extended internal coordinate frames\n\"\"\"\n\n\n\nimport numpy as np\nimport McUtils.Numputils as nput\nfrom McUtils.Coordinerds import (\n ZMatrixCoordinateSystem, CartesianCoordinateSystem, CoordinateSystemConverter,\n ZMatrixCoordinates, CartesianCoordinates3D, CoordinateSet, Coord...
[ [ "numpy.concatenate", "numpy.array", "numpy.linalg.norm", "numpy.dot", "numpy.zeros", "numpy.take", "numpy.allclose", "numpy.arange", "numpy.abs", "numpy.moveaxis", "numpy.broadcast_to" ] ]
Veos-Digital/hypergraph_machines
[ "0d24cd89766c45c6c1ffb2967438ef82288a5d3c" ]
[ "hypergraph_machines/examples/generate_figure.py" ]
[ "\"\"\"Trains a hypergraph machine on MNIST and generates Figure 1 panels b and c\nof Discrete and continuous learning machines\n\"\"\"\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom torchvision import datasets, transforms\nfrom torch.optim.lr_scheduler import StepLR\nfrom hypergraph_machi...
[ [ "torch.device", "matplotlib.pyplot.ion", "matplotlib.pyplot.subplots" ] ]
clappm/AdaptiveDecisionMaking_2018
[ "73de4945bdb5f839d6a041fe2bd9b25dcdaacf9d" ]
[ "ADMCode/snuz/ppo/storage.py" ]
[ "\"\"\"\nModified from \nhttps://github.com/ikostrikov/pytorch-a2c-ppo-acktr/blob/master/storage.py\n\"\"\"\n\nimport torch\nfrom torch.utils.data.sampler import BatchSampler\nfrom torch.utils.data.sampler import SubsetRandomSampler\n\n\nclass RolloutStorage(object):\n def __init__(self, num_steps, num_processes...
[ [ "torch.zeros", "torch.cat", "torch.randperm", "torch.ones", "torch.LongTensor" ] ]
ajupatatero/neurasim
[ "c1d3f8163a7389b06a13e453daa98ad5157d9b2e" ]
[ "util/unit_test/potential_test/cp_potential.py" ]
[ "import numpy as np\n\nimport matplotlib\nimport matplotlib.pyplot as plt\nfrom matplotlib.ticker import AutoMinorLocator, MultipleLocator, MaxNLocator\nfrom matplotlib.path import Path\nfrom matplotlib.patches import PathPatch\nfrom matplotlib.colors import BoundaryNorm\nimport matplotlib.image as mpimg\n\nUinf=1\...
[ [ "numpy.sin", "matplotlib.ticker.AutoMinorLocator", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots", "numpy.linspace" ] ]
alexbjorling/acquisition-framework
[ "4090381344aabca05155612845ba4e4a47455dc3" ]
[ "contrast/detectors/LC400Buffer.py" ]
[ "from .Detector import Detector\n\nimport time\nimport numpy as np\nimport PyTango\n\n\nclass LC400Buffer(Detector):\n \"\"\"\n Class representing the LC400 piezo machine under the\n control of the LC400ScanControl Tango device, used for\n reading the flyscan positions.\n \"\"\"\n\n def __init__(s...
[ [ "numpy.ones" ] ]
Exi666/MetPy
[ "c3cf8b9855e0ce7c14347e9d000fc3d531a18e1c" ]
[ "src/metpy/calc/tools.py" ]
[ "# Copyright (c) 2016,2017,2018,2019 MetPy Developers.\n# Distributed under the terms of the BSD 3-Clause License.\n# SPDX-License-Identifier: BSD-3-Clause\n\"\"\"Contains a collection of generally useful calculation tools.\"\"\"\nimport functools\nfrom operator import itemgetter\n\nimport numpy as np\nfrom numpy.c...
[ [ "scipy.spatial.cKDTree", "numpy.isclose", "numpy.exp", "numpy.min", "numpy.sign", "numpy.where", "numpy.broadcast_to", "numpy.empty", "numpy.log", "numpy.ma.asarray", "numpy.nanmin", "numpy.append", "numpy.nanmax", "numpy.array", "numpy.round", "nump...
iDataAstro/MNIST_CLASSIFICATION
[ "a1114f9f990be13f76ba77ddc1e9afd894c7c101" ]
[ "src/utils/model.py" ]
[ "import tensorflow as tf\nfrom tensorflow.keras.models import Model\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nimport os\nimport logging\n\nfrom .common import create_directories\n\n\ndef get_prepared_model(stage: str, no_classes: int, input_shape: list, loss: str, optimizer: str, metrics: list) -> \\...
[ [ "tensorflow.keras.callbacks.TensorBoard", "tensorflow.keras.layers.Flatten", "matplotlib.pyplot.grid", "matplotlib.pyplot.savefig", "tensorflow.keras.layers.Activation", "pandas.DataFrame", "tensorflow.keras.callbacks.ModelCheckpoint", "tensorflow.keras.layers.Dense", "tensorfl...
saugatkandel/cvnn
[ "f6d7b5c17fd064a7eaa60e7af922914a974eb69a" ]
[ "cvnn/montecarlo.py" ]
[ "import logging\nimport os\nimport json\nimport tensorflow as tf\nimport pandas as pd\nimport numpy as np\nfrom tqdm import tqdm\nimport datetime\nfrom pdb import set_trace\nfrom time import sleep\nfrom openpyxl import load_workbook, Workbook\nfrom openpyxl.worksheet.table import Table\nfrom tensorflow.keras.losses...
[ [ "tensorflow.keras.callbacks.TensorBoard", "numpy.array", "tensorflow.keras.optimizers.serialize", "pandas.DataFrame", "tensorflow.keras.Sequential", "tensorflow.dtypes.as_dtype", "tensorflow.keras.losses.serialize", "tensorflow.keras.losses.CategoricalCrossentropy", "tensorflow...
Farzanehkaji/MINet
[ "cc2852cb2b3b20208f5edf38ec6952363a9b04a7" ]
[ "code/utils/metric.py" ]
[ "# -*- coding: utf-8 -*-\n# @Time : 2019/7/18 上午9:54\n# @Author : Lart Pang\n# @FileName: metric.py\n# @Project : MINet\n# @GitHub : https://github.com/lartpang\n\nimport numpy as np\n\n\ndef cal_pr_mae_meanf(prediction, gt):\n assert prediction.dtype == np.uint8\n assert gt.dtype == np.uint8\n assert...
[ [ "numpy.sum", "numpy.zeros_like", "numpy.reshape", "numpy.abs" ] ]
alexji/turbopy
[ "b48360451b0f4a2725117c77a23367283c6326c1" ]
[ "turbopy/interp_marcs/testmies.py" ]
[ "from interp_marcs_alpha_v6 import interp_marcs\nimport numpy as np\nimport time\n\ninput_model_path='/project2/alexji/MARCS'\noutput_model_path='test-MARCS'\n\nteff_arr = [3200,3300,3400,3500,3600,3700,3800,3900,4000,4250,4500,4750,\n 5000]\nlogg_arr = np.arange(0., 5.5, 0.5)\nfeh_arr = np.arange(-4., 1...
[ [ "numpy.arange" ] ]
olaals/masteroppgave2
[ "9fc181325b6e3ef74d81cdb323d3e47a79bb889e", "9fc181325b6e3ef74d81cdb323d3e47a79bb889e", "9fc181325b6e3ef74d81cdb323d3e47a79bb889e" ]
[ "machine-learning/ml-projects/test-transforms/models/models/model_bn.py", "report/renders/3-method/systems/system-laser-scanner/blender_script.py", "machine-learning/ml-projects/locally-connected/models/models/local.py" ]
[ "import torch\nimport torch.nn as nn\n\n\nclass CustomModel(nn.Module):\n def __init__(self):\n super().__init__()\n\n self.stage1_block = nn.Sequential(\n nn.Conv2d(\n in_channels=3,\n out_channels=64,\n kernel_size=3,\n stride...
[ [ "torch.nn.ReLU", "torch.nn.Conv2d", "torch.nn.BatchNorm2d", "torch.nn.Flatten" ], [ "numpy.arctan" ], [ "torch.nn.modules.utils._pair", "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.nn.ConstantPad2d", "torch.nn.Conv2d", "torch.randn", "torch.nn.Flatten" ...
asd17539/I3D-Tensorflow
[ "9ee3295f06b8d6c37dc5e146b2cdb756ef725268" ]
[ "experiments/ucf-101/data_list/gen_train_list.py" ]
[ "import os\nimport math\nimport numpy as np\n\n\nroot_path = '/home/project/I3D/data/Kinetics/train_256'\nnum_frames = 16\ndata_list = []\nid_list = []\nlabel_list = []\nerro_data = []\nlabel = 0\nid = 0\n\nfor file_path in sorted(os.listdir(root_path)):\n for video_path in sorted(os.listdir(os.path.join(root_pa...
[ [ "numpy.save" ] ]
DanielPolatajko/pennylane
[ "d603e810a4d34d727a436d852c540fdc0fe21a85", "d603e810a4d34d727a436d852c540fdc0fe21a85" ]
[ "pennylane/operation.py", "tests/test_qubit_device.py" ]
[ "# Copyright 2018-2020 Xanadu Quantum 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/LICENSE-2.0\n\n# Unless required by ap...
[ [ "numpy.array", "numpy.sin", "numpy.linalg.multi_dot", "numpy.zeros", "numpy.eye", "numpy.linalg.inv", "numpy.kron" ], [ "numpy.array", "numpy.random.choice", "numpy.allclose", "numpy.arange", "numpy.all" ] ]
syelman/DRDM-Count
[ "47b43b64d7f536995bf4cbc44318b3108a5f2aff" ]
[ "losses/bregman_pytorch.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nRewrite ot.bregman.sinkhorn in Python Optimal Transport (https://pythonot.github.io/_modules/ot/bregman.html#sinkhorn)\nusing pytorch operations.\nBregman projections for regularized OT (Sinkhorn distance).\n\"\"\"\n\nimport torch\n\nM_EPS = 1e-16\n\n\ndef sinkhorn(a, b, C, reg=1e-...
[ [ "torch.zeros", "torch.isnan", "torch.add", "torch.ones", "torch.isinf", "torch.div", "torch.log", "torch.empty", "torch.matmul", "torch.exp", "torch.sum" ] ]
chummels/yt
[ "19058425e92c2d310b7e767d3ca90fb3559b6a36" ]
[ "yt/data_objects/selection_objects/cut_region.py" ]
[ "import numpy as np\n\nfrom yt.data_objects.selection_objects.data_selection_objects import (\n YTSelectionContainer,\n YTSelectionContainer3D,\n)\nfrom yt.data_objects.static_output import Dataset\nfrom yt.funcs import ensure_list, validate_iterable, validate_object\nfrom yt.geometry.selection_routines impor...
[ [ "numpy.zeros", "numpy.logical_and", "numpy.any", "numpy.stack", "numpy.abs", "numpy.isfinite", "numpy.all" ] ]
slaclab/atlas-chess2
[ "2135a79e1b43bb404abc50aeabe50e577242aa45" ]
[ "software/scripts/SCurveNP_8hits_BL_json3.py" ]
[ "####import ROOT as R\nimport numpy as np\nimport matplotlib #.pyplot as plt\nimport sys\nimport time\nimport re\nimport logging\nimport pickle\nimport json\n#import cPickle as pickle\nimport scipy.io as sio\n# Generating log file\nclass timep:\n def __init__(self,pixel1,matrix1,index1,threshold1,time1):\n ...
[ [ "numpy.loadtxt", "numpy.arange" ] ]
adriaan16/brainstorm
[ "568603cb99f412476a3712d127dc3bc95f08fa35" ]
[ "ext/neuron/neuron/generators.py" ]
[ "\"\"\" generators for the neuron project \"\"\"\n\n# general imports\nimport sys\nimport os\nimport zipfile\n\n# third party imports\nimport numpy as np\nimport nibabel as nib\nimport scipy\nimport keras\nfrom keras.utils import np_utils \nfrom keras.models import Model\n\n# local packages\nimport pynd.ndutils as ...
[ [ "numpy.load", "numpy.random.random", "numpy.max", "numpy.lib.format.read_magic", "numpy.transpose", "numpy.random.randint", "numpy.isfinite", "numpy.ndim", "numpy.arange", "numpy.expand_dims", "numpy.vstack", "numpy.mod", "numpy.array", "numpy.reshape", ...
136823xuewei/gait-recognition
[ "03e2c8d5660018897a5fa277470b839bdd9df4be" ]
[ "classification/casiab_performance.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom matplotlib import pyplot as plt\nimport tensorflow as tf\nimport seaborn as sb\nimport pandas as pd\nimport numpy as np\nimport math\nimport time\nimport cv2\nimport os\n\n\ntf.reset_default_graph()...
[ [ "tensorflow.contrib.layers.batch_norm", "tensorflow.nn.conv2d", "tensorflow.contrib.layers.xavier_initializer", "tensorflow.matmul", "tensorflow.reshape", "tensorflow.global_variables_initializer", "tensorflow.random_normal", "tensorflow.train.Saver", "tensorflow.ConfigProto", ...
WildMeOrg/wildbook-ia
[ "ac433d4f2a47b1d905c421a36c497f787003afc3" ]
[ "wbia/expt/test_result.py" ]
[ "# -*- coding: utf-8 -*-\n# TODO: find unused functions and kill them\nimport logging\nimport copy\nimport operator\nimport utool as ut\nimport vtool as vt\nimport numpy as np\nimport itertools as it\nfrom functools import partial, reduce\nfrom wbia.expt import cfghelpers\nfrom wbia.expt import experiment_helpers\n...
[ [ "numpy.tile", "numpy.mean", "numpy.where", "numpy.cumsum", "numpy.histogram", "numpy.full", "numpy.nan_to_num", "numpy.log", "numpy.nonzero", "numpy.logical_and", "numpy.take", "numpy.arange", "numpy.isfinite", "numpy.in1d", "numpy.nanmax", "numpy.vs...
garthee/gnot
[ "ac698c5cce0e2ebb77dd84c5d050417b735f5fbf" ]
[ "modules/ml_kmeans.py" ]
[ "import re\nimport json\nfrom math import log, sqrt\n\nfrom jinja2 import Markup\nfrom sklearn import cluster\nfrom sklearn.decomposition import PCA\nfrom scipy import stats\nfrom sklearn import metrics\nimport numpy\n\nfrom db import export_sql\nfrom werkzeug.wrappers import Response\n\n# create higher order trans...
[ [ "scipy.stats.zscore", "numpy.array", "sklearn.cluster.KMeans", "sklearn.decomposition.PCA" ] ]
kovibalu/face.evoLVe.PyTorch
[ "b7483bd05efc637f58d40e3b2c5f3421d52f1aae" ]
[ "test_video_stream.py" ]
[ "import argparse\nimport glob\nimport os\nimport time\nimport vlc\n\nimport cv2\nimport numpy as np\nfrom enum import Enum\nfrom tqdm import tqdm\nfrom PIL import Image, ImageDraw, ImageFont\n\nfrom align.align_trans import get_reference_facial_points\nfrom align.detector import load_detect_faces_models, process_fa...
[ [ "numpy.array", "numpy.linalg.norm", "numpy.load", "numpy.mean", "numpy.finfo" ] ]
skn047/DeepLearningMugenKnock
[ "73d2b903816b380d56020c8336041883bc0d131c", "73d2b903816b380d56020c8336041883bc0d131c" ]
[ "Question_semaseg/my_answers/bin_loss_pytorch.py", "Question_semaseg/answers/transposeconv_tensorflow_slim.py" ]
[ "import torch\nimport torch.nn.functional as F\nimport argparse\nimport cv2\nimport numpy as np\nfrom glob import glob\nimport matplotlib.pyplot as plt\n\nnum_classes = 2\nimg_height, img_width = 64, 64#572, 572\nout_height, out_width = 64, 64#388, 388\nGPU = False\ntorch.manual_seed(0)\n\n\nclass Mynet(torch.nn.Mo...
[ [ "torch.nn.Sequential", "torch.nn.BatchNorm2d", "torch.manual_seed", "torch.nn.ReLU", "torch.nn.Conv2d" ], [ "tensorflow.contrib.slim.max_pool2d", "tensorflow.reshape", "numpy.where", "tensorflow.nn.softmax", "tensorflow.global_variables_initializer", "tensorflow.cas...
ancago/search-download-favicons-from-web
[ "c41c29940f94a52fc22248b62dade7e34b742ef6" ]
[ "A01_WEB_BROWSER_get_Official_WWWs_create_COM_domain.py" ]
[ "import pandas as pd\r\nimport time\r\nfrom google import google\r\nimport sys\r\nfrom A00_File_name import file_name\r\n\r\n\r\nfile_df = pd.read_csv(file_name, sep=';', encoding='latin-1')\r\nprint(file_df.head())\r\n\r\nbrand_names_list = file_df['Official Chain Name'].tolist()\r\n\r\n\r\n'''\r\ncreate a column ...
[ [ "pandas.read_csv" ] ]
kmaasrud/vmc
[ "1d29f18a4cb08ed65ab531a174f1869748f5ac2a" ]
[ "vmc/result_analysis/E_vs_MCs.py" ]
[ "import os\nimport matplotlib.pyplot as plt\nplt.style.use(\"seaborn\")\nimport numpy as np\nfrom lib.utils import read_csv, find_cargo_root\nfrom lib.blocking import block\n\ndata_folder = os.path.join(find_cargo_root(), \"data\")\nsave_folder = os.path.join(os.path.dirname(find_cargo_root()), \"report\", \"assets...
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.legend", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.style.use", "matplotlib.pyplot.show" ] ]
coodest/GAug
[ "ef6ab307e3dfd3e9e0a653d385dc1f41963f9ba8" ]
[ "vgae/utils.py" ]
[ "import time\nimport copy\nimport pickle\nimport warnings\nimport numpy as np\nimport scipy.sparse as sp\nimport torch\nimport torch.nn.functional as F\nfrom sklearn.metrics import roc_auc_score, average_precision_score, precision_recall_curve, auc\n\ndef sparse_to_tuple(sparse_mx):\n if not sp.isspmatrix_coo(sp...
[ [ "torch.nn.functional.binary_cross_entropy_with_logits", "torch.sigmoid", "numpy.nan_to_num", "numpy.fill_diagonal", "sklearn.metrics.precision_recall_curve", "torch.no_grad", "sklearn.metrics.average_precision_score", "sklearn.metrics.auc", "numpy.argmax", "numpy.hstack", ...
Darkar25/HyperGAN
[ "3153daee838dbb8e8d8926b1e81419682a24f2fe", "3153daee838dbb8e8d8926b1e81419682a24f2fe", "3153daee838dbb8e8d8926b1e81419682a24f2fe" ]
[ "hypergan/trainers/experimental/evolution_trainer.py", "hypergan/gans/distribution_filtering_gan.py", "hypergan/multi_component.py" ]
[ "import tensorflow as tf\nimport numpy as np\nimport hyperchamber as hc\nimport inspect\n\nfrom hypergan.trainers.base_trainer import BaseTrainer\n\nTINY = 1e-12\n\nclass EvolutionTrainer(BaseTrainer):\n def _create(self):\n gan = self.gan\n generator = self.gan.generator\n config = self.con...
[ [ "tensorflow.abs", "tensorflow.assign", "tensorflow.group", "tensorflow.gradients", "tensorflow.nn.sigmoid", "tensorflow.reduce_mean" ], [ "tensorflow.minimum", "tensorflow.concat", "tensorflow.reshape", "tensorflow.device", "tensorflow.maximum", "tensorflow.glob...
qwerlarlgus/YOLO_Project1
[ "27e7b325439e59c8cf0ee9d6cdfd802a4de6c7d4" ]
[ "contours.py" ]
[ "import sys\nimport random\nimport numpy as np\nimport cv2\n\nsrc = cv2.imread('vlcsnap-2021-02-04-10h00m02s260.png')\n#src = cv2.imread('2_11_11.png')\n\nif src is None:\n print('Image load failed!')\n sys.exit()\n\nsrc = cv2.resize(src, (0, 0), fx=0.5, fy=0.5)\nsrc_gray = cv2.cvtColor(src, cv2.COLOR_BGR2GRA...
[ [ "numpy.zeros" ] ]
MarcWong/PointMVSNet
[ "b48f20f3695eb4418f522daedb60e7329eebf05f" ]
[ "pointmvsnet/utils/preprocess.py" ]
[ "import numpy as np\nimport cv2\nimport math\n\n\ndef norm_image(img):\n \"\"\" normalize image input \"\"\"\n img = img.astype(np.float32)\n var = np.var(img, axis=(0, 1), keepdims=True)\n mean = np.mean(img, axis=(0, 1), keepdims=True)\n return (img - mean) / (np.sqrt(var) + 1e-7)\n\n\ndef mask_dep...
[ [ "numpy.copy", "numpy.mean", "numpy.sqrt", "numpy.var", "numpy.expand_dims" ] ]
shimakaze-git/football-data-analysis
[ "12c45e9888436dba71418867512fecddd4683f31" ]
[ "playstyle_similar/playstyle_similar2.py" ]
[ "import pandas as pd\nimport numpy as np\n\nfrom scipy import stats\n\n\ndef columns_views(player_1_df, player_2_df):\n\n columns = list(player_1_df.columns)\n if list(player_1_df.columns) == list(player_2_df.columns):\n columns = list(player_1_df.columns)\n\n player_1 = list(player_1_df.values[...
[ [ "scipy.stats.kendalltau", "numpy.dot", "numpy.linalg.norm", "scipy.stats.spearmanr", "scipy.stats.pearsonr", "numpy.power", "pandas.read_csv" ] ]
reubenjohn/sandblox
[ "0b7917eb866ddbc4749a098884046d4ebb441985" ]
[ "sandblox/util/scope.py" ]
[ "from typing import Any\n\nimport tensorflow as tf\n\nfrom .tf_util import scope_name as get_scope_name\n\n\ndef absolute_scope_name(relative_scope_name):\n\t\"\"\"Appends parent scope name to `relative_scope_name`\"\"\"\n\tbase = get_scope_name()\n\tif len(base) > 0:\n\t\tbase += '/'\n\treturn base + relative_scop...
[ [ "tensorflow.get_default_graph" ] ]
yingchaolu/PROBLEM
[ "aedf8d50276be3074f3035f7ee28c8d679ebb416" ]
[ "problem/deflect.py" ]
[ "\"\"\"\nTakes the gradients of the solution to the screen mapping potential problem and\nreconstructs the perpendicular deflection field.\n\"\"\"\n\nimport numpy as np\nimport scipy as sp\nimport scipy.interpolate\nimport scipy.misc\nimport scipy.ndimage\n\nfrom .constants import M_PROTON_G, ESU, C_CMS\n\ndef reco...
[ [ "numpy.max", "numpy.histogram2d", "numpy.copy", "numpy.min", "scipy.interpolate.interpn", "numpy.diff", "numpy.random.uniform", "numpy.stack", "numpy.sqrt", "numpy.append", "numpy.linspace", "scipy.interpolate.RegularGridInterpolator", "numpy.meshgrid" ] ]
abhineet123/animal_detection_
[ "be0dd60d2b56b267f329b7be71d7f037499f98bc", "be0dd60d2b56b267f329b7be71d7f037499f98bc", "be0dd60d2b56b267f329b7be71d7f037499f98bc", "be0dd60d2b56b267f329b7be71d7f037499f98bc" ]
[ "tf_api/core/box_predictor_test.py", "tf_api/core/keypoint_ops_test.py", "tf_api/_train.py", "tf_api/core/losses_test.py" ]
[ "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.shape", "numpy.random.rand", "tensorflow.random_uniform", "tensorflow.placeholder", "tensorflow.test.main", "tensorflow.global_variables_initializer", "tensorflow.random_normal" ], [ "tensorflow.constant", "tensorflow.test.main" ], [ "tensorflow.app.run"...
TangleSpace/pytorch-widedeep
[ "ccc55a15c1b3205ffc8c054abc5cd25cba9ccdff", "ccc55a15c1b3205ffc8c054abc5cd25cba9ccdff", "ccc55a15c1b3205ffc8c054abc5cd25cba9ccdff", "ccc55a15c1b3205ffc8c054abc5cd25cba9ccdff", "ccc55a15c1b3205ffc8c054abc5cd25cba9ccdff" ]
[ "pytorch_widedeep/models/tabular/transformers/saint.py", "pytorch_widedeep/models/text/stacked_attentive_rnn.py", "pytorch_widedeep/models/tabular/transformers/_encoders.py", "tests/test_model_components/test_mc_tab_mlp.py", "pytorch_widedeep/models/tabular/tabnet/tab_net.py" ]
[ "from torch import nn\n\nfrom pytorch_widedeep.wdtypes import * # noqa: F403\nfrom pytorch_widedeep.models.tabular.mlp._layers import MLP\nfrom pytorch_widedeep.models.tabular._base_tabular_model import (\n BaseTabularModelWithAttention,\n)\nfrom pytorch_widedeep.models.tabular.transformers._encoders import Sai...
[ [ "torch.nn.Sequential" ], [ "torch.nn.Linear", "torch.nn.Identity", "torch.nn.LSTM", "torch.nn.GRU", "torch.nn.ModuleList", "torch.tensor", "torch.Tensor", "torch.nn.Embedding" ], [ "torch.nn.Dropout", "torch.nn.LayerNorm" ], [ "torch.Size", "numpy.ra...
dczifra/lightly
[ "d8bff271c6951da5b1b28c5d4c31ceba41aead80" ]
[ "docs/source/getting_started/benchmarks/cifar10_benchmark.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nBenchmark Results\n\nUpdated: 18.02.2022 (6618fa3c36b0c9f3a9d7a21bcdb00bf4fd258ee8))\n\n------------------------------------------------------------------------------------------\n| Model | Batch Size | Epochs | KNN Test Accuracy | Time | Peak GPU Usage |\n----------...
[ [ "torch.nn.functional.normalize", "numpy.array", "torch.cuda.reset_peak_memory_stats", "torch.optim.lr_scheduler.CosineAnnealingLR", "torch.cuda.max_memory_allocated", "torch.optim.SGD", "torch.nn.ReLU", "torch.cuda.empty_cache", "torch.cuda.is_available", "torch.nn.BatchNor...
calispac/cta-lstchain
[ "83c7058a291c55f5841e984b99f22ac49e759d0f" ]
[ "lstchain/image/pdf.py" ]
[ "import numpy as np\n\n\ndef log_gaussian(x, mean, sigma):\n \"\"\"\n Computes the log-probability of X=x for a Gaussian of mean=mean and sigma=sigma\n Parameters\n ----------\n x\n mean\n sigma\n\n Returns\n -------\n\n \"\"\"\n\n log_pdf = -(x - mean) ** 2 / (2 * sigma ** 2)\n ...
[ [ "numpy.sin", "numpy.sqrt", "numpy.log", "numpy.cos" ] ]
cpfpengfei/deepchem
[ "a3d827ddeaa181157237894abe5055e200cfd27e" ]
[ "deepchem/utils/test/test_molecule_graph.py" ]
[ "import unittest\nimport pytest\nimport numpy as np\nfrom deepchem.utils.molecule_graph import MoleculeGraphData, BatchMoleculeGraphData\n\n\nclass TestMoleculeGraph(unittest.TestCase):\n\n def test_molecule_graph_data(self):\n num_nodes, num_node_features = 4, 32\n num_edges, num_edge_features = 6, 32\n ...
[ [ "numpy.array", "numpy.random.random_sample" ] ]
gizatt/pose_estimation_segmentation_analysis
[ "5356fd85a01aff5b2284126f7349d9fc7f33c4b6" ]
[ "src/utils.py" ]
[ "import numpy as np\nimport os\nfrom sklearn.neighbors import NearestNeighbors\n\nfrom pydrake.multibody.rigid_body import RigidBody\nfrom pydrake.all import (\n AddFlatTerrainToWorld,\n AddModelInstancesFromSdfString,\n AddModelInstanceFromUrdfFile,\n FindResourceOrThrow,\n Float...
[ [ "numpy.array", "numpy.linalg.norm", "numpy.savetxt", "numpy.zeros", "numpy.mean", "numpy.eye", "numpy.loadtxt", "numpy.diag", "numpy.vstack", "numpy.hstack", "sklearn.neighbors.NearestNeighbors", "numpy.cross" ] ]
mbchang/societal-decision-making
[ "23fd6de4df33f985d360330a9d5a2c29faeb8e52" ]
[ "starter_code/modules/value_function.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom starter_code.modules.networks import MLP, MinigridCNN\nfrom mnist.embedded_mnist import MNIST_CNN\n\nclass SimpleValueFn(nn.Module):\n def __init__(self, state_dim, hdim):\n super(SimpleValueFn, self).__init__()\n self.va...
[ [ "torch.nn.Linear" ] ]
youngmg1995/NES-Music-Maker
[ "aeda10a541cfd439cfa46c45e63411e0d98e41c1" ]
[ "VAE/full_model/model_training.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Apr 1 17:14:19 2020\n\n@author: Mitchell\n\nmodel_training.py\n~~~~~~~~~~~~~~~~~\nThis file serves as a script for building and training our VAE model. To do\nso we used the VAE and DataSequence classes defined in the file `VAE.py`, as\nwell as helper functions from...
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "tensorflow.TensorShape", "matplotlib.pyplot.figure", "tensorflow.keras.callbacks.LearningRateScheduler", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show", "tens...
aaronchen0316/flare
[ "47a2a89af635dfec6b41a873625ac2411da14ebb", "47a2a89af635dfec6b41a873625ac2411da14ebb" ]
[ "tests/test_mgp.py", "flare/mgp/splines_methods.py" ]
[ "import numpy as np\nimport os\nimport pickle\nimport pytest\nimport re\nimport time\nimport shutil\n\nfrom copy import deepcopy\nfrom numpy import allclose, isclose\n\nfrom flare import struc, env, gp\nfrom flare.parameters import Parameters\nfrom flare.mgp import MappedGaussianProcess\nfrom flare.lammps import la...
[ [ "numpy.array", "numpy.isclose", "numpy.random.seed", "numpy.sum", "numpy.eye", "numpy.allclose", "numpy.abs" ], [ "numpy.array", "numpy.empty", "numpy.reshape", "numpy.isfinite", "numpy.linalg.svd", "numpy.atleast_2d" ] ]
csala/SDGym
[ "1e5177a67e897dd097e21aa3e81aad708330c38f" ]
[ "sdgym/benchmark.py" ]
[ "import logging\nimport os\nimport types\nfrom datetime import datetime\n\nimport pandas as pd\n\nfrom sdgym.data import load_dataset\nfrom sdgym.evaluate import compute_scores\nfrom sdgym.synthesizers import BaseSynthesizer\n\nLOGGER = logging.getLogger(__name__)\n\nBASE_DIR = os.path.dirname(__file__)\nLEADERBOAR...
[ [ "pandas.DataFrame", "pandas.read_csv", "pandas.concat" ] ]
lkorczowski/cleandata
[ "dadfc2768c3b980ab0e4871ebd86eaeeb4b7eaaf" ]
[ "notebooks/template_preprocessing_columns.py" ]
[ "import pandas as pd\nfrom utils.config import Config\nimport numpy as np\nimport pandas as pd\n\n\ndef fun_clean_categogy1(array, keyw1, index, BOW):\n compty = 0\n c = 0\n for elm in array:\n if elm == \"oui\" or elm == \"parfois\":\n BOW[c].append(keyw1[index])\n compty += 1...
[ [ "pandas.DataFrame", "pandas.read_csv" ] ]
GBruening/succes_predictor
[ "ae60bdf4e7c21228d35411f7e1527b78f34dd7ad" ]
[ "Pulling data/apiv2_pull.py" ]
[ "#%% First\nimport numpy as np\nimport json\nimport os\nimport pandas as pd\nimport requests\nfrom contextlib import closing\nimport time\nfrom datetime import datetime\nfrom requests.models import HTTPBasicAuth\nimport seaborn as sns\nfrom matplotlib import pyplot as plt\nfrom requests import get\nfrom requests_fu...
[ [ "pandas.DataFrame", "numpy.mean", "numpy.unique" ] ]
Monika199211/olympics-data-analysis
[ "bfd0d1ff2b2283d838314754ff21cdd753ae0fb3" ]
[ "code.py" ]
[ "# --------------\n#Importing header files\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n#Path of the file is stored in the variable path\ndata=pd.read_csv(path)\n#Code starts here\ndata.rename(columns={'Total':'Total_Medals'},inplace=True)\n# Data Loading \ndata['Better_Event'] = np....
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.figure", "numpy.where", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show", "pandas.read_csv", "matplotlib.pyplot.bar", "matplotlib.pyplot.xticks" ] ]
iBobbyTS/Colab-DAIN
[ "29469e64db5d45e824def45769a2d7c7b72c431c" ]
[ "my_package/Interpolation/setup.py" ]
[ "#!/content/Python/bin/python3.6\nimport os\nimport torch\n\nfrom setuptools import setup, find_packages\nfrom torch.utils.cpp_extension import BuildExtension, CUDAExtension\n\nfrom compiler_args import nvcc_args, cxx_args\n\nsetup(\n name='interpolation_cuda',\n ext_modules=[\n CUDAExtension('interpol...
[ [ "torch.utils.cpp_extension.CUDAExtension" ] ]
bartdavids/machine-learning-and-simulation
[ "4a4ca74e2252fa8311112e38b46ed46da3c105e2" ]
[ "english/simulation_scripts/D3Q19_lattice_boltzmann_method_python_jax.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nAdjustment from the 2D version from Machine Learning & Simulation code and video:\n https://www.youtube.com/watch?v=ZUXmO4hu-20&list=LL&index=1&ab_channel=MachineLearning%26Simulation\n https://github.com/Ceyron/machine-learning-and-simulation/blob/main/english/simulation_scr...
[ [ "matplotlib.pyplot.axis", "matplotlib.pyplot.show", "matplotlib.pyplot.figure", "matplotlib.pyplot.imshow" ] ]
cmoestl/heliocats
[ "5e2b054990319e14859669561a361cc0c7ca4295" ]
[ "sircat.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# ## sircat\n# \n# Makes a catalog of solar wind stream interaction regions (SIRs) and high speed solar wind streams (HSS) for the Wind, STEREO and MAVEN spacecraft since 2007.\n# \n# Authors: [C. Möstl](https://www.iwf.oeaw.ac.at/en/user-site/christian-moestl/) (twitter @...
[ [ "numpy.array", "pandas.DataFrame", "pandas.read_excel", "numpy.where", "numpy.loadtxt", "numpy.arange", "numpy.size", "numpy.hstack", "pandas.read_csv", "matplotlib.dates.date2num" ] ]
John-ye666/Python-for-Finance-Second-Edition
[ "dabef09bcdd7b0ec2934774741bd0a7e1950de73", "dabef09bcdd7b0ec2934774741bd0a7e1950de73", "dabef09bcdd7b0ec2934774741bd0a7e1950de73", "dabef09bcdd7b0ec2934774741bd0a7e1950de73", "dabef09bcdd7b0ec2934774741bd0a7e1950de73" ]
[ "Chapter09/c9_01_optimize.py", "Chapter08/c8_01_first_one.py", "Chapter13/c13_99_03_geneerate5year.py", "Chapter08/c8_28_52_week_high.py", "Chapter01/c1_20_matrix_dot_product.py" ]
[ "\"\"\"\n Name : c9_01_optimize.py\n Book : Python for Finance (2nd ed.)\n Publisher: Packt Publishing Ltd. \n Author : Yuxing Yan\n Date : 6/6/2017\n email : yany@canisius.edu\n paulyxy@hotmail.com\n\"\"\"\n\nfrom scipy.optimize import minimize\ndef myFunction(x):\n return (3....
[ [ "scipy.optimize.minimize" ], [ "pandas.date_range", "scipy.random.normal" ], [ "pandas.read_csv" ], [ "matplotlib.finance.quotes_historical_yahoo_ochl" ], [ "numpy.array", "numpy.dot" ] ]
thispl/tpl-hrpro
[ "3e0e7b16e4e2553490380a29c72bf59a061433a2" ]
[ "hrpro/hrpro/report/continuous_absent_report/continuous_absent_report.py" ]
[ "# Copyright (c) 2013, TeamPRO and contributors\n# For license information, please see license.txt\n\nfrom __future__ import unicode_literals\nfrom six.moves import range\nfrom six import string_types\nimport frappe\nimport json\nfrom frappe.utils import (getdate, cint, add_months, date_diff, add_days,\n\tnowdate, ...
[ [ "pandas.date_range" ] ]
zeinabhakimi/code
[ "68a6e9195ee99a4ee3a2a1a3e47fa5f75c937791" ]
[ "data_helpers.py" ]
[ "import csv\nimport numpy as np\nimport re\nimport itertools\n\nfrom collections import Counter\nfrom collections import namedtuple\n\n\nDataPoint = namedtuple('DataPoint', ['PhraseId', 'SentenceId', 'Phrase', 'Sentiment'])\n\n\ndef load_datapoints(data_file):\n datapoints = []\n with open(data_file) as f:\n ...
[ [ "numpy.array", "numpy.arange" ] ]
virkt25/adversarial-robustness-toolbox
[ "3cfa6de196cb32a3efafab2ff6bbf44247c9ddbd", "3cfa6de196cb32a3efafab2ff6bbf44247c9ddbd", "3cfa6de196cb32a3efafab2ff6bbf44247c9ddbd" ]
[ "tests/attacks/test_virtual_adversarial.py", "mlops/kubeflow/robustness_evaluation_fgsm_pytorch/src/robustness.py", "tests/wrappers/test_wrapper.py" ]
[ "# MIT License\n#\n# Copyright (C) IBM Corporation 2018\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the\n# rights to use, copy, ...
[ [ "numpy.swapaxes", "numpy.argmax", "numpy.abs" ], [ "torch.cuda.is_available", "numpy.load", "torch.nn.CrossEntropyLoss", "torch.load" ], [ "numpy.sum", "numpy.array", "numpy.random.randint" ] ]
kiritowu/Deep-Learning
[ "baaec55a3b32f9e02ca3d834f1408f6736bdc170" ]
[ "RL/Snake-DQN/model/dqn_engineered.py" ]
[ "import random\nfrom typing import List, Optional, Tuple\n\nimport numpy as np\nimport gym\nimport wandb\n\nimport matplotlib.pyplot as plt\nimport tensorflow as tf\nfrom tensorflow.keras import Sequential, Input, Model\nfrom tensorflow.keras.layers import Dense, Conv2D, Flatten, Concatenate\nfrom tensorflow.keras....
[ [ "numpy.concatenate", "numpy.random.rand", "tensorflow.expand_dims", "tensorflow.keras.layers.Flatten", "numpy.mean", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.Model", "numpy.argmax", "tensorflow.keras.models.clone_model", "tens...
lisadunlap/ray
[ "882ae976683f58e8f77ccb59973e2a987623eb63" ]
[ "rllib/policy/dynamic_tf_policy.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom collections import OrderedDict\nimport logging\nimport numpy as np\n\nfrom ray.rllib.policy.policy import Policy\nfrom ray.rllib.policy.sample_batch import SampleBatch\nfrom ray.rllib.policy.tf_po...
[ [ "numpy.expand_dims", "numpy.array", "numpy.zeros" ] ]
seedlit/ahn3-downloader
[ "c08d810abf03e5ecee3c9eb3827afc1665995c24" ]
[ "download_ahn3_elevation_data.py" ]
[ "# this script finds all the intersecting tiles for a given input AOI, and then downloads corresponding\n# 0.5 meter AHN3 DSM and DTM tiles\n\n\nfrom shapely.geometry import Polygon\nimport geopandas as gpd\nimport pandas as pd\nfrom tqdm import tqdm\nfrom multiprocessing import Pool\nimport urllib.request\nimport ...
[ [ "pandas.read_csv" ] ]
kozodoi/pet_pawpularity
[ "fc47dce315cf5ebf10e1d501595d917d0ff062b9" ]
[ "code/run_inference.py" ]
[ "from utilities import *\nfrom model import get_model\nfrom data import get_data, get_loaders\nfrom augmentations import get_augs\nfrom test_epoch import test_epoch\n\nimport gc\nimport neptune\nfrom accelerate import Accelerator, DistributedType\nimport pandas as pd\nimport numpy as np\n\n\n\ndef run_inference(df,...
[ [ "pandas.DataFrame", "pandas.concat" ] ]
Ikomia-dev/ikomia-oakd
[ "7a048dd82fefc56a9f28b889f7d988d931173c9a", "7a048dd82fefc56a9f28b889f7d988d931173c9a" ]
[ "_examples/pose_estimation.py", "V-generalization/examples/stereo_neural_inference/face_landmarks_detector_v2.py" ]
[ "from utils.compute import get_landmark_3d, get_vector_intersection\nfrom utils.visualize import HumanPoseVisualizer\nfrom utils.OakRunner import OakRunner\nfrom utils.pose import getKeypoints\nfrom utils.draw import displayFPS\nfrom pathlib import Path\nimport depthai as dai\nimport numpy as np\nimport cv2\n\n\n\n...
[ [ "numpy.concatenate" ], [ "numpy.array" ] ]
micqu/hotel-challenge
[ "9373d5bd69a48e22b043b1410a57ec051f63dd45" ]
[ "main.py" ]
[ "import numpy as np\nfrom torch import nn\nimport torch.optim as optim\nimport torch\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport data_loader as dl\nimport time\nimport copy\nimport utility\nimport yaml\nimport trainer\nfrom PIL import Image\nfrom os import path\nImage.MAX_IMAGE_PIXELS = None\nfrom...
[ [ "torch.optim.SGD", "numpy.save", "scipy.io.savemat", "torch.cuda.is_available", "torch.optim.lr_scheduler.ReduceLROnPlateau", "pandas.read_csv", "torch.nn.CrossEntropyLoss" ] ]
schokoro/flair
[ "92007949c818ccd9d7a85ad48309763439bd3455" ]
[ "flair/nn/model.py" ]
[ "import itertools\nimport logging\nimport warnings\nfrom abc import abstractmethod\nfrom collections import Counter\nfrom pathlib import Path\nfrom typing import Union, List, Tuple, Dict, Optional\n\nimport torch.nn\nfrom torch.utils.data.dataset import Dataset\nfrom tqdm import tqdm\n\nimport flair\nfrom flair imp...
[ [ "sklearn.metrics.classification_report", "sklearn.metrics.accuracy_score" ] ]
www516717402/edgeai-mmdetection
[ "c5563434728da227678ba3588621b4b426cda43d" ]
[ "xmmdet/core/anchor/anchor_generator.py" ]
[ "import warnings\nimport mmcv\nimport numpy as np\nimport torch\nfrom torch.nn.modules.utils import _pair\n\nfrom mmdet.core.anchor.builder import ANCHOR_GENERATORS\nfrom mmdet.core.anchor import AnchorGenerator\n\n@ANCHOR_GENERATORS.register_module(force=True)\nclass SSDAnchorGenerator(AnchorGenerator):\n \"\"\...
[ [ "torch.nn.modules.utils._pair", "torch.LongTensor", "numpy.sqrt", "torch.Tensor", "numpy.floor" ] ]
colemanliyah/pyrfume-data
[ "1d1ccd0232f024c4509068ce682e7545580d246b", "1d1ccd0232f024c4509068ce682e7545580d246b" ]
[ "snitz_2013/main.py", "ifra_2019/main.py" ]
[ "# ---\n# jupyter:\n# jupytext:\n# formats: ipynb,py\n# text_representation:\n# extension: .py\n# format_name: light\n# format_version: '1.5'\n# jupytext_version: 1.10.3\n# kernelspec:\n# display_name: Python 3\n# language: python\n# name: python3\n# ---\n\nimport pan...
[ [ "pandas.DataFrame", "pandas.read_csv", "pandas.concat" ], [ "pandas.read_csv" ] ]
trautmane/fst
[ "d450ff38bad981a2e04d79967393a2815966f243" ]
[ "src/fibsem_tools/attrs/attrs.py" ]
[ "from pathlib import Path\nfrom typing import List, Optional, Dict, Union, Tuple, Literal, Sequence, Any\nimport fsspec\nimport numpy as np\nfrom xarray import DataArray\nfrom dataclasses import asdict, dataclass\nimport json\nfrom ..io.mrc import mrc_to_dask\nfrom ..io import read\nimport dask.array as da\nimport ...
[ [ "numpy.arange" ] ]
Let-Me-Code/Hepatitis-B-Mortality-Prediction
[ "3ac192ac814cb90fe38db5e0f7c8ba97b5491597" ]
[ "app.py" ]
[ "# Core Pkgs\nimport streamlit as st\n\n# EDA Pkgs\nimport pandas as pd\nimport numpy as np\nfrom PIL import Image\n\n# Utils\nimport os\nimport joblib\nimport hashlib\n# passlib,bcrypt\n\n# Data Viz Pkgs\nimport matplotlib.pyplot as plt\nimport matplotlib\nmatplotlib.use('Agg')\n\n# DB\nfrom managed_db import *\n\...
[ [ "matplotlib.use", "numpy.array", "matplotlib.pyplot.figure", "matplotlib.pyplot.barh", "pandas.read_csv" ] ]
evgeniya-egupova/nncf
[ "39a3c5b2e5cc7d33723154d2e622d4d7882a99a4", "39a3c5b2e5cc7d33723154d2e622d4d7882a99a4", "39a3c5b2e5cc7d33723154d2e622d4d7882a99a4" ]
[ "tests/torch/test_backward_compat.py", "tests/torch/test_models/ssd_mobilenet.py", "nncf/tensorflow/tensor.py" ]
[ "\"\"\"\n Copyright (c) 2019-2020 Intel Corporation\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law o...
[ [ "torch.zeros", "torch.nn.BatchNorm2d", "torch.ones", "torch.nn.Conv2d", "torch.load", "torch.empty" ], [ "torch.nn.ReLU", "torch.nn.Conv2d", "torch.nn.BatchNorm2d", "torch.load" ], [ "tensorflow.concat", "tensorflow.ones", "tensorflow.device", "tenso...
ase2sprkkr/ase2sprkkr
[ "5e04f54365e4ab65d97bd11d573b078674548a59" ]
[ "src/ase2sprkkr/sprkkr/sprkkr_atoms.py" ]
[ "\"\"\" This file contains SPRKKRAtoms - an enhanced version of Atoms to be used\nwith SPRKKR \"\"\"\n\n\nfrom ase import Atoms\nfrom ..common.unique_values import UniqueValuesMapping\nimport spglib\nfrom ase.spacegroup import Spacegroup\nimport numpy as np\nfrom ..sprkkr.sites import Site\nfrom ..common.misc impor...
[ [ "numpy.where", "numpy.unique" ] ]
shobhitagarwal1612/Emotion-Analysis
[ "069086fd528bd06e47521de450c398f00774087f" ]
[ "analyzer/build.py" ]
[ "import pickle\nfrom time import time\n\nfrom sklearn.cross_validation import train_test_split as tts\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.linear_model import SGDClassifier\nfrom sklearn.metrics import classification_report as clsr\nfrom sklearn.neural_network._base import iden...
[ [ "sklearn.metrics.classification_report", "sklearn.preprocessing.LabelEncoder", "sklearn.cross_validation.train_test_split", "sklearn.feature_extraction.text.TfidfVectorizer" ] ]
Myeonghan-Jeong/deep-learning-from-scratch
[ "fef3e327c49593b5df74728a1cba1144948a2999" ]
[ "chapter05/5.7.4_backpropagation_learning.py" ]
[ "from commons.neural_network import TwoLayerNet\nfrom datasets.mnist import load_mnist\nimport numpy as np\n\n(x_train, t_train), (x_test, t_test) = load_mnist(\n normalize=True, one_hot_label=True)\n\nnetwork = TwoLayerNet(input_size=784, hidden_size=50, output_size=10)\n\niters_num = 10000\ntrain_size = x_trai...
[ [ "numpy.random.choice" ] ]
alexxromero/WAKY-private
[ "aa15d9d138ba22e04628590f2c9583a86f2e54f2" ]
[ "kwakpriv/plotting/plottingtools.py" ]
[ "from __future__ import absolute_import\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.colors import LinearSegmentedColormap\n\nfrom ..w_transform import HaarTransform, InvHaarTransform\n\ndef _zeros_like(obj):\n zeros = [np.zeros_like(lev, dtype=float) for lev in obj]\n return zeros\n\...
[ [ "numpy.max", "numpy.zeros_like", "numpy.ceil", "numpy.min", "numpy.subtract", "numpy.argsort", "matplotlib.colors.LinearSegmentedColormap.from_list" ] ]
lemairecarl/pytorch-lightning
[ "85304d4672a9ed24a16f7f5b2abaa34148ab86f4" ]
[ "tests/utilities/test_deepspeed_collate_checkpoint.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.load" ] ]
DemonDamon/mask-detection-based-on-tf2odapi
[ "192ae544169c1230c21141c033800aa1bd94e9b6" ]
[ "object_detection/utils/target_assigner_utils_test.py" ]
[ "# Copyright 2020 The TensorFlow Authors. All Rights Reserved.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\n#\...
[ [ "numpy.array", "tensorflow.compat.v1.zeros", "numpy.sum", "numpy.testing.assert_array_equal", "numpy.ones", "tensorflow.compat.v1.stack", "numpy.testing.assert_array_almost_equal", "numpy.stack", "tensorflow.compat.v1.test.main", "tensorflow.compat.v1.function", "tensor...
junhyeokahn/ASE389
[ "a57d668f968da1db56f0dfe8dadad548ad631f33" ]
[ "pnc/manipulator_pnc/manipulator_interface.py" ]
[ "import os\nimport sys\ncwd = os.getcwd()\nsys.path.append(cwd)\nimport time, math\n\nimport numpy as np\n\nfrom pnc.interface import Interface\nfrom config.manipulator_config import ManipulatorConfig\nfrom pnc.robot_system.pinocchio_robot_system import PinocchioRobotSystem\n\n\nclass ManipulatorInterface(Interface...
[ [ "numpy.zeros_like", "numpy.zeros" ] ]
jairad26/tobler
[ "a95ef53b1e366f4cec7c1b84063a2fe810dccb8e" ]
[ "tobler/area_weighted/area_interpolate.py" ]
[ "\"\"\"\nArea Weighted Interpolation\n\n\"\"\"\n\nimport numpy as np\nimport geopandas as gpd\nfrom ._vectorized_raster_interpolation import _fast_append_profile_in_gdf\nimport warnings\nfrom scipy.sparse import dok_matrix, diags, coo_matrix\nimport pandas as pd\nimport os\n\nfrom tobler.util.util import _check_crs...
[ [ "numpy.concatenate", "scipy.sparse.coo_matrix", "numpy.array", "numpy.dot", "numpy.isnan", "scipy.sparse.diags", "numpy.zeros", "numpy.asarray", "pandas.DataFrame", "numpy.arange", "pandas.concat", "numpy.diag", "numpy.vstack" ] ]
quantrocket-llc/trading-calendars
[ "b72630cbcb288601c62e61ebe002a9043f9a3112" ]
[ "trading_calendars/tests/test_xshg_calendar.py" ]
[ "from unittest import TestCase\n\nimport pandas as pd\nfrom pytz import UTC\n\nfrom trading_calendars.exchange_calendar_xshg import XSHGExchangeCalendar\n\nfrom .test_trading_calendar import ExchangeCalendarTestBase\nfrom .test_utils import T\n\n\nclass XSHGCalendarTestCase(ExchangeCalendarTestBase, TestCase):\n\n ...
[ [ "pandas.Timestamp" ] ]
sintefneodroid/vision
[ "a4e66251ead99f15f4697bfe2abd00e2f388e743", "a4e66251ead99f15f4697bfe2abd00e2f388e743" ]
[ "samples/regression/vae/flow/data_loader.py", "neodroidvision/data/detection/coco/deprec/s_coco_utilities.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\n__author__ = \"Christian Heider Nielsen\"\n__doc__ = r\"\"\"\n \"\"\"\n\nimport h5py\nimport torch\nimport torch.utils\nimport torch.utils.data\n\nfrom .h5_mnist_data import download_binary_mnist\n\n\ndef load_binary_mnist(cfg, **kwcfg):\n fname = c...
[ [ "torch.utils.data.DataLoader", "torch.from_numpy" ], [ "torch.zeros", "torch.stack", "torch.tensor", "torch.utils.data.Subset", "torch.as_tensor" ] ]
dantehustg/cem
[ "5fcb22d395c124c63cd26585aba5321293882ece" ]
[ "tests/test_backend.py" ]
[ "import pytest\nimport numpy as np\nimport random\n\nfrom cem.backend import backend, NumpyBackend\n\ntry:\n from cem.backend import CuPyBackend\n import cupy as cp\n skip_cupy_test = False\nexcept ImportError:\n skip_cupy_test = True\n\n\ndef test_numpy_backend():\n X = random.randint(0, 10) * 10\n ...
[ [ "numpy.sin", "numpy.cos" ] ]
yanjingke/yolov4-keras
[ "251457723efc3b12b9744b6f5e0c25f4bee0d4e4", "251457723efc3b12b9744b6f5e0c25f4bee0d4e4" ]
[ "yolo.py", "nets/yolo4.py" ]
[ "import os\nimport numpy as np\nimport copy\nimport colorsys\nfrom timeit import default_timer as timer\nfrom keras import backend as K\nfrom keras.models import load_model\nfrom keras.layers import Input\nfrom PIL import Image, ImageFont, ImageDraw\nfrom nets.yolo4 import yolo_body,yolo_eval\nfrom utils.utils impo...
[ [ "numpy.array", "numpy.random.seed", "numpy.random.shuffle", "numpy.expand_dims", "numpy.floor" ], [ "tensorflow.boolean_mask", "tensorflow.image.non_max_suppression" ] ]