repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
behavioral-data/multiverse
[ "82b7265de0aa3e9d229ce9f3f86b8b48435ca365", "82b7265de0aa3e9d229ce9f3f86b8b48435ca365" ]
[ "src/models/CORAL-LM/coral/model/coral.py", "src/models/CORAL_BART/models.py" ]
[ "# from .bert_graph import BERTGraph\n\nimport torch.nn as nn\nfrom .bert import BERT\nimport pdb\nimport torch\n\n\nclass CORAL(nn.Module):\n \"\"\"\n CORAL: Code representation learning\n \"\"\"\n\n def __init__(self, bert: BERT, n_topics=5):\n super(CORAL, self).__init__()\n\n self.n_to...
[ [ "torch.nn.Linear", "torch.nn.Softmax" ], [ "torch.nn.Dropout", "torch.softmax", "numpy.random.random", "torch.nn.functional.softmax", "torch.nn.functional.log_softmax", "torch.zeros", "torch.load", "torch.topk", "numpy.tile", "torch.multinomial", "torch.tens...
nikhilkharade/Python
[ "86508ceb349226e17d36a0f8be155be7efd734bc" ]
[ "machine_learning/linear_regression.py" ]
[ "\"\"\"\nLinear regression is the most basic type of regression commonly used for\npredictive analysis. The idea is pretty simple: we have a dataset and we have\nfeatures associated with it. Features should be chosen very cautiously\nas they determine how much our model will be able to make future predictions.\nWe ...
[ [ "numpy.matrix", "numpy.dot", "numpy.square", "numpy.ones", "numpy.zeros" ] ]
aprilnovak/openmc
[ "507c155560aab38cd6957bf9df9feca801ccd8bc" ]
[ "openmc/data/multipole.py" ]
[ "from numbers import Integral, Real\nfrom math import exp, erf, pi, sqrt\n\nimport h5py\nimport numpy as np\n\nfrom . import WMP_VERSION\nfrom .data import K_BOLTZMANN\nimport openmc.checkvalue as cv\nfrom openmc.mixin import EqualityMixin\n\n\n# Formalisms\n_FORM_MLBW = 2\n_FORM_RM = 3\n\n# Constants that determ...
[ [ "numpy.arctan", "numpy.unique", "numpy.issubdtype", "numpy.cos", "numpy.sin", "scipy.special.wofz", "numpy.angle", "numpy.array", "numpy.zeros" ] ]
petersvenningsson/MMWCAS-RF-EVM-SP-chain
[ "d9b42f167da830a312834d757741a0d0ce3ee1fa" ]
[ "utils/load.py" ]
[ "import os\nimport json\n\nimport numpy as np\n\nfrom utils import calibrate\n\ndef read_binary(i_frame, path, config):\n \"\"\" Reads IQ sampled data from one cascade capture device.\n Returns ADC_samples: shape (chirp_samples, n_chirps, n_capture_transmitters, n_receivers)\n \"\"\"\n\n factors = [...
[ [ "numpy.fromfile", "numpy.reshape", "numpy.concatenate", "numpy.uint16", "numpy.prod" ] ]
yangbincheng/EMSRDPN
[ "71421db8e255916fb0885c7237885437719d0ece" ]
[ "src/main.py" ]
[ "import torch\n\nimport utility\nimport data\nimport model\nimport loss\nfrom option import args\nfrom trainer import Trainer\n\n#torch.set_printoptions(profile=\"full\")\ntorch.manual_seed(args.seed)\ncheckpoint = utility.checkpoint(args)\n\nif args.data_test == 'video':\n from videotester import VideoTester\n ...
[ [ "torch.manual_seed" ] ]
isu-veritas/gammapy
[ "715b041d7d3925bd51109dc9534634263a2f2d12", "715b041d7d3925bd51109dc9534634263a2f2d12", "715b041d7d3925bd51109dc9534634263a2f2d12", "715b041d7d3925bd51109dc9534634263a2f2d12", "715b041d7d3925bd51109dc9534634263a2f2d12" ]
[ "gammapy/datasets/tests/test_flux_points.py", "gammapy/data/observations.py", "gammapy/data/tests/test_pointing.py", "gammapy/estimators/tests/test_utils.py", "gammapy/estimators/utils.py" ]
[ "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nimport pytest\nimport numpy as np\nfrom numpy.testing import assert_allclose\nfrom astropy.table import Table\nfrom gammapy.datasets import Datasets, FluxPointsDataset\nfrom gammapy.estimators import FluxPoints\nfrom gammapy.modeling import Fit\nfrom...
[ [ "numpy.all", "numpy.array", "numpy.testing.assert_allclose" ], [ "numpy.max", "matplotlib.pyplot.subplots" ], [ "numpy.isnan", "numpy.testing.assert_allclose" ], [ "numpy.squeeze", "numpy.testing.assert_allclose" ], [ "numpy.isfinite", "numpy.nanmin", ...
Anna1015/WorkAtTokyo
[ "ed37b746c38c2f668feac20044fe4dec38336086" ]
[ "rnn.py" ]
[ "import torch\nfrom torch import nn\nimport torchvision.datasets as dsets\nimport torchvision.transforms as transforms\nimport matplotlib.pyplot as plt\nimport os\nimport numpy as np\nimport torch.utils.data as Data\n\n# Hyper Parameters\nEPOCH = 10 # train the training data n times, to save time, we ...
[ [ "torch.nn.CrossEntropyLoss", "torch.max", "torch.nn.LSTM", "torch.utils.data.TensorDataset", "numpy.vstack", "torch.utils.data.DataLoader", "torch.from_numpy", "torch.nn.Linear", "numpy.array", "numpy.zeros", "numpy.loadtxt" ] ]
youngsjjn/MemSeg
[ "a3daf8039dc2c763d366f4bfd07c87416cf8ec81" ]
[ "tool/test.py" ]
[ "import os\nimport time\nimport logging\nimport argparse\n\nimport cv2\nimport numpy as np\nimport torch\nimport torch.backends.cudnn as cudnn\nimport torch.nn.functional as F\nimport torch.nn.parallel\nimport torch.utils.data\nimport torch.nn as nn\n\nfrom util import dataset, transform, config\nfrom util.util imp...
[ [ "torch.nn.CrossEntropyLoss", "numpy.expand_dims", "torch.nn.functional.softmax", "numpy.uint8", "torch.utils.data.DataLoader", "numpy.ceil", "numpy.copy", "numpy.argmax", "numpy.mean", "torch.no_grad", "torch.nn.functional.interpolate", "numpy.transpose", "torch...
Tim-Tianyu/ditto
[ "a07659645a6670ae7c0ff3a6be27776669cd9a19" ]
[ "ditto/summarize.py" ]
[ "import numpy as np\nimport csv\nimport sys\nimport os\n\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom collections import Counter\nfrom nltk.corpus import stopwords\n\nfrom snippext.dataset import get_tokenizer\n\nstopwords = set(stopwords.words('english'))\n\nclass Summarizer:\n \"\"\"To su...
[ [ "sklearn.feature_extraction.text.TfidfVectorizer" ] ]
m0hit-kumar/probdists
[ "786d4f6c53534c318499d97200355f94c8c48919", "786d4f6c53534c318499d97200355f94c8c48919" ]
[ "probdists/Triangulardistribution.py", "probdists/Binomialdistribution.py" ]
[ "import math\nimport matplotlib.pyplot as plt\nfrom .Generaldistribution import Distribution\nfrom collections import Counter\nimport seaborn as sns\n\n\nclass Triangular(Distribution):\n \"\"\"\n Triangular distribution class for calculating and visualizing the\n triangular distribution: a continuous prob...
[ [ "matplotlib.pyplot.show" ], [ "matplotlib.pyplot.show" ] ]
LongzeSong/nni
[ "ae36373c8b2dfb338f32af6f9d3e1eed083a085a" ]
[ "src/sdk/pynni/nni/compression/torch/compressor.py" ]
[ "import logging\nimport torch\nfrom . import default_layers\n\n_logger = logging.getLogger(__name__)\n\n\nclass LayerInfo:\n def __init__(self, name, module):\n self.module = module\n self.name = name\n self.type = type(module).__name__\n\n self._forward = None\n\nclass Compressor:\n ...
[ [ "torch.onnx.export", "torch.Tensor", "torch.save" ] ]
gutenzwerg/colour
[ "24c98dc6e8ac041f8a823a9fce83857faaebc367", "24c98dc6e8ac041f8a823a9fce83857faaebc367", "24c98dc6e8ac041f8a823a9fce83857faaebc367", "24c98dc6e8ac041f8a823a9fce83857faaebc367" ]
[ "colour/models/rgb/transfer_functions/tests/test_itur_bt_709.py", "colour/algebra/tests/test_common.py", "colour/models/rgb/transfer_functions/tests/test_linear.py", "colour/temperature/tests/test_ohno2013.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nDefines unit tests for :mod:`colour.models.rgb.transfer_functions.itur_bt_709`\nmodule.\n\"\"\"\n\nimport numpy as np\nimport unittest\n\nfrom colour.models.rgb.transfer_functions import oetf_BT709, oetf_inverse_BT709\nfrom colour.utilities import domain_range_scale, ignore_numpy_e...
[ [ "numpy.reshape", "numpy.array", "numpy.tile" ], [ "numpy.array", "numpy.linspace" ], [ "numpy.reshape", "numpy.tile" ], [ "numpy.reshape", "numpy.array", "numpy.tile" ] ]
wenwei8268/Alink
[ "c00702538c95a32403985ebd344eb6aeb81749a7", "c00702538c95a32403985ebd344eb6aeb81749a7", "c00702538c95a32403985ebd344eb6aeb81749a7", "c00702538c95a32403985ebd344eb6aeb81749a7", "c00702538c95a32403985ebd344eb6aeb81749a7", "c00702538c95a32403985ebd344eb6aeb81749a7", "c00702538c95a32403985ebd344eb6aeb81749a...
[ "python/src/main/python/pyalink/alink/tests/examples/from_docs/test_vectorminmaxscalertrainbatchop.py", "python/src/main/python/pyalink/alink/tests/examples/from_docs/test_usercfusersperitemrecommender.py", "python/src/main/python/pyalink/alink/tests/examples/from_docs/test_stringapproxnearestneighborpredictbat...
[ "import unittest\nfrom pyalink.alink import *\nimport numpy as np\nimport pandas as pd\nclass TestVectorMinMaxScalerTrainBatchOp(unittest.TestCase):\n def test_vectorminmaxscalertrainbatchop(self):\n\n df = pd.DataFrame([\n [\"a\", \"10.0, 100\"],\n [\"b\", \"-2.5, 9\"],\n ...
[ [ "pandas.DataFrame" ], [ "pandas.DataFrame" ], [ "pandas.DataFrame" ], [ "pandas.DataFrame" ], [ "pandas.DataFrame" ], [ "pandas.DataFrame" ], [ "numpy.array", "pandas.DataFrame" ], [ "pandas.DataFrame" ], [ "numpy.array", "pandas.DataFram...
COSIMA/esmgrids
[ "130c8d00774c624c196fc2ca15f5cad78c4cdbc1" ]
[ "esmgrids/util.py" ]
[ "\nimport numpy as np\nimport pyproj\nfrom shapely.geometry import shape\n\nproj_str = '+proj=laea +lat_0={} +lon_0={} +ellps=sphere'\n\n\ndef calc_area_of_polygons(clons, clats):\n \"\"\"\n Calculate the area of lat-lon polygons.\n\n We project sphere onto a flat surface using an equal area projection\n ...
[ [ "numpy.zeros", "numpy.sum", "numpy.min" ] ]
arp95/pytorch-lightning
[ "649f3f142fe53103e63bf9c6a5161152ec216768" ]
[ "tests/base/model_test_steps.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.tensor", "torch.sum", "torch.cat", "torch.argmax" ] ]
kuanghuei/scene-graph-TF-release
[ "0e2eb7d3d3875a0c965e8093a7acf437879fe576" ]
[ "data_tools/vg_to_roidb_vrr_fullVGv2_coco_aware.py" ]
[ "# coding=utf8\n# --------------------------------------------------------\n# Scene Graph Generation by Iterative Message Passing\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Danfei Xu\n# --------------------------------------------------------\n\nimport argparse, json, string\nfrom col...
[ [ "numpy.min", "numpy.asarray", "numpy.max", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.vstack" ] ]
timhunderwood/pandas
[ "148f9fd74fc71cb7509c0898883036316efc6f89", "0159cba6eb14983ab7eaf38ff138c3c397a6fe3b", "148f9fd74fc71cb7509c0898883036316efc6f89", "0159cba6eb14983ab7eaf38ff138c3c397a6fe3b" ]
[ "pandas/core/indexes/interval.py", "pandas/tests/frame/methods/test_reset_index.py", "pandas/tests/frame/methods/test_isin.py", "pandas/tests/groupby/test_categorical.py" ]
[ "\"\"\" define the IntervalIndex \"\"\"\nfrom operator import le, lt\nimport textwrap\nfrom typing import Any, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom pandas._config import get_option\n\nfrom pandas._libs import lib\nfrom pandas._libs.interval import Interval, IntervalMixin, IntervalTree\nfrom pandas._...
[ [ "numpy.linspace", "pandas.core.dtypes.common.is_dtype_equal", "pandas.core.indexes.base.Index.__le__", "pandas.core.dtypes.common.is_datetime64tz_dtype", "pandas._libs.interval.IntervalTree", "numpy.concatenate", "pandas.core.indexes.base.Index", "pandas._config.get_option", "n...
marc-rigter/varibad
[ "2bc0cb91dac7cd6718b1f3afbb17d3272d848b16" ]
[ "learner.py" ]
[ "\"\"\"\nBase Learner, without Meta-Learning.\nCan be used to train for good average performance, or for the oracle environment.\n\"\"\"\n\nimport os\nimport time\nimport wandb\nimport gym\nimport numpy as np\nimport torch\n\nfrom algorithms.a2c import A2C\nfrom algorithms.online_storage import OnlineStorage\nfrom ...
[ [ "torch.FloatTensor", "numpy.array", "torch.no_grad", "torch.cuda.is_available" ] ]
jinkos/nuke_kaggle
[ "79585646e77bd45ea2ee80e2f683d0875a3e20ba" ]
[ "image_wrapper.py" ]
[ "from __future__ import print_function\n\nfrom skimage.io import imread, imshow\nfrom skimage.transform import rotate\nimport matplotlib.pyplot as plt\nfrom PIL import Image\nimport multiprocessing\nfrom tqdm import tqdm\nimport numpy as np\nimport sys\nimport os\n\nimport arg_config\nimport nuclear_gen\n\nuse_mult...
[ [ "numpy.expand_dims", "numpy.maximum", "numpy.min", "numpy.fliplr", "numpy.squeeze", "numpy.flipud", "numpy.max", "numpy.array", "matplotlib.pyplot.show", "numpy.zeros", "numpy.empty" ] ]
Shengyuan-Z/AGRL.pytorch
[ "6107fe0e4df5c8048a65f811bab46d2fb4624783", "6107fe0e4df5c8048a65f811bab46d2fb4624783", "6107fe0e4df5c8048a65f811bab46d2fb4624783" ]
[ "torchreid/models/resnet.py", "torchreid/utils/torchtools.py", "torchreid/data_manager/prid2011.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\n\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\nimport torchvision\n\nfrom ..utils.torchtools import weights_init_kaiming\n\n__all__ = ['ResNet50', 'ResNet101', 'ResNet50M', 'ResNet50B']\n\n\nclass ResNet50(nn.Modu...
[ [ "torch.nn.BatchNorm1d", "torch.nn.Sequential", "torch.nn.Dropout", "torch.cat", "torch.nn.Linear", "torch.nn.LeakyReLU", "torch.nn.ReLU" ], [ "torch.nn.init.constant_", "torch.nn.init.xavier_normal_", "torch.is_tensor", "torch.nn.init.normal_", "torch.nn.init.ka...
Takishima/mindquantum
[ "e90dfe474b759023d7ae18281b9a87cb8d223d04", "e90dfe474b759023d7ae18281b9a87cb8d223d04" ]
[ "tutorials/source/quantum_approximate_optimization_algorithm.py", "mindquantum/third_party/unitary_cc.py" ]
[ "# -*- coding: utf-8 -*-\n# Copyright 2022 <Huawei Technologies Co., Ltd>\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-...
[ [ "matplotlib.pyplot.xticks", "matplotlib.pyplot.show", "numpy.abs", "matplotlib.pyplot.bar" ], [ "numpy.ceil" ] ]
UYousafzai/pytabulate
[ "418300a04c8a730d2808c77f5630561e690d28d5" ]
[ "pytabulate/generate_analytics.py" ]
[ "\"\"\"\n\nCORE ANALYTICS MODULE: Generates the analytical meta-data from tables database, this distribution is consumed in data generation and augmentation\nmethods.\n\nMax Row Support: 17\n\nMax Column Support: 40\n\n\"\"\"\n\nimport os\nimport cv2\nimport glob\nimport pickle\nimport numpy as np\nimport utility a...
[ [ "numpy.true_divide", "numpy.sqrt", "numpy.nan_to_num", "numpy.ones", "numpy.copy", "numpy.zeros", "numpy.where" ] ]
steelONIONknight/bolt
[ "9bd3d08f2abb14435ca3ad0179889e48fa7e9b47", "9bd3d08f2abb14435ca3ad0179889e48fa7e9b47", "9bd3d08f2abb14435ca3ad0179889e48fa7e9b47", "9bd3d08f2abb14435ca3ad0179889e48fa7e9b47", "9bd3d08f2abb14435ca3ad0179889e48fa7e9b47" ]
[ "training/src/tests/tests/python/depthwise_conv1d.py", "training/src/tests/tests/python/RMSprop.py", "training/src/tests/tests/python/linear.py", "training/src/tests/tests/python/gru_cell.py", "training/src/tests/tests/python/cnnDepthwise.py" ]
[ "# Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved.\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without limitation the rights ...
[ [ "torch.set_printoptions", "torch.manual_seed", "torch.randn", "torch.nn.Conv1d" ], [ "torch.set_printoptions", "torch.manual_seed", "torch.optim.rmsprop.RMSprop", "torch.rand" ], [ "torch.nn.Linear", "torch.tensor" ], [ "torch.ones", "torch.zeros", "...
yma042/verif
[ "506ca3ca9713fdc01dee306edee6a5e21e6d4deb" ]
[ "verif/tests/integration_test.py" ]
[ "import unittest\nimport verif.driver\nimport os\nimport numpy as np\nimport tempfile\nnp.seterr('raise')\n\n\nall_axes = [\"time\", \"leadtime\", \"timeofday\", \"dayofyear\", \"monthofyear\", \"day\", \"week\", \"month\", \"year\", \"leadtimeday\", \"location\", \"lat\", \"lon\", \"elev\"]\n\n\nclass IntegrationT...
[ [ "numpy.seterr" ] ]
dpwe/calc_sbpca
[ "6a0a3631e7c7c647fc826596cfd96eeafd643a19" ]
[ "python/test_SAcC.py" ]
[ "#!/usr/bin/env python\n\"\"\"\ntest_SAcC.py\ntest harness for SAcC.py\n\"\"\"\n\nimport SAcC\nimport numpy as np\nconfig = {}\n\n# Input/Output files\nfilename = 'input8k.wav'\n#filename = '60sec_37497_20120228_020100_24537_appen-cts-pus_F.wav'\noutfilename = 'sacc8k.txt'\n#outfilename = '60sec_37497_2012022...
[ [ "numpy.savetxt", "numpy.shape" ] ]
GiulioCMSanto/HDSIdent
[ "88d3b5a7d1d99b5c90f2114a939b83294c003d25", "88d3b5a7d1d99b5c90f2114a939b83294c003d25" ]
[ "HDSIdent/initial_intervals/exponentially_weighted.py", "HDSIdent/model_structures/model_structures.py" ]
[ "import math\nimport pandas as pd\nimport numpy as np\nfrom collections import defaultdict\nfrom joblib import Parallel, delayed\n\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nsns.set_style(\"darkgrid\")\n\n\nclass ExponentiallyWeighted(object):\n \"\"\"\n Exponentially Weighted Moving Average C...
[ [ "matplotlib.pyplot.legend", "numpy.concatenate", "matplotlib.pyplot.plot", "numpy.max", "numpy.mean", "numpy.var", "numpy.stack", "numpy.std", "numpy.zeros", "matplotlib.pyplot.figure", "matplotlib.pyplot.title", "numpy.min", "numpy.array", "matplotlib.pyplo...
tjiagoM/quantised-bayesian-nets
[ "c6ff1db376c366633afa2845b7527cc144ffd3b2", "c6ff1db376c366633afa2845b7527cc144ffd3b2" ]
[ "experiments/scripts/stochastic/bbb/float/bbb_mnist.py", "tests/plot_distortions.py" ]
[ "import sys\nimport torch\nimport argparse\nfrom datetime import timedelta\nimport logging\n\nsys.path.append(\"../\")\nsys.path.append(\"../../\")\nsys.path.append(\"../../../\")\nsys.path.append(\"../../../../\")\nsys.path.append(\"../../../../../\")\n\nfrom experiments.utils import evaluate_mnist_uncertainty\nfr...
[ [ "torch.no_grad", "torch.optim.lr_scheduler.CosineAnnealingLR" ], [ "numpy.array", "matplotlib.gridspec.GridSpec", "numpy.transpose" ] ]
synapticarbors/DEODR
[ "e67f1792de90669b9adbf1a8103a9ca3b2c2c3dc" ]
[ "deodr/pytorch/mesh_fitter_pytorch.py" ]
[ "\"\"\"Modules containing pytorch classes to fit 3D meshes to images using differentiable rendering.\"\"\"\n\n\nimport copy\n\nimport numpy as np\n\nimport scipy.sparse.linalg\nimport scipy.spatial.transform.rotation\n\nimport torch\n\nfrom . import CameraPytorch, LaplacianRigidEnergyPytorch, Scene3DPytorch\nfrom ....
[ [ "torch.mean", "numpy.maximum", "torch.sum", "numpy.linalg.norm", "numpy.tile", "torch.tensor", "numpy.full", "torch.optim.LBFGS", "numpy.std", "numpy.column_stack", "torch.clamp", "numpy.array", "numpy.zeros", "torch.cross" ] ]
JFK24/seqQscorer
[ "e08a59defbf16b7530eb6f3764f280e00c84ad1e" ]
[ "analysis_source_code/GEO_data_analysis/plot_PCA.py" ]
[ "\"\"\"Plot PCA for a given GEO dataset\n\nBased on the tpm expression values of the given GEO dataset this script\npost-processes the expression values and applies the PCA. The first two\nprincipal components are used to plot samples in two dimensions. As\ndescribed in the paper, the quality probabilities are adde...
[ [ "matplotlib.pyplot.text", "matplotlib.pyplot.legend", "matplotlib.pyplot.yticks", "pandas.read_csv", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.xticks", "sklearn.preprocessing.scale", "sklearn.decomposition.PCA", "matplotlib.pyplot.ylabel" ] ]
benblack769/ray
[ "def97a4c53772701fa3fe4b4f8512509672ecb84" ]
[ "rllib/evaluation/sampler.py" ]
[ "from abc import abstractmethod, ABCMeta\nfrom collections import defaultdict, namedtuple\nimport logging\nimport numpy as np\nimport queue\nimport threading\nimport time\nfrom typing import Any, Callable, Dict, List, Iterable, Optional, Set, Tuple,\\\n TYPE_CHECKING, Union\n\nfrom ray.util.debug import log_once...
[ [ "numpy.array", "numpy.stack" ] ]
Corallus-Caninus/scipy
[ "c734dacd61c5962a86ab3cc4bf2891fc94b720a6" ]
[ "scipy/ndimage/tests/test_fourier.py" ]
[ "import numpy\nfrom numpy import fft\nfrom numpy.testing import (assert_almost_equal, assert_array_almost_equal)\n\nimport pytest\n\nfrom scipy import ndimage\n\n\nclass TestNdimageFourier:\n\n @pytest.mark.parametrize('shape', [(32, 16), (31, 15)])\n @pytest.mark.parametrize('dtype, dec',\n ...
[ [ "scipy.ndimage.sum", "scipy.ndimage.fourier_uniform", "numpy.fft.irfft", "numpy.fft.fft", "numpy.fft.rfft", "numpy.arange", "scipy.ndimage.fourier_ellipsoid", "numpy.ones", "numpy.fft.ifft", "scipy.ndimage.fourier_gaussian", "scipy.ndimage.fourier_shift", "numpy.zer...
mbbatukan/vfo
[ "27662cba01c713a5f09dcbf1a765e1120d6ad8a2" ]
[ "vfo/internal_database_functions.py" ]
[ "import numpy as np\nimport os\nimport warnings\nimport openseespy.opensees as ops\n\n\n\ndef _getNodesandElements():\n\t\"\"\"\n\tThis function returns the nodes and elments for an active model, in a \n\tstandardized format. The OpenSees model must be active in order for the \n\tfunction to work.\n \n\tReturns\...
[ [ "numpy.savetxt", "numpy.zeros", "numpy.asarray", "numpy.loadtxt" ] ]
tradingalgorithms/pyfolio
[ "b965e786c82af8d6db3b84d64920befae76734fc" ]
[ "pyfolio/tests/test_risk.py" ]
[ "from unittest import TestCase\nfrom nose_parameterized import parameterized\nimport os\nimport gzip\n\nimport pandas as pd\nfrom pandas import read_csv\nfrom pyfolio.utils import to_utc\n\nfrom pandas.util.testing import assert_frame_equal, assert_series_equal\n\nfrom pyfolio.risk import (compute_style_factor_expo...
[ [ "pandas.Panel", "pandas.read_csv", "pandas.util.testing.assert_series_equal", "pandas.concat" ] ]
Sayar1106/Heart-Disease-Web-Application
[ "3dd2293056b73b251fcc21e154a663b592fca168" ]
[ "app/src/utils/predictor.py" ]
[ "import streamlit as st\nimport pandas as pd\nimport joblib\n\ndef create_inference_input(df):\n \"\"\"\n Function that creates an input form for ML model.\n\n The function will build the structure for an input form\n using Streamlit functions. The input from the form will be\n taken and converted in...
[ [ "pandas.get_dummies" ] ]
sergunya17/catalyst
[ "84bc7576c981278f389279d87dda85dd66a758b6", "f98d71138c09cd1b5a69b788cb5006115f5c7fda", "f98d71138c09cd1b5a69b788cb5006115f5c7fda", "f98d71138c09cd1b5a69b788cb5006115f5c7fda" ]
[ "catalyst/contrib/datasets/misc.py", "tests/pipelines/test_sklearn_classifier_mnist.py", "catalyst/utils/tracing.py", "tests/pipelines/test_mnist_multimodel.py" ]
[ "import codecs\nimport gzip\nimport hashlib\nimport lzma\nimport os\nimport tarfile\nimport zipfile\n\nimport numpy as np\n\nimport torch\nfrom torch.utils.model_zoo import tqdm\n\n\ndef _gen_bar_updater():\n pbar = tqdm(total=None)\n\n def bar_update(count, block_size, total_size):\n if pbar.total is ...
[ [ "numpy.prod", "numpy.frombuffer", "numpy.dtype", "torch.utils.model_zoo.tqdm" ], [ "torch.optim.lr_scheduler.MultiStepLR", "torch.utils.data.DataLoader", "torch.nn.Flatten", "torch.nn.Linear", "torch.nn.LeakyReLU" ], [ "torch.jit.trace" ], [ "torch.nn.Linear...
pcallier/scipy
[ "0efe8d0a877a990c0adf059db67aa5d5b97c1849" ]
[ "scipy/misc/pilutil.py" ]
[ "\"\"\"\nA collection of image utilities using the Python Imaging Library (PIL).\n\nNote that PIL is not a dependency of SciPy and this module is not\navailable on systems that don't have PIL installed.\n\n\"\"\"\nfrom __future__ import division, print_function, absolute_import\n\n# Functions which need the PIL\n\n...
[ [ "numpy.asarray", "numpy.arange", "numpy.issubdtype", "numpy.transpose", "numpy.ones", "numpy.iscomplexobj", "numpy.ravel", "numpy.array" ] ]
fcitil/UAV-Line-Follower
[ "4899c5f6bc4e48b74145a6c7d4020494ce5ca582" ]
[ "linefollow-videoinputver.py" ]
[ "import cv2 as cv\nimport numpy as np\nimport time\n\ndef intersection(img):\n height,width,channels=img.shape\n ppt = np.array([\n [width/20,height/20*19],\n [width/20*19,height/20*19],\n [width/20*19,height/20],\n [width/20,height/20]\n ], np.int32)\n ppt = ppt.reshape(...
[ [ "numpy.array" ] ]
jahall/GPflow
[ "7bf3bf755d7b5d9de9f46827af4033c2f5fb05c9", "7bf3bf755d7b5d9de9f46827af4033c2f5fb05c9" ]
[ "tests/test_variational.py", "gpflow/kernels/base.py" ]
[ "# Copyright 2016 the GPflow 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 required by applicable law or agr...
[ [ "numpy.log", "numpy.linalg.solve", "numpy.sqrt", "numpy.linalg.slogdet", "numpy.eye", "numpy.ones", "numpy.testing.assert_allclose", "numpy.array", "numpy.zeros", "numpy.random.RandomState" ], [ "tensorflow.transpose", "tensorflow.concat", "tensorflow.reshap...
Dawars/graphics
[ "8b3013e0188f9317aea3bc0637b6ae74b4a3e837" ]
[ "tensorflow_graphics/geometry/transformation/tests/rotation_matrix_3d_test.py" ]
[ "#Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to...
[ [ "tensorflow.convert_to_tensor", "tensorflow.matmul", "numpy.expand_dims", "numpy.tile", "numpy.linalg.norm", "numpy.ones", "numpy.random.normal", "numpy.random.uniform", "numpy.array", "numpy.zeros", "numpy.random.randint" ] ]
johannlilly/tf-quant-finance
[ "0259bf2b93bb1742ad661abc82b9a84156bc2dfc", "0259bf2b93bb1742ad661abc82b9a84156bc2dfc" ]
[ "tf_quant_finance/models/hjm/swaption_pricing.py", "tf_quant_finance/models/hjm/swaption_pricing_test.py" ]
[ "# Lint as: python3\n# Copyright 2020 Google LLC\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab...
[ [ "tensorflow.compat.v2.math.reduce_mean", "tensorflow.compat.v2.name_scope", "tensorflow.compat.v2.broadcast_to", "tensorflow.compat.v2.where", "tensorflow.compat.v2.math.reduce_sum", "tensorflow.compat.v2.shape", "tensorflow.compat.v2.convert_to_tensor", "tensorflow.compat.v2.expan...
mageofboy/pylot
[ "d1295a42f0edd79670dc64053824a3e075d433e2", "d1295a42f0edd79670dc64053824a3e075d433e2" ]
[ "scripts/gen_crops_from_obj_tracker_logs.py", "pylot/perception/fusion/fusion_verification_operator.py" ]
[ "\"\"\"\nTakes in a folder of observations (center-[timestep].png images,\nmot-[timestep].txt tracker logs) and creates and saves crops of the bounding\nboxes. Useful for training the feature extractor model for DeepSORT tracker.\n\nExample usage:\npython gen_crops_from_obj_tracker_logs.py --data sample_data --out ...
[ [ "numpy.random.randint" ], [ "numpy.array", "numpy.linalg.norm" ] ]
TheSeriousProgrammer/Keras_QuickNet_SSD
[ "30c3c7ac8a2c05cc60fb4635a3f954c45e46108a" ]
[ "utils/priors.py" ]
[ "from typing import List\r\nimport itertools\r\nimport collections\r\nimport tensorflow as tf\r\nimport numpy as np\r\nfrom utils.misc import *\r\n\r\nSSDBoxSizes = collections.namedtuple('SSDBoxSizes', ['min', 'max'])\r\n\r\nSSDSpec = collections.namedtuple('SSDSpec', ['feature_map_size', 'shrinkage', 'box_sizes',...
[ [ "tensorflow.convert_to_tensor", "tensorflow.math.argmax", "tensorflow.constant", "numpy.sqrt", "numpy.clip", "tensorflow.math.reduce_max", "tensorflow.less", "tensorflow.shape", "tensorflow.ones_like", "tensorflow.expand_dims", "tensorflow.gather", "numpy.array" ]...
lshengjian/rlstudy
[ "263bf68c94867551002ff0b02441c67b02ebe8ef" ]
[ "rlstudy/a2c/policies.py" ]
[ "import numpy as np\nimport tensorflow as tf\n#from gym import Discrete\nfrom rlstudy.common.utils import conv, fc, conv_to_fc, batch_to_seq, seq_to_batch\nfrom rlstudy.common.distributions import make_pdtype\n#from rlstudy.common.input import observation_input\nfrom gym.spaces import Discrete, Box\n\ndef nature_cn...
[ [ "numpy.sqrt", "tensorflow.cast", "tensorflow.placeholder", "tensorflow.one_hot", "tensorflow.to_float", "tensorflow.variable_scope" ] ]
boehm-e/self-attentive-parser
[ "24a50b529d38cc182082e4e72bbf79d1b24ec1da" ]
[ "src/benepar/integrations/spacy_plugin.py" ]
[ "import numpy as np\n\nfrom .downloader import load_trained_model\nfrom ..parse_base import BaseParser, BaseInputExample\nfrom .spacy_extensions import ConstituentData, NonConstituentException\n\nimport torch\n\n\nclass PartialConstituentData:\n def __init__(self):\n self.starts = [np.array([], dtype=int)...
[ [ "numpy.hstack", "numpy.array", "torch.cuda.is_available" ] ]
himopantsu/shaxybot
[ "5396933cca7fbd26ac45a7a67af43f9476451323" ]
[ "Document2.py" ]
[ "import discord\r\nimport glob\r\nfrom discord.ext import commands,tasks\r\nimport gspread\r\nimport random # おみくじで使用\r\nfrom oauth2client.service_account import ServiceAccountCredentials\r\nimport numpy as np\r\nimport pandas as pd\r\nimport datetime\r\nimport os\r\nimport urllib.request, urllib.error\r\nimport r...
[ [ "numpy.array", "numpy.zeros" ] ]
c4dt/Garfield
[ "952c124490ba524e81ef45d5d7565ec408697bfc" ]
[ "pytorch_impl/libs/garfieldpp/worker.py" ]
[ "# coding: utf-8\n###\n # @file worker.py\n # @author Arsany Guirguis <arsany.guirguis@epfl.ch>\n #\n # @section LICENSE\n #\n # Copyright (c) 2020 Arsany Guirguis.\n #\n # Permission is hereby granted, free of charge, to any person obtaining a copy\n # of this software and associated documentation files (the \"...
[ [ "torch.cat", "torch.reshape", "torch.device", "torch.cuda.device_count", "torch.autograd.profiler.profile" ] ]
SokolovYaroslav/tranX
[ "73713c261a184c78ea7804f235c0ffb37385a3c4", "73713c261a184c78ea7804f235c0ffb37385a3c4" ]
[ "model/transformer_utils.py", "model/nn_utils.py" ]
[ "# coding=utf-8\nfrom __future__ import print_function\n\nimport copy\nimport math\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass EncoderDecoder(nn.Module):\n \"\"\"\n A standard Encoder-Decoder architecture. Base for this and many\n other models.\n ...
[ [ "torch.nn.Dropout", "torch.nn.functional.softmax", "torch.cat", "torch.zeros", "torch.sin", "numpy.arange", "torch.from_numpy", "torch.nn.Embedding", "torch.nn.LayerNorm", "numpy.ones", "torch.nn.Linear", "torch.matmul", "torch.DoubleTensor", "torch.cos" ]...
Xiatian-Zhu/FEAT
[ "48331e00dec8b1aa20f6cd7c397cef16f06ea2f6", "47bdc7c1672e00b027c67469d0291e7502918950" ]
[ "model/models/featv2.py", "model/models/bilstm.py" ]
[ "import torch\nimport torch.nn as nn\nimport numpy as np\nimport torch.nn.functional as F\n\nfrom model.models import FewShotModel\n\nclass ScaledDotProductAttention(nn.Module):\n ''' Scaled Dot-Product Attention '''\n\n def __init__(self, temperature, attn_dropout=0.1):\n super().__init__()\n s...
[ [ "torch.nn.functional.normalize", "torch.nn.Softmax", "torch.nn.Dropout", "torch.mean", "numpy.sqrt", "torch.nn.functional.log_softmax", "numpy.power", "torch.nn.init.xavier_normal_", "torch.sum", "torch.nn.LayerNorm", "torch.nn.Linear", "torch.bmm", "numpy.prod"...
Knight13/Exploring-Deep-Neural-Decision-Trees
[ "27f33fc7542c46cf3b793f7c1a74d76eb04b47a2" ]
[ "Breast Cancer/DT.py" ]
[ "import numpy as np\nimport random\nimport cancer_data\nfrom sklearn import tree\nimport time\nfrom sklearn.model_selection import train_test_split\n\nx = cancer_data.feature\ny = cancer_data.label\n\nseed = random.seed(1990)\n\nX_train, X_test, y_train, y_test = train_test_split(x, y, train_size=0.70, random_state...
[ [ "sklearn.tree.DecisionTreeClassifier", "numpy.argmax", "sklearn.model_selection.train_test_split" ] ]
wangjiehui11235/panther
[ "cf1ca2f0c7107c5cdacf2f7ff4002d43427d9b07", "cf1ca2f0c7107c5cdacf2f7ff4002d43427d9b07", "cf1ca2f0c7107c5cdacf2f7ff4002d43427d9b07" ]
[ "utilities/calc_tools.py", "alphax/factor_alpha101.py", "client_integrated.py" ]
[ "#!/usr/bin/env python\n# coding=utf-8\nimport numpy as np\nimport pandas as pd\n\n\nclass CalcTools(object):\n @classmethod\n def is_zero(cls, data_frame):\n return np.where(data_frame > -0.000001,\n np.where(data_frame < 0.000001, True, False)\n , False)\...
[ [ "numpy.where", "pandas.DataFrame" ], [ "numpy.matrix", "numpy.dot", "numpy.log", "numpy.sqrt", "pandas.Series", "pandas.DataFrame", "numpy.sign", "numpy.cov", "numpy.prod", "numpy.sum" ], [ "pandas.read_sql" ] ]
eigenfoo/Theano-PyMC
[ "d079273a9f8f8991923391eb7a83416bdd1b659e" ]
[ "theano/tensor/basic.py" ]
[ "\"\"\"A `Type` and `Op` classes to work with numpy.ndarrays symbolically.\"\"\"\n\nimport builtins\nimport logging\nimport numbers\nimport warnings\nfrom collections.abc import Sequence\nfrom functools import partial\n\nimport numpy as np\n\nimport theano\nimport theano.scalar.sharedvar\nfrom theano import compile...
[ [ "numpy.dot", "numpy.minimum", "numpy.asarray", "numpy.dtype", "numpy.concatenate", "numpy.max", "numpy.all", "numpy.mean", "numpy.tri", "numpy.iinfo", "numpy.allclose", "numpy.may_share_memory", "numpy.reshape", "numpy.arange", "numpy.eye", "numpy.ch...
Beaver48/kaggle-chest-xray-abnormalities
[ "d41f32d1c59cb5c925795df3291e929b3ea6d5fd", "d41f32d1c59cb5c925795df3291e929b3ea6d5fd", "d41f32d1c59cb5c925795df3291e929b3ea6d5fd" ]
[ "vinbigdata/preprocess.py", "vinbigdata/visualize.py", "vinbigdata/postprocess.py" ]
[ "import glob\nimport shutil\nfrom abc import ABC, abstractmethod\nfrom pathlib import Path\nfrom typing import List, Optional, Tuple\n\nimport cv2\nimport numpy as np\nfrom albumentations import BboxParams, Compose, Resize\nfrom pascal_voc_writer import Writer\nfrom pydicom import dcmread\nfrom pydicom.pixel_data_h...
[ [ "numpy.concatenate", "numpy.max", "numpy.amax", "numpy.min" ], [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.figure" ], [ "numpy.max", "numpy.zeros" ] ]
drib861204/rlkit
[ "08969d004c1be6eb2967174b48ab59b8bb33d11d" ]
[ "rlkit/core/eval_util.py" ]
[ "\"\"\"\nCommon evaluation utilities.\n\"\"\"\n\nfrom collections import OrderedDict\nfrom numbers import Number\n\nimport numpy as np\n\nimport rlkit.pythonplusplus as ppp\n\n\ndef get_generic_path_information(paths, stat_prefix=''):\n \"\"\"\n Get an OrderedDict with a bunch of statistic names and values.\n...
[ [ "numpy.hstack", "numpy.min", "numpy.concatenate", "numpy.max", "numpy.std", "numpy.mean", "numpy.array", "numpy.vstack" ] ]
leonMatzner/geoopt
[ "4a7058e43bf78ab5012b862076a74bec175df221" ]
[ "tests/test_gyrovector_math.py" ]
[ "\"\"\"\nTests ideas are taken mostly from https://github.com/dalab/hyperbolic_nn/blob/master/util.py with some changes\n\"\"\"\nimport torch\nimport random\nimport numpy as np\nimport pytest\nimport warnings\nimport itertools\nimport geoopt\nfrom geoopt.manifolds import stereographic\n\n\n@pytest.fixture(scope=\"f...
[ [ "torch.linspace", "torch.ones", "torch.empty", "torch.rand_like", "numpy.random.seed", "torch.zeros", "torch.manual_seed", "torch.isnan", "torch.zeros_like", "torch.eye", "torch.tensor", "torch.isfinite", "torch.rand", "torch.arange", "torch.as_tensor" ...
JohnGiorgi/seq2rel
[ "5ada6d3914c0156e93467ab38f29212458f84d53" ]
[ "tests/modules/attention/test_multihead_attention.py" ]
[ "import numpy\nimport torch\nfrom allennlp.common import Params\nfrom allennlp.common.testing.test_case import AllenNlpTestCase\nfrom allennlp.modules.attention.attention import Attention\nfrom numpy.testing import assert_almost_equal\nfrom seq2rel.modules.attention.multihead_attention import MultiheadAttention\n\n...
[ [ "torch.no_grad", "numpy.array", "torch.FloatTensor" ] ]
schrodingho/new_v_Gnet
[ "ec7f25bfdc2eec86334f37340d775335a81b6106" ]
[ "code/models.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\nfrom dnc import DNC\nfrom layers import GraphConvolution\n\n'''\nOur model\n'''\nclass GCN(nn.Module):\n def __init__(self, voc_size, emb_dim, adj, device=torch.device('cpu:0')):\n super(GCN, self).__init__()\n ...
[ [ "torch.nn.functional.softmax", "torch.cat", "torch.nn.GRU", "torch.sum", "torch.nn.Embedding", "torch.FloatTensor", "torch.device", "torch.nn.Dropout", "torch.mm", "numpy.eye", "torch.eye", "torch.nn.functional.sigmoid", "torch.nn.functional.relu", "torch.Lo...
danieltao1993/2021Q2-hackathon
[ "975141e1d6402eed8f0f4673f409e9013718cf1f" ]
[ "projects/24-Orama/orama-neural-net.py" ]
[ "#! /usr/bin/env python3\n\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport matplotlib.cm as cm\n\ndef gen_normal(size, shape=[8, 8]) :\n w1 = np.random.normal(0, 0.1, size)\n w1 *= 1000\n np.mod(w1, 128)\n w1 = w1.astype(int)\n w1 = np.reshape(w1, shape)\n pr...
[ [ "numpy.mod", "numpy.random.normal", "numpy.reshape" ] ]
kouohhashi/ctcdecode
[ "a40e197c30ebbb3e4a3296e0f761542bc258960a" ]
[ "ctcdecode/__init__.py" ]
[ "import torch\nfrom ._ext import ctc_decode\n\n\nclass CTCBeamDecoder(object):\n \"\"\"\n PyTorch wrapper for DeepSpeech PaddlePaddle Beam Search Decoder.\n Args:\n labels (list): The tokens/vocab used to train your model.\n They should be in the same order as they are in your...
[ [ "torch.zeros", "torch.FloatTensor", "torch.IntTensor" ] ]
MathGaron/py_rgbd_grabber
[ "8920d2eb8327f5f2a66a341df0cf214184d1d84e" ]
[ "tests/sensor_recorder_simple.py" ]
[ "#from py_rgbd_grabber.realsense import Realsense\n\nfrom py_rgbd_grabber.kinect2 import Kinect2\nimport time\nimport cv2\nimport numpy as np\nimport os\n\n\nif __name__ == '__main__':\n sensor = Kinect2()\n\n # will manage the other process automagically\n with sensor:\n # main loop\n while ...
[ [ "numpy.max", "matplotlib.pyplot.imshow", "matplotlib.pyplot.show" ] ]
krontzo/nume.py
[ "9d1e576fb3474333a8e2cf4f26f4236ee4f9deea", "9d1e576fb3474333a8e2cf4f26f4236ee4f9deea" ]
[ "src/book/polyFit.py", "src/book/example8_8.py" ]
[ "## module polyFit\r\n''' c = polyFit(xData,yData,m).\r\n Returns coefficients of the polynomial\r\n p(x) = c[0] + c[1]x + c[2]x^2 +...+ c[m]x^m\r\n that fits the specified data in the least\r\n squares sense.\r\n\r\n sigma = stdDev(c,xData,yData).\r\n Computes the std. deviation between p(x)\r\n ...
[ [ "numpy.zeros" ], [ "numpy.arange", "numpy.zeros", "numpy.ones" ] ]
qnano/simflux
[ "4f149d4e6c997954ac862cc5a7a404855b2a0be9", "4f149d4e6c997954ac862cc5a7a404855b2a0be9" ]
[ "python/smlmlib/simflux.py", "python/smlmlib/util.py" ]
[ "# -*- coding: utf-8 -*-\n\n\nimport ctypes\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport numpy.ctypeslib as ctl\nimport scipy.stats\nfrom enum import Enum\n\nfrom .base import SMLM, NullableFloatArrayType\nfrom smlmlib import gaussian\nfrom smlmlib.context import Context\nfrom smlmlib.psf import PSF...
[ [ "numpy.ascontiguousarray", "numpy.sin", "numpy.isscalar", "numpy.ctypeslib.ndpointer", "numpy.array", "numpy.zeros", "numpy.sum" ], [ "matplotlib.pyplot.imshow", "numpy.maximum", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.subplots", "numpy...
metantonio/AEMET-pythonclient-to-Excel
[ "3516592d4b04904fdfd0b9d6f2579e34fdd176d5" ]
[ "app.py" ]
[ "import http.client\nimport os\nimport requests\nimport json\nimport csv\nimport pandas as pd\nfrom base64 import b64encode\n\nconn = http.client.HTTPSConnection(\"opendata.aemet.es\")\nprint(\"Coloque su API KEY de opendata.aemet.es\\n\")\napi = input()\nprint(f\"API, {api} \\n\")\nprint(\"Coloque el código de la ...
[ [ "pandas.read_json" ] ]
andrrizzi/tfep
[ "a98ec870007a2ceb72cab147d9e0dfffb7dc8849", "a98ec870007a2ceb72cab147d9e0dfffb7dc8849" ]
[ "tfep/tests/nn/flows/test_maf.py", "tfep/nn/transformers/sos.py" ]
[ "#!/usr/bin/env python\n\n\n# =============================================================================\n# MODULE DOCSTRING\n# =============================================================================\n\n\"\"\"\nTest MAF layer in tfep.nn.flows.maf.\n\"\"\"\n\n\n# ============================================...
[ [ "torch.zeros", "torch.set_default_dtype", "torch.tensor", "torch.allclose", "torch.get_default_dtype", "numpy.random.RandomState" ], [ "torch.empty_like", "torch.ones", "numpy.sqrt", "torch.zeros", "torch.sum", "torch.log" ] ]
pandamax/carrier-of-tricks-for-classification-pytorch
[ "283a9f644b43d4800217bd10c1ab2accf1a787c6" ]
[ "converter/pytorch_to_caffe_git.py" ]
[ "'''\nsource:https://github.com/WolffyChen/PytorchToCaffe/blob/master/pytorch_to_caffe.py\n'''\n\nimport torch\nimport torch.nn as nn\nimport traceback\nfrom Caffe import caffe_net\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom Caffe import layer_param\nfrom torch.nn.modules.utils impor...
[ [ "numpy.array", "torch.batch_norm", "torch.nn.modules.utils._pair" ] ]
aryejanoff/Nourishment-Coordination
[ "e9fb6425a5faca96d08b2235a58d339b3f20bda8" ]
[ "Field Data/CoastSat Data Codes Analysis/Barnegat Light/BarnegatLight.py" ]
[ "#==========================================================#\n# Shoreline extraction from satellite images\n#==========================================================#\n\n# Kilian Vos WRL 2018\n\n#%% 1. Initial settings\n\n# load modules\nimport os\nimport numpy as np\nimport pickle\nimport warnings\nwarnings.fil...
[ [ "matplotlib.pyplot.legend", "numpy.nanmedian", "numpy.isnan", "matplotlib.pyplot.figure", "matplotlib.pyplot.get_current_fig_manager", "matplotlib.pyplot.grid", "matplotlib.pyplot.axis", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylabel" ] ]
rspotc/simphony
[ "3c458f253192a43200ad097428f54fc0e3dafaa1" ]
[ "examples/gm.py" ]
[ "import numpy as np\n\nimport simphony.core as core\nfrom simphony.core import ComponentInstance as inst\nimport simphony.DeviceLibrary.ebeam as dev\nimport simphony.DeviceLibrary.sipann as lib\nimport simphony.simulation as sim\n\nimport matplotlib.pyplot as plt\n\n# -----------------------------------------------...
[ [ "matplotlib.pyplot.legend", "numpy.dot", "numpy.linspace", "matplotlib.pyplot.axes", "matplotlib.pyplot.tight_layout", "numpy.sin", "numpy.argmax", "matplotlib.pyplot.subplot", "matplotlib.pyplot.figure", "matplotlib.pyplot.title", "matplotlib.pyplot.ylim", "numpy.a...
edwardyang12/implicit_depth
[ "4dc85bbddfc96af60006d6006be0c74478fe9204" ]
[ "src/models/implicit_net.py" ]
[ "import torch\r\ntorch.autograd.set_detect_anomaly(True)\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport numpy as np\r\n\r\n\r\n# Positional encoding (section 5.1)\r\nclass Embedder:\r\n def __init__(self, **kwargs):\r\n self.kwargs = kwargs\r\n self.create_embedding_fn()\r\n ...
[ [ "torch.linspace", "torch.autograd.set_detect_anomaly", "torch.cat", "torch.nn.init.constant_", "torch.Tensor", "torch.min", "torch.nn.Sigmoid", "torch.nn.Linear", "torch.nn.Identity", "torch.nn.init.normal_", "torch.nn.functional.leaky_relu" ] ]
tacaswell/sunpy
[ "1e06d75408d1a621749a5d4e743ae44a31886100", "1e06d75408d1a621749a5d4e743ae44a31886100" ]
[ "sunpy/timeseries/sources/norh.py", "sunpy/conftest.py" ]
[ "\"\"\"\nThis module provies a Nobeyama Radioheliograph `~sunpy.timeseries.TimeSeries`\nsource.\n\"\"\"\nfrom collections import OrderedDict\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas\n\nimport astropy.units as u\nfrom astropy.time import TimeDelta\n\nimport sunpy.io\nfrom sunpy import co...
[ [ "matplotlib.pyplot.subplots", "numpy.float", "pandas.DataFrame" ], [ "matplotlib.use" ] ]
Wieschie/autograder
[ "c6fd87027152ef6cad455bf54679211a123384a4" ]
[ "autograder/win32_limit.py" ]
[ "import sys\nimport time\n\nimport numpy\nimport os\nimport subprocess\nimport win32api\n\n__job = None\n\n\ndef win32_limit(max_memory: int = None, max_processes: int = None):\n \"\"\"\n Sets per-process limits on Windows systems.\n\n WARNING: Currently creates a single job, so affects all spawned process...
[ [ "numpy.arange" ] ]
openclimatefix/predict_pv_yield
[ "83f27bd392190f1771221e92bfebb879bf562f5d" ]
[ "predict_pv_yield/models/conv3d/model_sat_nwp.py" ]
[ "import logging\n\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\n\nfrom predict_pv_yield.models.base_model import BaseModel\nfrom nowcasting_dataloader.batch import BatchML\n\nlogging.basicConfig()\n_LOG = logging.getLogger(\"predict_pv_yield\")\n\n\nclass Model(BaseModel):\n\n name = \"co...
[ [ "torch.nn.Linear", "torch.nn.Conv3d", "torch.nn.Embedding", "torch.cat" ] ]
daenjannis/red-pitaya-notes
[ "745c829f1e678ef6b8fbb86ec29da8609b1c56b5" ]
[ "projects/scanner/client/scanner.py" ]
[ "#!/usr/bin/env python\n\n# Control program for the Red Pitaya Scanning system\n# Copyright (C) 2015 Pavel Demin\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of th...
[ [ "numpy.linspace", "matplotlib.figure.Figure", "numpy.min", "matplotlib.use", "numpy.arange", "matplotlib.pyplot.plot", "numpy.frombuffer", "matplotlib.backends.backend_qt5agg.NavigationToolbar2QT", "numpy.ceil", "matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg", "m...
mfem/PyMFEM
[ "b7b7c3d3de1082eac1015e3a313cf513db06fd7b", "fa654447ac6819c5aa0341397b91a299f4ce5492", "b7b7c3d3de1082eac1015e3a313cf513db06fd7b" ]
[ "mfem/_par/mesh.py", "examples/ex28p.py", "mfem/_ser/vector.py" ]
[ "# This file was automatically generated by SWIG (http://www.swig.org).\n# Version 4.0.2\n#\n# Do not make changes to this file unless you know what you are doing--modify\n# the SWIG interface file instead.\n\nfrom sys import version_info as _swig_python_version_info\nif _swig_python_version_info < (2, 7, 0):\n ...
[ [ "numpy.array" ], [ "numpy.log" ], [ "numpy.ascontiguousarray", "numpy.array" ] ]
xmengli999/self_supervised
[ "b2d40d452d203f60330c84fb213c3ba848468366", "b2d40d452d203f60330c84fb213c3ba848468366" ]
[ "lib/NCEAverage.py", "datasets/fundus_pm_crossvalidation.py" ]
[ "import torch\nfrom torch.autograd import Function\nfrom torch import nn\nfrom .alias_multinomial import AliasMethod\nimport math\n\nclass NCEFunction(Function):\n @staticmethod\n def forward(self, x, y, memory, idx, params):\n K = int(params[0].item())\n T = params[1].item()\n Z = params...
[ [ "torch.ones", "torch.tensor", "torch.mul", "torch.bmm", "torch.rand" ], [ "numpy.uint8", "numpy.genfromtxt" ] ]
Mauriyin/TNT_pytorch
[ "fed7e182a45e5cf74d827f090d72251eedbd7cc1" ]
[ "tracklets/utils/pred_loc.py" ]
[ "import numpy as np\n\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\nfrom scipy import stats\n\n\n#TODO what does this function mean?\ndef pred_bbox_by_F(bbox, F, show_flag, img1, img2):\n # Create figure and axes\n if show_flag==1:\n fig1, ax1 = plt.subplots(1)\n # Display ...
[ [ "matplotlib.patches.Rectangle", "matplotlib.pyplot.subplots", "numpy.linalg.pinv", "scipy.stats.linregress", "numpy.transpose", "numpy.array", "numpy.zeros", "matplotlib.pyplot.show" ] ]
eirikur16/flrs
[ "c98604593753def05086b54ce82f5551f01d2529" ]
[ "floris/tools/sowfa_utilities.py" ]
[ "# Copyright 2020 NREL\n\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with the License. You may obtain a copy of\n# the License at http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applicable law or agreed to in writing, soft...
[ [ "numpy.arange", "numpy.array", "pandas.read_csv", "numpy.float" ] ]
One-sixth/fid-helper-pytorch
[ "1d74e9e7e4622bd0ccb209a01a2cc10c74c73c01" ]
[ "gen_sample_from_stylegan3/torch_utils/custom_ops.py" ]
[ "# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n#\n# NVIDIA CORPORATION and its licensors retain all intellectual property\n# and proprietary rights in and to this software, related documentation\n# and any modifications thereto. Any use, reproduction, disclosure or\n# distribution o...
[ [ "torch.utils.cpp_extension.load", "torch.utils.cpp_extension._get_build_directory", "torch.cuda.get_device_name" ] ]
Little-Potato-1990/learn_python
[ "9e54d150ef73e4bf53f8cd9b28a2a8bc65593fe1" ]
[ "Python-Data-Science-Handbook/notebooks/helpers_05_08.py" ]
[ "\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn.tree import DecisionTreeClassifier\nfrom ipywidgets import interact\n\n\ndef visualize_tree(estimator, X, y, boundaries=True,\n xlim=None, ylim=None, ax=None):\n ax = ax or plt.gca()\n \n # 绘制训练数据点\n ax.scatter(X[:, 0...
[ [ "matplotlib.pyplot.gca", "numpy.linspace", "numpy.unique", "numpy.arange", "sklearn.tree.DecisionTreeClassifier", "numpy.random.RandomState" ] ]
shenghexu/CORL
[ "9f098b110b7ea36533542ddc89e473678f728d8b", "9f098b110b7ea36533542ddc89e473678f728d8b" ]
[ "RocketFuel/SegmentRouting/rf1221_distributed/Equal/Parse_Equal.py", "Abilene/Direct_FW/Direct_FW.py" ]
[ "\nimport math\nimport random\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport scipy.io\n\nfrom pdb import set_trace as bp\n\n\nfor i in range(10):\n file_name = '../CORL_FW_SR/CORL_record_%d.txt'%(i)\n...
[ [ "numpy.zeros" ], [ "torch.abs", "torch.nn.functional.softmax", "torch.mv", "numpy.sum", "torch.linspace", "numpy.reshape", "torch.sum", "torch.argmin", "torch.tensor", "torch.nn.Linear", "numpy.random.uniform", "torch.t", "numpy.zeros", "torch.nn.MSE...
noahjgreen295/feature_engine
[ "77248ade812f03bb1b9c0c129320f0c0baad61ed", "77248ade812f03bb1b9c0c129320f0c0baad61ed", "77248ade812f03bb1b9c0c129320f0c0baad61ed", "77248ade812f03bb1b9c0c129320f0c0baad61ed" ]
[ "tests/test_selection/test_recursive_feature_selectors.py", "feature_engine/datetime/_datetime_constants.py", "feature_engine/outliers/winsorizer.py", "tests/test_transformation/test_boxcox_transformer.py" ]
[ "import numpy as np\nimport pytest\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.linear_model import Lasso, LogisticRegression\nfrom sklearn.model_selection import KFold, StratifiedKFold\nfrom sklearn.tree import DecisionTreeRegressor\n\nfrom feature_engine.selection import (\n RecursiveFeat...
[ [ "sklearn.tree.DecisionTreeRegressor", "sklearn.linear_model.LogisticRegression", "sklearn.ensemble.RandomForestClassifier", "sklearn.model_selection.StratifiedKFold", "sklearn.model_selection.KFold", "sklearn.linear_model.Lasso", "numpy.round" ], [ "numpy.where" ], [ "p...
skelton-group/Phono3py-Power-Tools
[ "9534e9670290cae6a0cf865fb0303a32acac63aa" ]
[ "Phono3pyPowerTools/Plotting.py" ]
[ "# Phono3pyPowerTools/Plotting.py\n\n\n# ----------------\n# Module Docstring\n# ----------------\n\n\"\"\" Routines for working with Matplotlib. \"\"\"\n\n\n# -------\n# Imports\n# -------\n\nimport math\n\nimport numpy as np\nimport matplotlib as mpl\n\nfrom matplotlib.ticker import FuncFormatter\n\n\n# ---------...
[ [ "matplotlib.font_manager._rebuild", "numpy.min", "numpy.sort", "numpy.max", "matplotlib.rc" ] ]
daidaifan/deep-learning-101
[ "0d018b42a67eb7ad83fa0683c653e3d4ed36b2ae" ]
[ "deep_learning_101/component/layer.py" ]
[ "import numpy as np\nfrom deep_learning_101.component.utils import softmax, cross_entropy_error\n\nclass ReLU:\n def __init__(self):\n self.mask = None\n\n def forward(self, x):\n self.mask = (x <= 0)\n out = x.copy()\n out[self.mask] = 0\n return out\n\n def backward(sel...
[ [ "numpy.dot", "numpy.exp", "numpy.sum" ] ]
Gjacquenot/Pythagoras_tree
[ "cfe2f53c8ea54ad6d6496184f5659a4a496056e5" ]
[ "Pythagoras_tree.py" ]
[ "\"\"\"\nThis Python3 script creates a Pythagoras tree in SVG or PNG format\n\nRequires numpy and matplotlib to create pngs.\n\nGet started with : python Pythagoras_tree.py --help\n\"\"\"\nimport argparse\nfrom math import atan2, ceil, pi, sqrt\nfrom typing import List\n\nimport matplotlib\nimport matplotlib.pyplot...
[ [ "matplotlib.pyplot.gca", "numpy.min", "matplotlib.pyplot.ylim", "matplotlib.pyplot.subplots", "numpy.cos", "numpy.sin", "matplotlib.pyplot.xlim", "matplotlib.pyplot.axis", "matplotlib.cm.get_cmap", "numpy.array", "numpy.zeros" ] ]
JonesRobM/Sapphire
[ "fba875af56e48e2c5a4a3cf6788f51f359f63800" ]
[ "build/lib/Sapphire/Post_Process/AtomicEnvironment.py" ]
[ "import numpy as np\nimport scipy.sparse as spa\nimport os\n\ndef count(Input, Value):\n \n return(len([x for x in Input if x == Value]))\n\nclass LAE():\n\n def __init__(self, System = None, Frame = None, Adj1 = None, Adj2 = None, HeAdj = None, \n EleNN = None, lae = None, HomoBonds = None...
[ [ "numpy.zeros" ] ]
jingmouren/OptimalPortfolio
[ "cb27cbc6f0832bfc531c085454afe1ca457ea95e" ]
[ "PortOpt/base_est.py" ]
[ "import numpy as np\nfrom numpy.core.defchararray import upper\nimport pandas as pd\nfrom scipy.optimize import minimize\nimport warnings\nfrom . import utility_functions as utility_functions\nimport cvxpy as cp\n\n\nclass BaseEstimator:\n def __init__(self, tickers) -> None:\n self.tickers = tickers\n\n ...
[ [ "numpy.diag", "numpy.outer" ] ]
rhololkeolke/catalyst-rl
[ "ec18ff4a58b6d00652f772231db8de86debb4b3d", "ec18ff4a58b6d00652f772231db8de86debb4b3d", "ec18ff4a58b6d00652f772231db8de86debb4b3d", "ec18ff4a58b6d00652f772231db8de86debb4b3d" ]
[ "catalyst_rl/dl/callbacks/confusion_matrix.py", "catalyst_rl/contrib/nn/optimizers/lookahead.py", "catalyst_rl/rl/exploration/param_noise.py", "catalyst_rl/utils/distributed.py" ]
[ "from typing import Dict, List # isort:skip\n\nimport numpy as np\nfrom sklearn.metrics import confusion_matrix as confusion_matrix_fn\n\nfrom catalyst_rl.dl import Callback, CallbackNode, CallbackOrder, State, utils\nfrom catalyst_rl.utils import meters\n\n\nclass ConfusionMatrixCallback(Callback):\n def __ini...
[ [ "numpy.argmax", "sklearn.metrics.confusion_matrix" ], [ "torch.zeros_like" ], [ "torch.distributions.normal.Normal", "numpy.abs" ], [ "torch.distributed.init_process_group", "torch.cuda.current_device", "torch.distributed.is_initialized", "torch.nn.DataParallel", ...
kaylode/tern
[ "a85b7568c574515031a2a41e8c21df1002c05c64" ]
[ "modules/losses/triplet.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom pytorch_metric_learning import losses \n\nclass TripletLoss(nn.Module):\n def __init__(self, **kwargs) -> None:\n super().__init__(**kwargs)\n self.loss_fn = losses.TripletMarginLoss(**kwargs)\n\n def forward(self, fea...
[ [ "torch.cat" ] ]
feitonyliu/iForest
[ "ebcb06ae266249b049d848b53005fcabff1ca4b0" ]
[ "isotree/__init__.py" ]
[ "import numpy as np, pandas as pd\nfrom scipy.sparse import csc_matrix, csr_matrix, issparse, isspmatrix_csc, isspmatrix_csr, vstack as sp_vstack\nimport warnings\nimport multiprocessing\nimport ctypes\nimport json\nimport os\nfrom copy import deepcopy\nfrom ._cpp_interface import (\n isoforest_cpp_obj, _sort_cs...
[ [ "numpy.issubdtype", "numpy.vstack", "numpy.math.factorial", "pandas.DataFrame", "numpy.all", "numpy.max", "numpy.any", "numpy.iinfo", "scipy.sparse.vstack", "scipy.sparse.isspmatrix_csc", "scipy.sparse.issparse", "numpy.arange", "numpy.ceil", "numpy.zeros", ...
derdav3/tf-sparql
[ "6d3fe6e3b6824a4cd5468a243829b71f5b0952f2" ]
[ "ml_models/nn/batch_norm.py" ]
[ "# Copyright 2016 Google 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 applicable law or agreed ...
[ [ "tensorflow.contrib.layers.python.layers.utils.constant_value", "tensorflow.logging.warning", "tensorflow.nn.batch_normalization", "tensorflow.get_variable", "tensorflow.python.training.moving_averages.assign_moving_average", "tensorflow.zeros_initializer", "tensorflow.nn.normalize_mom...
mswimmer/extractnet
[ "1d5202a35bd659f502e6f5496a9b1933f0098b91" ]
[ "test/test_kohlschuetter.py" ]
[ "import io\nimport os\nimport re\n\nimport numpy as np\nimport pytest\nfrom lxml import etree\n\nfrom extractnet import Blockifier, BlockifyError\nfrom extractnet.features import KohlschuetterFeatures\nfrom extractnet.compat import range_, str_cast\n\n\n@pytest.fixture(scope=\"module\")\ndef html():\n fname = os...
[ [ "numpy.allclose" ] ]
ramirezalbert3/my_agents
[ "fd8ffc8c2f157292b4d309ab1899326007aea726" ]
[ "my_agents/agents/nstep_agent.py" ]
[ "from collections import deque\nfrom typing import Tuple\nimport numpy as np\nfrom gym import logger\nfrom tensorflow import keras\n\n\"\"\"\n# References\n# 1. https://storage.googleapis.com/deepmind-media/dqn/DQNNaturePaper.pdf\n# 2. https://arxiv.org/pdf/1509.06461.pdf\n# 3. https://arxiv.org/pdf/1703.01327.pdf\...
[ [ "numpy.logical_not", "tensorflow.keras.models.load_model", "tensorflow.keras.layers.Dense", "numpy.arange", "numpy.array", "tensorflow.keras.models.Sequential" ] ]
matthewfeickert/jax
[ "b0d96bd42440231cc7e98c61f52106f46578fca4" ]
[ "tests/sparse_test.py" ]
[ "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.issubdtype", "numpy.prod" ] ]
parsons-kyle-89/pandas
[ "08c920eab602dac261b8fe55ffe439593c095e12", "08c920eab602dac261b8fe55ffe439593c095e12" ]
[ "pandas/core/arrays/datetimes.py", "pandas/core/indexes/accessors.py" ]
[ "# -*- coding: utf-8 -*-\nfrom datetime import datetime, time\nimport warnings\n\nimport numpy as np\nfrom pytz import utc\n\nfrom pandas._libs import lib, tslib\nfrom pandas._libs.tslibs import (\n NaT, Timestamp, ccalendar, conversion, fields, iNaT, normalize_date,\n resolution as libresolution, timezones)\...
[ [ "pandas._libs.tslibs.conversion.datetime_to_datetime64", "pandas.tseries.frequencies.to_offset", "pandas._libs.tslibs.Timestamp", "pandas._libs.tslibs.timezones.maybe_get_tz", "numpy.linspace", "numpy.asarray", "pandas._libs.tslibs.conversion.pydt_to_i8", "pandas._libs.tslibs.field...
Sibasish-Padhy/Algo-ScriptML
[ "c0d80a2968ffac2c8d8e3f891144dd91da353f5a" ]
[ "code_for_batchgradient_descent/venv/Lib/site-packages/matplotlib/font_manager.py" ]
[ "\"\"\"\nA module for finding, managing, and using fonts across platforms.\n\nThis module provides a single `FontManager` instance that can\nbe shared across backends and platforms. The `findfont`\nfunction returns the best TrueType (TTF) font file in the local or\nsystem font path that matches the specified `Font...
[ [ "matplotlib._api.check_in_list", "matplotlib._api.warn_deprecated", "matplotlib.get_cachedir", "matplotlib.fontconfig_pattern.parse_fontconfig_pattern", "matplotlib.cbook._get_data_path", "matplotlib.cbook._lock_path", "matplotlib.ft2font.FT2Font", "matplotlib.get_data_path", "...
NiklasSabel/data_mining_1
[ "c6a572df10c4a92b941c284ccf2ea7c3fd679f02" ]
[ "src/data/make_dataset.py" ]
[ "import pandas as pd\n\n\ndef merge_data(train_values, train_target, test_values):\n \"\"\"\n Function to import all data and concatenate it into one dataframe.\n :return: one dataframe only with train and test features together with train labels\n \"\"\"\n\n data = train_values.join(train_target)\n\...
[ [ "pandas.concat" ] ]
Thimira/Build-Deeper
[ "7259ac8f4dbf2c5fc6c5b45449d286d53e121636" ]
[ "Chapter 5/lenet_mnist_keras.py" ]
[ "# How to use\n#\n# Train the model and save the model weights\n# python lenet_mnist_keras.py --train-model 1 --save-trained 1\n#\n# Train the model and save the model weights to a give directory\n# python lenet_mnist_keras.py --train-model 1 --save-trained 1 --weights data/lenet_weights.hdf5\n#\n# Evaluate the mod...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.plot", "matplotlib.pyplot.subplot", "numpy.argmax", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
gosccm/Learning
[ "49ad38597d114ce22b00375ebbea37c401557447", "49ad38597d114ce22b00375ebbea37c401557447" ]
[ "quantecon/markov/random.py", "quantecon/tests/test_ricatti.py" ]
[ "\"\"\"\nFilename: random.py\n\nAuthor: Daisuke Oyama\n\nGenerate MarkovChain and DiscreteDP instances randomly.\n\n\"\"\"\nimport numpy as np\nimport scipy.sparse\nfrom numba import jit\n\nfrom .core import MarkovChain\nfrom .ddp import DiscreteDP\nfrom .utilities import sa_indices\nfrom ..util import check_random...
[ [ "numpy.arange", "numpy.zeros" ], [ "numpy.diag", "numpy.dot", "numpy.linalg.solve", "numpy.sqrt", "numpy.eye", "numpy.identity", "numpy.testing.assert_allclose", "numpy.array", "numpy.zeros" ] ]
hardik-prajapati/mne-python
[ "7410696b8897c8782ae293e1c453a43b20197acd" ]
[ "mne/preprocessing/ica.py" ]
[ "# -*- coding: utf-8 -*-\n#\n# Authors: Denis A. Engemann <denis.engemann@gmail.com>\n# Alexandre Gramfort <alexandre.gramfort@inria.fr>\n# Juergen Dammers <j.dammers@fz-juelich.de>\n#\n# License: BSD (3-clause)\n\nfrom inspect import isfunction\nfrom collections import namedtuple\nfrom copy impor...
[ [ "numpy.dot", "scipy.linalg.pinv", "numpy.sqrt", "numpy.asarray", "sklearn.decomposition.FastICA", "numpy.concatenate", "numpy.where", "numpy.hstack", "numpy.unique", "numpy.arange", "numpy.eye", "numpy.std", "numpy.argmax", "numpy.zeros", "numpy.nonzero"...
PSSF23/graspologic
[ "d5ae48d0481b6a60fa580158c2e9bae9cc506a9d", "d5ae48d0481b6a60fa580158c2e9bae9cc506a9d", "d5ae48d0481b6a60fa580158c2e9bae9cc506a9d", "d5ae48d0481b6a60fa580158c2e9bae9cc506a9d" ]
[ "graspologic/align/seedless_procrustes.py", "graspologic/cluster/gclust.py", "graspologic/simulations/simulations_corr.py", "tests/cluster/test_autogmm.py" ]
[ "# Copyright (c) Microsoft Corporation and contributors.\n# Licensed under the MIT License.\n\nimport ot\nimport numpy as np\nfrom sklearn.utils import check_array\n\nfrom .base import BaseAlign\nfrom .sign_flips import SignFlips\nfrom .orthogonal_procrustes import OrthogonalProcrustes\n\n\nclass SeedlessProcrustes...
[ [ "sklearn.utils.check_array", "numpy.eye", "numpy.linalg.norm", "numpy.ones", "numpy.argmin", "numpy.zeros" ], [ "numpy.unique", "numpy.arange", "sklearn.metrics.adjusted_rand_score", "sklearn.model_selection.ParameterGrid", "sklearn.mixture.GaussianMixture" ], [...
felja633/DARE
[ "b112d24da8108c440cc8417ee1ae5cdeef24181e", "b112d24da8108c440cc8417ee1ae5cdeef24181e" ]
[ "src/color_feature_extraction.py", "src/psreg.py" ]
[ "import colorsys\nimport numpy as np\nfrom time import time\n\nclass ChannelEncoder:\n def __init__(self,\n nchans=None,\n bounds=None,\n mflag=None,\n cscale=1.0):\n \"\"\"\n\n \"\"\"\n self.mflag = mflag\n self.nchans =...
[ [ "numpy.abs", "numpy.arange", "numpy.cos", "numpy.ones", "numpy.random.gamma", "numpy.mod", "numpy.array", "numpy.sum" ], [ "numpy.sqrt", "numpy.ndarray", "numpy.concatenate", "numpy.max", "numpy.mean", "numpy.random.randn", "numpy.exp", "numpy.wh...
oscarjalnefjord/bruker2nifti
[ "3c9ab1a7770435e12a438d3833d54ca40cf16a35" ]
[ "bruker2nifti/_cores.py" ]
[ "import os\nimport nibabel as nib\nimport sys\nimport numpy as np\nimport warnings\n\nfrom os.path import join as jph\n\nfrom bruker2nifti._getters import get_list_scans, nifti_getter\nfrom bruker2nifti._utils import (\n bruker_read_files,\n normalise_b_vect,\n from_dict_to_txt_sorted,\n set_new_data,\n...
[ [ "numpy.atleast_2d" ] ]