repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
danielhers/stanza
[ "d747a7b781da203c286ec51e3842fecb8b0abb15", "d747a7b781da203c286ec51e3842fecb8b0abb15" ]
[ "stanza/models/pos/model.py", "stanza/models/depparse/trainer.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.utils.rnn import pad_packed_sequence, pack_padded_sequence, pack_sequence, PackedSequence\n\nfrom stanza.models.common.biaffine import BiaffineScorer\nfrom stanza.models.common.hlstm import HighwayLSTM\nfrom sta...
[ [ "torch.nn.CrossEntropyLoss", "torch.nn.Dropout", "numpy.sqrt", "torch.cat", "torch.zeros", "torch.randn", "torch.nn.ModuleList", "torch.from_numpy", "torch.nn.utils.rnn.pack_padded_sequence", "torch.nn.Linear", "torch.nn.utils.rnn.PackedSequence" ], [ "torch.loa...
aleaf/usgs-map-gwmodels
[ "284a79484a4531ce725bf07371c3c342ad1791c0" ]
[ "mapgwm/tests/test_swflows.py" ]
[ "import os\nfrom pathlib import Path\nimport numpy as np\nimport pandas as pd\nimport pytest\nfrom mapgwm.obs import preprocess_obs\nfrom mapgwm.swflows import aggregrate_values_to_stress_periods, preprocess_flows, combine_measured_estimated_values\n\n\n@pytest.fixture()\ndef obsdata():\n return pd.DataFrame({'d...
[ [ "pandas.to_datetime", "numpy.array_equal", "numpy.isnan", "pandas.DataFrame", "numpy.all", "numpy.std", "numpy.array" ] ]
Pratheeba14/visualizing-the-weather-data-set
[ "d0451646db52f0d88fda6b334de22d8392d14230" ]
[ "code.py" ]
[ "# --------------\n# Import the required Libraries\r\nfrom matplotlib import pyplot as plt\r\nimport numpy as np\r\nimport pandas as pd\r\nimport calendar\r\nimport seaborn as sns\r\nimport warnings\r\nwarnings.filterwarnings(\"ignore\")\r\n\r\n\r\n# Generate a line chart that visualizes the readings in the months\...
[ [ "matplotlib.pyplot.xticks", "pandas.read_csv", "matplotlib.pyplot.subplots", "matplotlib.pyplot.title" ] ]
manjunathnilugal/PyBaMM
[ "a31e2095600bb92e913598ac4d02b2b6b77b31c1", "65d5cba534b4f163670e753714964aaa75d6a2d2" ]
[ "tests/unit/test_solvers/test_casadi_algebraic_solver.py", "pybamm/spatial_methods/spatial_method.py" ]
[ "#\n# Tests for the Casadi Algebraic Solver class\n#\nimport casadi\nimport pybamm\nimport unittest\nimport numpy as np\nfrom scipy.optimize import least_squares\nimport tests\n\n\nclass TestCasadiAlgebraicSolver(unittest.TestCase):\n def test_algebraic_solver_init(self):\n solver = pybamm.CasadiAlgebraic...
[ [ "numpy.linspace", "scipy.optimize.least_squares", "numpy.eye", "numpy.ones", "numpy.testing.assert_array_equal", "numpy.array", "numpy.vstack", "numpy.testing.assert_array_almost_equal" ], [ "scipy.sparse.eye", "scipy.sparse.coo_matrix", "numpy.tile", "numpy.one...
cmbruns/vr_samples
[ "8dee056766bccca1a602c6dd58fd0a641c5033a5", "8dee056766bccca1a602c6dd58fd0a641c5033a5" ]
[ "src/python/photosphere_pyopenvr1.py", "src/python/vrprim/mesh/glfw_triangle.py" ]
[ "#!/bin/env python\r\n\r\n# Example program for viewing a 360 photosphere in a virtual reality headset\r\n\r\nimport os\r\nfrom textwrap import dedent\r\n\r\nimport numpy\r\nfrom OpenGL.GL import * # @UnusedWildImport # this comment squelches IDE warnings\r\nfrom OpenGL.GL.shaders import compileShader, compileProgr...
[ [ "numpy.array" ], [ "numpy.array" ] ]
robin-ai-ml/Face.KeyPoints
[ "c9812cc8d21d5a6a6e764cff3bf8798cd653c437" ]
[ "face.keypoints.py" ]
[ "\nfrom __future__ import division\nfrom keras.backend.tensorflow_backend import set_session\nimport tensorflow as tf\n\n\nimport numpy as np\nimport time\nimport os\nimport cv2\nimport kmodel\nfrom utils import transparentOverlay\n\nos.environ['KERAS_BACKEND'] = 'tensorflow'\nprint(tf.__version__)\nconfig = tf.Con...
[ [ "numpy.copy", "tensorflow.GPUOptions", "tensorflow.Session" ] ]
LeeCenY/turicreate
[ "fb2f3bf313e831ceb42a2e10aacda6e472ea8d93" ]
[ "src/unity/python/turicreate/toolkits/_mps_utils.py" ]
[ "# -*- coding: utf-8 -*-\n# Copyright © 2018 Apple Inc. All rights reserved.\n#\n# Use of this source code is governed by a BSD-3-clause license that can\n# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause\n\"\"\"\nPython API for MPS neural network backend\n\"\"\"\nfrom __future__...
[ [ "numpy.sqrt", "numpy.asarray", "numpy.squeeze", "numpy.prod", "numpy.random.uniform", "numpy.fromiter", "numpy.array", "numpy.zeros" ] ]
blacksph3re/garage
[ "b4abe07f0fa9bac2cb70e4a3e315c2e7e5b08507", "b4abe07f0fa9bac2cb70e4a3e315c2e7e5b08507", "b4abe07f0fa9bac2cb70e4a3e315c2e7e5b08507" ]
[ "tests/garage/np/test_functions.py", "tests/fixtures/envs/dummy/dummy_box_env.py", "tests/fixtures/envs/dummy/dummy_discrete_pixel_env_baselines.py" ]
[ "# yapf: disable\nimport warnings\n\nimport numpy as np\n\nfrom garage.np import (concat_tensor_dict_list, explained_variance_1d,\n pad_batch_array, pad_tensor,\n stack_and_pad_tensor_dict_list, stack_tensor_dict_list)\n\n# yapf: enable\n\ndata = [\n dict(obs=[1, 1, 1]...
[ [ "numpy.array_equal", "numpy.asarray", "numpy.ones", "numpy.testing.assert_almost_equal", "numpy.array" ], [ "numpy.ones" ], [ "numpy.concatenate", "numpy.ones" ] ]
laijingtao/landlab
[ "871151bff814e672b4f09f091b6347367758c764", "871151bff814e672b4f09f091b6347367758c764", "871151bff814e672b4f09f091b6347367758c764", "4f43055060b544b34e71eba7062c09866ad93640" ]
[ "landlab/components/sink_fill/pit_remove.py", "landlab/grid/divergence.py", "landlab/components/weathering/exponential_weathering.py", "landlab/grid/raster_mappers.py" ]
[ "\"\"\"\npit_remove.py\nImplementation of algorithm described by Planchon(2001)\n\nCreated by JL, Oct 2015\n\"\"\"\n\nimport numpy\n\nimport landlab\nfrom landlab import Component, FieldError\nfrom landlab.grid.base import BAD_INDEX_VALUE\n\n\nclass PitRemove(Component):\n\n\tdef __init__(self, input_grid):\n\n\t\t...
[ [ "numpy.concatenate", "numpy.logical_or", "numpy.array", "numpy.zeros" ], [ "numpy.zeros" ], [ "numpy.exp" ], [ "numpy.append", "numpy.maximum", "numpy.minimum", "numpy.fabs" ] ]
danvolk/LineHTR
[ "a3a97e4af69ca9d15379868fafddb80c781831aa" ]
[ "src/DataLoader.py" ]
[ "from __future__ import division\nfrom __future__ import print_function\n\nimport json\nimport random\n\nimport cv2\nimport numpy as np\n\nfrom helpers import preprocessor\n\n\nclass FilePaths:\n \"\"\" Filenames and paths to data \"\"\"\n fnCharList = '../model/charList.txt'\n fnWordCharList = '../model/w...
[ [ "numpy.stack" ] ]
JetRunner/transformers
[ "8e0cf02467bce017885cd3dc1f37c84794dd7da4" ]
[ "src/transformers/modeling_flaubert.py" ]
[ "# coding=utf-8\n# Copyright 2019-present CNRS, Facebook Inc. and the HuggingFace Inc. 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...
[ [ "torch.LongTensor", "torch.arange", "torch.nn.functional.dropout" ] ]
vitobellini/tfautorec
[ "5501e37f428416dcd59352722949662f38f60a61" ]
[ "autorec-gpus.py" ]
[ "import random\n\nimport numpy as np\nimport pandas as pd\nimport tensorflow as tf\n\nimport re\nimport time\n\nfrom sklearn import preprocessing\n\nFLAGS = tf.app.flags.FLAGS\n\ntf.app.flags.DEFINE_integer('num_gpus', 4, \"How many GPUs to use.\")\n\nk = 10\n\nepochs = 10000\ndisplay_step = 10\n\nlearning_rate = 0...
[ [ "tensorflow.get_variable", "tensorflow.device", "tensorflow.concat", "pandas.DataFrame", "numpy.concatenate", "tensorflow.group", "tensorflow.add_n", "tensorflow.summary.scalar", "sklearn.preprocessing.MinMaxScaler", "pandas.read_csv", "tensorflow.get_collection", "...
navashiva/alphafold
[ "be37a41d6f83e4145bd4912cbe8bf6a24af80c29" ]
[ "alphafold/relax/relax.py" ]
[ "# Copyright 2021 DeepMind Technologies Limited\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...
[ [ "numpy.sum" ] ]
mpahl/omniconverter
[ "09e00222b407a31b7887dd77d1b97ff27a519629" ]
[ "omniconverter/stata_to_statistics.py" ]
[ "import re\nimport pandas as pd\nimport numpy as np\nimport os,sys, yaml, csv\nimport logging\n\nlogger = logging.getLogger(__name__)\n\nfrom omniconverter import Converter #todoooooooooooooooo\n\ndef stata_to_statistics(study_name, input_csv, input_path, output_path, input_path_de=\"\"):\n filereader = pd.read_...
[ [ "pandas.read_csv" ] ]
binkiklou/Leon_Nowsden_Steals_Code
[ "7a5ceaa9d6504ef9a1365e4a882ccb811562f141" ]
[ "RUN_THIS.py" ]
[ "# Import our libs\r\nfrom numpy import exp, array, random, dot\r\n# Define our data\r\ntraining_set_inputs = array([[0, 0, 1], [1, 1, 1], [1, 0, 1], [0, 1, 1]])\r\ntraining_set_outputs = array([[0, 1, 1, 0]]).T\r\n# Use our lib \r\nrandom.seed(1)\r\n# We do maths \r\nsynaptic_weights = 2 * random.random((3, 1)) - ...
[ [ "numpy.dot", "numpy.array", "numpy.random.random", "numpy.random.seed" ] ]
Tiasa/StyleRecognitioninMusic
[ "775d631e3a688ba0d31f615115f45fd7580d1b5e" ]
[ "GlobalGrammars/MDSPlotter.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.pyplot import cm\nimport subprocess\nimport sys\n# from mpl_toolkits.mplot3d import axes3d, Axes3D\n\ndef getDefName(definition):\n if definition == 1:\n return \"d(x,y) = max {K(x|y*),K(y|x*)} / max{K(x), K(y)}\"\n elif definition =...
[ [ "matplotlib.pyplot.title", "numpy.asarray", "matplotlib.pyplot.get_cmap", "matplotlib.pyplot.close", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
moonbzyx/ctp
[ "e5f663352124ac8033912c5867cc5ac2cecbb662" ]
[ "tests/kbcr/models/test_masking.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport numpy as np\n\nimport torch\nfrom torch import nn\n\nfrom kbcr.kernels import GaussianKernel\nfrom kbcr.models import NeuralKB\nfrom kbcr.models.reasoning import SimpleHoppy\nfrom kbcr.reformulators import SymbolicReformulator\n\nimport pytest\n\n\n@pytest.mark.light\ndef test_mas...
[ [ "torch.from_numpy", "torch.nn.Embedding", "torch.no_grad", "numpy.testing.assert_allclose", "numpy.array", "numpy.random.RandomState" ] ]
birlrobotics/birlBaxter_demos
[ "a4871cbf2587a759c958c8451746554e1663e829" ]
[ "deep_tracking/deeptracking/data/frame.py" ]
[ "\"\"\"\n Keeps a reference to a rgb and depth images (given an id). keeps data on disk or ram depending on need\n\n date : 2017-23-03\n\"\"\"\n\n__author__ = \"Mathieu Garon\"\n__version__ = \"0.0.1\"\n\nimport numpngw\nimport os\nimport numpy as np\nfrom PIL import Image\n\n\nclass Frame:\n def __init__(...
[ [ "numpy.right_shift", "numpy.left_shift", "numpy.ndarray", "numpy.concatenate" ] ]
truatpasteurdotfr/AMPL
[ "68dd7a8004272d22ef5d975c57e1e9149c820f8b" ]
[ "atomsci/ddm/pipeline/transformations.py" ]
[ "\"\"\"\nClasses providing different methods of transforming response data and/or features in datasets, beyond those\nprovided by DeepChem.\n\"\"\"\n\nimport logging\nimport os\nimport sys\n\nimport numpy as np\nimport pandas as pd\nimport umap\n\nimport deepchem as dc\nfrom deepchem.trans.transformers import Trans...
[ [ "numpy.sqrt", "numpy.isnan", "sklearn.preprocessing.RobustScaler", "numpy.reshape", "sklearn.preprocessing.Imputer", "numpy.array" ] ]
madilovic/AALI
[ "1348f905ecda0b63775d1d42f15a17e599226490" ]
[ "AALI.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Sep 28 09:38:30 2020\n\n@author: Muhamed Adilovic\n\"\"\"\n\nimport os\nimport argparse\nimport pandas as pd\nfrom Bio.PDB.PDBParser import PDBParser\n\ndef parse_args():\n parser = argparse.ArgumentParser()\n parser.add_argument(\"-o\", \"--output\", choices=[...
[ [ "pandas.concat", "pandas.DataFrame" ] ]
vishalbelsare/fracdiff-1
[ "0d034b6e2328b50238784fb3831785d89113912d" ]
[ "fracdiff/sklearn/tol.py" ]
[ "# found module but no type hints or library stubs\nimport numpy as np # type:ignore\n\nfrom fracdiff.fdiff import fdiff_coef\n\n\ndef window_from_tol_coef(n: float, tol_coef: float, max_window: int = 2 ** 12) -> int:\n \"\"\"\n Return length of window determined from tolerance to memory loss.\n\n Toleran...
[ [ "numpy.searchsorted" ] ]
dallaval5u/snewpdag
[ "756e9226405b250af15519b85188c63df9139c90" ]
[ "snewpdag/plugins/renderers/Histogram1D.py" ]
[ "\"\"\"\n1D Histogram renderer\n\nConfiguration options:\n title: histogram title (top of plot)\n xlabel: x axis label\n ylabel: y axis label\n filename: output filename, with fields\n {0} renderer name\n {1} count index, starting from 0\n {2} burst_id from update data (d...
[ [ "numpy.arange", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig" ] ]
garyxcheng/federated
[ "ba7133ead6127af71ea9356e26bfd05c02f8324a", "ba7133ead6127af71ea9356e26bfd05c02f8324a", "ba7133ead6127af71ea9356e26bfd05c02f8324a", "ba7133ead6127af71ea9356e26bfd05c02f8324a", "ba7133ead6127af71ea9356e26bfd05c02f8324a", "ba7133ead6127af71ea9356e26bfd05c02f8324a", "ba7133ead6127af71ea9356e26bfd05c02f8324...
[ "reconstruction/stackoverflow/models.py", "gans/experiments/emnist/preprocessing/filtered_emnist_data_utils_test.py", "fedopt_guide/stackoverflow_transformer/centralized_main_test.py", "fedopt_guide/training_loop_test.py", "gans/experiments/emnist/eval/emnist_eval_util_test.py", "targeted_attack/attacked_...
[ "# Copyright 2020, Google LLC.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agree...
[ [ "tensorflow.not_equal", "tensorflow.keras.layers.Dense", "tensorflow.expand_dims", "tensorflow.keras.Model", "tensorflow.zeros_like", "tensorflow.TensorSpec", "tensorflow.keras.layers.Add", "tensorflow.nn.embedding_lookup", "tensorflow.keras.layers.Input" ], [ "tensorfl...
sunhwan/griddata
[ "b7fb22ad242b0f0a6735fd5f35c3f2ee8e7f4b3f" ]
[ "griddata/grid.py" ]
[ "\"\"\"\nInitialize grid format data and allow conversion between formats and\nresampling of data\n\"\"\"\n\nfrom __future__ import division\nimport numpy as np\nfrom scipy import interpolate\nfrom scipy import ndimage\n\nclass Grid(object):\n \"\"\"Grid data class that reads/converts grid-format data. Internall...
[ [ "numpy.log", "scipy.ndimage.gaussian_filter", "scipy.ndimage.affine_transform", "numpy.arange", "scipy.interpolate.RegularGridInterpolator", "numpy.ones", "numpy.max", "numpy.cumprod", "numpy.exp", "numpy.array", "numpy.meshgrid", "numpy.zeros", "numpy.empty" ...
WouterDls/simpeg
[ "6b8ef01e123d3bab24aa6a2364200f7114017d06" ]
[ "tutorials/03-gravity/plot_1a_gravity_anomaly.py" ]
[ "\"\"\"\nForward Simulation of Gravity Anomaly Data on a Tensor Mesh\n===========================================================\n\nHere we use the module *SimPEG.potential_fields.gravity* to predict gravity\nanomaly data for a synthetic density contrast model. The simulation is\ncarried out on a tensor mesh. For ...
[ [ "numpy.abs", "numpy.linspace", "numpy.savetxt", "numpy.random.seed", "numpy.min", "numpy.ones", "matplotlib.colorbar.ColorbarBase", "numpy.max", "scipy.interpolate.LinearNDInterpolator", "numpy.exp", "numpy.meshgrid", "matplotlib.pyplot.show", "matplotlib.pyplot...
Jewelryland/YelpRecSys
[ "56a2a272432549076cd6c76b6f3fb50921a68743" ]
[ "RecSys/recsys_cf_svdpp.py" ]
[ "# -*- coding: utf-8 -*-\n__author__ = 'Adward'\n\n# Python utils imports\nimport os\nimport sys\nfrom time import time\nimport sqlite3\n\n# Standard scientific Python imports\nimport numpy as np\nimport scipy.sparse as sp\nfrom scipy.sparse import csr_matrix, hstack, coo_matrix\nfrom scipy.sparse.linalg import svd...
[ [ "sklearn.decomposition.TruncatedSVD", "scipy.sparse.issparse", "numpy.append", "numpy.random.randn", "numpy.array", "numpy.zeros" ] ]
IntelLabs/OSCAR
[ "25d1dea35727379117e11b7238b5a0d1ed19acad" ]
[ "oscar/attacks/static_patch.py" ]
[ "#\n# Copyright (C) 2020 Intel Corporation\n#\n# SPDX-License-Identifier: BSD-3-Clause\n#\n\nfrom art.attacks.attack import EvasionAttack\nfrom art.utils import check_and_transform_label_format\nfrom art.estimators.estimator import BaseEstimator, LossGradientsMixin\nfrom art.estimators.classification.classifier imp...
[ [ "numpy.expand_dims", "numpy.clip", "numpy.sign", "numpy.mean", "numpy.random.uniform", "numpy.where", "numpy.zeros" ] ]
sanixa/CADA-VAE-pytorch
[ "9383c3067ce84f351c72a285d6da5724dcd710a6" ]
[ "model/single_experiment.py" ]
[ "\n### execute this function to train and test the vae-model\n\nfrom vaemodel import Model\nimport numpy as np\nimport pickle\nimport torch\nimport os\nimport argparse\n\ndef str2bool(v):\n if v.lower() in ('yes', 'true', 't', 'y', '1'):\n return True\n elif v.lower() in ('no', 'false', 'f', 'n', '0'):...
[ [ "torch.save" ] ]
tian-yu/INF552
[ "1a754c0d7ccfbc731abaa8fa42249cb1e1f30a71" ]
[ "hw4/Logistic_Regression.py" ]
[ "#\n# INF 552 Homework 4\n# Part: Logistic Regression\n# Group Members: Tianyu Zhang (zhan198), Minyi Huang (minyihua), Jeffy Merin Jacob (jeffyjac)\n# Date: 3/09/2018\n# Programming Language: Python 3.6\n#\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\nfrom sklea...
[ [ "numpy.dot", "numpy.hstack", "sklearn.linear_model.LogisticRegression", "matplotlib.pyplot.cm.get_cmap", "numpy.ones", "numpy.append", "numpy.random.rand", "numpy.exp", "numpy.array", "matplotlib.pyplot.show", "numpy.loadtxt", "matplotlib.pyplot.figure" ] ]
velasquezg1/python-challenge
[ "1a1ea80ae2d3f63a8e2cfc2ca41d499660466cf0" ]
[ "PyPoll.py" ]
[ "import pandas as pd\r\n\r\ndat=pd.read_csv('election_data.csv')\r\ndat=dat.reset_index()\r\ntotalvotes=len(dat.index)\r\nx=dat.iloc[:,3]\r\nl1=[]\r\nfor i in range(0,totalvotes):\r\n if(x[i] not in l1):\r\n l1.append(x[i])\r\nl2=[0]*len(l1)\r\nfor i in l1:\r\n for j in x:\r\n if(i==j):\r\n ...
[ [ "pandas.read_csv" ] ]
pcandoalmeida/pandas
[ "d81e226bbf0c3918e15c37f4ba810c2c264a35f3" ]
[ "pandas/core/indexes/numeric.py" ]
[ "from typing import TYPE_CHECKING, Any\n\nimport numpy as np\n\nfrom pandas._libs import index as libindex, lib\nfrom pandas._typing import Dtype\nfrom pandas.util._decorators import Appender, cache_readonly\n\nfrom pandas.core.dtypes.cast import astype_nansafe\nfrom pandas.core.dtypes.common import (\n is_bool,...
[ [ "numpy.asarray", "pandas.core.dtypes.common.is_extension_array_dtype", "numpy.issubdtype", "pandas.core.dtypes.common.is_dtype_equal", "numpy.dtype", "numpy.concatenate", "pandas.core.common.asarray_tuplesafe", "pandas.core.indexes.base.maybe_extract_name", "pandas.core.ops.get...
GAIA-vision/GAIA-ssl
[ "7ac33fe2b8af0791caa89dfa789f03a3e20c9fa4", "3c22806a9337278a48dcbcc1fcc40082b8fe5af5" ]
[ "gaiassl/models/DynamicMOCO.py", "tools/search_by_distance.py" ]
[ "# standard lib\nimport pdb\n\n# 3rd-party lib\nimport torch\nimport torch.nn as nn\n\n# mm lib\nfrom openselfsup.utils import print_log\nfrom openselfsup.models import builder, MODELS\n\n\n# local lib\nfrom .base import BaseSSLearner\n\n\n@MODELS.register_module\nclass DynamicMOCO(BaseSSLearner):\n \"\"\"Dynami...
[ [ "torch.nn.functional.normalize", "torch.distributed.broadcast", "torch.cat", "torch.zeros", "torch.randn", "torch.randperm", "torch.distributed.all_gather", "torch.einsum", "torch.no_grad", "torch.distributed.get_rank", "torch.argsort", "torch.ones_like", "torch...
Alex-Tremayne/Numerical-Grav-Sim
[ "bdde57f922a0687c02c5b232ad605caca385aeae" ]
[ "source/main.py" ]
[ "# These imports tell python that we want to use code from our other files\r\nimport particle\r\nimport physics\r\n\r\n# These imports are from installed python packages\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom celluloid import Camera\r\n\r\n# This is a function\r\n# Functions in code work m...
[ [ "numpy.asarray", "matplotlib.pyplot.ylim", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlim", "numpy.append", "numpy.copy", "numpy.random.rand", "numpy.array", "matplotlib.pyplot.figure" ] ]
MichaelLutter/mimo
[ "8a6a770ee90cbd6fd5cc12141d19442a3477af2c" ]
[ "examples/gauss/vi_gauss.py" ]
[ "import numpy as np\nimport numpy.random as npr\n\nfrom mimo import distributions\n\ndim, nb_samples, nb_datasets = 3, 500, 5\ndist = distributions.Gaussian(mu=npr.randn(dim), sigma=5. * np.diag(npr.rand(dim)))\ndata = [dist.rvs(size=nb_samples) for _ in range(nb_datasets)]\nprint(\"True mean\" + \"\\n\", dist.mu.T...
[ [ "numpy.eye", "numpy.random.randn", "numpy.random.rand", "numpy.zeros" ] ]
JLCaraveo/sklearn-projects-Platzi
[ "d2556dd90479a9057bd78face993fefd8ad47a5f" ]
[ "production_project/utils.py" ]
[ "import pandas as pd\nimport joblib\n\n\nclass Utils:\n\n def load_from_csv(self, path):\n return pd.read_csv(path)\n\n\n def load_from_mysql(self):\n pass\n\n\n def features_target(self, df, drop_columns, target):\n x = df.drop(drop_columns, axis=1)\n y = df[target]\n\n ...
[ [ "pandas.read_csv" ] ]
fxjeane/RenderManForBlender
[ "28618f67ba6ca2fe4a698786ca0427972b11f0cf", "28618f67ba6ca2fe4a698786ca0427972b11f0cf" ]
[ "rfb_utils/object_utils.py", "rman_translators/rman_mesh_translator.py" ]
[ "import bpy\nimport numpy as np\nfrom .prefs_utils import get_pref\nfrom . import string_utils\n\ndef get_db_name(ob, rman_type='', psys=None):\n db_name = '' \n\n if psys:\n db_name = '%s|%s-%s' % (ob.name_full, psys.name, psys.settings.type)\n\n elif rman_type != '' and rman_type != 'NONE':\n ...
[ [ "numpy.reshape", "numpy.zeros" ], [ "numpy.reshape", "numpy.zeros" ] ]
jamayfieldjr/iem
[ "275b77a65f3b12e26e6cbdb230786b9c7d2b9c9a", "275b77a65f3b12e26e6cbdb230786b9c7d2b9c9a", "275b77a65f3b12e26e6cbdb230786b9c7d2b9c9a", "275b77a65f3b12e26e6cbdb230786b9c7d2b9c9a", "275b77a65f3b12e26e6cbdb230786b9c7d2b9c9a" ]
[ "scripts/ingestors/madis/extract_hfmetar.py", "scripts/iemre/init_daily.py", "htdocs/plotting/auto/scripts100/p130.py", "scripts/ingestors/other/cobs_ingest.py", "htdocs/iemre/multiday.py" ]
[ "\"\"\"Pull in what's available for HFMETAR MADIS data\n\nRun from RUN_10MIN.sh\nRun from RUN_40_AFTER.sh for two hours ago\n\"\"\"\nfrom __future__ import print_function\nimport os\nimport sys\nimport datetime\nimport warnings\n\nimport pytz\nimport numpy as np\nfrom tqdm import tqdm\nfrom metar import Metar\nfrom...
[ [ "numpy.ma.abs" ], [ "numpy.flipud", "numpy.where", "numpy.ones" ], [ "numpy.arange", "pandas.io.sql.read_sql" ], [ "pandas.to_numeric", "pandas.read_csv", "pandas.to_datetime", "pandas.isnull" ], [ "numpy.isnan", "numpy.ma.is_masked" ] ]
Linus4world/mrs-gan
[ "64669251584a7421cce3a5173983a2275dcb438a" ]
[ "models/auxiliaries/CBAM.py" ]
[ "#https://blog.paperspace.com/attention-mechanisms-in-computer-vision-cbam/#:~:text=Spatial%20attention%20represents%20the%20attention,features%20that%20define%20that%20bird.\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom collections import OrderedDict\n# from modules.aux.auxiliary im...
[ [ "torch.mean", "torch.max", "torch.nn.InstanceNorm1d", "torch.nn.Flatten", "torch.nn.Sigmoid", "torch.tensor", "torch.nn.Linear", "torch.nn.Identity", "torch.nn.ReLU" ] ]
vishalbelsare/carculator
[ "44516a5f3e7f7f42f0d0d7a5c2bd5af3d17d0fd4", "44516a5f3e7f7f42f0d0d7a5c2bd5af3d17d0fd4" ]
[ "carculator/noise_emissions.py", "carculator/internal_noise.py" ]
[ "import numexpr as ne\nimport numpy as np\n\n\nclass NoiseEmissionsModel:\n \"\"\"\n Calculate propulsion and rolling noise emissions for combustion, hybrid and electric vehicles, based on CNOSSOS model.\n\n :param cycle: Driving cycle. Pandas Series of second-by-second speeds (km/h) or name (str)\n ...
[ [ "numpy.tile", "numpy.zeros_like", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.vstack" ], [ "scipy.interpolate.interp1d" ] ]
nathanllww/slivka-irv
[ "6688ac88a34387df476d51f66d291e9f3b6454aa" ]
[ "wildcat_connection/csv.py" ]
[ "import os\nimport datetime\nimport pandas as pd\nfrom .constants import SUBMISSION_ID_COLNAME, QUESTION_RANK_SEPARATOR\nfrom . import BALLOT_FOLDER\nfrom .utils import isnan, wc_update_catcher\n\n\nclass WildcatConnectionCSV:\n \"\"\"\n Class for converting a Wildcat Connection exported ballot CSV into\n ...
[ [ "pandas.read_csv" ] ]
Qiming-Wu/auto_LiRPA
[ "7e1fbf12d857ef8d411d80eef1bd73d9ae4ba3be" ]
[ "tests/test_conv.py" ]
[ "import torch\nimport argparse\nimport os\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision\nfrom auto_LiRPA import BoundedModule, BoundedTensor\nfrom auto_LiRPA.perturbations import *\n\nparser = argparse.ArgumentParser()\nargs, unknown = parser.parse_known_args() \n\nclass Flatten(nn.M...
[ [ "torch.nn.Sequential", "torch.Size", "torch.empty_like", "torch.manual_seed", "torch.randn", "torch.nn.Conv2d", "torch.nn.Linear", "torch.cuda.manual_seed_all", "torch.allclose", "torch.nn.ReLU" ] ]
sytelus/fast-autoaugment
[ "a53708699dce1233ce2a0bf0416ae2278007d506" ]
[ "FastAutoAugment/common/data.py" ]
[ "from torch.utils.data.dataloader import DataLoader\nimport os\nimport sys\nfrom typing import List, Tuple, Union, Optional\n\nimport torch\nimport torchvision\nfrom PIL import Image\n\nfrom torch.utils.data import \\\n SubsetRandomSampler, Sampler, Subset, ConcatDataset, Dataset, random_split\nfrom torchvision....
[ [ "torch.utils.data.SubsetRandomSampler", "torch.utils.data.DataLoader", "torch.from_numpy", "torch.utils.data.ConcatDataset", "torch.utils.data.Subset", "torch.cuda.device_count", "sklearn.model_selection.StratifiedShuffleSplit" ] ]
dsys/pavlov
[ "6357019cf8bb32ff204c269e5b4cbc690bda984b" ]
[ "src/fast-hamm/server.py" ]
[ "from flask import Flask, jsonify, request\nimport argparse\nimport msgpack\nimport numpy as np\nimport os\nimport rocksdb\n\nparser = argparse.ArgumentParser()\nparser.add_argument('database', metavar='DATABASE', help='path to the database')\nparser.add_argument('--port', type=int, default=5000, help='path to the ...
[ [ "numpy.count_nonzero" ] ]
smarthi/tensorflow
[ "55b01593515817992821423fec19733bca91c918", "55b01593515817992821423fec19733bca91c918", "55b01593515817992821423fec19733bca91c918", "55b01593515817992821423fec19733bca91c918" ]
[ "tensorflow/python/training/training.py", "tensorflow/contrib/learn/python/learn/datasets/text_datasets.py", "tensorflow/contrib/tensor_forest/python/topn.py", "tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined_benchmark_test.py" ]
[ "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.util.all_util.remove_undocumented" ], [ "tensorflow.contrib.learn.python.learn.datasets.base.Datasets", "tensorflow.python.platform.gfile.Exists", "tensorflow.contrib.learn.python.learn.datasets.base.load_csv_without_header", "tensorflow.contrib.learn.python.learn.datase...
balbasty/nitorch
[ "d30c3125a8a66ea1434f2b39ed03338afd9724b4", "d30c3125a8a66ea1434f2b39ed03338afd9724b4", "d30c3125a8a66ea1434f2b39ed03338afd9724b4", "d30c3125a8a66ea1434f2b39ed03338afd9724b4" ]
[ "nitorch/tools/img_statistics.py", "nitorch/nn/experimental/_fancyvxm.py", "nitorch/nn/modules/norm.py", "nitorch/nn/modules/hyper.py" ]
[ "\"\"\"Functions simillar of inspired by the SPM package:\n\n\"\"\"\n\nimport nibabel as nib\nimport torch\nimport math\nfrom nitorch.core.kernels import smooth\nfrom nitorch.vb.mixtures import GMM\nfrom nitorch.vb.mixtures import RMM\nfrom nitorch.spatial import im_gradient\nfrom nitorch.core.constants import inf\...
[ [ "torch.abs", "torch.linspace", "torch.max", "torch.histc", "torch.cat", "torch.sqrt", "torch.min", "torch.sum", "torch.tensor", "torch.isfinite", "torch.arange", "torch.as_tensor" ], [ "torch.linspace", "torch.ones", "torch.zeros", "torch.cat", ...
DouCir/mmdetection
[ "44613202c379d85315ed47ca670fd9853f90c3a5" ]
[ "mmdet/datasets/custom_datasets/coder_single_dataset.py" ]
[ "from ..custom import CustomDataset\nimport os.path as osp\n\nimport mmcv\nimport numpy as np\nfrom ..utils import to_tensor, random_scale\nfrom ..transforms import ImageTransform\nimport cv2\n\n\nclass CoderSingleDataset(CustomDataset):\n def __init__(self,\n ann_file,\n img_pref...
[ [ "numpy.zeros", "numpy.random.rand" ] ]
Yasuo-orphan/SelfKG
[ "52f71c186ab4ad2db8de6cadf4e498d6e563ee96" ]
[ "script/preprocess/DWY_neighbor_token.py" ]
[ "import settings\nimport pandas as pd\nfrom loader.DWY_Neighbor import NeighborsLoader\nfrom loader.DBP15k import DBP15kLoader\nfrom script.preprocess.get_token import Token\nfrom settings import *\nimport numpy as np\nimport torch\n\nclass NeighborToken(object):\n def __init__(self, dbpToken, loader):\n ...
[ [ "torch.zeros" ] ]
vxsharma-14/DIFFUS
[ "d70633890b8fb2e7b3dde918eb13b263f7a035ef" ]
[ "docs/source/examples/tutorial-02-diffusion-1D-solvers-FTCS.py" ]
[ "# ***********************************************************************\r\n#\r\n# FILE tutorial-02-diffusion-1D-solvers-FTCS.py\r\n#\r\n# AUTHOR Dr. Vishal Sharma\r\n#\r\n# VERSION 1.0.0-alpha4\r\n#\r\n# WEBSITE https://github.com/vxsharma-14/project-NAnPack\r\n#\r\n# NAnPack ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.rc", "matplotlib.pyplot.subplots", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
ppwwyyxx/tensorpack
[ "f8fa2108c7ba85a69e0d7b81f2737d8284fdaa67" ]
[ "tensorpack/train/trainers.py" ]
[ "# -*- coding: utf-8 -*-\n# File: trainers.py\n\nimport multiprocessing as mp\nimport os\nimport sys\nimport tensorflow as tf\nfrom tensorpack.compat import tfv1\n\nfrom ..callbacks import CallbackFactory, RunOp\nfrom ..graph_builder.distributed import DistributedParameterServerBuilder, DistributedReplicatedBuilder...
[ [ "tensorflow.name_scope" ] ]
andreArtelt/ceml
[ "364d4630d6a01592c2ab86f2d53dbb7feb682381" ]
[ "tests/sklearn/test_sklearn_randomforest.py" ]
[ "# -*- coding: utf-8 -*-\nimport sys\nsys.path.insert(0,'..')\n\nimport numpy as np\nnp.random.seed(42)\nimport sklearn\nfrom sklearn.datasets import load_iris, load_boston\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.ensemble import RandomForestClassifier, RandomForestRegressor\n\nfrom ceml....
[ [ "sklearn.ensemble.RandomForestRegressor", "numpy.abs", "numpy.random.seed", "sklearn.ensemble.RandomForestClassifier", "sklearn.datasets.load_iris", "sklearn.model_selection.train_test_split", "sklearn.datasets.load_boston", "numpy.array" ] ]
ouakif/tensorflow
[ "6efce9a74d4ba2ba2182d92ac1e4f144b5d755d2", "63c45aacf30e819b00e74b85bd1c9f11b0760cd3", "63c45aacf30e819b00e74b85bd1c9f11b0760cd3", "63c45aacf30e819b00e74b85bd1c9f11b0760cd3" ]
[ "tensorflow/python/data/ops/iterator_ops.py", "tensorflow/python/keras/layers/convolutional_test.py", "tensorflow/python/ops/linalg/linear_operator_householder.py", "tensorflow/python/keras/engine/network_test.py" ]
[ "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.data.util.nest.map_structure_up_to", "tensorflow.python.framework.tensor_shape.TensorShape", "tensorflow.python.framework.ops.add_to_collection", "tensorflow.python.ops.gen_dataset_ops.serialize_iterator", "tensorflow.python.framework.ops.device", "tensorflow.python.eage...
ycwu1030/CosmoTransitions
[ "dabf3fe02c05d13458571e84398a148aad5aec4c" ]
[ "cosmoTransitions/tunneling1D.py" ]
[ "\"\"\"\nThis module (along with a few functions in :mod:`.helper_functions`) contains\neverything that is needed to calculate instantons in one field dimension.\nThe primary class is :class:`SingleFieldInstanton`, which can calculate the\ninstanton solution in any number of spatial dimensions using the overshoot /...
[ [ "scipy.interpolate.splrep", "scipy.special.gamma", "numpy.sqrt", "numpy.isfinite", "numpy.linspace", "numpy.empty_like", "numpy.arange", "scipy.interpolate.splev", "numpy.sign", "numpy.exp", "numpy.append", "numpy.ceil", "scipy.integrate.simps", "numpy.array...
Business-Wizard/01_capstone
[ "2985c664546d6503ef071a5afe1d0220a2c079be" ]
[ "src/EDA.py" ]
[ "import pandas as pd\nimport matplotlib.pyplot as plt\nimport EDA_functions as eda\n\nsample_10m = 'data/10m_sample_common_passwords/10m_standard_complete3.csv'\npwned_path = '../data/have_i_been_pwned_v4/been_pwned_v4_hash_plain.txt'\nlinkedin_path = '../data/linkedin_leak/linkedin_hash_plain.txt'\nlinkedin_test_f...
[ [ "pandas.read_csv" ] ]
michaelkazman/random-chart-generator
[ "bf53666ab18e47b3d3882611ea88b30f5ce84161", "bf53666ab18e47b3d3882611ea88b30f5ce84161" ]
[ "creators/bubble.py", "generators/histogram.py" ]
[ "import numpy as np\nimport pandas as pd\nimport altair as alt\nimport plotnine as p9\nfrom bokeh.plotting import figure\nfrom bokeh.models import ColumnDataSource\nfrom utils.creators import unpack_graph_object\n\ndef create_bokeh_graph(graph_object):\n # format data\n (X, y, bubble_size, *_), styles = unpac...
[ [ "numpy.amin", "numpy.amax", "pandas.DataFrame" ], [ "numpy.random.lognormal", "numpy.random.normal", "numpy.random.gamma", "numpy.random.uniform", "numpy.histogram" ] ]
repagh/python-control
[ "9f27293483c54ab7f90b34a100baba7587e9d36d" ]
[ "control/tests/rlocus_test.py" ]
[ "\"\"\"rlocus_test.py - unit test for root locus diagrams\n\nRMM, 1 Jul 2011\n\"\"\"\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom numpy.testing import assert_array_almost_equal\nimport pytest\n\nimport control as ct\nfrom control.rlocus import root_locus, _RLClickDispatcher\nfrom control.xferfcn imp...
[ [ "numpy.testing.assert_array_almost_equal", "numpy.sort", "matplotlib.pyplot.gcf", "matplotlib.pyplot.get_current_fig_manager", "numpy.testing.assert_allclose", "scipy.signal.zpk2tf", "matplotlib.pyplot.figure" ] ]
tadorfer/ProtClass
[ "da1a01ea9abd3c367b3389dfed683c6a9dfa6afd", "da1a01ea9abd3c367b3389dfed683c6a9dfa6afd" ]
[ "protlearn/dimreduction/tests/test_univariate_filter.py", "protlearn/features/tests/test_cksaap.py" ]
[ "import pytest\nimport numpy as np\nfrom ..univariate_filter import univariate_filter\n\nimport pkg_resources\n\nPATH = pkg_resources.resource_filename(__name__, 'test_data/')\n\ndef test_univariate_filter():\n \"Test filter-based dimensionality reduction\"\n \n # load data\n X = np.load(PATH+'features_...
[ [ "numpy.load", "numpy.array" ], [ "numpy.array" ] ]
Vernacular-ai/slu-service
[ "c61af67ead471e47202036779eeda124e57d9850" ]
[ "slu/slu/utils/config.py" ]
[ "\"\"\"\n[summary]\n\"\"\"\nimport abc\nimport os\nimport re\nimport pickle\nimport shutil\nfrom typing import Any, Dict, List, Optional, Union\n\nimport attr\nimport requests\nimport semver\nimport torch\nimport yaml\nfrom requests.adapters import HTTPAdapter\nfrom simpletransformers.classification import Classifi...
[ [ "torch.cuda.device_count" ] ]
A-Waterman/udacity-dog-project
[ "f5035fd12ebc7bafb10aa7ccd03384a5eab1f648" ]
[ "keras_tests.py" ]
[ "from sklearn.datasets import load_files\nfrom keras.utils import np_utils\nimport numpy as np\nfrom glob import glob\nfrom keras.models import Sequential\nfrom keras.layers import Conv2D, MaxPooling2D, GlobalAveragePooling2D\nfrom keras.layers import Activation, BatchNormalization\nfrom keras.layers import Dropout...
[ [ "numpy.expand_dims", "numpy.savez", "numpy.save", "sklearn.datasets.load_files", "numpy.argmax", "numpy.load", "numpy.array", "numpy.vstack" ] ]
tylerhuntington222/yellowbrick
[ "4db12724d10d4abe6cf97374380d11ac9025ac3e", "4db12724d10d4abe6cf97374380d11ac9025ac3e" ]
[ "yellowbrick/model_selection/validation_curve.py", "docs/gallery.py" ]
[ "# yellowbrick.model_selection.validation_curve\n# Implements a visual validation curve for a hyperparameter.\n#\n# Author: Benjamin Bengfort\n# Created: Sat Mar 31 06:27:28 2018 -0400\n#\n# Copyright (C) 2018 The scikit-yb developers\n# For license information, see LICENSE.txt\n#\n# ID: validation_curve.py [c5355...
[ [ "numpy.asarray", "numpy.std", "numpy.mean", "sklearn.model_selection.validation_curve" ], [ "sklearn.datasets.make_classification", "numpy.linspace", "sklearn.cluster.KMeans", "sklearn.datasets.load_diabetes", "sklearn.preprocessing.LabelEncoder", "sklearn.datasets.make...
JintuZheng/zisan
[ "84b30d1ee91754d4351841a2077c78146028adfc" ]
[ "zisan/Seg/Interface.py" ]
[ "#################################################################\n### @author:郑晋图 JintuZheng\n### Email: jintuzheng@outlook.com\n### Remarks: Please respect my labor achievements, and contact me to modify the source code\n### Date:2020-01-23\n################################################################\n\nimp...
[ [ "scipy.ndimage.morphology.binary_dilation", "numpy.set_printoptions", "numpy.stack", "numpy.array", "numpy.zeros", "numpy.where" ] ]
aflaxman/milk
[ "252806fd081dc1b3c7fe34b14f9e7a4b646e0b49", "252806fd081dc1b3c7fe34b14f9e7a4b646e0b49", "252806fd081dc1b3c7fe34b14f9e7a4b646e0b49" ]
[ "milk/tests/test_tree.py", "milk/measures/curves.py", "milk/supervised/lasso.py" ]
[ "import milk.supervised.tree\nimport milk.supervised._tree\nfrom milk.supervised._tree import set_entropy\nfrom milk.supervised.tree import information_gain, stump_learner\nimport numpy as np\n\ndef test_tree():\n from milksets import wine\n features, labels = wine.load()\n selected = (labels < 2)\n fea...
[ [ "numpy.log", "numpy.abs", "numpy.random.seed", "numpy.arange", "numpy.random.random_sample", "numpy.ones", "numpy.all", "numpy.random.randn", "numpy.repeat", "numpy.array", "numpy.zeros", "numpy.empty" ], [ "numpy.asanyarray", "numpy.mean", "numpy.su...
matinraayai/pytorch_connectomics
[ "b11a2f7e71a8d1442fb05f7a6edfaaaa7b0d9205" ]
[ "connectomics/model/utils/criterion.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\n\nfrom ..loss import *\n\nclass Criterion(object):\n def __init__(self, device=0, target_opt=['1'], loss_opt=[['WeightedBCE']], loss_weight=[[1.]], regu_opt=[], regu_weight=[]):\n self.device = device\n self.target_opt = target_opt\n ...
[ [ "torch.from_numpy", "torch.nn.L1Loss" ] ]
cminusQAQ/graph4nlp
[ "d980e897131f1b9d3766750c06316d94749904fa", "d980e897131f1b9d3766750c06316d94749904fa", "d980e897131f1b9d3766750c06316d94749904fa", "d980e897131f1b9d3766750c06316d94749904fa" ]
[ "graph4nlp/pytorch/datasets/cnn.py", "graph4nlp/pytorch/modules/graph_construction/utils.py", "graph4nlp/pytorch/modules/prediction/classification/graph_classification/max_pooling.py", "examples/pytorch/name_entity_recognition/main.py" ]
[ "import json\nimport torch\nfrom nltk.tokenize import word_tokenize\n\nfrom graph4nlp.pytorch.data.dataset import Text2TextDataItem, Text2TextDataset\nfrom graph4nlp.pytorch.modules.utils.padding_utils import pad_2d_vals, pad_2d_vals_no_size\n\n\nclass CNNDataset(Text2TextDataset):\n def __init__(\n self,...
[ [ "torch.from_numpy" ], [ "torch.Tensor" ], [ "torch.stack", "torch.nn.Linear", "torch.max" ], [ "torch.optim.Adam", "torch.utils.data.DataLoader", "torch.no_grad", "torch.device", "torch.multiprocessing.set_sharing_strategy" ] ]
jusch196/chameleon-apps
[ "b63a6b20a62c450565403b0768551cca9c288156" ]
[ "tools/tool_load_prediction/python_utils/cham_toollogs_evaluate_loss.py" ]
[ "from sklearn.metrics import mean_squared_error\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport sys\nimport os\nimport csv\n\n\n\n\"\"\"Read cham-tool-logs with predicted-load values\n\nEach rank holds an array of real-load and predicted load. For example,\n ...
[ [ "numpy.subtract", "matplotlib.pyplot.yscale", "matplotlib.pyplot.subplots", "matplotlib.pyplot.grid", "numpy.average" ] ]
closest-git/QuantumFold
[ "2dc6afa96cdee91b58f66543b440a2d7a8d32a8a" ]
[ "cnn/attention_net.py" ]
[ "'''\n@Author: Yingshi Chen\n\n@Date: 2020-04-27 18:30:01\n@\n# Description: \n'''\nfrom torch import nn\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom operations import *\nfrom sparse_max import sparsemax, sparsemoid, entmoid15, entmax15\nfrom genotypes import Genotype\nimport time\nfrom MixedOp imp...
[ [ "torch.nn.Softmax", "torch.nn.functional.softmax", "torch.nn.ModuleList", "torch.nn.Conv2d", "matplotlib.pyplot.subplots", "torch.nn.Sigmoid", "torch.nn.functional.sigmoid", "torch.nn.Linear", "torch.nn.AdaptiveAvgPool2d", "torch.nn.BatchNorm2d", "torch.nn.Conv1d", ...
csvance/machine-learning-connect-four
[ "faec52280a82183f7dfd8ed6d9253af9093811eb", "faec52280a82183f7dfd8ed6d9253af9093811eb" ]
[ "c4_model.py", "c4.py" ]
[ "import numpy as np\nimport tensorflow as tf\nfrom keras.backend import set_session\nfrom keras.layers import Dense, Flatten, Input, concatenate, SeparableConv2D\nfrom keras.models import Model\nfrom keras.optimizers import Adam\n\nfrom c4_game import C4Action, C4Experience, C4State, C4MoveResult\n\n\nclass Ramp(ob...
[ [ "numpy.amax", "numpy.min", "numpy.random.choice", "numpy.median", "tensorflow.ConfigProto", "numpy.max", "numpy.std", "numpy.argmax", "numpy.random.rand", "tensorflow.Session", "numpy.average", "numpy.array", "numpy.place" ], [ "numpy.seterr", "numpy...
pnnl/ProxyTSPRD
[ "6e60c65768d9ff124802a66526be0923665f0e17", "6e60c65768d9ff124802a66526be0923665f0e17" ]
[ "proxy_apps/apps/timeseries_prediction/proxyDeepDMDMGPU.py", "examples/test_data_pipeline.py" ]
[ "import time\nimport logging\nimport tensorflow as tf\n# from tensorflow.keras.utils import Progbar\n# from tensorflow.python.keras import callbacks as callbacks_module\n# import nvtx.plugins.tf as nvtx_tf\n\nlogger = tf.get_logger()\n\n# Neural Network\nclass TFOptimizedModelTrainer():\n def __init__(self, hp, ...
[ [ "tensorflow.matmul", "tensorflow.norm", "tensorflow.math.sqrt", "tensorflow.keras.regularizers.l1", "tensorflow.keras.backend.greater", "tensorflow.keras.backend.get_value", "tensorflow.cast", "tensorflow.zeros_initializer", "tensorflow.get_logger", "tensorflow.function", ...
allenbai01/ProxQuant
[ "1a9240e2afd1f49257ab5527b0f61862481a0e9d" ]
[ "models/binarized_modules.py" ]
[ "import torch\nimport pdb\nimport torch.nn as nn\nimport math\nfrom torch.autograd import Variable\nfrom torch.autograd import Function\n\nimport numpy as np\n\n\ndef Binarize(tensor,quant_mode='det'):\n if quant_mode=='det':\n return tensor.sign()\n else:\n return tensor.add_(1).div_(2).add_(to...
[ [ "torch.nn.functional.conv2d", "torch.nn.functional.linear" ] ]
zhoubin-me/agent0
[ "1184827077e43dfa63e1f24a004fcc6c3e3d5130", "1184827077e43dfa63e1f24a004fcc6c3e3d5130" ]
[ "agent0/ddpg/model.py", "agent0/deepq/trainer.py" ]
[ "from itertools import chain\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom torch.distributions import Normal\n\n\ndef init(m, gain=1.0):\n if isinstance(m, nn.Conv2d) or isinstance(m, nn.Linear):\n nn.init.orthogonal_(m.weight.data, gain)\n nn.init.zeros_(m.bias.data)\n\n\nclass ...
[ [ "numpy.sqrt", "torch.cat", "torch.nn.Tanh", "torch.nn.Linear", "torch.nn.init.orthogonal_", "torch.nn.init.zeros_" ], [ "numpy.min", "numpy.max", "numpy.std", "numpy.mean", "torch.stack", "torch.save" ] ]
hideyukiinada/ml
[ "2618e2d694edb40b4b01e584f63a3c0ade7e4652" ]
[ "project/neuralnetwork.py" ]
[ "#!/usr/bin/env python\n\"\"\"\nNeural Network implementation.\n\nCredit\n------\nI primarily learned the neural network algorithm from below sources:\n[ICL] Imperial College London, Mathematics for Machine Learning Specialization, https://www.coursera.org/specializations/mathematics-machine-learning\n[DA] deeplear...
[ [ "numpy.sqrt", "numpy.random.choice", "numpy.ones", "numpy.random.normal", "numpy.random.randn", "numpy.random.uniform", "numpy.zeros", "numpy.sum" ] ]
ualsbombe/mne-python
[ "d02ac81019cec662dd8245c167f6657e57ec44a3", "d02ac81019cec662dd8245c167f6657e57ec44a3" ]
[ "mne/preprocessing/ica.py", "mne/connectivity/spectral.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.cumsum", "numpy.concatenate", "numpy.round", "numpy.exp", "numpy.where", "numpy.hstack", "numpy.allclose", "numpy.unique", "numpy.arange", "numpy.eye...
tuananhle7/hmws
[ "175f77a2b386ce5a9598b61c982e053e7ecff8a2" ]
[ "cmws/examples/timeseries_real/lstm_util.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport cmws.util\n\n\ndef step_lstm(lstm, input_, h_0_c_0=None):\n \"\"\"LSTMCell-like API for LSTM.\n Args:\n lstm: nn.LSTM\n input_: [batch_size, input_size]\n h_0_c_0: None or\n h_0: [num_layers, batch_si...
[ [ "torch.all", "torch.Size", "torch.zeros", "torch.cat", "torch.nn.functional.one_hot", "torch.distributions.Bernoulli", "torch.tensor", "torch.nn.utils.rnn.pad_packed_sequence", "torch.distributions.Categorical", "torch.distributions.Normal", "torch.stack", "torch.nn...
open-data-toronto/operations
[ "db180e655e435338bc57f22a3e706a5bdc40304e" ]
[ "dags/datasets/licensed-child-care-centres.py" ]
[ "import hashlib\nimport json\nimport logging\nimport os\nfrom datetime import datetime\nfrom pathlib import Path\n\nimport pandas as pd\nfrom airflow import DAG\nfrom airflow.models import Variable\nfrom airflow.operators.dummy import DummyOperator\nfrom airflow.operators.python import BranchPythonOperator, PythonO...
[ [ "pandas.read_parquet", "pandas.read_csv" ] ]
marinko-peso/python-simple-neural-network
[ "b3a36e6a7a568ed54f691ce15d73ce0f2e77c6de" ]
[ "neuron.py" ]
[ "from numpy import exp # natural exponential\nfrom numpy import array # creates a matrix\nfrom numpy import dot # multiplies matrices\nfrom numpy import random\n\n\nclass NeuralNetwork():\n def __init__(self):\n # Seed the random number generator, so it generates the same numbers\n ...
[ [ "numpy.dot", "numpy.random.random", "numpy.random.seed", "numpy.array", "numpy.exp" ] ]
alexitkes/pandas
[ "8305a856c150126ef899544091395104ac6141e2", "8305a856c150126ef899544091395104ac6141e2", "8305a856c150126ef899544091395104ac6141e2" ]
[ "pandas/core/dtypes/missing.py", "pandas/tests/series/indexing/test_indexing.py", "pandas/tests/arrays/categorical/test_indexing.py" ]
[ "\"\"\"\nmissing types & inference\n\"\"\"\nimport numpy as np\n\nfrom pandas._config import get_option\n\nfrom pandas._libs import lib\nimport pandas._libs.missing as libmissing\nfrom pandas._libs.tslibs import NaT, iNaT\nfrom pandas._typing import DtypeObj\n\nfrom pandas.core.dtypes.common import (\n _NS_DTYPE...
[ [ "pandas.core.dtypes.common.is_extension_array_dtype", "numpy.asarray", "pandas.core.dtypes.common.is_dtype_equal", "pandas._libs.lib.is_scalar", "pandas._config.get_option", "pandas._libs.missing.checknull_old", "pandas.core.dtypes.common.is_complex_dtype", "pandas.core.dtypes.comm...
m-beau/phy
[ "755082af4e123dc057b8edca138652f901d0c8b1", "755082af4e123dc057b8edca138652f901d0c8b1" ]
[ "phy/plot/plot.py", "phy/cluster/views/feature.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"Plotting interface.\"\"\"\n\n\n#------------------------------------------------------------------------------\n# Imports\n#------------------------------------------------------------------------------\n\nfrom collections import OrderedDict\nfrom contextlib import contextmanager\n...
[ [ "numpy.reshape", "numpy.array" ], [ "numpy.maximum", "numpy.abs", "numpy.unique", "numpy.concatenate", "numpy.array", "numpy.vstack" ] ]
jjfeng/CNNC
[ "35de5df0763aa27dd090e27fb9bb73e3a29f92d4" ]
[ "predict_easiernet.py" ]
[ "# Usage: python predict_no_y.py number_of_separation NEPDF_pathway model_pathway\r\n# command line in developer's linux machine :\r\n# python predict_no_y.py 9 /home/yey3/cnn_project/code3/NEPDF_data /home/yey3/cnn_project/code3/trained_model/models/KEGG_keras_cnn_trained_model_shallow2.h5\r\nfrom __future__ i...
[ [ "matplotlib.use", "numpy.exp", "torch.load" ] ]
qxr04025/facenet
[ "26bdacab531aba31f96bf50befd256b107aa42b6", "fe78f661234fcd7fdfe8d136b6e7711afe154a43" ]
[ "src/validate_on_lfw.py", "src/generative/calculate_dataset_normalization.py" ]
[ "\"\"\"Validate a face recognizer on the \"Labeled Faces in the Wild\" dataset (http://vis-www.cs.umass.edu/lfw/).\nEmbeddings are calculated using the pairs from http://vis-www.cs.umass.edu/lfw/pairs.txt and the ROC curve\nis calculated and plotted. Both the model metagraph and the model parameters need to exist\n...
[ [ "tensorflow.Graph", "tensorflow.get_default_graph", "tensorflow.ConfigProto", "numpy.std", "scipy.interpolate.interp1d", "tensorflow.GPUOptions", "numpy.mean", "tensorflow.Session", "sklearn.metrics.auc", "numpy.zeros" ], [ "tensorflow.image.resize_image_with_crop_o...
debjyoti0891/map
[ "abdae67964420d7d36255dcbf83e4240a1ef4295", "abdae67964420d7d36255dcbf83e4240a1ef4295", "abdae67964420d7d36255dcbf83e4240a1ef4295" ]
[ "helios/plato/py/plato/backend/stat_expression.py", "helios/plato/django/server/bpEndpoint.py", "helios/plato/py/tests/heatmap_delta_weight_sum_investigation.py" ]
[ "import numba\nimport numpy as np\n\n\n@numba.jit(nopython=True, nogil=True)\ndef NoTransform(value_in):\n return value_in\n\n\n@numba.jit(nopython=True, nogil=True)\ndef AbsValueTransform(value_in):\n return np.abs(value_in)\n\n\n# Interpret stats, turning any compound stats into individual stats.\n# Takes a...
[ [ "numpy.abs" ], [ "numpy.nanmax", "numpy.nanmin" ], [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.title", "matplotlib.pyplot.figure" ] ]
frankovici/DemARK
[ "177c09bd387160d06f979c417671b3de18746846", "177c09bd387160d06f979c417671b3de18746846", "177c09bd387160d06f979c417671b3de18746846" ]
[ "notebooks/LifecycleModelExample.py", "notebooks/KinkedRconsumerType.py", "notebooks/PerfForesightCRRA-Approximation.py" ]
[ "# ---\n# jupyter:\n# jupytext:\n# cell_metadata_filter: collapsed,code_folding\n# formats: ipynb,py:percent\n# text_representation:\n# extension: .py\n# format_name: percent\n# format_version: '1.2'\n# jupytext_version: 1.2.1\n# kernelspec:\n# display_name: Python 3\n# ...
[ [ "numpy.log", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "numpy.mean", "matplotlib.pyplot.hist", "matplotlib.pyplot.xlabel", "numpy.zeros", "numpy.sum", "matplotlib.pyplot.ylabel" ], [ "numpy.linspace", "matplotlib.pyplot.ylim", "numpy.sort", "num...
skyhanil1004/openpilot
[ "900f13bda7b41c238cf75f382d3471141affe005" ]
[ "selfdrive/controls.org/lib/pid.py" ]
[ "import numpy as np\nfrom common.numpy_fast import clip, interp\n\ndef apply_deadzone(error, deadzone):\n if error > deadzone:\n error -= deadzone\n elif error < - deadzone:\n error += deadzone\n else:\n error = 0.\n return error\n\nclass PIController():\n def __init__(self, k_p, k_i, k_f=1., pos_limi...
[ [ "numpy.sign" ] ]
SubhashishQPIT/strawberryfields
[ "dae6ae8b1b3eb188fc2c874bd6c943bebf697ab9", "298601e409528f22c6717c2d816ab68ae8bda1fa" ]
[ "strawberryfields/backends/fockbackend/backend.py", "tests/frontend/compilers/test_xcov.py" ]
[ "# Copyright 2019 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applica...
[ [ "numpy.argsort", "numpy.einsum" ], [ "numpy.identity", "numpy.allclose", "numpy.random.seed" ] ]
shivamshan/MSS
[ "12879e64b1088b1db94b1db0d0919a31e662cd20", "12879e64b1088b1db94b1db0d0919a31e662cd20" ]
[ "mslib/msui/mpl_map.py", "mslib/msui/mpl_pathinteractor.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n\n mslib.msui.mpl_map\n ~~~~~~~~~~~~~~~~~~\n\n Map canvas for the top view.\n As Matplotlib's Basemap is primarily designed to produce static plots,\n we derived a class MapCanvas to allow for a certain degree of\n interactivity. MapCanvas extends Basemap by funct...
[ [ "matplotlib.is_interactive", "numpy.ma.getmaskarray", "numpy.arange", "numpy.ceil", "numpy.copy", "numpy.ma.compress_rows", "numpy.mean", "numpy.diff", "numpy.floor", "matplotlib.cm.get_cmap", "matplotlib.collections.PolyCollection", "matplotlib.interactive", "n...
csun-comp587-s20/manim
[ "5d0f4859eb0105fea959e79537ab662159479445" ]
[ "test/test_mobject.py" ]
[ "import copy\nimport math\nimport random\n\nimport unittest\nimport numpy as np\n\nfrom manimlib.constants import *\nfrom manimlib.mobject.mobject import Mobject\nimport test.mobject_generator as mob_gen\n\ndef __func__(mob):\n mob.name = \"lambda\"\ndef __dt_func__(mob, dt):\n mob.name = str(dt)\ndef __x_fun...
[ [ "numpy.testing.assert_array_equal", "numpy.array", "numpy.zeros" ] ]
egemenzeytinci/ycimpute
[ "b07a52586692800c68f662bff12c08a6fc2de119", "b07a52586692800c68f662bff12c08a6fc2de119", "b07a52586692800c68f662bff12c08a6fc2de119", "b07a52586692800c68f662bff12c08a6fc2de119" ]
[ "ycimpute/datasets/dpath.py", "ycimpute/unsupervised/knn/common.py", "ycimpute/utils/shower/show.py", "ycimpute/unsupervised/knn/optimistic.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport h5py\n\n\n\ndef make_missing(npdata):\n import random\n import numpy as np\n rows, cols = npdata.shape\n random_cols = range(cols)\n for col in random_cols:\n random_rows = random.sample(range(rows - 1), int(0.1 * rows))\n npdata[random_rows, col] = np...
[ [ "sklearn.datasets.load_wine", "sklearn.datasets.load_iris", "sklearn.datasets.load_boston" ], [ "numpy.isnan", "numpy.fill_diagonal", "numpy.isfinite" ], [ "numpy.asarray" ], [ "numpy.isfinite", "numpy.asarray", "numpy.ones", "numpy.argsort", "numpy.wher...
gamazeps/wot
[ "623bcdc78ad1fab43b3e05b467f961648741a7a0" ]
[ "wot/io/read_gct.py" ]
[ "import anndata\n\n\"\"\" Reads in a gct file .\n\nThe main method is parse. parse_into_3 creates the row\nmetadata, column metadata, and data dataframes, while the\nassemble_multi_index_df method in GCToo.py assembles them.\n\n1) Example GCT v1.3:\n ----- start of file ------\n #1.3\n 96 36 9 ...
[ [ "pandas.read_csv", "pandas.to_numeric" ] ]
chanb/rl_sandbox_public
[ "e55f954a29880f83a5b0c3358badda4d900f1564", "e55f954a29880f83a5b0c3358badda4d900f1564", "e55f954a29880f83a5b0c3358badda4d900f1564", "e55f954a29880f83a5b0c3358badda4d900f1564" ]
[ "rl_sandbox/model_architectures/actor_critics/conv_actor_critic.py", "rl_sandbox/examples/pybullet/hopper/sac_fr_lstm_experiment.py", "rl_sandbox/examples/imitation_learning/dac/dac_experiment.py", "rl_sandbox/envs/wrappers/frame_stack.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\n\nfrom torch.distributions import Normal\n\nfrom rl_sandbox.constants import OBS_RMS, CPU\nfrom rl_sandbox.model_architectures.actor_critics.actor_critic import ActorCritic\nfrom rl_sandbox.model_architectures.shared import Conv2DEncoder, Flatten, Fuse, Spli...
[ [ "numpy.product", "torch.empty", "torch.nn.LayerNorm", "torch.nn.Linear", "torch.distributions.Normal", "torch.device", "torch.nn.ReLU", "torch.nn.functional.softplus" ], [ "torch.device", "numpy.random.RandomState", "numpy.ones" ], [ "torch.device", "num...
bdb3m/Norfolk_Groundwater_Model
[ "5336e088ab45b4640095df3bdd40efb61364f6ac" ]
[ "Model/keras_mmps175.py" ]
[ "\"\"\"\r\nThis network uses the last 26 observations of gwl, tide, and rain to predict the next 18\r\nvalues of gwl for well MMPS-175\r\n\"\"\"\r\n\r\nimport pandas as pd\r\nfrom pandas import DataFrame\r\nfrom pandas import concat\r\nfrom pandas import read_csv\r\nfrom sklearn.metrics import mean_squared_error\r\...
[ [ "matplotlib.pyplot.legend", "pandas.to_datetime", "pandas.DataFrame", "sklearn.metrics.mean_squared_error", "numpy.concatenate", "matplotlib.pyplot.plot", "numpy.mean", "tensorflow.get_default_graph", "sklearn.preprocessing.MinMaxScaler", "numpy.square", "pandas.read_cs...
guenthermi/table-embeddings
[ "3ce094483fc5057b18f898d450a7c376d49818fa" ]
[ "deco_classifier/web_table_multi_embedding_model.py" ]
[ "import numpy as np\nimport sys\n\nsys.path.insert(0, 'embedding/')\n\nNORMALIZATION = 'individual' # 'individual', 'once', or 'none'\nEPSILON = 1e-5 # only to prevent division by zero\n\nfrom fasttext_web_table_embeddings import FastTextWebTableModel\n\n\nclass WebTableMultiEmbeddingModel:\n def __init__(self...
[ [ "numpy.concatenate", "numpy.linalg.norm" ] ]
tainacan/data_science
[ "a36c977f3aba6ce8bc45b1433ead673fd3c2674f", "a36c977f3aba6ce8bc45b1433ead673fd3c2674f", "a36c977f3aba6ce8bc45b1433ead673fd3c2674f" ]
[ "omeka_tainacan (BCE_2020)/omeka_itens_csv.py", "FAPESP/coleta_amostral/webScraping_SophiA.py", "FAPESP/coleta_amostral/webScraping_Iphan_SicgInstituicao.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\nimport requests\nfrom collections import defaultdict\nimport pandas as pd\nimport time\n\nendpoint_items = 'http://bdce.unb.br/api/items'\nendpoint_collections = 'http://bdce.unb.br/api/collections'\nresponse = requests.get(endpoint_items, params = {'page':'1'})\nmetadata_...
[ [ "pandas.DataFrame" ], [ "pandas.DataFrame", "pandas.read_html" ], [ "pandas.DataFrame", "pandas.read_html" ] ]
nitish-raj/data-science-on-aws
[ "b760805d28f8375094ce83aee849de8b9d3382a2" ]
[ "wip/ray/archive/pytorch-huggingface.py" ]
[ "#########################\n# Import required modules\n#########################\n\nimport argparse\nimport pprint\nimport json\nimport logging\nimport os\nimport sys\nimport pandas as pd\nimport random\nimport time\nimport glob\nimport numpy as np\nfrom collections import defaultdict\n\nimport torch\nimport torch....
[ [ "torch.nn.CrossEntropyLoss", "torch.LongTensor", "pandas.read_csv", "torch.max", "torch.cuda.manual_seed", "torch.manual_seed", "torch.utils.data.DataLoader", "pandas.DataFrame", "torch.tensor", "torch.cuda.is_available", "torch.device" ] ]
pmjherman/CoralModel
[ "37fe169448052f46c4aec858c6e414070edf14b1" ]
[ "coral_model/utils.py" ]
[ "\"\"\"\ncoral_model - utils\n\n@author: Gijs G. Hendrickx\n@contributor: Peter M.J. Herman\n\"\"\"\nimport os\n# TODO: Restructure all utils-related files, methods, and methods.\nimport numpy as np\nfrom netCDF4 import Dataset\n\n\nclass SpaceTime:\n \"\"\"Spacetime-object, which validates the definition of the...
[ [ "numpy.tile", "numpy.ones", "numpy.argmin", "numpy.repeat", "numpy.array", "numpy.zeros" ] ]
kmike/hdbscan
[ "da032cf2a116ff8adc8f2c96c56cbe44511b7eef" ]
[ "setup.py" ]
[ "import warnings\n\ntry:\n from Cython.Distutils import build_ext\n from setuptools import setup, Extension\n HAVE_CYTHON = True\nexcept ImportError as e:\n warnings.warn(e.message)\n from setuptools import setup, Extension\n from setuptools.command.build_ext import build_ext\n HAVE_CYTHON = Fa...
[ [ "numpy.get_include" ] ]
JuliaSprenger/python-neo
[ "832f1348a3de1d27aea09c1320bdb6609c4008d6" ]
[ "neo/io/proxyobjects.py" ]
[ "\"\"\"\nHere a list of proxy object that can be used when lazy=True at neo.io level.\n\nThis idea is to be able to postpone that real in memory loading\nfor objects that contains big data (AnalogSIgnal, SpikeTrain, Event, Epoch).\n\nThe implementation rely on neo.rawio, so it will available only for neo.io that\ni...
[ [ "numpy.unique", "numpy.isnan", "numpy.arange", "numpy.dtype", "numpy.all", "numpy.ceil", "numpy.array" ] ]
tianyang-he/HARK
[ "2ebf435623c4fc487bd43709614b0fb1ade853a1", "2ebf435623c4fc487bd43709614b0fb1ade853a1" ]
[ "examples/LifecycleModel/LifecycleModel.py", "HARK/ConsumptionSaving/ConsIndShockModelFast.py" ]
[ "# ---\n# jupyter:\n# jupytext:\n# cell_metadata_filter: collapsed,code_folding\n# formats: ipynb,py:percent\n# notebook_metadata_filter: all\n# text_representation:\n# extension: .py\n# format_name: percent\n# format_version: '1.2'\n# jupytext_version: 1.2.3\n# kernelspe...
[ [ "numpy.log", "matplotlib.pyplot.hist" ], [ "numpy.append", "numpy.array", "numpy.where" ] ]
meta-boy/mapleChan
[ "d06174aeea6f4b52c745d88d1254ebd6f7cc1db5", "d06174aeea6f4b52c745d88d1254ebd6f7cc1db5" ]
[ "tools/quality/prediction_distinctness.py", "cakechat/dialog_model/inference/reranking.py" ]
[ "from __future__ import print_function\nimport os\nimport sys\nimport argparse\n\nfrom six.moves import xrange\n\nsys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))\n\nimport numpy as np\n\nfrom cakechat.utils.env import init_theano_env\n\ninit_theano_env()\n\nfrom cakecha...
[ [ "numpy.std", "numpy.mean" ], [ "numpy.log", "numpy.unique", "numpy.in1d", "numpy.repeat", "numpy.array" ] ]
1170300521/MCN
[ "4591728a691d43d9030b2fa7152273402f888cc5" ]
[ "callbacks/learning_scheduler.py" ]
[ "from __future__ import absolute_import\r\nfrom __future__ import print_function\r\n\r\nimport os\r\n\r\nimport numpy as np\r\nfrom utils.tensorboard_logging import log_scalar\r\n\r\nfrom tensorflow.keras.callbacks import Callback\r\nimport tensorflow.keras.backend as K\r\n\r\n\r\nclass LearningRateScheduler(Callba...
[ [ "tensorflow.keras.backend.set_value" ] ]
GuillaumeTh/trains
[ "65a4aa7aa90fc867993cf0d5e36c214e6c044270" ]
[ "trains/automation/optimization.py" ]
[ "import hashlib\nimport json\nfrom copy import copy\nfrom datetime import datetime\nfrom itertools import product\nfrom logging import getLogger\nfrom threading import Thread, Event\nfrom time import time\nfrom typing import Union, Any, Sequence, Optional, Mapping, Callable\n\nfrom .job import TrainsJob\nfrom .para...
[ [ "pandas.DataFrame" ] ]
huxian123/mindspore
[ "55372b41fdfae6d2b88d7078971e06d537f6c558", "55372b41fdfae6d2b88d7078971e06d537f6c558", "c3d1f54c7f6d6f514e5748430d24b16a4f9ee9e5", "c3d1f54c7f6d6f514e5748430d24b16a4f9ee9e5", "ec5ba10c82bbd6eccafe32d3a1149add90105bc8", "ec5ba10c82bbd6eccafe32d3a1149add90105bc8" ]
[ "model_zoo/official/gnn/gcn/train.py", "tests/st/pynative/test_parser_tensor_assign.py", "tests/ut/python/parallel/test_sigmoid_cross_entropy_with_logits.py", "tests/ut/python/parallel/test_auto_parallel_onehot.py", "mindspore/nn/layer/quant.py", "model_zoo/official/cv/googlenet/train.py" ]
[ "# Copyright 2020 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-2.0\n#\n# Unless required by applicable l...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.scatter", "sklearn.manifold.TSNE", "numpy.mean", "matplotlib.pyplot.figure" ], [ "numpy.array", "numpy.random.randn", "numpy.random.rand" ], [ "numpy.ones" ], [ "numpy.zeros", "numpy.ones" ], [ "numpy.arr...
khasbilegt/coin-detector
[ "23dcd76e60aa9320a7b3252fcf5b9fa58b4d48af" ]
[ "coins.py" ]
[ "import math\n\nimport cv2 as cv\nimport matplotlib.pyplot as plt\n\n\ncircleAreas = []\ncircleCenters = []\ncircles = {}\ncoins = {\"500\": 0, \"100\": 0, \"50\": 0, \"10\": 0, \"5\": 0, \"1\": 0}\n\noriginal = cv.imread(\"coins.jpg\")\nimg = original.copy()\nimg = cv.cvtColor(img, cv.COLOR_BGR2GRAY)\nimg = cv.med...
[ [ "matplotlib.pyplot.show" ] ]