repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
AdamStelmaszczyk/learning2run | [
"71341f7cc76c297980fb0e0b67076425a5bde878"
] | [
"baselines/baselines/common/mpi_adam.py"
] | [
"from mpi4py import MPI\nimport baselines.common.tf_util as U\nimport tensorflow as tf\nimport numpy as np\n\nclass MpiAdam(object):\n def __init__(self, var_list, beta1=0.9, beta2=0.999, epsilon=1e-08, scale_grad_by_procs=True, comm=None):\n self.var_list = var_list\n self.beta1 = beta1\n s... | [
[
"tensorflow.get_default_session",
"tensorflow.sin",
"numpy.sqrt",
"numpy.random.seed",
"numpy.empty_like",
"tensorflow.global_variables_initializer",
"numpy.zeros_like",
"numpy.random.randn",
"tensorflow.square",
"tensorflow.train.AdamOptimizer",
"tensorflow.set_random_... |
igorfyago/Andrew-Ng-Machine-Learning | [
"e6f947c93f9a4b1c9cfdaab4333525c504fd9233"
] | [
"Python/pruebas/prueba1NumPy.py"
] | [
"# generar una normal de altura y peso\nimport numpy as np\n\nheight = np.round(np.random.normal(1.75, 0.20, 5000), 2)\nweight = np.round(np.random.normal(60.32, 15, 5000), 2)\nnp_city = np.column_stack((height, weight))\n\nprint(np_city)\n\n# Print mean height (first column)\navg = round(np.mean(np_city[:,0]),2)\n... | [
[
"numpy.median",
"numpy.random.normal",
"numpy.std",
"numpy.mean",
"numpy.column_stack",
"numpy.corrcoef"
]
] |
cts198859/ReAgent | [
"866f91785ca86db32fb67744aa063fe77791ff21",
"20f3d333821bad364fd567cce97de51c44123484",
"866f91785ca86db32fb67744aa063fe77791ff21",
"20f3d333821bad364fd567cce97de51c44123484"
] | [
"reagent/gym/policies/samplers/discrete_sampler.py",
"reagent/ope/estimators/estimator.py",
"reagent/gym/policies/samplers/continuous_sampler.py",
"reagent/ope/test/unit_tests/test_types.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n\n\nimport reagent.types as rlt\nimport torch\nimport torch.nn.functional as F\nfrom reagent.gym.types import Sampler\n\n\nclass SoftmaxActionSampler(Sampler):\n \"\"\"\n Softmax sampler.\n Equation: http://in... | [
[
"torch.ones",
"torch.zeros",
"torch.full_like",
"torch.distributions.Categorical",
"torch.no_grad",
"torch.nn.functional.one_hot",
"torch.ones_like"
],
[
"torch.tensor"
],
[
"torch.randn_like",
"torch.sum",
"torch.no_grad"
],
[
"numpy.random.seed",
"... |
tudo-sfb876/book2-plots | [
"5e49cd1ec9a5ea565a6ddb4054dbefb2544dddc8"
] | [
"inverse-problems/open_crab_sample_unfolding.py"
] | [
"from fact.io import read_h5py\nfrom fact.analysis.statistics import li_ma_significance\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nfrom functools import lru_cache, partial\nfrom scipy.optimize import minimize\nfrom numdifftools import Hessian\n\nINVALID = np.finfo(np.float32).max\n... | [
[
"numpy.diag",
"numpy.sqrt",
"numpy.concatenate",
"numpy.argmin",
"numpy.any",
"numpy.histogram",
"numpy.roll",
"numpy.eye",
"numpy.finfo",
"numpy.full",
"numpy.diff",
"matplotlib.pyplot.close",
"pandas.concat",
"numpy.log",
"numpy.linalg.inv",
"numpy... |
eighttails/kraken | [
"6e3b7d6e86d673acf5633e6e23292cb82f1a114e",
"6e3b7d6e86d673acf5633e6e23292cb82f1a114e"
] | [
"tests/test_layers.py",
"kraken/pageseg.py"
] | [
"# -*- coding: utf-8 -*-\nimport unittest\n\nfrom nose.tools import raises\n\nimport torch\nfrom kraken.lib import layers\n\n\nclass TestLayers(unittest.TestCase):\n\n \"\"\"\n Testing custom layer implementations.\n \"\"\"\n def setUp(self):\n torch.set_grad_enabled(False)\n\n def test_maxpoo... | [
[
"torch.randn",
"torch.set_grad_enabled"
],
[
"numpy.amax",
"scipy.ndimage.filters.maximum_filter",
"numpy.minimum",
"numpy.radians",
"numpy.amin",
"numpy.median",
"numpy.ravel",
"numpy.cos",
"numpy.sort",
"numpy.sin",
"scipy.ndimage.filters.gaussian_filter",... |
robvincen/robot_gradet | [
"a39e3c772c72806dfc99e4d24d8787e0d1bdeef5"
] | [
"models/dense_attention.py"
] | [
"import torch\r\nimport math\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\n\r\nclass DenseAttenGraspNet(nn.Module):\r\n\r\n def __init__(self, input_channels=1, dropout=False, prob=0.0, bottleneck=True):\r\n super(DenseAttenGraspNet, self).__init__()\r\n\r\n if ... | [
[
"torch.nn.Softmax",
"torch.mean",
"torch.max",
"torch.cat",
"torch.nn.functional.dropout",
"torch.zeros",
"torch.nn.Dropout",
"torch.nn.AdaptiveMaxPool2d",
"torch.add",
"torch.nn.Sigmoid",
"torch.bmm",
"torch.nn.Sequential",
"torch.nn.ConvTranspose2d",
"torc... |
dandanelbaz/agents | [
"f8bbc2ea64e71be69f22a7c1d5bf91f02bc87665",
"f8bbc2ea64e71be69f22a7c1d5bf91f02bc87665"
] | [
"tf_agents/networks/encoding_network.py",
"tf_agents/bandits/policies/linear_thompson_sampling_policy_test.py"
] | [
"# coding=utf-8\n# Copyright 2018 The TF-Agents 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 b... | [
[
"tensorflow.python.util.nest.assert_shallow_structure",
"tensorflow.python.util.nest.is_sequence",
"tensorflow.keras.layers.Dense",
"tensorflow.compat.v1.variance_scaling_initializer",
"tensorflow.nest.flatten",
"tensorflow.keras.layers.Flatten",
"tensorflow.nest.map_structure",
"t... |
yao-zhao/EDGAN | [
"b3164fb9d5d9b571b52328b7dd187b748d5a304d"
] | [
"transfer/convert_resnet.py"
] | [
"from __future__ import division\nfrom __future__ import print_function\n\nimport sys\nsys.path.append('/home/yz/caffe2/python')\nimport caffe\nimport numpy as np\nimport tensorflow as tf\nimport model\n\nFLAGS = tf.app.flags.FLAGS\n\n# tensorflow name to caffename\n# output:\n# caffename\n# caffe blob id\n# reshap... | [
[
"tensorflow.device",
"tensorflow.Graph",
"tensorflow.placeholder",
"tensorflow.initialize_all_variables",
"tensorflow.Session",
"numpy.transpose",
"tensorflow.trainable_variables",
"tensorflow.train.Saver",
"tensorflow.app.run"
]
] |
beyondcoin-project/electrum-bynd | [
"b113e9b01db2b0b5f123f579457332f0b95f63e9"
] | [
"electrum_bynd/plot.py"
] | [
"import datetime\nfrom collections import defaultdict\n\nimport matplotlib\nmatplotlib.use('Qt5Agg')\nimport matplotlib.pyplot as plt\nimport matplotlib.dates as md\n\nfrom .i18n import _\nfrom .bitcoin import COIN\n\n\nclass NothingToPlotException(Exception):\n def __str__(self):\n return _(\"Nothing to ... | [
[
"matplotlib.pyplot.gca",
"matplotlib.dates.DateFormatter",
"matplotlib.use",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.ylabel"
]
] |
SinghShreya05/sktime | [
"9c7806204bcdad3d496660ddeeea84099ef0f3ee"
] | [
"sktime/transformations/series/detrend/_detrend.py"
] | [
"#!/usr/bin/env python3 -u\n# -*- coding: utf-8 -*-\n# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n\n__all__ = [\"Detrender\"]\n__author__ = [\"Markus Löning\"]\n\nfrom sklearn.base import clone\n\nfrom sktime.forecasting.base._fh import ForecastingHorizon\nfrom sktime.transformations.bas... | [
[
"sklearn.base.clone"
]
] |
Yu-Group/adaptive-wavelets | [
"e67f726e741d83c94c3aee3ed97a772db4ce0bb3",
"e67f726e741d83c94c3aee3ed97a772db4ce0bb3"
] | [
"notebooks/cifar10/util.py",
"awave/data/resize_imgs.py"
] | [
"import torch\nfrom os.path import join as oj\nimport os\n\ndef train_epoch(model, device, train_loader, optimizer, epoch, criterion):\n model.train()\n for batch_idx, (data, target) in enumerate(train_loader):\n data, target = data.to(device), target.to(device)\n optimizer.zero_grad()\n ... | [
[
"torch.no_grad"
],
[
"numpy.loadtxt",
"numpy.stack",
"numpy.random.randint"
]
] |
llove-y/self_driving_scenario_designer | [
"b97cfbd0595cebe3fe705220b9ffbe01875f23bb"
] | [
"line_fitting_helpers/bspline_path.py"
] | [
"#!/usr/bin/python3.5\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport scipy.interpolate as si\n\n# parameter\nN = 3 # B Spline order\n\ndef bspline_planning(points, sn):\n x = []\n y = []\n for point in points:\n x.append(point[0])\n y.append(point[1])\n fit_points = []\n ... | [
[
"matplotlib.pyplot.legend",
"scipy.interpolate.splrep",
"scipy.interpolate.splev",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.show"
]
] |
wtberry/CSCI4911 | [
"c988b2949d5b81e797d90d8c2ff9e015eb4c044f",
"c988b2949d5b81e797d90d8c2ff9e015eb4c044f"
] | [
"cipher/torch_seq_name.py",
"cipher/single_layer_mul_batch_lstm.py"
] | [
"# Lab 12 RNN\nfrom string import ascii_uppercase\nfrom collections import OrderedDict\nfrom itertools import count\n\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\n\nimport pre_process as pre\n\n'''\nTHis is a practice for using torch to implement simple, one cell RNN.\nIt takes sequenc... | [
[
"torch.nn.CrossEntropyLoss",
"torch.LongTensor",
"torch.Tensor",
"torch.manual_seed",
"torch.nn.RNN"
],
[
"torch.nn.CrossEntropyLoss",
"torch.LongTensor",
"torch.Tensor",
"torch.nn.LSTM",
"torch.manual_seed",
"torch.nn.Linear"
]
] |
paulodder/quantifier_complexity | [
"c46743f2ba9b63c40bff27e15d58f7e9c59b5a4b"
] | [
"src/operators.py"
] | [
"# from SetPlaceholders import SetPlaceholder\n\nimport numpy as np\nimport math\nfrom collections import namedtuple\nfrom itertools import chain\n\nvectorized_isclose = np.vectorize(math.isclose)\nvectorized_round = np.vectorize(round)\n\nOperator = namedtuple(\"Operator\", \"name func input_types output_type\")\n... | [
[
"numpy.invert",
"numpy.unique",
"numpy.append",
"numpy.vectorize",
"numpy.zeros_like",
"numpy.apply_along_axis",
"numpy.array",
"numpy.where"
]
] |
jakubdabek/lightweight-effectiveness | [
"d6dd7d4cd96f22074a57ee1a36f534f8540438bf"
] | [
"effectiveness/mutation/mutation_calc.py"
] | [
"from __future__ import division\n\nimport sys\n\nimport pandas as pd\n\n\ndef calc_coverage(csv_file):\n \"\"\"Return the mutation coverage from the csv output of pitest\n Arguments\n -------------\n - csv_file: the path of the csv file storing the result of the mutation\n \"\"\"\n frame = pd.rea... | [
[
"pandas.read_csv"
]
] |
imabackstabber/mmcv | [
"b272c09b463f00fd7fdd455f7bd4a055f9995521",
"b272c09b463f00fd7fdd455f7bd4a055f9995521",
"b272c09b463f00fd7fdd455f7bd4a055f9995521",
"b272c09b463f00fd7fdd455f7bd4a055f9995521",
"b272c09b463f00fd7fdd455f7bd4a055f9995521",
"b272c09b463f00fd7fdd455f7bd4a055f9995521"
] | [
"mmcv/cnn/bricks/non_local.py",
"tests/test_ops/test_tensorrt.py",
"mmcv/cnn/bricks/transformer.py",
"mmcv/device/ipu/utils.py",
"mmcv/visualization/optflow.py",
"mmcv/image/colorspace.py"
] | [
"# Copyright (c) OpenMMLab. All rights reserved.\nfrom abc import ABCMeta\n\nimport torch\nimport torch.nn as nn\n\nfrom ..utils import constant_init, normal_init\nfrom .conv_module import ConvModule\nfrom .registry import PLUGIN_LAYERS\n\n\nclass _NonLocalNd(nn.Module, metaclass=ABCMeta):\n \"\"\"Basic Non-loca... | [
[
"torch.nn.Sequential",
"torch.cat",
"torch.matmul",
"torch.nn.MaxPool1d",
"torch.nn.MaxPool2d",
"torch.nn.MaxPool3d"
],
[
"torch.onnx.export",
"torch.testing.assert_allclose",
"torch.Tensor",
"torch.zeros",
"torch.randn",
"torch.from_numpy",
"torch.equal",
... |
ullmannsven/pymor | [
"407103ec50efa45d933f0c973314a4d511cae792",
"407103ec50efa45d933f0c973314a4d511cae792",
"407103ec50efa45d933f0c973314a4d511cae792"
] | [
"src/pymordemos/minimal_cpp_demo/wrapper.py",
"src/pymor/algorithms/rand_la.py",
"src/pymor/reductors/neural_network.py"
] | [
"# This file is part of the pyMOR project (https://www.pymor.org).\n# Copyright pyMOR developers and contributors. All rights reserved.\n# License: BSD 2-Clause License (https://opensource.org/licenses/BSD-2-Clause)\n\nfrom pymor.operators.interface import Operator\nfrom pymor.vectorarrays.list import CopyOnWriteVe... | [
[
"numpy.frombuffer"
],
[
"scipy.linalg.svd",
"numpy.sqrt",
"scipy.special.erfinv",
"scipy.linalg.eigh",
"scipy.sparse.linalg.LinearOperator",
"scipy.linalg.lu_factor",
"numpy.array",
"scipy.sparse.linalg.eigsh"
],
[
"torch.max",
"torch.Tensor",
"numpy.linspac... |
seanandrews/DSHARP_CPDs | [
"40d8f02945e0d412c5c912b050d4a3d8c6dbbfa2",
"40d8f02945e0d412c5c912b050d4a3d8c6dbbfa2",
"40d8f02945e0d412c5c912b050d4a3d8c6dbbfa2",
"40d8f02945e0d412c5c912b050d4a3d8c6dbbfa2",
"40d8f02945e0d412c5c912b050d4a3d8c6dbbfa2",
"40d8f02945e0d412c5c912b050d4a3d8c6dbbfa2"
] | [
"CPD_search/GWLup_gap0_imageloop.py",
"CSD_modeling/dmrs1.py",
"CSD_modeling/extract_arc.py",
"CSD_modeling/data_symm_imaging.py",
"CSD_modeling/resid_peaks.py",
"CSD_modeling/recover_loop.py"
] | [
"import os, sys, time\nimport numpy as np\nexecfile('reduction_utils.py')\nexecfile('JvM_correction_brief.py')\nexecfile('ImportMS.py')\nsys.path.append('.')\nimport diskdictionary as disk\n\n# specify target disk and gap\ntarget = 'GWLup'\ngap_ix = 0\nsubsuf = '0'\n\n# load mock injection parameters file data (as ... | [
[
"numpy.loadtxt"
],
[
"numpy.log",
"numpy.arange",
"numpy.squeeze",
"matplotlib.pyplot.rc",
"numpy.diff",
"matplotlib.gridspec.GridSpec",
"matplotlib.colorbar.Colorbar",
"numpy.meshgrid",
"matplotlib.pyplot.style.use",
"matplotlib.pyplot.figure"
],
[
"numpy.l... |
SH-Tan/voxel-rangenet | [
"f2050cd30a8684fd09e561aba004adea978d3d35"
] | [
"pcdet/datasets/kitti/kitti_dataset.py"
] | [
"import copy\nimport pickle\n\nimport numpy as np\nfrom skimage import io\n\nfrom . import kitti_utils\nfrom ...ops.roiaware_pool3d import roiaware_pool3d_utils\nfrom ...utils import box_utils, calibration_kitti, common_utils, object3d_kitti\nfrom ..dataset import DatasetTemplate\nimport struct\n\n\nclass KittiData... | [
[
"numpy.logical_and",
"numpy.asarray",
"numpy.linalg.norm",
"torch.from_numpy",
"numpy.ones",
"numpy.concatenate",
"numpy.arctan2",
"numpy.array",
"numpy.zeros"
]
] |
rickyHong/magenta-repl | [
"93ec9bca9796056af4e0bb6580cb64540d85a96c",
"93ec9bca9796056af4e0bb6580cb64540d85a96c",
"93ec9bca9796056af4e0bb6580cb64540d85a96c"
] | [
"magenta/music/melodies_lib.py",
"magenta/scripts/convert_dir_to_note_sequences_test.py",
"magenta/models/sketch_rnn/utils.py"
] | [
"# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | [
[
"numpy.array",
"numpy.zeros",
"numpy.bincount",
"numpy.count_nonzero"
],
[
"tensorflow.resource_loader.get_data_files_path",
"tensorflow.gfile.MkDir",
"tensorflow.test.main"
],
[
"numpy.minimum",
"numpy.maximum",
"numpy.random.random",
"numpy.linalg.norm",
"... |
Anfauglith/iop-sim | [
"3726385fd08ef25b51f98f0eae47038a07468977"
] | [
"sim.py"
] | [
"#!/usr/bin/python3\n\nimport os\nimport numpy as np\nfrom scipy import integrate\nimport matplotlib.pyplot as plt\n\n\n############\n# MAIN\n############\n\n# File System Setup\nmainpath= \"./newtesting/\"\nsubfolder = \"funny/\"\nfullpath = mainpath+subfolder\nos.makedirs(fullpath, exist_ok=True)\n\n\n# Basic Par... | [
[
"numpy.random.random",
"numpy.arange",
"matplotlib.pyplot.yscale",
"numpy.cumsum",
"numpy.sort",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.clf",
"numpy.average",
"numpy.exp",
"numpy.array",
"numpy.zeros",
"numpy.empty"
]
] |
sallen7/IO_GNEP | [
"e6f207113c857690a1d6d7b68673dba09a2dcf2a"
] | [
"csv_data_files_from_experiments/1_generating_more_graphs_experimental_group_1.py"
] | [
"######### 1_generating_more_graphs.py #################\n\n############ Script to Create the Box Plots #############\n\nimport pdb #for debugging\nimport numpy as np \nimport pyomo.environ as pyo\nfrom pyomo.opt import SolverFactory \nfrom pyomo.opt import SolverStatus, TerminationCondition\nim... | [
[
"pandas.read_csv",
"matplotlib.pyplot.title",
"numpy.min",
"numpy.median",
"matplotlib.pyplot.subplots",
"numpy.max",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.show",
"numpy.zeros",
"matplotlib.pyplot.ylabel"
]
] |
YoungForever222/NN_POD | [
"c2fc0123a899667dbd712571762110189ad98e88"
] | [
"encoder.py"
] | [
"'''\r\n\r\nData mining from\r\n\r\n'''\r\n# Common imports\r\nimport os\r\nimport sys\r\nfrom data import *\r\nfrom tqdm import *\r\nimport numpy as np\r\nimport numpy.random as rnd\r\nimport tensorflow as tf\r\nimport matplotlib\r\nimport matplotlib.pyplot as plt\r\n#from sklearn.preprocessing import StandardScal... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.clabel",
"numpy.sqrt",
"numpy.random.seed",
"tensorflow.placeholder",
"matplotlib.pyplot.savefig",
"tensorflow.layers.dense",
"tensorflow.global_variables_initializer",
"tensorflow.reset_defaul... |
thispl/infac | [
"3d624e23f20e078cd07dbbb3afbb7f4341589396"
] | [
"infac/infac/doctype/contract_attendance_and_ot_upload/contract_attendance_and_ot_upload.py"
] | [
"# -*- coding: utf-8 -*-\n# Copyright (c) 2021, TeamPRO and contributors\n# For license information, please see license.txt\n\nfrom __future__ import unicode_literals\nfrom calendar import monthrange\nimport frappe\nfrom frappe.model.document import Document\nfrom dateutil.relativedelta import relativedelta\nfrom f... | [
[
"pandas.date_range"
]
] |
GrassSunFlower/mxnet_tmp | [
"190f16172cbe80f751d4840847fd5a5df43552bd",
"190f16172cbe80f751d4840847fd5a5df43552bd"
] | [
"python/mxnet/io.py",
"python/mxnet/_ctypes/ndarray.py"
] | [
"\"\"\"Data iterators for common data formats.\"\"\"\nfrom __future__ import absolute_import\nfrom collections import OrderedDict, namedtuple\n\nimport sys\nimport ctypes\nimport logging\nimport threading\nimport numpy as np\nfrom .base import _LIB\nfrom .base import c_array, c_str, mx_uint, py_str\nfrom .base impo... | [
[
"numpy.frombuffer",
"numpy.arange",
"numpy.random.shuffle"
],
[
"numpy.dtype"
]
] |
miguelusque/cudf | [
"52f5b324cafba4e0be3e17b844d807ff8342fda4"
] | [
"python/cudf/cudf/core/column/timedelta.py"
] | [
"# Copyright (c) 2020, NVIDIA CORPORATION.\nfrom __future__ import annotations\n\nimport datetime as dt\nfrom numbers import Number\nfrom typing import Any, Sequence, Tuple, Union, cast\n\nimport numpy as np\nimport pandas as pd\nimport pyarrow as pa\nfrom nvtx import annotate\n\nimport cudf\nfrom cudf import _lib ... | [
[
"numpy.datetime_data",
"pandas.api.types.is_datetime64_dtype",
"numpy.isnat",
"numpy.dtype",
"pandas.Timedelta",
"numpy.timedelta64",
"numpy.isscalar",
"pandas.api.types.is_timedelta64_dtype"
]
] |
zbmain/PGL | [
"dbded6a1543248b0a33c05eb476ddc513401a774",
"dbded6a1543248b0a33c05eb476ddc513401a774",
"dbded6a1543248b0a33c05eb476ddc513401a774",
"dbded6a1543248b0a33c05eb476ddc513401a774",
"dbded6a1543248b0a33c05eb476ddc513401a774"
] | [
"legacy/examples/distribute_deepwalk/reader.py",
"ogb_examples/lsc/MAG240M/dataset/data_generator.py",
"examples/kddcup2021/WikiKG90M/feature/walk_probability/h2r.py",
"examples/deploy_gnn/convert_to_static.py",
"legacy/pgl/tests/test_metapath_randomwalk.py"
] | [
"# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless req... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.reshape",
"numpy.random.randint"
],
[
"numpy.random.seed",
"numpy.unique",
"numpy.arange",
"numpy.random.shuffle",
"numpy.zeros",
"numpy.vstack"
],
[
"numpy.load"
],
[
"numpy.array"
],
[
"numpy.random.se... |
guoqingbao/DeepAdipose | [
"62af7a767f8f0f91e06b3f0b556dde5f9ead5d32"
] | [
"DICOM2TIF.py"
] | [
"import numpy as np\nimport pandas as pd\nimport SimpleITK as itk # simpleitk is required\n\n\nimport gc\ngc.enable()\n\n# path of dicom\ndata_path = \"./data/dicom/\" # folder contains all dicoms\noutput_path = \"./data/tiff/\" # output folder for tiff files\n\ndata_path = './DICOMs/'\noutput_path = './OutputTiff/... | [
[
"numpy.array",
"numpy.flip"
]
] |
sarahyurick/dask-sql | [
"4dab94973c0285b1f9c49e38044f8df5333aa8ae"
] | [
"dask_sql/physical/rel/custom/create_experiment.py"
] | [
"import logging\n\nimport dask.dataframe as dd\nimport pandas as pd\n\nfrom dask_sql.datacontainer import ColumnContainer, DataContainer\nfrom dask_sql.java import org\nfrom dask_sql.physical.rel.base import BaseRelPlugin\nfrom dask_sql.utils import convert_sql_kwargs, import_class\n\nlogger = logging.getLogger(__n... | [
[
"pandas.DataFrame"
]
] |
ainfosec/gr-j2497 | [
"f5a325a9e8089fea28580a4462a66c91503e5c1a"
] | [
"python/j2497_decoder_for_tagger.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# MIT License\n# \n# Copyright (c) 2019, 2020 Assured Information Security, Inc.\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software ... | [
[
"numpy.append",
"numpy.array",
"numpy.where",
"numpy.amax"
]
] |
yngtodd/jeopardy | [
"c8a58ae0996544f0733a7efb2a18d3e7ccdebb65"
] | [
"jeopardy/data/data.py"
] | [
"import os\nimport numpy as np\n\nfrom .utils import download_url, makedir_exist_ok\n\n\nclass JeopardyData:\n \"\"\"Jeopardy Dataset.\n\n Parameters\n ----------\n root str :\n Root directory of dataset where ``processed/training.npy`` lives.\n\n download : bool, optional\n If true, do... | [
[
"numpy.load",
"numpy.save"
]
] |
da0c/DL_Course_SamU | [
"2f11e07373af5fc46b35ec03e6b481e6a4952924"
] | [
"lab_3/scripts/solver.py"
] | [
"from __future__ import print_function, division\nfrom future import standard_library\n\nstandard_library.install_aliases()\nfrom builtins import range\nfrom builtins import object\nimport os\nimport pickle as pickle\n\nimport numpy as np\n\nfrom scripts import optim\n\n\nclass Solver(object):\n \"\"\"\n A So... | [
[
"numpy.hstack",
"numpy.argmax",
"numpy.mean",
"numpy.random.choice"
]
] |
pauldmccarthy/fsleyes | [
"453a6b91ec7763c39195814d635257e3766acf83"
] | [
"fsleyes/gl/textures/texture.py"
] | [
"#!/usr/bin/env python\n#\n# texture.py - The Texture and Texture2D classes.\n#\n# Author: Paul McCarthy <pauldmccarthy@gmail.com>\n#\n\"\"\"This module provides the :class:`Texture` class, which is the base classes\nfor all other FSLeyes texture types. See also the :class:`.Texture2D` and\n:class:`.Texture3D` clas... | [
[
"numpy.asarray",
"numpy.nanmax",
"numpy.eye",
"numpy.nanmin"
]
] |
KyounghyunPark/hrv_analysis | [
"d4d8aa38e0ea5794e6aefa9e861aa5e24a138bcd",
"d4d8aa38e0ea5794e6aefa9e861aa5e24a138bcd"
] | [
"env/lib/python3.5/site-packages/mne/tests/test_chpi.py",
"env/lib/python3.5/site-packages/mne/viz/_brain/_brain.py"
] | [
"# Author: Eric Larson <larson.eric.d@gmail.com>\n#\n# License: BSD (3-clause)\n\nimport os.path as op\n\nimport numpy as np\nfrom numpy.testing import assert_allclose, assert_array_less\nfrom scipy.interpolate import interp1d\nfrom scipy.spatial.distance import cdist\nimport pytest\n\nfrom mne import pick_types, p... | [
[
"numpy.where",
"scipy.signal.welch",
"numpy.arange",
"numpy.argmax",
"scipy.interpolate.interp1d",
"numpy.zeros",
"numpy.isclose",
"numpy.median",
"scipy.spatial.distance.cdist",
"numpy.log10",
"numpy.testing.assert_allclose",
"numpy.random.RandomState",
"numpy.... |
hieu-nguyen-tri/piro | [
"1abe8ff3bb318982dc8ffd6a09744a28ffbbb7b8"
] | [
"piro/route.py"
] | [
"import itertools\nimport scipy\nimport numpy as np\nimport plotly.express as px\nimport pandas as pd\nimport os\nimport json\nfrom copy import deepcopy\nfrom pymatgen import MPRester\nfrom pymatgen.analysis.phase_diagram import PhaseDiagram\nfrom pymatgen.util.string import latexify\nfrom piro.data import GASES, G... | [
[
"numpy.abs",
"numpy.round",
"numpy.delete",
"numpy.any",
"pandas.DataFrame.from_dict",
"numpy.array",
"numpy.sum",
"numpy.vstack"
]
] |
vfonov/DARQ | [
"4845e416a3939b4e86e1441a4a44f4fea337caf5"
] | [
"python-tf/sample_counter.py"
] | [
"import tensorflow as tf\nimport sys\ntf.logging.set_verbosity('WARN')\ntf.compat.v1.enable_eager_execution()\n\nfiles=sys.argv\n\nfor f in sys.argv[1:]:\n print(f, sum(1 for i in tf.data.TFRecordDataset(f)))\n"
] | [
[
"tensorflow.data.TFRecordDataset",
"tensorflow.compat.v1.enable_eager_execution",
"tensorflow.logging.set_verbosity"
]
] |
dvntaka/hawaii_coronavirus_bot | [
"091d8f4a1f9a75250973234f0ad82807bbf2e2ae"
] | [
"src/first_bot_email.py"
] | [
"# Created follow a tutorial at: https://towardsdatascience.com/how-to-track-coronavirus-with-python-a5320b778c8e\n\nfrom datetime import date\nfrom urllib.request import Request, urlopen\nimport pandas as pd\nimport smtplib\n\n\ndef get_data():\n #req = Request('https://www.worldometers.info/coronavirus/#countr... | [
[
"pandas.read_html"
]
] |
animeshtrivedi/surf-ml | [
"73102c69f303d5b289841e6116a607561e36595c",
"73102c69f303d5b289841e6116a607561e36595c",
"73102c69f303d5b289841e6116a607561e36595c",
"73102c69f303d5b289841e6116a607561e36595c"
] | [
"benchmark/cifar10/cifar10_gpipe.py",
"benchmark/cifar10/cifar10_pytorch.py",
"pipedream-fork/runtime/communication.py",
"benchmark/imagenet/gpipemodels/resnet/resnet.py"
] | [
"'''\nCifar10 example in pytorch\n'''\n\nimport argparse\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nimport os\nimport torch.optim as optim\nfrom torchvision import datasets, transforms\n\nfrom torchgpipe import GPipe\nfrom torchgpipe.balance import balance_by_time\n\nfrom typing import... | [
[
"torch.cuda.get_device_properties",
"torch.cuda.synchronize",
"torch.empty",
"torch.cuda.manual_seed",
"torch.zeros",
"torch.cuda.set_device",
"torch.manual_seed",
"torch.max",
"torch.nn.functional.cross_entropy",
"torch.cuda.current_device",
"torch.cuda.memory_stats",
... |
bartubozkurt/data_analysis | [
"536d2bc9f75b9d8ff28cc2859a52498dd2f65627"
] | [
"Data_Analysis-main/Pandas/work_with_series.py"
] | [
"import pandas as pd\r\nimport numpy as np\r\n\r\ndata = np.array([\"Bartu\",\"Bozkurt\",\"Osman\"])\r\n# s = pd.Series(data)\r\ns = pd.Series(data ,index = [1,2,3])\r\nprint(s)\r\n\"\"\" \r\n 0 Bartu\r\n 1 Bozkurt\r\n 2 Osman\r\n dtype: object\r\n\"\"\"\r\n\"\"\" \r\n 1 Bartu\r\n ... | [
[
"numpy.array",
"pandas.Series"
]
] |
blockboard/spiralpp | [
"b45cb108e0791ddcf3cbd567151f67a0245a13cd"
] | [
"tests/contiguous_arrays_test.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app... | [
[
"numpy.arange",
"torch.ones",
"numpy.array_equal"
]
] |
Bukkster/fiftyone | [
"c061216de5094131c8ce8718d8a6ac58056b003e"
] | [
"tests/unittests/utils_tests.py"
] | [
"\"\"\"\nFiftyOne utilities unit tests.\n\n| Copyright 2017-2022, Voxel51, Inc.\n| `voxel51.com <https://voxel51.com/>`_\n|\n\"\"\"\nimport time\nimport unittest\n\nfrom mongoengine.errors import ValidationError\nimport numpy as np\n\nimport fiftyone as fo\nimport fiftyone.constants as foc\nimport fiftyone.core.med... | [
[
"numpy.arange",
"numpy.ones"
]
] |
LeiWang1999/buddy-mlir | [
"05996fdbe1a2643299c2cb5441c0e6bad2f9848f"
] | [
"examples/ConvOpt/comparison/onnxruntime-conv2d.py"
] | [
"import numpy as np\nimport cv2\nimport onnxruntime\nimport time\n\ndef test_conv2d(img, filter_size):\n start = time.time()\n # Load the model\n model_path = f'conv_{filter_size}x{filter_size}.onnx'\n ort_session = onnxruntime.InferenceSession(model_path)\n # Run inference\n ort_inputs = {ort_session.get_inp... | [
[
"numpy.array"
]
] |
Ho-Jun-Moon/rosnet | [
"8976dd9660ed6d96d9a4fb260e73dbea8687a94e"
] | [
"rosnet/metrics/_classes.py"
] | [
"import numpy as np\nfrom ..decorator import check_vector\n\nclass MAE:\n def predict(self, y_predict, y):\n result = np.mean(np.abs(y_predict - y))\n return result\n \n def __str__(self):\n return 'mae'\n\nclass MSE:\n @check_vector\n def predict(self, y_predict, y):\n result = np.square(y_predict... | [
[
"numpy.square",
"numpy.logical_not",
"numpy.maximum",
"numpy.greater",
"numpy.abs",
"numpy.ones",
"numpy.sign",
"numpy.mean",
"numpy.prod",
"numpy.logical_and",
"numpy.sum"
]
] |
johnamcleod/agents | [
"5ab7026e47503f14ef02918acfae340f4128dcd4",
"756f7bdf493986c25eb585438134f1dbb8045b1b",
"5ab7026e47503f14ef02918acfae340f4128dcd4",
"5ab7026e47503f14ef02918acfae340f4128dcd4"
] | [
"tf_agents/environments/examples/tic_tac_toe_environment.py",
"tf_agents/bandits/environments/bandit_py_environment.py",
"tf_agents/agents/dqn/dqn_agent_test.py",
"tf_agents/agents/ppo/ppo_policy.py"
] | [
"# coding=utf-8\n# Copyright 2020 The TF-Agents 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | [
[
"numpy.asarray",
"numpy.all",
"numpy.array",
"numpy.zeros",
"numpy.where"
],
[
"numpy.zeros"
],
[
"tensorflow.stack",
"tensorflow.cast",
"tensorflow.compat.v1.initialize_all_variables",
"tensorflow.compat.v1.placeholder_with_default",
"tensorflow.SparseTensorSpe... |
Michaeljurado24/nengo | [
"dc0419fbe571374d0a55a7f67309dfcb254a2e88",
"dc0419fbe571374d0a55a7f67309dfcb254a2e88",
"dc0419fbe571374d0a55a7f67309dfcb254a2e88"
] | [
"nengo/_vendor/scipy/sparse/linalg_interface.py",
"nengo/utils/tests/test_least_squares_solvers.py",
"nengo/utils/tests/test_nco.py"
] | [
"\"\"\"\nThese are borrowed from SciPy and used under their license:\n\nCopyright (c) 2001, 2002 Enthought, Inc.\nAll rights reserved.\n\nCopyright (c) 2003-2012 SciPy Developers.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that t... | [
[
"numpy.conj",
"numpy.asarray",
"numpy.dtype",
"numpy.asmatrix",
"numpy.asanyarray",
"numpy.isscalar",
"numpy.find_common_type",
"numpy.array",
"numpy.zeros"
],
[
"numpy.dot",
"numpy.linalg.svd",
"numpy.sqrt",
"numpy.ones"
],
[
"numpy.testing.assert_e... |
ChenFengYe/relightable-nr | [
"239a97406f4df01cf5786dcdde58e464395a682d"
] | [
"tools/train_deform.py"
] | [
"from __future__ import division\nimport os\nimport argparse\nimport glob\n\nimport torch\nimport torch.nn as nn\nimport numpy as np\nfrom skimage.io import imread, imsave\nimport tqdm\nimport imageio\n\nimport neural_renderer as nr\n\ncurrent_dir = os.path.dirname(os.path.realpath(__file__))\ndata_dir = os.path.jo... | [
[
"torch.sum",
"torch.nn.Parameter",
"torch.ones"
]
] |
drginm/simple-keras-tensorflow-js-integration | [
"2d3de8196216bea23eec4fb2dde435f70a858329"
] | [
"01-keras/train_model.py"
] | [
"#%% Import libraries\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nimport tensorflow as tf\nfrom tensorflow.python.client import device_lib\n\nfrom sklearn.model_selection import train_test_split\n\nfrom keras import metrics\nfrom keras.models import Sequential\nfrom keras.layers import Dense\nfrom kera... | [
[
"matplotlib.pyplot.legend",
"pandas.read_csv",
"tensorflow.python.client.device_lib.list_local_devices",
"matplotlib.pyplot.title",
"matplotlib.pyplot.subplots",
"sklearn.model_selection.train_test_split",
"matplotlib.pyplot.draw",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.s... |
KarlHammar/High-threshold-QEC-toric-RL | [
"22b14010321ea0e4298aa2640ad7816a7d89f747"
] | [
"src/RL.py"
] | [
"# standard libraries\nimport numpy as np\nimport random\nimport time\nfrom collections import namedtuple, Counter\nimport operator\nimport os\nfrom copy import deepcopy\nimport heapq\n# pytorch\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\n# import from other files\nfrom .toric_model import To... | [
[
"numpy.sum",
"numpy.maximum",
"torch.Tensor",
"torch.load",
"numpy.stack",
"numpy.full",
"numpy.round",
"numpy.all",
"numpy.ones",
"numpy.max",
"torch.no_grad",
"numpy.where",
"numpy.savetxt",
"numpy.array",
"numpy.zeros",
"torch.nn.MSELoss",
"to... |
jasp9559/Plastic-Sales-Forecasting-with-Pyhton-and-R | [
"25b002f83d015700492f5fa7bcc295fcc89ecdc9"
] | [
"Plastic_Sales_Py.py"
] | [
"import pandas as pd\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport seaborn as sns\r\nfrom statsmodels.tsa.seasonal import seasonal_decompose\r\nfrom statsmodels.tsa.holtwinters import SimpleExpSmoothing # SES\r\nfrom statsmodels.tsa.holtwinters import Holt # Holts Exponential Smoothing\r\nfrom ... | [
[
"matplotlib.pyplot.legend",
"numpy.log",
"pandas.read_csv",
"pandas.concat",
"pandas.Series",
"numpy.abs",
"numpy.arange",
"pandas.DataFrame",
"numpy.mean",
"numpy.exp",
"numpy.array",
"pandas.get_dummies"
]
] |
kwrobert/qualipy | [
"a514e8d2e7d3b24d111556a1af91689ace36af9a"
] | [
"qualipy/utils/image_utils.py"
] | [
"\"\"\"Various utility functions for dealing with images, such as\nreading images as numpy arrays, resizing images or making them sharper.\"\"\"\n\nimport os.path\n\nimport cv2\nimport numpy\nimport exifread\n\nfrom .utils import file_cache\n\n\n@file_cache\ndef read_image(image_path, ROI=None):\n \"\"\"Read an ... | [
[
"numpy.fft.fft2",
"numpy.amax",
"numpy.abs",
"numpy.uint8",
"numpy.fft.fftshift"
]
] |
dannerph/pyswarms | [
"eb84d8079fa936f49a4369010fd94f91688ddbe4"
] | [
"pyswarms/utils/plotters/plotters.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"\nPlotting tool for Optimizer Analysis\n\nThis module is built on top of :code:`matplotlib` to render quick and easy\nplots for your optimizer. It can plot the best cost for each iteration, and\nshow animations of the particles in 2-D and 3-D space. Furthermore, because\nit has :co... | [
[
"numpy.arange",
"matplotlib.pyplot.subplots",
"numpy.concatenate",
"numpy.array_split",
"numpy.array",
"numpy.meshgrid"
]
] |
ancientmooner/DALI | [
"355e8db8130cee0d20e9ae3d698f195278544995"
] | [
"dali/python/nvidia/dali/plugin/pytorch.py"
] | [
"# Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unles... | [
[
"torch.zeros",
"numpy.dtype",
"numpy.ceil",
"torch.cuda.stream",
"torch.device",
"torch.cuda.Stream"
]
] |
duncanmorgan/fast_tcrdist | [
"ec0a59f27757369f7093ddf871bfde5137e7f940"
] | [
"fast_tcrdist/plot.py"
] | [
"import seaborn as sns\nimport pandas as pd\nfrom . import useful\nfrom .tcrdist import stats as stat\nimport matplotlib.pyplot as plt\nimport numpy as np\t\nimport logomaker\nfrom collections import Counter\n\ndef plot_distance_matrix(\n\tdata,\n\trow_colors : str = None,\n\t**kwargs) :\n\t\n\tif row_colors :\n\t\... | [
[
"pandas.api.types.is_categorical",
"matplotlib.pyplot.subplots",
"pandas.DataFrame"
]
] |
PerinatalLab/ROH | [
"703d7aa81d1c5e7d61e75597d43905b337c06f9a"
] | [
"scripts/survival/overlap_split_segment.py"
] | [
"import pandas as pd\nimport numpy as np\n\ndf_list= list()\n\nif 'frequency' not in snakemake.input[0]:\n\td= pd.read_csv(snakemake.input[0], sep= '\\t', header= None, names= ['segment', 'n', 'beta', 'sd', 'pvalue'])\n\td[['chr', 'cM1', 'cM2']]= d['segment'].str.split(':', expand= True)\n\td[['chr', 'cM1', 'cM2']]... | [
[
"pandas.concat",
"pandas.read_csv",
"numpy.unique",
"numpy.sort",
"pandas.DataFrame",
"numpy.where"
]
] |
Ulti-Dreisteine/time-series-walk-forward-modeling | [
"5d707d1a01cdcd0bf5cbc15ef9473ef490564c1e"
] | [
"mod/config/config_loader.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on 2021/02/27 21:13:39\n\n@File -> config_loader.py\n\n@Author: luolei\n\n@Email: dreisteine262@163.com\n\n@Describe: 项目配置工具\n\"\"\"\n\nimport logging\n\nlogging.basicConfig(level=logging.INFO)\n\nimport matplotlib.pyplot as plt\nimport logging.config\nimport logging\nimpor... | [
[
"matplotlib.pyplot.rc"
]
] |
mnemocron/FHNW | [
"e43c298cb9c8f617fa19b77dd6630a342c78bda7"
] | [
"mxst/pipeline_EXAM.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Mon Jun 29 08:58:00 2020\r\n\r\n@author: simon\r\n\r\nSEE EXAM in the SECTION BELOW\r\n\r\n\"\"\"\r\n#%%\r\nimport sympy as sp\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\n# Quantizer\r\n# quant(0.111, [-0.125, 0.125]) ==> 1 out of range[0, 1, 2]\r... | [
[
"numpy.unique",
"numpy.arange",
"matplotlib.pyplot.subplots",
"numpy.concatenate",
"matplotlib.pyplot.grid",
"numpy.array",
"matplotlib.pyplot.show",
"numpy.zeros",
"numpy.sum"
]
] |
ziqi-zhang/fse20 | [
"f3998abda2e40d67989ec113340236f3460f0dc3",
"f3998abda2e40d67989ec113340236f3460f0dc3",
"f3998abda2e40d67989ec113340236f3460f0dc3"
] | [
"submissions/available/NNSlicer/NNSlicer/eval/generate_adv_resnet10cifar10.py",
"submissions/available/NNSlicer/protection/knockoff/victim/blackbox.py",
"submissions/available/NNSlicer/finetune/knockoff/prune/post_process/cmp_subset_acc.py"
] | [
"from functools import partial\nfrom pdb import set_trace as st\nimport tensorflow as tf\nimport numpy as np\nimport random\n\nfrom foolbox.attacks import (\n FGSM,\n DeepFoolAttack,\n DeepFoolLinfinityAttack,\n DeepFoolL2Attack,\n IterativeGradientSignAttack,\n SaliencyMapAttack,\n RandomPGD,\... | [
[
"tensorflow.set_random_seed",
"numpy.random.seed"
],
[
"torch.nn.functional.softmax",
"torch.load",
"torch.topk",
"torch.zeros_like",
"torch.no_grad",
"torch.device",
"torch.ones_like"
],
[
"matplotlib.pyplot.legend",
"pandas.concat",
"pandas.read_csv",
... |
Emilurenius/RGB-controller | [
"17816b81041406761bad9531c15fda000cd8f99d"
] | [
"externalControl/MonitorColorScanner.py"
] | [
"# This code is made to run on the user's computer. Not on the server unit\n\nimport numpy as np, requests, time\nfrom PIL import ImageGrab\n\ndef timePrint(printVal, newLine=False):\n if newLine:\n print(\"\\n\")\n currentTime = time.strftime(\"%H:%M:%S\", time.localtime())\n print(f\"{currentTime}... | [
[
"numpy.array"
]
] |
MY-Climate-Observatory/myco-data | [
"5203fa63c7ce609bbc9bbc4186f55da78befdc50"
] | [
"CLIMATExScience/air-pollution-index/data-cleaning/version-update-3.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n13 July 2020\nAuthor: Xiandi Ooi\n\nDataset version update 03\n \nAdding newly released datasets.\n\n\"\"\"\n\nimport pandas as pd\n\n# Adding the new datasets released in June 2020\ndf = pd.read_csv(r\"filepath\\Aggregate-API.csv\", sep = \";\")\ndf1 = pd.read_csv(r\"filepath\\API... | [
[
"pandas.concat",
"pandas.read_csv"
]
] |
KingJoySaiy/genderClassification | [
"1e518c6c600a9759d196b094998e37337e2de624",
"1e518c6c600a9759d196b094998e37337e2de624"
] | [
"History_Edition/5_LeNet5/constant/dataset.py",
"myModel/_3LeNet5.py"
] | [
"from torch.utils.data import Dataset\nimport csv\nimport numpy as np\nfrom matplotlib import image\nfrom constant.constPath import *\nimport torch\nimport random\n\n\ndef setSeed(seed):\n random.seed(seed)\n np.random.seed(seed)\n torch.manual_seed(seed)\n torch.cuda.manual_seed(seed)\n torch.cuda.m... | [
[
"torch.cuda.manual_seed",
"numpy.random.seed",
"torch.manual_seed",
"matplotlib.image.imread",
"numpy.mean",
"torch.cuda.manual_seed_all",
"numpy.array",
"numpy.zeros"
],
[
"torch.nn.Linear",
"torch.nn.Conv2d"
]
] |
zthatch/tiled | [
"156811c1cc180bb2744bcfcd9e09fc91389f3c93"
] | [
"tiled/_tests/test_object_cache.py"
] | [
"from pathlib import Path\nimport time\n\nimport numpy\nimport psutil\nimport pytest\n\nfrom ..client import from_config\nfrom ..server.object_cache import ObjectCache, get_object_cache, NO_CACHE\nfrom ..trees.files import DEFAULT_POLL_INTERVAL\n\n\ndef test_tallying_hits_and_misses():\n cache = ObjectCache(1e6)... | [
[
"numpy.ones"
]
] |
Mostafa-Mansour/se3_distributions | [
"3c1c2c754e9102a031ae6ff14b703cee0163c413",
"3c1c2c754e9102a031ae6ff14b703cee0163c413",
"3c1c2c754e9102a031ae6ff14b703cee0163c413"
] | [
"src/se3_distributions/losses/quaternion_loss.py",
"src/se3_distributions/training/multiobject_feature_grid_training.py",
"src/se3_distributions/datasets/ycb_dataset.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Nov 20 19:05:43 2017\n\n@author: bokorn\n\"\"\"\nimport numpy as np \n\nimport torch\nfrom torch.autograd import Variable\n\nfrom quat_math import quatAngularDiff, quat2AxisAngle\n\ndef quaternionLoss(preds, labels, mean = True):\n \"\"\"\n :param preds: quater... | [
[
"torch.mean",
"numpy.dot",
"torch.abs",
"torch.zeros",
"torch.sign",
"torch.acos",
"torch.cuda.is_available",
"torch.autograd.Variable",
"torch.norm",
"torch.from_numpy",
"numpy.sin",
"numpy.zeros",
"torch.stack",
"numpy.maximum",
"numpy.abs",
"numpy... |
ParisaO/PixelLib | [
"59de17ea02437afcb152b80ef4dc13acb14183b0"
] | [
"pixellib/instance.py"
] | [
"import cv2\r\nimport numpy as np\r\nimport random\r\nimport os\r\nimport sys\r\nimport math\r\nfrom pixellib.mask_rcnn import MaskRCNN\r\nfrom pixellib.config import Config\r\nimport colorsys\r\nimport time\r\nfrom datetime import datetime\r\nimport imantics\r\nfrom imantics import Polygons, Mask\r\n\r\n\r\nclass ... | [
[
"numpy.array",
"numpy.where",
"numpy.any",
"numpy.stack"
]
] |
oeway/torch-em | [
"1a0eca1c9da5748ab48708b1b1fe31bb3c7e8e09",
"1a0eca1c9da5748ab48708b1b1fe31bb3c7e8e09"
] | [
"torch_em/shallow2deep/shallow2deep_model.py",
"torch_em/data/pseudo_label_dataset.py"
] | [
"import os\nimport pickle\nimport torch\nfrom torch_em.util import get_trainer, import_bioimageio_model\nfrom .prepare_shallow2deep import _get_filters, _apply_filters\n\n# optional imports only needed for using ilastik api for the predictio\ntry:\n import lazyflow\n from ilastik.experimental.api import from_... | [
[
"torch.from_numpy"
],
[
"torch.no_grad"
]
] |
ralic/RadeonProRenderBlenderAddon | [
"ff4ede164c1e1e909f182be709422bc8c8878b1c"
] | [
"src/rprblender/engine/render_engine.py"
] | [
"#**********************************************************************\n# Copyright 2020 Advanced Micro Devices, Inc\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:/... | [
[
"numpy.empty"
]
] |
evanlohn/flowpp | [
"a7b175c226f8a348fc02d50f373732107d58b91a",
"a7b175c226f8a348fc02d50f373732107d58b91a"
] | [
"flows_imagenet/create_imagenet_benchmark_datasets.py",
"flows_imagenet/launchers/imagenet32_official.py"
] | [
"\"\"\"\nRun the following commands in ~ before running this file\nwget http://image-net.org/small/train_64x64.tar\nwget http://image-net.org/small/valid_64x64.tar\ntar -xvf train_64x64.tar\ntar -xvf valid_64x64.tar\nwget http://image-net.org/small/train_32x32.tar\nwget http://image-net.org/small/valid_32x32.tar\nt... | [
[
"numpy.asarray",
"numpy.max",
"numpy.save",
"numpy.min"
],
[
"tensorflow.is_nan",
"tensorflow.get_variable",
"tensorflow.concat",
"tensorflow.stack",
"tensorflow.cast",
"tensorflow.tanh",
"tensorflow.make_template",
"tensorflow.add_n",
"tensorflow.nn.conv2d"... |
komori556/PINTO_model_zoo | [
"0703bf1837d0d0e39f1d0dc9d523b6d8fa8145bd",
"0703bf1837d0d0e39f1d0dc9d523b6d8fa8145bd",
"0703bf1837d0d0e39f1d0dc9d523b6d8fa8145bd"
] | [
"049_iris_landmark/01_float32/09_tensorrt_inf_test.py",
"053_BlazePose/01_float32/07_tensorrt_inf_test.py",
"041_DBFace/01_float32/03_freeze_graph_to_saved_model.py"
] | [
"### tensorflow==2.3.0\n\n### https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/6.0/GA_6.0.1.5/local_repos/nv-tensorrt-repo-ubuntu1804-cuda10.1-trt6.0.1.5-ga-20190913_1-1_amd64.deb\n\n# os=\"ubuntu1804\"\n# tag=\"cuda10.1-trt6.0.1.5-ga-20190913\"\n# sudo dpkg -i nv-tensorrt-repo-${os}-${tag}_1-1... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.saved_model.load",
"tensorflow.experimental.tensorrt.Converter",
"tensorflow.experimental.tensorrt.ConversionParams",
"numpy.random.uniform",
"numpy.zeros"
],
[
"tensorflow.convert_to_tensor",
"tensorflow.saved_model.load",
"tenso... |
FedericoV/jax | [
"95ea04ed9076526bd0e12cdf68838ebcf6fb804b"
] | [
"examples/mnist_classifier_fromscratch.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 ... | [
[
"numpy.random.RandomState"
]
] |
yakovdan/encoder4editing | [
"7d1310f82421c5c168f94c404d05ee96087f7bdc"
] | [
"scripts/train.py"
] | [
"\"\"\"\nThis file runs the main training/val loop\n\"\"\"\nimport os\nimport json\nimport math\nimport sys\nimport pprint\nimport torch\nfrom argparse import Namespace\n\nsys.path.append(\".\")\nsys.path.append(\"..\")\n\nfrom options.train_options import TrainOptions\nfrom training.coach import Coach\n\n\ndef mai... | [
[
"torch.load"
]
] |
ktodorov/diagnostics-shapes | [
"aea1c3669afd596a8d3908cd310c1e0bec5f85b1"
] | [
"baseline/train_image_recognition.py"
] | [
"# Baseline setting in which there are only two agents\n# - no evolution\n\nimport pickle\nimport argparse\nimport sys\nimport torch\nimport os\nimport time\n\nfrom torch.utils import data\n\nfrom datasets.message_dataset import MessageDataset\nfrom enums.dataset_type import DatasetType\nfrom enums.image_property i... | [
[
"matplotlib.pyplot.imsave",
"torch.load",
"torch.utils.data.DataLoader",
"torch.cuda.is_available",
"torch.device",
"sklearn.metrics.f1_score",
"torch.nn.MSELoss",
"torch.save"
]
] |
GranthamImperial/silicone_examples | [
"f7700a2d73c8d0db2836568ab1572f0ed240ad76"
] | [
"scripts/compare_crunchers.py"
] | [
"from multiprocessing import Pool, cpu_count, freeze_support\n\nimport numpy as np\nimport pandas as pd\nimport pyam\n\nimport silicone.database_crunchers as dc\n\n\n\"\"\"\nThis script measures how accurate the different crunchers are at recreating known data.\nWe remove the data of interest, infill to find it and... | [
[
"numpy.nanmean",
"pandas.DataFrame"
]
] |
TileDB-Inc/pyread7k | [
"354f6dc3bdcf12d887e0924688cd9b7c93d3b55b"
] | [
"pyread7k/_ping.py"
] | [
"\"\"\"\nThis module is an abstraction on top of the low-level 7k records, which allows\nthe user to work in terms of \"pings\" with associated data, instead of thinking\nin the traditional 7k records.\n\nExpected order of records for a ping:\n7000, 7503, 1750, 7002, 7004, 7017, 7006, 7027, 7007, 7008, 7010, 7011, ... | [
[
"numpy.searchsorted"
]
] |
lbalicki/pymor | [
"8de5f16499b95a48c6332449677540383548dc3e",
"8de5f16499b95a48c6332449677540383548dc3e"
] | [
"src/pymor/grids/tria.py",
"src/pymor/algorithms/greedy.py"
] | [
"# This file is part of the pyMOR project (http://www.pymor.org).\n# Copyright 2013-2019 pyMOR developers and contributors. All rights reserved.\n# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)\n\nimport numpy as np\n\nfrom pymor.core.cache import cached\nfrom pymor.grids.interfaces im... | [
[
"numpy.sqrt",
"numpy.meshgrid",
"numpy.arange",
"numpy.concatenate",
"numpy.array",
"numpy.vstack"
],
[
"numpy.hstack",
"numpy.argmax"
]
] |
hamjam/NeMo | [
"b3484d32e1317666151f931bfa39867d88ed8658",
"b3484d32e1317666151f931bfa39867d88ed8658",
"b3484d32e1317666151f931bfa39867d88ed8658",
"b3484d32e1317666151f931bfa39867d88ed8658",
"b3484d32e1317666151f931bfa39867d88ed8658",
"b3484d32e1317666151f931bfa39867d88ed8658",
"b3484d32e1317666151f931bfa39867d88ed865... | [
"nemo/collections/nlp/models/token_classification/punctuation_capitalization_model.py",
"nemo/collections/asr/parts/utils/decoder_timestamps_utils.py",
"nemo/collections/asr/parts/submodules/tdnn_attention.py",
"examples/asr/asr_chunked_inference/rnnt/speech_to_text_buffered_infer_rnnt.py",
"nemo/collection... | [
"# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. 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#... | [
[
"torch.nn.ModuleList",
"torch.distributed.is_initialized",
"torch.utils.data.DataLoader",
"torch.count_nonzero",
"numpy.concatenate",
"numpy.argmax",
"torch.distributed.get_rank",
"torch.argmax"
],
[
"torch.cat",
"torch.manual_seed",
"torch.from_numpy",
"torch.c... |
Ipuch/bioptim_exo | [
"a954102a9aad1e2bd5227562aef9571e24a7378d"
] | [
"data/load_events.py"
] | [
"import ezc3d\nfrom pyomeca import Markers\nimport numpy as np\n\n\nclass LoadEvent:\n def __init__(self, c3d_path: str):\n self.c3d_path = c3d_path\n self.c3d = ezc3d.c3d(c3d_path)\n\n def get_time(self, idx: int) -> np.ndarray:\n \"\"\"\n find the time corresponding to the event\... | [
[
"numpy.array"
]
] |
sy2616/DATA | [
"8d2314b23c9757c8f54a85a01b451aaa29054912",
"8d2314b23c9757c8f54a85a01b451aaa29054912"
] | [
"poken/train_schetch.py",
"CIFA10/resnet.py"
] | [
"import torch\nimport torchvision\nfrom torch import optim,nn\nimport visdom\nfrom torch.utils.data import DataLoader\nfrom poken import Pokemon\nfrom resnet import Resnet18\n\nbatchsz=32\nlr=1e-3\nepochs=10\ndevice=torch.device('cuda' if torch.cuda.is_available() else 'cpu')\ntorch.manual_seed(1234)\ntrain_db=Poke... | [
[
"torch.nn.CrossEntropyLoss",
"torch.load",
"torch.eq",
"torch.manual_seed",
"torch.utils.data.DataLoader",
"torch.no_grad",
"torch.cuda.is_available"
],
[
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.functional.adaptive_avg_pool2d",
"torch.nn.Linear",
"to... |
nestordemeure/tabularGP | [
"30c59bda679986330c2ed08807d81f70edeca8da"
] | [
"tabularGP/trainset_selection.py"
] | [
"# Training points selection\n# Selects the points that will be used inside the gaussian process\n# source: https://github.com/nestordemeure/tabularGP/blob/master/trainset_selection.py\n\nfrom torch import Tensor, nn\nimport torch\nfrom fastai.torch_basics import * # for pytorch to tensor conversion\n\n__all__ = ['... | [
[
"torch.LongTensor",
"torch.Tensor",
"torch.min",
"torch.argmin",
"torch.arange",
"torch.nn.functional.one_hot",
"torch.argmax"
]
] |
ikedaosushi/modin | [
"4d0a3155b31104ac8083b223bd71ff3e541ecd92",
"4d0a3155b31104ac8083b223bd71ff3e541ecd92",
"d8a99727658f251148742d87ca50c6881aff5b81"
] | [
"modin/pandas/concat.py",
"modin/pandas/test/test_io.py",
"modin/pandas/test/test_dataframe.py"
] | [
"# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the \"License\"); you... | [
[
"pandas.core.dtypes.common.is_list_like",
"pandas.Series",
"pandas.MultiIndex.from_tuples",
"pandas.DataFrame",
"numpy.all"
],
[
"pandas.read_excel",
"pandas.read_clipboard",
"pandas.DataFrame",
"pandas.read_html",
"pandas.read_parquet",
"numpy.random.randn",
"p... |
michaelJwilson/legacypipe | [
"47d005356cbd0c9fb864c960ee7bbf800e543cad",
"47d005356cbd0c9fb864c960ee7bbf800e543cad"
] | [
"py/legacypipe/forced_photom_merge.py",
"py/test/rex.py"
] | [
"'''\nAfter running forced_photom.py on a set of CCDs, this script merges\nthe results back into a catalog.\n'''\nfrom astrometry.util.fits import *\nimport numpy as np\nfrom glob import glob\nfrom collections import Counter\n\nfrom legacypipe.survey import LegacySurveyData\n\nfns = glob('forced/*/*/forced-*.fits')... | [
[
"numpy.all",
"numpy.maximum",
"numpy.sum",
"numpy.unique"
],
[
"numpy.log",
"numpy.abs",
"numpy.arange",
"numpy.ones",
"numpy.log10",
"scipy.ndimage.filters.correlate1d",
"numpy.exp",
"numpy.zeros",
"numpy.sum"
]
] |
Novakasa/pybricks-micropython | [
"4cb036fdcdcf1240576efae772375a6b37e8a7ba"
] | [
"tests/motors/run_test.py"
] | [
"#!/usr/bin/env python\n\nimport argparse\nimport asyncio\nimport csv\nimport datetime\nimport matplotlib\nimport matplotlib.pyplot\nimport numpy\nimport os\nimport pathlib\nimport shutil\nimport subprocess\n\nfrom pybricksdev.connections.pybricks import PybricksHub\nfrom pybricksdev.connections.lego import REPLHub... | [
[
"matplotlib.use",
"matplotlib.pyplot.subplots",
"numpy.append",
"matplotlib.interactive",
"numpy.array",
"matplotlib.pyplot.show"
]
] |
SorooshMani-NOAA/pyschism | [
"df803edb53184625b12399f38a8bd26a022abbc1"
] | [
"pyschism/forcing/hycom/hycom2schism.py"
] | [
"import os\nimport sys\nfrom datetime import datetime,timedelta\nimport logging\nimport pathlib\nimport tempfile\nimport subprocess\nimport shutil\nfrom typing import Union\nfrom time import time\n\nimport numpy as np\nimport scipy as sp\nfrom numba import jit, prange\nimport netCDF4 as nc\nfrom netCDF4 import Data... | [
[
"numpy.sqrt",
"numpy.squeeze",
"numpy.max",
"scipy.interpolate.griddata",
"numpy.where",
"numpy.square",
"numpy.arange",
"matplotlib.transforms.Bbox.from_extents",
"numpy.finfo",
"numpy.size",
"numpy.interp",
"numpy.zeros",
"numpy.min",
"numpy.isnan",
"n... |
MStarmans91/WORC | [
"14e8099835eccb35d49b52b97c0be64ecca3809c",
"14e8099835eccb35d49b52b97c0be64ecca3809c",
"14e8099835eccb35d49b52b97c0be64ecca3809c"
] | [
"WORC/resources/fastr_types/PyRadiomicsCSVFile.py",
"WORC/facade/helpers/processing.py",
"WORC/featureprocessing/StatisticalTestThreshold.py"
] | [
"# Copyright 2020-2020 Biomedical Imaging Group Rotterdam, Departments of\n# Medical Informatics and Radiology, Erasmus MC, Rotterdam, The Netherlands\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 ... | [
[
"pandas.read_csv"
],
[
"pandas.read_excel",
"pandas.Series"
],
[
"numpy.asarray",
"numpy.argmax",
"numpy.min"
]
] |
lhideki/text-vectorian | [
"24e9a2bc69a5c1a25ce4e1102c5c52e2a5a87a7d"
] | [
"text_vectorian/bases.py"
] | [
"from abc import ABC, abstractmethod\nimport numpy as np\n\nclass Vectorizer(ABC):\n @abstractmethod\n def _vectorize(self, token: str):\n pass\n @abstractmethod\n def _get_keras_layer(self, trainable):\n pass\nclass Token:\n def __init__(self, text: str, vectorizer: Vectorizer):\n ... | [
[
"numpy.array"
]
] |
yuanx749/deep-vaccine | [
"11c2e7fbb1c89a08f96bada1153bd56577e592ff"
] | [
"api.py"
] | [
"import torch\nfrom torch.nn.utils.rnn import pad_sequence\nfrom torch.utils.data import DataLoader, Dataset\n\n\nclass _SequenceDataset(Dataset):\n def __init__(self, seqs, tokenizer):\n self.data = seqs\n self.tokenizer = tokenizer\n\n def __len__(self):\n return len(self.data)\n\n d... | [
[
"torch.sigmoid",
"torch.load",
"torch.cat",
"torch.nn.utils.rnn.pad_sequence",
"torch.utils.data.DataLoader",
"torch.set_grad_enabled",
"torch.cuda.is_available"
]
] |
rush2406/OWOD | [
"f8ba612cf4d4969c36322c33d7d460e89958a487"
] | [
"detectron2/modeling/meta_arch/retinanet.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport logging\nimport math\nimport numpy as np\nfrom typing import List\nimport torch\nfrom fvcore.nn import giou_loss, sigmoid_focal_loss_jit, smooth_l1_loss\nfrom torch import nn\nfrom torch.nn import functional as F\n\nfrom detectron2.conf... | [
[
"torch.nn.Sequential",
"torch.Tensor",
"torch.nn.init.constant_",
"torch.nn.functional.one_hot",
"torch.nn.Conv2d",
"torch.zeros_like",
"torch.no_grad",
"torch.nn.init.normal_",
"torch.nonzero",
"torch.stack",
"torch.nn.ReLU",
"numpy.vstack"
]
] |
jnjaby/DISCNet | [
"63b1859519091f8790afcc47e8c726cbefdcd0fe"
] | [
"datasets/data_scripts/utils/torch_fft.py"
] | [
"\"\"\"\nCopyright (c) Facebook, Inc. and its affiliates.\n\nThis source code is licensed under the MIT license found in the\nLICENSE file in the root directory of this source tree.\nhttps://github.com/facebookresearch/fastMRI/blob/master/data/transforms.py\n\"\"\"\n\nimport numpy as np\nimport torch\n\n\ndef to_te... | [
[
"torch.Tensor",
"torch.cat",
"torch.from_numpy",
"numpy.stack",
"torch.rfft",
"numpy.iscomplexobj",
"numpy.array",
"torch.ifft",
"torch.fft",
"torch.irfft"
]
] |
stootaghaj/NDNetGaming | [
"326b0ef022704204cbeafb471ba5e9697cfdfe5f"
] | [
"Training/mini.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Nov 21 10:49:01 2018\n\n@author: utke.markus\n\"\"\"\n\nimport numpy as np\nnp.random.seed(7)\nfrom scipy import stats\nfrom sklearn import metrics\nfrom sklearn import ensemble\nfrom sklearn import svm\nimport tensorflow as tf\ntf.Session()\ntf.set_random_seed(9)\nf... | [
[
"sklearn.ensemble.RandomForestRegressor",
"matplotlib.pyplot.legend",
"sklearn.metrics.r2_score",
"sklearn.metrics.mean_squared_error",
"matplotlib.pyplot.plot",
"numpy.concatenate",
"numpy.max",
"scipy.stats.spearmanr",
"matplotlib.pyplot.rcParams.update",
"numpy.arange",
... |
bramgibs/tomopy | [
"2aa00814025d6c63c87d9a928de3d92b13c74dd7"
] | [
"tomopy/util/misc.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# #########################################################################\n# Copyright (c) 2015, UChicago Argonne, LLC. All rights reserved. #\n# #\n# Copyright 2015. UChicago Argonne... | [
[
"numpy.fft.fft2",
"numpy.fft.ifft",
"numpy.fft.ifft2",
"numpy.fft.fft"
]
] |
paulaurel/exptorch | [
"3394a7120a39261481e9435247ab5aa107a8ee21"
] | [
"examples/models.py"
] | [
"import torch\nfrom torch import nn\n\nfrom exptorch.utils.itertools import pairwise\n\n\nclass LinearNet(nn.Module):\n \"\"\"Linear feed-forward neural network, i.e. linear regression model.\"\"\"\n\n def __init__(self, input_dim, output_dim):\n super().__init__()\n self.linear = nn.Linear(inpu... | [
[
"torch.nn.Linear",
"torch.nn.Sequential"
]
] |
jaisw7/shenfun | [
"7482beb5b35580bc45f72704b69343cc6fc1d773",
"7482beb5b35580bc45f72704b69343cc6fc1d773"
] | [
"demo/fourier_poisson4D.py",
"shenfun/chebyshev/la.py"
] | [
"r\"\"\"\nSolve Poisson equation on the 4-dimensional (0, 2pi)^4 with periodic bcs\n\n \\nabla^2 u = f,\n\nUse Fourier basis and find u in V^4 such that\n\n (v, div(grad(u))) = (v, f) for all v in V^4\n\nwhere V is the Fourier space span{exp(1jkx)}_{k=-N/2}^{N/2-1} and\nV^4 is a 4-dimensional tensorproduct... | [
[
"matplotlib.pyplot.contourf",
"numpy.allclose",
"matplotlib.pyplot.title",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
],
[
"numpy.atleast_1d",
"numpy.full_like",
"numpy.ndim",
"numpy.zeros_like",
"numpy.broadcast_to",
"num... |
haox07/isoSTED | [
"7e5e244f82c52e06e0b66acfb246dfd3708e1b3b"
] | [
"DM-Training/code/fringe/unwrap.py"
] | [
"#!/usr/bin/env python3\n\nimport scipy\nimport os\nimport argparse\nimport numpy as np\nfrom skimage.restoration import unwrap_phase\nfrom scipy import io\n\n\nif __name__ == '__main__':\n parser = argparse.ArgumentParser(\n description='''Unwrap phase using M. A. Herráez, D. R. Burton, M. J.\n La... | [
[
"scipy.io.loadmat",
"numpy.invert",
"scipy.io.savemat"
]
] |
daveliepmann/incubator-mxnet | [
"0d7794730ad0272e52a62d1101ccbe9fcf1aafcb",
"0d7794730ad0272e52a62d1101ccbe9fcf1aafcb"
] | [
"tests/nightly/test_large_array.py",
"python/mxnet/ndarray/ndarray.py"
] | [
"# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y... | [
[
"numpy.reshape",
"numpy.transpose"
],
[
"numpy.asarray",
"numpy.core.numeric.normalize_axis_tuple",
"numpy.dtype",
"numpy.broadcast_to",
"numpy.prod",
"numpy.array",
"numpy.empty"
]
] |
ivan2kh/pysparnn | [
"c53f98b27635f721bdccac61d2c3530386bcb741"
] | [
"pysparnn/cluster_index.py"
] | [
"# Copyright (c) 2016-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree. An additional grant\n# of patent rights can be found in the PATENTS file in the same directory.\n\"\"\"Defines ... | [
[
"numpy.hstack",
"numpy.log",
"numpy.sqrt",
"numpy.arange",
"numpy.array"
]
] |
InnovativeInventor/GerryChain | [
"4ee30472072b26f86bf6349b5a1dc90412a4acc1"
] | [
"tests/test_make_graph.py"
] | [
"import pathlib\nfrom tempfile import TemporaryDirectory\nfrom unittest.mock import patch\n\nimport geopandas as gp\nimport pandas\nimport pytest\nfrom shapely.geometry import Polygon\n\nfrom gerrychain.graph import Graph\nfrom gerrychain.graph.geo import GeometryError\n\n\n@pytest.fixture\ndef geodataframe():\n ... | [
[
"pandas.DataFrame"
]
] |
Y0mingZhang/pytorch-lightning | [
"f9b9cdb0d1d4e26d25fe13f19f12ea88690aa0a8",
"4610fddb19d502e534b5c5d77c3dfd6f2e5359a5"
] | [
"pytorch_lightning/trainer/connectors/logger_connector/result.py",
"pytorch_lightning/loggers/neptune.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.no_grad",
"torch.tensor"
],
[
"torch.is_tensor"
]
] |
jackraymond/dwave-hybrid | [
"b4ac8fe0620609437fb3844d090d67123461d238"
] | [
"examples/parallel-tempering-alt.py"
] | [
"#!/usr/bin/env python\n\n# Copyright 2019 D-Wave Systems 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 requir... | [
[
"numpy.geomspace"
]
] |
ruggleslab/phosphodisco-1 | [
"4663e2c97b96304483234a80bc9b35befbf92795"
] | [
"phosphodisco/nominate_regulators.py"
] | [
"import pandas as pd\nimport numpy as np\nfrom pandas import DataFrame\nfrom typing import Iterable, Optional\nfrom sklearn import linear_model, preprocessing\nfrom .utils import corr_na, zscore\n\n\ndef collapse_possible_regulators(\n reg_data: DataFrame,\n corr_threshold: float = 0.95\n) -> DataFram... | [
[
"numpy.log2",
"pandas.DataFrame",
"numpy.ones",
"sklearn.linear_model.RidgeCV",
"sklearn.preprocessing.scale"
]
] |
flavio92ux/aceleracao-DataScience | [
"2b2e41ec6c9184e161bdc66af0063792f09ce88d"
] | [
"class-week-07/projeto padrao/src/metrics.py"
] | [
"import pandas as pd\r\nfrom sklearn.metrics import mean_squared_error, mean_absolute_error\r\n\r\n\r\nclass Metrics:\r\n def __init__(self):\r\n pass\r\n\r\n def calculate_regression(self, y_true, y_pred):\r\n '''\r\n Calculate the metrics from a regression problem\r\n :param y_tr... | [
[
"sklearn.metrics.mean_absolute_error",
"sklearn.metrics.mean_squared_error"
]
] |
ccivit/DeepMoji | [
"98f498956951bf2da8eeb098834a71b6729535cc"
] | [
"deepmoji/attlayer.py"
] | [
"# -*- coding: utf-8 -*-\n\n\nimport sys\nfrom os.path import dirname\nsys.path.append(dirname(dirname(__file__)))\nfrom tensorflow.keras import initializers\n# from tensorflow.keras.engine import InputSpec, Layer\nfrom tensorflow.keras.layers import Layer, InputSpec\nfrom tensorflow.keras import backend as K\n\n\n... | [
[
"tensorflow.keras.backend.floatx",
"tensorflow.keras.backend.dot",
"tensorflow.keras.backend.sum",
"tensorflow.keras.backend.max",
"tensorflow.keras.backend.reshape",
"tensorflow.keras.backend.shape",
"tensorflow.keras.backend.expand_dims",
"tensorflow.keras.backend.epsilon",
"... |
marcelned/dask | [
"4a5a54302a261876ba453c1ac8fc6f69006161f1"
] | [
"dask/base.py"
] | [
"import datetime\nimport inspect\nimport os\nimport pickle\nimport threading\nimport uuid\nfrom collections import OrderedDict\nfrom concurrent.futures import Executor\nfrom contextlib import contextmanager\nfrom dataclasses import fields, is_dataclass\nfrom functools import partial\nfrom hashlib import md5\nfrom n... | [
[
"numpy.asarray"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.