repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
neurohackademy/feature-encoding
[ "662b12dd91ff298418622877f7ff7e91ba0fc7f3" ]
[ "preproc/neuro/resample_voxel.py" ]
[ "\"\"\"\nThis script intends to downsample HCP data into 3mm voxel size\nAuthor: Tiankang Xie & Team\n\"\"\"\nimport os\nimport glob\nfrom nilearn.image import resample_img\nimport pylab as plt\nimport nibabel as nb\nimport numpy as np\nimport joblib\nfrom tqdm import tqdm\nfrom joblib import Parallel, delayed\n\nN...
[ [ "numpy.eye" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Ursinus-CS476-F2020/LoopDitty
[ "bf4312d1a237b9c7b968915891014b1c64a4f1b9" ]
[ "PythonFeatures/JSONFeatures.py" ]
[ "#Programmer: Chris Tralie\n#Purpose: To extract features for use with LoopDitty\nimport numpy as np\nimport os\nimport matplotlib.pyplot as plt\nimport json\nimport base64\nimport time\nimport librosa\nfrom sklearn.decomposition import PCA\nimport argparse\nfrom SimilarityFusion import get_structure_features\n\n\n...
[ [ "numpy.linspace", "numpy.arange", "matplotlib.pyplot.get_cmap", "numpy.concatenate", "sklearn.decomposition.PCA", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
simondlevy/D4PG
[ "77f2df3e24d9993b36b8e3f629b0606a1d0d0ae5" ]
[ "test.py" ]
[ "'''\r\n## Test ##\r\n# Test a trained D4PG network. This can be run alongside training by running 'test_every_new_ckpt.py'.\r\n@author: Mark Sinton (msinto93@gmail.com) \r\n'''\r\n\r\nimport tensorflow as tf\r\nimport numpy as np\r\n\r\nfrom params import test_params\r\nfrom agent import Agent\r\n\r\n\r\ndef test(...
[ [ "tensorflow.set_random_seed", "tensorflow.Session", "tensorflow.ConfigProto", "numpy.random.seed" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
usuaero/MachUpX
[ "73832d21906bc29b7b6fe69605498e462e88afce" ]
[ "machupX/scene.py" ]
[ "import json\nimport time\nimport copy\nimport warnings\n\nimport numpy as np\nimport math as m\nimport scipy.interpolate as sinterp\nimport scipy.optimize as sopt\nimport matplotlib.pyplot as plt\n\nfrom stl import mesh\nfrom mpl_toolkits.mplot3d import Axes3D\nfrom airfoil_db import DatabaseBoundsError\n\nfrom ma...
[ [ "numpy.polyfit", "numpy.true_divide", "numpy.radians", "numpy.sqrt", "numpy.einsum", "numpy.linspace", "numpy.arctan2", "matplotlib.pyplot.plot", "numpy.cross", "matplotlib.pyplot.gca", "numpy.allclose", "numpy.matmul", "numpy.interp", "matplotlib.pyplot.clo...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
pavva94/DeepLearningProject
[ "9402a303b30d84fa2411787c34f07360700b5f3c" ]
[ "ThreeLinesModel/danternn.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"DanteRNN.ipynb\n\nAutomatically generated by Colaboratory.\n\nOriginal file is located at\n https://colab.research.google.com/drive/1HMXZXKl_mCAEETvfKIsHVbzhLeD5mGlL\n\n# Recursive Neural Network(RNN) for generating the Divina Commedia of Dante Alighieri.\n\"\"\"\n\n# Commented ou...
[ [ "numpy.log", "tensorflow.train.latest_checkpoint", "numpy.asarray", "numpy.random.multinomial", "numpy.argmax", "numpy.exp", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
TatsuyaHaga/laplacian_associative_memory_codes
[ "74679a5bb6799090fe2aaf202ee6c7242e06e67f", "74679a5bb6799090fe2aaf202ee6c7242e06e67f" ]
[ "simulation_sequence/sequence_overrepresentation/create_network_ring_chunk2.py", "simulation_sequence/sequence_ring_oscillation/plot_stat.py" ]
[ "#!/usr/bin/env python3\n\nimport sys\nsys.path.append(\"../\")\nimport plotlib\n\nimport numpy\nimport itertools\nimport networkx\nimport pickle\n\nN=90\nwbase=100\nbias=10\ngroup1=range(0,3)\ngroup2=range(30,33)\ngroup3=range(60,63)\n\npos={}\nedge_list=[]\nedge_list_now=[]\n\ngroup_id=[]\n\n#ring\nfor x in range...
[ [ "numpy.savetxt", "numpy.zeros", "numpy.cos", "numpy.sin" ], [ "numpy.arange", "numpy.argmax", "numpy.mean", "numpy.roll", "numpy.loadtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Zhiwei-Z/fsdl-text-recognizer-2021-labs
[ "b86cf8b84a4dd1cc70a24117d4c6b8cea0cbba47" ]
[ "lab4/training/run_experiment.py" ]
[ "\"\"\"Experiment-running framework.\"\"\"\nimport argparse\nimport importlib\n\nimport numpy as np\nimport torch\nimport pytorch_lightning as pl\n\nfrom text_recognizer import lit_models\n\n\n# In order to ensure reproducible experiments, we must set random seeds.\nnp.random.seed(42)\ntorch.manual_seed(42)\n\n\nde...
[ [ "torch.manual_seed", "numpy.random.seed" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
estansifer/factoriomods
[ "9425d4d0d85daedf714db4be5493c67fa069ac7b" ]
[ "timelapse/py/entity_attributes.py" ]
[ "import re\nimport numpy as np\n\nclass Size:\n def __init__(self, x, y, d = None):\n if not (d is None):\n self.d = d\n elif x == y:\n self.d = [[(dx, dy) for dx in range(-(x // 2), (x + 1) // 2) for dy in range(-(y // 2), (y + 1) // 2)]]\n else:\n self.d = ...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
MarcusAndreasSvensson/sfepy
[ "2702311ebb0693160fca5955a2a755b24aef58cb" ]
[ "sfepy/solvers/ls.py" ]
[ "from __future__ import absolute_import\nimport time\nimport hashlib\n\nimport numpy as nm\nimport warnings\n\nimport scipy.sparse as sps\nimport six\nfrom six.moves import range\n\nwarnings.simplefilter('ignore', sps.SparseEfficiencyWarning)\n\nfrom sfepy.base.base import output, get_default, assert_, try_imports\...
[ [ "numpy.hstack", "scipy.sparse.coo_matrix", "numpy.min", "numpy.arange", "numpy.linalg.norm", "scipy.sparse.csr_matrix", "numpy.ones", "numpy.sign", "numpy.max", "numpy.where", "numpy.array", "scipy.linalg.solve", "scipy.spatial.cKDTree", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
skitter30/modbot
[ "6526f5bd1b8e73143ff45d71081d64c6e4aa8ea5" ]
[ "donbot/exp.py" ]
[ "from donbot import Donbot\r\nfrom lxml import html, cssselect\r\nfrom getvotes import GetVotes\r\nimport numpy as np\r\nimport pandas as pd\r\nimport texthero as hero\r\n\r\nobj = GetVotes(username=\"skitter30\", password=\"*\")\r\n\r\ntarget_user = \"Auro\"\r\n\r\n#City that never sleeps, BoTC, White flag, Newbie...
[ [ "pandas.DataFrame" ] ]
[ { "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": [] } ]
weirdcoder247/leetcode_solutions
[ "77e3579dadf40405411a15532cfca227329dad98" ]
[ "scripts/python/1672_richest_customer_wealth.py" ]
[ "class Solution(object):\n def maximumWealth(self, accounts):\n \"\"\"\n :type accounts: List[List[int]]\n :rtype: int\n \"\"\"\n # Import Package\n import numpy as np\n\n arr = np.array(accounts)\n return arr.sum(axis = 1).max()\n\n\nif __name__ == '__main...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SeongJunKang/pytorch-bert-crf-ner
[ "2affbd1674517e662e2be93a41102ceedbb9ff1f" ]
[ "app.py" ]
[ "from __future__ import absolute_import, division, print_function, unicode_literals\nfrom flask import Flask, render_template, request\nfrom inference import DecoderFromNamedEntitySequence\nimport json\nimport pickle\nimport torch\nfrom gluonnlp.data import SentencepieceTokenizer\nfrom model.net import KobertCRFViz...
[ [ "torch.device", "torch.cuda.is_available", "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Asurada2015/Test
[ "14d92c9cb88d293340d76b20d31ca937052addb6", "14d92c9cb88d293340d76b20d31ca937052addb6" ]
[ "Prediction based on convolutional neural network/code/NewModels1/Yield_BNalpha.py", "Prediction based on convolutional neural network/code/reference/mnist_train.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nimport tqdm\nimport tensorflow as tf\nfrom tensorflow.python.framework import ops\nimport csv\nimport os\n\nops.reset_default_graph()\n\nsess = tf.Session()\n\"\"\"alpha版的目的在于寻找最好的模型savemodel参数会去掉而使用保存最好的模型值来取代,所以每一次都会运行所有指标\"\"\"\n# 设置模型超参数\n\noutput_every = 50...
[ [ "matplotlib.pyplot.legend", "tensorflow.TextLineReader", "tensorflow.nn.max_pool", "tensorflow.stack", "matplotlib.pyplot.plot", "tensorflow.train.AdamOptimizer", "tensorflow.layers.batch_normalization", "tensorflow.Variable", "tensorflow.decode_csv", "tensorflow.get_collec...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
LiewMK/OpenCV-ObjectDetector
[ "7d6c307e251f66bf3988a93dca1206bdca6ecb32" ]
[ "DIP_MiniProject_Main.py" ]
[ "import sys\r\nimport cv2\r\nimport imutils\r\nimport numpy as np\r\nfrom PyQt5.QtWidgets import QMainWindow, QApplication, QAction, QLabel, QPushButton, QDesktopWidget,\\\r\n QFileDialog, QFrame, QSlider, QDialog, QGroupBox, QLineEdit\r\nfrom PyQt5.QtGui import QIcon\r\nfrom PyQt5.QtCore import Qt\r\nfrom imuti...
[ [ "numpy.array", "numpy.absolute" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
allenlavoie/tfgpu
[ "5828e285209ff8c3d1bef2e4bd7c55ca611080d5", "5828e285209ff8c3d1bef2e4bd7c55ca611080d5" ]
[ "tensorflow/contrib/distributions/python/kernel_tests/vector_diffeomixture_test.py", "tensorflow/contrib/distributions/python/ops/poisson_lognormal.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...
[ [ "numpy.linspace", "tensorflow.python.platform.test.main", "numpy.float32", "tensorflow.python.ops.distributions.normal.Normal" ], [ "tensorflow.python.framework.tensor_shape.scalar", "tensorflow.python.ops.math_ops.range", "numpy.log", "tensorflow.python.ops.array_ops.concat", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.8", "1.10", "1.12", "2.7", "2.6", "1.4", "1.13", "2.3", "2.4", "2.9", "1.5", "1.7", "2.5", "2.2", "1.2", "2.10" ] }...
zhangsanfeng86/cyclevae-vc-neuralvoco
[ "0bab953b7ab54c32211648ddbfbd99d398029c86" ]
[ "src/bin/decode_gru-cycle-melspxlf0capspkvae-gauss-smpl.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Copyright 2021 Patrick Lumban Tobing (Nagoya University)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\nfrom __future__ import division\n\nimport argparse\nimport logging\nimport math\nimport os\nimport sys\nfrom distutils.util import strtobool\n...
[ [ "torch.nn.functional.softmax", "torch.load", "torch.cat", "torch.no_grad", "numpy.mean", "torch.FloatTensor", "numpy.var", "numpy.exp", "torch.ones", "torch.multiprocessing.Manager", "numpy.clip", "numpy.matmul", "numpy.std", "torch.index_select", "torch...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
reppy4620/VCon
[ "cac3441443cb9b28ffbaa0646ed1826d71cb16e0" ]
[ "modules/vqvc/layers.py" ]
[ "import torch\nimport torch.nn as nn\n\n\nclass EncoderLayer(nn.Module):\n\n def __init__(self, in_channel, out_channel, middle_channel, k1, k2):\n super().__init__()\n\n self.extract_conv = nn.Sequential(\n nn.Conv1d(in_channel, middle_channel, k1, 1, k1//2),\n nn.BatchNorm1d...
[ [ "torch.nn.BatchNorm1d", "torch.norm", "torch.cat", "torch.nn.GRU", "torch.nn.Embedding", "torch.nn.Conv1d", "torch.nn.ConvTranspose1d", "torch.nn.ReLU", "torch.nn.GroupNorm" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
orihikarna/Herm
[ "7078ca5d0ab26fec01deb4df8207ae03f8257036" ]
[ "python/svg2png.py" ]
[ "import cairosvg\nimport cv2\nimport numpy as np\nfrom PIL import Image\n\nboard = 'ZoeaT'\nboard = 'ZoeaB'\nboard = 'HermitT'\n# board = 'HermitB'\nlayer = 'Edge_Cuts'\nroot = '/Users/akihiro/repos/Hermit/{}/'.format( board )\npath_svg = root + 'layer/{}-{}.svg'.format( board, layer )\npath_png = root + 'svg.png'\...
[ [ "numpy.zeros", "numpy.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jignesh-yadav/ga-learner-dsai-repo
[ "839a366f967141ba32eab2480498f3a7a1622c6b" ]
[ "Python-numpy-wrangling/code.py" ]
[ "# --------------\n# Importing header files\r\nimport numpy as np\r\nimport warnings\r\n\r\nwarnings.filterwarnings('ignore')\r\n\r\n#New record\r\nnew_record=[[50, 9, 4, 1, 0, 0, 40, 0]]\r\n\r\n#Reading file\r\ndata = np.genfromtxt(path, delimiter=\",\", skip_header=1)\r\n\r\n#Code starts here\r\n\r\nprint(\...
[ [ "numpy.concatenate", "numpy.genfromtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Wright4TheJob/Optimizing
[ "0f056e40a24380a48ed469bd4bb565948f7ffaf2" ]
[ "Truss/TrussUI.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Form implementation generated from reading ui file 'threading_design.ui'\n#\n# Created: Thu Aug 6 13:47:18 2015\n# by: PyQt4 UI code generator 4.10.4\n\nfrom PyQt5 import QtCore, QtGui\nfrom matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas\nfrom PyQt5.Q...
[ [ "matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg.__init__", "matplotlib.figure.Figure", "matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg.mpl_connect", "matplotlib.image.imread", "matplotlib.rcParams.update", "matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg.updateGeometry", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
uber-research/var-gp
[ "1fc3935a84ff58ac529361c53c98e01338244062" ]
[ "experiments/toy_global.py" ]
[ "import os\nfrom tqdm.auto import tqdm\nimport wandb\nimport torch\nfrom torch.utils.tensorboard import SummaryWriter\n\nfrom var_gp.datasets import ToyDataset\nfrom var_gp.train_utils import set_seeds\nfrom var_gp.train_utils_global import train\n\n\ndef main(data_dir=None, epochs=10000, M=20, lr=1e-2,\n b...
[ [ "torch.utils.tensorboard.SummaryWriter", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hackermike/XuniVerse
[ "ab5824124a23b6dfa0daf6001adf77354819307f" ]
[ "xverse/transformer/_woe.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom sklearn.base import BaseEstimator, TransformerMixin\nimport scipy.stats.stats as stats\nimport pandas.core.algorithms as algos\n#from sklearn.utils.validation import check_is_fitted\nfrom sklearn.utils import check_array\nfrom ..transformer import MonotonicBinning\n\np...
[ [ "numpy.log", "pandas.DataFrame", "numpy.unique" ] ]
[ { "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": [] } ]
ekaterinailin/flares-in-clusters-with-k2-ii
[ "40d0f35f55184897b64a3392e45151c118a8a731" ]
[ "FlareAnalysisPipeline/opencluster/cmd.py" ]
[ "import warnings\n\nimport pandas as pd\nimport numpy as np\n\nfrom bokeh.plotting import figure\nfrom bokeh.models import ColumnDataSource\nfrom bokeh.models.widgets import Button\nfrom bokeh.models.callbacks import CustomJS\nfrom bokeh.models.layouts import Column\nfrom bokeh.io import output_file, show\n\nfrom a...
[ [ "numpy.abs", "numpy.sqrt", "pandas.Series", "numpy.isnan", "numpy.nan_to_num", "numpy.array" ] ]
[ { "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": [] } ]
akathpal/Robot-Learning
[ "fdbd01f632ea12ae5164cf01e039e0f32f836d3a" ]
[ "Dots-Boxes-RL/src/neuralnetwork.py" ]
[ "import torch\n\nclass PyTorchNN(torch.nn.Module):\n \n def __init__(self, n_inputs, network, n_outputs, relu=False):\n super(PyTorchNN, self).__init__()\n network_layers = [torch.nn.Linear(n_inputs, network[0])]\n if len(network) > 1:\n network_layers.append(torch.nn.Tanh() if...
[ [ "torch.nn.Sequential", "torch.sqrt", "torch.nn.Tanh", "torch.nn.Linear", "torch.no_grad", "torch.cuda.is_available", "torch.nn.ReLU", "torch.nn.MSELoss" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Fenmaz/connect4
[ "3a98999289718e68f2a534f66ea53de8de28a49f" ]
[ "alpha_zero/src/data_generation/generate_data.py" ]
[ "import numpy as np\n#import pygame #brew install python3 && cp /usr/local/bin/python3 /usr/local/bin/python\nimport sys\nimport math\nimport random\nimport time\n\nROW_COUNT = 6\nCOLUMN_COUNT = 7\nBLUE = (0,0,255)\nBLACK = (0,0,0)\nRED = (255,0,0)\nYELLOW = (255,255,0)\n\ndef create_board():\n board = np.zeros(...
[ [ "numpy.flip", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lmcdon14/Lakeshore625
[ "45317779fe5e6b07c8cf8e55ef8bb8da58ef216f" ]
[ "TestCounts.py" ]
[ "import math\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport sys\nimport re\n\ndef mainProgram(length=250, min_val = -20, max_val = 20, amp=200, plot=False):\n current = [0]*length\n counts = [0]*length\n\n np.random.seed(1729)\n counts_noise = 0.05 * amp * np.random.normal(size=length)\n\n...
[ [ "numpy.random.seed", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "numpy.random.normal", "matplotlib.pyplot.clf", "matplotlib.pyplot.close", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
paulodamaso/aibolit
[ "014fc731b428bc06e86b0ac258d4f36bebb2c322" ]
[ "aibolit/__main__.py" ]
[ "#!/usr/bin/env python\n# The MIT License (MIT)\n#\n# Copyright (c) 2020 Aibolit\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation ...
[ [ "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
NLeSC/parallel-roofit-scripts
[ "70de07edfd8e400650af4cb34789dbb8b8fc9574" ]
[ "tensorflow_testing/tensorflow_roofit_demo_3_scipy.py" ]
[ "# -*- coding: utf-8 -*-\n# @Author: patrick\n# @Date: 2016-09-01 17:04:53\n# @Last Modified by: Patrick Bos\n# @Last Modified time: 2016-10-26 14:48:09\n\n# as per tensorflow styleguide\n# https://www.tensorflow.org/versions/r0.11/how_tos/style_guide.html\nfrom __future__ import absolute_import\nfrom __future_...
[ [ "numpy.sqrt", "tensorflow.minimum", "numpy.mean", "tensorflow.all_variables", "tensorflow.Variable", "tensorflow.merge_all_summaries", "tensorflow.OptimizerOptions", "tensorflow.gradients", "tensorflow.div", "tensorflow.initialize_all_variables", "tensorflow.logging.set...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
linxiaozhi/captcha_trainer
[ "d31196c9b0736d73c65ba7a515fb71a89bcd93bf" ]
[ "core.py" ]
[ "#!/usr/bin/env python3\n# -*- coding:utf-8 -*-\n# Author: kerlomz <kerlomz@gmail.com>\nimport sys\nfrom config import RecurrentNetwork, RESIZE_MAP, CNNNetwork, Optimizer\nfrom network.CNN import *\nfrom network.MobileNet import MobileNetV2\nfrom network.DenseNet import DenseNet\nfrom network.GRU import GRU, BiGRU,...
[ [ "tensorflow.compat.v1.train.AdagradOptimizer", "tensorflow.compat.v1.summary.merge_all", "tensorflow.compat.v1.train.RMSPropOptimizer", "tensorflow.compat.v1.train.AdamOptimizer", "tensorflow.keras.Input", "tensorflow.control_dependencies", "tensorflow.reduce_mean", "tensorflow.sha...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
robot-python/robot
[ "cd962e17c0048351b59d21128b66682fef4a3362" ]
[ "src/run_CartPole.py" ]
[ "\"\"\"\nPolicy Gradient, Reinforcement Learning.\n\nThe cart pole example\n\nView more on my tutorial page: https://morvanzhou.github.io/tutorials/\n\nUsing:\nTensorflow: 1.0\ngym: 0.8.0\n\"\"\"\n\nimport gym\n# from RL_brain import PolicyGradient\nfrom src.robot.RL_brain import PolicyGradient\n\nimport matplotlib...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sergio-marti/ren-qm3
[ "8ebb2ea527f0d2cf7fdae7898291bfb442db7e7d" ]
[ "qm3/engines/xtb.py" ]
[ "import numpy\nimport typing\nimport ctypes\nimport os\nimport inspect\nimport qm3.data\nimport qm3.engines\n\n\nclass run( qm3.engines.template ):\n def __init__( self, mol: object, chrg: int,\n nope: typing.Optional[int] = 0,\n sel_QM: typing.Optional[numpy.array] = numpy.array( []...
[ [ "numpy.round", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Minerva-J/Pytorch-Segmentation-multi-models
[ "0845b54d4fbc8d38c70f158054b7ab1be2b3ceb9" ]
[ "utils_Deeplab/sync_batchnorm/unittest.py" ]
[ "# -*- coding: utf-8 -*-\n\n# This file is part of Synchronized-BatchNorm-PyTorch.\n# https://github.com/vacancy/Synchronized-BatchNorm-PyTorch\n# Distributed under MIT License.\n\nimport unittest\n\nimport numpy as np\nfrom torch.autograd import Variable\n\n\ndef as_numpy(v):\n if isinstance(v, Variable):\n ...
[ [ "numpy.abs", "numpy.fmax", "numpy.allclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
YerongLi/tf_classification
[ "3f8b7f49d823d61b3c2358f466995a9a8c250600" ]
[ "nets/resnet_v2.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.variable_scope", "tensorflow.squeeze", "tensorflow.reduce_mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
kunyilu/eta
[ "2cd994300c79a0d021c256315fdd6cc9652e386f" ]
[ "eta/core/image.py" ]
[ "'''\nCore image processing tools.\n\nNotes:\n [image format] ETA stores images exclusively in RGB format. In contrast,\n OpenCV stores its images in BGR format, so all images that are read or\n produced outside of this library must be converted to RGB. This\n conversion can be done via `eta...
[ [ "numpy.clip", "numpy.asarray", "numpy.arange", "numpy.uint8", "numpy.concatenate", "numpy.full_like", "numpy.ceil", "numpy.iinfo", "numpy.repeat", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tamuzhang/Raster-Processor
[ "021623a2a773874337c7c36cef099b2e1140fc8f" ]
[ "src/bin/make_raster_regionmaps.py" ]
[ "#!/usr/bin/env python\n'''\nCopyright (c) 2021-, California Institute of Technology (\"Caltech\"). U.S.\nGovernment sponsorship acknowledged.\nAll rights reserved.\n\nAuthor(s): Alexander Corben\n'''\n\nimport os\nimport glob\nimport argparse\nimport numpy as np\nimport multiprocessing\nimport SWOTRaster.products\...
[ [ "numpy.isnan", "scipy.interpolate.RegularGridInterpolator", "numpy.concatenate", "numpy.ma.masked_all", "numpy.logical_and" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.14", "1.6", "1.10", "0.15", "1.4", "0.16", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "1.0", "0.17", "1.3", "1.8" ], "tensorflow": [] ...
shinianzhihou/ChangeDetection
[ "c29a90ebb3d13861c5161cc751bfd1f11c28bf45" ]
[ "mmseg/models/segmentors/cascade_encoder_decoder.py" ]
[ "from torch import nn\n\nfrom mmseg.core import add_prefix\nfrom mmseg.ops import resize\nfrom .. import builder\nfrom ..builder import SEGMENTORS\nfrom .encoder_decoder import EncoderDecoder\n\n\n@SEGMENTORS.register_module()\nclass CascadeEncoderDecoder(EncoderDecoder):\n \"\"\"Cascade Encoder Decoder segmento...
[ [ "torch.nn.ModuleList" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
agusnavce/posifi
[ "507de165d293dbf1da5dbd50bd39cb9b5af28e5c" ]
[ "commons/aws/dynamodb_helper.py" ]
[ "import boto3\nimport json\nimport pandas as pd\nfrom commons.logger import logged\nfrom dynamodb_json import json_util as json_d\n\nclient = boto3.client('dynamodb', region_name='sa-east-1')\n\n\n\ndef get_all_elements_from_table(table_name):\n paginator = client.get_paginator('scan')\n operation_parameters ...
[ [ "pandas.DataFrame" ] ]
[ { "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": [] } ]
jiannanWang/DEEPSEC
[ "2c67afac0ae966767b6712a51db85f04f4f5c565", "2c67afac0ae966767b6712a51db85f04f4f5c565" ]
[ "Attacks/AttackMethods/TMIFGSM.py", "Attacks/AttackMethods/AttackUtils.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# References: Y. Dong, et al., \"Boosting adversarial attacks with momentum,\" arXiv:1710.06081, 2017.\n# **************************************\n# @Time : 2018/10/16 20:11\n# @Author : Xiang Ling\n# @Lab : nesa.zju.edu.cn\n# @File : TMIFGSM.py\n# ******...
[ [ "torch.nn.CrossEntropyLoss", "torch.LongTensor", "numpy.clip", "torch.from_numpy", "numpy.sign", "numpy.copy", "numpy.array" ], [ "numpy.copy", "torch.from_numpy", "torch.autograd.Variable" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zb8c5ek/google-research
[ "a9dddf8afa28af6df92a64b8ceb8ef564b0fe755" ]
[ "m_layer/m_layer.py" ]
[ "# coding=utf-8\n# Copyright 2020 The Google Research 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 requ...
[ [ "tensorflow.linalg.expm", "tensorflow.eye", "tensorflow.einsum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.8", "1.10", "1.12", "2.7", "2.6", "1.4", "1.13", "2.3", "2.4", "2.9", "1.5", "1.7", "2.5", "0.12", "1.0", "2.2", "1...
AAbanmi/Deep-Reinforcement-Learning-Projects
[ "a2b187f4fe6d5aaa775465beb0e160fdbf1dc744" ]
[ "p1_navigation/model.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass QNetwork(nn.Module):\n \"\"\"Actor (Policy) Model.\"\"\"\n\n def __init__(self, state_size, action_size, seed):\n \"\"\"Initialize parameters and build model.\n Params\n ======\n state_size (int): Di...
[ [ "torch.nn.Linear", "torch.manual_seed", "torch.nn.ReLU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
TTI-modelling/TestingContactModel
[ "76e0fd9ae2b2e95c330ed5e5515f6cd1ba22be55" ]
[ "household_contact_tracing/behaviours/intervention/increment_tracing.py" ]
[ "from __future__ import annotations\nfrom abc import ABC, abstractmethod\nfrom typing import Callable\nimport numpy as np\n\nfrom household_contact_tracing.network import Network, Node, Household, EdgeType, TestType\nfrom household_contact_tracing.parameterised import Parameterised\n\n\nclass IncrementTracing(ABC, ...
[ [ "numpy.random.binomial" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
scwilkinson/xgboost
[ "48dddfd635b0fa6575b9934334254533e5d8708d" ]
[ "tests/python/test_with_sklearn.py" ]
[ "import numpy as np\nimport xgboost as xgb\nimport testing as tm\nimport tempfile\nimport os\nimport shutil\nimport pytest\n\nrng = np.random.RandomState(1994)\n\npytestmark = pytest.mark.skipif(**tm.no_sklearn())\n\n\nclass TemporaryDirectory(object):\n \"\"\"Context manager for tempfile.mkdtemp()\"\"\"\n de...
[ [ "pandas.Series", "sklearn.datasets.make_hastie_10_2", "sklearn.model_selection.KFold", "pandas.DataFrame", "sklearn.metrics.mean_squared_error", "sklearn.base.clone", "sklearn.datasets.load_boston", "numpy.exp", "numpy.random.randint", "numpy.unique", "sklearn.model_sel...
[ { "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": [] } ]
zhang-ivy/molecool
[ "c267768d85acf2890b3352c7852812685cdcb035" ]
[ "molecool/io/xyz.py" ]
[ "\"\"\" I/O functions for xyz files. \"\"\"\n\nimport numpy as np\n\ndef open_xyz(file_location):\n # Open an xyz file and return symbols and coordinates.\n xyz_file = np.genfromtxt(fname=file_location, skip_header=2, dtype='unicode')\n symbols = xyz_file[:, 0]\n coords = (xyz_file[:, 1:])\n coords =...
[ [ "numpy.genfromtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Jenna-Williams/SEC-EDGAR-web-scraper
[ "bf8eae5269ee5efff12bcb21fab3f13b17752d60" ]
[ "Label.py" ]
[ "import pandas as pd \nimport os\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.naive_bayes import MultinomialNB\nfrom sklearn.feature_extraction.text import TfidfTransformer\nimport numpy as np\nfrom joblib import dump, load\nimport time\n\n# Times for each model based on small sample \...
[ [ "pandas.read_excel", "sklearn.feature_extraction.text.CountVectorizer", "sklearn.feature_extraction.text.TfidfTransformer", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
lsz2019/Movie-Reviews-Sentiment-Analysis-Web-App
[ "3f85e56cdfda0dde7ed5c2312cbc4877af560e54" ]
[ "Code/train/train.py" ]
[ "import argparse\nimport json\nimport os\nimport pickle\nimport sys\nimport sagemaker_containers\nimport pandas as pd\nimport torch\nimport torch.optim as optim\nimport torch.utils.data\n\nfrom model import LSTMClassifier\n\ndef model_fn(model_dir):\n \"\"\"Load the PyTorch model from the `model_dir` directory.\...
[ [ "torch.load", "torch.manual_seed", "torch.utils.data.TensorDataset", "torch.utils.data.DataLoader", "torch.from_numpy", "torch.nn.BCELoss", "torch.cuda.is_available", "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Surendra1478963/ga-learner-dsb-repo
[ "052184371d97bddbb3c85dfad90168eb3ddc78cf" ]
[ "Loan-Approval-Analysis/code.py" ]
[ "# --------------\n# Import packages\nimport numpy as np\nimport pandas as pd\nfrom scipy.stats import mode \n\n\n\n# code starts here\n#Load Dataset\n\nbank = pd.read_csv(path)\n \n# Display categorical variable\n\n\ncategorical_var=bank.select_dtypes(include='object')\n\n\nprint(\"Categorical variables : \",ca...
[ [ "pandas.read_csv", "pandas.pivot_table" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
hasancaslan/DeepGlobalRegistration
[ "043d84ae1946d73b1bdfde3c12a02e39b9908f85" ]
[ "core/correspondence.py" ]
[ "# Copyright (c) Chris Choy (chrischoy@ai.stanford.edu) and Wei Dong (weidong@andrew.cmu.edu)\n#\n# Please cite the following papers if you use any part of the code.\n# - Christopher Choy, Wei Dong, Vladlen Koltun, Deep Global Registration, CVPR 2020\n# - Christopher Choy, Jaesik Park, Vladlen Koltun, Fully Convolu...
[ [ "numpy.hstack", "numpy.zeros", "numpy.isin" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
corochann/chainerchem
[ "8e918e557fe9bce865d9d543ea2864d027827941" ]
[ "examples/tox21/train_tox21.py" ]
[ "#!/usr/bin/env python\n\nfrom __future__ import print_function\n\nimport os\n\ntry:\n import matplotlib\n matplotlib.use('Agg')\nexcept ImportError:\n pass\n\nimport argparse\nimport chainer\nfrom chainer import functions as F\nfrom chainer import iterators as I\nfrom chainer import links as L\nfrom chain...
[ [ "matplotlib.use" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
johnnylord/trytry-bodypose-orientation
[ "96fc9a2a60608c192bde84d5dd0422b33875d35d" ]
[ "agent/orient.py" ]
[ "import os\nimport os.path as osp\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.utils.data import DataLoader\nimport torchvision.transforms as T\nfrom tensorboardX import SummaryWriter\n\nfrom data.dataset import OrientDataset\nfrom model.orient import OrientNet\n\nclass OrientAgen...
[ [ "torch.nn.CrossEntropyLoss", "torch.max", "torch.utils.data.DataLoader", "torch.cuda.is_available", "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
NabJa/nnUNet
[ "f017003523f5619d5a4165575c8338bbb8733628" ]
[ "nnunet/network_architecture/segnet.py" ]
[ "from copy import deepcopy\nfrom nnunet.utilities.nd_softmax import softmax_helper\nfrom torch import nn\nimport torch\nimport numpy as np\nfrom nnunet.network_architecture.initialization import InitWeights_He\nfrom nnunet.network_architecture.neural_network import SegmentationNetwork\nimport torch.nn.functional\nf...
[ [ "torch.cat", "torch.nn.ModuleList", "numpy.round", "numpy.prod", "numpy.array", "torch.nn.MaxUnpool3d", "numpy.vstack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
clayton-ho/EGGs_Control
[ "312f02488b47cf880c6e6600ce10856a871123df" ]
[ "lib/scripts/experiments/test_experiment.py" ]
[ "import labrad\nimport numpy as np\nimport time\nimport datetime as datetime\n\nfrom EGGS_labrad.lib.servers.script_scanner.experiment import experiment\n\n\nclass test_experiment(experiment):\n '''\n Tests base experiment functionality\n '''\n\n name = 'Test'\n\n exp_parameters = [\n ...
[ [ "numpy.arange", "numpy.array", "numpy.random.rand" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rcthomas/skyportal
[ "28f47c97a620082b0c6df54e072ed125eab1fc4a" ]
[ "skyportal/tests/api/test_candidates.py" ]
[ "import uuid\nimport numpy.testing as npt\nfrom skyportal.tests import api\n\n\ndef test_candidate_list(view_only_token, public_candidate):\n status, data = api(\"GET\", \"candidates\", token=view_only_token)\n assert status == 200\n assert data[\"status\"] == \"success\"\n\n\ndef test_token_user_retrievin...
[ [ "numpy.testing.assert_almost_equal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
beihaixingchen/fast-depth
[ "31315533648125fa99331e795d9d07f3c49e11a5" ]
[ "main.py" ]
[ "import os\nimport time\nimport csv\nimport numpy as np\n\nimport torch\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.optim\ncudnn.benchmark = True\n\nimport models\nfrom metrics import AverageMeter, Result\nimport utils\n\n\n\nfrom torchvision import datasets, transforms\nfrom torch...
[ [ "numpy.finfo", "torch.no_grad", "numpy.zeros", "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
allaffa/AADL
[ "2e8b1dcfa55f5ea1cf3aeae9e5fd783fb7714335" ]
[ "model_zoo/senet.py" ]
[ "'''SENet in PyTorch.\n\nSENet is the winner of ImageNet-2017. The paper is not released yet.\n'''\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass BasicBlock(nn.Module):\n def __init__(self, in_planes, planes, stride=1):\n super(BasicBlock, self).__init__()\n self.c...
[ [ "torch.nn.Sequential", "torch.randn", "torch.nn.functional.avg_pool2d", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.functional.relu", "torch.nn.BatchNorm2d" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mila-udem/platoon
[ "4cd26f4235da06967e20679e4cf769b423269165" ]
[ "example/simple_batched_pixel_sum/batched_pixel_sum_worker.py" ]
[ "from __future__ import absolute_import, print_function\nimport os\nimport sys\nimport gzip\nimport six\nfrom six.moves import cPickle\n\nimport numpy as np\nfrom numpy.testing import assert_allclose\n\nimport theano\nfrom theano import tensor as T\nfrom theano.compat.python2x import OrderedDict\n\nsys.path.append(...
[ [ "numpy.zeros", "numpy.testing.assert_allclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ompugao/linear_nonlinear_control
[ "7e9111acd4ff7611ef4fd913afd35a3c7042dcbe" ]
[ "mpc/basic/main_example.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport math\nimport copy\n\nfrom mpc_func_with_scipy import MpcController as MpcController_scipy\nfrom mpc_func_with_cvxopt import MpcController as MpcController_cvxopt\nfrom control import matlab\n\nclass FirstOrderSystem():\n \"\"\"FirstOrderSystemWithState...
[ [ "numpy.diag", "numpy.dot", "numpy.arange", "numpy.eye", "numpy.array", "numpy.zeros", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kaimast/DREAM
[ "fe1f2f3a42e307d0c2984eacb75d699cb1480755" ]
[ "src/compile_tf.py" ]
[ "#! /usr/bin/python3\n\nimport tvm.relay.testing.tf as tf_testing\nimport tvm\nimport nnvm\nimport tensorflow as tf\nimport tvm.relay as relay\n\nfrom sys import argv\n\ndef main():\n # target setttings\n target = 'llvm'\n target_host = 'llvm'\n layout = None\n ctx = tvm.cpu(0)\n\n model_path = ar...
[ [ "tensorflow.GraphDef", "tensorflow.import_graph_def", "tensorflow.gfile.FastGFile" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
danihae/bio-image-unet
[ "6cc74ec45ea5f03430920ae880e1e413db70e4fc" ]
[ "biu/siam_unet/helpers/create_pixel_value_histogram.py" ]
[ "import cv2\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport math\n\ndef create_pixel_value_histogram(input_tifs, frames_per_hist=100, bin_width=8):\n\t\"\"\"Creates a histogram for the pixel values in a tif file\n\n\tArgs:\n\t\tinput_tifs (str path to .tif files): input\n\t\tframes_per_hist (int, optio...
[ [ "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
snz20/carnelian
[ "3af30c32ecd632a952c35d475ff179fa8b275a01" ]
[ "util/ldpc.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nGenerates LDPC hash function locations for k-mers \nAuthor: Yun William Yu\n\"\"\"\n\nimport numpy as np\nimport argparse\nimport sys\n\ndef ldpc(k, t, _m):\n '''Generates a low density code matrix.\n\n k (int): width of matrix / length of k-mer\n t (int): nu...
[ [ "numpy.ndarray", "numpy.ceil", "numpy.random.permutation", "numpy.zeros", "numpy.vstack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SunYanCN/NLP-Models-Tensorflow
[ "2358081bfa43aad57d9415a99f64c68f615d0cc4" ]
[ "neural-machine-translation/bert_decoder.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Google AI Language Team 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# Unl...
[ [ "tensorflow.concat", "numpy.sqrt", "tensorflow.control_dependencies", "tensorflow.zeros", "tensorflow.gfile.GFile", "tensorflow.cast", "tensorflow.assert_less_equal", "tensorflow.truncated_normal_initializer", "tensorflow.squeeze", "tensorflow.gather", "tensorflow.train...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
jarvis-1805/PYTHON-FILES
[ "c12dc74f83dadb08acdf5d6260222c3ce8a91797" ]
[ "firstGraph.py" ]
[ "import matplotlib.pyplot as plt\n\nx = [1,2,3]\ny = [2,4,1]\n\nplt.xlabel(\"x-axis\")\nplt.ylabel(\"y-axis\")\n\nplt.title(\"My first graph\")\n\nplt.plot(x,y)\n\nplt.show()" ]
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cbaldassano/Parcellating-connectivity
[ "a98142a6b0dc10e9cb6f6e603cb5334996d018ec" ]
[ "python/WardClustering.py" ]
[ "import numpy as np\r\nfrom scipy import spatial\r\nfrom scipy import cluster\r\nimport StatsUtil\r\nimport math as mt\r\n\r\n# Just a wrapper function that computes the parcellation with n parcels from\r\n# the linkage matrix Z\r\ndef Cluster(Z, n):\r\n z = cluster.hierarchy.fcluster(Z, t=n, criterion = 'maxc...
[ [ "numpy.sqrt", "numpy.unique", "numpy.amin", "numpy.arange", "numpy.in1d", "numpy.linalg.norm", "numpy.ones", "numpy.flatnonzero", "numpy.concatenate", "numpy.argmin", "scipy.spatial.distance.squareform", "numpy.array", "numpy.zeros", "numpy.where", "scip...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "1.3", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "1.0", "0.17", "0.16", "1.8" ...
realcrane/floorplan
[ "5eef5914dd3ca4f8e2a6a88f4c26283ee81da7a0", "5eef5914dd3ca4f8e2a6a88f4c26283ee81da7a0" ]
[ "room_partition/train_partition.py", "room_location/Living/models/net.py" ]
[ "from torch.utils.tensorboard import SummaryWriter\nfrom dataset import PartitionDataset, collate_fn\nfrom config_partition import PartitionConfig\nfrom torch.nn.utils.rnn import PackedSequence\nfrom torch.utils.data import DataLoader\nimport torch as t\nimport models\nimport utils\nimport time\nimport os\n\n\ndef ...
[ [ "torch.cuda.manual_seed", "torch.manual_seed", "torch.utils.data.DataLoader", "torch.nn.utils.rnn.PackedSequence", "torch.cuda.manual_seed_all" ], [ "torch.nn.Sequential", "torch.load", "torch.nn.Conv2d", "torch.from_numpy", "torch.nn.MaxPool2d", "torch.nn.AdaptiveA...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rafgui12/Newspaper-Library
[ "96de4f91a25fa06e7bfb8b8f5981b032fb7b8bf8", "96de4f91a25fa06e7bfb8b8f5981b032fb7b8bf8", "96de4f91a25fa06e7bfb8b8f5981b032fb7b8bf8" ]
[ "Codigos/NYT/NYT 2012.py", "Codigos/TG_UK/TG_UK_2012.py", "Codigos/TG_UK/TG_UK_2006.py" ]
[ "# importing the requests library \nimport requests \nimport numpy as np\nimport os\nimport time\n\n# Cadenas de Pais Y Palabras\ncountry = [\"Colombia\",\"Canada\",\"Cuba\",\"China\",\"Cameroon\",\"Cambodia\",\"Costa Rica\",\"Croatia\",\"Czech Republic\",\"Argentina\"]\ncountry2 = [\"Afghanistan\",\"Australia\",\...
[ [ "numpy.asarray" ], [ "numpy.asarray" ], [ "numpy.asarray" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
roumenguha/ECE276A_PR2_Particle_Filter_SLAM
[ "76866f14c8b6c63c8d0b17dcabff4140455cc5a7" ]
[ "p2_utils.py" ]
[ "import math\nimport numpy as np\nfrom scipy import io\nimport scipy\nimport cv2\nimport matplotlib.pyplot as plt\n\n#################################### MAP #####################################\ndef initializeMap(res, xmin, ymin, xmax, ymax, memory = None, trust = None, optimism = None, occupied_thresh = None, fr...
[ [ "numpy.dot", "numpy.sqrt", "numpy.random.multivariate_normal", "numpy.arctan2", "numpy.max", "numpy.square", "numpy.eye", "numpy.int8", "numpy.matmul", "numpy.sin", "numpy.ceil", "numpy.count_nonzero", "numpy.zeros", "numpy.logical_not", "numpy.log", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wochilemon/asvspoof-GCN
[ "01bde422ad4650caccf9b6cb5d3fba6caa7ab7f8" ]
[ "core_scripts/op_manager/op_process_monitor.py" ]
[ "#!/usr/bin/env python\n\"\"\"\nop_process_monitor\n\nA simple monitor on training / inference process\n\n\"\"\"\n\nfrom __future__ import print_function\nimport os\nimport sys\nimport numpy as np\n\nimport core_scripts.other_tools.display as nii_display\n\n__author__ = \"Xin Wang\"\n__email__ = \"wangxin@nii.ac.jp...
[ [ "numpy.mean", "numpy.resize", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rangehow/TransformerForMT
[ "48ec2fb5350003063290f2ad14d55c642517c026" ]
[ "transformer.py" ]
[ "import torch\nfrom torch import nn\nfrom torch.nn import Parameter\nimport torch.nn.functional as F\nimport math\n\n\nclass Transformer(nn.Module):\n\n def __init__(self, layers, embed_dim, ff_embed_dim, num_heads, dropout, with_external=False, weights_dropout=True):\n '''\n\n :param layers:\n ...
[ [ "torch.nn.functional.softmax", "torch.ones", "torch.Tensor", "torch.nn.functional.dropout", "torch.nn.init.constant_", "torch.zeros", "torch.nn.ModuleList", "torch.sin", "torch.nn.Embedding", "torch.nn.LayerNorm", "torch.nn.Linear", "torch.nn.init.normal_", "tor...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ClodaghMurphy/MachineLearningandStatistics
[ "c09c33467dd3f3c6a8228f96338c5f328c2ca1a9" ]
[ "CourseWork/Topic5Web/rando.py" ]
[ "# flask for web app.\nimport flask as fl\n# numpy for numerical work.\nimport numpy as np\n\n# Create a new web app.\n#Flask doesn't do anything until you call it!\n#aha, the name variable, a type of keyword\n#give your app a name, app is a nice generic one\n#fl you've abbreviated it at import stage\n#use function...
[ [ "numpy.random.uniform", "numpy.random.normal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kan-bayashi/sprocket
[ "b87e1aa3822ed23019b5373660e0f977cbc6c996" ]
[ "example/src/convert.py" ]
[ "#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\"\"\"\nConversion\n\n\"\"\"\n\nimport argparse\nimport os\nimport sys\n\nimport numpy as np\nfrom scipy.io import wavfile\nimport joblib\n\nfrom sprocket.model import GV, F0statistics, GMMConvertor\nfrom sprocket.speech import FeatureExtractor, Synthesizer\nfrom...
[ [ "scipy.io.wavfile.read", "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"...
yifanff/sica_test_0513
[ "8f5a9b0d6dd5221efa2d0661a6dce2a03d14789b" ]
[ "experiments/classification/experiment6_VPA.py" ]
[ "import numpy as np\nfrom sklearn import preprocessing \nfrom sklearn.decomposition import PCA\nfrom sklearn.decomposition import FastICA\nfrom sklearn.naive_bayes import GaussianNB \nfrom sklearn.neighbors import KNeighborsClassifier\nimport sica\nimport sfa\nimport pandas as pd\n\n\n\ndef show_accuracy(predictLa...
[ [ "pandas.read_excel", "sklearn.naive_bayes.GaussianNB", "sklearn.decomposition.FastICA", "sklearn.neighbors.KNeighborsClassifier", "numpy.ravel", "sklearn.preprocessing.StandardScaler", "sklearn.decomposition.PCA" ] ]
[ { "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": [] } ]
leyuanheart/Deep_Learning_From_Scratch
[ "fd26c1ffb146dee91056fb55e3d3aa499f8485f2", "fd26c1ffb146dee91056fb55e3d3aa499f8485f2" ]
[ "5/apply_filter.py", "4/functions.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Feb 20 21:39:23 2021\n\n@author: leyuan\n\"\"\"\n# import sys, os\n# sys.path.append(os.pardir)\n# import numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.image import imread\nfrom simple_conv_net import SimpleConvNet\nfrom layers import Convolution\n\n\...
[ [ "matplotlib.image.imread", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "numpy.kaiser", "numpy.maximum", "numpy.nditer", "numpy.arange", "numpy.max", "numpy.random.permutation", "numpy.zeros_like", "numpy.exp", "numpy.tanh", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Jinming-Su/SGNet
[ "fcf35edaf332c1a4e2713acad5a0fc0e21509c3e" ]
[ "datasets/mmdet_tusimple/mmdet/ops/bbox_dis/bbox_dis.py" ]
[ "import torch\ndef cal_S(points):\n \n \"\"\"\n #计算N个四边形的面积\n points:torch.Tensor() with shape (N, 4, 2)\n \"\"\"\n x = points[..., 0]\n y = points[..., 1]\n x1 = x.roll(1, dims = 1)\n y1 = y.roll(1, dims = 1)\n# y1 = y[:, [1, 2, 3, 0]]\n# x1 = x[:, [1, 2, 3, 0]]\n return torch...
[ [ "torch.abs", "torch.div", "torch.tan", "torch.max", "torch.cat", "torch.min", "torch.zeros_like", "torch.sum", "torch.gather", "torch.stack", "torch.argsort" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
davidheryanto/feast
[ "72cc8bd2cd0040f7bc44df255f95bad00cacd720" ]
[ "sdk/python/tests/sdk/test_importer.py" ]
[ "# Copyright 2018 The Feast Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or ...
[ [ "pandas.read_csv", "pandas.Series" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
harpolea/swerve
[ "a6d67ce2cc7ecb938dac9e417beba56e81fc77f2" ]
[ "plot.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nplt.switch_backend('agg')\nfrom matplotlib import animation, cm\nfrom numpy.linalg import inv\nfrom mpl_toolkits.mplot3d import Axes3D\nimport tables as tb\nimport subprocess\nfrom scipy.optimize import brentq\nimport sys\n\ndef quick_plot(input_filename=None, f...
[ [ "numpy.swapaxes", "matplotlib.cm.viridis_r", "numpy.amax", "numpy.sqrt", "numpy.linspace", "numpy.isnan", "matplotlib.pyplot.switch_backend", "numpy.set_printoptions", "numpy.amin", "numpy.reshape", "numpy.linalg.inv", "matplotlib.pyplot.savefig", "matplotlib.py...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ucgmsim/IM_calculation
[ "13bc55bd8fcd073d77ae9a64584af64cb78d3895" ]
[ "setup_local_4_unit_tests.py" ]
[ "\"\"\"\nThis should only be used for installing the cython code locally for the unit tests,\nin all other scenarios IM_calculation should be installed as a package using\nsetup.py (which will builds the cython code automatically)\ncommand: python setup_rspectra.py build_ext --inplace\n\"\"\"\nfrom distutils.core i...
[ [ "numpy.get_include" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
TerenceWangh/course
[ "6bb26097aca8124f07314857b07f78870293045b", "6bb26097aca8124f07314857b07f78870293045b" ]
[ "vision/assignment1/cs231n/classifiers/neural_net.py", "vision/assignment1/cs231n/classifiers/k_nearest_neighbor.py" ]
[ "from __future__ import print_function\n\nfrom builtins import range\nfrom builtins import object\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom past.builtins import xrange\n\nclass TwoLayerNet(object):\n \"\"\"\n A two-layer fully-connected neural network. The net has an input dimension of\n N...
[ [ "numpy.square", "numpy.random.choice", "numpy.argmax", "numpy.mean", "numpy.random.randn", "numpy.exp", "numpy.zeros", "numpy.sum" ], [ "numpy.square", "numpy.dot", "numpy.sqrt", "numpy.bincount", "numpy.argsort", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
corva-ai/pyswarms
[ "392e17a0bce799e43dceed0942d5a2f98bb86599" ]
[ "pyswarms/backend/operators.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"\nSwarm Operation Backend\n\nThis module abstracts various operations in the swarm such as updating\nthe personal best, finding neighbors, etc. You can use these methods\nto specify how the swarm will behave.\n\"\"\"\n\n# Import standard library\nimport logging\n\n# Import modules\...
[ [ "numpy.concatenate", "numpy.random.uniform", "numpy.repeat", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jgroehl/simpa
[ "e56f0802e5a8555ee8bb139dd4f776025e7e9267" ]
[ "simpa/core/device_digital_twins/detection_geometries/ithera_invision_array.py" ]
[ "# SPDX-FileCopyrightText: 2021 Computer Assisted Medical Interventions Group, DKFZ\n# SPDX-FileCopyrightText: 2021 Janek Groehl\n# SPDX-License-Identifier: MIT\nimport numpy as np\n\nfrom simpa.core.device_digital_twins import DetectionGeometryBase\nfrom simpa.utils import Tags\n\n\nclass iTheraInvision256TFDetect...
[ [ "numpy.min", "numpy.asarray", "numpy.subtract", "numpy.linalg.norm", "numpy.max" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
chunnlp/text_gen
[ "b4ee8fe1ef01c2fe9ad981365111bdfb636e70e7" ]
[ "text_generator.py" ]
[ "import time\n\nimport numpy as np\nimport tensorflow as tf\nimport data_reader\n\nfrom tensorflow.python.client import device_lib\n\nflags = tf.flags\nlogging = tf.logging\n\nflags.DEFINE_string('model', 'medium', 'model config')\nflags.DEFINE_string('data_path', 'data', 'path to data')\nflags.DEFINE_string('save_...
[ [ "tensorflow.get_variable", "tensorflow.device", "tensorflow.concat", "tensorflow.python.client.device_lib.list_local_devices", "tensorflow.reduce_sum", "tensorflow.global_variables", "tensorflow.contrib.rnn.LSTMBlockCell", "numpy.exp", "tensorflow.summary.scalar", "tensorfl...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
ziqizh/adversarial-robustness-toolbox
[ "548febd02770bf06d9e0bb34974b3d98ec889865" ]
[ "tests/detection/test_detector.py" ]
[ "# MIT License\n#\n# Copyright (C) IBM Corporation 2018\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the\n# rights to use, copy, ...
[ [ "numpy.concatenate", "numpy.array", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
robmodini/pyanno_voting
[ "822291deb1a62ddf548d9a3af011313a55bb5537" ]
[ "pyanno/tests/test_voting.py" ]
[ "import unittest\nimport numpy as np\n\nfrom pyanno import voting\nfrom pyanno.voting import MISSING_VALUE as MV\nfrom pyanno.voting import PyannoValueError\n\n\nclass TestVoting(unittest.TestCase):\n\n def test_labels_count(self):\n annotations = [\n [1, 2, MV, MV],\n [MV, MV, 3, ...
[ [ "numpy.array", "numpy.testing.assert_array_almost_equal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kruskod/self-attentive-parser
[ "601a2e51e7c60c8bb7bfbe71728a0e10ca9605dd" ]
[ "src/main.py" ]
[ "import argparse\nimport itertools\nimport os.path\nimport time\n\nimport torch\nimport torch.optim.lr_scheduler\n\nimport numpy as np\n\nimport evaluate\nimport trees\nimport vocabulary\nimport nkutil\nimport parse_nk\ntokens = parse_nk\n\ndef torch_load(load_path):\n if parse_nk.use_cuda:\n return torch...
[ [ "torch.optim.Adam", "torch.optim.lr_scheduler.ReduceLROnPlateau", "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.cuda.empty_cache", "numpy.random.shuffle", "torch.nn.utils.clip_grad_norm_", "torch.cuda.is_available", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
murning/facing-the-music
[ "d72cf71e46b652b004d8e1a784adb9e5066a7691" ]
[ "src/features/gcc_phat_preprocess.py" ]
[ "import pandas as pd\nimport librosa\nimport numpy as np\nimport multiprocessing as mp\nfrom custom_timer import Timer\nfrom gccphat import gcc_phat\nimport data_cnn_format as cnn\nfrom keras.utils.np_utils import to_categorical\nfrom tqdm import tqdm\n\npbar = tqdm()\n\ndf = pd.read_csv(\"wav_data/data_labels.csv\...
[ [ "numpy.asarray", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
Thomas-Galtier/distributed-learning-contributivity
[ "984060ea3b2437517380e77c6694194f7abaa58e" ]
[ "mnist_fl_examples/mnist_baseline.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Aug 30 15:33:15 2019\n\n@author: RGOUSSAULT\ninspired from: https://keras.io/examples/mnist_cnn/\n\"\"\"\n\nfrom __future__ import print_function\nimport keras\nfrom keras.datasets import mnist\nimport matplotlib.pyplot as plt\nfrom sklearn.model_selection import tra...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.imshow", "matplotlib.pyplot.gray", "matplotlib.pyplot.title", "sklearn.model_selection.train_test_split", "numpy.random.shuffle", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "numpy.array_sp...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Hambbuk/McCree-demo
[ "412ec86cfb1b0bb1d5bd6d5536dc6fa040a8be8b" ]
[ "main.py" ]
[ "import json\nfrom PIL import Image\n\nimport torch\nfrom torchvision import transforms\n\nfrom pytorch_pretrained_vit import ViT\n\nmodel_name = 'B_16_imagenet1k'\nmodel = ViT(model_name, pretrained=True)\n\nimg = Image.open('bear.jpg')\n\n# Preprocess image\ntfms = transforms.Compose([transforms.Resize(model.imag...
[ [ "torch.topk", "torch.softmax", "torch.no_grad" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
caseypen/MAE_298_Final_Project
[ "66c96aabc7bbcfe070c5170c03d5f6b5196b31bb" ]
[ "system_estimate.py" ]
[ "import numpy as np\nfrom filterpy.kalman import KalmanFilter\nfrom system_dynamics import non_linearized_model, measurement, UKF_model, UKF_measurement\nfrom filterpy.kalman import UnscentedKalmanFilter, JulierSigmaPoints\nfrom filterpy.common import Q_discrete_white_noise\n\nclass KF_estimate(object):\n \"\"\"...
[ [ "numpy.dot", "numpy.copy", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
b-tilston/object_detection
[ "d822f330f08197c0aa36c6cb22dfa2a8d0beb775" ]
[ "Object_detection_image.py" ]
[ "######## Image Object Detection Using Tensorflow-trained Classifier #########\n#\n# Author: Evan Juras\n# Date: 1/15/18\n# Description: \n# This program uses a TensorFlow-trained neural network to perform object detection.\n# It loads the classifier and uses it to perform object detection on an image.\n# It draws ...
[ [ "tensorflow.Graph", "numpy.expand_dims", "tensorflow.import_graph_def", "tensorflow.gfile.GFile", "numpy.squeeze", "tensorflow.Session", "tensorflow.GraphDef" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
abhishek1015/MT-TS-Net
[ "f927f64cddd790ce1ddf07cbbd93ada332f96ba3" ]
[ "code/ext/CLAM/models/model_mil.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom utils.utils import initialize_weights\nimport numpy as np\n\nclass MIL_fc(nn.Module):\n def __init__(self, gate = True, size_arg = \"small\", dropout = False, n_classes = 2, top_k=1):\n super(MIL_fc, self).__init__()\n asse...
[ [ "torch.nn.Sequential", "torch.nn.functional.softmax", "torch.nn.Dropout", "torch.nn.Linear", "torch.cuda.is_available", "torch.topk", "torch.nn.ReLU", "torch.index_select" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
pfdamasceno/tutorials
[ "ef59c3794adbed5d929132f9dc51968580de5141" ]
[ "self_supervised_pretraining/ssl_script_train.py" ]
[ "import os\nimport json\nimport time\nimport torch\nimport matplotlib.pyplot as plt\n\nfrom torch.nn import L1Loss\nfrom monai.utils import set_determinism, first\nfrom monai.networks.nets import ViTAutoEnc\nfrom monai.losses import ContrastiveLoss\nfrom monai.data import DataLoader, Dataset\nfrom monai.transforms ...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.subplot", "matplotlib.pyplot.grid", "matplotlib.pyplot.close", "torch.device", "torch.nn.L1Loss", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wanglikuan/test-csl
[ "4ac0fe555db11c60e50cb17d2336338a5706efe9" ]
[ "src/plotting.py" ]
[ "#!/usr/bin/python3\n\n\"\"\"plotting.py Contains some plotting functions\n\nFor the ID2223 Scalable Machine Learning course at KTH Royal Institute of\nTechnology\"\"\"\n\n__author__ = \"Xenia Ioannidou and Bas Straathof\"\n\n\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom typing impo...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
disorn-inc/Project_Structure
[ "2200c9d52b9b2953a054eedf45084881e16b697b", "2200c9d52b9b2953a054eedf45084881e16b697b" ]
[ "core_program/yolo_part/yolo-camera/yolo-3-camera.py", "core_program/yolo_part/yolo-camera/yolo-rs.py" ]
[ "\n\n\"\"\"\nCourse: Training YOLO v3 for Objects Detection with Custom Data\nSection-2\nObjects Detection in Real Time with YOLO v3 and OpenCV\nFile: yolo-3-camera.py\n\"\"\"\n\n\n# Detecting Objects in Real Time with OpenCV deep learning library\n#\n# Algorithm:\n# Reading stream video from camera --> Loading YO...
[ [ "numpy.array", "numpy.argmax" ], [ "numpy.array", "numpy.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
CarrotzRule123/kenken-solver
[ "a5f81e0e96446195f64b60a67a7dce9544ce2d84" ]
[ "cv/tesseract.py" ]
[ "import cv2\nimport numpy as np\n\nsprites = cv2.imread(\"../assets/spritesheet.png\", 0)\ndigits = {\n \"0\":sprites[:,0:17],\n \"1\":sprites[:,17:31],\n \"2\":sprites[:,31:50],\n \"3\":sprites[:,50:68],\n \"4\":sprites[:,68:89],\n \"5\":sprites[:,89:109],\n \"6\":sprites[:,109:127],\n \"7\...
[ [ "numpy.where", "numpy.hypot" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Jiahui-Gu/SCINet
[ "e4f53c7c50864132a0820eca8db542bc0d2b99a1" ]
[ "experiments/exp_financial.py" ]
[ "import os\nimport math\nimport time\nimport warnings\nwarnings.filterwarnings('ignore')\n\nimport numpy as np\n\nimport torch\nimport torch.nn as nn\nfrom torch import optim\nfrom torch.utils.data import DataLoader\nfrom torch.autograd import Variable\nfrom torch.utils.tensorboard import SummaryWriter\nfrom metric...
[ [ "torch.cat", "torch.tensor", "torch.no_grad", "torch.nn.L1Loss", "torch.nn.MSELoss" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
namyouth/MI2RLNet
[ "1b17723706207d5f841e72d9a0bebfd6ec831c07" ]
[ "medimodule/Chest/module.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport cv2\nimport os\nimport sys\nimport SimpleITK as sitk\nfrom ..base import BaseModule\nfrom .viewpoint_classification.load_model import build_view_classifier\nfrom .enhance_classification.load_model import build_enhanceCT_classifier\n\nclass ViewpointClassi...
[ [ "numpy.expand_dims", "numpy.min", "numpy.squeeze", "numpy.percentile", "numpy.ones", "numpy.concatenate", "numpy.copy", "numpy.argmax", "numpy.zeros", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
GaryYufei/ACL2021MF
[ "e2ffb8688c2789512993fdfc4af0688dada211d5" ]
[ "dataset/e2e_dataset.py" ]
[ "from torch.utils.data import Dataset, DataLoader\nfrom dataset.data_utils import *\nimport sys\nimport json\nimport copy\nfrom tqdm import tqdm\nimport random\n\nclass E2EDataset(Dataset):\n\t\n\tdef __init__(self, config, json_path, tokenizer, copy_vocab, is_training=False):\n\t\tsuper(E2EDataset, self).__init__(...
[ [ "torch.utils.data.DataLoader" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ashawkey/pytorch_ddp_example
[ "9579a5d50c839c89823b831dcf27d60dca33adba" ]
[ "provider.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn.functional as F\nimport albumentations as A\nimport cv2\n\n#!pip install nnAudio\nfrom nnAudio.Spectrogram import CQT1992v2\n\nfrom utils import convert_image_id_2_path\n\nclass DataRetriever(torch.utils.data.Dataset):\n def __init__(self, paths, targets):\n ...
[ [ "numpy.ascontiguousarray", "torch.from_numpy", "numpy.stack", "torch.tensor", "numpy.random.uniform", "numpy.max", "numpy.load", "numpy.flip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
MerdanBay/PythonRobotics
[ "71de5d038f348d347d7b5dc00c914d523cd59f92", "71de5d038f348d347d7b5dc00c914d523cd59f92" ]
[ "SLAM/GraphBasedSLAM/graph_based_slam.py", "Localization/particle_filter/particle_filter.py" ]
[ "\"\"\"\n\nGraph based SLAM example\n\nauthor: Atsushi Sakai (@Atsushi_twi)\n\nRef\n\n[A Tutorial on Graph-Based SLAM]\n(http://www2.informatik.uni-freiburg.de/~stachnis/pdf/grisetti10titsmag.pdf)\n\n\"\"\"\nimport sys\nimport os\nsys.path.append(os.path.dirname(os.path.abspath(__file__)) + \"/../utils/\")\n\nimpor...
[ [ "numpy.hstack", "numpy.linalg.inv", "matplotlib.pyplot.cla", "matplotlib.pyplot.gcf", "matplotlib.pyplot.plot", "numpy.deg2rad", "numpy.identity", "numpy.random.randn", "matplotlib.pyplot.grid", "matplotlib.pyplot.axis", "scipy.spatial.transform.Rotation.from_euler", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.5", "1.2", "1.3", "1.4" ], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
minimario/CNN-Cert
[ "85c3c9b2a46cafa7184130f2596c5f9eb3b20bff" ]
[ "CLEVER/process_log.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nprocess_log.py\n\nprocess log files generated by clever.py\n\nCopyright (C) 2017-2018, IBM Corp.\nCopyright (C) 2017, Lily Weng <twweng@mit.edu>\n and Huan Zhang <ecezhang@ucdavis.edu>\n\nThis program is licenced under the Apache 2.0 licence,...
[ [ "pandas.to_numeric", "pandas.DataFrame.from_dict" ] ]
[ { "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": [] } ]
pkienzle/msdnet
[ "a4c5ac0764c282b894fbc9286000cdacc59b587a" ]
[ "msdnet/data.py" ]
[ "#-----------------------------------------------------------------------\n#Copyright 2019 Centrum Wiskunde & Informatica, Amsterdam\n#\n#Author: Daniel M. Pelt\n#Contact: D.M.Pelt@cwi.nl\n#Website: http://dmpelt.github.io/msdnet/\n#License: MIT\n#\n#This file is part of MSDNet, a Python implementation of the\n#Mix...
[ [ "numpy.ascontiguousarray", "numpy.arange", "numpy.rot90", "numpy.random.RandomState" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wangx26/SSD_SIXray_homework
[ "09dd276891c1e4833f5e445a2d4ea331d59332c7" ]
[ "ssd.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom layers import *\nfrom data import sixray\nimport os\n\n\nclass SSD(nn.Module):\n \"\"\"Single Shot Multibox Architecture\n The network is composed of a base VGG network followed by the\n added m...
[ [ "torch.nn.Softmax", "torch.load", "torch.nn.ModuleList", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.no_grad", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]