repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
erexhepa/MONAI
[ "98210a266db428a0769fde260dda0703b1c4ea95", "98210a266db428a0769fde260dda0703b1c4ea95", "98210a266db428a0769fde260dda0703b1c4ea95" ]
[ "examples/segmentation_3d/unet_training_dict.py", "tests/test_integration_segmentation_3d.py", "tests/test_png_saver.py" ]
[ "# Copyright 2020 MONAI Consortium\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/licenses/LICENSE-2.0\n# Unless required by applicable law or agreed to i...
[ [ "numpy.eye", "torch.utils.data.DataLoader", "torch.no_grad", "torch.utils.tensorboard.SummaryWriter", "torch.cuda.is_available", "torch.device" ], [ "torch.load", "torch.manual_seed", "numpy.eye", "torch.no_grad", "torch.cuda.is_available", "numpy.testing.assert...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tahesse/trickster
[ "d22072bebbebff319c724806d583bfa982d429be" ]
[ "trickster/rollout/trajectory.py" ]
[ "from typing import Union\n\nimport numpy as np\n\nfrom .abstract import RolloutBase\nfrom ..agent.abstract import RLAgentBase\nfrom ..utility import history, render_utils\nfrom .. import callbacks as _cbs\n\n\nclass Trajectory(RolloutBase):\n\n \"\"\"Generate complete trajectories for Monte Carlo learning or te...
[ [ "numpy.std", "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tszdanger/torch_grammartest
[ "ac199a9ddcfe4aaf8893fb5285f85efd725ad6d9" ]
[ "jd_fenci.py" ]
[ "#抓取网页内容用的程序包\nimport json\nimport requests\n\n#PyTorch用的包\nimport torch\nimport torch.nn as nn\nimport torch.optim\nfrom torch.autograd import Variable\n\n# 自然语言处理相关的包\nimport re #正则表达式的包\nimport jieba #结巴分词包\nfrom collections import Counter #搜集器,可以让统计词频更简单\n\n#绘图、计算用的程序包\nimport matplotlib.pyplot as plt\nimport n...
[ [ "numpy.array", "matplotlib.pyplot.legend", "torch.nn.NLLLoss", "torch.nn.LogSoftmax", "torch.max", "matplotlib.pyplot.figure", "torch.tensor", "matplotlib.pyplot.plot", "torch.nn.Linear", "torch.FloatTensor", "numpy.mean", "matplotlib.pyplot.xlabel", "torch.nn.R...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ElPapi42/MNIST-Classifier
[ "9bfdb970c10f6c07b4339ecd97b3436590cbe2a9" ]
[ "DigitsClassifier.py" ]
[ "import tensorflow as tf\nimport tensorflow.keras.layers as layers\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nclass ConvBlock(tf.keras.layers.Layer):\n \"\"\"Convolutional Block featuring Conv2D + Pooling\"\"\"\n\n def __init__(self, conv_deep=1, kernel...
[ [ "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.MaxPool2D", "tensorflow.keras.layers.BatchNormalization", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.Flatten" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.6", "2.4", "2.3", "2.5", "2.2" ] } ]
DeepPSP/cpsc2020
[ "47acb884ea1f2f819e564d8a17ad37001ed0df27" ]
[ "references/cpsc2019/CPSC0416_1st_qrs9214_hr9489/CPSC2019_challenge.py" ]
[ "import numpy as np\n\ndef CPSC2019_challenge(result):\n pos = np.argwhere(result>0.5).flatten()\n rpos = []\n pre = 0\n last = len(pos)\n # to intervals of qrs\n for j in np.where(np.diff(pos)>2)[0]:\n if j-pre>2: # duration > 2 * (8 * 2 ms)\n rpos.append((pos[pre]+pos[j])*4) ...
[ [ "numpy.delete", "numpy.array", "numpy.diff", "numpy.argwhere" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
harika-24/Image-Processing-and-Machine-Learning-using-Parallel-Computing
[ "b13b8f20551a9d5960b146713182b167e35d65e7" ]
[ "knn_try.py" ]
[ "import math\nfrom sklearn import neighbors\nimport os\nimport os.path\nimport pickle\nfrom PIL import Image, ImageDraw\nimport face_recognition\nfrom face_recognition.face_recognition_cli import image_files_in_folder\n\nALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg'}\n\n\ndef train(train_dir, model_save_path=None, n_n...
[ [ "sklearn.neighbors.KNeighborsClassifier" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cbrnr/pybv
[ "0088662504098cd117e5b36c2f256c4580d1fe1f" ]
[ "pybv/io.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"BrainVision writer.\"\"\"\n\n# Authors: Phillip Alday <phillip.alday@unisa.edu.au>\n# Chris Holdgraf <choldgraf@berkeley.edu>\n# Stefan Appelhoff <stefan.appelhoff@mailbox.org>\n# Tristan Stenner <stenner@med-psych.uni-kiel.de>\n# Clemens Brunner <...
[ [ "numpy.format_float_positional", "numpy.issubdtype", "numpy.ones", "numpy.atleast_1d", "numpy.atleast_2d", "numpy.max", "numpy.any" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
shijing001/Text_classifier
[ "21402ba4ab46e55df40285546775507c6d6933c8" ]
[ "examples/run_20news_label.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may...
[ [ "torch.load", "torch.utils.data.DataLoader", "torch.no_grad", "torch.nn.Embedding.from_pretrained", "torch.cuda.manual_seed_all", "torch.cuda.is_available", "torch.device", "torch.distributed.get_rank", "sklearn.datasets.fetch_20newsgroups", "torch.save", "torch.distrib...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
deep1185/ga-learner-dsmp-repo
[ "74ebe2f5eac359076976db5f8788415d1c17ff8c" ]
[ "Titanic/code.py" ]
[ "# --------------\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import MinMaxScaler\nimport pandas as pd\nimport warnings\nwarnings.filterwarnings('ignore')\n# Code starts here\ndf=pd.read_csv(path)\ndf.head(5)\n# Dependent variable\ny = df['attr1089']\n# Independent variable\nX ...
[ [ "sklearn.metrics.roc_auc_score", "pandas.read_csv", "sklearn.linear_model.LogisticRegression", "sklearn.ensemble.RandomForestClassifier", "sklearn.model_selection.train_test_split", "sklearn.ensemble.VotingClassifier", "sklearn.tree.DecisionTreeClassifier", "sklearn.metrics.classif...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
LongTailBio/pangea-django
[ "630551dded7f9e38f95eda8c36039e0de46961e7" ]
[ "client-programs/contrib/metagenscope/metagenscope/modules/volcano.py" ]
[ "\nimport pandas as pd\nimport math\nfrom scipy.stats import mannwhitneyu\nfrom pangea_api import (\n Sample,\n SampleAnalysisResultField,\n SampleGroupAnalysisResultField,\n SampleGroup,\n)\n\nfrom ..base_module import Module\nfrom ..data_utils import (\n group_samples_by_metadata,\n sample_modul...
[ [ "scipy.stats.mannwhitneyu" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "0.16", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "1.0", "0.17", "1.3", "1.8" ...
robertjkerr/Monte-Carlo-Math-Tools
[ "a78dbe9e2ce1832d187afd298cec8778d8c9c0bc" ]
[ "mctools/modules/integrate.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\n@author: Robert Kerr\r\n\r\nMonte Carlo Integration function \r\n\"\"\"\r\n\r\nimport numpy as _np\r\nfrom itertools import product as _product\r\nfrom functools import lru_cache as _lru_cache\r\n\r\n\"\"\"\r\nAllocation subroutines. Assists with parallelisation.\r\n\"\"\"\r\n\...
[ [ "numpy.array", "numpy.random.rand" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Xx-Ashutosh-xX/WellcomeML
[ "133089c072cb4e7bd8e841796ef7643846d5d7af" ]
[ "examples/voting_classifier_ensemble.py" ]
[ "from sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.multiclass import OneVsRestClassifier\nfrom sklearn.linear_model import SGDClassifier\nfrom sklearn.naive_bayes import MultinomialNB\n\nfrom wellcomeml.ml.voting_classifier import WellcomeVotingClassifier\n\nX = [\n \"One two\",\n \"On...
[ [ "sklearn.feature_extraction.text.CountVectorizer", "sklearn.naive_bayes.MultinomialNB", "sklearn.linear_model.SGDClassifier" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
skeydan/probability
[ "64107deba2aa0a5029f2288cf67f87f0237209fd" ]
[ "tensorflow_probability/python/layers/distribution_layer_test.py" ]
[ "# Copyright 2018 The TensorFlow Probability 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 a...
[ [ "tensorflow.convert_to_tensor", "tensorflow.concat", "numpy.linspace", "tensorflow.zeros", "numpy.asarray", "tensorflow.keras.layers.InputLayer", "numpy.random.randn", "tensorflow.compat.v1.initializers.constant", "tensorflow.pad", "tensorflow.rank", "numpy.exp", "t...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
jon-young/ParallelTest
[ "eb24e2634c402a8cc74794ae89b4b8a7c5dc2209" ]
[ "parallel_test.py" ]
[ "__author__ = 'jyoung'\n\nimport multiprocessing as mp\nimport numpy\nimport time\n\ndef sum_range_serial(start, end):\n return numpy.sum(numpy.arange(start, end+1))\n\ndef sum_range_par(start, end, output):\n output.put(numpy.sum(numpy.arange(start, end+1)))\n\nsumLimit = int(input('Enter a number to sum to:...
[ [ "numpy.arange", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
CommanderPho/pyPhoPlaceCellAnalysis
[ "6e6a5cd9c0f2abbe6a367d4c87299fcd01c750a6" ]
[ "src/pyphoplacecellanalysis/PhoPositionalData/import_data.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Oct 9 12:33:48 2021\n\n@author: Pho\n\"\"\"\n\nimport numpy as np\nimport pandas as pd\nfrom pathlib import Path\n\nfrom pyphoplacecellanalysis.PhoPositionalData.load_exported import import_mat_file\n# from pyphoplacecellanalysis.PhoPositionalData.process_data impor...
[ [ "numpy.arange", "numpy.shape", "numpy.interp", "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": [] } ]
axelmagn/vertex-mlops-template
[ "0dbc939e8454ca7d0b7e146efae3d7bed3b90383" ]
[ "mlops_manager/templates-old/app/examples/fashion-mnist/__APP_NAME__/__APP_NAME__/trainers/fashion_mnist/task.py" ]
[ "\"\"\"\nFashion MNIST trainer function.\n\nNOTE: this is a monolithic script for the purpose of prototyping.\nTODO: break down into modular components\n\"\"\"\n\nimport logging\nimport os\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom ...cli import task, arg\n\n\n@task([\n arg('--width', type=int, defau...
[ [ "tensorflow.keras.losses.SparseCategoricalCrossentropy", "tensorflow.io.gfile.GFile", "tensorflow.keras.layers.Dense", "tensorflow.keras.callbacks.TensorBoard", "numpy.load", "tensorflow.keras.layers.Flatten" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.6", "2.4", "2.3", "2.5", "2.2" ] } ]
kmckiern/pyquil
[ "e8189cadeafd5b1a234c25ed5eeebab61dd268c8", "e8189cadeafd5b1a234c25ed5eeebab61dd268c8" ]
[ "pyquil/api/_qpu.py", "pyquil/api/_qvm.py" ]
[ "##############################################################################\n# Copyright 2016-2018 Rigetti Computing\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#\...
[ [ "numpy.frombuffer", "numpy.zeros" ], [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
NCI-DOE-Cababilities-Transfer/DOE-NCI-Pilot1-Learning
[ "152a6e256304d7e4adfe73e7c8ad8e05d2b160e0" ]
[ "LearningCurves/lrn_crv.py" ]
[ "\"\"\"\nFunctions to generate learning curves.\nRecords performance (error or score) vs training set size.\n\nTODO: move utils.calc_scores to a more local function.\n\"\"\"\nimport os\nimport sys\nfrom pathlib import Path\nfrom collections import OrderedDict\n\nimport sklearn\nimport numpy as np\nimport pandas as ...
[ [ "sklearn.metrics.roc_auc_score", "sklearn.externals.joblib.dump", "sklearn.metrics.r2_score", "numpy.linspace", "numpy.squeeze", "sklearn.metrics.mean_absolute_error", "pandas.DataFrame", "sklearn.metrics.mean_squared_error", "sklearn.model_selection.KFold", "numpy.mean", ...
[ { "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": [ "1.7", "1.0", "0.10", "1.2", "0.1...
popgengent/gnomix
[ "6caf793761a3a40b315e0e93d301434d3f249a31" ]
[ "src/Smooth/cnn.py" ]
[ "import numpy as np\nimport torch\nfrom torch import nn\n\nclass LAIDataset(torch.utils.data.Dataset):\n \n def __init__(self, data, labels):\n self.labels = labels\n self.data = data\n\n def __len__(self):\n return len(self.data)\n\n def __getitem__(self, index):\n\n # selec...
[ [ "torch.nn.Sequential", "torch.nn.Dropout", "numpy.swapaxes", "torch.nn.Softmax", "torch.nn.NLLLoss", "torch.mean", "numpy.asarray", "torch.utils.data.DataLoader", "torch.tensor", "numpy.copy", "torch.nn.Conv1d", "torch.log", "numpy.transpose", "numpy.array",...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zmk5/multi_robot_trainer
[ "b85f668c1302040717d0129f092558279bec5237" ]
[ "mrt_server/mrt_server/policy/actor_critic.py" ]
[ "\"\"\"Actor-Critic model class for RL experiments with neural net function approx.\n\nWritten by: Zahi Kakish (zmk5)\n\"\"\"\nfrom typing import List\n\nimport numpy as np\n\nfrom tensorflow.keras.optimizers import Adam\n\nfrom mrt_msgs.srv import Gradients\nfrom mrt_msgs.srv import Weights\n\nfrom mrt_server.poli...
[ [ "numpy.array", "tensorflow.keras.optimizers.Adam" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.2", "2.3", "2.4", "2.5", "2.6" ] } ]
rdarie/elephant
[ "9f327d042a54531117ddf36c732262d4e78a5d85" ]
[ "elephant/test/test_cubic.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nUnit tests for the CUBIC analysis.\n\n:copyright: Copyright 2016 by the Elephant team, see `doc/authors.rst`.\n:license: Modified BSD, see LICENSE.txt for details.\n\"\"\"\n\nimport sys\nimport unittest\n\nimport neo\nimport numpy\nimport quantities as pq\n\nimport elephant.cubic a...
[ [ "numpy.array", "numpy.tile" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
gopalm-ai/Machine-Learning-For-Finance
[ "2a07f9190cc58c1e540899ad97597a5bd9172b1c" ]
[ "Regression Based Machine Learning for Algorithmic Trading/Pairs Trading - Lasso Regression.py" ]
[ "'''\r\nLasso Regression\r\n\r\n'''\r\n\r\nimport numpy as np\r\nimport pandas as pd\r\nfrom zipline.utils import tradingcalendar\r\nimport pytz\r\nfrom sklearn import linear_model\r\nreg = linear_model.Lasso(alpha = .1)\r\n\r\ndef initialize(context):\r\n # Quantopian backtester specific variables\r\n set_sl...
[ [ "numpy.hstack", "numpy.ndarray", "sklearn.linear_model.Lasso" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
matham/nsniff
[ "9751f67f0144e549207bf84f10c65b4f6543c95d" ]
[ "nsniff/widget.py" ]
[ "import numpy as np\nfrom typing import List, Dict, Optional, Tuple\nfrom matplotlib import cm\nfrom kivy_trio.to_trio import kivy_run_in_async, mark, KivyEventCancelled\nfrom pymoa_remote.threading import ThreadExecutor\nfrom base_kivy_app.app import app_error\nfrom kivy_garden.graph import Graph, ContourPlot, Lin...
[ [ "numpy.linspace", "numpy.min", "numpy.asarray", "numpy.clip", "numpy.logspace", "numpy.power", "numpy.logical_or", "numpy.max", "numpy.log10", "numpy.any", "matplotlib.cm.get_cmap" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Cher-B/ivy
[ "95273172201071ebf7b83d56bb314450ebe41071" ]
[ "ivy/functional/backends/torch/core/math.py" ]
[ "\"\"\"\nCollection of PyTorch math functions, wrapped to fit Ivy syntax and signature.\n\"\"\"\n\n# global\nimport math\nimport torch as _torch\n\n\ndef sin(x):\n if isinstance(x, float):\n return math.sin(x)\n return _torch.sin(x)\n\n\ndef cos(x):\n if isinstance(x, float):\n return math.co...
[ [ "torch.tan", "torch.sin", "torch.asinh", "torch.atan2", "torch.acosh", "torch.tanh", "torch.cosh", "torch.asin", "torch.acos", "torch.sinh", "torch.log", "torch.exp", "torch.atanh", "torch.erf", "torch.atan", "torch.cos" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mauricemager/multiagent_robot
[ "b8d8158fb7ffbb29116aaab03d8a47a60aac6482", "b8d8158fb7ffbb29116aaab03d8a47a60aac6482" ]
[ "robot/robot_scenarios/simple_robot.py", "robot/robot_scenarios/pick_and_drop.py" ]
[ "import numpy as np\nimport math\nfrom robot.robot_core import Robot, Robotworld, Landmark\nfrom multiagent.scenario import BaseScenario\n\nnp.random.seed(2)\n\nclass Scenario(BaseScenario):\n def make_world(self):\n # define scenario properties\n num_agents = 1\n num_objects = 1\n nu...
[ [ "numpy.random.seed", "numpy.linalg.norm", "numpy.ones", "numpy.random.rand", "numpy.ndarray.tolist", "numpy.array" ], [ "numpy.linalg.norm", "numpy.ones", "numpy.random.rand", "numpy.ndarray.tolist", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
UT-Austin-RPL/GIGA
[ "4c51610cbbf3556941f8b2ac1c3d4d7850cca44b", "4c51610cbbf3556941f8b2ac1c3d4d7850cca44b" ]
[ "scripts/sim_grasp_multiple.py", "src/vgn/ConvONets/eval.py" ]
[ "import argparse\nimport numpy as np\nimport json\nfrom pathlib import Path\n\nfrom vgn.detection import VGN\nfrom vgn.detection_implicit import VGNImplicit\nfrom vgn.experiments import clutter_removal\nfrom vgn.utils.misc import set_random_seed\n\n\ndef main(args):\n\n if args.type in ['giga', 'giga_aff']:\n ...
[ [ "numpy.std", "numpy.mean" ], [ "numpy.abs", "numpy.sqrt", "numpy.linspace", "numpy.asarray", "numpy.logical_and", "numpy.linalg.norm", "numpy.array", "numpy.sum", "numpy.empty", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
givenone/MichiGAN
[ "67c48da53e0a038273150f26baf9127e906a7f3f" ]
[ "models/networks/base_network.py" ]
[ "\"\"\"\r\nCopyright (C) University of Science and Technology of China.\r\nLicensed under the MIT License.\r\n\"\"\"\r\n\r\nimport torch.nn as nn\r\nfrom torch.nn import init\r\n\r\n\r\nclass BaseNetwork(nn.Module):\r\n def __init__(self):\r\n super(BaseNetwork, self).__init__()\r\n\r\n @staticmethod\r...
[ [ "torch.nn.init.constant_", "torch.nn.init.xavier_normal_", "torch.nn.init.normal_", "torch.nn.init.orthogonal_", "torch.nn.init.xavier_uniform_", "torch.nn.init.kaiming_normal_" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
bioidiap/bob.io.video
[ "4aaf0b2197200d7e31ef1d5d2be341ea52f37c5e" ]
[ "bob/io/video/script/video_test.py" ]
[ "#!/usr/bin/env python\n# vim: set fileencoding=utf-8 :\n# Andre Anjos <andre.dos.anjos@gmail.com>\n# Thu 14 Mar 17:53:16 2013\n\n\"\"\"This program can run manual tests using any video codec available in Bob. It\ncan report standard distortion figures and build video test sequences for\nmanual inspection. It tries...
[ [ "numpy.ndarray", "numpy.prod" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
learningsimulator/learningsimulator
[ "79b00bb0155537a4219637e68d5092fd10a1017f" ]
[ "tests/test_run.py" ]
[ "import matplotlib.pyplot as plt\n\nfrom .testutil import LsTestCase, run\n\n\nclass TestBasic(LsTestCase):\n @classmethod\n def setUpClass(cls):\n pass\n\n def setUp(self):\n pass\n\n def tearDown(self):\n plt.close('all')\n\n def test_simple(self):\n text = '''\n ...
[ [ "matplotlib.pyplot.close" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Sanjaykkukreja/AIML
[ "3d17ecbf5d59db47fece39f9180916ea4d44aa65" ]
[ "HackathonOne/appModel/Order.py" ]
[ "from . import Record_audio\nimport numpy as np\nimport warnings\nimport os\nimport joblib\nwarnings.filterwarnings(\"ignore\")\n\nBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\nn_mfcc = 30\nn_mels = 128\nframes = 15\n\nlist_task = [['Idly', ' Dosa', ' Wada', 'Puri ', 'Chapathi'],[0, 1, 2...
[ [ "numpy.reshape", "numpy.amax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kefirski/pytorch_TDNN
[ "a4e50c110d1b4f52a465b2a1d13b30a7ff567d0c" ]
[ "TDNN/tdnn.py" ]
[ "import torch as t\nfrom torch.nn import Parameter\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass TDNN(nn.Module):\n def __init__(self, kernels, input_embed_size, bias=False):\n \"\"\"\n :param kernels: array of pairs (width, out_dim)\n :param input_embed_size: size of in...
[ [ "torch.nn.functional.conv1d", "torch.Tensor", "torch.cat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
yuliangguo/bop_toolkit_cosypose
[ "046728dcf1a01a739900ec77dc4754ba3f6eb56e" ]
[ "scripts/eval_calc_errors.py" ]
[ "# Author: Tomas Hodan (hodantom@cmp.felk.cvut.cz)\n# Center for Machine Perception, Czech Technical University in Prague\n\n\"\"\"Calculates error of 6D object pose estimates.\"\"\"\n\nimport os\nimport time\nimport argparse\nimport copy\nimport numpy as np\n\nfrom bop_toolkit_lib import config\nfrom bop_toolkit_l...
[ [ "numpy.arange", "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": [], ...
hanson-young/hdface
[ "527b9ccadf3d44d59f547f81ed2b563b033099de" ]
[ "hdface/models.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass PNet(nn.Module):\n ''' PNet '''\n\n def __init__(self, is_train=False, use_cuda=True):\n super(PNet, self).__init__()\n self.is_train = is_train\n self.use_cuda = use_cuda\n\n # backend\n self.pre...
[ [ "torch.nn.PReLU", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ShapRL/ShapRL
[ "11327bb5e3b2f2e6ac3a631097bd712f13b9d275", "11327bb5e3b2f2e6ac3a631097bd712f13b9d275", "11327bb5e3b2f2e6ac3a631097bd712f13b9d275" ]
[ "batch_rl/fixed_replay/run_experiment_test_buffer.py", "batch_rl/fixed_replay/replay_memory/circular_replay_buffer.py", "batch_rl/fixed_replay/run_experiment_test_one.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Dopamine Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
[ [ "tensorflow.compat.v1.ConfigProto", "tensorflow.compat.v1.disable_v2_behavior", "numpy.clip", "tensorflow.compat.v1.global_variables_initializer", "tensorflow.compat.v1.Session", "tensorflow.compat.v1.get_collection", "tensorflow.name_scope", "tensorflow.compat.v1.train.Saver", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
alexander-g/vkJAX
[ "8ef0105891ee41734293b2f1a8c247957018d7c2" ]
[ "tests/test_function.py" ]
[ "import vkjax\nimport numpy as np\nimport jax\n\nGLOBAL_VAR = 0\n\ndef func0(x):\n global GLOBAL_VAR\n GLOBAL_VAR = x\n return x+1\n\n\ndef test_function_basic():\n vk_func = vkjax.Function(func0)\n assert vk_func(65)==66\n assert vk_func(-5)==-4\n\n\ndef test_shape_checking():\n global GLOBAL_...
[ [ "numpy.arange", "numpy.zeros", "numpy.allclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Gurkengewuerz/OpenSfM
[ "bb0be52a22313572a6dc4f0b2701bf918af1ecef" ]
[ "opensfm/pairs_selection.py" ]
[ "import copy\nimport logging\nimport math\nfrom collections import defaultdict\nfrom itertools import combinations\nfrom typing import Optional, Tuple, List, Set, Dict, Iterable, Any\n\nimport numpy as np\nimport scipy.spatial as spatial\nfrom opensfm import bow, context, feature_loader, vlad, geo, geometry\nfrom o...
[ [ "numpy.polyfit", "numpy.min", "numpy.median", "scipy.spatial.Delaunay", "numpy.max", "numpy.random.rand", "numpy.argsort", "numpy.array", "scipy.spatial.cKDTree", "numpy.fabs" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jthielen/xarray
[ "10f0227a1667c5ab3c88465ff1572065322cde77" ]
[ "xarray/plot/utils.py" ]
[ "import itertools\nimport textwrap\nimport warnings\nfrom datetime import datetime\nfrom inspect import getfullargspec\nfrom typing import Any, Iterable, Mapping, Tuple, Union\n\nimport numpy as np\nimport pandas as pd\n\nfrom ..core.options import OPTIONS\nfrom ..core.utils import is_scalar\n\ntry:\n import nc_...
[ [ "numpy.take", "numpy.linspace", "numpy.asarray", "numpy.issubdtype", "matplotlib.pyplot.get_cmap", "numpy.concatenate", "matplotlib.colors.from_levels_and_colors", "numpy.all", "matplotlib.pyplot.gca", "numpy.arange", "matplotlib.ticker.LinearLocator", "numpy.diff",...
[ { "matplotlib": [], "numpy": [ "1.10", "1.12", "1.11", "1.19", "1.13", "1.16", "1.9", "1.18", "1.20", "1.7", "1.15", "1.14", "1.17", "1.8" ], "pandas": [], "scipy": [], "tensorflow": [] } ]
chrissullivanecon/pyRVtest
[ "ac9a5ca408e64695c3c452ef7584eaf43a5e8d9a" ]
[ "pyRVtest/economies/economy.py" ]
[ "\"\"\"Economy underlying the BLP model.\"\"\"\r\n\r\nimport abc\r\nimport collections.abc\r\nfrom typing import Any, Dict, Hashable, List, Mapping, Optional, Sequence, Tuple, Union\r\n\r\nimport numpy as np\r\n\r\nfrom .. import exceptions, options\r\nfrom ..configurations.formulation import Formulation, Absorb, M...
[ [ "numpy.asarray", "numpy.shape" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
katosh/pymc3
[ "38fa415c15b0c0469fbd9cad3a3b9ba974fc8733" ]
[ "pymc3/tests/test_mixture.py" ]
[ "import pytest\nimport numpy as np\nfrom numpy.testing import assert_allclose\n\nfrom .helpers import SeededTest\nimport pymc3 as pm\nfrom pymc3 import Dirichlet, Gamma, Normal, Lognormal, Poisson, Exponential, \\\n Mixture, NormalMixture, MvNormal, sample, Metropolis, Model\nimport scipy.stats as st\nfrom scipy...
[ [ "numpy.diag", "numpy.sqrt", "numpy.asarray", "numpy.concatenate", "numpy.random.randn", "numpy.exp", "numpy.ones_like", "numpy.reshape", "numpy.arange", "numpy.atleast_1d", "numpy.random.poisson", "numpy.random.multinomial", "numpy.diff", "scipy.stats.expon....
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jbell1991/reddit-scraping
[ "73d88501ed0205e78000b9c30780a33186154fda" ]
[ "submissions_comments.py" ]
[ "# imports\nfrom decouple import config\nimport pandas as pd\nimport praw\nimport psycopg2\nimport schedule\nfrom sqlalchemy import create_engine\nimport time\n\n\ndef job():\n current_day = time.strftime(\"%m/%d/%Y\")\n print(f\"Performing job on {current_day}\")\n startTime = time.time()\n\n # connect...
[ [ "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": [] } ]
Raabia-Asif/luke
[ "9323b216dd5f72b61545bc4133f7709fd19bfa95" ]
[ "examples/entity_typing/main.py" ]
[ "import json\nimport logging\nimport os\nfrom argparse import Namespace\n\nimport click\nimport torch\nfrom torch.utils.data import DataLoader, RandomSampler\nfrom torch.utils.data.distributed import DistributedSampler\nfrom tqdm import tqdm\nfrom transformers import WEIGHTS_NAME\nfrom luke.utils.entity_vocab impor...
[ [ "torch.utils.data.distributed.DistributedSampler", "torch.load", "torch.cat", "torch.nn.utils.rnn.pad_sequence", "torch.utils.data.DataLoader", "torch.cuda.empty_cache", "torch.distributed.barrier", "torch.utils.data.RandomSampler", "torch.tensor", "torch.no_grad", "tor...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
da03/OpenNMT-py
[ "234e1ef16f388ddd5bbd86578cdc2a6fc9efe181" ]
[ "onmt/model_builder.py" ]
[ "\"\"\"\nThis file is for models creation, which consults options\nand creates each encoder and decoder accordingly.\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nfrom torch.nn.init import xavier_uniform_\n\nimport onmt.inputters as inputters\nimport onmt.modules\nfrom onmt.encoders.rnn_encoder import RNNEncoder\...
[ [ "torch.device", "torch.nn.init.xavier_uniform_", "torch.nn.LogSoftmax", "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
fatiando/harmonica
[ "c4e832b09da2d25c847552cc0ba701cf801724ed" ]
[ "harmonica/gravity_corrections.py" ]
[ "# Copyright (c) 2018 The Harmonica Developers.\n# Distributed under the terms of the BSD 3-Clause License.\n# SPDX-License-Identifier: BSD-3-Clause\n#\n# This code is part of the Fatiando a Terra project (https://www.fatiando.org)\n#\n\"\"\"\nGravity corrections like Normal Gravity and Bouguer corrections.\n\"\"\"...
[ [ "numpy.logical_not", "numpy.array", "numpy.full" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tarsoly/NaoTH
[ "dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52" ]
[ "Utils/py/ActionSelection/tools/potential_field.py" ]
[ "from __future__ import division\n\nimport numpy as np\nimport pickle\nimport copy\n\n# from evaluation.potentialfield_generated_plot import cleanup_nan_values\n\nfrom . import field_info as field\nfrom .action import Category\nfrom .action import ActionResults\n\n# BUG: this is a cyclic inclusion\n# NOTE: without ...
[ [ "numpy.arctan2", "numpy.exp", "numpy.abs", "numpy.hypot" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cadop/seg1d
[ "f5de3949da1fee71110435c5700c4774a03fedb1" ]
[ "seg1d/examples/ex_ecg.py" ]
[ "'''\nIn this example we use the ECG data included with scipy signal module. \nThe references roughly includes the Q-T interval (https://en.wikipedia.org/wiki/Electrocardiography).\nIn the first portion, two sample segments are used. While the segments are not aligned, they are able to find some segments correctly....
[ [ "matplotlib.pyplot.tight_layout", "numpy.asarray", "numpy.around", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "scipy.misc.electrocardiogram", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.6", "1.10", "1.4", "1.9", "1.5", "1.2", "1.7", "1.3", "1.8" ], "tensorflow": [] } ]
fumish/LearningModels
[ "d4b46082625d52122b046369d872864e64b2e489" ]
[ "hypsecant_related/HyperbolicSecantMixtureModelVB.py" ]
[ "## standard libraries\nimport sys\nsys.path.append(\"../lib\")\nimport math\nimport itertools\nfrom abc import ABCMeta, abstractmethod\n\n## 3rd party libraries\nimport numpy as np\nfrom scipy.special import gammaln, psi, multigammaln\nfrom scipy.stats import multivariate_normal\nfrom sklearn.base import BaseEstim...
[ [ "numpy.diag", "numpy.log", "numpy.sqrt", "numpy.random.seed", "numpy.abs", "numpy.ones", "numpy.random.normal", "numpy.floor", "scipy.special.gammaln", "numpy.repeat", "numpy.exp", "scipy.special.psi" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jparkerholder/ES
[ "cee031f601986b8f0c2f634d7e7c9f4b69e3f912" ]
[ "es/shared_noise.py" ]
[ "\n\nimport ray\nimport numpy as np\n\n@ray.remote\ndef create_shared_noise():\n \"\"\"\n Create a large array of noise to be shared by all workers. Used \n for avoiding the communication of the random perturbations delta.\n \"\"\"\n\n seed = 12345\n count = 25000000\n noise = np.random.RandomS...
[ [ "numpy.random.RandomState" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
s-matrix/smpr3d
[ "f11c36c37bba749fe8aeb43f6cfbf303ab817064" ]
[ "examples/reconstruct_simul_data_big.py" ]
[ "from smpr3d.util import *\nfrom smpr3d.algorithm import *\nfrom smpr3d.setup import *\nimport torch as th\nimport os\nimport numpy as np\n\n# salloc -C gpu -N 2 -t 30 -c 10 --gres=gpu:8 -A m1759 --ntasks-per-node=8\n# srun -N 2 python ./admm_smatrix_dist_pytorch.py\n# module purge\n# module load pytorch/v1.4.0-gpu...
[ [ "numpy.fft.ifft2", "torch.zeros", "torch.sqrt", "torch.zeros_like", "numpy.linalg.norm", "torch.fft.ifft2", "torch.tensor", "torch.arange", "numpy.array", "torch.ones_like", "torch.as_tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sands-lab/grace
[ "cb411f7364b519700e9c1ffa3cae48dc76885e4c" ]
[ "patch_files/horovod/torch/optimizer.py" ]
[ "# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n# Modifications copyright Microsoft\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/l...
[ [ "torch.zeros_like" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
CristianCrispini/TesiLaurea
[ "7c0db4da1d48c6739877cfce2037f3b2929bad67" ]
[ "pyFusion/models/vgg16.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torchvision.models.vgg import vgg16\n\nclass VGG16(torch.nn.Module):\n def __init__(self, device='cpu'):\n super(VGG16, self).__init__()\n\n # Livelli Convoluzionali non si fa uso del classificatore\n features = list...
[ [ "torch.nn.ModuleList" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
joannachuang/2019_summer_joanna
[ "1773cbad88cc2b7ebf20cebbd97d2988919372e6" ]
[ "pylily/0409/0409/0708.py" ]
[ "import json\nimport sqlite3\nfrom datetime import datetime\nimport os\n\nimport Lily.ctao.database as cdb\nimport Lily.crawler.url_string as url\nimport requests\nimport pandas as pd\nimport numpy\nimport io\n\n\n\ndf = pd.read_html('''https://taipeicity.github.io/traffic_realtime/''', header = 0)\n\n#for i in ran...
[ [ "pandas.read_html" ] ]
[ { "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": [] } ]
dimitrios-ebi/gene_symbol_classifier
[ "fe415f719fda4619041b9fe0639996c92e0f12a8" ]
[ "notebooks/real_life_assignments_statistics_plotly.py" ]
[ "# ---\n# jupyter:\n# jupytext:\n# formats: ipynb,py:percent\n# text_representation:\n# extension: .py\n# format_name: percent\n# format_version: '1.3'\n# jupytext_version: 1.11.3\n# kernelspec:\n# display_name: Python 3\n# language: python\n# name: python3\n# ---\n\n...
[ [ "pandas.read_csv", "numpy.linspace" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
alan-turing-institute/QUIPP-workflow
[ "db97911f2330902a2fc9156b9380a56199adf3f0" ]
[ "synth-methods/SDV/SDV_pipeline.py" ]
[ "# # SDV pipeline\n# \n# SDV (Synthetic Data Vault) is a Python library (https://github.com/HDI-Project/SDV) that allows users to statistically model an entire multi-table, relational dataset. Users can then use the statistical model to generate a synthetic dataset. \n# \n# Underneath the hood it uses a unique hier...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
kylebystrom/pawpyseed
[ "75af563cff82ed7c4fad272a36b24d4e14d83ae6" ]
[ "pawpyseed/core/tests/test_core.py" ]
[ "import os\nimport subprocess\nimport sys\n\nimport numpy as np\nfrom nose import SkipTest\nfrom nose.tools import nottest\nfrom numpy.testing import assert_almost_equal, assert_equal, assert_raises\nfrom scipy.interpolate import CubicSpline\nfrom scipy.special import factorial2 as fac2\nfrom scipy.special import l...
[ [ "numpy.sqrt", "numpy.linspace", "numpy.cumsum", "scipy.special.spherical_jn", "numpy.max", "numpy.mean", "numpy.exp", "numpy.trapz", "numpy.testing.assert_equal", "scipy.special.sph_harm", "numpy.sin", "numpy.testing.assert_almost_equal", "numpy.copy", "scip...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.6", "1.10", "1.4", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "1.0", "1.3", "1.8" ], "tensorflow": [] } ]
onso19/AVmod
[ "93e2404560a194a3376b15c04f5bc9653c864e85" ]
[ "converter/face_transformer.py" ]
[ "from .color_correction import *\nimport cv2\nimport numpy as np\n\n\nclass FaceTransformer(object):\n \"\"\"\n Attributes:\n path_func: string, direction for the transformation: either AtoB or BtoA.\n model: the generator of the faceswap-GAN model\n \"\"\"\n def __init__(self): \n ...
[ [ "numpy.array", "numpy.zeros_like", "numpy.clip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dome272/Vector-Quantization
[ "c78808e5187930a978afc221be97ac0705293eca" ]
[ "VQ-VAE/functions.py" ]
[ "import torch\r\nfrom torch.autograd import Function\r\n\r\n\r\nclass VQ(Function):\r\n @staticmethod\r\n def forward(ctx, inputs, codebook):\r\n with torch.no_grad():\r\n inputs_size = inputs.size()\r\n inputs_flatten = inputs.view(-1, codebook.size(1))\r\n\r\n codeboo...
[ [ "torch.min", "torch.sum", "torch.zeros_like", "torch.no_grad", "torch.index_select" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
carnby/corex_topic
[ "f5b46f88f1efdb5d21180575a339f6a6e1cc2b02" ]
[ "corextopic/vis_topic.py" ]
[ "\"\"\" This module implements some visualizations based on CorEx representations.\n\"\"\"\n\nimport os\nfrom shutil import copyfile\nimport codecs\nimport numpy as np\nimport matplotlib\nmatplotlib.use('Agg') # to create visualizations on a display-less server\nimport pylab\nimport networkx as nx\nimport textwrap\...
[ [ "numpy.matrix", "numpy.dot", "numpy.sqrt", "numpy.asarray", "numpy.seterr", "numpy.mean", "scipy.sparse.vstack", "numpy.where", "numpy.unique", "numpy.clip", "sklearn.feature_extraction.text.CountVectorizer", "numpy.std", "matplotlib.pyplot.close", "numpy.co...
[ { "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"...
xian0gang/rknn-toolkit
[ "fc2a3f1813940061c79c2f11ea17d836c93475e9" ]
[ "examples/common_function_demos/load_quantized_model/onnx/test.py" ]
[ "import os\nimport time\nimport sys\nimport numpy as np\nimport cv2\nfrom rknn.api import RKNN\n\n\nONNX_MODEL = 'shufflenet-v2_quant.onnx'\nIMG_PATH = 'dog_224x224.jpg'\nRKNN_MODEL = './shufflenet-v2_quant.rknn'\n\n\ndef show_outputs(outputs):\n output = outputs[0][0]\n output_sorted = sorted(output, reverse...
[ [ "numpy.exp", "numpy.array", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
pauldhein/bank-telemarketing-classifier
[ "c2603e0d3905229851106a1720ed55856f329aef" ]
[ "source/utils.py" ]
[ "from typing import List, Dict, Tuple\n\nimport pandas as pd\n\nfrom sklearn.metrics import (\n accuracy_score,\n precision_score,\n recall_score,\n f1_score,\n roc_auc_score,\n)\n\n\ndef load_Xy_dataset(dataset_path: str) -> Tuple[pd.DataFrame, pd.DataFrame]:\n \"\"\"Load a dataset into a pandas ...
[ [ "sklearn.metrics.roc_auc_score", "pandas.read_csv", "sklearn.metrics.precision_score", "sklearn.metrics.f1_score", "sklearn.metrics.recall_score", "sklearn.metrics.accuracy_score" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
saper0/scikit-hubness
[ "a50507fe791d8712db46347056f159f18aeb31fa" ]
[ "skhubness/neighbors/lsh.py" ]
[ "# -*- coding: utf-8 -*-\n# SPDX-License-Identifier: BSD-3-Clause\n\n# PEP 563: Postponed Evaluation of Annotations\nfrom __future__ import annotations\n\nfrom functools import partial\nimport logging\nimport sys\nfrom typing import Tuple, Union\nimport warnings\nimport numpy as np\nfrom sklearn.base import BaseEst...
[ [ "numpy.take_along_axis", "sklearn.utils.validation.check_is_fitted", "sklearn.utils.validation.check_array", "numpy.empty_like", "numpy.ones", "sklearn.utils.validation.check_X_y", "numpy.argsort", "numpy.array", "numpy.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mathcolo/t-performance-dash
[ "497fcadceda15d62d1fd6b39817306d48c2c4be5" ]
[ "server/bus/bus2train.py" ]
[ "import argparse\nimport pathlib\nimport pandas as pd\nfrom datetime import datetime\n\n\ndef load_data(input_csv, routes):\n \"\"\"\n Loads in the below format and makes some adjustments for processing.\n - Filter only points with actual trip data\n - Trim leading 0s from route_id\n - Select only ro...
[ [ "pandas.Grouper", "pandas.read_csv", "pandas.to_datetime" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
Eaw7/RunestoneServer
[ "c301f4f9adc64edd3fa0cec9dd5a74b2b5a8e540", "c301f4f9adc64edd3fa0cec9dd5a74b2b5a8e540" ]
[ "controllers/exams.py", "controllers/admin.py" ]
[ "# *********************************************\n# |docname| - Endpoints relating to assignments\n# *********************************************\n#\n# Imports\n# =======\n# These are listed in the order prescribed by `PEP 8\n# <http://www.python.org/dev/peps/pep-0008/#imports>`_.\n#\n# Standard library\n# -------...
[ [ "pandas.read_sql_query" ], [ "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": [] }, { "matplotlib": [], "nump...
tw-yshuang/NTU_2021S_ML_HW4
[ "b9560460a4531ea9c3086b608c5d357f39b09d47" ]
[ "src/data_process.py" ]
[ "import os\nimport json\nimport torch\nimport random\nfrom pathlib import Path\nfrom torch.utils.data import Dataset, DataLoader, random_split\nfrom torch.nn.utils.rnn import pad_sequence\n\n\nclass PhonemeDataset(Dataset):\n def __init__(self, data_dir, segment_len=128):\n self.data_dir = data_dir\n ...
[ [ "torch.FloatTensor", "torch.utils.data.random_split", "torch.nn.utils.rnn.pad_sequence", "torch.utils.data.DataLoader" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
momacs/localedb-py
[ "8215653acbff7bfcd6336d2a8138fba66fd7e12e" ]
[ "src/localedb/util.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Miscellaneous utilities.\"\"\"\n\nimport itertools\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n\n# ----------------------------------------------------------------------------------------------------------------------\ndef plot_init(nrows=1, ncol...
[ [ "matplotlib.pyplot.title", "numpy.min", "matplotlib.patches.Rectangle", "matplotlib.pyplot.get_cmap", "matplotlib.pyplot.subplots", "numpy.max", "matplotlib.colors._colors_full_map.values", "matplotlib.colors.cnames.values", "matplotlib.pyplot.subplots_adjust", "matplotlib....
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jychoi118/fsdl-text-recognizer-project
[ "27e02b5319fa59ac4ac840a7851c390d08c3f232" ]
[ "lab5/text_recognizer/networks/lenet.py" ]
[ "from typing import Optional, Tuple\n\nimport tensorflow as tf\nfrom tensorflow.keras.layers import Conv2D, Dense, Dropout, Flatten, Input, Lambda, MaxPooling2D, BatchNormalization\nfrom tensorflow.keras.models import Sequential, Model\n\n\ndef lenet(input_shape: Tuple[int, ...], output_shape: Tuple[int, ...]) -> M...
[ [ "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Conv2D", "tensorflow.expand_dims", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.MaxPooling2D", "tensorflow.keras.models.Sequential", "tensorflow.keras.layers.Flatten" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.2", "2.3", "2.4", "2.5", "2.6" ] } ]
llucid-97/dfa-scales-to-modern-deep-learning
[ "66efb4b4ef8a378bf01ea0e5e6794d6bb4380c97" ]
[ "paper-experiments/geometric-learning/geometric.py" ]
[ "import argparse\nimport os.path as path\nimport torch\nimport torch.nn.functional as F\nimport torch_geometric.transforms as T\n\nfrom sklearn.model_selection import StratifiedKFold\nfrom torch_geometric.datasets import Planetoid\n\nfrom models import ChebNet, DFAChebNet, GraphNet, DFAGraphNet, SplineNet, DFASplin...
[ [ "torch.cat", "torch.manual_seed", "torch.from_numpy", "sklearn.model_selection.StratifiedKFold", "torch.no_grad", "torch.cuda.is_available", "torch.device" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Project-Ellie/capsnet-fashion
[ "1dae4ee000911cf82ace19c667ad095fd447e8ae" ]
[ "src/cifar10_distr.py" ]
[ "import argparse\nimport sys\n\nimport os\nimport tensorflow as tf\nimport time\n\nfrom models.particular_mnist import dense_4_layers, MODEL_FILE\nfrom models.trainer import Params\nfrom mnist import train_batcher, test_batcher\n\ntrain_batcher.set_preprocessor(lambda x: x.reshape(-1, 784))\ntest_batcher.set_prepro...
[ [ "tensorflow.train.Server", "tensorflow.train.StopAtStepHook", "tensorflow.train.ClusterSpec", "tensorflow.train.get_or_create_global_step", "tensorflow.train.replica_device_setter", "tensorflow.global_variables_initializer", "tensorflow.train.AdamOptimizer", "tensorflow.train.Monit...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
DayGitH/Python-Challenges
[ "bc32f1332a92fcc2dfa6f5ea4d95f8a8d64c3edf" ]
[ "DailyProgrammer/20120507A.py" ]
[ "\"\"\"\nThe Monty Hall Problem [http://en.wikipedia.org/wiki/Monty_Hall_problem] is a probability brain teaser that has a\nrather unintuitive solution.\n\nThe gist of it, taken from Wikipedia:\nSuppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others,\n...
[ [ "numpy.delete", "numpy.random.permutation", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Cristina-cxq/models-1
[ "56f39f775273d57de6844cca7aa68c8223b2f607" ]
[ "resnet50/eager/train.py" ]
[ "import argparse\nimport numpy as np\nimport os\nimport time\nimport datetime\nimport shutil\nfrom tqdm import tqdm\nimport oneflow as flow\n\nimport sys\n\nsys.path.append(\".\")\nfrom models.resnet50 import resnet50\nfrom utils.ofrecord_data_utils import OFRecordDataLoader\n\n\nclass AverageMeter:\n \"\"\"Comp...
[ [ "numpy.append", "numpy.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ahnHeejune/Clothing-Matching
[ "257c679d396b397e6ba7a81ce1ae29706e1ddd06" ]
[ "1.Clothing-Texture-Alignment/2.cloth_texture_alignment_dilation.py" ]
[ "### Author: Matiur Rahman Minar ###\n### EMCOM Lab, SeoulTech, 2021 ###\n### Task: Extrapolating clothing boundary for aligning/matching texture to extended silhouette/mask ###\n### helpful for reducing artifacts in 3D clothing reconstruction ###\n### Focused method: Gray dilation ###\n\n\nimport os\nimport cv2\ni...
[ [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.yticks", "matplotlib.pyplot.title", "numpy.reshape", "numpy.ones", "matplotlib.pyplot.subplot", "numpy.float32", "matplotlib.pyplot.xticks", "numpy.array", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
andreasstegmueller/ModelCalibration
[ "945623c3a4d46ec62632273f7ec77b1f353eeea2" ]
[ "usecases/linearFunction/Correlation.py" ]
[ "import logging\nimport numpy as np\nfrom pathlib import Path\nimport os\nimport unittest\n#from bayes.vb import *\nimport matplotlib.pyplot as plt\nfrom theano_operation import LogLikeWithGrad\nimport pymc3 as pm\nimport theano.tensor as tt\nfrom collections import OrderedDict\nimport copy\nimport matplotlib.cm as...
[ [ "numpy.diag", "matplotlib.pyplot.legend", "scipy.stats.invgamma", "numpy.sqrt", "numpy.linspace", "numpy.max", "numpy.exp", "numpy.square", "numpy.random.set_state", "numpy.interp", "numpy.repeat", "numpy.log", "numpy.min", "scipy.stats.invgamma.pdf", "n...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
joeduris/openPMD-beamphysics
[ "c03c5cda7e8597af5b8781ecce1e360117b06dfb" ]
[ "pmd_beamphysics/units.py" ]
[ "\n\"\"\"\nSimple units functionality for the openPMD beamphysics records.\n\nFor more advanced units, use a package like Pint:\n https://pint.readthedocs.io/\n\n\n\"\"\"\nimport scipy.constants\n\nmec2 = scipy.constants.value('electron mass energy equivalent in MeV')*1e6\nmpc2 = scipy.constants.value('proton ma...
[ [ "numpy.array", "numpy.sqrt", "numpy.isscalar" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
valtronforever/plconv
[ "ffc0aeea932d9dfc6494a75c733325b867916432" ]
[ "plconv/convert/sokul.py" ]
[ "from pathlib import Path\nimport pandas as pd\nimport numpy as np\nfrom typing import List\nimport xlrd\n\n\ndef sokul(in_path_list: List[Path], out_path: Path):\n result_df = None\n\n for in_path in in_path_list:\n try:\n xl = pd.ExcelFile(in_path)\n except UnicodeDecodeError:\n ...
[ [ "pandas.isna", "pandas.Series", "pandas.ExcelFile" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.1", "1.5", "1.2", "0.24", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
bekirufuk/pointer_summarizer
[ "8fc9726f9337b26339848d896a09e7e8f9456bcc" ]
[ "data_util/batcher.py" ]
[ "#Most of this file is copied form https://github.com/abisee/pointer-generator/blob/master/batcher.py\n\nimport Queue\nimport time\nfrom random import shuffle\nfrom threading import Thread\n\nimport numpy as np\nimport tensorflow as tf\n\nimport config\nimport data\n\nimport random\nrandom.seed(1234)\n\n\nclass Exa...
[ [ "tensorflow.logging.error", "numpy.zeros", "tensorflow.logging.info" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
chunfengh/seq2seq
[ "cc6e1a15f523c2ead809d48b1f6eebbeb94e3f0b" ]
[ "seq2seq/decoders/conv_decoder.py" ]
[ "# Copyright 2017 Google 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 applicable law or agreed...
[ [ "tensorflow.random_uniform_initializer", "tensorflow.shape", "tensorflow.python.ops.math_ops.argmax", "tensorflow.reshape", "tensorflow.identity", "tensorflow.contrib.layers.fully_connected", "tensorflow.contrib.layers.stack", "tensorflow.contrib.layers.flatten", "tensorflow.py...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.4", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
danielvh8/RP-granzyme-B
[ "fcb29321f8ad55bfaa56e31f45eeab907e1ed1af" ]
[ "Statistics.py" ]
[ "from pathlib import Path\nfrom collections import Counter\nfrom tqdm import tqdm\nimport math\nfrom scipy.stats import norm\nimport re\nimport gzip\nfrom configparser import ConfigParser\n\nparser = ConfigParser()\nparser.read(Path('In/parameters.ini'))\n\ndef GetAcidFrequency():\n \"\"\"\n Read the ...
[ [ "scipy.stats.norm.cdf" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cbrisboi/hawc_hal
[ "4126b48fbfd8b6b99aaba3b26570cf33f5feab94" ]
[ "hawc_hal/response/response_bin.py" ]
[ "from builtins import range\nfrom builtins import object\nimport numpy as np\nimport pandas as pd\n\nfrom threeML.exceptions.custom_exceptions import custom_warnings\n\nfrom ..psf_fast import PSFWrapper, InvalidPSF, InvalidPSFError\n\n\nclass ResponseBin(object):\n \"\"\"\n Stores detector response for one de...
[ [ "numpy.zeros_like", "numpy.allclose", "pandas.Series", "numpy.isclose" ] ]
[ { "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": [] } ]
LaurinFischer/qiskit-experiments
[ "44d249ff2ec2e90cd630431f66e560528572815e" ]
[ "qiskit_experiments/library/calibration/rough_amplitude_cal.py" ]
[ "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2021.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any modifications or ...
[ [ "numpy.round", "numpy.angle" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Acforest/LogPrompt
[ "199766cea9988bc6e8b1c71352b090da68bbb71d" ]
[ "log_sample.py" ]
[ "import os\nimport argparse\nimport pandas as pd\n\nclass LogSampler:\n def __init__(self,\n log_structured_file: str,\n output_dir: str,\n log_type: str,\n sample_num: int,\n random: bool,\n random_state: int) -> Non...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
congzlwag/memetic_thin_film_py
[ "11bd29f6c2bd4880feb9e81ab08d531f98dc45cd" ]
[ "algorithm/disp_interp.py" ]
[ "from numpy import pi, sqrt, array, zeros, sin, cos, tan, linspace, \\\n concatenate, flip, interp \n \n#%%\ndef disp_interp(wvlen_in, data):\n N1 = len(wvlen_in)\n N2 = len(data[:, 0])\n \n wvlen_data = data[:, 0]\n n0 = data[:, 1]\n k0 = data[:, 2]...
[ [ "numpy.interp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
philomenec/reco-gym
[ "f8553d197f42ec2f415aefce48525d0e9b10ddaa" ]
[ "my_entries/test_agent.py" ]
[ "import numpy as np\n\nfrom recogym import Configuration, build_agent_init, to_categorical\nfrom recogym.agents import Agent\n\ntest_agent_args = {\n 'num_products': 10,\n 'with_ps_all': False,\n}\n\n\nclass TestAgent(Agent):\n \"\"\"Organic counter agent\"\"\"\n\n def __init__(self, config = Configurat...
[ [ "numpy.zeros", "numpy.matmul" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hhuang2018/HLAWholeGeneAnalysis
[ "9cdd2e062a6cc2eed2ebfa84e1888687b2b98cf3" ]
[ "scripts/ARS_M_nonARS_mm_SG41_52.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Oct 6 10:38:30 2017\n\n@author: hhuang2\n\"\"\"\n\nimport glob\nimport csv\n\nfrom utils import IMGTdbIO, CompareSeq\n\n\ngroupType = 'fiveLoci_paired' # groupType = 'ClassI_paired' # groupType = 'All_paired' ; 'fiveLoci_paired'\n\nAll_loci =...
[ [ "matplotlib.backends.backend_pdf.PdfPages", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.rc", "numpy.sin", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.close", "matplotlib.pyplot.bar", "matplotlib.pyplot.xticks", "matplotlib....
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SuhongMoon/uncertainty-baselines
[ "1a7b24f86994c7b69d9263bf47be7169736f0da9" ]
[ "baselines/jft/deterministic.py" ]
[ "# coding=utf-8\n# Copyright 2021 The Uncertainty Baselines 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# Unles...
[ [ "numpy.ones_like", "tensorflow.random.set_seed", "tensorflow.io.gfile.exists", "numpy.min", "numpy.vstack", "tensorflow.io.gfile.makedirs", "numpy.ceil", "numpy.max", "numpy.argmax", "numpy.zeros_like", "numpy.array", "tensorflow.keras.metrics.Mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.7", "2.2", "2.3", "2.4", "2.5", "2.6" ] } ]
nmud19/PropertyValuation
[ "9285029bd1f29c51b71321a46a98f97e564786ec" ]
[ "code/generate_output.py" ]
[ "from torch.utils.data import DataLoader\nfrom pytorch_lightning import Trainer\nfrom model import QuantModel\nimport pandas as pd\nfrom typing import List\nimport matplotlib.pyplot as plt\nimport shap\nimport sklearn\nimport numpy as np\n\n\nclass GenerateOutput:\n \"\"\"Calls to generate predictions and shap v...
[ [ "matplotlib.pyplot.legend", "numpy.abs", "sklearn.metrics.mean_absolute_error", "matplotlib.pyplot.savefig", "sklearn.metrics.mean_squared_error", "matplotlib.pyplot.plot", "sklearn.metrics.mean_absolute_percentage_error", "matplotlib.pyplot.clf", "matplotlib.pyplot.figure" ]...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Glaciohound/VCML
[ "5a0f01a0baba238cef2f63131fccd412e3d7822b" ]
[ "models/visualize/visualize_utils.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# File : visualize_utils.py\n# Author : Chi Han, Jiayuan Mao\n# Email : haanchi@gmail.com, maojiayuan@gmail.com\n# Date : 01.08.2019\n# Last Modified Date: 26.08.2019\n# Last Modified By : Chi Han, Jiayuan Mao\n#\n# ...
[ [ "numpy.concatenate", "sklearn.manifold.TSNE", "numpy.ndenumerate", "sklearn.decomposition.PCA" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jiaxu825/VyPy
[ "47100bad9dea46f12cb8bfa1ba86886e06f5c85d", "5acb40e8d19ea76f3cd45f9cf98f252ca15e23f6" ]
[ "trunk/VyPy/optimize/drivers/scipy/SLSQP.py", "trunk/VyPy/regression/gpr/training/Training.py" ]
[ "\r\n# ----------------------------------------------------------------------\r\n# Imports\r\n# ----------------------------------------------------------------------\r\n\r\nimport VyPy\r\nfrom VyPy.data import ibunch\r\nfrom VyPy.optimize.drivers import Driver\r\nimport numpy as np\r\nfrom time import time\r\n\r...
[ [ "numpy.empty", "numpy.squeeze", "numpy.array", "numpy.vstack" ], [ "numpy.empty", "numpy.argmin", "numpy.vstack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
LiubovSobolevskaya/hpa-single-cell
[ "ebe6d046b651a1c45095f26e99cfb13adefb63d9" ]
[ "src/preprocessing/unify_predictions_from_image_level_densenet.py" ]
[ "import sys\n\nfrom src.models.encodings_pretrained import BestfittingEncodingsModel\n\nsys.path.insert(0, '..')\nimport argparse\nimport pickle\nimport pandas as pd\nimport torch\nimport torch.optim\nfrom torch.backends import cudnn\nimport torch.nn.functional as F\nfrom albumentations import Compose, VerticalFlip...
[ [ "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": [] } ]
munakoiso/alpha-zero
[ "49d0dee93955fa4fb3c91e1291b889bea24cb30f" ]
[ "train.py" ]
[ "# MIT License\n#\n# Copyright (c) 2018 Blanyal D'Souza\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 the rights\n# to use, cop...
[ [ "numpy.reshape", "numpy.rot90" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ccolas/sentence-transformers
[ "d7235076a663114c5267b093d5c28e1fc0272f76" ]
[ "sentence_transformers/losses/ContrastiveTensionLoss.py" ]
[ "import torch\nfrom torch import nn, Tensor\nfrom typing import Iterable, Dict\nfrom ..SentenceTransformer import SentenceTransformer\nfrom .. import util\nimport copy\nimport random\nimport math\nfrom .. import InputExample\nimport numpy as np\n\nclass ContrastiveTensionLoss(nn.Module):\n \"\"\"\n This l...
[ [ "torch.nn.CrossEntropyLoss", "numpy.log", "torch.ones", "torch.matmul", "torch.nn.BCEWithLogitsLoss" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tomasfernandez1212/Copulas
[ "1163a11a090149fb8e6a2cd4a0d00356f044536b" ]
[ "copulas/univariate/gaussian_kde.py" ]
[ "\nimport numpy as np\nfrom scipy.special import ndtr\nfrom scipy.stats import gaussian_kde\n\nfrom copulas import EPSILON, store_args\nfrom copulas.optimize import bisect, chandrupatla\nfrom copulas.univariate.base import BoundedType, ParametricType, ScipyModel\n\n\nclass GaussianKDE(ScipyModel):\n \"\"\"A wrap...
[ [ "numpy.sqrt", "scipy.special.ndtr", "numpy.min", "numpy.unique", "numpy.full", "numpy.max", "scipy.stats.gaussian_kde", "numpy.std", "numpy.any", "numpy.array", "numpy.zeros" ] ]
[ { "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"...
merantix/mxlabs-daain
[ "0e87df5dd6e678939374dfadf44fc360d34425bb", "0e87df5dd6e678939374dfadf44fc360d34425bb" ]
[ "src/daain/trainer/data.py", "src/daain/backbones/esp_dropout_net/trainer/iou_eval.py" ]
[ "import torch\nimport torchvision\nfrom torch.utils.data import DataLoader, random_split\n\nfrom daain.data import ActivationDataset\nfrom daain.data.datasets import get_split_sizes\n\n\ndef _get_zarr_root(dataset_data, attack_name, mask, submask):\n return dataset_data[f\"/{mask}/{submask}/{attack_name}\"]\n\n\...
[ [ "torch.eye", "torch.utils.data.DataLoader", "torch.Tensor" ], [ "torch.isnan", "torch.zeros", "torch.tensor", "torch.flatten", "torch.diag", "torch.device" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
joseph-d-p/altair
[ "661cf9ff556ab8df3ea4371734a554237d2f6e7f" ]
[ "altair/utils/core.py" ]
[ "\"\"\"\nUtility routines\n\"\"\"\nimport collections\nfrom copy import deepcopy\nimport json\nimport itertools\nimport re\nimport sys\nimport traceback\nimport warnings\n\nimport jsonschema\nimport six\nimport pandas as pd\nimport numpy as np\n\nfrom .schemapi import SchemaBase, Undefined\n\ntry:\n from pandas....
[ [ "pandas.lib.infer_dtype", "numpy.issubdtype", "numpy.isinf" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
grovina/deep101
[ "3ea7b93e91b0cceed17fa9535c5477084eac8064" ]
[ "mnist_min.py" ]
[ "from tensorflow.examples.tutorials.mnist import input_data\n\nimport tensorflow as tf\n\n\n# Geral\ntf.set_random_seed(1)\nxavier = tf.contrib.layers.xavier_initializer()\n\n# Dados\nmnist = input_data.read_data_sets('.')\n\n# Modelo\nx = tf.placeholder(tf.float32, [None, 784])\n\nwith tf.name_scope('single'):\n ...
[ [ "tensorflow.matmul", "tensorflow.losses.sparse_softmax_cross_entropy", "tensorflow.zeros", "tensorflow.cast", "tensorflow.placeholder", "tensorflow.global_variables_initializer", "tensorflow.train.GradientDescentOptimizer", "tensorflow.contrib.layers.xavier_initializer", "tenso...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
cfe316/atomic
[ "e9e264301bb8b4ccfe5b23a32c3e361cc140cdba" ]
[ "atomic/tests/test_collisional_radiative.py" ]
[ "import unittest\nimport numpy as np\nimport atomic\n\nclass TestCollRadEquilibrium(unittest.TestCase):\n def setUp(self):\n \"\"\"This is more of an Integration Test than a unit test.\"\"\"\n self.ad = atomic.element('Li')\n self.eq = atomic.CollRadEquilibrium(self.ad)\n\n def test___ini...
[ [ "numpy.array", "numpy.sum", "numpy.testing.assert_array_almost_equal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ramarty/GOST_PublicGoods
[ "de9cf36e37208eaf69253e784833990ceeb1058a" ]
[ "Urbanization/GOST_Urban/rasterMisc.py" ]
[ "################################################################################\n# Miscellaneous Raster functions\n# Benjamin Stewart, September 2018\n# Purpose: Collect a number of useful raster functions in one place\n################################################################################\n\nimport sys...
[ [ "numpy.ma.masked_where", "numpy.empty", "numpy.unique" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Mistobaan/tpu
[ "cbbe780d157e8ee3b1b481f3963daa881dfcdf5d" ]
[ "models/official/detection/serving/detection.py" ]
[ "# Lint as: python2, python3\n# 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/...
[ [ "tensorflow.compat.v1.estimator.export.ServingInputReceiver", "tensorflow.compat.v1.estimator.EstimatorSpec", "tensorflow.compat.v1.expand_dims", "tensorflow.compat.v1.estimator.tpu.TPUEstimatorSpec", "tensorflow.compat.v1.cast", "tensorflow.compat.v1.identity" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
magwenelab/mini-term-2016
[ "b1e92901729dfb7ac484ceb5c89cd99e554f23bd" ]
[ "hill-fxn-wlogic.py" ]
[ "import platform\n\nimport matplotlib\nif 'Darwin' in platform.platform(): # on OSX\n matplotlib.use('TkAgg')\nimport numpy as np\n\nimport pylab\nimport matplotlib.pyplot as plt\nfrom matplotlib.widgets import Slider, Button, RadioButtons, MultiCursor\n\n\ndef hillfxn(x, B, K, n):\n xn = float(x**n)\n re...
[ [ "matplotlib.widgets.MultiCursor", "numpy.linspace", "matplotlib.use", "matplotlib.pyplot.subplots", "matplotlib.pyplot.axes", "matplotlib.widgets.Slider", "matplotlib.pyplot.subplots_adjust", "matplotlib.widgets.RadioButtons" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kzhangnd/dataset_curation
[ "1edcf07ed32d7b5b191a72dbd37d3433f201c7de" ]
[ "stage_2_efficient.py" ]
[ "import numpy as np\nfrom sklearn.metrics.pairwise import cosine_similarity\nimport argparse\nfrom os import path, makedirs\nfrom datetime import datetime\nfrom tqdm import tqdm\n\n\nPROBE_FILE = None\nPROBE = None\nPROBE_O = None\nMETRIC = None\n\n\ndef skip_diag(A): #remove the diagonal element of a matrix\n ...
[ [ "numpy.arange", "sklearn.metrics.pairwise.cosine_similarity", "numpy.argmax", "numpy.diff", "numpy.savetxt", "numpy.zeros", "numpy.loadtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dok529/smart-social-distancing
[ "fd054c92cf478cefd5326c7beaa288b24dd5110f", "2b71c4330420758a3ff6833923cf2ef81cdebdb1" ]
[ "libs/metrics/base.py", "libs/metrics/social_distancing.py" ]
[ "import os\nimport csv\nimport numpy as np\nimport pandas as pd\nimport logging\n\nfrom collections import deque\nfrom datetime import date, datetime, timedelta, time\nfrom typing import Dict, List, Iterator\n\nfrom libs.utils.loggers import get_source_log_directory, get_area_log_directory, get_source_logging_inter...
[ [ "numpy.polyfit", "pandas.read_csv", "pandas.to_datetime", "pandas.date_range", "numpy.array", "numpy.zeros" ], [ "numpy.floor", "numpy.zeros", "numpy.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wsdea/MKWii-bot
[ "a981bd58ae41770451cdc326a21447367bc923f3" ]
[ "utils.py" ]
[ "# Done by Frannecklp\n\nimport cv2\nimport numpy as np\nimport win32gui, win32ui, win32con, win32api\nimport matplotlib.pyplot as plt\nimport pickle\nimport os,shutil\n\nbox = (45,37,912,511)\ndef grab_screen(region=box):\n\n hwin = win32gui.GetDesktopWindow()\n\n if region:\n left,top,x2,y2 = reg...
[ [ "matplotlib.pyplot.imshow", "numpy.fromstring", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]