repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
nshea3/harmonica
[ "4f2dcbe776c3ebd1f35bdf644da74a4a18a91490" ]
[ "harmonica/tests/test_sample_data.py" ]
[ "\"\"\"\nTest the sample data loading functions.\n\"\"\"\nimport numpy.testing as npt\n\nfrom ..datasets.sample_data import (\n fetch_gravity_earth,\n fetch_geoid_earth,\n fetch_topography_earth,\n fetch_rio_magnetic,\n fetch_south_africa_gravity,\n)\n\n\ndef test_geoid_earth():\n \"Sanity checks ...
[ [ "numpy.testing.assert_allclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ling-cai/CategoricalNF
[ "0e503230f9ac65caef627f9a72d79eead42f397d" ]
[ "layers/flows/coupling_layer.py" ]
[ "import torch\nimport torch.nn as nn\nimport math\nimport sys\nsys.path.append(\"../../\")\nfrom layers.flows.flow_layer import FlowLayer\nfrom layers.networks.help_layers import run_sequential_with_mask\n\n\nclass CouplingLayer(FlowLayer):\n\n\tdef __init__(self, c_in, mask, \n\t\t\t\t\t model_func,\n\t\t\t\t\t ...
[ [ "torch.exp", "torch.ones", "torch.ones_like", "torch.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
bataeves/kaggle
[ "473fe49ab0fbc24d160f0f86271e7f45c4abfd44" ]
[ "instacart/imba/f1_optimal.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom joblib import Parallel, delayed\nimport multiprocessing\n\nfrom utils import fast_search\n\nnone_product = 50000\n\ndef applyParallel(dfGrouped, func):\n retLst = Parallel(n_jobs=multiprocessing.cpu_count())(delayed(func)(group) for name, group in dfGrouped)\n re...
[ [ "numpy.multiply.reduce", "pandas.concat", "numpy.argmax", "numpy.argsort", "pandas.read_pickle" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
longredzhong/TextClassification
[ "5e5e22ea3b62b7eb5ac5dcf33d3f6f9b572b051d" ]
[ "test/TestEComerceDataloader.py" ]
[ "#%%\nfrom torchtext.data import Field,BucketIterator\nfrom TextClassification.dataloader.ECommerceDataloader import ECommerceDataset\npath = \"/home/longred/TextClassification/dataset/preProcess/E_commerce_data/val_data.tsv\"\nchar_text = Field(sequential=True, lower=True, fix_length=None)\nword_text = Field(seque...
[ [ "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
valferreiraalv/house_rocket
[ "745cde5aee57d5bf130c8e738fb8f96ebec9edbe" ]
[ "notebooks/aula01_python.py" ]
[ "# carregando dados\r\n\r\nimport pandas as pd\r\nimport statistics\r\nimport math\r\nfrom scipy import stats\r\nimport numpy\r\nfrom collections import Counter\r\ndata = pd.read_csv('datasets/kc_house_data.csv')\r\n\r\n#1. Quantas casas estão disponíveis para compra? #R: Contar a quantidade de linhas do conjunto d...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
tsbiscaro/matchproj-python_DSA
[ "78c2fd72c7655cfd38ec478d4c9b31fca971ff7f" ]
[ "scripts/find_good_case.py" ]
[ "#! /usr/bin/env python\n\"\"\"\nMSGR Matching Satellite and Ground Radar\n========================================\n\n@author: Valentin Louf\n@date: 2016-12-06 (creation) 2017-10-05 (current version)\n@email: valentin.louf@bom.gov.au\n@company: Monash University/Bureau of Meteorology\n\"\"\"\n# Standard library im...
[ [ "pandas.date_range" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
mathfish/pymc3
[ "3cfee77fda041483e86d9c61fa1d1ada9380cdb3" ]
[ "pymc3/distributions/continuous.py" ]
[ "# Copyright 2020 The PyMC Developers\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...
[ [ "scipy.stats.rice.rvs", "scipy.stats.triang.rvs", "scipy.interpolate.InterpolatedUnivariateSpline", "numpy.sqrt", "numpy.abs", "numpy.random.exponential", "numpy.finfo", "numpy.tan", "numpy.random.normal", "numpy.any", "numpy.searchsorted", "numpy.floor", "numpy...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
andreamad8/PPCM
[ "ac3a06502f9e0126b6b644e1f68c38ca744b3862" ]
[ "scorer.py" ]
[ "import jsonlines\nimport glob\nimport numpy as np\nimport copy \nfrom collections import defaultdict\nfrom tabulate import tabulate\nfrom transformers import GPT2Tokenizer\nfrom utils.helper import parse_prefixes, truncate\nfrom metric.dist_score import eval_distinct\nfrom metric.lm_score import get_ppl_simplified...
[ [ "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
john-vastola/ML-from-scratch-seminar
[ "5df9db96ab5012929403fa9a90545b142a721612" ]
[ "VAE/code/dataHelpers.py" ]
[ "# utilities for loading data from MNIST\n\nimport torch, torchvision\nimport numpy as np\n\n\ndef getMNIST(directory='./MNIST'):\n ''' Fetches MNIST dataset to the specified directory'''\n MNIST = torchvision.datasets.MNIST(directory, train=True, download=True, transform=torchvision.transforms.ToTensor())\n ...
[ [ "torch.utils.data.DataLoader", "numpy.intersect1d", "torch.utils.data.SubsetRandomSampler", "torch.utils.data.dataset.random_split" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
funky23exe/habitat-sim
[ "a72ba43593a57995972ba1521f6f7a20d122761c" ]
[ "tests/test_physics.py" ]
[ "import os.path as osp\nimport random\n\nimport numpy as np\nimport pytest\nimport quaternion\n\nimport examples.settings\nimport habitat_sim.physics\nfrom habitat_sim.utils.common import (\n quat_from_angle_axis,\n quat_from_magnum,\n quat_to_magnum,\n)\n\n\n@pytest.mark.skipif(\n not osp.exists(\"data...
[ [ "numpy.random.seed", "numpy.eye", "numpy.identity", "numpy.random.rand", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cmda-jpl/cmda_notebooks
[ "bfccf032ec40a98613126c032e5564dcf820896d" ]
[ "fillna.py" ]
[ "import numpy as np\n\ndef replace_nans(array, max_iter, kernel_size=1, method='localmean'):\n \"\"\"Replace NaN elements in an array using an iterative image inpainting algorithm.\n\n Parameters\n ----------\n array : 2d np.ndarray\n an array containing NaN elements that have to be replaced\n ...
[ [ "numpy.isnan", "numpy.array", "numpy.zeros", "numpy.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Data-Analysis-tian/pyopls
[ "dabc449388aa6c5d312f15298aade91f9414c2e5" ]
[ "pyopls/tests/test_base.py" ]
[ "import pytest\nfrom sklearn.base import clone\n\ndef test_clone():\n # Tests that clone creates a correct deep copy.\n # We create an estimator, make a copy of its original state\n # (which, in this case, is the current state of the estimator),\n # and check that the obtained copy is a correct deep cop...
[ [ "sklearn.base.clone" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
BasileiosKal/NeuralNet
[ "c998f7a96ceb2dbbb4b09f9ec2b312a5c80ce5df" ]
[ "NeuralNet/Networks/NeuralNetworks.py" ]
[ "import numpy as np\nfrom NeuralNet.Utilities.Ploting import plot_decision_boundary\nimport matplotlib.pyplot as plt\nimport copy\nfrom NeuralNet.Networks.BaseClasses import NeuralNetworkBase, LayersBaseClass\n\n\nclass InputLayer(LayersBaseClass):\n \"\"\"The input layer of a network. Its \"activation\"\n is...
[ [ "numpy.dot", "matplotlib.pyplot.gca", "numpy.sqrt", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.subplot", "numpy.random.randn", "matplotlib.pyplot.show", "numpy.zeros", "numpy.sum", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
matthiashuschle/pandera
[ "c9a2be0e37c91d43dff93805b434a774d6d3b433" ]
[ "tests/core/test_dtypes.py" ]
[ "\"\"\"Tests a variety of python and pandas dtypes, and tests some specific\ncoercion examples.\"\"\"\n# pylint doesn't know about __init__ generated with dataclass\n# pylint:disable=unexpected-keyword-arg,no-value-for-parameter\nimport dataclasses\nimport datetime\nimport inspect\nfrom decimal import Decimal\nfrom...
[ [ "pandas.to_datetime", "pandas.interval_range", "pandas.CategoricalDtype", "pandas.Series", "pandas.Timestamp", "pandas.StringDtype", "pandas.DataFrame", "numpy.dtype", "pandas.PeriodDtype", "pandas.api.types.infer_dtype", "numpy.sctypeDict.items", "pandas.DatetimeTZ...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "0.24", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
sbooker/PyPortfolioOpt
[ "da833a5b8916d827ea2eacdd850051c287422525" ]
[ "tests/test_risk_models.py" ]
[ "import warnings\nimport pandas as pd\nimport numpy as np\nimport pytest\nfrom pypfopt import risk_models, expected_returns\nfrom tests.utilities_for_tests import get_data\n\n\ndef test_sample_cov_dummy():\n data = pd.DataFrame(\n [\n [4.0, 2.0, 0.6],\n [4.2, 2.1, 0.59],\n ...
[ [ "numpy.allclose", "numpy.abs", "numpy.isnan", "pandas.DataFrame", "pandas.testing.assert_frame_equal", "numpy.identity", "numpy.testing.assert_allclose", "numpy.array", "numpy.trace", "numpy.testing.assert_array_almost_equal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
TotoAfreeca/Neural-Network
[ "1a534161b81bf4fb74537af20e2e7e0baf115a5a" ]
[ "Functions.py" ]
[ "#File to maintain all the activation functions and their derivatives\n\nimport numpy as np\n\n\ndef sigmoid_unipolar_function(x):\n pos_mask = (x >= 0)\n neg_mask = (x < 0)\n z = np.zeros_like(x)\n z[pos_mask] = np.exp(-x[pos_mask])\n z[neg_mask] = np.exp(x[neg_mask])\n top = np.ones_like(x)\n ...
[ [ "numpy.ones_like", "numpy.exp", "numpy.zeros_like", "numpy.tanh" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
chenxi-wang/cs420-codes
[ "756b71ea4f4d8c4694c8c3f32ed9d1c6e89fad15" ]
[ "deep_learning_methods/LocNet/train_locnet.py" ]
[ "'''\n MNIST training with LocNet models\n\n Author: Chenxi Wang\n Date: June 2018\n'''\n\nfrom __future__ import print_function\nimport argparse\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport torch_util\nfrom torchvision impor...
[ [ "numpy.fromfile", "torch.nn.Dropout2d", "torch.nn.functional.dropout", "torch.manual_seed", "numpy.concatenate", "torch.nn.functional.mse_loss", "torch.no_grad", "numpy.mean", "torch.cuda.is_available", "torch.device", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AugusHsu/gbart
[ "e2e267eb3846783398d530bf7c4f835a7330e226" ]
[ "build/lib/gbart/modified_bartpy/diagnostics/residuals.py" ]
[ "import statsmodels.api as sm\nfrom matplotlib import pyplot as plt\n\nfrom bartpy.sklearnmodel import SklearnModel\n\n\ndef plot_qq(model: SklearnModel) -> None:\n residuals = model.residuals()\n fig = sm.qqplot(residuals, fit=True, line=\"45\")\n plt.show()\n" ]
[ [ "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Eurofou/privacy
[ "0e3f55999c38ea96754eeddc8babce59a43b85ed" ]
[ "privacy/dp_query/gaussian_query_test.py" ]
[ "# Copyright 2018, The TensorFlow Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable ...
[ [ "tensorflow.constant", "tensorflow.Variable", "tensorflow.assign", "tensorflow.test.main", "tensorflow.placeholder", "tensorflow.global_variables_initializer", "numpy.std" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
ua-snap/jfsp-dash
[ "8e915b7d83eac10a7b30dd91b6f203f859e86cca" ]
[ "application.py" ]
[ "# pylint: disable=C0103,E0401,R0913,C0330,too-many-locals\n\"\"\"\nJFSP app.\n\nSee gui.py for the Dash components and GUI.\nSee luts.py for the lookup tables which drive both the data ingest and GUI.\nSee preprocess.py for the data structure that this code assumes!\n\n\"\"\"\nimport os\nimport math\nimport plotly...
[ [ "pandas.read_pickle", "pandas.to_numeric", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
megvii-research/AnchorDETR
[ "1bd1ce5b86bd09dd20a56ca07534c6f4b694cdcc" ]
[ "compute_speeds.py" ]
[ "# ------------------------------------------------------------------------\n# Copyright (c) 2021 megvii-model. All Rights Reserved.\n# ------------------------------------------------------------------------\n\n# taken from https://gist.github.com/fmassa/c0fbb9fe7bf53b533b5cc241f5c8234c with a few modifications\n\...
[ [ "torch.cuda.synchronize", "numpy.array", "torch.no_grad" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rafaeljordaojardim/covid-analize
[ "a70ca161e24614e0798fb7df50c360839c30e386" ]
[ "robots/posprocessor.py" ]
[ "from saver import Saver\nimport pandas as pd\n\n\nclass Posprocessor():\n\n def __init__(self):\n self.saver = Saver()\n\n self.clean_tweets = pd.DataFrame(list(self.saver.get_collection('cleanTweets'))) #change here the name of database\n self.analy_tweets = pd.DataFrame(list(self.saver.ge...
[ [ "pandas.concat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
k1nk/chainer-char-rnn-tiny
[ "5c23007b4fe09a632f5834bdd715c54d3298c1c5" ]
[ "CharRNN.py" ]
[ "import numpy as np\n#from chainer import Variable, FunctionSet\nfrom chainer import Variable, Chain\nimport chainer.functions as F\nimport chainer.links as L\n\n#class CharRNN(FunctionSet):\nclass CharRNN(Chain):\n\n def __init__(self, n_vocab, n_units):\n super(CharRNN, self).__init__()\n with se...
[ [ "numpy.random.uniform", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
finzeug/yfinance
[ "1297cd10e878c8984de157dfa3cedf2a1694379e" ]
[ "yfinance/ticker.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# yfinance - market data downloader\n# https://github.com/ranaroussi/yfinance\n#\n# Copyright 2017-2019 Ran Aroussi\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 m...
[ [ "pandas.to_datetime", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
dheerajrav/TextAttack
[ "41e747215bb0f01c511af95b16b94704c780cd5a" ]
[ "textattack/models/wrappers/pytorch_model_wrapper.py" ]
[ "\"\"\"\nPyTorch Model Wrapper\n--------------------------\n\"\"\"\n\n\nimport torch\n\nimport textattack\n\nfrom .model_wrapper import ModelWrapper\n\n\nclass PyTorchModelWrapper(ModelWrapper):\n \"\"\"Loads a PyTorch model (`nn.Module`) and tokenizer.\"\"\"\n\n def __init__(self, model, tokenizer, batch_siz...
[ [ "torch.no_grad", "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
FRDHR/BPR_MPR-master
[ "1de305fc14723bbf8f156f948e7c4629e2a94972" ]
[ "scores.py" ]
[ "# @author Runlong Yu, Mingyue Cheng, Weibo Gao\n\nimport heapq\nimport numpy as np\nimport math\n\ndef topK_scores(test, predict, topk, user_count, item_count):\n PrecisionSum = np.zeros(topk+1)\n RecallSum = np.zeros(topk+1)\n F1Sum = np.zeros(topk+1)\n NDCGSum = np.zeros(topk+1)\n OneCallSum = np....
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rasmusbruckner/gaborbandit_analysis
[ "c208be61d44b9e99d9fdc9c1469be1103198ea9a" ]
[ "gb_figure_3.py" ]
[ "\"\"\" Figure 4\n\n 1. Load data prepare for plotting\n 2. Prepare figure\n 3. Plot posterior predictions\n 4. Plot BIC based model comparison\n 5. Plot exceedance-probability based model comparison\n 6. Plot lambda parameter of each participant\n 7. Add subplot labels and save figure\n\"\"\"\...
[ [ "matplotlib.pyplot.Subplot", "matplotlib.pyplot.gca", "matplotlib.gridspec.GridSpecFromSubplotSpec", "numpy.linspace", "numpy.sqrt", "matplotlib.legend_handler.HandlerTuple", "matplotlib.lines.Line2D", "matplotlib.pyplot.show", "matplotlib.pyplot.savefig", "numpy.mean", ...
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
iriscatter/StockExplorer
[ "de89d83fbdae794f1d0c2acea9eef0b993dd41b6", "de89d83fbdae794f1d0c2acea9eef0b993dd41b6" ]
[ "stock_news.py", "stock_twitter.py" ]
[ "\n#=========== pakages/modules that are used here ==============================\n#import from Python standard modules\nimport colored\nfrom colored import stylize\nimport requests\nfrom bs4 import BeautifulSoup\nfrom datetime import datetime, timedelta\nimport pandas as pd\nfrom os import path \nimport statsmodel...
[ [ "matplotlib.pyplot.legend", "matplotlib.dates.DateFormatter", "pandas.to_datetime", "pandas.read_csv", "matplotlib.pyplot.tight_layout", "matplotlib.style.use", "matplotlib.pyplot.subplots", "pandas.DataFrame", "matplotlib.rcParams.update", "matplotlib.pyplot.show", "ma...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1...
zjumml/Revisit-NAR-TTS
[ "45911c37097b4b8f2d9388ce7b5ca53ff0badefb" ]
[ "modules/tts/glow_tts/glow.py" ]
[ "import torch\nimport torch.distributions as dist\nfrom torch import nn\nfrom ...commons.normalizing_flow.glow_modules import Glow\nfrom ..fs import FastSpeech\n\n\nclass GlowTTS(FastSpeech):\n def __init__(self, dict_size, hparams, out_dims=None, n_blocks_dec=12,\n kernel_size_dec=5, dilation_ra...
[ [ "torch.randn_like", "torch.nn.Linear", "torch.distributions.Normal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dendisuhubdy/adversarial-attack-on-GMM-i-vector-based-speaker-verification-systems
[ "0aa9c0fc9bb224acc508d07cf76f5f14a01fd06c" ]
[ "x-vector-mfcc/local/preprocess/logpowerspec.py" ]
[ "import numpy as np\nimport librosa\nfrom local.preprocess.generic import stft, load_wav, preemphasis, load_wav_snf\n\n# def logpowspec(wav_path, sr=16000, n_fft=512, hop_length=160, win_length=400, window=\"hann\", pre_emphasis=None, a_min=1e-30):\n# \"\"\"Compute log power magnitude spectra (logspec).\n# ...
[ [ "numpy.square", "numpy.log10", "numpy.abs" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Cold2Point/PyTorch-Tutorial
[ "ee79453f2e9494b54ca2ad74c80fbac9689a4d46" ]
[ "tutorial-contents/402_RNN_classifier.py" ]
[ "\"\"\"\nView more, visit my tutorial page: https://morvanzhou.github.io/tutorials/\nMy Youtube Channel: https://www.youtube.com/user/MorvanZhou\n\nDependencies:\ntorch: 0.4\nmatplotlib\ntorchvision\n\"\"\"\nimport torch\nfrom torch import nn\nimport torchvision.datasets as dsets\nimport torchvision.transforms as t...
[ [ "torch.nn.CrossEntropyLoss", "torch.max", "matplotlib.pyplot.title", "torch.nn.LSTM", "torch.utils.data.DataLoader", "torch.nn.Linear", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
abdoulayegk/deep-learning-demo
[ "68b9ad6963e07ac2cb9b94b0282f034542a5eecb" ]
[ "boston_regression.py" ]
[ "from pandas.core.algorithms import mode\nimport tensorflow as tf\nfrom tensorflow import keras\nimport tensorflow\nfrom tensorflow.keras import optimizers\nfrom tensorflow.keras.layers import Dense\nfrom tensorflow.keras import Sequential\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\n...
[ [ "tensorflow.keras.optimizers.RMSprop", "pandas.read_csv", "tensorflow.keras.layers.Dense", "sklearn.model_selection.train_test_split" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.6", "2.4", "2.3", "2.5", "2.2" ] } ]
ALhasanZGhaibe/data-mining-msc-geik-miskolc
[ "1d78a6b56ab5d967f97a13179683d7ac1a97ba82", "1d78a6b56ab5d967f97a13179683d7ac1a97ba82" ]
[ "Week_06/Week_6_Task_2.py", "week_05/exercise1.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# We are flipping coin until it turns to its head. If it happens for the n-th time of flipping, the\n# player gains 2n dollars. Simulate m games (that is we are playing until flipping m heads).\n# What will be the average gain if m=100, m=10000 and m=1000000? \n\n# In[36]:...
[ [ "numpy.std", "matplotlib.pyplot.show", "numpy.mean", "numpy.random.normal" ], [ "numpy.put", "numpy.zeros", "numpy.zeros_like", "numpy.unique" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
JavaiMaster/mindmeld
[ "f8f88af413f07183dc6e40b5c4fac9562feecb57" ]
[ "mindmeld/models/nn_utils/sequence_classification.py" ]
[ "# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.\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# http://www.apache.org/lic...
[ [ "torch.nn.Dropout", "torch.nn.functional.softmax", "torch.nn.CrossEntropyLoss", "torch.cat", "torch.nn.Linear", "torch.nn.BCEWithLogitsLoss", "torch.as_tensor", "torch.nn.functional.sigmoid", "torch.no_grad", "torch.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
natelaferney/BlockCompSense
[ "fc3263eb64af3181b2b126c7b5d62dcfb14a9163" ]
[ "compressimage.py" ]
[ "import numpy as np\n\n#This will be the file that has to do with the compression\n\n\n\n#This function takes our array and a given blocksize \n#and takes a block of a given image\n#and reshapes it into a single dimension array.\n#It does this for all blocks\n\n\n#We divide the image up into blocks\n#then do the re...
[ [ "numpy.random.randn", "numpy.linalg.svd", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
phani1995/linear_regression
[ "670f6f6ce493965a9c070092fcce9a6b6b7b8e5d" ]
[ "src/linear_regression_using_tensorflow.py" ]
[ "# -*- coding: utf-8 -*-\r\n\r\n#-------------------------------------- DATA PREPROCESSING ---------------------------------#\r\n\r\n# Imports\r\nimport numpy as np\r\nimport pandas as pd\r\nimport matplotlib.pyplot as plt\r\nimport tensorflow as tf\r\n\r\n# Reading the dataset from data\r\ndataset = pd.read_csv(r'...
[ [ "tensorflow.matmul", "pandas.read_csv", "matplotlib.pyplot.title", "matplotlib.pyplot.scatter", "numpy.reshape", "tensorflow.placeholder", "tensorflow.ones", "matplotlib.pyplot.plot", "tensorflow.global_variables_initializer", "tensorflow.train.GradientDescentOptimizer", ...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [ "1.10" ] } ]
rajnivp/algo-trade
[ "c51823d38f4db65f60f3ac64c35b76267b12ad9f" ]
[ "indicators.py" ]
[ "import numpy as np\nimport pandas as pd\n\n\"\"\"\nUsage : \n data = {\n \"data\": {\n \"candles\": [\n [\"05-09-2013\", 5553.75, 5625.75, 5552.700195, 5592.950195, 274900],\n [\"06-09-2013\", 5617.450195, 5688.600098, 5566.149902, 5680.399902, 253000],\n ...
[ [ "numpy.logical_not", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ketch/pyclaw
[ "15ad4fb972e7540bde1670f7d924ae16e590237d" ]
[ "src/pyclaw/controller.py" ]
[ "#!/usr/bin/env python\n# encoding: utf-8\nr\"\"\"\nController for basic computation and plotting setup\n\nThis module defines the Pyclaw controller class. It can be used to perform\nsimulations similar to previous versions of clawpack, i.e. with outstyle and\noutput time specification. It also can be used to set...
[ [ "numpy.linspace", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
DeMarcoLab/correlateim
[ "6cd2b715b13520a7fb249970b320d822f25d9b3b" ]
[ "tests/test_cpselect.py" ]
[ "import numpy as np\nimport pytest\n\nfrom correlateim import cpselect\n\n\n@pytest.fixture\ndef window(qtbot):\n \"\"\"Pass the application to the test functions via a pytest fixture.\"\"\"\n image_1 = np.random.random((500, 500))\n image_2 = np.random.random((500, 500))\n app, window = cpselect.create...
[ [ "numpy.random.random" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Vulfenstein/Photomosaic
[ "cdfeae5ee82cc01114494242b3847cc3a37c5aa9" ]
[ "mosaic/getAverageRGB.py" ]
[ "import numpy as np\n# Return the average color value as (r,g,b) for each input image #\n \ndef getAverageRGB(image):\n\n # get each tile image as a numpy array #\n im = np.array(image)\n\n # get shape of each input image #\n w,h,d = im.shape\n\n # get average RGB value #\n return tuple(np.aver...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AAlben/img_retrieval_child_books
[ "7618308e294c1e94552b8e0edbbe0ed65fc154ae" ]
[ "rpc/utils/scda.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport queue\nimport torch\nfrom typing import Dict\n\n\nclass SCDA(object):\n \"\"\"\n Selective Convolutional Descriptor Aggregation for Fine-Grained Image Retrieval.\n c.f. http://www.weixiushen.com/publication/tip17SCDA.pdf\n \"\"\"\n default_hyper_params = dict()\n\n ...
[ [ "torch.cat", "torch.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
davitbzh/petastorm
[ "cfb41519087dac9a50e62ea7fc1cbd4ef4a99094" ]
[ "petastorm/arrow_reader_worker.py" ]
[ "# Copyright (c) 2017-2018 Uber Technologies, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app...
[ [ "numpy.arange", "pandas.merge" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
BumpierZulu9930/py-noisemaker
[ "d67f03c9f42642dd7eb5b9fc0f79572dc0d3b1a9" ]
[ "noisemaker/scripts/artmaker.py" ]
[ "import json\n\nimport click\nimport tensorflow as tf\n\nfrom noisemaker.util import save\n\nimport noisemaker.cli as cli\nimport noisemaker.generators as generators\nimport noisemaker.presets as presets\nimport noisemaker.recipes as recipes\n\n\n@click.command(help=\"\"\"\n Artmaker - Presets for Noisemaker...
[ [ "tensorflow.compat.v1.Session" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
al3xl0g0/model-leaf_HU
[ "b360599a318b14168b57708f4820cd2729d3688f" ]
[ "DepthToCloud.py" ]
[ "import numpy as np\n\n\ndef depthToCloud(RGB, depth, topleft):\n if (topleft < 2):\n topleft = np.array([1, 1])\n\n # Convert RGB to double and set 0 to nan\n RGB = RGB.astype(np.double)\n RGB[RGB == 0] = np.nan\n\n # Convert depth to double and set 0 to nan\n depth = depth.astype(np.doubl...
[ [ "numpy.true_divide", "numpy.multiply", "numpy.power", "numpy.arange", "numpy.ones", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ziggurat29/PySimSP0256AL2-001
[ "4875a33e97628d553409edff25898aa62c174a7c" ]
[ "pysimsp0256al2-001.py" ]
[ "#=========================================================================\n#this script was created to test some SP-0256 related functionality.\n#In particular: \n#Q: can a reasonable approximation be made simply by appending\n#pre-recorded phonemes?\n# A: it is a little klunky, but it seems intelligible.\n#Q...
[ [ "numpy.append", "scipy.io.wavfile.write", "numpy.empty", "numpy.clip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.7", "1.0", "0.10", "1.2", "0.14", "0.19", "1.5", "0.12", "0.17", "0.13", "1.6", "1.4", "1.9", "1.3", "1.10", "0.15", "0.18", "0.16"...
ihooni/XOR-Mixup
[ "b61df2cd8e05f079bf568fd07d8d02fa4427280b" ]
[ "linearMixup_main.py" ]
[ "import tensorflow as tf\r\nfrom tensorflow import keras\r\nimport numpy as np\r\nimport pandas as pd\r\nfrom arguments import Args\r\nfrom sklearn.manifold import MDS\r\nfrom sklearn.metrics import euclidean_distances\r\n# -*- coding: utf-8 -*-\r\n\r\nimport cv2\r\nimport matplotlib.pyplot as plt\r\nfrom utils imp...
[ [ "tensorflow.keras.models.load_model", "tensorflow.keras.layers.Dense", "numpy.arange", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.datasets.mnist.load_data", "numpy.ones", "tensorflow.keras.layers.MaxPooling2D", "numpy.argmax", "numpy.shape", "numpy.array", "num...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.6", "2.4", "2.3", "2.5", "2.2" ] } ]
xiongzhiyao/pytorch-segmentation
[ "a13b1aa1b316d06f050deef29d5be8b6e99460e7" ]
[ "src/losses/multi/ohem_loss.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\n\n\n# Adapted from OCNet Repository (https://github.com/PkuRainBow/OCNet)\nclass OhemCrossEntropy2d(nn.Module):\n def __init__(self, thresh=0.6, min_kept=0, weight=None, ignore_index=255):\n super().__init__()\n ...
[ [ "torch.nn.CrossEntropyLoss", "numpy.where", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
bamtercelboo/cnn-lstm-bilstm-deepcnn-cnnlstm
[ "71b8c3f21b6dbc39562a3f8f221e90a1c7d9592f", "71b8c3f21b6dbc39562a3f8f221e90a1c7d9592f" ]
[ "models/model_BiGRU.py", "models/model_HighWay_BiLSTM_1.py" ]
[ "# @Author : bamtercelboo\n# @Datetime : 2018/07/19 22:35\n# @File : model_BiGRU.py\n# @Last Modify Time : 2018/07/19 22:35\n# @Contact : bamtercelboo@{gmail.com, 163.com}\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nimport numpy as np\nimport random\...
[ [ "torch.nn.Dropout", "torch.transpose", "torch.manual_seed", "torch.nn.GRU", "torch.nn.Embedding", "torch.nn.Linear", "torch.nn.functional.tanh" ], [ "torch.nn.Dropout", "torch.transpose", "torch.add", "numpy.sqrt", "torch.nn.LSTM", "torch.manual_seed", "...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lewfish/mlx
[ "027decf72bf9d96de3b4de13dcac7b352b07fd63" ]
[ "mlx/od/centernet/model.py" ]
[ "import math\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torchvision import models\n\nfrom mlx.od.centernet.decoder import decode\nfrom mlx.od.centernet.encoder import encode\nfrom mlx.od.centernet.loss import loss\nfrom mlx.od.centernet.utils import get_positions, prob2logit\n\ncl...
[ [ "torch.nn.ConvTranspose2d", "torch.nn.Conv2d", "torch.nn.functional.relu", "torch.rand", "torch.nn.functional.interpolate", "torch.nn.BatchNorm2d", "torch.flip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tobadavid/CUPyDO
[ "ad4712d5bd84c964f49ea0c05d6e5ad4fb1e9e88" ]
[ "cupydo/manager.py" ]
[ "#!/usr/bin/env python\n# -*- coding: latin-1; -*-\n\n''' \n\nCopyright 2018 University of Liège\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICEN...
[ [ "numpy.set_printoptions", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zhou0123/JDE_F_ATTACK
[ "0b784f156da20f765af872528152f8124025bfc7" ]
[ "track.py" ]
[ "import os\r\nimport os.path as osp\r\nimport cv2\r\nimport logging\r\nimport argparse\r\nimport motmetrics as mm\r\nfrom tracker.basetrack import BaseTrack, TrackState\r\nimport numpy as np\r\nimport torch\r\n\r\nfrom tracker.multitracker import JDETracker\r\nfrom utils import visualization as vis\r\nfrom utils.lo...
[ [ "torch.load", "numpy.isnan", "torch.from_numpy", "torch.cuda.empty_cache", "numpy.concatenate", "scipy.optimize.linear_sum_assignment", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.6", "1.4", "0.19", "1.5", "0.18", "1.2", "1.7", "1.0", "0.17", "1.3", "1.8" ], "tensorflow": [] } ]
mehdimunim/Evolution-of-parasitic-viral-strains
[ "dea9890093506d6946276a1c2f1814e8693f92a1" ]
[ "simulation.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\n# Simulations for the evolution of parasitic viral strains\n# Author: Mehdi Munim\n\n# System to be visualized numerically\n# Inspired from \"The Equations of Life\" (M. Nowak)\n# S is the host susceptible population\n# I1, I2 are the strain 1 or strain 2 infe...
[ [ "numpy.arange", "matplotlib.pyplot.show", "numpy.zeros", "matplotlib.pyplot.subplots" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
biocore/heatsequer
[ "8325d9cbc0d2361182e7549d3f7a0de0bfbb8faf" ]
[ "calour/heatmap/plotgui.py" ]
[ "# ----------------------------------------------------------------------------\n# Copyright (c) 2016--, Calour development team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed with this software.\n# ------------------------------------...
[ [ "numpy.arange", "matplotlib.gridspec.GridSpec", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Leonardo767/Abmarl
[ "9fada5447b09174c6a70b6032b4a8d08b66c4589", "9fada5447b09174c6a70b6032b4a8d08b66c4589" ]
[ "abmarl/sim/components/examples/bird_fighting.py", "abmarl/sim/components/examples/observing_agent_example.py" ]
[ "from matplotlib import pyplot as plt\nimport numpy as np\n\nfrom abmarl.sim.components.state import ContinuousPositionState, SpeedAngleState, LifeState\nfrom abmarl.sim.components.actor import SpeedAngleMovementActor, AttackActor\nfrom abmarl.sim.components.observer import SpeedObserver, AngleObserver, PositionObs...
[ [ "numpy.arange", "matplotlib.pyplot.plot", "numpy.zeros", "matplotlib.pyplot.pause", "matplotlib.pyplot.figure" ], [ "numpy.arange", "matplotlib.pyplot.gcf", "matplotlib.pyplot.plot", "numpy.array", "matplotlib.pyplot.show", "matplotlib.pyplot.pause" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sakshikakde/sfm_dl
[ "d39d7068e23fe44394a3d5694bba074f2f05edaf" ]
[ "test_kitti_depth.py" ]
[ "from __future__ import division\nimport tensorflow as tf\nimport numpy as np\nimport os\nimport scipy.misc\nimport PIL.Image as pil\nfrom SfMLearner import SfMLearner\n\nflags = tf.app.flags\nflags.DEFINE_integer(\"batch_size\", 4, \"The size of of a sample batch\")\nflags.DEFINE_integer(\"img_height\", 128, \"Ima...
[ [ "numpy.save", "tensorflow.model_variables", "tensorflow.ConfigProto", "tensorflow.Session", "numpy.zeros", "tensorflow.app.run" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
seermedical/seer-py
[ "1190f9c93e46bc42ae0344b1630290808991efcb" ]
[ "seerpy/seerpy.py" ]
[ "\"\"\"\nDefine a client class for interacting with the GraphQL API endpoint.\n\nCopyright 2017 Seer Medical Pty Ltd, Inc. or its affiliates. All Rights Reserved.\n\nConcepts\n--------\n- study: A defined period of time monitoring a patient, typically with EEG-ECG-video. A patient may\n have multiple studies, an...
[ [ "pandas.concat", "pandas.to_datetime", "pandas.DataFrame", "pandas.to_timedelta", "pandas.io.json.json_normalize" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "0.19", "0.24", "0.20", "0.25" ], "scipy": [], "tensorflow": [] } ]
wkostuch/TensorNetwork
[ "bb91c8a9bd84679349226b5d4e1bdb0c31329cdf" ]
[ "tensornetwork/network_components.py" ]
[ "# Copyright 2019 The TensorNetwork Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable...
[ [ "numpy.arange", "numpy.dtype", "numpy.mean", "numpy.prod", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dr1315/Collocation_v2
[ "b0fceedb4e5dcdd3900e56854435dea48a132642" ]
[ "Tools/postprocessor.py" ]
[ "import os\r\nimport sys\r\nimport numpy as np\r\nimport pandas as pd\r\nimport matplotlib.pyplot as plt\r\nfrom mpl_toolkits.axes_grid1 import make_axes_locatable\r\nimport cartopy.crs as ccrs\r\nimport cartopy.feature as feature\r\nimport matplotlib.colors as colors\r\nsys.path.append(\"/g/data/k10/dr1709/code/Pe...
[ [ "matplotlib.colors.BoundaryNorm", "numpy.abs", "matplotlib.pyplot.clim", "matplotlib.pyplot.get_cmap", "matplotlib.pyplot.savefig", "numpy.full", "matplotlib.pyplot.colorbar", "matplotlib.colors.ListedColormap", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tarzanchemgio/ImageProcessing
[ "eb4704b66ca9b16c85013fd12eee7c2523393d3a" ]
[ "Overlay.py" ]
[ "import matplotlib.pyplot as plt\nfrom common import *\n\n\ndef overlay(back_img_1Darr, front_img_1Darr):\n output = np.copy(back_img_1Darr)\n for i in range(len(back_img_1Darr)):\n output[i] = back_img_1Darr[i] + front_img_1Darr[i]\n return output\n\n\ndef main():\n img = imageToGrayScaleArray('...
[ [ "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
iliiliiliili/KittiViewer-plus
[ "c40b5c2b6804adad6929e58f0ee201bb6a4d1fbb" ]
[ "glwidget.py" ]
[ "from enum import Enum\n\nimport numpy as np\nfrom pyqtgraph.Vector import Vector\nimport pyqtgraph.opengl as gl\nfrom PyQt5 import QtCore, QtGui\nfrom PyQt5.QtCore import QTimer, pyqtSignal, pyqtSlot\nfrom PyQt5.QtGui import QIcon, QMouseEvent, QPainter\nfrom PyQt5.QtWidgets import (QApplication, QCheckBox, QCombo...
[ [ "numpy.linspace", "numpy.linalg.inv", "numpy.arange", "numpy.linalg.norm", "numpy.cos", "numpy.sin", "numpy.arctan2", "numpy.stack", "numpy.concatenate", "numpy.tan", "numpy.full", "numpy.prod", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
TaskManager91/FaceRecognitionBasedAnonymization
[ "f4ad27c6069d4715991329ca5b9e350fb9d4f177" ]
[ "99-oldParser.py" ]
[ "import numpy as np\nimport cv2 \nimport glob\nimport sys\n\n# Get the target person\nif(len(sys.argv) == 2):\n name = sys.argv[1]\nelse:\n print(\"no target person specified! taking Chris\")\n name= 'Chris'\n\npaths = glob.glob('Data/' + name + '/*.jpg')\npaths += glob.glob('Data/' + name + '/*.png')\n\np...
[ [ "numpy.savetxt", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Mteee/examples
[ "6e2a6b72d48740e9d37e861b45ca15f6a4e11ed2", "6e2a6b72d48740e9d37e861b45ca15f6a4e11ed2" ]
[ "tensorflow_examples/models/pix2pix/data_download.py", "lite/examples/image_classification/raspberry_pi/classify_picamera.py" ]
[ "# Copyright 2019 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.keras.utils.get_file", "tensorflow.__version__.startswith" ], [ "numpy.argpartition" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
arita37/dl-pytorch
[ "fa849ae9fbb4df777a1c2327f3aa8a9da244a8ed" ]
[ "pyt_mnist_dnn.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\npyt_mnist_dnn.py: multiclass classification of MNIST digits dataset using a Pytorch ANN\n\n@author: Manish Bhobe\nMy experiments with Python, Machine Learning & Deep Learning.\nThis code is meant for education purposes only & is not intended for commercial/production use!\nUse at y...
[ [ "torch.nn.Dropout", "torch.nn.CrossEntropyLoss", "torch.cuda.manual_seed", "numpy.random.seed", "torch.nn.functional.dropout", "torch.manual_seed", "numpy.set_printoptions", "torch.utils.data.DataLoader", "matplotlib.pyplot.subplots", "torch.utils.data.random_split", "n...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
1Amar/Text-Analysis-AI-Documents
[ "bdf0d650659631de5b3c94363fef8dac84a82e95" ]
[ "text_analysis.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n\n\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport nltk\nimport re\nfrom nltk.tokenize import sent_tokenize\nnltk.download('punkt')\nimport os\nimport bs4\nimport requests\nfrom bs4 import BeautifulSoup...
[ [ "pandas.read_excel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
guinslym/python_earth_science_book
[ "f4dd0115dbbce140c6713989f630a71238daa72c", "f4dd0115dbbce140c6713989f630a71238daa72c", "f4dd0115dbbce140c6713989f630a71238daa72c" ]
[ "code/chapter_04/listing_04_09.py", "code/chapter_05/listing_05_08.py", "code/chapter_04/listing_04_10.py" ]
[ "import pandas as pd\nimport matplotlib.pyplot as plt\n\nmyDataset1 = pd.read_excel('Smith_glass_post_NYT_data.xlsx', sheet_name='Supp_traces')\n\nx = myDataset1.Zr\ny = myDataset1.Th\n\n\nloc_parameters = ['upper right'\t, 'upper left', 'lower left', 'lower right','center'\t,'center left']\n\nfig = plt.figure(figs...
[ [ "pandas.read_excel", "matplotlib.pyplot.figure" ], [ "scipy.stats.skew", "numpy.histogram" ], [ "pandas.read_excel", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "nump...
henrique/keras
[ "b693bb84200d70aa736f2491ff83509fd1b1b6fb", "b693bb84200d70aa736f2491ff83509fd1b1b6fb" ]
[ "keras/layers/convolutional.py", "keras/engine/keras_tensor.py" ]
[ "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.compat.v2.executing_eagerly", "tensorflow.compat.v2.nn.bias_add", "tensorflow.python.util.tf_export.keras_export", "tensorflow.compat.v2.shape", "tensorflow.compat.v2.stack", "tensorflow.compat.v2.reshape", "tensorflow.compat.v2.expand_dims", "tensorflow.compat.v2.squee...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
quolc/keras-OpenSlideGenerator
[ "27479f3568ffe239f57192bef70b2ee65c2444f2" ]
[ "openslide_generator.py" ]
[ "import random\nimport math\nimport os\nimport copy\n\nimport numpy as np\nimport cv2\nimport tripy\nimport pyclipper\nfrom openslide import OpenSlide\n\nfrom skimage.color import rgb2hed, hed2rgb\n\nimport keras\n\n\nclass SimpleOpenSlideGenerator(object):\n\n def __init__(self, color_matching=None):\n s...
[ [ "numpy.diag", "numpy.clip", "numpy.asarray", "numpy.linalg.inv", "numpy.eye", "numpy.ones", "numpy.linalg.eigh", "numpy.linalg.cholesky", "numpy.average" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cmougan/ExplanationShift
[ "abc48f9a9dc38a77b40695827745524d05943eec" ]
[ "ATC_code.py" ]
[ "import numpy as np\n\n\ndef find_threshold_balance(score, labels):\n sorted_idx = np.argsort(score)\n\n sorted_score = score[sorted_idx]\n sorted_labels = labels[sorted_idx]\n\n fp = np.sum(labels == 0)\n fn = 0.0\n\n min_fp_fn = np.abs(fp - fn)\n thres = 0.0\n min_fp = fp\n min_fn = fn\...
[ [ "numpy.log", "numpy.abs", "numpy.max", "numpy.argmax", "numpy.mean", "numpy.argsort", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Linfang-He/GATNE-dgl
[ "5746a600f3c51d475c05e19b6c91177a9986eddb" ]
[ "src/main_pytorch.py" ]
[ "import math\nimport os\nimport sys\nimport time\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport tqdm\nfrom numpy import random\nfrom torch.nn.parameter import Parameter\nimport dgl\nimport dgl.function as fn\n\nfrom utils import *\n\n\ndef get_graphs(layers, inde...
[ [ "torch.nn.functional.normalize", "torch.cat", "numpy.random.choice", "torch.sum", "torch.neg", "numpy.random.shuffle", "torch.tensor", "torch.multinomial", "torch.matmul", "torch.mul", "numpy.mean", "torch.FloatTensor", "torch.cuda.is_available", "torch.stac...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SilverKnightVGM/adversarial-robustness-toolbox
[ "9c37bed005cfe09f04dfed40c0886724b083b975" ]
[ "my_scripts/grad/gradcam.py" ]
[ "from keras.applications.resnet50 import ResNet50\nfrom keras.applications.resnet50 import preprocess_input, decode_predictions\n\nfrom keras.preprocessing import image\nimport keras.backend as K\n\nimport numpy as np\nimport cv2\n\n\ndef load_image(path, target_size=(224, 224)):\n x = image.load_img(path, targe...
[ [ "numpy.expand_dims", "numpy.maximum", "numpy.uint8", "numpy.mean", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
balajimt/loss-surface-simplexes
[ "0f55807ae16d6dbc8e41ec6ae59cc74884574cc0" ]
[ "simplex/utils.py" ]
[ "import torch\nimport numpy as np\nfrom torch import nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\n\ndef unflatten_like(vector, likeTensorList):\n # Takes a flat torch.tensor and unflattens it to a list of torch.tensors\n # shaped like likeTensorList\n outList = []\n i = 0...
[ [ "torch.no_grad", "torch.cat", "torch.cuda.empty_cache", "torch.autograd.Variable" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ctoto93/TD3
[ "88482b9f1fb4441d74426ece60d5da13414aeb77" ]
[ "TD3.py" ]
[ "import copy\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\n# Implementation of Twin Delayed Deep Deterministic Policy Gradients (TD3)\n# Paper: https://arxiv.org/abs/1802.09477\n\n\nclass Ac...
[ [ "torch.randn_like", "torch.cat", "torch.load", "torch.min", "torch.nn.Linear", "torch.nn.functional.mse_loss", "torch.no_grad", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
maxcurie1996/SLiM
[ "bdb480f7e73ce9d9b3ff58e4b0245c514e2c64ed", "bdb480f7e73ce9d9b3ff58e4b0245c514e2c64ed" ]
[ "Tools/DispersionRelationDeterminantFullConductivityZeff.py", "SLiM_NN/Benchmark/PRL/PRL_fig_2_ab.py" ]
[ "import numpy as np \n\ndef A_maker(x_max, del_x,w1, v1,Zeff,eta,\\\n alpha,beta,ky,ModIndex,mu,xstar):\n mref=2.\n tau=+1.0\n w_hat = w1/v1\n x_min = -x_max\n x_TEMP=1./del_x**2.\n\n x_grid = np.arange(x_min, x_max+del_x, del_x)\n num = len(x_grid)\n # print(num)\n # initializing matr...
[ [ "numpy.imag", "numpy.sqrt", "numpy.exp", "numpy.arange", "numpy.linalg.slogdet", "numpy.matmul", "numpy.real", "numpy.argmax", "numpy.zeros", "numpy.multiply", "numpy.linalg.inv", "numpy.identity", "numpy.argsort", "numpy.array", "numpy.flip", "numpy...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ByungHeeCha/visual_localization
[ "787fb8f6ee5c6e69ece9e83a016d15596e5524bc" ]
[ "dirtorch/extract_features.py" ]
[ "import sys\nimport os\nimport os.path as osp\nimport pdb\n\nimport json\nimport tqdm\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\n\nfrom dirtorch.utils.convenient import mkdir\nfrom dirtorch.utils import common\nfrom dirtorch.utils.common import tonumpy, matmul, pool\nfrom dirtorch.utils.pyt...
[ [ "numpy.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
perschi/Neural-Gas-VAE
[ "cbe23f324b9979a5af36c23f062b122a946a8196" ]
[ "e01_neural_gas_parameter_cifar.py" ]
[ "if __name__ == '__main__':\n import argparse\n\n parser = argparse.ArgumentParser(description=\"Start the grid training on CIFAR\")\n parser.add_argument(\n \"--num_parts\",\n nargs=\"?\",\n type=int,\n default=1,\n help=\"Determines in how many parts the hyperparamters...
[ [ "torch.nn.Conv2d", "torch.nn.MSELoss" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sakuyan74/senpo-kaiseki
[ "7be01167c62d92b282b0ba2bfdc2bb54a672c807" ]
[ "senpo_kaiseki/ocr/senpo_analyzer.py" ]
[ "# read_image.py\nimport os\nfrom PIL import Image, ImageOps\nimport numpy as np\nfrom senpo_kaiseki.ocr.google_ocr_application_ext import GoogleOCRApplicationExt\nfrom google_drive_ocr.application import Status\n\nDEFAULT_WIDTH = 1280\nDEFAULT_HEIGHT = 720\nDEFAULT_PC_WIDTH = 1282\nDEFAULT_PC_HEIGHT = 752\nHEADER_...
[ [ "numpy.uint8", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
MeetElise/apex
[ "0ac3dff8a60d89d3dcaf24de1d2ab477bb13fd08" ]
[ "apex/contrib/multihead_attn/self_multihead_attn.py" ]
[ "import torch\nfrom torch import nn\nfrom torch.nn import Parameter\nimport torch.nn.functional as F\n\nfrom .self_multihead_attn_func import self_attn_func\nfrom .fast_self_multihead_attn_func import fast_self_attn_func\nfrom .fast_self_multihead_attn_norm_add_func import fast_self_attn_norm...
[ [ "torch._C._jit_set_profiling_executor", "torch.Tensor", "torch.nn.functional.dropout", "torch.nn.init.constant_", "torch._C._jit_set_profiling_mode", "torch.nn.init.ones_", "torch.nn.init.xavier_uniform_", "torch.nn.init.zeros_" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mbaddar1/normalizing-flows
[ "d1409464a65234354b29ed9ea0ede2d12100440c", "d1409464a65234354b29ed9ea0ede2d12100440c" ]
[ "normflow/vae.py", "normflow/simple_flow_model.py" ]
[ "from __future__ import print_function\r\nimport torch\r\nimport torch.utils.data\r\nfrom torch import nn, optim\r\nfrom torch.distributions.normal import Normal\r\nfrom torch.nn import functional as F\r\nfrom torchvision import datasets, transforms\r\nfrom tqdm import tqdm\r\nimport argparse\r\nfrom datetime impor...
[ [ "torch.randn_like", "torch.sigmoid", "pandas.Series", "torch.manual_seed", "torch.exp", "torch.nn.Linear", "torch.no_grad", "torch.cuda.is_available", "torch.device", "torch.distributions.normal.Normal", "torch.nn.ReLU" ], [ "torch.nn.ModuleList" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "nump...
czgdp1807/pTrustIntervalsOOD
[ "6058394e427cbae30c2c05956ec09d1214e8efed" ]
[ "C3.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Cell 1\nimport tensorflow as tf, tensorflow_datasets as tfds, numpy as np\nimport matplotlib.pyplot as plt\nimport math\nfrom datetime import datetime\nimport time, pickle\n\n# Cell\nclass StandardDeviationInit(tf.keras.initializers.Initializer):\n\n def __init__(self, minval=0, max...
[ [ "tensorflow.convert_to_tensor", "tensorflow.math.add", "numpy.asarray", "numpy.squeeze", "tensorflow.cast", "numpy.mean", "tensorflow.math.softplus", "numpy.std", "numpy.load", "tensorflow.argmax", "tensorflow.keras.layers.Add", "tensorflow.keras.layers.Flatten", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Jewellll/Rumor_RvNN
[ "939831b6338ab48ec1754bc915512f1de07b5486" ]
[ "model/TD_RvNN.py" ]
[ "__doc__ = \"\"\"Tree GRU aka Recursive Neural Networks.\"\"\"\r\n\r\nimport numpy as np\r\nimport theano\r\nfrom theano import tensor as T\r\n#from collections import OrderedDict\r\nfrom theano.compat.python2x import OrderedDict\r\nfrom theano.tensor.signal.pool import pool_2d\r\n\r\n\r\ntheano.config.floatX = 'fl...
[ [ "numpy.random.normal", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Alpha-Doradus/vedar-air-camboard
[ "79c42b2d04048abbc1bcb2cdf808363dbfd64a7f" ]
[ "aircamboard.py" ]
[ "import numpy as np\nimport cv2\nfrom collections import deque\n\n# Define the upper and lower boundaries for a color to be considered \"Blue\".\nblueLower = np.array([100, 60, 60])\nblueUpper = np.array([140, 255, 255])\n# Define a 5x5 kernel for erosion and dilation.\nkernel = np.ones((5, 5), np.uint8)\n# Setup d...
[ [ "numpy.array", "numpy.zeros", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
FineArtz/ILSwiss
[ "08e21b9563cf904d28d3d6e51ce5c28372d493ad", "08e21b9563cf904d28d3d6e51ce5c28372d493ad" ]
[ "rlkit/data_management/mil_utils.py", "rlkit/policies/argmax.py" ]
[ "\"\"\" General utiliy functions \"\"\"\nimport logging\n\ntry:\n import cPickle as pickle\nexcept:\n import pickle\nimport gzip\nimport contextlib\nimport numpy as np\nimport scipy.ndimage as sp_ndimage\nimport os\nimport errno\nimport time\nimport traceback as tb\n\nfrom rlkit.data_management.mil_color_prin...
[ [ "numpy.var", "numpy.sqrt", "numpy.random.randn", "scipy.ndimage.filters.gaussian_filter" ], [ "numpy.expand_dims" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "0.15", "1.4", "0.16", "1.0", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "0.10", "0.17", "1.3" ], "tensorflow": [...
thadler/text_similarities
[ "e7927abab08fa6accf9c64258aa324a9a5dcde0c" ]
[ "similarity_ideas.py" ]
[ "# imports\nimport sys\nimport numpy as np\nimport tensorflow as tf\nimport tensorflow_hub as hub\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.decomposition import TruncatedSVD\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.metrics import pairwise_distances\nfrom nltk.tokenize im...
[ [ "sklearn.decomposition.TruncatedSVD", "sklearn.metrics.pairwise_distances", "numpy.min", "sklearn.pipeline.Pipeline", "numpy.linalg.norm", "numpy.max", "tensorflow.global_variables_initializer", "tensorflow.Session", "numpy.savetxt", "tensorflow.tables_initializer", "sk...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "1.0", "1.2" ] } ]
johannesmik/neurons
[ "a6e6de02bce8ff83f96a9c111cfeddc045e67094" ]
[ "neurons/spiking.py" ]
[ "#/usr/bin/python3\n__author__ = 'johannes'\n\nimport numpy as np\nimport functools\n\nclass SRM:\n \"\"\" SRM_0 (Spike Response Model) \"\"\"\n def __init__(self, neurons, threshold, t_current, t_membrane, eta_reset, simulation_window_size=100, verbose=False):\n \"\"\"\n Neurons can have differ...
[ [ "numpy.dot", "numpy.ones", "numpy.argmax", "numpy.where", "numpy.exp", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
supersyz/Mathematical-modeling-of-Huawei-cup
[ "c3612e7702a358515c5a3b846b451366b428199f" ]
[ "code/Q1.py" ]
[ "# 问题一:处理检验数据\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndef read_xlsx(path):\n df=pd.read_excel(path,sheet_name='Sheet1',header=0)\n return df\n\ndef read_csv(path):\n res = pd.read_csv(path,delimiter=',')\n return res\n\ndef Bessel(v):\n sum=np.sum(v**2)\n retur...
[ [ "matplotlib.pyplot.legend", "pandas.read_excel", "pandas.read_csv", "numpy.abs", "numpy.mean", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.show", "numpy.where", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
ChangSeonKim/5G_UWC_project
[ "0504a1b1ed30787f30e18a178897978de55660ef" ]
[ "fileForRepair/src/parking.py" ]
[ "#! /usr/bin/env python3\n\nimport rospy\nfrom geometry_msgs.msg import Twist\nfrom sensor_msgs.msg import LaserScan\nimport numpy as np\nimport math\nfrom std_msgs.msg import String\n\ndef callback(data): \n laser_arr_f = np.array(data.ranges[0:10])\n laser_arr_l= np.array(data.ranges[85:95])\n laser_a...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Anirudh1097/dcsp_adversarial
[ "cac997add7b609a8bd5c4ad942d801d7729341bc" ]
[ "train_segmentation.py" ]
[ "\"\"\"Script for training DCSP for segmentation task.\n\"\"\"\n\nfrom __future__ import print_function\n\nimport argparse\nfrom datetime import datetime\nimport os\nimport sys\nimport time\n\nimport tensorflow as tf\nimport numpy as np\n\nfrom deeplab_resnet import DeepLabResNetModel, ImageReader_Segment, decode_l...
[ [ "tensorflow.concat", "tensorflow.global_variables", "tensorflow.nn.sigmoid_cross_entropy_with_logits", "tensorflow.nn.l2_loss", "tensorflow.group", "tensorflow.summary.scalar", "tensorflow.add_n", "tensorflow.py_func", "tensorflow.Graph", "tensorflow.gradients", "tensor...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
RashadGarayev/2DConvolution
[ "a142f2b4a3cee5be58d3c926db09ecf2494138b3" ]
[ "image_load.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nfrom skimage import io,data,color\nfrom skimage.transform import rescale, resize, downscale_local_mean\ndef load_image(image):\n \"\"\"\n Reading image with skimage library\n io.imread(filename)\n\n \"\"\"\n image = io.imread(image)\n image = r...
[ [ "numpy.array", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
vildursn/Master-thesis
[ "d43be72f597f04572e80b3b5441ef508756dbb37" ]
[ "AMA_RANSAC_algorithm.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sun May 19 10:59:13 2019\r\n\r\n@author: vildeg\r\n\"\"\"\r\n\r\nimport numpy as np\r\nimport cv2\r\nfrom functions import draw_hough_lines\r\nfrom functions import three_line_RANSAC\r\nfrom functions import find_cart_line_eq\r\nfrom functions import perpendicular_po...
[ [ "numpy.shape" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Mamuntheprogrammer/Excel_Merger_Gui-Python-
[ "2e38430f4e35b2671f2af2f8636d7e2f8f12fff7" ]
[ "Final.py" ]
[ "from tkinter import *\nimport tkinter as tk\nfrom tkinter.font import Font\nimport webbrowser\nfrom tkinter import ttk\nfrom tkinter import filedialog,messagebox\nimport time\nimport glob\nimport os\nimport pandas as pd\nfrom sys import exit\nfrom pandas import ExcelWriter\nx=''\n\n\n\n#main inheret classes\n#----...
[ [ "pandas.read_excel", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
kbren/uwnet
[ "aac01e243c19686b10c214b1c56b0bb7b7e06a07" ]
[ "uwnet/modules.py" ]
[ "import torch\nfrom torch import nn\nfrom .tensordict import TensorDict\nimport math\n\n\nclass LinearDictIn(nn.Module):\n \"\"\"A Dense Linear Layer Transform for dicts of tensors\n \"\"\"\n\n def __init__(self, inputs, n_out):\n super(LinearDictIn, self).__init__()\n self.models = {}\n ...
[ [ "torch.nn.Linear", "torch.Tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
MisterXY89/intro-to-python
[ "e76e2ec32a8e0bcdfd2061a956369a201ed68f0f" ]
[ "session_4/section_1/solutions.py" ]
[ "#------------------------------------------------------------------------------#\n# (1)\n# Write min. 2 functions which handle the reading, processing and visualization \n# of a time series of transactions for one location (dependet on an argument) \n# (you can use the sum, mean or median) for the transactions on ...
[ [ "pandas.read_csv", "matplotlib.pyplot.show", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
ElDeveloper/metagenomics_pooling_notebook-1
[ "762570040d00fa7e04cf1ffef0b1e3387ba56a96" ]
[ "metapool/metapool.py" ]
[ "import re\nimport numpy as np\nimport pandas as pd\nimport string\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport warnings\n\n\nREVCOMP_SEQUENCERS = ['HiSeq4000', 'MiniSeq', 'NextSeq', 'HiSeq3000',\n 'iSeq', 'NovaSeq']\nOTHER_SEQUENCERS = ['HiSeq2500', 'HiSeq1500', 'MiSeq']\n\n...
[ [ "pandas.read_excel", "numpy.nan_to_num", "pandas.DataFrame", "numpy.round", "matplotlib.pyplot.subplot2grid", "pandas.read_csv", "numpy.clip", "numpy.zeros", "pandas.to_numeric", "matplotlib.pyplot.figure", "numpy.multiply", "numpy.power", "numpy.full_like", ...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
charlottestanton/covid-19-open-data
[ "647019c2df6eb0776c67883df256a14a64c2fe62" ]
[ "src/pipelines/hospitalizations/pe_authority.py" ]
[ "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "pandas.DataFrame.from_records" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
RePierre/lelantos
[ "6f6f84f39f509f24deb9e9ff2215841168d4efcf" ]
[ "src/dataset.py" ]
[ "import numpy as np\nimport os\nimport xml.etree.ElementTree as etree\nimport pprint as pp\n\n\ndef mark_pos(x, y, z, row, pos):\n x[row, pos] = 1\n y[row, pos] = 1\n if row > 0:\n z[row - 1, pos] = 1\n\n\ndef read_data(data_dir):\n pos_types, max_len = build_pos_dictionary(data_dir)\n pos_typ...
[ [ "numpy.zeros", "numpy.zeros_like" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
UKPLab/arxiv2018-xling-sentence-embeddings
[ "95305c1a3d6d3e8c5f5365db463ba11cc9bd33b1" ]
[ "evaluation/run_multiple_optim_lr.py" ]
[ "import importlib\nimport json\nfrom collections import OrderedDict\n\nimport click\nimport numpy as np\nimport tensorflow as tf\nimport xlsxwriter\nfrom backports.tempfile import TemporaryDirectory\nfrom shutil import rmtree\n\nfrom experiment.config import load_config, read_config\nfrom experiment.utils import lo...
[ [ "tensorflow.ConfigProto", "numpy.std", "tensorflow.reset_default_graph", "numpy.mean", "tensorflow.Session" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
mariolpantunes/semantic-matcher
[ "b80be04870198d82d794dec608e37f44c898da0c" ]
[ "matcher/metrics.py" ]
[ "# coding: utf-8\n\n__author__ = 'Mário Antunes'\n__version__ = '0.1'\n__email__ = 'mariolpantunes@gmail.com'\n__status__ = 'Development'\n\n\nimport numpy as np\n\n\ndef precision(relevant, received):\n received_relevants = 0.0\n for item in received:\n if item in relevant:\n received_relev...
[ [ "numpy.dot", "numpy.linalg.norm" ] ]
[ { "matplotlib": [], "numpy": [ "1.10", "1.12", "1.11", "1.19", "1.24", "1.13", "1.16", "1.9", "1.18", "1.23", "1.21", "1.22", "1.20", "1.7", "1.15", "1.14", "1.17", "1.8" ], "pandas": [], ...
adrian-prisacaru/aipnd-project
[ "634f7ca8994ebee2aa42ac7462ed68b4fcad8885" ]
[ "train.py" ]
[ "import argparse\nimport torch\nfrom torch import nn\nfrom torch import optim\nfrom torchvision import datasets, transforms, models\nfrom utils import build_model, determine_device\nfrom pathlib import Path\n\n# transforms used for training\n\ntrain_transforms = transforms.Compose([transforms.RandomRotation(30),\n ...
[ [ "torch.nn.NLLLoss", "torch.utils.data.DataLoader", "torch.exp", "torch.no_grad", "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jsleb333/transboost
[ "998b1e3294ebfbc4aa060047fb00e42db9fc0f12" ]
[ "transboost/weak_learner/random_convolution.py" ]
[ "import numpy as np\nfrom sklearn.linear_model import Ridge\nimport inspect\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\nimport warnings\nimport matplotlib.pyplot as plt\nfrom graal_utils import timed\n\nfrom transboost.weak_learner import _WeakLearnerBase, _Cloner\nfrom transboost.uti...
[ [ "torch.mean", "torch.norm", "numpy.abs", "numpy.random.seed", "torch.cat", "torch.nn.functional.max_pool3d", "torch.manual_seed", "torch.nn.functional.conv2d", "numpy.linalg.norm", "torch.from_numpy", "torch.unsqueeze", "sklearn.linear_model.Ridge", "torch.std",...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zhusiling/AAF-TF
[ "8488aa6ad16022ab4b89fb8626386997559cb951" ]
[ "pyscripts/benchmark/benchmark_by_instance.py" ]
[ "import os\nimport argparse\n\nfrom PIL import Image\nimport numpy as np\n\nfrom utils.metrics import iou_stats\n\n\nparser = argparse.ArgumentParser(\n description='Benchmark segmentation predictions'\n)\nparser.add_argument('--pred-dir', type=str, default='',\n help='/path/to/prediction.')\npa...
[ [ "numpy.argmax", "numpy.zeros", "numpy.histogram", "numpy.unique" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]