repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list | possible_versions list |
|---|---|---|---|---|---|
IPL-UV/gp_error_propagation | [
"5d37b4bc48b3fc9521d819970ba24b8bb8ea5b16"
] | [
"paper_egp/utils.py"
] | [
"import numpy as np \nfrom sklearn.utils import check_X_y, check_array\nfrom scipy.spatial.distance import pdist\nfrom sklearn.metrics import mean_absolute_error, mean_squared_error, r2_score\nfrom scipy.stats import pearsonr, spearmanr\nimport scipy as scio\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\n... | [
[
"sklearn.metrics.mean_absolute_error",
"sklearn.metrics.r2_score",
"sklearn.metrics.mean_squared_error"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
alexminnaar/pyprof | [
"974a0bda42df4a016cdc434b4a0096cae469f076"
] | [
"pyprof/examples/custom_func_module/custom_module.py"
] | [
"#!/usr/bin/env python3\n\nimport torch\nimport torch.cuda.profiler as profiler\nimport pyprof\npyprof.init()\n\nclass Foo(torch.nn.Module):\n def __init__(self, size):\n super(Foo, self).__init__()\n self.n = torch.nn.Parameter(torch.ones(size))\n self.m = torch.nn.Parameter(torch.ones(size... | [
[
"torch.cuda.profiler.start",
"torch.ones",
"torch.autograd.profiler.emit_nvtx",
"torch.cuda.profiler.stop"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
latstars/mmdetectionCV2019 | [
"79575ad41f79c191be30f1e24feffc39aac3ca1c"
] | [
"mmdet/models/anchor_heads/free_anchor_retina_cosine_head.py"
] | [
"import torch\nimport torch.nn.functional as F\n\n# @latstars\nimport numpy as np\n\nfrom mmdet.core import bbox2delta, bbox_overlaps, delta2bbox\nfrom ..registry import HEADS\nfrom .retina_head import RetinaHead\n\n\n@HEADS.register_module\nclass FreeAnchorRetinaCosineHead(RetinaHead):\n\n def __init__(self,\n ... | [
[
"torch.sigmoid",
"torch.cat",
"torch.sin",
"torch.topk",
"torch.zeros_like",
"torch.sparse_coo_tensor",
"torch.exp",
"torch.tensor",
"torch.no_grad",
"torch.nonzero",
"torch.arange",
"torch.stack",
"torch.clamp",
"torch.ones_like",
"torch.sparse.sum"
]... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
kaionwong/infectious-disease-agent-based-modeling | [
"b6b6e188b91a160df2ba17db1802fa22f2150ca1"
] | [
"prediction_graphs.py"
] | [
"import os\nimport datetime\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom matplotlib.dates import DateFormatter\n\ncurr_dir = os.getcwd()\nproject_result_dir = '\\\\project_result'\nfull_project_result_dir = curr_dir+project_result_dir+'\\\\'\ninput_filename_core = 'disease_model_merged_data_vFinal_p'... | [
[
"matplotlib.dates.DateFormatter",
"pandas.to_datetime",
"pandas.read_csv",
"pandas.concat",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.xlabel",
"pandas.set_option",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
briana-jin-zhang/spatial-segmentation | [
"17e4a93dad1369ceb4d91c4564a93c99af398c77",
"17e4a93dad1369ceb4d91c4564a93c99af398c77"
] | [
"demos/GCAMatting/networks/encoders/res_shortcut_enc.py",
"demos/GCAMatting/utils/evaluate.py"
] | [
"import torch.nn as nn\r\nfrom ...utils import CONFIG\r\nfrom ..encoders.resnet_enc import ResNet_D\r\nfrom ..ops import SpectralNorm\r\n\r\n\r\nclass ResShortCut_D(ResNet_D):\r\n\r\n def __init__(self, block, layers, norm_layer=None, late_downsample=False):\r\n super(ResShortCut_D, self).__init__(b... | [
[
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.nn.ReLU"
],
[
"numpy.ones_like",
"numpy.abs",
"numpy.sqrt",
"numpy.arange",
"numpy.bincount",
"numpy.exp",
"numpy.zeros",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
tux-coder/asteroid | [
"d9c76ec728dc95ef695daf5743f21750c3218e0a",
"d9c76ec728dc95ef695daf5743f21750c3218e0a"
] | [
"egs/avspeech/looking-to-listen/model.py",
"egs/wham/DynamicMixing/utils/get_training_stats.py"
] | [
"import torch\nimport numpy as np\nfrom torch import nn\nimport torchvision\nimport torch.nn.functional as F\nfrom pathlib import Path\nfrom asteroid import torch_utils\nfrom asteroid.engine.optimizers import make_optimizer\nfrom asteroid.filterbanks import transforms\n\n\n# Reference: https://github.com/bill9800/s... | [
[
"torch.nn.BatchNorm1d",
"torch.nn.Dropout",
"torch.transpose",
"torch.load",
"torch.zeros",
"torch.nn.LSTM",
"torch.cat",
"torch.zeros_like",
"torch.exp",
"torch.nn.Linear",
"torch.nn.DataParallel",
"torch.nn.init.xavier_uniform_",
"torch.log",
"torch.nn.fun... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
martinResearch/trimesh | [
"d851c6a4583c920c9c9c9924dbbfd09ad83539d6"
] | [
"trimesh/util.py"
] | [
"\"\"\"\nutil.py\n-----------\n\nStandalone functions which require only imports from numpy and the\nstandard library.\n\nOther libraries may be imported must be wrapped in try/except blocks\nor imported inside of a function\n\"\"\"\n\nimport numpy as np\n\nimport abc\nimport sys\nimport copy\nimport json\nimport b... | [
[
"numpy.dot",
"numpy.linspace",
"numpy.cumsum",
"numpy.dtype",
"numpy.concatenate",
"numpy.arctan2",
"numpy.round",
"numpy.cross",
"numpy.hstack",
"numpy.clip",
"numpy.fliplr",
"numpy.arange",
"numpy.finfo",
"numpy.sin",
"numpy.frombuffer",
"numpy.cei... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
stephano41/pytorch-template | [
"0fd4ccf6b890404680044f23bd86e74ed6c43233"
] | [
"train.py"
] | [
"import argparse\nimport collections\nimport time\nimport math\nimport torch\nimport numpy as np\nimport data_loader.data_loaders as module_data\nimport model.loss as module_loss\nimport model.metric as module_metric\nimport model.model as module_arch\nfrom parse_config import ConfigParser\nimport trainer as module... | [
[
"torch.manual_seed",
"torch.nn.DataParallel",
"numpy.random.seed"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
zoeyingz/DeepTreeAttention | [
"580e9dffbab1fb51faf1f29505897e0b5cf5693a",
"37fee251f77c8f974c039294c417919997275569"
] | [
"DeepTreeAttention/callbacks/callbacks.py",
"experiments/Trees/demo_prepare_field_data.py"
] | [
"#Callbacks\n\"\"\"Create training callbacks\"\"\"\n\nimport os\nimport numpy as np\nimport pandas as pd\n\nfrom datetime import datetime\nfrom DeepTreeAttention.utils import metrics\nfrom DeepTreeAttention.visualization import visualize\nfrom tensorflow.keras.callbacks import ReduceLROnPlateau\nfrom tensorflow.ker... | [
[
"tensorflow.keras.callbacks.ReduceLROnPlateau",
"numpy.concatenate",
"numpy.argmax",
"tensorflow.keras.callbacks.TensorBoard",
"numpy.vstack"
],
[
"pandas.concat"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"2.7",
"2.6",
"2.4",
"2.3",
"2.5",
"2.2"
]
},
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
... |
vikeshpandey/amazon-sagemaker-edge-manager-workshop | [
"7e8a09fc0870f08a3c4afc33c13a3dbdaf3e8cb3"
] | [
"lab/simulator/simulator.py"
] | [
"# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\r\n# SPDX-License-Identifier: MIT-0\r\nimport time\r\nimport pandas as pd\r\nimport subprocess\r\nimport ipywidgets as widgets\r\nimport logging\r\nimport numpy as np\r\nimport os\r\nimport signal\r\nfrom turbine import WindTurbine\r\nimport mqtt... | [
[
"numpy.array",
"numpy.mean"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
maxdevblock/immuni-app-downloads | [
"fc51a0f15e6369534cedf29f0eb49500aaf10f8c"
] | [
"immuni_OLD.py"
] | [
"import os\nfrom sys import argv\nfrom shutil import copyfile\nimport time\nimport datetime as dt\n\nimport werkzeug\nwerkzeug.cached_property = werkzeug.utils.cached_property\nfrom robobrowser import RoboBrowser\n\nimport numpy as np\nimport pandas as pd\nimport scipy.stats as sps\nimport matplotlib.pyplot as plt\... | [
[
"scipy.stats.gamma",
"pandas.Series",
"numpy.linspace",
"numpy.sqrt",
"numpy.cumsum",
"pandas.DataFrame",
"matplotlib.dates.DayLocator",
"pandas.read_csv",
"numpy.ones_like",
"numpy.arange",
"pandas.concat",
"matplotlib.dates.DateFormatter",
"matplotlib.pyplot.s... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
davidteather/worst-stock-predictor | [
"c6ad12841bb96f1517727c0760a73dff4e9f03cc"
] | [
"train.py"
] | [
"import tensorflow as tf\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import LSTM, Dense, Dropout, Bidirectional\nfrom tensorflow.keras.callbacks import ModelCheckpoint, TensorBoard\nfrom sklearn import preprocessing\nfrom sklearn.model_selection import train_test_split\nfrom sklear... | [
[
"matplotlib.pyplot.legend",
"tensorflow.keras.layers.Dropout",
"numpy.expand_dims",
"pandas.read_csv",
"numpy.random.seed",
"tensorflow.keras.layers.Dense",
"sklearn.metrics.accuracy_score",
"sklearn.model_selection.train_test_split",
"matplotlib.pyplot.show",
"pandas.DataF... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
birajparikh16/tutorials | [
"bcf1a827f8f46b477576095b82db15424d38afd2"
] | [
"mlflow/extras/boston_housing_tensorflow.py"
] | [
"# in case this is run outside of conda environment with python2\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport mlflow\nfrom mlflow import pyfunc\nimport pandas as pd\nimport shutil\nimport tempfile\nimport tensorflow as tf\nfrom tensorflow.... | [
[
"tensorflow.keras.datasets.boston_housing.load_data",
"tensorflow.estimator.export.build_raw_serving_input_receiver_fn",
"tensorflow.placeholder",
"tensorflow.estimator.DNNRegressor",
"pandas.DataFrame",
"tensorflow.feature_column.numeric_column",
"tensorflow.logging.set_verbosity",
... | [
{
"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": [
"1.10"
]
}
] |
leucinw/leucinwChemTools | [
"fff640e5619f0f2f7844b71c059e37f183dfdf32"
] | [
"src/assignTorsion.py"
] | [
"\n#===================================\n# Chengwen Liu #\n# liuchw2010@gmail.com #\n# University of Texas at Austin #\n#===================================\n\n''' assign the BEST torsion parameters from database '''\n\nimport sys\nimport argparse\nimport numpy as np\nfrom pybel i... | [
[
"numpy.loadtxt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
moliushang/PaddleSeg | [
"36652c637a885165cf5be55f0c00e2cca3c629ce"
] | [
"paddleseg/models/decoupled_segnet.py"
] | [
"# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless req... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sergfer26/Quadcopter-Deep-RL | [
"600c4e778e9fef5cc075ad39ef9cc67458a8a83b"
] | [
"ejemplo1_sobol.py"
] | [
"from SALib.sample import saltelli\nfrom SALib.analyze import sobol\nfrom SALib.test_functions import Ishigami\nimport numpy as np\nfrom numpy import cos,sin,tan,pi\nfrom scipy.integrate import odeint\nfrom numpy.linalg import norm\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib\n#matplotli... | [
[
"numpy.sqrt",
"numpy.linspace",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"numpy.ones",
"scipy.integrate.odeint",
"numpy.sin",
"numpy.cos",
"numpy.tan",
"numpy.linalg.norm",
"numpy.identity",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.show"
]... | [
{
"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": [
"0.13",
"1.6",
"0.14",
"1.10",
"0... |
soderling-lab/SynaptopathyProteomics | [
"8e316d1ad1b4102936852f081f20ad6e21c172ab"
] | [
"Py/myfun.py"
] | [
"#!/usr/bin/env Python3\n\n# --------------------------------------------------------------------\n# xstr\ndef xstr(s):\n \"\"\" Convert NoneType to blank ('') string.\"\"\"\n if s is None:\n return \"\"\n else:\n return str(s)\n\n\n# EOF\n\n# -------------------------------------------------... | [
[
"numpy.linspace",
"numpy.linalg.eig",
"pandas.DataFrame",
"numpy.repeat",
"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": []
}
] |
celdeldel/style_conditionnal_gan | [
"3a4623560af1e12d46e2f9ffa9726c29df9d5680"
] | [
"model.py"
] | [
"import torch\r\n\r\nfrom torch import nn\r\nfrom torch.nn import init\r\nfrom torch.nn import functional as F\r\nfrom torch.autograd import Function\r\n\r\nfrom math import sqrt\r\n\r\nimport random\r\n\r\n\r\ndef init_linear(linear):\r\n init.xavier_normal(linear.weight)\r\n linear.bias.data.zero_()\r\n\r\n... | [
[
"torch.mean",
"torch.zeros",
"torch.cat",
"torch.nn.functional.interpolate",
"torch.nn.init.xavier_normal",
"torch.randn",
"torch.tensor",
"torch.nn.functional.pad",
"torch.nn.init.kaiming_normal",
"torch.nn.functional.conv_transpose2d",
"torch.nn.Sequential",
"torc... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
z33bs/deep-rl-agent-solves-unity-reacher | [
"47fa7d4ee174b8a8144ee16c5edab498fa31d3c2"
] | [
"other attempts/ppo.py"
] | [
"import numpy as np\nimport torch\nfrom torch.optim import Adam\n# import gym\nimport time\nimport core\nfrom logx import EpochLogger\n# from spinup.utils.mpi_pytorch import setup_pytorch_for_mpi, sync_params, mpi_avg_grads\n# from spinup.utils.mpi_tools import mpi_fork, mpi_avg, proc_id, mpi_statistics_scalar, num... | [
[
"numpy.random.seed",
"torch.manual_seed",
"torch.min",
"torch.exp",
"numpy.append",
"numpy.std",
"numpy.mean",
"torch.clamp",
"numpy.zeros",
"torch.as_tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
tanvirtin/svd-prediction | [
"b45a99b695d64d5aed16eb783c7c4cd88c19c1db"
] | [
"svd.py"
] | [
"import numpy as np\n\nclass Svd:\n\tdef __init__(self, dataMatrix):\n\t\tself.dataMatrix = dataMatrix\n\t\tself.u = None\n\t\tself.d = None\n\t\tself.v = None\n\n\tdef svd(self):\n\t\tself.u, self.d, self.v = np.linalg.svd(self.dataMatrix)\n\n\t\t# the d that we get is undiagonalized meaning only the columns conta... | [
[
"numpy.diag",
"numpy.linalg.svd",
"numpy.transpose"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Junaid-muhamad/coffea | [
"b644bcf2b48e272e6c78e4b1ddee3c233a67022d"
] | [
"tests/test_lookup_tools.py"
] | [
"from __future__ import print_function, division\n\nimport os\nfrom coffea import lookup_tools\nimport awkward as ak\nimport pytest\nfrom coffea.util import numpy as np\nfrom coffea.nanoevents import NanoEventsFactory\n\nfrom dummy_distributions import dummy_jagged_eta_pt\n\n# From make_expected_lookup.py\n_testSF2... | [
[
"numpy.array",
"numpy.linspace",
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
afloera/https-github.com-PacktPublishing-Python-Natural-Language-Processing-Cookbook | [
"ffd1bf1a8a6b74bac7e88f7b2cdc92edd4831cd9"
] | [
"Chapter05/bert_classification.py"
] | [
"import pandas as pd\nimport tensorflow as tf\nimport numpy as np\nfrom transformers import BertTokenizer\nfrom transformers import TFBertForSequenceClassification\nfrom tensorflow.keras.layers import Dense\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import classification_report\nfro... | [
[
"pandas.read_csv",
"tensorflow.nn.softmax",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.keras.optimizers.Adam",
"numpy.argmax",
"tensorflow.keras.metrics.SparseCategoricalAccuracy",
"sklearn.metrics.classificati... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
ayushjain1144/SeeingByMoving | [
"64bcfa4b292dacc91f92f2542e11d489b1fa2c8a"
] | [
"models/carla/backend/saverloader.py"
] | [
"import torch\nimport os,pathlib\nimport hyperparams as hyp\nimport numpy as np\n\n\ndef load_total(model, optimizer):\n start_iter = 0\n if hyp.total_init:\n print(\"TOTAL INIT\")\n print(hyp.total_init)\n start_iter = load(hyp.total_init, model, optimizer)\n if start_iter:\n ... | [
[
"numpy.savez",
"torch.load",
"numpy.argmax",
"torch.FloatTensor",
"torch.device",
"numpy.load"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
FrictionTribologyEnigma/SlipPY | [
"a97fc5470ce5008ef4c049b82077cd1871f6ef2c"
] | [
"slippy/contact/_step_utils.py"
] | [
"\"\"\"\nHelper functions for steps\n\"\"\"\nimport os\nimport typing\nimport warnings\nimport bisect\nfrom collections import namedtuple\nfrom numbers import Number\nfrom scipy.interpolate import interp1d\n\nimport numpy as np\n\nimport slippy\n\nif slippy.CUDA:\n import cupy as cp\nelse:\n cp = None\n\nfrom... | [
[
"numpy.logical_not",
"numpy.unravel_index",
"numpy.ones_like",
"numpy.logical_and",
"numpy.asarray",
"numpy.isnan",
"numpy.sign",
"numpy.max",
"scipy.interpolate.interp1d",
"numpy.zeros_like",
"numpy.any",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] | [
{
"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"
... |
CompVis/metric-learning-divide-and-conquer-improved | [
"33fe768a54376a090e2d7139898177b06e8903d2"
] | [
"metriclearning/model/bn_inception.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.utils.model_zoo\n\n__all__ = ['BNInception']\n\nmodel_urls = {\n # BNInception ported from Caffee to pytorch, then ported to PT 0.4\n # pt 0.3 port: URL = 'http://data.lip6.fr/cadene/pretrainedmodels\n # /bn_inception-239d2248.pth'\n # FIXME: add ha... | [
[
"torch.cat",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.AvgPool2d",
"torch.nn.Linear",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.utils.model_zoo.load_url"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Coler1994/robust-loss-mlml | [
"a68718eba7efa82c3eca79031eeee444f8eb5fa3"
] | [
"validate.py"
] | [
"# Adopted from: https://github.com/allenai/elastic/blob/master/multilabel_classify.py\r\n# special thanks to @hellbell\r\n\r\nimport argparse\r\nimport time\r\nimport torch\r\nimport torch.nn as nn \r\nimport torch.nn.parallel\r\nimport torch.optim\r\nimport torch.utils.data.distributed\r\nimport torchvision.trans... | [
[
"torch.load",
"torch.cat",
"torch.utils.data.DataLoader",
"torch.nn.Sigmoid",
"torch.no_grad",
"torch.nn.DataParallel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Clickedbigfoot/comedHourly | [
"30e87ad866eac0bad3eff9f10d8105072f249285"
] | [
"peakPredictor.py"
] | [
"#!/usr/bin/python3\n\"\"\"\nClass for predictor object that determines whether or not to turn off\nelectricity.\nScript contains loop for mkaing predictions and scraping data into an SQL database\n\"\"\"\nimport argparse\nfrom copy import deepcopy\nfrom datetime import datetime, timedelta\nimport os\nimport pickle... | [
[
"sklearn.svm.SVR",
"sklearn.preprocessing.StandardScaler",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cmiley/fruit_classification | [
"07121834e9aef898c0d4688daf4178e9da8a7716"
] | [
"fruits.py"
] | [
"import torch\nimport torch.nn as nn\nimport torchvision\nimport torchvision.transforms as transforms\nimport matplotlib\nimport numpy as np\n\nFRUITS_DIR = '/Users/cayler/Downloads/fruits-360/'\n\nif __name__ == \"__main__\":\n # Device configuration\n device = torch.device('cuda:0' if torch.cuda.is_availabl... | [
[
"torch.cuda.is_available"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mikepsinn/MOE | [
"fdc2e1318d37c89c54a7b7902c12f8f164f517e8"
] | [
"moe/bandit/ucb1_tuned.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"Classes (Python) to compute the Bandit UCB1-tuned arm allocation and choosing the arm to pull next.\n\nSee :class:`moe.bandit.ucb_interface.UCBInterface` for further details on this bandit.\n\n\"\"\"\nimport math\n\nimport numpy\n\nfrom moe.bandit.constant import MAX_BERNOULLI_RANDOM... | [
[
"numpy.float64"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
nmpegetis/udacity-facebook-pytorch | [
"36a9de03c71892836e184e58695143960c6a7d2b"
] | [
"lesson4-06/solution4_6-8.py"
] | [
"# %% Change working directory from the workspace root to the ipynb file location. Turn this addition off with the DataSciece.changeDirOnImportExport setting\nfrom collections import OrderedDict\nimport torch.nn.functional as F\nfrom torch import nn\nfrom torchvision import datasets, transforms\nimport matplotlib.p... | [
[
"torch.nn.Softmax",
"torch.nn.functional.softmax",
"torch.mm",
"torch.randn",
"torch.utils.data.DataLoader",
"torch.nn.Sigmoid",
"torch.exp",
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
paolomandica/SiameseAimCLR | [
"b6e4fd93bdbc5ce91c0a2aa681e1d83a5424b31f"
] | [
"net/aimclr.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nimport copy\n\nfrom net.st_gcn_no_proj import Model as STGCN\nfrom net.utils import EMA, MLP\n\n\nclass AimCLR(nn.Module):\n def __init__(self, base_encoder=None, pretrain=True, queue_size=32768,\n in_channels=3, hidden_chan... | [
[
"torch.nn.functional.normalize",
"torch.softmax",
"torch.cat",
"torch.randn",
"torch.einsum",
"torch.zeros_like",
"torch.no_grad",
"torch.topk"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
eugval/Motion_Prediction | [
"84f7a6e690d25c399eeec743688c52b88e83a909",
"84f7a6e690d25c399eeec743688c52b88e83a909"
] | [
"src/experiments/train_many.py",
"src/preprocessing/tracking.py"
] | [
"#https://www.youtube.com/watch?v=YcTCIMKeiNQ\nimport os\nimport sys\nROOT_DIR = os.path.abspath(\"../\")\nPROCESSED_PATH = os.path.join(ROOT_DIR, \"../data/processed/\")\nMODEL_PATH = os.path.join(ROOT_DIR,\"../models/\")\nfrom shutil import copyfile\n\nsys.path.append(ROOT_DIR)\nsys.path.append(os.path.join(ROOT_... | [
[
"torch.no_grad",
"torch.nn.BCEWithLogitsLoss",
"torch.utils.data.DataLoader",
"torch.cuda.is_available"
],
[
"numpy.amax",
"sklearn.utils.linear_assignment_.linear_assignment",
"numpy.maximum",
"numpy.minimum",
"numpy.reshape",
"numpy.arange",
"numpy.stack",
"sc... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"1.6",
"0.14",
"1.10",
"0.15",
"1.4",
"0.16",
"1.9",
"0.19",
"1.5",
... |
mvWellman/OCTseg | [
"c3fe1098d031f74422956e2335dd4bae16dde7b6",
"c3fe1098d031f74422956e2335dd4bae16dde7b6"
] | [
"util/postprocessing.py",
"tests/unit/test_read_oct_roi_file.py"
] | [
"# Copyright (C) 2019 Harvard University. All Rights Reserved. Unauthorized\n# copying of this file, via any medium is strictly prohibited Proprietary and\n# confidential\n# Developed by Mohammad Haft-Javaherian <mhaft-javaherian@mgh.harvard.edu>,\n# <7javaherian@gmail.com>.\n#... | [
[
"numpy.logical_not",
"numpy.nonzero",
"numpy.arange",
"numpy.tile",
"numpy.ones",
"numpy.logical_or",
"numpy.argmax",
"numpy.any",
"numpy.logical_and",
"numpy.zeros"
],
[
"numpy.testing.assert_array_equal"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
michele-arrival/pytorch3d | [
"f358b9b14dbc1414c588f308b35f55705d777873",
"f358b9b14dbc1414c588f308b35f55705d777873",
"f358b9b14dbc1414c588f308b35f55705d777873"
] | [
"pytorch3d/renderer/blending.py",
"tests/bm_mesh_laplacian_smoothing.py",
"tests/bm_graph_conv.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n\n\nimport numpy as np\nfrom typing import NamedTuple, Sequence\nimport torch\n\n# Example functions for blending the top K colors per pixel using the outputs\n# from rasterization.\n# NOTE: All blending function shoul... | [
[
"torch.flip",
"torch.sigmoid",
"torch.ones",
"torch.max",
"torch.is_tensor",
"torch.tensor",
"torch.exp",
"torch.log",
"torch.clamp",
"numpy.exp"
],
[
"torch.cuda.is_available"
],
[
"torch.cuda.is_available"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rohan1chaudhari/jina | [
"5ef04a4c982f0aa967bfc10b443c3f397c5e790f"
] | [
"tests/unit/executors/indexers/vector/test_faiss.py"
] | [
"import os\nimport unittest\nimport gzip\n\nimport numpy as np\nfrom jina.executors.indexers import BaseIndexer\nfrom jina.executors.indexers.vector.faiss import FaissIndexer\nfrom tests import JinaTestCase\n\n# fix the seed here\nnp.random.seed(500)\nretr_idx = None\nvec_idx = np.random.randint(0, high=100, size=[... | [
[
"numpy.testing.assert_almost_equal",
"numpy.random.random",
"numpy.random.seed",
"numpy.random.randint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
thomaswim/PIR | [
"1561f971ee7cc7b1d065a3a6ed5060d6539811ef"
] | [
"rps/code_perso/si_go_to_point_gt.py"
] | [
"import rps.robotarium as robotarium\nfrom rps.utilities.transformations import *\nfrom rps.utilities.barrier_certificates import *\nfrom rps.utilities.misc import *\nfrom rps.utilities.controllers import *\n\nimport numpy as np\nimport time\n\n# Instantiate Robotarium object\nN = 4\ninitial_conditions = np.array(n... | [
[
"numpy.linspace",
"numpy.arange",
"numpy.array",
"numpy.mat",
"numpy.vstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
tarepan/jsss | [
"27e57bab10e5f6f9a8c6ef267a7d92dbb48ae9fd"
] | [
"jsss/PyTorch/Lightning/datamodule/spectrogram.py"
] | [
"from typing import Callable, List, Optional, Union\n\nimport pytorch_lightning as pl\nfrom torch.tensor import Tensor\nfrom torch.utils.data import random_split, DataLoader\n\nfrom ...dataset.spectrogram import JSSS_spec\nfrom ....corpus import Subtype\n\n\nclass JSSS_spec_DataModule(pl.LightningDataModule):\n ... | [
[
"torch.utils.data.random_split",
"torch.utils.data.DataLoader"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Crush18/3DUnetCNN | [
"be2573c52169b725075acf182374f7098ee792d1"
] | [
"unet3d/utils/hcp.py"
] | [
"import numpy as np\n\nfrom unet3d.utils.utils import get_nibabel_data\n\n\ndef extract_gifti_surface_vertices(surface, index=0, geometric_type=\"Anatomical\", **kwargs):\n return extract_gifti_array(surface, index=index, geometric_type=geometric_type, **kwargs)\n\n\ndef extract_gifti_array(gifti_object,\n ... | [
[
"numpy.swapaxes",
"numpy.in1d",
"numpy.stack",
"numpy.ones",
"numpy.zeros",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
IvenTW/openvino_training_extensions | [
"93779755620740211612c7d22c47ad4c4ac6587d"
] | [
"tensorflow_toolkit/ssd_detector/tools/export.py"
] | [
"#!/usr/bin/env python3\n#\n# Copyright (C) 2019 Intel Corporation\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.get_variable",
"tensorflow.train.latest_checkpoint",
"tensorflow.constant_initializer",
"tensorflow.logging.set_verbosity",
"tensorflow.Session",
"tensorflow.train.Saver",
"tensorflow.app.run"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
gideont/tensorflow_ex | [
"5205a9b37c21be1387e9cc7cdfc9ae0865b14f39"
] | [
"2_xor/load_n_predict.py"
] | [
"# MLP for Pima Indians Dataset Serialize to JSON and HDF5\nimport tensorflow as tf\nimport numpy\nimport os\nfrom keras.models import Sequential\nfrom keras.layers import Dense\nfrom keras.models import model_from_json\nfrom numpy import array\n\nprint(\"\\nThis is an example of XOR using Tensorflow Keras\")\nprin... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
eager-dev/eagerx_interbotix | [
"963ded1f69f6caae2d8f27a9fa53e734e683dd31"
] | [
"examples/velocity.py"
] | [
"# EAGERx imports\nfrom eagerx.wrappers.flatten import Flatten\nfrom eagerx.core.env import EagerxEnv\nfrom eagerx.core.graph import Graph\nimport eagerx.nodes # Registers butterworth_filter # noqa # pylint: disable=unused-import\nimport eagerx_pybullet # Registers PybulletEngine # noqa # pylint: disable=unused-i... | [
[
"numpy.random.uniform",
"numpy.array",
"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": [],
... |
yozw/lio-files | [
"e036bc868207ec045a804495fc40cf3a48e37d6d"
] | [
"chapter06/dovetail.py"
] | [
"# Solves model Dovetail using the Interior path algorithm\n# Copyright (C) 2013-2015 Y. Zwols and G. Sierksma\n# \n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction... | [
[
"numpy.matrix"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
wanghaoshuang/PaddleDetection | [
"d2829c5e6da5943e509f454b99407c2a55a28807"
] | [
"ppdet/modeling/ops.py"
] | [
"# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"numpy.hstack",
"numpy.maximum",
"numpy.minimum",
"numpy.sort",
"numpy.argmax",
"numpy.exp",
"numpy.argsort",
"numpy.array",
"numpy.where",
"numpy.vstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ShipJ/Code | [
"6ee1e207381447d0427cce4121f2e40ce65c13fa"
] | [
"Projects/M2020/merge.py"
] | [
"import sys\n\nimport pandas as pd\nimport numpy as np\nfrom Code.config import get_path\nfrom collections import Counter\n\npd.set_option('display.width', 500)\n\n\ndef main():\n\n attendee_list = pd.DataFrame(pd.read_csv('/Users/JackShipway/Desktop/AttendeeList.csv').drop(['Phone',\n ... | [
[
"pandas.set_option",
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
simran2905/metrics | [
"fe03f3a9c84d331a62cfce21cfa9478136d53451"
] | [
"torchmetrics/functional/audio/snr.py"
] | [
"# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law... | [
[
"torch.finfo",
"torch.mean",
"torch.log10",
"torch.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sherlockHSY/Reinforcement_learning_with_pytorch | [
"90c4f302b588bbf8be7962aaaa7f61c0234fb8d9",
"90c4f302b588bbf8be7962aaaa7f61c0234fb8d9",
"90c4f302b588bbf8be7962aaaa7f61c0234fb8d9",
"90c4f302b588bbf8be7962aaaa7f61c0234fb8d9"
] | [
"model_free/SAC/sac_discrete.py",
"model_free/Double_DQN/ddqn.py",
"model_free/DDPG/DDPG.py",
"model_free/DQN/dqn.py"
] | [
"import torch\nimport torch.nn.functional as F\nfrom torch.distributions.normal import Normal\nimport numpy as np\nimport collections\nimport random\nfrom utils.replaybuffer import ReplayBuffer\n\n\nclass PolicyNet(torch.nn.Module):\n def __init__(self, state_dim, action_dim, hidden_dim_1, hidden_dim_2):\n ... | [
[
"torch.optim.Adam",
"numpy.log",
"torch.min",
"torch.sum",
"torch.nn.Linear",
"torch.distributions.Categorical",
"torch.log",
"numpy.array"
],
[
"numpy.random.random",
"numpy.arange",
"torch.nn.Linear",
"numpy.random.randint",
"torch.device",
"numpy.arra... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
... |
MichelangeloConserva/Colosseum | [
"b0711fd9ce75520deb74cda75c148984a8e4152f"
] | [
"colosseum/agents/continuous/qlearning/agent.py"
] | [
"from typing import Callable\n\nimport dm_env\nimport gin\nimport numpy as np\n\nfrom colosseum.agents.base import ContinuousHorizonBaseActor, ValueBasedAgent\nfrom colosseum.utils.acme.specs import EnvironmentSpec\n\n\ndef get_H(num_states, num_actions, T, span_approx, confidence):\n return min(\n np.sqr... | [
[
"numpy.log",
"numpy.zeros",
"numpy.sqrt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
utaccn/Thesis | [
"69a539bbd78533a93c4e7ed3ad6e3f669665fe95",
"69a539bbd78533a93c4e7ed3ad6e3f669665fe95"
] | [
"Shapes Similarity+Symmetry/GenerateSolutions_Standard.py",
"Hue/GenerateSolutions_Standard.py"
] | [
"import cairo\r\nfrom math import pi\r\nimport math\r\nfrom PIL import Image\r\nimport numpy as np\r\nimport map_elites.cvt as cvt_map_elites\r\nimport map_elites.common as cm_map_elites\r\nfrom sklearn.neighbors import KDTree\r\nimport cv2\r\nfrom scipy.spatial import distance\r\n\r\n\r\nt = math.pi/180.0\r\n\r\n\... | [
[
"numpy.array"
],
[
"numpy.dot",
"numpy.max",
"numpy.array",
"numpy.linalg.norm"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"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",
... |
ChinYing-Li/unsupervised-video-pred | [
"db83ac54c971cc94346898719db17650e1e41af6"
] | [
"dataset/CustomDataset.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Nov 21 21:48:30 2019\n\n@author: liqinying\n\"\"\"\n\nimport numpy as np\nimport pandas as pd\nimport torch\nimport os\n\nimport skimage.io as io\nfrom torch.utils.data import Dataset\n\n\"\"\"\nhttps://github.com/jbohnslav/opencv_transforms/b... | [
[
"torch.stack",
"pandas.read_csv",
"numpy.array",
"torch.is_tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
Dishant-P/S-Extension-patch-Official-research-module | [
"6f1c887874b9afd4a9765d04821cbcdfc1113271"
] | [
"simmat_threshold.py"
] | [
"import numpy as np \nimport pandas as pd\nimport scipy \nimport pickle\nfrom scipy.spatial import distance as scidist\nimport sys\nsys.path.insert(1, \"D:\\\\Work\\\\Research\\\\\")\nfrom src.evaluate import distance\nfrom sklearn.cluster import KMeans\nimport time\nimport os, shutil\n\nclass SMG:\n def __init_... | [
[
"numpy.vstack",
"numpy.array",
"sklearn.cluster.KMeans",
"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": []
}
] |
kabir12345/DASM | [
"86f777c47a83f400c2f99e9f71dcc3a40b9d3143"
] | [
"PHYSICAL_FATIGUE.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[52]:\n\n\nimport nltk\nimport numpy as np\nimport random\nimport string # to process standard python strings\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.metrics.pairwise import cosine_similarity\n\n\n# In[95]:\n\n\nf=open(r'/home/aakash/... | [
[
"sklearn.metrics.pairwise.cosine_similarity",
"sklearn.feature_extraction.text.TfidfVectorizer"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
HarshitRuwali/HackerRank-Solutions | [
"29c3ebd87723e1237866a551783bf62cf470d919"
] | [
"Python/Min and Max.py"
] | [
"import numpy as np\n\nn, m = map(int, input().split())\n\nlist = []\n\nfor i in range(0, n):\n list.append([x for x in input().split()])\n\narr = np.array(list, int)\nprint(np.max(np.min(arr, axis = 1), axis = None))\n"
] | [
[
"numpy.array",
"numpy.min"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
alex-petrenko/ray | [
"37fb44d650c509f40c9965b0a53b84a92bf7e1d9"
] | [
"python/ray/rllib/agents/dqn/dqn_policy.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom gym.spaces import Discrete\nimport numpy as np\nfrom scipy.stats import entropy\n\nimport ray\nfrom ray.rllib.agents.dqn.distributional_q_model import DistributionalQModel\nfrom ray.rllib.agents.d... | [
[
"numpy.log",
"numpy.ones_like",
"numpy.abs",
"scipy.stats.entropy",
"numpy.zeros_like",
"numpy.array"
]
] | [
{
"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"
... |
lubegamark/ple2014 | [
"6e5586ada33f5f2346b39bdc97ef0b7a8d499af6"
] | [
"utils.py"
] | [
"import csv\nimport logging\nimport os\nimport re\nimport time\nimport traceback\n\nimport pandas as pd\nimport requests\nimport xlrd\n\nimport settings\n\nlogging.basicConfig(level=logging.INFO, format='%(asctime)s %(message)s')\n\n\nclass ExcelConverter(object):\n \"\"\"\n Conversion of multiple excel sheet... | [
[
"pandas.concat",
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
juhaautioniemi/models | [
"7dcd3f6b3151ae968f71b7e53b32c25750245606"
] | [
"official/vision/beta/configs/semantic_segmentation.py"
] | [
"# Copyright 2021 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.math.log2"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
15379180/pipelines | [
"589c905b426062d4b8ee9bf47855c1d5e87bb749"
] | [
"components/sample/keras/train_classifier/src/train.py"
] | [
"# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"numpy.loadtxt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rozumden/kornia | [
"f62f324b201eea50e1e50db3fbf3e968e0a337c5"
] | [
"kornia/augmentation/container/augment.py"
] | [
"import warnings\nfrom itertools import zip_longest\nfrom typing import cast, Dict, List, Optional, Tuple, Union\n\nimport torch\nimport torch.nn as nn\n\nfrom kornia.augmentation.base import _AugmentationBase, GeometricAugmentationBase2D, IntensityAugmentationBase2D\nfrom kornia.constants import DataKey\nfrom korn... | [
[
"torch.as_tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sinhmd/raster-vision | [
"c617c49c2446b4d97281895ae953a5630e439e94"
] | [
"tests_v2/core/data/label_source/test_object_detection_label_source.py"
] | [
"import unittest\nimport os\n\nimport numpy as np\n\nfrom rastervision2.core.data import (\n ObjectDetectionLabelSourceConfig, GeoJSONVectorSourceConfig, ObjectDetectionLabels,\n ClassConfig)\nfrom rastervision2.core import Box\nfrom rastervision2.pipeline import rv_config\nfrom rastervision2.pipeline.file_sy... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
kouigenjimonogatari/kouigenjimonogatari.github.io | [
"5ce65d7440da33ec40f9dcb6a4bfbe0d70d47dd9"
] | [
"src/001_convert_xlsx_to_rdf.py"
] | [
"import pandas as pd\nfrom rdflib import URIRef, BNode, Literal, Graph\nfrom rdflib.namespace import RDF, RDFS, FOAF, XSD\nfrom rdflib import Namespace\nimport numpy as np\nimport math\nimport sys\nimport argparse\nimport json\nimport urllib.parse\n\npath = \"data/metadata.xlsx\"\n\n\n\ndf = pd.read_excel(path, she... | [
[
"pandas.read_excel",
"pandas.isnull"
]
] | [
{
"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": []
}
] |
niroshajayasundara/Python | [
"3bab59ae06f79698ab579ba52d2bc4ea6402154c"
] | [
"Neural_Network/bpnn.py"
] | [
"#!/usr/bin/python\n# encoding=utf8\n\n'''\n\nA Framework of Back Propagation Neural Network(BP) model\n\nEasy to use:\n * add many layers as you want !!!\n * clearly see how the loss decreasing\nEasy to expand:\n * more activation functions\n * more loss functions\n * more optimization method\n\nAut... | [
[
"numpy.diag",
"numpy.dot",
"numpy.power",
"numpy.asarray",
"numpy.asmatrix",
"numpy.random.normal",
"numpy.random.randn",
"numpy.shape",
"numpy.exp",
"matplotlib.pyplot.ion",
"matplotlib.pyplot.pause",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
WorqHat/Face-Recognition | [
"cd99a2b006ecbf35abe7dff1ef7241bc05618c87"
] | [
"similarity.py"
] | [
"import argparse\nimport os\nimport cv2\nimport numpy as np\nfrom embeddings import get_embeddings\n\n\ndef visualize_similarity(tag, input_size=[112, 112]):\n images, embeddings = get_embeddings(\n data_root=f\"data/{tag}_aligned\",\n model_root=\"checkpoint/backbone_ir50_ms1m_epoch120.pth\",\n ... | [
[
"numpy.dot",
"numpy.hstack",
"numpy.empty",
"numpy.concatenate",
"numpy.zeros",
"numpy.vstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
suyukun666/CDA | [
"7d0502c58e72c95e4381828c3728d9ad6e181ba6"
] | [
"aug_step/cam_to_ir_label.py"
] | [
"\nimport os\nimport numpy as np\nimport imageio\n\nfrom torch import multiprocessing\nfrom torch.utils.data import DataLoader\n\nimport voc12.dataloader\nfrom misc import torchutils, imutils\n\n\ndef _work(process_id, infer_dataset, args):\n\n databin = infer_dataset[process_id]\n infer_data_loader = DataLoa... | [
[
"numpy.argmax",
"torch.utils.data.DataLoader",
"numpy.pad",
"torch.multiprocessing.spawn"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ClaudioNahmad/montepython-kauyumari | [
"adae25120f4cdf3719b356c790ba5c0193964265"
] | [
"montepython/likelihoods/PANTHEON/__init__.py"
] | [
"\"\"\"\n.. module:: JLA_simple\n :synopsis: Simplified JLA likelihood from Betoule et al. 2014\n\n.. moduleauthor:: Benjamin Audren <benjamin.audren@gmail.com>\n\nCopied from the original c++ code available at\n`this address <http://supernovae.in2p3.fr/sdss_snls_jla/ReadMe.html>`_.\n\n\"\"\"\nimport os\nimport ... | [
[
"numpy.log10",
"scipy.linalg.cholesky",
"scipy.linalg.solve_triangular",
"numpy.empty"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"0.12",
"0.14",
"0.15"
],
"tensorflow": []
}
] |
iguy0/berlinguyinca-trading-strategies | [
"c259809abf93f3821a9bb6b7aa9ab20c1ad603f2"
] | [
"user_data/strategies/BinHV45.py"
] | [
"# --- Do not remove these libs ---\nfrom freqtrade.strategy.interface import IStrategy\nfrom typing import Dict, List\nfrom hyperopt import hp\nfrom functools import reduce\nfrom pandas import DataFrame\nimport numpy as np\n# --------------------------------\n\nimport talib.abstract as ta\nimport freqtrade.vendor.... | [
[
"numpy.nan_to_num"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
klevis-a/biokinepy | [
"33b3aba0a5281e323fc6e5f743c124ba4d22f96c"
] | [
"biokinepy/np_utils.py"
] | [
"\"\"\"This module contains various useful numpy utilities.\"\"\"\n\nimport numpy as np\nfrom typing import Tuple\n\n\n# written by alimanfoo and retrieved from:\n# https://gist.github.com/alimanfoo/c5977e87111abe8127453b21204c1065\ndef find_runs(x: np.ndarray) -> Tuple[np.ndarray, np.ndarray, np.ndarray]:\n \"\... | [
[
"numpy.square",
"numpy.absolute",
"numpy.nonzero",
"numpy.append",
"numpy.asanyarray",
"numpy.not_equal",
"numpy.array",
"numpy.empty"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
alexman69420/lanforge-scripts | [
"c905e2a12662f0e3304f0ac29b509c95f09983ce",
"c905e2a12662f0e3304f0ac29b509c95f09983ce"
] | [
"py-scripts/lf_report_test.py",
"py-scripts/sandbox/lf_pdf_search.py"
] | [
"#!/usr/bin/env python3\n'''\nNAME: lf_report_test.py\n\nPURPOSE:\nCommon file for testing lf_report and lf_graph Library generates html and pdf output\n\nSETUP:\n/lanforge/html-reports directory needs to be present or output generated in local file\n\nEXAMPLE:\n./lf_report_test.py : currently script does not accep... | [
[
"pandas.DataFrame"
],
[
"pandas.read_csv"
]
] | [
{
"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... |
khvnkay/face-detection-rpi | [
"d1760141d8bf4b74de0bd5fc2fb0ac0a7697ae5e"
] | [
"detect_mask_name_video.py"
] | [
"#! /usr/bin/python\n\n# import the necessary packages\nfrom tensorflow.keras.applications.mobilenet_v2 import preprocess_input\nfrom tensorflow.keras.preprocessing.image import img_to_array\nfrom tensorflow.keras.models import load_model\nfrom imutils.video import VideoStream\nfrom imutils.video import FPS\nimport... | [
[
"tensorflow.keras.models.load_model",
"tensorflow.keras.applications.mobilenet_v2.preprocess_input",
"numpy.array",
"tensorflow.keras.preprocessing.image.img_to_array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"2.7",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6"
]
}
] |
abhishekvermasg/glasses | [
"be5c256bf6f652b09eccb7fabb58db359dd3148e"
] | [
"glasses/models/classification/alexnet/__init__.py"
] | [
"from __future__ import annotations\nfrom torch import nn\nfrom torch import Tensor\nfrom collections import OrderedDict\nfrom typing import List\nfrom functools import partial\nfrom ..resnet import ReLUInPlace\nfrom glasses.nn.blocks import ConvAct\nfrom ....models.base import VisionModule, Encoder\n\n\nAlexNetBas... | [
[
"torch.nn.Dropout",
"torch.nn.Conv2d",
"torch.nn.Flatten",
"torch.nn.MaxPool2d",
"torch.nn.Linear",
"torch.nn.AdaptiveAvgPool2d"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jamarshon/chesspdftofen | [
"fb7e4cb634587aff4b098d1c9f7c4568d7dbc718"
] | [
"chesspdftofen/cnn.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\ntry:\n import importlib.resources as pkg_resources\nexcept ImportError:\n # Try backported to PY<37 `importlib_resources`.\n import importlib_resources as pkg_resources\n\nfrom . import data\n\nclass Net(nn.Module):\n def __init__(self... | [
[
"torch.nn.Dropout",
"torch.load",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.MaxPool2d",
"torch.nn.BatchNorm2d"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
eschombu/python-utils | [
"8b3753e7ef961499c62755a104ac1ddb475cc68e"
] | [
"plot/axes.py"
] | [
"import matplotlib.pyplot as plt\n\n\ndef zero(ax=None, dim='y'):\n if ax:\n if dim == 'y':\n ax.set_ylim([0, ax.get_ylim()[1]])\n if dim == 'x':\n ax.set_xlim([0, ax.get_xlim()[1]])\n else:\n if dim == 'y':\n plt.ylim([0, plt.gca().get_ylim()[1]])\n ... | [
[
"matplotlib.pyplot.gca"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
marcottelab/super.complex | [
"aa5f6463a66042fee254ed4fe2e46073304485aa",
"aa5f6463a66042fee254ed4fe2e46073304485aa"
] | [
"functions_py3/read_complexes.py",
"functions_py3/tpotClassi.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Mar 10 16:25:40 2020\n\n@author: Meg_94\n\"\"\"\nfrom math import pi\nfrom matplotlib.pyplot import figure as plt_figure, savefig as plt_savefig, close as plt_close\nfrom seaborn import distplot as sns_distplot\nfrom jaccard_coeff import jaccard_coeff\nfrom numpy imp... | [
[
"numpy.random.choice",
"matplotlib.pyplot.savefig",
"scipy.stats.norm",
"numpy.random.permutation",
"numpy.mean",
"numpy.argmax",
"matplotlib.pyplot.close",
"numpy.var",
"matplotlib.pyplot.figure"
],
[
"sklearn.svm.SVC"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
hiimmuc/Speaker-verification | [
"b63a1821cbc672bbed7e939e85473337766681aa"
] | [
"dataprep.py"
] | [
"# run on linux only\r\nimport argparse\r\nimport contextlib\r\nimport glob\r\nimport hashlib\r\nimport os\r\nimport random\r\nimport shutil\r\nimport subprocess\r\nimport tarfile\r\nimport time\r\nimport wave\r\nfrom pathlib import Path\r\nfrom zipfile import ZipFile\r\n\r\nimport librosa\r\nimport numpy as np\r\n... | [
[
"scipy.io.wavfile.write",
"scipy.io.wavfile.read"
]
] | [
{
"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"... |
sarah-hanus/oggm | [
"1c387d9407435355b74dc18e3bee0d4b73e9e87e"
] | [
"oggm/core/sia2d.py"
] | [
"import numpy as np\nfrom numpy import ix_\nimport xarray as xr\nimport os\n\nfrom oggm import cfg, utils\nfrom oggm.cfg import G, SEC_IN_YEAR, SEC_IN_DAY\n\n\ndef filter_ice_border(ice_thick):\n \"\"\"Sets the ice thickness at the border of the domain to zero.\"\"\"\n ice_thick[0, :] = 0\n ice_thick[-1, :... | [
[
"numpy.ix_",
"numpy.abs",
"numpy.isfinite",
"numpy.min",
"numpy.arange",
"numpy.any",
"numpy.floor",
"numpy.zeros",
"numpy.sum",
"numpy.isclose"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sailfish009/maskrcnn-benchmark | [
"b55c2e8c9b6ee7a032dc1cffc07236afae3286ae"
] | [
"maskrcnn_benchmark/modeling/rpn/rpn.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\n\nfrom mydl.modeling import registry\nfrom mydl.modeling.box_coder import BoxCoder\nfrom mydl.modeling.rpn.retinanet.retinanet import build_retinanet\nfrom .loss import make... | [
[
"torch.nn.init.constant_",
"torch.no_grad",
"torch.nn.Conv2d",
"torch.nn.init.normal_"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
amudide/chemprop | [
"376bfc53bc6d449a48641539354ad51f6137e6c7"
] | [
"chemprop/sklearn_train2.py"
] | [
"from logging import Logger\nimport os\nimport pickle\nfrom pprint import pformat\nfrom typing import Callable, List, Tuple, Union\n\nimport numpy as np\nfrom sklearn.ensemble import RandomForestClassifier, RandomForestRegressor\nfrom sklearn.svm import SVC, SVR\nfrom tqdm import trange, tqdm\n\nfrom chemprop.args ... | [
[
"sklearn.ensemble.RandomForestRegressor",
"sklearn.ensemble.RandomForestClassifier",
"numpy.subtract",
"sklearn.svm.SVR",
"numpy.nanmean",
"sklearn.svm.SVC",
"numpy.nanstd",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
smkim7-kr/albu-MixMatch-pytorch | [
"6ab20675e09be6e74f648ae9f6dbb1b4f36559d5"
] | [
"data_loader.py"
] | [
"import torch\r\nimport torchvision\r\nimport torch.utils.data as data\r\nimport torchvision.transforms as transforms\r\n\r\nimport numpy as np\r\nimport albumentations as A\r\nfrom albumentations.pytorch import ToTensorV2\r\n\r\ndef get_norm(args):\r\n if args.datasets == 'CIFAR10':\r\n mean, std = (0.49... | [
[
"numpy.array",
"torch.utils.data.DataLoader",
"numpy.where",
"numpy.random.shuffle"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
vkurenkov/bcr-project | [
"ec441dfea93708b618805d826a170991737cd480"
] | [
"main.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.distributions as distrib\nimport gym\nimport numpy as np\n\nfrom copy import deepcopy\nfrom utils import unroll_parameters, count_parameters\nfrom utils import fill_policy_parameters, normc_initializer\nfrom utils import compute_centered_ranks, fix_random_seeds\nfr... | [
[
"torch.zeros",
"numpy.mean",
"torch.no_grad",
"torch.save",
"torch.clamp",
"torch.norm",
"numpy.stack",
"torch.tensor",
"numpy.std",
"torch.prod",
"torch.exp",
"torch.nn.Linear",
"torch.diag",
"torch.diagflat",
"torch.distributions.Normal",
"torch.st... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
just4jc/pipeline | [
"a08cabfefd3521a880d11f1e4b02286287118b6c"
] | [
"jupyterhub/notebooks/zz_under_construction/zz_old/TensorFlow/SkFlow_DEPRECATED/iris_custom_decay_dnn.py"
] | [
"# Copyright 2015-present Scikit Flow 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# Unl... | [
[
"sklearn.cross_validation.train_test_split",
"sklearn.datasets.load_iris",
"tensorflow.train.exponential_decay"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
Isha307/Person-re-identification | [
"b883e7d6cda69c72d2f9a84ee135a2c895ae3c91"
] | [
"reid/models/resnet.py"
] | [
"from __future__ import absolute_import\n\nfrom torch import nn\nfrom torch.nn import functional as F\nfrom torch.nn import init\nimport torchvision\nfrom reid.lib.normalize import Normalize\n\n\n__all__ = ['resnet50']\n\n\nclass ResNet(nn.Module):\n def __init__(self, depth, pretrained=True, cut_at_pooling=Fals... | [
[
"torch.nn.functional.normalize",
"torch.nn.BatchNorm1d",
"torch.nn.Dropout",
"torch.nn.init.kaiming_normal",
"torch.nn.init.constant_",
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.nn.init.normal_",
"torch.nn.init.normal",
"torch.nn.init.constant",
"torch.nn.in... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
echiyembekeza/lambdata-echiyembekeza | [
"5863ce35f04b2f7c904e46dc0dc33504ba331f1c"
] | [
"lambdata_echiyembekeza/check_null.py"
] | [
"\"\"\"\nlambdata - A collection of Data Science helper functions.\n\"\"\"\n\nimport pandas as pd\n\ndef is_null(df):\n pd.DataFrame.isnull(df)\n"
] | [
[
"pandas.DataFrame.isnull"
]
] | [
{
"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": []
}
] |
ybj94/trajminer | [
"7355344be8fe763ba2583b6f508fefc3290c9849"
] | [
"trajminer/utils/distance/functions.py"
] | [
"import numpy as np\n\n\ndef discrete(x, y):\n \"\"\"Computes the discrete distance between two objects.\n\n Parameters\n ----------\n x : object\n Any object.\n y : object\n Any object.\n\n Returns\n -------\n distance : float\n Returns ``0.0`` if ``x == y``, ``1.0`` ot... | [
[
"numpy.radians",
"numpy.sqrt",
"numpy.cos",
"numpy.sin",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
laura-wang/video_repres_mas | [
"c2b2a43351a305d593dca4542f74697e31a2eb33"
] | [
"input_data.py"
] | [
"from __future__ import absolute_import\r\nfrom __future__ import division\r\nfrom __future__ import print_function\r\n\r\nimport os\r\nimport random\r\nimport numpy as np\r\nimport cv2\r\n\r\n\r\nfrom scipy import ndimage\r\nimport multiprocessing\r\nfrom comput_motion_statistics_fast import pattern_1, pattern_2, ... | [
[
"numpy.argmax",
"numpy.array",
"numpy.sum",
"scipy.ndimage.convolve"
]
] | [
{
"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"... |
ahmadshabbir2468/LM-LSTM-CRF | [
"99f157590b9efdcecff03d3cdd3a4500cd715ece"
] | [
"model/evaluator.py"
] | [
"\"\"\"\r\n.. module:: evaluator\r\n :synopsis: evaluation method (f1 score and accuracy)\r\n\r\n.. moduleauthor:: Liyuan Liu, Frank Xu\r\n\"\"\"\r\n\r\n\r\nimport torch\r\nimport numpy as np\r\nimport itertools\r\n\r\nimport model.utils as utils\r\nfrom torch.autograd import Variable\r\n\r\nfrom model.crf impor... | [
[
"numpy.equal",
"torch.unbind"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
RutvikJ77/eland | [
"011bf2981661e499ad0caf2dc14c476c95dba265"
] | [
"eland/common.py"
] | [
"# Licensed to Elasticsearch B.V. under one or more contributor\n# license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright\n# ownership. Elasticsearch B.V. licenses this file to you under\n# the Apache License, Version 2.0 (the \"License\"); you may\... | [
[
"pandas.to_datetime",
"pandas.Series",
"pandas.__version__.split"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mani-shailesh/neuron | [
"ac7060b5f027095998073d795413fbffd9fd4946"
] | [
"code/models.py"
] | [
"import json\nimport os\n\nimport h5py\nimport numpy as np\nfrom tqdm import tqdm\n\nimport layers\nimport util\n\n\n# noinspection PyPep8Naming\nclass RMLR:\n \"\"\"\n Classifier that uses Regularized Multinomial Logistic Regression\n \"\"\"\n def __init__(self, num_classes, weight_decay, name='model_r... | [
[
"numpy.random.permutation",
"numpy.argmax",
"numpy.transpose",
"numpy.exp",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
agonzalezdiez/BERTopic | [
"0413056025d43b5fdba63b36e5d2285527b35dd9"
] | [
"bertopic/_bertopic.py"
] | [
"import yaml\nimport warnings\nwarnings.filterwarnings(\"ignore\", category=FutureWarning)\nwarnings.filterwarnings(\"ignore\", category=UserWarning)\n\ntry:\n yaml._warnings_enabled[\"YAMLLoadWarning\"] = False\nexcept (KeyError, AttributeError, TypeError) as e:\n pass\n\nimport re\nimport joblib\nimport ins... | [
[
"numpy.take_along_axis",
"numpy.hstack",
"pandas.to_datetime",
"pandas.Series",
"numpy.random.choice",
"sklearn.metrics.pairwise.cosine_similarity",
"numpy.nan_to_num",
"pandas.DataFrame",
"sklearn.feature_extraction.text.CountVectorizer",
"sklearn.preprocessing.normalize",... | [
{
"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": []
}
] |
choldgraf/colorbabel | [
"9802e8156c4bdb605d199ff92418014e01842ee6"
] | [
"colorbabel/translate.py"
] | [
"\"\"\"Quickly translate between different color representations.\"\"\"\nimport seaborn.palettes as pl\nfrom seaborn import palplot\nfrom IPython.display import HTML\nfrom matplotlib.colors import LinearSegmentedColormap, ListedColormap\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport colorlover as cl\n... | [
[
"numpy.hstack",
"numpy.linspace",
"numpy.asarray",
"matplotlib.pyplot.subplots",
"numpy.atleast_1d",
"numpy.atleast_2d",
"numpy.log10",
"numpy.average",
"numpy.sum",
"numpy.vstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
AndreaRoss96/gym-cricket-robot | [
"d7a582728685d490c8f06102dea6d2e7c9796a4b"
] | [
"src/gym_cricket/assests/cricket_abs.py"
] | [
"from abc import ABC, abstractmethod \nimport pybullet as p\nimport numpy as np\nfrom numpy.core.defchararray import join\n\n# pybullet doc:\n# https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit#heading=h.2ye70wns7io3\n\nclass Cricket_abs(ABC):\n \"\"\"\n Abstract class... | [
[
"numpy.zeros",
"numpy.full"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Yifei-Liu/knee | [
"7c2c7092a2c2dc4c4dac5ebc3b623c5725e0339b",
"7c2c7092a2c2dc4c4dac5ebc3b623c5725e0339b"
] | [
"test/test_linear_fit.py",
"demos/lmethod.py"
] | [
"import unittest\nimport numpy as np\n\n\nfrom knee.linear_fit import linear_fit_points, linear_r2_points\n\nclass TestLinearFir(unittest.TestCase):\n def test_r2_two(self):\n points = np.array([[0.0, 1.0], [1.0, 5.0]])\n coef = linear_fit_points(points)\n result = linear_r2_points(points, c... | [
[
"numpy.array"
],
[
"numpy.genfromtxt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ajstewart/tkp | [
"2aab1d021d10e3d1f3c4c8a836aea96ac6ae413f"
] | [
"tests/test_sourcefinder/test_gaussian.py"
] | [
"\"\"\"\nTests for elliptical Gaussian fitting code in the TKP pipeline.\n\"\"\"\nimport numpy\n\nimport unittest\n\nfrom tkp.sourcefinder.gaussian import gaussian\nfrom tkp.sourcefinder.fitting import moments, fitgaussian, FIT_PARAMS\nfrom tkp.sourcefinder.extract import source_profile_and_errors\n\n\n# The units ... | [
[
"numpy.random.RandomState",
"numpy.random.random",
"numpy.indices"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Navidhaddad/Interpolation-jeppesen | [
"4b408278ac7761169693483cea778b9425c60a80"
] | [
"Jeppesen/final.py"
] | [
"import pandas as pd\nimport numpy as np\n\nimport codecs, json\nimport scipy\nfrom sklearn.preprocessing import MinMaxScaler\n\nimport scipy_interpolation_functions as scipy_int\n\n# read in \"poor\" data based on list of filenames and objective of interest (for interpolation)\ndef read_poor_data(filenames, object... | [
[
"pandas.concat",
"numpy.sqrt",
"numpy.isnan",
"pandas.DataFrame",
"scipy.interpolate.griddata",
"numpy.array",
"sklearn.preprocessing.MinMaxScaler"
]
] | [
{
"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... |
alinavalinav/finn | [
"e443a5859066a410a63c08dcfec4a90527ca24be"
] | [
"tests/core/test_custom_onnx_exec.py"
] | [
"# Copyright (c) 2020, Xilinx\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright notice, this\n# list of conditions an... | [
[
"numpy.array",
"numpy.transpose"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
AnnanShu/gan | [
"0c6409872ce65fe046e620fca053cff553bba9ef"
] | [
"annan_implenmentation/demo1.py"
] | [
"from typing import ForwardRef\nfrom numpy.core.defchararray import center\nfrom numpy.lib.polynomial import RankWarning\nimport torch \nimport torch.nn.functional as F \nimport torch.nn as nn \nfrom torch import nn, optim, autograd, rand\nimport numpy as np \nimport random \n# import visdom\n\ndevice = torch.devic... | [
[
"numpy.sqrt",
"numpy.random.seed",
"torch.manual_seed",
"torch.randn",
"torch.from_numpy",
"torch.nn.Sigmoid",
"torch.nn.Linear",
"numpy.random.randn",
"torch.cuda.is_available",
"torch.nn.ReLU",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ZeoZagart/TF_QA | [
"a626bd9b159cec456e8c0100d1cd85f34947a3e7"
] | [
"Model/LossFn.py"
] | [
"import torch\n\nclass LossFn: \n\tdef __init__(self, device):\n\t\tself.ans_type = torch.nn.CrossEntropyLoss(weight=torch.FloatTensor([1, 90000, 100005]).to(device))\n\t\tself.start = torch.nn.BCEWithLogitsLoss(pos_weight=torch.tensor([100005]*512, dtype = torch.float).to(device))\n\t\tself.end = torch.nn.BCEWithL... | [
[
"torch.FloatTensor",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
voidstrike/pytorch-CycleGAN-and-pix2pix | [
"4a852a57f673454185a7fa9418e85d2d5e430b10"
] | [
"scripts/eval_cityscapes/evaluate.py"
] | [
"import os\nimport caffe\nimport argparse\nimport numpy as np\nimport scipy.misc\nfrom PIL import Image\nfrom util import segrun, fast_hist, get_scores\nfrom cityscapes import cityscapes\n\nparser = argparse.ArgumentParser()\nparser.add_argument(\"--cityscapes_dir\", type=str, required=True, help=\"Path to the orig... | [
[
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
RichardPSilva/Udacity-Intro-to-Data-Science | [
"36820b186c670a4b022a623eacc21e4c18a10235"
] | [
"aula 6/01_quiz_exploratory_data_analysis.py"
] | [
"import numpy as np\nimport pandas\nimport matplotlib.pyplot as plt\n\ndef entries_histogram(turnstile_weather):\n '''\n Before we perform any analysis, it might be useful to take a\n look at the data we're hoping to analyze. More specifically, let's \n examine the hourly entries in our NYC subway data ... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Jpub/scTechPython | [
"a7bc975d6062c8b3d8b65915427e1d29066952e6"
] | [
"chapter6/hdf5-1.py"
] | [
"import h5py\nimport numpy as np\n\n# 저장할 데이터를 생성\nt = np.arange(0, 5, 0.1)\ny = np.sin(2*np.pi*0.3*t)\ndist = [2, 5, 1, 3, 8, 9, 12]\n\n# 데이터의 일부를 계층 구조로 저장\nwith h5py.File('data1.h5', 'w') as f:\n f.create_group('wave')\n f.create_dataset('wave/t', data=t)\n f.create_dataset('wave/y', data=y)\n f.crea... | [
[
"numpy.arange",
"numpy.array",
"numpy.sin"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
TachikakaMin/dreamer-torch | [
"3c99526f4507e28cf8b34ada0321001adcf8ae1f"
] | [
"exploration.py"
] | [
"import torch\nfrom torch import nn\nfrom torch import distributions as torchd\n\nimport models\nimport networks\nimport tools\n\n\nclass Random(nn.Module):\n\n def __init__(self, config):\n self._config = config\n\n def actor(self, feat):\n shape = feat.shape[:-1] + [self._config.num_actions]\n if self.... | [
[
"torch.concat",
"torch.ones",
"torch.zeros",
"torch.reshape",
"torch.sum",
"torch.cuda.amp.autocast",
"torch.std",
"torch.log",
"torch.distributions.uniform.Uniform",
"torch.stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
danielvlla/deepchem | [
"7e745b93840d1f646a74c48af5c9320d233a1932"
] | [
"deepchem/models/tests/test_reload.py"
] | [
"\"\"\"\nTest reload for trained models.\n\"\"\"\nimport os\nimport pytest\nimport unittest\nimport tempfile\nimport numpy as np\nimport deepchem as dc\nimport tensorflow as tf\nimport scipy\nfrom flaky import flaky\nfrom sklearn.ensemble import RandomForestClassifier\nfrom deepchem.molnet.load_function.chembl25_da... | [
[
"numpy.ones_like",
"numpy.abs",
"numpy.random.seed",
"sklearn.ensemble.RandomForestClassifier",
"numpy.sqrt",
"numpy.arange",
"scipy.io.loadmat",
"numpy.ones",
"numpy.all",
"numpy.random.rand",
"numpy.array",
"numpy.zeros",
"tensorflow.random.set_seed",
"num... | [
{
"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"... |
wy2136/wython | [
"0eaa9db335d57052806ae956afe6a34705407628"
] | [
"misc/interpolate.py"
] | [
"'''\nReference: https://stackoverflow.com/questions/20915502/speedup-scipy-griddata-for-multiple-interpolations-between-two-irregular-grids\n\nWenchang Yang (yang.wenchang@uci.edu)\n'''\nfrom scipy.spatial import qhull\nimport numpy as np\n\ndef interp_weights(xy, XY, d=2):\n tri = qhull.Delaunay(xy)\n simpl... | [
[
"scipy.spatial.qhull.Delaunay",
"numpy.take",
"numpy.einsum",
"numpy.isnan",
"numpy.any",
"numpy.array",
"numpy.meshgrid",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.