repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
Petelr/ml2019
[ "bd02f48ab35ed531954609a68da7d4aa5cae6e75" ]
[ "Submittions/proj1_4.py" ]
[ "import numpy as np \nimport matplotlib.pyplot as plt\nfrom scipy.stats import multivariate_normal \n\nmean = [2,5]\ncov = [[1,-0.1],[-0.1,1]]\nX = np.random.multivariate_normal(mean,cov,size=10)\nX_hat = np.empty(X.shape)\nX_hat[:,0] = (X[:,0]-np.mean(X[:,0]))/np.std(X[:,0])\nX_hat[:,1] ...
[ [ "numpy.random.multivariate_normal", "numpy.std", "numpy.mean", "numpy.empty", "matplotlib.pyplot.figure" ] ]
yandexdataschool/inverse-problem-intensive
[ "490b87d4309a641e4db7230ba6dff60f1972a365" ]
[ "lgso/experience_replay.py" ]
[ "import torch\nimport numpy as np\n\nclass ExperienceReplay:\n def __init__(self, psi_dim, x_dim, y_dim, device, sphere_cut=False):\n self._psi_dim = psi_dim\n self._x_dim = x_dim\n self._y_dim = y_dim\n self._device = device\n self._sphere_cut = sphere_cut\n self._y = t...
[ [ "torch.zeros" ] ]
Daniil-Osokin/openvino_training_extensions
[ "ba60480d546ee95e73472d1fde3cd1e49925f2af", "ba60480d546ee95e73472d1fde3cd1e49925f2af" ]
[ "tensorflow_toolkit/lpr/export.py", "tensorflow_toolkit/ssd_detector/export.py" ]
[ "from __future__ import print_function\nimport argparse\nimport os\nimport subprocess\n\n\nimport tensorflow as tf\nimport tensorflow.contrib.slim as slim\nfrom tensorflow.python.framework import graph_io\n\nfrom lpr.trainer import inference\nfrom utils.helpers import load_module\n\n\ndef parse_args():\n parser = ...
[ [ "tensorflow.nn.ctc_greedy_decoder", "tensorflow.Graph", "tensorflow.graph_util.convert_variables_to_constants", "tensorflow.train.latest_checkpoint", "tensorflow.transpose", "tensorflow.contrib.slim.arg_scope", "tensorflow.shape", "tensorflow.placeholder", "tensorflow.initializ...
AndreiRoibu/AIwithPyTorch
[ "82e93186b4aa76d73a6303755dfc9960ec896919" ]
[ "Machine Learning and Neurons/linear_regression.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Linear_Regression.ipynb\n\nAutomatically generated by Colaboratory.\n\nOriginal file is located at\n https://colab.research.google.com/drive/154CXhkgz--XVuKrGLFkiNi-S1Iv1GdCU\n\"\"\"\n\n# We start by doing the required imports\n\nimport torch\nimport torch.nn as nn\nimport numpy a...
[ [ "matplotlib.pyplot.legend", "numpy.random.random", "matplotlib.pyplot.scatter", "matplotlib.pyplot.plot", "torch.nn.Linear", "numpy.random.randn", "matplotlib.pyplot.show", "torch.nn.MSELoss" ] ]
zhoub/tensorflow
[ "1752d9c8fac5f6cf85a41e77d92e2743adbfc446" ]
[ "tensorflow/contrib/bayesflow/python/ops/hmc_impl.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.python.ops.math_ops.log", "tensorflow.python.ops.array_ops.shape", "tensorflow.python.ops.control_flow_ops.while_loop", "tensorflow.python.ops.math_ops.exp", "tensorflow.python.ops.array_ops.zeros", "tensorflow.python.ops.distributions.util.prefer_static_rank", "tensorflow....
QianWanghhu/SALib
[ "95a3371e503f9253cb917b8f0101c0202b969c2b" ]
[ "src/SALib/analyze/sobol.py" ]
[ "from scipy.stats import norm\r\n\r\nimport numpy as np\r\nimport pandas as pd\r\n\r\nfrom . import common_args\r\nfrom ..util import (read_param_file, compute_groups_matrix, ResultDict, \r\n extract_group_names, _check_groups)\r\nfrom types import MethodType\r\n\r\nfrom multiprocessing import Po...
[ [ "scipy.stats.norm.ppf", "numpy.random.seed", "pandas.DataFrame", "numpy.full", "numpy.mean", "numpy.var", "numpy.array_split", "numpy.zeros", "numpy.loadtxt", "numpy.random.randint" ] ]
ADernild/DS809
[ "6380c2354cea517ea684d99cb1fb1d5f35b5dc22" ]
[ "filtersvis.py" ]
[ "import keras\nfrom keras import models, Model\nfrom matplotlib import pyplot\nfrom keras.preprocessing.image import load_img\nfrom keras.preprocessing.image import img_to_array\nfrom keras.models import Model\nfrom matplotlib import pyplot as plt\nfrom numpy import expand_dims\nimport sys\n\n\n\n\nmodel = keras.mo...
[ [ "matplotlib.pyplot.imshow", "numpy.expand_dims", "matplotlib.pyplot.savefig", "matplotlib.pyplot.subplot", "matplotlib.pyplot.close", "matplotlib.pyplot.show" ] ]
minilek/private_frequency_oracles
[ "7b4f9723b59b234fda504869e4ed8a2cbc2cf19b" ]
[ "generate_figures.py" ]
[ "#!/usr/bin/env python3\n\nimport numpy as np\nfrom pylab import *\nimport matplotlib.pyplot as plt\nfrom sys import stdin\n\nimport argparse\nimport os\nfrom pathlib import Path\nimport shutil\nimport sys\nfrom absl import app,flags\n\nfrom pfoparams import Params\n\nFLAGS = flags.FLAGS\n\nflags.DEFINE_string(\"re...
[ [ "matplotlib.pyplot.legend", "numpy.arange", "matplotlib.pyplot.figure", "matplotlib.pyplot.rc", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylabel" ] ]
dsr0018/olivia
[ "8b7de3a512848c5d313bbc848ac9c7b667c2f6ce" ]
[ "olivia/packagemetrics.py" ]
[ "\"\"\"Olivia package metrics for network vulnerability analysis.\"\"\"\n\nimport numbers\n\nfrom olivia.lib.aggregators import AscendentAggregator, DescendentAggregator\nimport numpy as np\n\n\nclass Reach(AscendentAggregator):\n \"\"\"\n Olivia Reach Metric.\n\n REACH(n) is the number of transitive desce...
[ [ "numpy.argsort", "numpy.true_divide", "numpy.array", "numpy.multiply" ] ]
jnettels/DHNx
[ "11b2b431fcc9d5923c2a6ac12cc37916ff1fdd2b" ]
[ "examples/import_export_plot/import_export_plot.py" ]
[ "import dhnx\nimport matplotlib.pyplot as plt\n\n# initialize a thermal network\nthermal_network = dhnx.network.ThermalNetwork()\n\n# load data from csv\nthermal_network.from_csv_folder('data_csv_input')\n\n# save thermal network to csv\nthermal_network.to_csv_folder('data_csv_output')\n\n# get graph of thermal net...
[ [ "matplotlib.pyplot.savefig" ] ]
Practical-Formal-Methods/mod_stable_baselines3
[ "08bdb0a529c8ab446ac7973f2a02f832c0c3f454" ]
[ "stable_baselines3/ppo/ppo.py" ]
[ "import warnings\nfrom typing import Any, Dict, Optional, Type, Union\n\nimport numpy as np\nimport torch as th\nfrom mod_gym.gym import spaces\nfrom torch.nn import functional as F\n\nfrom mod_stable_baselines3.stable_baselines3.common.on_policy_algorithm import OnPolicyAlgorithm\nfrom mod_stable_baselines3.stable...
[ [ "torch.mean", "torch.abs", "torch.min", "torch.exp", "torch.nn.functional.mse_loss", "torch.no_grad", "numpy.mean", "torch.clamp" ] ]
ilopezgp/human_impacts
[ "b2758245edac0946080a647f1dbfd1098c0f0b27", "b2758245edac0946080a647f1dbfd1098c0f0b27", "b2758245edac0946080a647f1dbfd1098c0f0b27" ]
[ "data/atmosphere_biogeochemistry/global_carbon_project_CO2/code/get_global_CO2.py", "data/water/Qin2019_water_use/viz/generate.py", "data/atmosphere_biogeochemistry/IFASTAT_nitrogen_production/viz/generate.py" ]
[ "# -*- coding: utf-8 -*-\n#\n#################\n# This script takes as an input the supplementary global data \n# from Friedlingstein et al. (2019), imported in csv format from\n# the original .xlsx file, and returns a csv file with\n# historical global emissions and sinks since 1959.\n# Data is provided in Tg C /y...
[ [ "numpy.square", "pandas.read_csv", "numpy.sqrt" ], [ "pandas.read_csv", "pandas.to_datetime" ], [ "pandas.read_csv", "pandas.to_datetime", "pandas.DataFrame" ] ]
Anonymous-ARR/code
[ "ede7a3b73cb97905454c21d2f9260a788751f8d8" ]
[ "probe_custom_word2vec/probe_loader.py" ]
[ "import torch\nimport os, json, random, sys\nfrom params import params\nimport numpy as np\nfrom gensim.models import Word2Vec\nfrom torch.utils import data\nimport pandas as pd\nimport re\nimport string\n\nnp.random.seed(params.seed)\nrandom.seed(params.seed)\ntorch.manual_seed(params.seed)\n\ncustom_embeds_limit ...
[ [ "torch.manual_seed", "numpy.random.seed" ] ]
sio13/helmnet
[ "514a2035b4e043825d444496eda375b3d954f853", "514a2035b4e043825d444496eda375b3d954f853" ]
[ "helmnet/hybridnet.py", "helmnet/architectures.py" ]
[ "from helmnet.source_module import SourceModule\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data import DataLoader\nfrom torch.nn.functional import hardtanh\nfrom random import choice\nimport pytorch_lightning as pl\nfrom torchmetrics.regression import MeanAbsoluteError\nimport numpy as np\nfrom helmnet....
[ [ "torch.nn.Parameter", "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.isnan", "torch.zeros", "torch.cat", "torch.sin", "torch.zeros_like", "torch.nn.init.xavier_normal_", "numpy.save", "torch.no_grad", "numpy.random.rand", "torch.nn.functional.hardtanh", "t...
xmu-xiaoma666/RepMLP-pytorch
[ "598139b8e6da34dd01154311eaae14628d8de4e6" ]
[ "repvgg-pytorch.py" ]
[ "import torch\nfrom torch import mean, nn\nfrom collections import OrderedDict\nfrom torch.nn import functional as F\nimport numpy as np\nfrom numpy import random\nfrom se_block import SEBlock\n\ndef setup_seed(seed):\n torch.manual_seed(seed)\n torch.cuda.manual_seed_all(seed)\n np.random.seed(seed)\n ...
[ [ "torch.nn.Sequential", "numpy.random.seed", "torch.manual_seed", "torch.randn", "torch.nn.Conv2d", "torch.from_numpy", "torch.nn.Identity", "torch.cuda.manual_seed_all", "torch.nn.BatchNorm2d", "torch.nn.ReLU", "numpy.zeros", "torch.nn.functional.pad" ] ]
scbysc/my_wavy_project
[ "c167ac9a3cd20b21fa7362dc5eeac68091b72942" ]
[ "src/cos.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\ntime = np.arange(0, 10, 0.1)\namplitude = np.cos(time)\n\nplt.plot (time, amplitude)\n\nplt.title('Cosine curve')\n\nplt.xlabel('Time')\n\nplt.ylabel('Amplitude')\n\nplt.show()" ]
[ [ "matplotlib.pyplot.title", "numpy.arange", "numpy.cos", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
bionicdl-sustech/DeepClaw
[ "5cc61289e6088adc03d502f07ec970d221e05857", "b5bc1866a1847e7b0c11616fd6cbe949c64a355b", "5cc61289e6088adc03d502f07ec970d221e05857", "b5bc1866a1847e7b0c11616fd6cbe949c64a355b" ]
[ "deepclaw/sim2real/simulation/src/franka.py", "deepclaw/modules/recognition/efficientnet/demo_realsense.py", "deepclaw/sim2real/simulation/tasks/BlueArm_simulation/ktest.py", "deepclaw/modules/recognition/efficientnet/demo.py" ]
[ "from pyrep.robots.arms.panda import Panda\nfrom pyrep.robots.end_effectors.panda_gripper import PandaGripper\nfrom pyrep.robots.configuration_paths.arm_configuration_path import ArmConfigurationPath\nfrom pyrep.errors import ConfigurationError, ConfigurationPathError, IKError\nfrom pyrep.const import Configuration...
[ [ "scipy.spatial.transform.Slerp", "scipy.spatial.transform.Rotation.from_quat", "numpy.eye", "scipy.spatial.transform.Rotation.from_euler", "numpy.array" ], [ "numpy.argmax" ], [ "numpy.array" ], [ "numpy.argmax" ] ]
lizeyan/tensorkit
[ "2997a5914ec3c3ec72f91eb5906b5ee878fdc020", "2997a5914ec3c3ec72f91eb5906b5ee878fdc020" ]
[ "tensorkit/backend/pytorch_/init.py", "tests/helper.py" ]
[ "import math\nfrom typing import *\n\nimport numpy as np\nfrom torch.jit import ScriptModule\nfrom torch.utils.hooks import RemovableHandle\n\nfrom . import core, nn, random\nfrom .core import Tensor, Module, no_grad, rank, jit, assign_data\n\n__all__ = [\n # utilities\n 'calculate_fan_in_and_fan_out', 'get_a...
[ [ "numpy.shape" ], [ "numpy.allclose", "numpy.random.seed", "numpy.stack", "numpy.equal", "numpy.zeros", "numpy.random.randint" ] ]
ka2hyeon/autoins_public
[ "234f3765f173280806804bf4f4794773e4b0ca03", "234f3765f173280806804bf4f4794773e4b0ca03" ]
[ "autoins/rl/tester.py", "autoins/svdd/tester.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\n\nfrom autoins.common import common, io\n\nclass RewardShapingTester():\n def __init__(self,\n env,\n exp_dir,\n ccl_id,\n data_name):\n self.env = env\n self.exp_dir = exp_dir\n self.ccl_id = c...
[ [ "numpy.expand_dims", "numpy.tile", "matplotlib.pyplot.close", "matplotlib.pyplot.figure" ], [ "numpy.linspace", "numpy.reshape", "numpy.concatenate", "numpy.copy", "matplotlib.pyplot.close", "matplotlib.pyplot.pcolormesh", "numpy.meshgrid", "matplotlib.pyplot.fi...
pinghu6/FANet
[ "8aad47eba0cf50387148e717c3e0b923a50d1264" ]
[ "Testing/models/swiftnet/resnet/resnet_single_scale.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.utils.model_zoo as model_zoo\nfrom itertools import chain\nimport torch.utils.checkpoint as cp\n\nfrom ..util import _Upsample, SpatialPyramidPooling\n\n__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152']\n\nmodel_urls = {\n 'resne...
[ [ "torch.nn.Sequential", "torch.nn.init.constant_", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.utils.checkpoint.checkpoint", "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.utils.model_zoo.load_url", "torch.nn.init.kaiming_normal_" ] ]
Davidxswang/nni
[ "270a36264515f1576071f07e741fccd5333434ff" ]
[ "nni/algorithms/compression/v2/pytorch/base/pruner.py" ]
[ "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport logging\nfrom typing import Dict, List, Optional, Tuple\n\nimport torch\nfrom torch import Tensor\nfrom torch.nn import Module\n\nfrom .compressor import Compressor, LayerInfo\n\n_logger = logging.getLogger(__name__)\n\n__all__ = [...
[ [ "torch.device", "torch.ones", "torch.Tensor", "torch.save" ] ]
FischbachLab/invaderCheck
[ "d4d146cc5db552e95a6cf241b382ed1c44790fe6", "d4d146cc5db552e95a6cf241b382ed1c44790fe6" ]
[ "InvaderCheckLite.py", "collapse_to_midas.py" ]
[ "#!/usr/bin/env python3\n\n##########################################################################################\n#### THIS SCRIPT WAS USED TO GENERATE DEPTH vs COVERAGE FIGURES in the IN VIVO PAPER ####\n##########################################################################################\n\n# Accept S3...
[ [ "pandas.concat", "pandas.read_csv", "pandas.DataFrame" ], [ "pandas.concat", "pandas.read_csv", "numpy.isnan", "matplotlib.use", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.close" ] ]
acidburn0zzz/beam
[ "13d7c5c54daacd4536b533c072f72e80e5e86c78" ]
[ "sdks/python/apache_beam/io/tfrecordio_test.py" ]
[ "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo...
[ [ "tensorflow.python_io.TFRecordOptions", "tensorflow.train.Example" ] ]
micimize/DigitalHistoPath
[ "f2a4dd03761e321c35b1b2e17de3aa4b3ba49511" ]
[ "code_cm17/trainer/auto_hardmine.py" ]
[ "import sys\nimport os\nimport argparse\nimport logging\nimport json\nimport time\nimport numpy as np\nimport openslide\nimport PIL\nimport cv2\nimport matplotlib.pyplot as plt\nfrom scipy import ndimage\nfrom torch.utils.data import DataLoader\nimport math\nimport json\nimport logging\nimport time\nimport tensorfl...
[ [ "tensorflow.compat.v1.ConfigProto", "tensorflow.keras.utils.multi_gpu_model", "numpy.random.seed", "numpy.asarray", "tensorflow.compat.v1.keras.backend.set_session", "tensorflow.compat.v1.Session", "numpy.logical_and", "numpy.zeros" ] ]
troymoench/naccbis
[ "87fd79a79e9ae189236781fa4682811c1da6480f" ]
[ "naccbis/Cleaning/CleanTeamOffense.py" ]
[ "\"\"\" This script is used to clean team offense data and load into database \"\"\"\n# Standard library imports\nimport logging\nfrom pathlib import Path\n\n# Third party imports\nimport pandas as pd\n\n# Local imports\nfrom naccbis.Common import utils, metrics\nfrom naccbis.Common.splits import Split\n\n\nclass T...
[ [ "pandas.read_sql_table" ] ]
rafaelsanin/esctoolbox-python
[ "c5aed852ba39ee24ffb348efd864e3c6812265e2" ]
[ "dyn_model/funcs.py" ]
[ "\"\"\"\nFunctions used by the dyn_model\n\"\"\"\n\n# Modules\n# ------------------------------------------------------------------------------\n\nimport ipdb\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom scipy.optimize import fminbound, nnls, minimize_scalar\nfrom scipy.signal import dlsim, dlti\nfrom...
[ [ "numpy.diag", "matplotlib.pyplot.legend", "numpy.linalg.eigvals", "numpy.sqrt", "numpy.asarray", "numpy.cumsum", "numpy.concatenate", "matplotlib.pyplot.plot", "numpy.mean", "numpy.linalg.qr", "numpy.where", "numpy.linalg.svd", "numpy.eye", "scipy.optimize.m...
KaylaBaum/astr-119-hw-1
[ "1e01f8449d35c927d969086ff713e3e280e2bdf7" ]
[ "data_types.py" ]
[ "import numpy as np\t\t#import numpy library\r\n\r\n#integers\r\n\r\ni = 10\t\t\t#integer\r\nprint(type(i))\t#print out the data type of i\r\n\r\na_i = np.zeros(i,dtype=int)\t#declare an array of ints\r\nprint(type(a_i))\t\t\t#will return ndarray\r\nprint(type(a_i[0]))\t\t\t#will return int64\r\n\r\n#floats\r\n\r\n...
[ [ "numpy.zeros" ] ]
DistractionCrab/MachineLearningExamples
[ "9bb05bc0ba0c6b4c147ec70f557b9ae981df46fe" ]
[ "ml/reinforcement/__init__.py" ]
[ "import ml\nimport gym\nimport cv2\nimport operator\nimport random\nimport torch\nimport torchvision\nimport numpy as np\nimport functools as ftools\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision.datasets as datasets\n\nfrom collections import dequ...
[ [ "torch.reshape", "torch.from_numpy", "torch.nn.MSELoss", "numpy.stack" ] ]
SergejVolkov/SR_base
[ "285b40c0bbe9dc46f2bd660dc80ff255b4dc65a0", "285b40c0bbe9dc46f2bd660dc80ff255b4dc65a0" ]
[ "crop_figures.py", "models/Algo.py" ]
[ "import cv2\nimport os\nimport numpy as np\n\nINIT_SIZE = 24\nFONT_WIDTH_FACTOR = 0.8\n\nc_h, c_w = 128, 128\nscale = 3\nimg_num = 7\nmax_row_w = 6\ni_size = (1920, 1080)\nstart_index = len('The_SoulTaker_01_a_sr_')\nfont_size = 24\nheader_h = font_size * 3\n\ncoords = [(780, 966), (579, 762), (482, 497),\n ...
[ [ "numpy.ones" ], [ "torch.nn.functional.interpolate" ] ]
qua-platform/qcodes-driver
[ "0fa0035705a457c68fa88e8c74bac2bb492d4373" ]
[ "demo.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nimport qcodes as qc\nfrom qcodes import (\n Measurement,\n load_or_create_experiment,\n)\nfrom qcodes.dataset.plotting import plot_dataset\n\nfrom qcodes_driver.driver import *\n\npulse_len = 1000\nconfig = {\n \"version\": 1,\n \"controllers\": {\n ...
[ [ "numpy.linspace" ] ]
heistermann/trmmlib
[ "b32cf623737285073e4c61bd0e01a0fe8b26c329" ]
[ "trmmlib/util.py" ]
[ "# -*- coding: utf-8 -*-\n#-------------------------------------------------------------------------------\n# Name: util\n# Purpose:\n#\n# Authors: Maik Heistermann\n#\n# Created: 2015-11-6\n# Copyright: (c) Maik Heistermann\n# Licence: The MIT License\n#-----------------------------------...
[ [ "numpy.unique", "numpy.arange", "numpy.repeat", "numpy.array", "numpy.where" ] ]
bradyneal/Bias-Variance
[ "4c759d978f09475e7f2fbfaac3a6154f91a12a87" ]
[ "test_y_onehot.py" ]
[ "'''Returns the one hot vectors for the y label'''\n\nimport torch\nfrom torchvision import datasets, transforms\n\nMNIST_TEST_SIZE = 10000\nNUM_MNIST_CLASSES = 10\n\n\ndef get_test_y_onehot():\n # Return onehot matrix of test y labels\n\n test = datasets.MNIST('./data', train=False, download=True, transform=...
[ [ "torch.FloatTensor", "torch.utils.data.DataLoader" ] ]
incognitoRepo/youtube-dl
[ "e9dbbbd87e200d37f15531973fe653c3573cfd0b" ]
[ "bin/fmtutil/dataframe.py" ]
[ "import sys\nimport ast\nimport re,os\nimport pandas as pd\nimport numpy as np\nimport itertools\nfrom fmtutil.row.parse_verbose_argvars import ParsedTuple\n\n\nfrom pathlib import Path\nfrom pdb import set_trace as st\nfrom typing import Dict, List, Any, Iterable\nfrom toolz.functoolz import compose_left\nfrom dat...
[ [ "pandas.DataFrame" ] ]
cstsunfu/dlkit
[ "69e0efd372fa5c0ae5313124d0ba1ef55b535196" ]
[ "dlk/core/modules/biaffine.py" ]
[ "# Copyright 2021 cstsunfu. 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 applic...
[ [ "torch.randn", "torch.einsum", "torch.ones_like", "torch.nn.init.xavier_uniform_" ] ]
rezahojabr/taichi
[ "122c0352ec480b740a4118819458cbf08d2e5ddb" ]
[ "tests/python/test_loops.py" ]
[ "import taichi as ti\n\n\n@ti.all_archs\ndef test_loops():\n x = ti.var(ti.f32)\n y = ti.var(ti.f32)\n\n N = 512\n\n @ti.layout\n def place():\n ti.root.dense(ti.i, N).place(x)\n ti.root.dense(ti.i, N).place(y)\n ti.root.lazy_grad()\n\n for i in range(N // 2, N):\n y[i] = i - 300\n\n @ti.kernel\n...
[ [ "numpy.ones" ] ]
marami52/sweetviz
[ "d06df4a2741c73985c574eb63e913a98c4066592" ]
[ "sweetviz/graph_associations.py" ]
[ "import math\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom sweetviz.sv_types import FeatureType\nimport sweetviz.graph\nfrom sweetviz.config import config\nimport itertools\nimport matplotlib.patches as patches\nfrom textwrap import wrap\n\n# Portions of this file contain code from...
[ [ "pandas.Series", "numpy.linspace", "matplotlib.pyplot.subplots", "pandas.DataFrame", "numpy.round", "matplotlib.pyplot.subplot", "matplotlib.pyplot.close", "matplotlib.pyplot.GridSpec" ] ]
SEE-MOF/QRNN-CloudCorrection
[ "ba58f1f4f70ec0f7264d5e98d80552d2fba1bb4d" ]
[ "ICI/plot_calibration.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Sep 7 20:46:41 2020\n\n@author: inderpreet\nThis code plots the calibration curves for both QRNN-single and QRNN-all\n\nThis script is used to plot Figure 11 of the article.\n\n\"\"\"\nimport os\nimport matplotlib.pyplot as plt\nimport numpy ...
[ [ "matplotlib.ticker.MultipleLocator", "numpy.abs", "numpy.arange", "matplotlib.pyplot.subplots", "numpy.argwhere", "matplotlib.pyplot.rcParams.update", "numpy.array" ] ]
Cahlil-Togonon/Deep-Learning-Experiments
[ "8048b91f382667e9b43078460fb792b369f8af49", "501ae610b0a8fb7fb75a53dcfdab71be49274b58", "501ae610b0a8fb7fb75a53dcfdab71be49274b58" ]
[ "versions/2020/keras/seq2seq/seq2seq_translate.py", "versions/2022/tools/python/accelerate_demo.py", "versions/2020/transformer/code/transformer-mnist.py" ]
[ "'''Sequence to sequence example in Keras \n\nEnglish to Tagalog sentence pairs.\nhttp://www.manythings.org/anki/tgl-eng.zip\n\nLots of neat sentence pairs datasets can be found at:\nhttp://www.manythings.org/anki/\n\n# References\n\n- Sequence to Sequence Learning with Neural Networks\n https://arxiv.org/abs/14...
[ [ "numpy.reshape", "numpy.array", "numpy.zeros", "numpy.argmax" ], [ "torch.nn.CrossEntropyLoss", "torch.optim.lr_scheduler.CosineAnnealingLR", "torch.utils.data.DataLoader", "torch.nn.Linear", "torch.no_grad" ], [ "numpy.amax", "matplotlib.pyplot.imshow", "to...
ernewton/starspot
[ "5cf7f0e4d9ce8d39e7768e63b0d45fbaf89955a7" ]
[ "tests/PDM_test.py" ]
[ "import numpy as np\nfrom starspot import phase_dispersion_minimization as pdm\nimport matplotlib.pyplot as plt\nimport starspot as ss\n\n\ndef test_sj2():\n np.random.seed(42)\n N = 10000\n t = np.linspace(0, .1, N)\n x = np.random.randn(N)\n sj2 = pdm.sj2(x, 0, N)\n assert np.isclose(sj2, 1, ato...
[ [ "numpy.ones_like", "numpy.random.seed", "numpy.linspace", "matplotlib.pyplot.savefig", "numpy.ones", "numpy.sin", "matplotlib.pyplot.plot", "numpy.log10", "numpy.random.randn", "numpy.argmin", "numpy.mean", "numpy.diff", "numpy.zeros", "numpy.isclose" ] ]
binshengliu/pytorch-lightning
[ "8f6b7a2b4fea9b7bd0b873f5973e6364b3981412" ]
[ "tests/trainer/test_dataloaders.py" ]
[ "import platform\n\nimport pytest\nimport torch\nfrom torch.utils.data.dataloader import DataLoader\nfrom torch.utils.data.dataset import Subset\n\nimport tests.base.utils as tutils\nfrom pytorch_lightning import Trainer\nfrom pytorch_lightning.utilities.exceptions import MisconfigurationException\nfrom tests.base ...
[ [ "torch.cuda.device_count", "torch.utils.data.dataloader.DataLoader", "torch.nn.ReLU" ] ]
OSUrobotics/sim-to-real-kinova
[ "334bd824631b0f42bb060c9f1b7ced3137aae294", "334bd824631b0f42bb060c9f1b7ced3137aae294" ]
[ "object_detection_pkg/src/reward_detection.py", "learning_code/DDPG.py" ]
[ "#!/usr/bin/env python\n\nimport rospy\nimport cv2\nfrom cv_bridge import CvBridge, CvBridgeError\nfrom sensor_msgs.msg import Image\nfrom std_msgs.msg import String, Float32\nimport numpy as np\nimport cv2.aruco as aruco\nimport sys\n\n\nclass ImageProcessor():\n def __init__(self):\n\n #cv bridge class\...
[ [ "numpy.all", "numpy.load" ], [ "torch.cat", "torch.load", "torch.nn.functional.mse_loss", "torch.nn.Linear", "torch.cuda.is_available" ] ]
ZurichNLP/understanding-mbr
[ "4052f6feef783fd851fdaf0acd6bf6ad71dc58ef" ]
[ "scripts/measure_overlaps.py" ]
[ "#! /usr/bin/python3\n\nimport numpy\nimport argparse\nimport logging\nimport sacrebleu\n\n# local dependency\n\n# noinspection PyUnresolvedReferences\nfrom bleu_weighted_precision import WeightedBLEU\n\n\nOVERLAP_FUNCTIONS = [\"word\", \"bleu2\", \"chrf\"]\n\n\ndef parse_args():\n parser = argparse.ArgumentPars...
[ [ "numpy.asarray", "numpy.save" ] ]
XiaociZhang/Paddle
[ "f551d9fe13fa061d40a326e07941af9f6323b4dd" ]
[ "python/paddle/fluid/tests/unittests/auto_parallel/engine_api.py" ]
[ "# Copyright (c) 2022 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.random.uniform", "numpy.random.randint" ] ]
ZJaume/paraphrasing
[ "66f38b30a52d5513b2426dc515373a6f26b62dac" ]
[ "datagen.py" ]
[ "from keras.preprocessing.text import Tokenizer\nfrom keras.preprocessing.sequence import pad_sequences\nfrom keras.utils import to_categorical\nimport numpy as np\nimport keras\nimport pickle\n\nOOV = '<UNK>'\nBOS = '<BOS>'\nEOS = '<EOS>'\n\ndef tokenize(tknzr, text, maxlen=40, pad=True):\n '''\n Tokenize a ...
[ [ "numpy.reshape", "numpy.array", "numpy.where" ] ]
MoritzTaylor/maml-rl-tf2
[ "1c9237e7f18d688027a1db56b3cbb27c059a7ff1", "1c9237e7f18d688027a1db56b3cbb27c059a7ff1" ]
[ "maml_rl/policies/policy.py", "maml_rl/utils/tf_utils.py" ]
[ "from collections import OrderedDict\n\nimport tensorflow as tf\nimport tensorflow.keras as keras\n\n\ndef weight_init(module):\n if isinstance(module, keras.layers.Dense):\n keras.initializers.glorot_uniform(module.weight)\n module.bias.data.zero_()\n\n\nclass Policy(tf.keras.Model):\n def __in...
[ [ "tensorflow.multiply", "tensorflow.keras.initializers.glorot_uniform" ], [ "tensorflow.reduce_mean", "tensorflow.reduce_sum", "tensorflow.reshape", "tensorflow.clip_by_norm", "tensorflow.zeros_like", "numpy.prod" ] ]
angelvalay/asr_commands
[ "281c40ee2ad4b270fa935f6eb91bc29ea4efde11" ]
[ "data/data_with_roise/get_voice.py" ]
[ "import numpy as np\nimport librosa.display\nimport librosa.output\nimport matplotlib.pyplot as plt\nimport sys\n\ndef get_file_audio(in_path, out_path):\n data, sr = librosa.load(in_path, sr=44100)\n _noise = np.array([])\n _data = np.array([])\n _flag_start = False\n for d in data:\n if _fla...
[ [ "numpy.asfortranarray", "numpy.array", "numpy.append" ] ]
dangeng/infiniteGANorama
[ "92c9cbe0638cf9fcdc05020759772e36aebf788c" ]
[ "ranker.py" ]
[ "'''\nScript to train the ranker\nShould add some sort of image pool someday...?\n'''\n\nimport time\nfrom options.train_options import TrainOptions\nfrom data import CreateDataLoader\nfrom models import create_model\nfrom util.visualizer import Visualizer\nfrom models import networks\n\nimport pdb\nimport torch\nf...
[ [ "torch.load" ] ]
lkadin/pandera
[ "247d020ded7a3f160f05c4fc8bb9a626e8570846" ]
[ "tests/io/test_io.py" ]
[ "\"\"\"Unit tests for io module\"\"\"\n\nimport platform\nimport tempfile\nimport unittest.mock as mock\nfrom pathlib import Path\n\nimport pandas as pd\nimport pytest\nfrom packaging import version\n\nimport pandera as pa\nimport pandera.extensions as pa_ext\nimport pandera.typing as pat\n\ntry:\n from pandera ...
[ [ "pandas.Timedelta", "pandas.Timestamp", "pandas.DataFrame" ] ]
lidegao899/Evolutionary-Algorithm
[ "2b36038ecfe6d7bc848eb8ee72d66f9b0f5ff265" ]
[ "tutorial-contents/DimAutoLayout/Lab.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\nN_DIMS = 5 # DNA size\nDNA_SIZE = 10 # DNA (real number)\nDNA_BOUND = [0, 20] # solution upper and lower bounds\nN_GENERATIONS = 200\nPOP_SIZE = 100 # population size\nN_KID = 50 # n kids per generation\n\nTargePos=[1...
[ [ "numpy.sqrt", "matplotlib.pyplot.scatter", "numpy.clip", "numpy.arange", "numpy.empty_like", "numpy.vstack", "matplotlib.pyplot.cla", "matplotlib.pyplot.ylim", "matplotlib.pyplot.ioff", "matplotlib.pyplot.xlim", "numpy.random.randn", "numpy.random.rand", "numpy....
yanxp/MetaR-CNN
[ "5a4487e78e4014e18d32e59e6edc4e3bf0f10e16" ]
[ "test_metarcnn.py" ]
[ "# --------------------------------------------------------\n# Pytorch Meta R-CNN\n# Written by Anny Xu, Xiaopeng Yan, based on the code from Jianwei Yang\n# --------------------------------------------------------\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import prin...
[ [ "torch.LongTensor", "matplotlib.pyplot.imshow", "numpy.random.seed", "torch.load", "torch.cat", "torch.utils.data.DataLoader", "numpy.tile", "numpy.sort", "numpy.copy", "torch.FloatTensor", "torch.sort", "torch.cuda.is_available", "torch.nonzero", "numpy.arr...
sevagh/headbang.py
[ "50b76d4a85a857e879513c2bdf86be7347da332e" ]
[ "headbang/util.py" ]
[ "from madmom.io.audio import load_audio_file\nimport numpy\nimport librosa\n\n\ndef load_wav(wav_in, stereo=False):\n x, fs = load_audio_file(wav_in, sample_rate=44100)\n\n if not stereo:\n # stereo to mono if necessary\n if len(x.shape) > 1 and x.shape[1] == 2:\n x = x.sum(axis=1) / ...
[ [ "numpy.abs", "numpy.column_stack" ] ]
UBC-MDS/DMC_Portuguese
[ "6a301c29a558534c455549af8abd52362082c6e9" ]
[ "src/ml_analysis.py" ]
[ "# author: Karlos Muradyan\n# date: 2020-01-24\n\n'''This script does ML analysis by training multiple models, doing hyperparameter\ntuning and reporting the results in a csv file.\n\nUsage: \n ml_analysis.py --train_csv=<train_csv> --test_csv=<test_csv> --output_csv=<output_csv> --output_png=<output_png>\n m...
[ [ "sklearn.model_selection.GridSearchCV", "pandas.read_csv", "sklearn.linear_model.LogisticRegression", "numpy.random.seed", "sklearn.ensemble.RandomForestClassifier", "sklearn.metrics.confusion_matrix", "sklearn.model_selection.train_test_split", "matplotlib.pyplot.subplots", "p...
leidix/images-to-osm
[ "5375d69c0f78aba9c153b0ada7ef7d6b8fb87b13" ]
[ "osmmodelconfig.py" ]
[ "import sys\nsys.path.append(\"Mask_RCNN\")\n\nimport os\nimport random\nimport math\nimport re\nimport time\nimport numpy as np\nimport cv2\nimport matplotlib\nimport random\nimport glob\nimport skimage\n\nfrom config import Config\nimport imagestoosm.config as osmcfg\nimport utils\nimport model as modellib\nimpor...
[ [ "numpy.zeros" ] ]
LM095/DDPG-implementation
[ "fc7ca3454520f925d4973dbef57728e139fc3c64" ]
[ "utils.py" ]
[ "import numpy as np\nimport gym\nfrom collections import deque\nimport random\n\n# Ornstein-Ulhenbeck Process\n# Taken from #https://github.com/vitchyr/rlkit/blob/master/rlkit/exploration_strategies/ou_strategy.py\nclass OUNoise(object):\n def __init__(self, action_space, mu=0.0, theta=0.15, max_sigma=0.3, min_s...
[ [ "numpy.array", "numpy.ones", "numpy.random.randn", "numpy.clip" ] ]
Stanford-ILIAD/reward-learning-scale-feedback
[ "6f8a670444080d62f785b2dfb3f47081a4da616c" ]
[ "models.py" ]
[ "from simulator import DrivingSimulation, FetchSimulation\nimport numpy as np\n\n\n\nclass Driver(DrivingSimulation):\n \"\"\"\n Original Driver model from 'Asking easy questions: A user-friendly approach to active reward learning'\n Bıyık, E., Palan, M., Landolfi, N. C., Losey, D. P., & Sadigh, D. (2019)....
[ [ "numpy.square", "numpy.dot", "numpy.abs", "numpy.sin", "scipy.optimize.minimize", "numpy.random.rand", "numpy.transpose", "numpy.load", "numpy.array" ] ]
honnorat/skillful_nowcasting
[ "d2c99dd1fef780da349af175262a395faa9b3ad3" ]
[ "skillful_nowcasting/generators.py" ]
[ "import einops\nimport torch\nimport torch.nn.functional as F\nfrom torch.nn.modules.pixelshuffle import PixelShuffle\nfrom torch.nn.utils.parametrizations import spectral_norm\nfrom typing import List\nfrom skillful_nowcasting.common import GBlock, UpsampleGBlock\nfrom skillful_nowcasting.layers import ConvGRU\nim...
[ [ "torch.nn.modules.pixelshuffle.PixelShuffle", "torch.nn.Conv2d", "torch.nn.BatchNorm2d", "torch.stack", "torch.nn.ReLU" ] ]
xxiao-1/gtsam
[ "8b1516f43ffdf6b5098fc282b566f2ee1edb50f6" ]
[ "python/gtsam/tests/test_Point3.py" ]
[ "\"\"\"\nGTSAM Copyright 2010-2019, Georgia Tech Research Corporation,\nAtlanta, Georgia 30332-0415\nAll Rights Reserved\n\nSee LICENSE for the license information\n\nPoint3 unit tests.\nAuthor: Frank Dellaert & Fan Jiang\n\"\"\"\nimport unittest\n\nimport gtsam\nimport numpy as np\nfrom gtsam.utils.test_case impor...
[ [ "numpy.testing.assert_array_equal", "numpy.array" ] ]
rhayes777/AutoFit
[ "f5d769755b85a6188ec1736d0d754f27321c2f06", "f5d769755b85a6188ec1736d0d754f27321c2f06" ]
[ "autofit/graphical/utils.py", "autofit/messages/normal.py" ]
[ "import collections\nfrom enum import Enum\nfrom functools import reduce\nfrom operator import mul\nfrom typing import Iterable, Tuple, TypeVar, Dict, NamedTuple, Optional, Union\nimport warnings\nimport logging\n\nimport numpy as np\nimport six\nfrom scipy.linalg import block_diag\nfrom scipy.optimize import Optim...
[ [ "numpy.square", "matplotlib.pyplot.gca", "numpy.minimum", "numpy.maximum", "numpy.min", "numpy.reshape", "numpy.linalg.multi_dot", "numpy.indices", "numpy.broadcast", "numpy.max", "numpy.asanyarray", "numpy.shape", "numpy.size", "numpy.prod", "numpy.rave...
rlouf/aesara
[ "150add2cde542805b69e74da235e5e7d9ff22d3c", "150add2cde542805b69e74da235e5e7d9ff22d3c" ]
[ "tests/tensor/test_sharedvar.py", "aesara/tensor/math_opt.py" ]
[ "from functools import update_wrapper\n\nimport numpy as np\nimport pytest\n\nimport aesara\nimport aesara.sparse\nimport aesara.tensor as at\nfrom aesara.misc.may_share_memory import may_share_memory\nfrom aesara.tensor import get_vector_length\nfrom aesara.tensor.basic import MakeVector\nfrom aesara.tensor.shape ...
[ [ "numpy.allclose", "numpy.asarray", "numpy.ones", "numpy.all", "numpy.float32", "numpy.array", "numpy.zeros" ], [ "numpy.log2", "numpy.allclose", "numpy.asarray", "numpy.int8", "numpy.all", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
vbautista379/astr-119-session-3
[ "60c6cdca3f89a02f823a44b4d92bbeec52af783d" ]
[ "functions.py" ]
[ "import numpy as np\nimport sys\n\n#define a function that returns a value\ndef expo(x):\n\treturn np.exp(x)\t#return the np e^x function\n\t\n#define a subroutine that does not return a value\ndef show_expo(n):\n\tfor i in range(n):\n\t\tprint(expo(float(i)))\t#call the expo funtion\n\t\t\n#define a main function\...
[ [ "numpy.exp" ] ]
jalayrupera/opencvBasics
[ "64be4ba03d4aa331c59c38cdd9f6f61621ccf922" ]
[ "7. Color Filtering/face- 7.py" ]
[ "import cv2\r\nimport numpy as np\r\n\r\ncap = cv2.VideoCapture(0)\r\n\r\nwhile(1):\r\n _, frame = cap.read()\r\n hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)\r\n \r\n lower_red = np.array([90,150,50])\r\n upper_red = np.array([255,255,180])\r\n \r\n mask = cv2.inRange(hsv, lower_red, upper_red...
[ [ "numpy.array", "numpy.ones" ] ]
motionlife/tensorflow
[ "25847c4fb449269c4641ff123645917ad6c80acd", "2eea17699f8417e0c8c5fa4834dbcde80325a704" ]
[ "tensorflow/python/compat/compat.py", "tensorflow/python/keras/losses.py" ]
[ "# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.platform.tf_logging.warning", "tensorflow.python.util.tf_export.tf_export" ], [ "tensorflow.python.ops.math_ops.log", "tensorflow.python.ops.math_ops.subtract", "tensorflow.python.keras.backend.epsilon", "tensorflow.python.keras.backend.name_scope", "tensorflow.p...
CaimdotAIAccount/youtube8mchallenge
[ "44a07314d6e89df5755b137716f2b4a87b632ce6" ]
[ "video_level_models.py" ]
[ "# Copyright 2016 Google Inc. 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 app...
[ [ "tensorflow.matmul", "tensorflow.multiply", "tensorflow.matrix_diag_part", "tensorflow.flags.DEFINE_string", "tensorflow.reduce_sum", "tensorflow.reshape", "tensorflow.sigmoid", "tensorflow.contrib.slim.l2_regularizer", "tensorflow.flags.DEFINE_float", "tensorflow.flags.DEF...
samlobel/simple_rl_mbrl
[ "ed868916d06dbf68f4af23bea83b0e852e88df6e", "ed868916d06dbf68f4af23bea83b0e852e88df6e" ]
[ "simple_rl/tasks/lunar_lander/wrappers.py", "simple_rl/agents/func_approx/sam_stuff/main.py" ]
[ "\"\"\"An observation wrapper that augments observations by pixel values.\"\"\"\n\nimport numpy as np\n\nfrom gym import spaces\nfrom gym.spaces import Box\nfrom gym import ObservationWrapper\nimport pdb\n\n\nclass PixelObservationWrapper(ObservationWrapper):\n \"\"\"Augment observations by pixel values.\"\"\"\n...
[ [ "numpy.issubdtype", "numpy.expand_dims" ], [ "torch.load", "numpy.asarray", "numpy.std", "matplotlib.pyplot.clf", "numpy.mean", "torch.cuda.is_available", "matplotlib.pyplot.figure" ] ]
djsegal/metis
[ "54b84108a58d3e95679b519eb361e6916a693709" ]
[ "X_airbnb_revisited/airbnb_pricer/utils/get_dist_to_clusters.py" ]
[ "import numpy as np\nimport pandas as pd\n\nfrom time import sleep\nfrom airbnb_pricer.utils.async_run import async_run\n\nmile_per_degree__latitude = 111.32 * 0.621371\nmile_per_degree__longitude = 84.35 * 0.621371\n\ndef get_dist_to_clusters(location_data, cluster_data):\n location_data = location_data.copy()\...
[ [ "numpy.sqrt", "pandas.DataFrame" ] ]
techierishi/flask-vue-sig-verifier
[ "40ed04422e3cbd02c2df64a6af2c4f8101a21cad" ]
[ "server/sigrecogtf.py" ]
[ "import cv2\nimport os\nimport tensorflow as tf\nimport preprocessor\n\n\ndef main(author):\n print('OpenCV version {} '.format(cv2.__version__))\n\n current_dir = os.path.dirname(__file__)\n\n training_folder = os.path.join(current_dir, 'data/training/', author)\n test_folder = os.path.join(current_dir...
[ [ "tensorflow.matmul", "tensorflow.zeros", "tensorflow.compat.v1.argmax", "tensorflow.compat.v1.global_variables_initializer", "tensorflow.compat.v1.Session", "tensorflow.compat.v1.placeholder", "tensorflow.compat.v1.disable_eager_execution", "tensorflow.compat.v1.log", "tensorfl...
huang-ziyuan/EssentialMC2
[ "87141df94c1ac8e426ceec071720b97f5b9d3b88", "87141df94c1ac8e426ceec071720b97f5b9d3b88", "87141df94c1ac8e426ceec071720b97f5b9d3b88" ]
[ "essmc2/transforms/tensor.py", "papers/CVPR2021-MOSI/impls/transforms/video.py", "essmc2/hooks/checkpoint.py" ]
[ "# Copyright 2021 Alibaba Group Holding Limited. All Rights Reserved.\n\nimport numpy as np\nimport torch\n\nfrom .registry import TRANSFORMS\n\n\ndef to_tensor(data):\n if isinstance(data, torch.Tensor):\n return data\n elif isinstance(data, np.ndarray):\n return torch.from_numpy(data)\n eli...
[ [ "torch.LongTensor", "torch.from_numpy", "torch.tensor", "torch.FloatTensor", "torch.cuda.is_available" ], [ "torch.fmod", "torch.max", "torch.floor", "torch.empty", "torch.min", "torch.zeros_like", "torch.tensor", "torch.arange", "torch.stack", "torc...
AppleHolic/fairseq
[ "ba340f2f4c2c541ceb126f87b219864058565505" ]
[ "fairseq/progress_bar.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n\"\"\"\nWrapper around various loggers and progress bars (e.g., tqdm).\n\"\"\"\n\nfrom collections import OrderedDict\nfrom contextl...
[ [ "torch.is_tensor" ] ]
prs-eth/graph-super-resolution
[ "bd5af4d9b1682c309262e4153f6529c9b0584bcb", "bd5af4d9b1682c309262e4153f6529c9b0584bcb" ]
[ "data/diml.py", "model/graph_sr_net.py" ]
[ "from pathlib import Path\n\nimport numpy as np\nimport torch\nfrom torch.utils.data import Dataset\nfrom torchvision.transforms import InterpolationMode, Resize\n\nfrom .utils import downsample, bicubic_with_mask, random_crop, random_rotate, random_horizontal_flip\n\nDIML_BASE_SIZE = (756, 1344)\n\n\nclass DIMLDat...
[ [ "numpy.sqrt", "torch.isnan" ], [ "torch.mean", "torch.ones", "torch.cat", "torch.zeros", "torch.sum", "torch.exp", "torch.nn.functional.pad" ] ]
Len-Li/pytorch3d
[ "95029e7a1211904814b3919cf12fe9d1952fb415", "95029e7a1211904814b3919cf12fe9d1952fb415" ]
[ "tests/common_testing.py", "tests/test_marching_cubes.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n\nimport os\nimport unittest\nfrom pathlib import Path\nfrom typing import Callable, Optional, Union\n\nimport numpy as np\nimport torch\nfrom PIL import Image\n\n\ndef get_tests_dir() -> Path:\n \"\"\"\n Returns Path for the directory ...
[ [ "torch.randint", "torch.is_tensor", "numpy.shape", "torch.cuda.device_count", "numpy.array" ], [ "torch.cuda.synchronize", "torch.ones", "torch.Tensor", "torch.zeros", "torch.tensor", "numpy.concatenate", "torch.rand", "torch.device" ] ]
nikhase/statsmodels
[ "e1822d4513f442002816bb898ca5794785f35c32", "e1822d4513f442002816bb898ca5794785f35c32", "e1822d4513f442002816bb898ca5794785f35c32", "e1822d4513f442002816bb898ca5794785f35c32", "e1822d4513f442002816bb898ca5794785f35c32", "e1822d4513f442002816bb898ca5794785f35c32", "e1822d4513f442002816bb898ca5794785f35c3...
[ "examples/python/quantile_regression.py", "statsmodels/tsa/base/tests/test_base.py", "statsmodels/examples/example_functional_plots.py", "statsmodels/examples/tsa/compare_arma.py", "examples/python/tsa_filters.py", "statsmodels/iolib/tests/test_pickle.py", "statsmodels/distributions/mixture_rvs.py", "...
[ "\n## Quantile regression\n\n# \n# This example page shows how to use ``statsmodels``' ``QuantReg`` class to replicate parts of the analysis published in \n# \n# * Koenker, Roger and Kevin F. Hallock. \"Quantile Regressioin\". Journal of Economic Perspectives, Volume 15, Number 4, Fall 2001, Pages 143–156\n# \n# We...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.scatter", "numpy.arange", "matplotlib.pyplot.ylim", "pandas.DataFrame", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlim", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.rc", "matplotlib.pyplot.ylabel" ...
happog/object_rect_attention
[ "31aaf0bc0631050f82a4754caa60e92bb24e13b0" ]
[ "tools/utils.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nimport collections\n\nclass strLabelConverterForAttention(object):\n \"\"\"Convert between str and label.\n\n NOTE:\n Insert `EOS` to the alphabet for attention.\n\n Args:\n alphabet (str): set of the possible characte...
[ [ "torch.LongTensor" ] ]
ravali27/Keras-FasterRCNN
[ "e0847e18a85c988ae8baaba50ea40a2a7c05c855" ]
[ "keras_frcnn/simple_parser.py" ]
[ "from __future__ import division\nimport numpy as np\nfrom scipy.ndimage import interpolation\n\n\ndef resize_n(old, new_shape):\n new_f, new_t = new_shape\n old_f, old_t = old.shape\n scale_f = new_f/old_f\n scale_t = new_t/old_t\n #print(scale_f, 'scale_f-------------------')\n #print(scale_t, '...
[ [ "scipy.ndimage.interpolation.zoom", "numpy.loadtxt", "numpy.stack" ] ]
zuhorski/EPL_Project
[ "2d2417652879cfbe33c44c003ad77b7222590849", "2d2417652879cfbe33c44c003ad77b7222590849" ]
[ "PythonVirtEnv/Lib/site-packages/win32com/test/testPippo.py", "PythonVirtEnv/Lib/site-packages/pandas/io/formats/style.py" ]
[ "import sys\nimport unittest\nimport pythoncom\nfrom win32com.client import Dispatch\nfrom win32com.client.gencache import EnsureDispatch\n\nclass PippoTester(unittest.TestCase):\n def setUp(self):\n from win32com.test.util import RegisterPythonServer\n from win32com.test import pippo_server\n ...
[ [ "numpy.array" ], [ "numpy.nanmax", "numpy.asarray", "numpy.nanmin", "pandas._config.get_option", "pandas.core.common.pipe", "pandas.io.formats.style_render.non_reducing_slice", "pandas.isna", "pandas.core.frame.DataFrame", "numpy.where", "pandas.io.formats.style_ren...
fclubb/fault-swath
[ "687b1af26a969b1ed4e94cc597b23762fd1bb3da", "687b1af26a969b1ed4e94cc597b23762fd1bb3da" ]
[ "data_processing/get_basin_medians.py", "plotting/LSDPlottingTools/inundation.py" ]
[ "# get_basin_medians.py\n# This script creates a shapefile of the basins along the SAF and gets the median channel gradient,\n# hillslope gradient and hilltop curvature in each basin\n# FJC 14/06/21\n\n# import modules\nimport pandas as pd\nimport geopandas as gpd\nimport numpy as np\nfrom shapely.geometry import P...
[ [ "numpy.percentile" ], [ "numpy.asarray", "numpy.max", "numpy.append", "numpy.mean", "numpy.count_nonzero", "numpy.savetxt", "numpy.ma.masked_where", "numpy.empty" ] ]
ooyamatakehisa/mirdata
[ "12303e4c9941d96cafc178a8f542abf6cdf7cb1b", "12303e4c9941d96cafc178a8f542abf6cdf7cb1b" ]
[ "mirdata/datasets/medleydb_pitch.py", "mirdata/datasets/cante100.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"MedleyDB pitch Dataset Loader\n\n.. admonition:: Dataset Info\n :class: dropdown\n\n MedleyDB Pitch is a pitch-tracking subset of the MedleyDB dataset \n containing only f0-annotated, monophonic stems. \n\n MedleyDB is a dataset of annotated, royalty-free multitrack recor...
[ [ "numpy.array" ], [ "numpy.array", "numpy.genfromtxt" ] ]
samhippie/shallow-red
[ "5690cdf380c6e138e25d88e85093738951438298" ]
[ "deepcfr.py" ]
[ "#!/usr/bin/env python3\n\nimport asyncio\nimport collections\nimport copy\nimport io\nimport math\nimport numpy as np\nimport random\nimport sys\nimport torch\nimport torch.distributed as dist\nimport os.path\n\nimport config\nimport model\nimport dataStorage\n\n#Deep MCCFR\n\n#based on this paper\n#https://arxiv....
[ [ "torch.distributed.send", "torch.zeros", "torch.distributed.recv", "torch.distributed.barrier", "torch.tensor", "numpy.ones", "numpy.array", "numpy.sum" ] ]
Hekstra-Lab/reciprocalspaceship
[ "48b72ad70608fdbdfef31f6b38aac5873abc0dba" ]
[ "tests/dtypes/test_inference.py" ]
[ "import pytest\nfrom pandas.testing import assert_series_equal\n\nimport reciprocalspaceship as rs\n\n\n@pytest.mark.parametrize(\n \"dataseries\",\n [\n (rs.DataSeries(range(10), dtype=rs.PhaseDtype()), \"P\"),\n (rs.DataSeries(range(10), dtype=rs.HKLIndexDtype()), \"H\"),\n (rs.DataSeri...
[ [ "pandas.testing.assert_series_equal" ] ]
mebusy/cs234_RL_2019_stanford
[ "6ca051294f8af5257a051d2933fcc6a39177f24d" ]
[ "assignments/assignment3/starter_code_torch/code/policy_gradient.py" ]
[ "import numpy as np\nimport torch\nimport gym\nimport os\nfrom general import get_logger, Progbar, export_plot\nfrom baseline_network import BaselineNetwork\nfrom network_utils import build_mlp, device, np2torch\nfrom policy import CategoricalPolicy, GaussianPolicy\n\n\nclass PolicyGradient(object):\n \"\"\"\n ...
[ [ "numpy.save", "numpy.concatenate", "numpy.max", "numpy.mean", "numpy.var", "numpy.array" ] ]
bozliu/E2E-Keyword-Spotting
[ "64fc6fe414370a12a22fdf8ca5c8379d2c60b64e", "64fc6fe414370a12a22fdf8ca5c8379d2c60b64e" ]
[ "kws/utils/mixup.py", "kws/transforms/transforms_stft.py" ]
[ "#!/usr/bin/env python\n\"\"\"\nSimple implementation for mixup. The loss and onehot functions origin from: https://github.com/moskomule/mixup.pytorch\n\nHongyi Zhang, Moustapha Cisse, Yann N. Dauphin, David Lopez-Paz: mixup: Beyond Empirical Risk Minimization\nhttps://arxiv.org/abs/1710.09412\n\"\"\"\n\n\n__all__ ...
[ [ "numpy.random.beta", "numpy.random.permutation", "torch.sum", "torch.nn.functional.softmax" ], [ "numpy.abs", "numpy.pad", "torch.randn", "torch.from_numpy", "torch.log" ] ]
pscedu/DPF-Core
[ "05816d1d4940aacc2b51055ab67b8f4c31fc1ca3" ]
[ "tests/test_scoping.py" ]
[ "import pytest\nimport numpy as np\n\nfrom ansys import dpf\nfrom ansys.dpf.core import Scoping\nimport numpy as np\nfrom ansys.dpf.core import errors as dpf_errors\nfrom ansys.dpf.core.check_version import meets_version, get_server_version\n\nserv = dpf.core.start_local_server('127.0.0.1', 50075)\nSERVER_VERSION_H...
[ [ "numpy.array", "numpy.allclose" ] ]
pcraster/lue
[ "e64c18f78a8b6d8a602b7578a2572e9740969202", "e64c18f78a8b6d8a602b7578a2572e9740969202" ]
[ "source/framework/python/test/algorithm/d8_flow_direction_test.py", "source/framework/python/test/algorithm/sin_test.py" ]
[ "import lue.framework as lfr\nimport lue_test\nimport numpy as np\n\n\ndef setUpModule():\n lue_test.start_hpx_runtime()\n\n\ndef tearDownModule():\n return\n lue_test.stop_hpx_runtime()\n\n\nclass D8FlowDirectionTest(lue_test.TestCase):\n\n @lue_test.framework_test_case\n def test_overloads(self):\n...
[ [ "numpy.dtype" ], [ "numpy.dtype" ] ]
matthew-brett/nibabel
[ "b61161a8bc42c37c6c8f24ec43736ce4d3d3cb6b" ]
[ "nibabel/tests/test_nifti1.py" ]
[ "# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##\n#\n# See COPYING file distributed along with the NiBabel package for the\n# copyright and license terms.\n#\n#...
[ [ "numpy.diag", "numpy.dot", "numpy.sqrt", "numpy.concatenate", "numpy.all", "numpy.mean", "numpy.iinfo", "numpy.linalg.svd", "numpy.allclose", "numpy.arange", "numpy.eye", "numpy.finfo", "numpy.zeros", "numpy.testing.assert_array_almost_equal", "numpy.arr...
mavrix93/LightCurvesClassifier
[ "a0a51f033cb8adf45296913f0de0aa2568e0530c", "a0a51f033cb8adf45296913f0de0aa2568e0530c" ]
[ "lcc_web/web/interface/helpers.py", "test/stars_processing/test_params_estim.py" ]
[ "import ast\nimport copy\nimport datetime\nimport json\nimport logging\nimport os\nimport shutil\nimport traceback\nimport warnings\nfrom io import StringIO\n\nimport numpy as np\nfrom astropy.io import fits\nfrom django.conf import settings\nfrom interface.models import StarsFilter\n\nfrom lcc.cli.input_parse impo...
[ [ "numpy.max", "numpy.min", "numpy.transpose" ], [ "numpy.random.normal", "numpy.cos", "numpy.linspace", "numpy.sin" ] ]
albert-dot-ai/allennlp
[ "580dc8b0e2c6491d4d75b54c3b15b34b462e0c67" ]
[ "allennlp/training/trainer.py" ]
[ "\"\"\"\nA :class:`~allennlp.training.trainer.Trainer` is responsible for training a\n:class:`~allennlp.models.model.Model`.\n\nTypically you might create a configuration file specifying the model and\ntraining parameters and then use :mod:`~allennlp.commands.train`\nrather than instantiating a ``Trainer`` yourself...
[ [ "torch.nn.parallel.parallel_apply", "torch.nn.parallel.replicate", "torch.nn.parallel.scatter_gather.scatter_kwargs", "torch.tensor", "torch.no_grad", "torch.save" ] ]
pinedbean/similarIV
[ "ee31311749c07e4fc93bfdcf8a575f3f5477d7d5" ]
[ "similarIV/instant_function.py" ]
[ "import pandas.core.algorithms as algos\nfrom pandas import Series\nimport scipy.stats.stats as stats\nimport re\nimport traceback\nimport string\nimport numpy as np\nimport pandas as pd\n\n\nmax_bin = 20\nforce_bin = 3\n\n# define a binning function\ndef mono_bin(Y, X, n = max_bin):\n \n df1 = pd.DataFrame({...
[ [ "numpy.log", "numpy.abs", "numpy.linspace", "numpy.unique", "numpy.issubdtype", "pandas.DataFrame", "numpy.insert", "pandas.Series.unique", "pandas.qcut" ] ]
DeqiTang/pymatflow
[ "bd8776feb40ecef0e6704ee898d9f42ded3b0186" ]
[ "pymatflow/elk/post/opt.py" ]
[ "import os\r\nimport sys\r\nimport datetime\r\nimport subprocess\r\nimport matplotlib.pyplot as plt\r\n\r\nfrom pymatflow.vasp.base.xyz import Atom\r\n\r\nclass opt_out:\r\n \"\"\"\r\n Note:\r\n \"\"\"\r\n def __init__(self):\r\n \"\"\"\r\n output:\r\n \"\"\"\r\n self.outcar ...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.close", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylabel" ] ]
OverHall27/Gasyori100knock
[ "341c528eb4c0789034898ee1f7d0a4b2f8b23eff" ]
[ "Question_11_20/myans/myans_18.py" ]
[ "import cv2\nimport numpy as np\n\ndef BGRGRAY(_img):\n\n img = np.zeros((_img.shape[0], _img.shape[1]), dtype=np.float32)\n img = _img[:,:,2].copy() * 0.2126 + _img[:,:,1].copy() * 0.7152 + _img[:,:,0].copy() * 0.0722\n\n return img.astype(np.uint8)\n\ndef EmbossFilter(img, K_size=3):\n\n Hol, Ver = im...
[ [ "numpy.zeros", "numpy.sum", "numpy.clip" ] ]
ParikhKadam/google-research
[ "7cee4b22b925581d912e8d993625c180da2a5a4f", "7cee4b22b925581d912e8d993625c180da2a5a4f" ]
[ "non_decomp/models.py", "vatt/utils/train/optimizers.py" ]
[ "# coding=utf-8\n# Copyright 2021 The Google Research Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.keras.backend.image_data_format", "tensorflow.keras.models.Model", "tensorflow.keras.regularizers.l2", "tensorflow.keras.backend.mean", "tensorflow.keras.initializers.RandomNormal" ], [ "tensorflow.keras.optimizers.Adam", "tensorflow.keras.optimizers.SGD" ] ]
jayvdb/astropy
[ "bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f", "bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f", "bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f", "bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f", "bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f", "bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991f", "bc6d8f106dd5b60bf57a8e6e29c4e2ae2178991...
[ "docs/wcs/examples/from_file.py", "astropy/table/tests/test_groups.py", "astropy/conftest.py", "astropy/modeling/tests/test_quantities_rotations.py", "astropy/io/tests/test_registry.py", "astropy/timeseries/sampled.py", "astropy/coordinates/tests/test_representation_arithmetic.py", "astropy/nddata/tes...
[ "# Load the WCS information from a fits header, and use it\n# to convert pixel coordinates to world coordinates.\n\nimport numpy as np\nfrom astropy import wcs\nfrom astropy.io import fits\nimport sys\n\n\ndef load_wcs_from_file(filename):\n # Load the FITS hdulist using astropy.io.fits\n hdulist = fits.open(...
[ [ "numpy.array", "numpy.abs" ], [ "numpy.arange", "numpy.all", "numpy.mean", "numpy.any", "numpy.add", "numpy.array", "numpy.sum" ], [ "matplotlib.rcdefaults", "matplotlib.use", "matplotlib.rcParams.update" ], [ "numpy.testing.assert_allclose" ], [...
vigsivan/fastMRI
[ "0f6c4c0176ff74bf2761d20ec62facb01c9038f8" ]
[ "fastmri/models/varnet.py" ]
[ "\"\"\"\nCopyright (c) Facebook, Inc. and its affiliates.\n\nThis source code is licensed under the MIT license found in the\nLICENSE file in the root directory of this source tree.\n\"\"\"\n\nimport math\nfrom typing import List, Tuple, Optional\n\nimport fastmri\nimport torch\nimport torch.nn as nn\nimport torch....
[ [ "torch.ones", "torch.zeros", "torch.min", "torch.argmin", "torch.where", "torch.ones_like", "torch.nn.functional.pad" ] ]
ikewai/hawaii_climate_products_container
[ "05e25faffd814b6c8c9e550897a976db3456a0fc" ]
[ "preliminary/air_temp/daily/code/cross_validate_temp.py" ]
[ "#Daily only\nimport sys\nimport rasterio\nimport numpy as np\nimport pandas as pd\n\nimport Temp_linear as tmpl\nfrom affine import Affine\nfrom pyproj import Transformer\n\n#DEFINE CONSTANTS--------------------------------------------------------------\nMASTER_DIR = r'/home/hawaii_climate_products_container/preli...
[ [ "pandas.read_csv", "pandas.to_datetime", "numpy.min", "numpy.arange", "pandas.DataFrame", "numpy.setdiff1d", "numpy.round", "numpy.max", "numpy.vectorize", "numpy.mean", "pandas.date_range", "numpy.array" ] ]
pingsutw/flytekit
[ "0a6be27372a3629fe48c6b0369f7aaf2dca5bf46" ]
[ "flytekit/types/structured/basic_dfs.py" ]
[ "import os\nimport typing\nfrom typing import TypeVar\n\nimport pandas\nimport pandas as pd\nimport pyarrow as pa\nimport pyarrow.parquet as pq\n\nfrom flytekit import FlyteContext\nfrom flytekit.core.data_persistence import DataPersistencePlugins\nfrom flytekit.models import literals\nfrom flytekit.models.literals...
[ [ "pandas.read_parquet" ] ]
konrad/openml-python
[ "5a2830cc494dbffe93fb324aa7eb98b8bf3f0b33" ]
[ "examples/30_extended/tasks_tutorial.py" ]
[ "\"\"\"\nTasks\n=====\n\nA tutorial on how to list and download tasks.\n\"\"\"\n\nimport openml\nimport pandas as pd\n\n############################################################################\n#\n# Tasks are identified by IDs and can be accessed in two different ways:\n#\n# 1. In a list providing basic informa...
[ [ "pandas.DataFrame.from_dict" ] ]
ZhiruiFeng/RL-League
[ "69eba8adb55384e6b65606322fc65d3a68ece54f" ]
[ "agents/modules/approximator.py" ]
[ "import tensorflow as tf\nimport os\nclass Estimator:\n \"\"\" Neural network for value approximator\n Here it is used for both Q-Network and the Target Network.\n \"\"\"\n\n def __init__(self, scope=\"estimator\", summaries_dir=None, valid_actions=[0,1,2,3]):\n self.scope = scope\n self.v...
[ [ "tensorflow.reduce_max", "tensorflow.summary.FileWriter", "tensorflow.summary.scalar", "tensorflow.train.RMSPropOptimizer", "tensorflow.reduce_mean", "tensorflow.shape", "tensorflow.range", "tensorflow.reshape", "tensorflow.contrib.framework.get_global_step", "tensorflow.pl...
JackInTaiwan/BertSum
[ "5b6f372b13358473d17c49bfc45f1e15c80f9fce" ]
[ "src/models/data_loader.py" ]
[ "import os\nimport gc\nimport glob\nimport random\nimport itertools\nimport torch\n\nfrom src.others.logging import logger\n\n\n\nclass Batch(object):\n def _pad(self, data, pad_id, width=-1):\n if (width == -1):\n width = max(len(d) for d in data)\n rtn_data = [d + [pad_id] * (width - l...
[ [ "torch.load" ] ]
vchatchai/python201
[ "783481dbb8b2a641583f1f349f95f22126bfa9ed" ]
[ "numpy_broadcasting.py" ]
[ "import numpy as np \nprint(f'numpy version: {np.__version__}')\n\nnp.random.seed(9)\nx = np.random.randint(1, 11, 5)\n\nprint(f'np.random.randint(1,11,5) => {x}')\n\nprint(f'x * 2 => {x*2}')\n\nb = np.array([2,2,2,2,2])\n\nprint(f'b => {b}')\n\n\nprint(f'x * np.array([2]) => {x * np.array([2])}')\n\nprint(f'repeat...
[ [ "numpy.random.seed", "numpy.arange", "numpy.full", "numpy.std", "numpy.mean", "numpy.repeat", "numpy.array", "numpy.random.randint" ] ]
altana-tech/scikit-network
[ "dedc9d3e694c7106e4709aae22dffb5142c15859", "dedc9d3e694c7106e4709aae22dffb5142c15859", "dedc9d3e694c7106e4709aae22dffb5142c15859", "dedc9d3e694c7106e4709aae22dffb5142c15859", "dedc9d3e694c7106e4709aae22dffb5142c15859" ]
[ "sknetwork/ranking/diffusion.py", "sknetwork/utils/seeds.py", "sknetwork/utils/parse.py", "sknetwork/visualization/dendrograms.py", "sknetwork/embedding/svd.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on July 17 2019\n@author: Nathan de Lara <ndelara@enst.fr>\n@author: Thomas Bonald <bonald@enst.fr>\n\"\"\"\nfrom typing import Union, Optional\n\nimport numpy as np\nfrom scipy import sparse\nfrom scipy.sparse.linalg import bicgstab, LinearOperator\...
[ [ "scipy.sparse.linalg.bicgstab", "numpy.clip", "scipy.sparse.diags", "numpy.ones", "numpy.zeros" ], [ "numpy.hstack", "numpy.zeros_like", "numpy.ones" ], [ "numpy.array", "numpy.ones_like", "scipy.sparse.csr_matrix" ], [ "numpy.array" ], [ "numpy....
JackKelly/neuralnilm_prototype
[ "2119292e7d5c8a137797ad3c9abf9f37e7f749af", "2119292e7d5c8a137797ad3c9abf9f37e7f749af", "2119292e7d5c8a137797ad3c9abf9f37e7f749af", "2119292e7d5c8a137797ad3c9abf9f37e7f749af", "2119292e7d5c8a137797ad3c9abf9f37e7f749af", "2119292e7d5c8a137797ad3c9abf9f37e7f749af", "2119292e7d5c8a137797ad3c9abf9f37e7f749a...
[ "scripts/e179.py", "scripts/e318.py", "scripts/e303.py", "scripts/e224.py", "scripts/e563.py", "scripts/disag_545c.py", "scripts/e271.py", "scripts/e314.py", "scripts/e131.py", "scripts/e125.py", "scripts/e512.py" ]
[ "from __future__ import print_function, division\nimport matplotlib\nmatplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!\nfrom neuralnilm import Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer\nfrom lasagne.nonlinearities import sigmoid, rectify\nfrom lasagne.objectives import crossen...
[ [ "matplotlib.use" ], [ "matplotlib.use" ], [ "matplotlib.use", "numpy.array" ], [ "matplotlib.use" ], [ "matplotlib.use", "numpy.array" ], [ "matplotlib.pyplot.subplots", "numpy.save", "numpy.concatenate", "numpy.load", "matplotlib.pyplot.show" ...
Anshnrag02/ML-Templates
[ "de8c871fabdafe79271685ffb40a6abe64c133b2", "de8c871fabdafe79271685ffb40a6abe64c133b2" ]
[ "classification/Rabdom forest classifier.py", "reinforcement learning/thompson sampling.py" ]
[ "#importing the libraries\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport pandas as pd\r\n\r\n\r\n#importing the dataset\r\ndataset = pd.read_csv('Social_Network_Ads.csv')\r\nX = dataset.iloc[:, :-1].values\r\ny = dataset.iloc[:, -1].values\r\n\r\n\r\n\r\n#splitting the dataset into training set ...
[ [ "matplotlib.pyplot.legend", "pandas.read_csv", "sklearn.ensemble.RandomForestClassifier", "matplotlib.pyplot.title", "numpy.unique", "sklearn.metrics.confusion_matrix", "sklearn.model_selection.train_test_split", "matplotlib.pyplot.ylabel", "matplotlib.colors.ListedColormap", ...