repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
KiDS-WL/Cat_to_Obs_K1000_P1
[ "0de7f79cab150416859ffe58ac2d0f5659aedb5d", "0de7f79cab150416859ffe58ac2d0f5659aedb5d", "0de7f79cab150416859ffe58ac2d0f5659aedb5d" ]
[ "GGL_LensCats/ldac.py", "Shear_Ratio_Test/cosmology.py", "data/kids/multiplicative_bias/read_m_values.py" ]
[ "###############\r\n# @file ldac.py\r\n# @author Douglas Applegate & Thomas Erben\r\n# @date 27/11/2013\r\n#\r\n# @brief Utilities to make accessing LDAC cats easier within Python\r\n###############\r\n\r\n# HISTORY INFORMATION:\r\n# ====================\r\n#\r\n# 01.09.2010:\r\n# I included treatment of slices thr...
[ [ "numpy.issubdtype" ], [ "scipy.integrate.quad" ], [ "numpy.load" ] ]
cropsinsilico/yggdrasil
[ "466a4f77605a6f461d57ef7b165a6db7eec4d1fd", "466a4f77605a6f461d57ef7b165a6db7eec4d1fd" ]
[ "scripts/test_wofost.py", "yggdrasil/serialize/PandasSerialize.py" ]
[ "import numpy as np\nimport pprint\nfrom yggdrasil import units\nfrom yggdrasil.communication.NetCDFFileComm import NetCDFFileComm\nfrom yggdrasil.serialize.WOFOSTParamSerialize import WOFOSTParamSerialize\n\nfname_param = 'cropfile_example.cab'\n# fname_netcdf = 'simple.nc'\nfname_netcdf = 'test.nc'\n\n# Test seri...
[ [ "numpy.arange", "numpy.array", "numpy.ones" ], [ "pandas.concat", "pandas.read_csv", "numpy.zeros", "numpy.dtype" ] ]
shawinmihail/binder_test
[ "e1ef050c0631a80d8c23bdcdc25b472ef1e855b8" ]
[ "utils.py" ]
[ "\nimport math\nimport numpy as np\nfrom consts import Consts\n\ndef get_SSO_inclination(a, ecc):\n # The formula for the RAAN drift is taken from D.A. Vallado Fundamentals of\n # Astrodynamics, page 649, eq 9-37\n\n # Inputs: constants, a - semi-major axis [m] and inclination\n # Outputs: SSO orbit inc...
[ [ "numpy.cross", "numpy.dot", "numpy.matmul", "numpy.linalg.norm", "numpy.transpose", "numpy.sin", "numpy.concatenate", "numpy.linalg.det", "numpy.cos", "numpy.column_stack", "numpy.array" ] ]
dahaj1897/sierpinski-triangle
[ "cea74c425e93e8829c574b5f9665b3c856fc5e58" ]
[ "sierpinski-triangle.py" ]
[ "#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon May 20 16:13:54 2019\n\n@author: sazd3\n\"\"\"\nfrom __future__ import division\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nx0=[0.5,-.5,0]\ny0=[0,0,np.sqrt(5)/4]\nx=x0\ny=y0\nnewx=(x[0]+x[1])/2\nnewy=(y[0]+y[1])/2\nn=100000 #number...
[ [ "numpy.sqrt", "matplotlib.pyplot.scatter", "numpy.random.randint" ] ]
marioantolienzh/Cardiac-Rearrests-Prediction-Using-HRV-and-ML-Algorithms
[ "76b757baf8503c5fc6337b1d33871e04c87c37ed" ]
[ "machine_learning.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Nov 5 14:11:00 2021\n\n@author: laros\n\"\"\"\n\nimport pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport matplotlib\nimport matplotlib.pyplot as plt\n# %matplotlib inline\nsns.set(color_codes=True)\nfrom scipy import stats\nfro...
[ [ "pandas.read_csv", "matplotlib.pyplot.tight_layout", "sklearn.linear_model.LogisticRegression", "matplotlib.pyplot.title", "sklearn.ensemble.RandomForestClassifier", "sklearn.metrics.accuracy_score", "sklearn.model_selection.train_test_split", "pandas.DataFrame", "sklearn.tree....
brencej/ProGED
[ "50c077cab400e186dfe45834b96a257d501c04c9" ]
[ "ProGED/generators/grammar_construction.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport numpy as np\n\nfrom ProGED.generators.grammar import GeneratorGrammar\n\nimport sympy as sp\nfrom diophantine import solve\nfrom itertools import product\n\ndef grammar_from_template (template_name, generator_settings, repeat_limit = 100, depth_limit = 100):\n if template_name ...
[ [ "numpy.hstack", "numpy.dot", "numpy.abs", "numpy.random.seed", "numpy.array_equal", "numpy.array", "numpy.sum", "numpy.vstack" ] ]
Liuzkai/PythonScript
[ "fb21ad80e085f6390ae970b81404f7e5c7923f4e" ]
[ "Quantitative/3_10Normalization.py" ]
[ "from pylab import *\nimport pandas as pd\nimport matplotlib.pyplot as plot\n\n\nfilePath = (\"/Users/liuzhongkai/Downloads/Python量化交易实战/code/dataTest.csv\")\ndataFile = pd.read_csv(filePath, header=None, prefix='V')\n\nsummary = dataFile.describe()\ndataFile_normalization = dataFile.iloc[:,1:6]\n\nfor i in range(5...
[ [ "matplotlib.pyplot.xlabel", "pandas.read_csv", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
666zcli/nnan
[ "89de23092cf6b6bc8ca501920221b1f047665327" ]
[ "models/alexnet_nan.py" ]
[ "import torch.nn as nn\nimport torchvision.transforms as transforms\nimport nnan\n\nsnn = nnan.NNaNUnit(dims=[10,10,10])\n\n__all__ = ['alexnet_nan']\n\nclass AlexNetOWT_BN(nn.Module):\n\n def __init__(self, num_classes=1000):\n super(AlexNetOWT_BN, self).__init__()\n self.features = nn.Sequential(...
[ [ "torch.nn.BatchNorm1d", "torch.nn.Dropout", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d" ] ]
122689305/private-pgm
[ "557f0381cd8c31c6277ccc61ec66702a8bdfcacc" ]
[ "src/mbi/dataset.py" ]
[ "import numpy as np\nimport pandas as pd\nimport os\nimport json\nfrom mbi import Domain\n\nclass Dataset:\n def __init__(self, df, domain, weights=None):\n \"\"\" create a Dataset object\n\n :param df: a pandas dataframe\n :param domain: a domain object\n :param weight: weight for ea...
[ [ "pandas.read_csv", "numpy.histogramdd", "pandas.DataFrame", "numpy.array", "numpy.random.randint" ] ]
mr4jay/numerai
[ "2a09c648c66143ee101cd80de4827108aaf218fc" ]
[ "models/pairwise/model.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import division\n\nimport numpy as np\nimport tensorflow as tf\n\nclass Model(object):\n\n def __init__(self, features_L, features_R, targets, is_training):\n with tf.variable_scope('feature_extractor'):\n ...
[ [ "tensorflow.nn.softmax", "tensorflow.concat", "tensorflow.contrib.layers.variance_scaling_initializer", "tensorflow.reduce_mean", "tensorflow.trainable_variables", "tensorflow.contrib.layers.l2_regularizer", "tensorflow.contrib.losses.add_loss", "tensorflow.contrib.layers.fully_con...
pengkangzaia/usad
[ "937a29c24632cfa31e0c626cd5b058b3af74ef94" ]
[ "utils/utils.py" ]
[ "import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport torch\n\nfrom sklearn.metrics import roc_curve, roc_auc_score, f1_score, classification_report\n\n\ndef get_default_device():\n \"\"\"Pick GPU if available, else CPU\"\"\"\n if torch.cuda.is_available():\n...
[ [ "matplotlib.pyplot.legend", "sklearn.metrics.roc_auc_score", "pandas.DataFrame", "matplotlib.pyplot.plot", "torch.cuda.is_available", "torch.device", "sklearn.metrics.f1_score", "sklearn.metrics.classification_report", "pandas.crosstab", "numpy.zeros", "matplotlib.pyplo...
JuanFuriaz/donkey_share
[ "caad831ca21094f05f9084f881ca3bbfa4168e4c" ]
[ "heatmap.py" ]
[ "import matplotlib.pyplot as plt\nfrom matplotlib import animation\n\ntry:\n from tensorflow.keras.layers import Input\n from tensorflow.keras.models import Model, load_model\n from tensorflow.keras.layers import Convolution2D\n from keras import backend as K\n plt.rcParams['animation.ffmpeg_path'] =...
[ [ "numpy.min", "numpy.reshape", "matplotlib.pyplot.figimage", "numpy.dstack", "tensorflow.python.keras.models.load_model", "numpy.ones", "tensorflow.nn.conv2d_transpose", "tensorflow.python.keras.backend.function", "tensorflow.python.keras.models.Model", "numpy.max", "num...
ktiwary2/nerf_pl
[ "99d40cba3a2d9a11d6988cb1a74cf29035a1ab5e" ]
[ "train_shadows.py" ]
[ "import os, sys\n\nimport imageio\nfrom opt import get_opts\nimport torch\nfrom collections import defaultdict\n\nfrom torch.utils.data import DataLoader\nfrom datasets import dataset_dict\n\n# models\nfrom models.nerf import Embedding, NeRF\nfrom models.rendering import render_rays\n\n# optimizer, scheduler, visua...
[ [ "torch.stack", "torch.no_grad", "torch.utils.data.DataLoader", "torch.cat" ] ]
madrugado/RecVAE
[ "8b9b2ded3f215f9e30b45a9cc61199b67fc3da42" ]
[ "utils.py" ]
[ "# based on https://github.com/dawenl/vae_cf\n\nimport numpy as np\nfrom scipy import sparse\nimport pandas as pd\nimport os\nimport bottleneck as bn\n\n\n\n\ndef load_train_data(csv_file, n_items, n_users, global_indexing=False):\n tp = pd.read_csv(csv_file)\n \n n_users = n_users if global_indexing else ...
[ [ "pandas.read_csv", "numpy.ones_like", "numpy.arange", "numpy.zeros_like", "numpy.argsort", "numpy.logical_and" ] ]
two-7182/synchrony
[ "aa15fa8b0229d257e15785b4fb70c1727c13b8c8" ]
[ "src/measure.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"\nMeeasure class for the research project 'Cortical Spike Synchrony as \na Measure of Contour Uniformity', as part of the RTG computational cognition, \nOsnabrueck University, Germany.\n\"\"\"\n\n__author__ = 'Julius Mayer, Viktoria Zemliak, Flora Perizonius'\n__email__ = 'v...
[ [ "numpy.nonzero", "numpy.min", "numpy.median", "numpy.max", "numpy.mean", "numpy.var" ] ]
jeguerra/nonlinearMtnWavesSolver
[ "e2fe83d1f7c3c57cbe9ba0299a1b9179cf4b5869", "e2fe83d1f7c3c57cbe9ba0299a1b9179cf4b5869" ]
[ "computeAdjust4CBC.py", "computePartialDerivativesXZ.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Jul 23 10:49:24 2019\n\n@author: -\n\"\"\"\n\nimport numpy as np\n\ndef computeAdjust4CBC(DIMS, numVar, varDex, bcType):\n # Get DIMS data\n NX = DIMS[3]\n NZ = DIMS[4]\n OPS = (NX+1) * NZ\n \n # All DOF per...
[ [ "numpy.concatenate" ], [ "scipy.sparse.csr_matrix", "numpy.ix_", "scipy.sparse.diags", "numpy.empty" ] ]
mayuri-dhote/psydac
[ "01ddbe2d049a599684c45060912d01c2658160a3", "01ddbe2d049a599684c45060912d01c2658160a3", "01ddbe2d049a599684c45060912d01c2658160a3" ]
[ "psydac/feec/multipatch/fem_linear_operators.py", "psydac/api/tests/test_quadorder.py", "psydac/feec/multipatch/examples/hcurl_source_pbms_conga_2d.py" ]
[ "# coding: utf-8\n\nfrom mpi4py import MPI\n\nfrom scipy.sparse import eye as sparse_id\n\nfrom psydac.linalg.basic import LinearOperator\nfrom psydac.fem.basic import FemField\n\n#===============================================================================\nclass FemLinearOperator( LinearOperator ):\n \"\"...
[ [ "scipy.sparse.eye" ], [ "numpy.array_equal" ], [ "numpy.sqrt", "scipy.sparse.linalg.spsolve" ] ]
Valdert-13/captcha
[ "dd521e0184462ba80fc6f201a10ee9653c5724c8", "dd521e0184462ba80fc6f201a10ee9653c5724c8" ]
[ "model/models_nn.py", "model/test_model.py" ]
[ "import tensorflow as tf\nfrom config import *\n\ndef model_1():\n 'Иницилизация структуры модели'\n input_img = tf.keras.layers.Input(shape=IMG_SHAPE)\n output_code = []\n\n out = tf.keras.layers.Convolution2D(16, (3, 3), padding='same', activation='relu')(input_img)\n out = tf.keras.layers.MaxPooli...
[ [ "tensorflow.keras.layers.Dense", "tensorflow.keras.Model", "tensorflow.keras.layers.BatchNormalization", "tensorflow.keras.layers.Convolution2D", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.MaxPooling2D", "tensorflow.keras.layers.Flatten", "tensorflow.keras.layers.I...
linerxliner/ValCAT
[ "e62985c6c64f6415bb2bb4716bd02d9686badd47", "e62985c6c64f6415bb2bb4716bd02d9686badd47" ]
[ "taattack/victims/wrappers/pytorch_warpper.py", "taattack/utils.py" ]
[ "import torch\n\nfrom .wrapper import Wrapper\n\n\nclass PyTorchWrapper(Wrapper):\n def __init__(self, model, tokenizer):\n super(PyTorchWrapper, self).__init__()\n\n self._model = model\n self._tokenizer = tokenizer\n\n self.unk_token = self._tokenizer.unk_token\n\n def _forward(s...
[ [ "torch.no_grad", "torch.tensor" ], [ "torch.device", "numpy.zeros", "sklearn.metrics.pairwise.cosine_similarity" ] ]
doncat99/FinanceAnalysis
[ "689aed45bab9e691566b308d2778170a0b3950ec" ]
[ "candle.py" ]
[ "import os\nimport pandas as pd\nimport numpy as np\nimport pickle\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nfrom zvt import zvt_env\nfrom zvt.api.data_type import Region, Provider\nfrom zvt.factors.candlestick_factor import CandleStickFactor, candlestick_patterns\n\n# import faulthandler\n# faulth...
[ [ "numpy.array", "pandas.set_option", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
ollpu/tiralabra
[ "250a91aa3d3e150ee75555745e21e0a3aafb607c" ]
[ "bench/plot_parametrized_comparison.py" ]
[ "\"\"\"\nPlot comparison of different Criterion baselines, for a benchmark that\nhas a parameter. Requires matplotlib and numpy.\n\nUsage: (run in benchmark crate root)\n\npython3 plot_parametrized_comparison.py [benchmark path] [baseline names...]\n\nbenchmark path could be e.g. \"fft/copy and fft\"\n\"\"\"\nimpor...
[ [ "numpy.array", "matplotlib.pyplot.legend", "matplotlib.pyplot.gca", "numpy.abs", "matplotlib.pyplot.title", "matplotlib.pyplot.xscale", "matplotlib.pyplot.yscale", "matplotlib.pyplot.plot", "matplotlib.ticker.ScalarFormatter", "matplotlib.pyplot.xlabel", "matplotlib.pyp...
andre-dsouza/ML-for-Access-Control
[ "dc7ae4438d6f66306d744fe9d2331c394d108c92" ]
[ "ensemble.py" ]
[ "\"\"\" Amazon Access Challenge Starter Code\nThis code enhances the original categorical data with a few sets of additional\nfeatures. It then trains ensemble of decision tree models on the data.\n\nHyperparameter searches were done using leaderboard feedback and grid searches\nin earlier versions of this code.\n...
[ [ "pandas.concat", "pandas.read_csv", "sklearn.ensemble.RandomForestClassifier", "sklearn.ensemble.ExtraTreesClassifier", "pandas.DataFrame", "sklearn.ensemble.GradientBoostingClassifier", "numpy.vstack" ] ]
AudioStreamTV/tensorflow
[ "7277ed8ed2da84b227295216632dec52a81f63b3", "7277ed8ed2da84b227295216632dec52a81f63b3", "7277ed8ed2da84b227295216632dec52a81f63b3" ]
[ "tensorflow/contrib/distributions/python/kernel_tests/distribution_util_test.py", "tensorflow/contrib/autograph/converters/control_flow.py", "tensorflow/contrib/metrics/python/ops/metric_ops_test.py" ]
[ "# Copyright 2016 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...
[ [ "numpy.diag", "tensorflow.contrib.distributions.python.ops.distribution_util.pad_mixture_dimensions", "tensorflow.python.ops.array_ops.constant", "tensorflow.python.framework.tensor_shape.TensorShape", "tensorflow.python.ops.array_ops.shape", "numpy.asarray", "tensorflow.python.ops.dis...
okojoalg/Creative-Adversarial-Networks
[ "7f06f395b9f317f9235dc8c60c7b385cd6530471", "7f06f395b9f317f9235dc8c60c7b385cd6530471", "7f06f395b9f317f9235dc8c60c7b385cd6530471" ]
[ "slim/nets/inception_resnet_v2_test.py", "slim/nets/dcgan.py", "slim/nets/nets_factory_test.py" ]
[ "# Copyright 2016 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 required...
[ [ "tensorflow.device", "tensorflow.Graph", "tensorflow.random.uniform", "tensorflow.test.main", "tensorflow.compat.v1.global_variables_initializer", "tensorflow.compat.v1.get_collection", "tensorflow.compat.v1.placeholder", "tensorflow.argmax", "tensorflow.compat.v1.variable_scop...
kashif/pyro
[ "b65b329d8b851c7402acaef9c176a8964caadaf3", "b65b329d8b851c7402acaef9c176a8964caadaf3" ]
[ "pyro/distributions/spanning_tree.py", "pyro/distributions/transforms/ordered.py" ]
[ "# Copyright (c) 2017-2019 Uber Technologies, Inc.\n# SPDX-License-Identifier: Apache-2.0\n\nimport itertools\nimport math\n\nimport torch\nfrom torch.distributions import constraints\nfrom torch.distributions.utils import lazy_property\n\nfrom pyro.distributions.torch_distribution import TorchDistribution\n\n\ncla...
[ [ "torch.Size", "torch.utils.cpp_extension.load", "torch.empty", "torch.zeros", "torch.randperm", "torch.eye", "torch.multinomial", "torch.tensor", "torch.cholesky", "torch.no_grad", "torch.arange", "torch.broadcast_tensors", "torch.stack" ], [ "torch.cums...
Blarc/lol-dodge-predictor
[ "01ac9ce1f117dba7f2375958f96fd1336cc0049d" ]
[ "prepare_data.py" ]
[ "import copy\nimport json\n\nimport cassiopeia as cass\nimport pandas as pd\nfrom IPython.display import clear_output\nfrom roleidentification import get_roles, pull_data\n\nNUMBER_OF_LINES = 108941\nchampion_roles = pull_data()\nchampions_mapper = {champion.id: champion.name for champion in cass.get_champions(\"EU...
[ [ "pandas.DataFrame.from_dict" ] ]
MarceloSabris/PesquisaMestrado
[ "e774ff522fc88d725133fcbe256f763b0d616dd0" ]
[ "GeneratorRepresentEncoderImg.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport h5py\nimport numpy as np\nfrom PIL import Image, ImageDraw\nimport os\nimport argparse\n\nfrom util import log\nfrom vqa_util import *\nimport progressbar\nfrom base64 import decode\nimport tens...
[ [ "tensorflow.keras.models.load_model", "tensorflow.keras.layers.LeakyReLU", "tensorflow.keras.Input", "numpy.reshape", "numpy.arange", "tensorflow.keras.layers.Conv2D", "numpy.tile", "numpy.random.shuffle", "numpy.ones", "numpy.stack", "tensorflow.keras.optimizers.Adam",...
OrangePeelFX/Python-Tutorial
[ "0d47f194553666304765f5bbc928374b7aec8a48" ]
[ "Scripts/005_pyo/scripts/tutorial/s043_noise_with_numpy.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nFaire du bruit avec Numpy\n\"\"\"\nfrom pyo import *\nimport numpy as np\n\ns = Server().boot()\n\n# récupère la taille du buffer\nbs = s.getBufferSize()\n\n# Crée une table de la longueur du buffer et la lit en boucle\nt = DataTable(size=bs)\nosc = TableRea...
[ [ "numpy.random.normal" ] ]
LaudateCorpus1/ambient-gan
[ "60e9ee50b104ea07dd7395e8fc6098112d626f00", "60e9ee50b104ea07dd7395e8fc6098112d626f00" ]
[ "src/commons/measure_utils.py", "src/cifar/amb_measure.py" ]
[ "# pylint: disable = C0103, C0111, C0301, R0913, R0903, R0914, E1101\n\nfrom __future__ import division\n\nimport numpy as np\nfrom scipy import mgrid, ndimage, signal\nimport tensorflow as tf\nimport cvxpy\nimport cv2\n\nimport im_rotate\n\n\ndef get_gaussian_filter(radius, size):\n x, y = mgrid[-(size-1)/2:siz...
[ [ "tensorflow.concat", "numpy.conj", "numpy.maximum", "numpy.min", "numpy.reshape", "tensorflow.reduce_sum", "tensorflow.reshape", "numpy.fft.fftn", "numpy.fft.fftshift", "scipy.signal.convolve2d", "numpy.fft.ifftn", "numpy.zeros_like", "tensorflow.pad", "nump...
AwakerMhy/moment_neural_network
[ "0889f9c0ca045605ff1e88035a7bb4698d9a9d1c" ]
[ "Mnn_Core/mnn_utils.py" ]
[ "# -*- coding: utf-8 -*-\nimport torch.nn.functional as F\nimport numpy as np\nfrom Mnn_Core import fast_dawson\nimport matplotlib.pyplot as plt\nimport palettable\n\n\nclass Param_Container:\n \"\"\"\n args:\n _vol_rest: the rest voltage of a neuron\n _vol_th: the fire threshold of a neuron\n ...
[ [ "numpy.log", "numpy.sqrt", "numpy.meshgrid", "numpy.power", "numpy.min", "numpy.arange", "torch.nn.functional.mse_loss", "numpy.errstate", "matplotlib.pyplot.suptitle", "numpy.logical_and", "numpy.zeros", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ...
JiesiZhao077/mmf
[ "e20f0d29638c5d05e3e0c385fe67a9bfeef0f921" ]
[ "mmf/utils/build.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n\nimport logging\nimport os\nimport warnings\nfrom enum import Enum\nfrom typing import Any, Dict, List, Optional, Tuple, Union\n\nimport mmf\nimport pytorch_lightning as pl\nimport torch\nfrom mmf.common.meter import Meter\nfrom mmf.common.registry import regist...
[ [ "torch.utils.data.DistributedSampler" ] ]
danielk333/SORTS
[ "f8454901fda405c0e8ce6553366553c3f043da0b", "f8454901fda405c0e8ce6553366553c3f043da0b" ]
[ "examples/observing_passes.py", "examples/e3d_demo_planner.py" ]
[ "#!/usr/bin/env python\n\n'''\nObserving a set of passes\n================================\n\n'''\nimport pathlib\nfrom tabulate import tabulate\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nimport sorts\neiscat3d = sorts.radars.eiscat3d\nfrom sorts.controller import Tracker\nfrom sorts.scheduler import S...
[ [ "numpy.log10", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "numpy.logical_and", "numpy.unique", "matplotlib.pyplot.subplots", "numpy.argwhere", "numpy.concatenate", "numpy.full", "numpy.array", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ...
bwohlberg/xdesign
[ "b40a50e596d54501106dbc8052ae05a5ae47bfdb", "b40a50e596d54501106dbc8052ae05a5ae47bfdb", "b40a50e596d54501106dbc8052ae05a5ae47bfdb" ]
[ "src/xdesign/geometry/area.py", "src/xdesign/geometry/line.py", "tests/test_material.py" ]
[ "\"\"\"Define two dimensional geometric entities.\"\"\"\n\n__author__ = \"Daniel Ching, Doga Gursoy\"\n__copyright__ = \"Copyright (c) 2016, UChicago Argonne, LLC.\"\n__docformat__ = 'restructuredtext en'\n__all__ = [\n 'Curve',\n 'Circle',\n 'Polygon',\n 'RegularPolygon',\n 'Triangle',\n 'Rectang...
[ [ "numpy.linspace", "numpy.ndarray", "numpy.cross", "numpy.roll", "numpy.full", "matplotlib.pyplot.Circle", "numpy.sin", "matplotlib.pyplot.Polygon", "numpy.zeros", "matplotlib.path.Path", "numpy.atleast_2d", "numpy.fmax", "numpy.errstate", "numpy.logical_and"...
ScottHull/Masters-Thesis-Code
[ "46d46eb26267feec4dcd280fa227897c12faee72" ]
[ "Thesis_Code_3/radioactivity2.py" ]
[ "import matplotlib as mpl\nmpl.use('Qt5Agg')\nimport matplotlib.pyplot as plt\nimport pandas as pd\nfrom math import log, exp\nimport numpy as np\nfrom matplotlib.ticker import MultipleLocator, FormatStrFormatter\n\nplt.rcParams.update({'font.size': 16})\n\n\ndef decay(half_life, curr_nuclii, max_time, timestep, cu...
[ [ "matplotlib.ticker.MultipleLocator", "pandas.read_excel", "matplotlib.use", "numpy.arange", "matplotlib.pyplot.rcParams.update", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
ejgenc/bachelors_paper_proof_of_concept
[ "c00dc7b59d5e3295df89d080e7d49792c15fa760" ]
[ "tests/data_quality_tests/test_review_sentences_cleaned_data_quality.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n------ What is this file? ------\n\nThis test module contains some data quality tests for the review_sentences_cleaned.csv file.\nThe file can be found at:\n ../../data/cleaned/review_sentences_cleaned.csv\n\n\"\"\"\n#%% --- Import required packages ---\n\nimport os\nfrom pathli...
[ [ "pandas.read_csv" ] ]
raiv-toulouse/RPLidar
[ "f372e7f874322300aded144c8aeb7a283a426918" ]
[ "examplePyqtgraph.py" ]
[ "#!/usr/bin/env python\n\nfrom PyQt5 import QtCore, QtWidgets\nimport pyqtgraph as pg\nimport numpy as np\n\n\nclass MyWidget(pg.GraphicsWindow):\n\n def __init__(self, parent=None):\n super().__init__(parent=parent)\n\n self.mainLayout = QtWidgets.QVBoxLayout()\n self.setLayout(self.mainLay...
[ [ "numpy.random.normal" ] ]
knowledgetechnologyuhh/lannro-gym
[ "ac3afcf7d8ed854d75368135b023edf055644dd2" ]
[ "main.py" ]
[ "import gym\nimport os\nimport numpy as np\nimport lanro\nimport argparse\nimport glfw\n\nDEBUG = int(\"DEBUG\" in os.environ and os.environ[\"DEBUG\"])\n\n\ndef parse_args():\n parser = argparse.ArgumentParser()\n parser.add_argument('-i', '--interactive', action='store_true', dest='interactive', help='Start...
[ [ "numpy.array", "numpy.zeros" ] ]
teamtact/tact-developer-similarity
[ "2282022fd84f8f98ca29854c3061a36cc643b5ab" ]
[ "org/tact/dev-similarity/criteria-5/euc_developers_5_criteria.py" ]
[ "# !/usr/bin/env python\n# \n#\n# Author : \n# Date: May 19 2018\n# About: \nfrom unittest.mock import inplace\n\n'''\n\nhttps://www.dataquest.io/blog/k-nearest-neighbors-in-python/\nhttps://stackoverflow.com/questions/29530232/python-pandas-check-if-any-value-is-nan-in-dataframe\nhttps://stackoverflow.com/question...
[ [ "pandas.read_csv", "pandas.DataFrame", "scipy.spatial.distance.euclidean" ] ]
201528014227051/ARNet
[ "e7779d6af1a8990712d8e8e4a72e4c1ed138f60e" ]
[ "image_captioning/prepro_build_vocab.py" ]
[ "import os\nimport re\nimport numpy as np\nfrom six.moves import cPickle\nimport time\nimport opts\n\n\n# -----------------------------------------------------------------\n# Borrowed this function from NeuralTalk:\n# https://github.com/karpathy/neuraltalk/blob/master/driver.py#L16\n# ------------------------------...
[ [ "numpy.log", "numpy.save", "numpy.max", "numpy.array", "numpy.sum" ] ]
kagemeka/python
[ "486ce39d97360b61029527bacf00a87fdbcf552c", "486ce39d97360b61029527bacf00a87fdbcf552c", "486ce39d97360b61029527bacf00a87fdbcf552c", "486ce39d97360b61029527bacf00a87fdbcf552c", "486ce39d97360b61029527bacf00a87fdbcf552c" ]
[ "src/kgmk/ds/img/pose_estimation/posenet/model.py", "src/kgmk/dsa/misc/compress_array/jit.py", "src/kgmk/dsa/topology/maximum_flow/dinic/matrix/non_recursive/jit.py", "src/kgmk/dsa/math/fft/cooley_turkey/jit.py", "tests/prime_number/sieve_of_eratosthenes/np.py" ]
[ "import tensorflow as tf\nprint(tf.__version__)\nimport os\nfrom . import converter\n\n\n\nDEBUG_OUTPUT = False\n\n\ndef model_id_to_ord(model_id):\n if 0 <= model_id < 4:\n return model_id # id is already ordinal\n elif model_id == 50:\n return 0\n elif model_id == 75:\n return 1\n ...
[ [ "tensorflow.compat.v1.GraphDef", "tensorflow.io.gfile.GFile", "tensorflow.import_graph_def" ], [ "numpy.searchsorted", "numpy.unique" ], [ "numpy.zeros", "numpy.full" ], [ "numpy.exp", "numpy.empty" ], [ "numpy.flatnonzero" ] ]
Loonride/deeplens-cv
[ "9e5b31c1a269d364e4912ba8266415fa04277e11", "9e5b31c1a269d364e4912ba8266415fa04277e11", "9e5b31c1a269d364e4912ba8266415fa04277e11", "9e5b31c1a269d364e4912ba8266415fa04277e11" ]
[ "dlcv/object_detection/tensorflow_detect/builders/matcher_builder_test.py", "dlcv/object_detection/tensorflow_detect/core/region_similarity_calculator.py", "dlcv/object_detection/tensorflow_detect/utils/per_image_vrd_evaluation.py", "dlcv/object_detection/tensorflow_detect/utils/variables_helper_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.test.main" ], [ "tensorflow.zeros_like", "tensorflow.expand_dims", "tensorflow.shape", "tensorflow.name_scope" ], [ "numpy.minimum", "numpy.ones", "numpy.concatenate", "numpy.argmax", "numpy.argsort", "numpy.array", "numpy.zeros", "numpy.wher...
KorotkiyEugene/dsp_sdr_basic
[ "78a77736d0c33951d782f6889884633e4a42c5bd" ]
[ "4/arduino_serial/read_serial_data.py" ]
[ "import serial, time\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom scipy.fftpack import fft, ifft, fftshift\n\nFs = 6250 # Hz\nTs = 1/Fs\nNFFT = 4*1024\nOFFSET = int(0.1*NFFT)\n\n# Time vector\nt = np.linspace(0, NFFT-1, NFFT)*Ts\n# Frequency vector\nf = np.linspace(0, int(NFFT/2)-1, int(NFFT/2))*F...
[ [ "matplotlib.pyplot.tight_layout", "numpy.abs", "matplotlib.pyplot.title", "numpy.linspace", "matplotlib.pyplot.figure", "matplotlib.pyplot.plot", "scipy.fftpack.fft", "matplotlib.pyplot.subplot", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.s...
robert-giaquinto/gradient-boosted-normalizing-flows
[ "eca3726774f4498f1583bb79d4a9b955b4f51412" ]
[ "models/generative_flow.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\nimport random\nimport torch.distributions as D\n\n\nclass GenerativeFlow(nn.Module):\n \"\"\"\n Generative flow base class\n For models performing density estimation and matching\n \"\"\"\n\n def __init__(self, args):\n super(Generative...
[ [ "torch.randn", "torch.ones", "torch.distributions.Normal" ] ]
talsperre/rl-algo-implementations
[ "3d9daf25317bc3d1d9776546df47ff4d70d25084" ]
[ "test/test_dqn_agent.py" ]
[ "import sys\nsys.path.append(\"../\")\nimport gym\nimport time\nimport torch\nimport random\nimport unittest\nimport rl_models\nimport numpy as np\n\nfrom rl_models.models.AtariCNN import AtariCNN\nfrom rl_models.agents.DQNAgent import DQNAgent\nfrom rl_models.common.utils.RingBuffer import RingBuffer\nfrom rl_mode...
[ [ "torch.manual_seed", "torch.cuda.is_available", "numpy.random.seed" ] ]
rebeccabernie/CurrencyAnalyser
[ "1f57e5b5fee854912c205cb98f57c980027f0a03" ]
[ "Applied Project/BitcoinPrediction/RoughWork/mediumpost/CNN.py" ]
[ "\n\n# coding: utf-8\n\n# In[1]:\n\n\nfrom keras import applications\nfrom keras.models import Sequential\nfrom keras.models import Model\nfrom keras.layers import Dropout, Flatten, Dense, Activation\nfrom keras.callbacks import CSVLogger\nimport tensorflow as tf\nfrom scipy.ndimage import imread\nimport numpy as n...
[ [ "matplotlib.pyplot.switch_backend", "matplotlib.pyplot.plot", "sklearn.preprocessing.MinMaxScaler", "numpy.array", "matplotlib.pyplot.show" ] ]
joelouismarino/generalized_filtering
[ "f1032d62761c498e5206c0a2b07a012c8223b3de" ]
[ "evaluate.py" ]
[ "import pickle\nimport sys, os\nimport torch\nfrom config import run_config, train_config, data_config, model_config\nfrom util.logging import Logger\nfrom util.data.load_data import load_data\nfrom lib.models import load_model\nfrom util.eval import eval_model\n\ndef start_evaluating(run_config, train_config, data...
[ [ "torch.cuda.set_device" ] ]
ferorga/CarND-Capstone
[ "b91ce151c556d507d0abfcfd54f620d7b10b58b0" ]
[ "ros/src/waypoint_updater/waypoint_updater.py" ]
[ "#!/usr/bin/env python\n\nimport rospy\nfrom geometry_msgs.msg import PoseStamped\nfrom std_msgs.msg import Int32\nfrom styx_msgs.msg import Lane, Waypoint\nfrom scipy.spatial import KDTree\nimport numpy as np\nimport math\n\n'''\nThis node will publish waypoints from the car's current position to some `x` distance...
[ [ "numpy.dot", "numpy.array", "scipy.spatial.KDTree" ] ]
EiffL/SSELFI
[ "83420e68e4efa867d4a86dc27d09411dd93fb5b7" ]
[ "conditional_masked_autoregressive.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\n# Dependency imports\nimport numpy as np\nimport six\nimport tensorflow.compat.v1 as tf1\nimport tensorflow.compat.v2 as tf\n\nfrom tensorflow_probability.python.bijectors import affine_scalar\nfrom te...
[ [ "tensorflow.compat.v2.zeros_like", "tensorflow.compat.v2.unstack", "tensorflow.compat.v2.executing_eagerly", "tensorflow.compat.v2.is_tensor", "tensorflow.compat.v2.concat", "tensorflow.compat.v2.name_scope", "tensorflow.compat.v2.shape", "tensorflow.compat.v2.reshape", "tensor...
Suchun-sv/pyHGT
[ "49fb66e04386835d9dc3ba22abba121f8a960469" ]
[ "OAG/pyHGT/conv.py" ]
[ "import math\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch_geometric.nn import GCNConv, GATConv\nfrom torch_geometric.nn.conv import MessagePassing\nfrom torch_geometric.nn.inits import glorot\nfrom torch_geometric.utils import softmax\n\n\nclass HGTConv(MessagePassing):\n d...
[ [ "torch.nn.Dropout", "torch.sigmoid", "torch.ones", "torch.Tensor", "torch.sin", "torch.zeros", "torch.nn.ModuleList", "torch.nn.Embedding", "torch.nn.LayerNorm", "torch.nn.functional.gelu", "torch.nn.Linear", "torch.arange", "torch.cos" ] ]
undeadyequ/PaddleOCR
[ "7e31d064ba3054f87fa27cff84784f706248c61e" ]
[ "tools/extend/util.py" ]
[ "\"\"\"\r\ncreated by: Donghyeon Won\r\n\"\"\"\r\n\r\nimport os\r\nimport numpy as np\r\nimport pandas as pd\r\nfrom PIL import Image\r\n\r\nfrom torch.utils.data import Dataset\r\nimport torch.nn as nn\r\nimport torchvision.transforms as transforms\r\nimport torchvision.models as models\r\nimport torch\r\nimport a...
[ [ "pandas.read_csv" ] ]
jellysquider/magenta
[ "0fc8188870f5d1c988b76dae434b21e58362516c", "0fc8188870f5d1c988b76dae434b21e58362516c", "0fc8188870f5d1c988b76dae434b21e58362516c" ]
[ "magenta/pipelines/chord_pipelines_test.py", "magenta/music/chords_lib_test.py", "magenta/music/sequences_lib_test.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...
[ [ "tensorflow.test.main" ], [ "tensorflow.test.main" ], [ "tensorflow.test.main" ] ]
eur-synclab/bidsification
[ "15bbb1586e5c6bd20371776f66623bedfc99075e" ]
[ "bidsification_script.py" ]
[ "import os\nimport shutil\nimport sys\nimport glob\nfrom pathlib import Path\nimport pandas as pd\n\n# -----------------\n# STEP 0: variables\n# -----------------\n\nroot_dir = '/exports/fsw/Bendlab/SamenUniek'\nraw_sessions = ['MCC_ses01-lab']\nbids_sessions = ['ses-w01lab']\nfile_type = ['3DT1', 'SNAT1', 'SNAT2',...
[ [ "pandas.read_csv", "pandas.DataFrame" ] ]
Data-Laboratory/WorkExamples
[ "27e58207e664da7813673e6792c0c30c0a5bf74c", "27e58207e664da7813673e6792c0c30c0a5bf74c", "27e58207e664da7813673e6792c0c30c0a5bf74c", "27e58207e664da7813673e6792c0c30c0a5bf74c", "27e58207e664da7813673e6792c0c30c0a5bf74c" ]
[ "195_xgboost_for_image_classification_using_VGG16.py", "125_126_GAN_predict_mnist.py", "50_K_means_intro.py", "166b_Intro_to_time_series_Forecasting_using_LSTM_and_TimeseriesGenerator.py", "204_train_simple_unet_for_mitochondria.py" ]
[ "#Ref: Sreenivas Sarwar Anik\n\n\"\"\"\n\nIMAGE CLASSIFICATION USING XGBOOST by extracting features using VGG16 imagenet pretrained weights.\n\nThis code explains the process of using XGBoost for image classification\nusing pretrained weights (VGG16) as feature extractors.\n\nCode last tested on: \n Tensorflow: ...
[ [ "matplotlib.pyplot.imshow", "numpy.expand_dims", "sklearn.metrics.accuracy_score", "sklearn.metrics.confusion_matrix", "numpy.array", "sklearn.preprocessing.LabelEncoder", "numpy.random.randint" ], [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.show", "numpy.random.ra...
Julian-Hochhaus/py_modules
[ "cf3fa9b1193a0022ffcd7d3b15979ac19936da61" ]
[ "modules/tab2latex/tab2latex/textable.py" ]
[ "import uncertainties\nimport numpy as np\nimport os\nfrom uncertainties import ufloat\n\n#######\n#private functions\n#######\ndef __write_seperator_or_newline(data,texfile,j):\n if(j==(len(data)-1)):\n texfile.write(\"\\\\\")\n else:\n texfile.write(\"&\")\n#*********\n#Write tables body\n#***...
[ [ "numpy.copy", "numpy.append" ] ]
sophiaas/e3nn
[ "92351b9225df7aeaf70fdc124c7b0e566d4c0eda" ]
[ "examples/animated_rsh.py" ]
[ "# pylint: disable=not-callable, no-member, invalid-name, missing-docstring, line-too-long\nimport math\nimport os\nimport subprocess\nimport argparse\nimport shutil\nimport tqdm\n\nimport plotly.graph_objs as go\nimport torch\n\nfrom e3nn import o3, rsh\n\n\ndef rsh_surface(l, m, scale, tr, rot):\n n = 50\n ...
[ [ "torch.linspace", "torch.meshgrid" ] ]
harrylin-hyl/CenterNet-better
[ "567d4370ddf2b52386b46321dbd9b77e7e9c8b8b", "567d4370ddf2b52386b46321dbd9b77e7e9c8b8b", "567d4370ddf2b52386b46321dbd9b77e7e9c8b8b" ]
[ "dl_lib/network/centernet.py", "dl_lib/data/transforms/transform.py", "dl_lib/network/generator/centernet_decode.py" ]
[ "import math\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\n\nfrom dl_lib.layers import ShapeSpec\nfrom dl_lib.structures import Boxes, ImageList, Instances\n\nfrom .generator import CenterNetDecoder, CenterNetGT\nfrom .loss import modified_focal_loss, reg_l1_loss\n\n\nclass CenterNet(nn.Module):\n ...
[ [ "torch.device", "numpy.array", "torch.no_grad", "torch.Tensor" ], [ "numpy.square", "numpy.asarray", "numpy.cos", "numpy.sin", "numpy.arctan2" ], [ "numpy.dot", "torch.cat", "numpy.ones", "numpy.float32", "torch.nn.functional.max_pool2d" ] ]
Brant-Skywalker/PFN
[ "a9966724e0500854fa7630f968c497f8bc19bbe9" ]
[ "PFN-nested/utils/metrics.py" ]
[ "import torch\r\nimport torch.nn as nn\r\n\r\nclass micro():\r\n def __init__(self, rel2idx, ner2idx):\r\n self.rel2idx = rel2idx\r\n self.ner2idx = ner2idx\r\n\r\n\r\n def get_ner_index(self, tensor):\r\n index = (tensor == 1).nonzero(as_tuple=False)\r\n index_scalar = []\r\n ...
[ [ "torch.zeros_like", "torch.sum", "torch.ones_like", "torch.nn.BCELoss" ] ]
ayjabri/DeepRL
[ "0be095e3a3d04f60b4cdc97ed330dffc17b3024a", "0be095e3a3d04f60b4cdc97ed330dffc17b3024a" ]
[ "04_Reinforce/01_reinforce.py", "05_PolicyGradient/lib/utils.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n'''\nAuthor Ayman Al jabri\nReinforce Method:\nIs one of the simplist Policy_gradient methods. It uses the same formula:\n loss= - sum(Q(s,a) log(pi(s,a))) ----- Where Q(s,a): is the gradient scale. \n Q(s,a) = discounted rewards ...
[ [ "torch.FloatTensor", "torch.no_grad", "numpy.mean", "torch.cuda.is_available" ], [ "torch.nn.functional.softmax", "torch.FloatTensor", "torch.nn.functional.log_softmax" ] ]
IraKorshunova/bruno
[ "e3050c0fc637659bb29cbe293633dffa145719db" ]
[ "config_rnn/test_few_shot_omniglot.py" ]
[ "import argparse\nimport importlib\nimport json\nimport os\nimport sys\nfrom collections import defaultdict\n\nimport numpy as np\nimport tensorflow as tf\n\nimport logger\nimport utils\nfrom config_rnn import defaults\n\nnp.set_printoptions(suppress=True)\n\n\ndef classify(config_name, seq_len, n_trials, batch_siz...
[ [ "tensorflow.train.latest_checkpoint", "numpy.asarray", "numpy.set_printoptions", "tensorflow.placeholder", "numpy.std", "numpy.argmax", "numpy.mean", "tensorflow.Session", "tensorflow.make_template", "tensorflow.train.Saver" ] ]
kadvinj/efficientdet-tf2
[ "42252013a2902fadcddbf31de7fb62afc93c8154" ]
[ "video.py" ]
[ "#-------------------------------------#\r\n# 调用摄像头或者视频进行检测\r\n# 调用摄像头直接运行即可\r\n# 调用视频可以将cv2.VideoCapture()指定路径\r\n# 视频的保存并不难,可以百度一下看看\r\n#-------------------------------------#\r\nimport time\r\n\r\nimport cv2\r\nimport numpy as np\r\nimport tensorflow as tf\r\nfrom PIL import Image\r\n\r\nfrom efficientde...
[ [ "numpy.uint8", "tensorflow.config.experimental.list_physical_devices", "tensorflow.config.experimental.set_memory_growth" ] ]
vladbragoi/indoor_localization_system
[ "b98d278cbd6a2ff8dcc093631eed0605e9e3a35f", "b98d278cbd6a2ff8dcc093631eed0605e9e3a35f", "b98d278cbd6a2ff8dcc093631eed0605e9e3a35f" ]
[ "localization_service/venv/lib/python3.5/site-packages/matplotlib/__init__.py", "localization_service/venv/lib/python3.5/site-packages/mpl_toolkits/mplot3d/art3d.py", "localization_service/venv/lib/python3.5/site-packages/matplotlib/tests/test_constrainedlayout.py" ]
[ "\"\"\"\nThis is an object-oriented plotting library.\n\nA procedural interface is provided by the companion pyplot module,\nwhich may be imported directly, e.g.::\n\n import matplotlib.pyplot as plt\n\nor using ipython::\n\n ipython\n\nat your terminal, followed by::\n\n In [1]: %matplotlib\n In [2]: i...
[ [ "matplotlib.pyplot.switch_backend", "matplotlib.cbook.get_label", "matplotlib.cbook.dedent", "matplotlib.rcsetup.validate_backend", "matplotlib.rcsetup.defaultParams.items", "matplotlib.cbook.sanitize_sequence" ], [ "matplotlib.text.Text.__init__", "matplotlib.lines.Line2D.__in...
cilinyan/image-processing
[ "7375bdf4af0ead415e5a957e6ac57d517de37d58", "7375bdf4af0ead415e5a957e6ac57d517de37d58", "7375bdf4af0ead415e5a957e6ac57d517de37d58", "7375bdf4af0ead415e5a957e6ac57d517de37d58" ]
[ "pytorch_object_detection/faster_rcnn_copy/predict.py", "pytorch_classification/ShuffleNet/model.py", "pytorch_classification/AlexNet/predict.py", "pytorch_classification/AlexNet/model.py" ]
[ "import os\nimport time\nimport json\n\nimport torch\nimport torchvision\nfrom PIL import Image\nimport matplotlib.pyplot as plt\n\nfrom torchvision import transforms\nfrom network_files import FasterRCNN, FastRCNNPredictor, AnchorsGenerator\nfrom backbone import resnet50_fpn_backbone, MobileNetV2\nfrom draw_box_ut...
[ [ "torch.cuda.synchronize", "matplotlib.pyplot.imshow", "torch.zeros", "torch.load", "torch.unsqueeze", "torch.no_grad", "torch.cuda.is_available", "matplotlib.pyplot.show" ], [ "torch.nn.Sequential", "torch.transpose", "torch.nn.Conv2d", "torch.nn.Linear", "t...
jseppanen/ray
[ "0c02427da25fe647c6e14d2390eae46aa5394f45" ]
[ "python/ray/util/sgd/torch/torch_runner.py" ]
[ "import logging\nimport io\nimport itertools\n\nimport ray\nimport torch\n\nfrom ray.util.sgd.torch.constants import USE_FP16, NUM_STEPS\nfrom ray.util.sgd import utils\n\nlogger = logging.getLogger(__name__)\namp = None\n\ntry:\n from apex import amp\nexcept ImportError:\n logger.debug(\"apex is not installe...
[ [ "torch.cat", "torch.cuda.empty_cache", "torch.cuda.is_available", "torch.save" ] ]
mmiikeke/Lane_Detection
[ "52b5572da04752240c450bc373ba22d4e5676a27", "52b5572da04752240c450bc373ba22d4e5676a27" ]
[ "detection_program/demo_class.py", "detection_program/model.py" ]
[ "from pathlib import Path\nimport os, cv2, torch\nimport threading\nfrom detection_program.options import opt\nimport numpy as np\nfrom torch.autograd import Variable\nimport copy, time\nfrom utils.eval_utils import generate_result, eliminate_fewer_points, sort_along_y, eliminate_out, draw_points, sort_lane\nfrom P...
[ [ "numpy.rollaxis", "torch.from_numpy", "torch.save", "numpy.array", "torch.autograd.Variable" ], [ "torch.nn.ConvTranspose2d", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
plopd/plop-msc-thesis
[ "c61fcf53c670b288ac8593790f9cc3f3abd50989", "c61fcf53c670b288ac8593790f9cc3f3abd50989" ]
[ "results/plot_prediction_problem.py", "results/fig_9_4.py" ]
[ "import argparse\nimport os\nfrom pathlib import Path\n\nimport gym\nimport gym_puddle # noqa f401\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport seaborn as sns\n\nfrom utils.utils import minmax_normalization_ab\n\nmatplotlib.rcParams.update({\"font.size\": 24})\nsns.set()\n\nparse...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.scatter", "matplotlib.pyplot.title", "matplotlib.pyplot.ylim", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.xlim", "matplotlib.rcParams.update", "numpy.load", "matplotlib.pyplot.figure" ], [ "matplotlib.pyplot.tig...
rcarneva/pandas
[ "f76bad2d267b4891e4914ba2bfa59c2695315faa" ]
[ "pandas/io/parsers.py" ]
[ "\"\"\"\nModule contains tools for processing files into DataFrames or other objects\n\"\"\"\nfrom __future__ import print_function\nfrom pandas.compat import range, lrange, StringIO, lzip, zip, string_types, map\nfrom pandas import compat\nfrom collections import defaultdict\nimport re\nimport csv\nimport warnings...
[ [ "pandas.core.common.is_list_like", "pandas.core.common.is_integer_dtype", "pandas.core.common.AbstractMethodError", "pandas.compat.range", "pandas.compat.map", "pandas.core.common._ensure_object", "pandas.compat.iteritems", "pandas.core.frame.DataFrame", "numpy.where", "num...
biddy1618/rasaOneTech
[ "7276746f859093543be6a65872b5459c8812598e" ]
[ "onetech/scriptsData/cleaning/cleanData.py" ]
[ "import os\nimport sys\n\nimport json\nimport pandas as pd\n\nimport psycopg2\n\nimport yaml\n\nimport argparse\n\nSOURCE_FILE_NLU_JSON = '/scriptsData/migration/dataNLU/nlu.json'\nSOURCE_FILE_NLU_MD = './scriptsData/migration/dataNLU/nlu.md'\nSOURCE_FILE_YAML = './scriptsData/migration/domain.yml'\nSOURCE_FILE_STO...
[ [ "pandas.DataFrame" ] ]
lokhiufung/quick-and-dirty-dl
[ "f2e4429451543e9e9a44ed5304e268cf3c2aa888" ]
[ "cpc/model.py" ]
[ "import json\nfrom functools import namedtuple\nimport random\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.optim import Adam\nfrom torch.utils.data import Dataset, DataLoader\nimport pytorch_lightning as pl\nfrom omegaconf import DictConfig\n\nfrom cpc.dataset import AudioRawD...
[ [ "torch.nn.BatchNorm1d", "torch.nn.CrossEntropyLoss", "torch.randint", "torch.zeros", "torch.cat", "torch.nn.ModuleList", "torch.nn.GRU", "torch.utils.data.DataLoader", "torch.sum", "torch.nn.Linear", "torch.nn.Conv1d" ] ]
banr1jnts/kaggle-youtube2nd
[ "21248d563afcf707cc7665703a987d71c94f4c5a" ]
[ "model_utils.py" ]
[ "import tensorflow as tf\n\ndef sample_random_seq(model_input, num_frames, num_samples):\n batch_size = tf.shape(model_input)[0]\n frame_index_offset = tf.tile(tf.expand_dims(tf.range(num_samples), 0),\n [batch_size, 1])\n max_start_frame_index = tf.maximum(num_frames - num_...
[ [ "tensorflow.reduce_max", "tensorflow.gather_nd", "tensorflow.range", "tensorflow.shape", "tensorflow.reduce_mean", "tensorflow.maximum", "tensorflow.stack", "tensorflow.cast", "tensorflow.reshape", "tensorflow.random_uniform" ] ]
ddp5730/Non-binary-deep-transfer-learning-for-image-classification
[ "affb243b0939f82bf364ed9c4c203e203760082c" ]
[ "timm/models/efficientnet.py" ]
[ "\"\"\" PyTorch EfficientNet Family\n\nAn implementation of EfficienNet that covers variety of related models with efficient architectures:\n\n* EfficientNet (B0-B8, L2 + Tensorflow pretrained AutoAug/RandAug/AdvProp/NoisyStudent weight ports)\n - EfficientNet: Rethinking Model Scaling for CNNs - https://arxiv.org...
[ [ "torch.nn.Sequential", "torch.nn.Dropout", "torch.nn.functional.dropout" ] ]
FernandoGaGu/pywinEA
[ "7dc2e62668851fcf6b4d88d6696c69a2d4a570ec", "7dc2e62668851fcf6b4d88d6696c69a2d4a570ec" ]
[ "pywinEA/imputation/dynamic.py", "pywinEA/algorithm/nsga2.py" ]
[ "# Module that defines the strategies defined for the handling of missing values.\n#\n# Author: Fernando García <ga.gu.fernando@gmail.com>\n#\n# External dependencies\nimport numpy as np\n# Module dependencies\nfrom ..interface.imputation import ImputationStrategy\n\n\nclass DynamicValue(ImputationStrategy):\n \...
[ [ "numpy.random.seed", "numpy.isnan", "numpy.random.shuffle", "numpy.argsort", "numpy.array" ], [ "numpy.argsort", "numpy.max", "numpy.array" ] ]
francois-rozet/lampe
[ "50e53c767ee5d98502ec8520b3bca554f2169eb7" ]
[ "lampe/simulators/hh.py" ]
[ "r\"\"\"Hodgkin-Huxley (HH) benchmark.\n\nHH is a widespread non-linear mechanistic model of neural dynamics.\n\nReferences:\n A quantitative description of membrane current and its application to conduction and excitation in nerve\n (Hodgkin et al., 1952)\n https://link.springer.com/article/10.1007/BF0245...
[ [ "numpy.expand_dims", "numpy.maximum", "numpy.abs", "numpy.arange", "numpy.stack", "torch.tensor", "numpy.full_like", "numpy.std", "numpy.mean", "numpy.diff", "numpy.sum", "numpy.random.default_rng" ] ]
edawson/SigProfilerExtractor
[ "a9cc43ddba2271ec68ff4d1a6a93399386713325" ]
[ "build/lib/SigProfilerExtractor/nmf_gpu.py" ]
[ "\"\"\"\nImplementation of non-negative matrix factorization for GPU\n\"\"\"\n\nfrom datetime import datetime\n\nfrom nimfa.methods.seeding import nndsvd\nimport numpy as np\nimport torch\nimport torch.nn\nfrom torch import nn\n\n\nclass NMF:\n def __init__(self, V, rank, max_iterations=100000, tolerance=1e-8, t...
[ [ "torch.ones", "torch.cuda.manual_seed", "torch.cuda.set_device", "torch.manual_seed", "torch.from_numpy", "torch.no_grad", "torch.rand", "torch.nn.Threshold" ] ]
neil-tan/utensor_cgen
[ "ffaf692bf6d1f8572039ad7e82e695f97b050cd2" ]
[ "tests/test_ir/test_NameAttrListConverter/conftest.py" ]
[ "import pytest\nfrom tensorflow.core.framework.attr_value_pb2 import AttrValue, NameAttrList\n\n\n@pytest.fixture(scope='session')\ndef name_attr_list():\n attr = {\n 'float': AttrValue(f=3.14159),\n 'list': AttrValue(list=AttrValue.ListValue(b=[True, False, True]))\n }\n return NameAttrList(...
[ [ "tensorflow.core.framework.attr_value_pb2.NameAttrList", "tensorflow.core.framework.attr_value_pb2.AttrValue.ListValue", "tensorflow.core.framework.attr_value_pb2.AttrValue" ] ]
pantelisantonoudiou/pandas
[ "328e5b61e4a6edbe232e7528d5070b701350c93a" ]
[ "pandas/core/series.py" ]
[ "\"\"\"\nData structure for 1-dimensional cross-sectional and time series data\n\"\"\"\nfrom __future__ import annotations\n\nfrom textwrap import dedent\nfrom typing import (\n IO,\n TYPE_CHECKING,\n Any,\n Callable,\n Hashable,\n Iterable,\n Literal,\n Sequence,\n Union,\n cast,\n ...
[ [ "pandas.core.ops.logical_op", "pandas.core.nanops.nancov", "pandas.core.dtypes.cast.maybe_cast_pointwise_result", "pandas.util._validators.validate_bool_kwarg", "pandas.core.ops.align_method_SERIES", "pandas.core.dtypes.inference.is_hashable", "pandas.util._decorators.deprecate_nonkeyw...
jameschapman19/cca_zoo
[ "45c38f0164a324e8fcc33a480814842e747d86c3", "45c38f0164a324e8fcc33a480814842e747d86c3" ]
[ "cca_zoo/models/cca_base.py", "cca_zoo/models/innerloop.py" ]
[ "import itertools\nfrom abc import abstractmethod\nfrom typing import Union, Iterable\n\nimport numpy as np\nfrom scipy.sparse import issparse\nfrom sklearn.base import BaseEstimator, MultiOutputMixin, RegressorMixin\nfrom sklearn.utils.sparsefuncs import mean_variance_axis\nfrom sklearn.utils.validation import che...
[ [ "sklearn.utils.validation.check_is_fitted", "scipy.sparse.issparse", "sklearn.utils.sparsefuncs.mean_variance_axis", "sklearn.utils.validation.check_random_state", "numpy.corrcoef", "numpy.array" ], [ "numpy.diag", "numpy.linalg.svd", "numpy.abs", "numpy.sqrt", "num...
aboestpetersen/icesat2_canopy_heights
[ "556078d72036f18d00e645fb731ecca53320aa58" ]
[ "PhoREAL/source_code/icesatUtils.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nScript that contains utliity functions for PhoREAL\n\nCopyright 2019 Applied Research Laboratories, University of Texas at Austin\n\nThis package is free software; the copyright holder gives unlimited\npermission to copy and/or distribute, with or without modification, as\nlong as ...
[ [ "numpy.matrix", "numpy.nanmedian", "numpy.radians", "numpy.arctan", "numpy.asarray", "scipy.interpolate.dfitpack.bispeu", "numpy.flipud", "numpy.cumsum", "pandas.DataFrame", "numpy.concatenate", "numpy.max", "numpy.arctan2", "numpy.round", "numpy.argmin", ...
f1amingo/logparser
[ "65f077a78a974a50e0fff792257fb6fea0a86821" ]
[ "logparser/IPLoM/IPLoM.py" ]
[ "\"\"\"\r\nDescription : This file implements the IPLoM algorithm for log parsing\r\nAuthor : LogPAI team\r\nLicense : MIT\r\n\"\"\"\r\n\r\nimport copy\r\nimport sys\r\nfrom datetime import datetime\r\nimport os\r\nimport gc\r\nimport re\r\nimport pandas as pd\r\nimport hashlib\r\nimport string\r\n\r\n\r\n...
[ [ "pandas.DataFrame" ] ]
vanya2v/Multi-modal-learning
[ "628acee4e275db16733b13e4b1ae766132030b28", "628acee4e275db16733b13e4b1ae766132030b28" ]
[ "dltk/core/io/reader.py", "dltk/core/metrics.py" ]
[ "from __future__ import print_function\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport tensorflow as tf\nimport numpy as np\nimport SimpleITK as sitk\nimport traceback\n\nclass AbstractReader(object):\n \"\"\"Abstract reader\n\n Abstract reader class for data I/O. Provides t...
[ [ "tensorflow.convert_to_tensor", "tensorflow.FIFOQueue", "tensorflow.placeholder_with_default", "tensorflow.expand_dims", "tensorflow.RandomShuffleQueue", "tensorflow.train.queue_runner.QueueRunner", "tensorflow.name_scope", "tensorflow.train.slice_input_producer", "tensorflow.t...
vladiant/ComputerVisionUtils
[ "d893726bff2869bf11e6f6dbfc7702ed875760f8" ]
[ "FeatureMatchingSamples/Python/Combined/ORB/orb_flann_knn_matcher.py" ]
[ "# https://github.com/methylDragon/opencv-python-reference/blob/master/02%20OpenCV%20Feature%20Detection%20and%20Description.md\n# Source: https://docs.opencv.org/3.4.4/dc/dc3/tutorial_py_matcher.html\n\nimport numpy as np\nimport cv2 as cv\n\nimg1 = cv.imread(\"box.png\") # queryImage\nimg2 = cv.imread(\"box_in_s...
[ [ "numpy.copy", "numpy.array" ] ]
fengzhongye/face-alignment
[ "6a7731168dbb1a15f9ecd5fe4c79c992f179a622" ]
[ "face_alignment/utils.py" ]
[ "from __future__ import print_function\nimport os\nimport sys\nimport time\nimport torch\nimport math\nimport numpy as np\nimport cv2\n\n\ndef _gaussian(\n size=3, sigma=0.25, amplitude=1, normalize=False, width=None,\n height=None, sigma_horz=None, sigma_vert=None, mean_horz=0.5,\n mean_vert=0...
[ [ "torch.ones", "torch.cat", "torch.eye", "torch.is_tensor", "torch.from_numpy", "torch.tensor", "torch.inverse", "torch.matmul", "torch.FloatTensor", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.empty" ] ]
teaVeloper/modin
[ "035f5027fc9f1236ba70ab8f8126f370f1f2280f", "035f5027fc9f1236ba70ab8f8126f370f1f2280f" ]
[ "modin/core/execution/ray/implementations/pandas_on_ray/partitioning/partition_manager.py", "modin/core/dataframe/pandas/partitioning/partition_manager.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.concat", "numpy.array" ], [ "pandas.concat", "pandas.DataFrame", "numpy.concatenate", "numpy.append", "numpy.array", "numpy.empty" ] ]
binzh93/EAST
[ "b5f66ab1a5dd37b6a5134336d494000e1add6da1" ]
[ "train.py" ]
[ "import torch\nfrom torch.utils import data\nfrom torch import nn\nfrom torch.optim import lr_scheduler\nfrom dataset import custom_dataset\nfrom model import EAST\nfrom loss import Loss\nimport os\nimport time\nimport numpy as np\n\n\ndef train(train_img_path, train_gt_path, pths_path, batch_size, lr, num_workers,...
[ [ "torch.optim.lr_scheduler.MultiStepLR", "torch.utils.data.DataLoader", "torch.nn.DataParallel", "torch.cuda.is_available", "torch.cuda.device_count" ] ]
LiyouZhou/CenterPoint
[ "b57dac03c4044cf19f6e7dcbeebae8e0befb5abb" ]
[ "det3d/torchie/parallel/collate.py" ]
[ "import collections\nfrom collections import defaultdict\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom torch.utils.data.dataloader import default_collate\n\nfrom .data_container import DataContainer\n\n\ndef collate(batch, samples_per_gpu=1):\n \"\"\"Puts each data field into a tenso...
[ [ "numpy.pad", "numpy.stack", "torch.tensor", "numpy.concatenate", "torch.stack", "numpy.zeros", "torch.nn.functional.pad", "torch.utils.data.dataloader.default_collate" ] ]
pengaoao/wenet
[ "73e6503620df404184e0f2f01d85c1bb1d6c3b07", "73e6503620df404184e0f2f01d85c1bb1d6c3b07" ]
[ "tools/compute_cmvn_stats.py", "wenet/transformer/embedding.py" ]
[ "#!/usr/bin/env python3\n# encoding: utf-8\n\nimport sys\nimport argparse\nimport json\nimport codecs\nimport yaml\n\nimport torch\nimport torchaudio\nimport torchaudio.compliance.kaldi as kaldi\nfrom torch.utils.data import Dataset, DataLoader\n\ntorchaudio.set_audio_backend(\"sox_io\")\n\n\nclass CollateFunc(obje...
[ [ "torch.zeros", "torch.sum", "torch.utils.data.DataLoader", "torch.no_grad", "torch.square" ], [ "torch.nn.Dropout", "torch.sin", "torch.zeros", "torch.tensor", "torch.arange", "torch.cos" ] ]
gchrupala/visually-grounded-speech
[ "1c4b173f616596c044e827501515e43ecd2516b4" ]
[ "analysis/analyze.py" ]
[ "from __future__ import division\nfrom __future__ import print_function\nimport imaginet.simple_data as sd\nimport imaginet.data_provider as dp\nimport imaginet.vendrov_provider as vendrov\nimport imaginet.experiment as E\nimport imaginet.defn.audiovis_rhn as Speech\nimport imaginet.defn.visual2_rhn as Text\nimport...
[ [ "numpy.hstack", "sklearn.cross_validation.StratifiedKFold", "sklearn.linear_model.LogisticRegression", "numpy.median", "numpy.mean", "numpy.argsort", "numpy.repeat", "numpy.array", "numpy.vstack" ] ]
mariusud/SqueezeSegV3
[ "893a3efd41e11761f3e83d570192cb8e9d1439b9" ]
[ "src/tasks/semantic/modules/segmentator.py" ]
[ "#!/usr/bin/env python3\n# This file is covered by the LICENSE file in the root of this project.\n\nimport imp\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom tasks.semantic.postproc.CRF import CRF\nimport __init__ as booger\n\nclass Segmentator(nn.Module):\n def __init__(self, ARCH, nc...
[ [ "torch.nn.functional.softmax", "torch.nn.Dropout2d", "torch.zeros", "torch.load", "torch.nn.Conv2d", "torch.cuda.is_available" ] ]
HibrahimBoz/FingerprintFeatureExtraction
[ "68554a9e1ca3961c6fea655832905d71e9f9139f" ]
[ "src/ridge_filter.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Fri Apr 22 03:15:03 2016\r\n\r\n@author: utkarsh\r\n\"\"\"\r\n\r\n\r\n# RIDGEFILTER - enhances fingerprint image via oriented filters\r\n#\r\n# Function to enhance fingerprint image via oriented filters\r\n#\r\n# Usage:\r\n# newim = ridgefilter(im, orientim, freqim...
[ [ "numpy.linspace", "numpy.unique", "numpy.reshape", "numpy.power", "numpy.cos", "scipy.ndimage.rotate", "numpy.round", "numpy.max", "numpy.shape", "numpy.array", "numpy.where", "numpy.double", "numpy.zeros" ] ]
vishalbelsare/skpro
[ "05f0df076db777946f317117d6cc66f2dd54259b", "05f0df076db777946f317117d6cc66f2dd54259b" ]
[ "examples/workflow.py", "skpro/ensemble.py" ]
[ "from sklearn.linear_model import LinearRegression\n\nfrom skpro.workflow.table import Table\nfrom skpro.metrics import log_loss\nfrom skpro.workflow import Model\nfrom skpro.workflow.manager import DataManager\nfrom skpro.workflow.cross_validation import grid_optimizer\nfrom skpro.parametric import ParametricEstim...
[ [ "sklearn.linear_model.LinearRegression" ], [ "sklearn.utils.check_array", "sklearn.utils.validation.check_is_fitted", "numpy.mean", "sklearn.ensemble.base._partition_estimators" ] ]
YasMME/habitat-lab
[ "d573e16d6e3d56e6fef4dcde142fa93c63f8469b" ]
[ "habitat/sims/habitat_simulator/habitat_simulator.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Dict,\n List,\n Optional,\n Sequence,\n S...
[ [ "numpy.array", "numpy.expand_dims", "numpy.iinfo", "numpy.clip" ] ]
shijiansu/coursera-applied-data-science-with-python
[ "a0f2bbd0b9201805f26d18b73a25183cf0b3a0e9", "a0f2bbd0b9201805f26d18b73a25183cf0b3a0e9" ]
[ "2_applied_data_representation/w3_charting_fundamentals/1_chart/4_heatmap.py", "1_introduction/w2_pandas/3_assignment_pandas/1_olympic_game.py" ]
[ "#!/usr/bin/python\n# -*- coding:utf-8 -*-\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n# 数据\nY = np.random.normal(loc=0.0, scale=1.0, size=10000)\nX = np.random.random(size=10000)\n\n# 例子 1:\nplt.figure()\n_ = plt.hist2d(X, Y, bins=25)\nplt.show()\n\n# 例子 2:\nplt.figure()\n_ = plt.hist2d(X, Y, bins=10...
[ [ "numpy.random.random", "matplotlib.pyplot.hist2d", "matplotlib.pyplot.colorbar", "numpy.random.normal", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "pandas.read_csv", "pandas.DataFrame" ] ]
hcherkaoui/pyta
[ "1f4a272abf4a6971e75c552eda791409608d5fc5" ]
[ "pyta/optim.py" ]
[ "\"\"\" This module gathers optimization functions.\"\"\"\n# Authors: Hamza Cherkaoui <hamza.cherkaoui@inria.fr>\n# License: BSD (3-clause)\n\nimport time\nimport warnings\nimport numpy as np\nfrom scipy.optimize.linesearch import line_search_armijo\n\n\ndef fista(grad, obj, prox, x0, momentum=True, max_iter=100, s...
[ [ "numpy.abs", "numpy.sqrt", "numpy.finfo", "numpy.copy", "numpy.zeros_like" ] ]
springcoil/pymc3
[ "90fcd7d1073da8724830de703828c79fc843c493", "90fcd7d1073da8724830de703828c79fc843c493", "90fcd7d1073da8724830de703828c79fc843c493" ]
[ "pymc3/gp/util.py", "pymc3/tests/test_examples.py", "pymc3/gp/cov.py" ]
[ "from scipy.cluster.vq import kmeans\nimport numpy as np\nimport pymc3 as pm\nimport theano.tensor as tt\n\n\ncholesky = pm.distributions.dist_math.Cholesky(nofail=True, lower=True)\nsolve_lower = tt.slinalg.Solve(A_structure='lower_triangular')\nsolve_upper = tt.slinalg.Solve(A_structure='upper_triangular')\nsolve...
[ [ "numpy.linspace", "scipy.cluster.vq.kmeans", "numpy.asarray", "numpy.min", "matplotlib.pyplot.get_cmap", "numpy.percentile", "numpy.int", "numpy.std", "numpy.max", "numpy.random.randint" ], [ "numpy.random.random", "numpy.linspace", "numpy.arange", "matp...
willie3838/pandas
[ "daec2e73b48fe34086dcdeeb0858d29536b6ca6a" ]
[ "pandas/core/indexes/multi.py" ]
[ "from __future__ import annotations\n\nfrom functools import wraps\nfrom sys import getsizeof\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Collection,\n Hashable,\n Iterable,\n List,\n Sequence,\n Tuple,\n cast,\n)\nimport warnings\n\nimport numpy as np\n\nfrom pandas._c...
[ [ "pandas.Series", "numpy.asarray", "pandas._libs.lib.tuples_to_object_array", "numpy.cumsum", "numpy.dtype", "pandas.core.indexes.base.Index", "pandas.core.indexes.frozen.FrozenList", "numpy.concatenate", "pandas._config.get_option", "numpy.all", "numpy.any", "pandas...
sourabhyadav/test_track
[ "d2b4813aaf45dd35db5de3036eda114ef14d5022", "d2b4813aaf45dd35db5de3036eda114ef14d5022" ]
[ "my_pose_track_v1-1.py", "my_pose_track_v3.py" ]
[ "#!/usr/bin/python\n# -*- coding:utf8 -*-\n\"\"\"\n Author: Haoming Chen\n E-mail: chenhaomingbob@163.com\n Time: 2019/12/23\n Description: 使用gt信息\n\"\"\"\nimport time\nimport argparse\n\n# import vision essentials\nimport cv2\nimport numpy as np\nimport tensorflow as tf\nimport logging\n# import Networ...
[ [ "numpy.amax", "numpy.unravel_index", "numpy.maximum", "numpy.minimum", "numpy.asarray", "numpy.isnan", "numpy.ascontiguousarray", "numpy.zeros", "numpy.array", "numpy.where", "numpy.vstack" ], [ "numpy.amax", "numpy.unravel_index", "numpy.maximum", "...
pdh930105/overhaul-distillation
[ "8f218c3faadd7b97006206cdc31711471ad5e309" ]
[ "CIFAR-100/train_with_distillation.py" ]
[ "from __future__ import print_function\n\nimport os\nimport time\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.backends.cudnn as cudnn\nimport torch.optim as optim\nimport torchvision\nimport torchvision.transforms as transforms\nimport torch.nn.functional as F\nimport argparse\n\nimport di...
[ [ "torch.nn.CrossEntropyLoss", "torch.max", "torch.cuda.set_device", "torch.utils.data.DataLoader", "torch.cuda.is_available", "numpy.array" ] ]
mlists/Mapping
[ "33dfbebd50463fc37a6367ce0f05ba254e870406" ]
[ "vector.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\n\nfig, ax = plt.subplots()\n\nX, Y = np.meshgrid(np.arange(15), np.arange(10))\nU = V = np.ones_like(X)\nphi = (np.random.rand(15, 10) - .5) * 150\nax.quiver(X, Y, U, V, angles=phi)\nprint(phi)\nplt.show()\n\n" ]
[ [ "numpy.ones_like", "numpy.arange", "matplotlib.pyplot.subplots", "numpy.random.rand", "matplotlib.pyplot.show" ] ]
NeilKulikov/fourier
[ "d5aa7801628168115133a68aa9f358d782600983" ]
[ "proto/bench.py" ]
[ "#!/usr/bin/env python3\n\nimport ctypes\n\nbasic_dll = ctypes.CDLL('fourier_basic.so')\n\nbasic_dll.density_fourier_capi_float.restype = ctypes.c_int\nbasic_dll.density_fourier_capi_float.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_long, ctypes.c_long, ctypes.c_float, ctypes.c_float]\nb...
[ [ "numpy.abs", "numpy.min", "numpy.ascontiguousarray", "numpy.sort", "numpy.max", "numpy.std", "numpy.mean", "numpy.random.rand", "numpy.exp", "numpy.zeros" ] ]
matthiasdiener/mirgecom
[ "4fb879023ec124047be9f3001485c69a8f4660c6", "4fb879023ec124047be9f3001485c69a8f4660c6" ]
[ "test/test_eos.py", "test/test_init.py" ]
[ "\"\"\"Test the EOS interfaces.\"\"\"\n\n__copyright__ = \"\"\"\nCopyright (C) 2020 University of Illinois Board of Trustees\n\"\"\"\n\n\n__license__ = \"\"\"\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to dea...
[ [ "numpy.dot", "numpy.zeros" ], [ "numpy.dot", "numpy.zeros", "numpy.sqrt" ] ]
beabevi/ESAN
[ "35dfc021f2a5c0d85c2a2cee4bcd6b4345b96d8f" ]
[ "main.py" ]
[ "import argparse\nimport multiprocessing as mp\nimport os\nimport random\n\nimport numpy as np\nimport torch\nimport torch.optim as optim\nimport wandb\nfrom ogb.graphproppred import Evaluator\n\n# noinspection PyUnresolvedReferences\nfrom data import SubgraphData\nfrom utils import get_data, get_model, SimpleEvalu...
[ [ "torch.optim.lr_scheduler.StepLR", "torch.nn.CrossEntropyLoss", "torch.optim.lr_scheduler.ReduceLROnPlateau", "numpy.random.seed", "torch.cat", "torch.manual_seed", "numpy.std", "numpy.argmax", "torch.set_num_threads", "numpy.mean", "torch.cuda.is_available", "torch...