repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list | possible_versions list |
|---|---|---|---|---|---|
bkm009/captcha-it | [
"bf9875d909cf0ae59aab7c1e92988e2d90b79d9a"
] | [
"Captcha/Captcha/CaptchaGenerator.py"
] | [
"import numpy as np\nimport cv2\nfrom random import randint, uniform\nimport base64\n\nW = 80\nH = 80\n\nVERTICAL_LAYER = 2\nHORIZONTAL_LAYER = 3\n\nfont = cv2.FONT_ITALIC\n\nINPUT_CHOICES = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',\n 'U', '... | [
[
"numpy.ones",
"numpy.full"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sharmapulkit/few-shot-domain-adaptation-by-causal-mechanism-transfer | [
"05b4cab288dbb2ad7e30bbd174c22beb39d5c4cd"
] | [
"causal_da/components/inn_torch/glow_nonexponential.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n#import inn_torch.layers as layers\n#from inn_torch.wrappers import SequentialFlow\n\nfrom .wrappers import SequentialFlow\nfrom . import layers as layers\n\n# Type hinting\nfrom torch import FloatTensor\n\n\nclass GlowNonExponential(nn.Module):... | [
[
"torch.nn.init.uniform_",
"torch.nn.init.constant_",
"torch.nn.Linear",
"torch.FloatTensor",
"torch.nn.init.normal_"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
TiagoDaFonseca/lazypredict-docker | [
"3574bc6d1a2a442a0914b581f8522607b5cc7baf"
] | [
"modules/utils.py"
] | [
"from sklearn.model_selection import train_test_split, cross_val_score\nfrom lazypredict.Supervised import LazyRegressor, LazyClassifier\nfrom scipy.signal import savgol_filter\nimport pandas as pd\nimport numpy as np\nimport logging\nimport os\n\nlogging.basicConfig(level=logging.INFO)\n\npath_to_data = os.path.jo... | [
[
"sklearn.model_selection.train_test_split",
"scipy.signal.savgol_filter"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.14",
"1.6",
"1.10",
"0.15",
"1.4",
"0.16",
"1.9",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"1.0",
"0.17",
"1.3",
"1.8"
],
"tensorflow": []
... |
howardyclo/maskrcnn-benchmark | [
"64a98927eee33b1b62223e7782537ceaf8418ea7"
] | [
"demo/predictor.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport cv2\nimport torch\nfrom torchvision import transforms as T\n\nfrom maskrcnn_benchmark.modeling.detector import build_detection_model\nfrom maskrcnn_benchmark.utils.checkpoint import DetectronCheckpointer\nfrom maskrcnn_benchmark.struct... | [
[
"torch.zeros",
"torch.cat",
"matplotlib.pyplot.get_cmap",
"torch.tensor",
"numpy.copy",
"torch.no_grad",
"torch.nonzero",
"torch.device"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
nicholas512/seabird | [
"23073b2b9a550b86ec155cbe43be9b50e50b8310"
] | [
"seabird/utils.py"
] | [
"import os\nimport re\nimport logging\nimport pkg_resources\nimport json\n\n# import codecs\n\nfrom seabird.exceptions import CNVError\n\nmodule_logger = logging.getLogger('seabird.utils')\n\n\ndef make_file_list(inputdir, inputpattern=\".*\\.cnv\"):\n \"\"\" Search inputdir recursively for inputpattern\n \"\... | [
[
"numpy.sin"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
CeadeS/PyTorchH5Dataset | [
"9ee6e49f2a780345abd708abf2e0c47bb5475e0a"
] | [
"pytorch_h5dataset/dataset/imageDataset.py"
] | [
"from .metaDataset import H5MetaDataset\nfrom torch import device, version, cat, jit, nn, stack, as_tensor\nfrom torchvision.transforms import Resize\nimport warnings\nfrom ..fn import image\nfrom functools import partial\nfrom pytorch_h5dataset.fn.transforms import Transform\n\n\n\nclass ImageDataset(H5MetaDataset... | [
[
"torch.device"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
anandmoghan/natural-language-query | [
"0ebdf61e76ad0cfd5789c23b98f94e6ce5893a58"
] | [
"src/models/embedding.py"
] | [
"import numpy as np\nimport torch\nimport torch.nn as nn\n\nimport constants.main_constants as const\n\n\nclass EmbeddingLayer(nn.Module):\n def forward(self, *input):\n pass\n\n def __init__(self, emb_size=const.EMBEDDING_SIZE, gpu=False, token_to_index=None, token_weights=None):\n super(Embedd... | [
[
"torch.nn.Embedding"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
JYWa/federated | [
"8073bfa355f56db073349eefb0bcbafbf4e73733"
] | [
"differential_privacy/emnist/run_federated.py"
] | [
"# Copyright 2019, 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 agree... | [
[
"tensorflow.keras.metrics.SparseCategoricalAccuracy"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"2.7",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6"
]
}
] |
neale/alf | [
"33c0ba212b1ca4f7dbb0986be695676c309d5549"
] | [
"alf/algorithms/algorithm.py"
] | [
"# Copyright (c) 2019 Horizon Robotics. 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 requi... | [
[
"torch.nn.modules.module._addindent",
"torch.cuda.memory_reserved",
"torch.mean",
"torch.randperm",
"torch.cuda.max_memory_reserved",
"torch.cuda.max_memory_allocated",
"torch.no_grad",
"torch.nn.modules.module._IncompatibleKeys",
"torch.cuda.reset_max_memory_allocated",
"t... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
tvlenin/blueoil | [
"810680df75e2640f67d515c377ba2b4531b9e584"
] | [
"lmnet/lmnet/datasets/base.py"
] | [
"# -*- coding: utf-8 -*-\n# Copyright 2018 The Blueoil 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... | [
[
"numpy.array",
"numpy.random.RandomState",
"numpy.append"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dalexa10/EngineeringDesignOptimization | [
"eb5b5e4edd773aef629f59aea8a9771af41bd224"
] | [
"main.py"
] | [
"import numpy as np\nimport pandas as pd\n\nX = np.array([1, 2, 3, 4])\n\nprint(X)"
] | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
gjy3035/WSAL_released | [
"fad6490d032eb37dfb62bc0a1eb30fc062dc27a4"
] | [
"datasets/SYN/SYN.py"
] | [
"import os\r\nimport sys\r\n\r\nimport numpy as np\r\nimport pdb\r\nfrom PIL import Image\r\nfrom torch.utils import data\r\n\r\nfrom .config_SYN import root, raw_img_path, raw_mask_path\r\nfrom ..encoder import DataEncoder\r\nfrom ..shuffleData import getShuffleIdx\r\nfrom config import cfg\r\nfrom utils.timer imp... | [
[
"torch.LongTensor",
"torch.index_select",
"torch.Tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Pavelrst/denoising_diffusion | [
"71a2ca62f612c9c5af432558e8954ed522f10f53"
] | [
"lib/dataset.py"
] | [
"import torch\r\nimport torchvision.transforms as T\r\nimport torchvision.datasets\r\nimport numpy as np\r\nfrom torch.utils.data import Subset\r\n\r\nclass ReshapeTransform:\r\n def __init__(self, new_size):\r\n self.new_size = new_size\r\n\r\n def __call__(self, img):\r\n return torch.reshape(... | [
[
"torch.utils.data.Subset",
"torch.reshape",
"torch.randperm",
"numpy.floor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
noapadan/WCT2 | [
"56c819bebb9f023e9eb8603f1f56a37650231730"
] | [
"generate_blur_images.py"
] | [
"import os\nimport numpy as np\nimport cv2\nfrom PIL import Image\nif __name__ == '__main__':\n imgs_dir = 'examples/content'\n fnames = set(os.listdir(imgs_dir))\n\n for fname in fnames:\n img_path = os.path.join(imgs_dir, fname)\n img_path_out = os.path.join('examples/content_blur_imgs', fn... | [
[
"numpy.random.normal",
"numpy.clip"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
flozi00/transformers | [
"f80775df2b418716acce76d56826ed59183869b6"
] | [
"src/transformers/models/wavlm/modeling_wavlm.py"
] | [
"# coding=utf-8\n# Copyright 2021 The Fairseq Authors, Microsoft Research, and The HuggingFace Inc. team. 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# ... | [
[
"torch.abs",
"torch.nn.init.uniform_",
"torch.nn.functional.softmax",
"torch.nn.functional.glu",
"torch.zeros",
"torch.cat",
"torch.nn.Embedding",
"torch.FloatTensor",
"torch.where",
"torch.full_like",
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss",
"torch.mm",... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
matthieumeo/prism | [
"4cd00a07b7bae956eb74d57806fa10d9608ab266"
] | [
"examples/elec_equip.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nfrom prism import SeasonalTrendRegression\nfrom prism import elec_equip_dataset\n\nplt.rcParams['figure.figsize'] = [12, 8]\nplt.rcParams['figure.dpi'] = 100\n\ndata = elec_equip_dataset()\n\nperiod = 1\nsample_times = data.time_decimal.values\nsample_values = d... | [
[
"numpy.linspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mtoqeerpk/seismic-simulation-complex-media | [
"701d3af7ac84120202bc9a741bfdf2320ad06ddc",
"701d3af7ac84120202bc9a741bfdf2320ad06ddc"
] | [
"autoencoder/main.py",
"autoencoder/losses.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Nov 13 17:04:43 2018\n\n@author: bmoseley\n\"\"\"\n\n\n# This script trains a conditional autoencoder model, given a Constants object which contains\n# all of the training hyperparameters of the model.\n# It defines the loss function, optimise... | [
[
"matplotlib.pyplot.imshow",
"numpy.max",
"torch.set_num_threads",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device",
"torch.get_num_threads",
"matplotlib.pyplot.subplot2grid",
"torch.initial_seed",
"numpy.arange",
"numpy.ceil",
"matplotlib.pyplot.figure",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
eanorambuena/Driver | [
"3cb14f5d741c6bae364326305ae0ded04e10e9d4"
] | [
"example.py"
] | [
"from egg.resources.structures import *\n\nx = Image()\nx.load(\"example.jpg\")\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nplt.imshow(np.array(x.matrix))\n\nM = [[255,0,0,255,255,255,0,255], [0,0,0,255,255,255,0,255], [0,255,0,255,0,255,0,255], [0,255,255,255,255,255,0,255], [0,255,255,255,255,255,0,25... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dptam/neural_wfst | [
"c0cd3e340a45c13fbe47310753432d496c20eb83"
] | [
"src/python/transducer_data.py"
] | [
"'''\n| Filename : transducer_data.py\n| Description : Functions that return the data fe to the transducer.\n| Author : Pushpendre Rastogi\n| Created : Tue Dec 8 17:50:51 2015 (-0500)\n| Last-Updated: Thu Dec 31 01:08:44 2015 (-0500)\n| By: Pushpendre Rastogi\n| Update #: 22\n'''\nimport ... | [
[
"numpy.asarray"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mspacek/numpy | [
"645b9f572f0a22e9049fd736b8b91427be2c8402"
] | [
"numpy/ma/tests/test_core.py"
] | [
"# pylint: disable-msg=W0401,W0511,W0611,W0612,W0614,R0201,E1102\n\"\"\"Tests suite for MaskedArray & subclassing.\n\n:author: Pierre Gerard-Marchant\n:contact: pierregm_at_uga_dot_edu\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\n__author__ = \"Pierre GF Gerard-Marchant\"\n\nimport w... | [
[
"numpy.matrix",
"numpy.diag",
"numpy.product",
"numpy.minimum",
"numpy.sqrt",
"numpy.ma.compress",
"numpy.arctan",
"numpy.take",
"numpy.asarray",
"numpy.dtype",
"numpy.round",
"numpy.seterr",
"numpy.concatenate",
"numpy.arctan2",
"numpy.add",
"numpy.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
m-tari/stock_drirection_predict_ml | [
"902331665109c1c28c9c234f0bce6a49371354d2"
] | [
"webapp/app.py"
] | [
"import streamlit as st\nimport pandas as pd\nimport re\nimport pickle\n\n# loading the trained model\npickle_in = open('classifier.pkl', 'rb') \nclassifier = pickle.load(pickle_in)\n\ndef prediction(ticker_to_predict):\n # Making predictions \n prediction = classifier.predict(ticker_to_predict)\n return p... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
wchatx/esridumpgdf | [
"4f30b066054ba166ccdeff07ea6ef4a5ebfd070d"
] | [
"esridumpgdf/service.py"
] | [
"from typing import Dict, Iterable, List\n\nfrom geopandas import GeoDataFrame\nfrom pandas import DataFrame, concat\n\nfrom ._base import Base\nfrom .layer import Layer\n\n\nclass Service(Base):\n def __init__(self, url):\n self.url = url\n super(Service, self).__init__(self.url)\n\n def layers... | [
[
"pandas.concat",
"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": []
}
] |
Microsoft/dowhy | [
"b84e257142df91e4ed792dcf6eee159f446ffef9"
] | [
"dowhy/gcm/shapley.py"
] | [
"\"\"\"This module provides functionality for shapley value estimation.\n\nClasses and functions in this module should be considered experimental, meaning there might be breaking API changes in\nthe future.\n\"\"\"\n\nimport itertools\nfrom enum import Enum\nfrom typing import Callable, Union, Tuple, List, Dict, Se... | [
[
"numpy.random.choice",
"scipy.special.binom",
"numpy.ones",
"scipy.special.comb",
"numpy.ceil",
"numpy.mean",
"numpy.iinfo",
"numpy.insert",
"sklearn.linear_model.LinearRegression",
"numpy.bincount",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.14",
"1.6",
"1.10",
"0.15",
"1.4",
"0.16",
"1.9",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"1.0",
"0.17",
"1.3",
"1.8"
],
"tensorflow": []
... |
cielavenir/scipy | [
"7532d864bbaee2a9a925d18a5bfc2f470643a363"
] | [
"scipy/sparse/linalg/eigen/arpack/setup.py"
] | [
"from __future__ import division, print_function, absolute_import\n\nfrom os.path import join\n\n\ndef configuration(parent_package='',top_path=None):\n from scipy._build_utils.system_info import get_info, NotFoundError\n from numpy.distutils.misc_util import Configuration\n from scipy._build_utils import ... | [
[
"scipy._build_utils.system_info.get_info",
"numpy.distutils.misc_util.Configuration",
"scipy._build_utils.get_g77_abi_wrappers"
]
] | [
{
"matplotlib": [],
"numpy": [
"1.11",
"1.19",
"1.24",
"1.16",
"1.23",
"1.20",
"1.7",
"1.12",
"1.21",
"1.22",
"1.14",
"1.6",
"1.13",
"1.9",
"1.17",
"1.10",
"1.18",
"1.15",
"1.8"
],
"pand... |
RyuTake/PythonStudy | [
"7726f0cdaed2e65134027540d53ba77dc0ffe4cc"
] | [
"5_2_clustering.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Oct 29 13:47:57 2018\n\n@author: rtake\n\"\"\"\n\nimport matplotlib.pyplot as plt\nfrom sklearn import cluster\nfrom sklearn import datasets\n\n#irisデータを読み込み\niris = datasets.load_iris()\ndata = iris['data']\n\n# 学習→クラスタの生成\nmodel = cluster.KMeans(n_clusters=3) #学習、ク... | [
[
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.scatter",
"sklearn.cluster.KMeans",
"matplotlib.pyplot.figure",
"sklearn.datasets.load_iris",
"sklearn.metrics.confusion_matrix",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplot... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
AndraIonescu/reproducing-schema-matching | [
"a20f03413064f50723ae6bfdbe9f773f67b7cd71"
] | [
"algorithms/clustering/quantile_histogram/histogram.py"
] | [
"from numpy import ndarray\nimport numpy as np\nimport scipy.stats as ss\n\n\nclass QuantileHistogram(object):\n \"\"\"\n A class used to represent an equi depth quantile histogram\n\n e.g. Quantile histogram with 256 buckets\n\n |------||------||------| ... |------|\n 1 2 3 ... ... | [
[
"numpy.array",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mitchellgordon95/mesh-transformer-jax | [
"13b095791ba239ce6ec5e0330eaece758ab21dd0"
] | [
"train.py"
] | [
"import argparse\nimport json\nimport time\n\nimport numpy as np\nimport wandb\nfrom tqdm import tqdm\n\nfrom mesh_transformer.build_model import build_model\nfrom lm_eval import evaluator, tasks\nfrom tasks.eval_harness import EvalHarnessAdaptor\nfrom tfrecord_loader import TFRecordNewInputs\nimport multiprocessin... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
StrayBird-ATSH/gluon-nlp | [
"5dc6b9c9fab9e99b155554a50466c514b879ea84",
"5dc6b9c9fab9e99b155554a50466c514b879ea84"
] | [
"scripts/bert/data/create_pretraining_data.py",
"src/gluonnlp/model/transformer.py"
] | [
"# Copyright 2018 The Google AI Language Team Authors and DMLC.\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.ascontiguousarray",
"numpy.savez_compressed",
"numpy.array"
],
[
"numpy.arange",
"numpy.cos",
"numpy.sin"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
red-cheese/icsic-vae-for-bridges | [
"640d529c41501db193170c0415ed6c1fb2d61a41"
] | [
"methods/vae.py"
] | [
"\n\nimport rec_proba\n\nfrom keras import backend as K\nfrom keras import Model\nfrom keras import initializers\nfrom keras.layers import Dense, Input, Lambda, LSTM, RepeatVector, Reshape\nimport os\nimport numpy as np\nimport pickle\n\n\nBATCH_SIZE = 64\nEPOCHS = 50\nLATENT_DIM = 2\nSTDDEV_INIT = 0.01\nKERNEL_INI... | [
[
"numpy.std",
"numpy.mean",
"numpy.where",
"numpy.log"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
patdring/CarND-Term1-Behavioral-Cloning-P3 | [
"3c2dc0327c7bd829d5c19d42c9eed299bb974f7a"
] | [
"drive.py"
] | [
"import argparse\nimport base64\nfrom datetime import datetime\nimport os\nimport shutil\nimport tensorflow as tf\nimport numpy as np\nimport socketio\nimport eventlet\nimport eventlet.wsgi\nfrom PIL import Image\nfrom flask import Flask\nfrom io import BytesIO\n\nfrom keras.models import load_model\nimport h5py\nf... | [
[
"numpy.asarray"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jinyiliu/plancklens | [
"ae9a77efd7eceb1662acd037e31f2bbe8754dfc3"
] | [
"plancklens/filt/filt_simple.py"
] | [
"\"\"\"simple CMB filtering module.\n\nThis module collects a couple of fast (non-iterative) filtering methods.\n\n\"\"\"\nfrom __future__ import print_function\n\nimport healpy as hp\nimport numpy as np\nimport pickle as pk\nimport os\n\nfrom plancklens.helpers import mpi\nfrom plancklens import utils\n\nclass li... | [
[
"numpy.copy",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
kanji95/pytorch | [
"b8e6144e0a328fe49067ae7d18d5582c8f1a61b0"
] | [
"torch/testing/_internal/common_modules.py"
] | [
"import torch\nfrom copy import deepcopy\nfrom functools import wraps, partial\nfrom itertools import chain\nfrom torch.testing import floating_types\nfrom torch.testing._internal.common_device_type import (\n _TestParametrizer, _dtype_test_suffix, _update_param_kwargs, skipIf)\nfrom torch.testing._internal.comm... | [
[
"torch.testing._internal.common_device_type._dtype_test_suffix",
"torch.empty",
"torch.testing._internal.common_device_type.skipIf",
"torch.testing._internal.common_nn.nllloss_reference",
"torch.testing._internal.common_device_type._update_param_kwargs",
"torch.testing.floating_types"
]
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Woodenonez/multimodal_motion_prediction | [
"e1c799626a2b99780afe63b64e29042cb8043dd3"
] | [
"misc_mixture_density_network.py"
] | [
"import sys\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nimport torch\nimport torch.nn as nn\nimport torch.tensor as ts\nimport torch.optim as optim\n\nimport mdn_base\nfrom mdn_base import MDN_Module as MDN # classic_MDN_Module just use exp for sigma\n# from mdn_base import classic_MDN_Module as MDN #... | [
[
"torch.optim.Adam",
"matplotlib.pyplot.legend",
"torch.nn.BatchNorm1d",
"torch.tensor",
"matplotlib.pyplot.plot",
"torch.nn.Linear",
"matplotlib.pyplot.xlabel",
"torch.nn.ReLU",
"matplotlib.pyplot.show",
"torch.nn.MSELoss"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
tnwei/gradio | [
"472c1a9372f7c75040665083eb759f60f18906fc"
] | [
"gradio/outputs.py"
] | [
"\"\"\"\nThis module defines various classes that can serve as the `output` to an interface. Each class must inherit from\n`OutputComponent`, and each class must define a path to its template. All of the subclasses of `OutputComponent` are\nautomatically added to a registry, which allows them to be easily reference... | [
[
"numpy.array",
"scipy.io.wavfile.write"
]
] | [
{
"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"... |
sjmluo/myfuzzbench | [
"d953a65feab096aa958a338dadbeb746602684da"
] | [
"analysis/plotting.py"
] | [
"# Copyright 2020 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 ... | [
[
"matplotlib.colors.BoundaryNorm",
"numpy.arange",
"numpy.triu_indices_from",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.gcf",
"numpy.log10",
"matplotlib.colors.ListedColormap",
"numpy.zeros_like",
"matplotlib.pyplot.close"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MrForExample/Weighted-UFC-Fight-Predictor | [
"bd5744bfb8fcab4d054a7e038ccc3e854c5fd4fa"
] | [
"Code/Feature_Engineering/BuildFightData_No_NC_And_DCD.py"
] | [
"import pandas as pd\nimport numpy as np\nimport calendar\nimport re\nimport datetime\nimport dateutil\nfrom ast import literal_eval\n\nfrom os import path\nimport pickle\nfrom Code.Settings import build_settings as bs\n\ndef init_columns_name(last_words, base_columns):\n new_columns_name = []\n for col in ba... | [
[
"numpy.isnan",
"pandas.read_csv",
"pandas.to_datetime",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
LorenFrankLab/nwb_datajoint | [
"ef50fe23f71fe8f44ce6c878f863de51a49478cb"
] | [
"src/nwb_datajoint/common/common_ephys.py"
] | [
"import re\nimport warnings\n\nimport datajoint as dj\nimport numpy as np\nimport pynwb\n\nfrom .common_device import Probe # noqa: F401\nfrom .common_filter import FirFilter\nfrom .common_interval import IntervalList, interval_list_censor, interval_list_intersect # noqa: F401\n# SortInterval, interval_list_inter... | [
[
"numpy.asarray",
"numpy.round",
"numpy.append",
"numpy.where",
"numpy.isin",
"numpy.isclose"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
thouis/pandas | [
"f014b01af7bd2d03266697e672c2d41daded3fca"
] | [
"pandas/tests/test_panel4d.py"
] | [
"from datetime import datetime\nimport os\nimport operator\nimport unittest\nimport nose\n\nimport numpy as np\n\nfrom pandas import DataFrame, Index, isnull, notnull, pivot, MultiIndex\nfrom pandas.core.datetools import bday\nfrom pandas.core.frame import group_agg\nfrom pandas.core.panel import Panel\nfrom pandas... | [
[
"pandas.core.panel.Panel",
"numpy.asarray",
"pandas.util.testing.assert_frame_equal",
"numpy.random.randn",
"numpy.var",
"pandas.util.testing.makePanel4D",
"pandas.util.testing.add_nans",
"numpy.arange",
"pandas.core.common.is_float_dtype",
"pandas.util.testing.assert_serie... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"0.19",
"0.24",
"0.20",
"0.25"
],
"scipy": [
"0.13",
"1.6",
"0.14",
"1.10",
"0.15",
"1.4",
"0.16",
"1.9",
"0.19",
"1.5",
"0.18",
... |
AbdallahHemdan/Arithmetic-Coding | [
"326365a8281c1f570fd88ebf12ec96c863a00226"
] | [
"encoding.py"
] | [
"import numpy as np\nimport cv2\n\ninputImg = cv2.imread('dog.jpg', 0) # read the image\ncv2.imshow('dog', inputImg)\n\nrow = inputImg.shape[0]\ncol = inputImg.shape[1]\n\nimg = np.array(inputImg).flatten() # flatten the image into 1d array\nfrq = np.zeros(256, dtype=int) # frq of all gray scale levels\nblockSiz... | [
[
"numpy.array",
"numpy.zeros",
"numpy.save"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
pouyaaghahoseini/nla-project | [
"4bdc77c5c029b27f2e7cb4a0529fb00191f02815",
"4bdc77c5c029b27f2e7cb4a0529fb00191f02815"
] | [
"Problem 1/gauss-elimination.py",
"Problem 1/SOR.py"
] | [
"import numpy as np\nimport time\n\ndef create_tridiag(a, b, c, n):\n A = np.zeros((n, n))\n for i in range(n):\n A[i][i] = b\n if i < n - 1:\n A[i + 1][i] = a\n A[i][i + 1] = c\n return A\n\n\ndef solve_gauss(A, B):\n n = len(A)\n det = 1\n for i in range(n):\n... | [
[
"numpy.linalg.solve",
"numpy.zeros"
],
[
"numpy.dot",
"numpy.subtract",
"numpy.ones",
"numpy.copy",
"numpy.fill_diagonal",
"scipy.linalg.solve",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"0.12",
"0.14",
"0.15"
],
"tensorflow": []
}
] |
scribbler00/fastrenewables | [
"f1a722b19376d0e3f26707aa4af6caf7ba8a8dfa"
] | [
"fastrenewables/baselines.py"
] | [
"# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/00d_baselines.ipynb (unless otherwise specified).\n\n__all__ = ['truncated_svd', 'prep_fixed_point_empircal_bayes', 'evidence_fixed_point', 'BayesLinReg', 'RidgeRegression',\n 'relu', 'identity', 'sigmoid', 'tmp', 'test_acts', 'ELM', 'sample_bayes_linear_mo... | [
[
"numpy.dot",
"sklearn.utils.validation.check_is_fitted",
"numpy.sqrt",
"numpy.squeeze",
"numpy.concatenate",
"numpy.random.randn",
"numpy.exp",
"numpy.square",
"numpy.linalg.svd",
"numpy.allclose",
"numpy.arange",
"numpy.eye",
"numpy.linalg.slogdet",
"numpy.... | [
{
"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": [],
... |
aicells/aicells | [
"b22bb0fe2f96afcab2c83a8b7cc4feb03ad32fad"
] | [
"aicells-python/aicells_pkg/aicells/aicells-server/AICFunction.py"
] | [
"# AIcells (https://github.com/aicells/aicells) - Copyright 2020 Gergely Szerovay, László Siller\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/lice... | [
[
"pandas.Series",
"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": []
}
] |
maryamhgf/backpack | [
"63d2717656df2e0f18b3b6ee50320e82ce7358b6"
] | [
"test/bugfixes_test.py"
] | [
"import itertools\n\nimport pytest\nimport torch\n\nimport backpack\n\n\ndef parameters_issue_30():\n possible_values = {\n \"N\": [4],\n \"C_in\": [4],\n \"C_out\": [6],\n \"H\": [6],\n \"W\": [6],\n \"K\": [3],\n \"S\": [1, 3],\n \"pad\": [0, 2],\n ... | [
[
"torch.manual_seed",
"torch.nn.Conv2d",
"torch.randn"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Leoniie/ecg_video_classification | [
"97d38a6e0b2b54919881123117aec1374bbd81d0"
] | [
"aml_example_files/get_data.py"
] | [
"import numpy as np\nimport skvideo.io \nimport os \nimport sys \nimport pandas as pd\n\ndir_path = os.path.dirname(os.path.realpath(__file__))\n\ndef get_videos_from_folder(data_folder):\n\t'''\n\tget a list of video x wehre each video is a numpy array in the format [n_frames,width,height] \n\twith uint8 elements... | [
[
"pandas.read_csv",
"numpy.array",
"numpy.take"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
marctuscher/tf-multitask | [
"206db069e7981b57426c77d301010c7aba8fa807"
] | [
"src/core/networks/add_multi_task.py"
] | [
"import numpy as np\nimport os\nimport tensorflow as tf\nimport shutil\nfrom random import shuffle\nfrom core.utilities.keras_progbar import Progbar\n\n\nclass MultiTaskModel():\n\n def __init__(self, ntags_pos, ntags_ner, utils, dir_model):\n \"\"\"\n Defines the hyperparameters\n \"\"\"\n ... | [
[
"tensorflow.get_variable",
"tensorflow.variables_initializer",
"tensorflow.nn.bidirectional_dynamic_rnn",
"numpy.mean",
"tensorflow.train.AdamOptimizer",
"tensorflow.summary.scalar",
"tensorflow.boolean_mask",
"tensorflow.Variable",
"tensorflow.train.MomentumOptimizer",
"te... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
minatoyuichiro/Blueqat | [
"1be0150ca48bf40527936561d1bf4687dbf435b4",
"6c5f26b377bc3ce0d02adec8b9132d70870b3d95"
] | [
"blueqat/backends/draw_backend.py",
"blueqat/backends/numpy_backend.py"
] | [
"from .backendbase import Backend\nfrom ..circuit import Circuit\nfrom ..gate import *\n\nimport networkx as nx\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport math\n\nclass DrawCircuit(Backend):\n \"\"\"Backend for draw output.\"\"\"\n \n def _preprocess_run(self, gates, n_qubits, args, kwarg... | [
[
"matplotlib.pyplot.show"
],
[
"numpy.copyto",
"numpy.arange",
"numpy.zeros",
"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",
... |
ucgmsim/Empirical_Engine | [
"fa990da352c5615bcaf300142fad6907024e917b"
] | [
"empirical/GMM_models/AfshariStewart_2016_Ds.py"
] | [
"\"\"\"\nAfshariStewart_2016_Ds.py\nJason Motha\n29/3/16\n\nProvides the ground motion prediction equation for Significant duration\ndefined at the time from 5-95% of the Arias intensity\n\nReference: Kempton JJ, Stewart JP. Prediction equations for significant duration\nof earthquake ground motions considering si... | [
[
"numpy.log",
"numpy.exp",
"numpy.sqrt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
TromsFylkestrafikk/models | [
"028eecfbe3e23a73228110bff8900e50c64a7bed"
] | [
"research/object_detection/meta_architectures/center_net_meta_arch.py"
] | [
"# Copyright 2020 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.compat.v1.logical_and",
"tensorflow.compat.v1.concat",
"tensorflow.compat.v1.equal",
"tensorflow.compat.v1.train.Checkpoint",
"tensorflow.compat.v1.math.top_k",
"tensorflow.compat.v1.math.logical_and",
"tensorflow.compat.v1.keras.Sequential",
"tensorflow.compat.v1.shape... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
kads29/Project | [
"63c116ef450b2d0e0d51931fff10e1dbc0489864"
] | [
"master/hopper_training/src/monoped_state.py"
] | [
"#!/usr/bin/env python\n\nimport rospy\nimport copy\nfrom gazebo_msgs.msg import ContactsState\nfrom sensor_msgs.msg import Imu\nfrom nav_msgs.msg import Odometry\nfrom geometry_msgs.msg import Point, Quaternion, Vector3\nfrom sensor_msgs.msg import JointState\nimport tf\nimport numpy\nimport math\n\n\"\"\"\n wrenc... | [
[
"numpy.linspace",
"numpy.linalg.norm",
"numpy.digitize",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
liudengfeng/trading_calendars | [
"c56675a9de11830bed7c20e067987a9962d8d1ce"
] | [
"tests/test_xfra_calendar.py"
] | [
"from unittest import TestCase\nimport pandas as pd\nfrom pytz import UTC\n\nfrom test_trading_calendar import ExchangeCalendarTestBase\nfrom trading_calendars.exchange_calendar_xfra import XFRAExchangeCalendar\n\n\nclass XFRACalendarTestCase(ExchangeCalendarTestBase, TestCase):\n\n answer_key_filename = 'xfra'\... | [
[
"pandas.Timestamp",
"pandas.Timedelta"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
GAIL-4-BARK/tf2rl | [
"5468115c375bc7eea4d256033c460da001bdd0e3"
] | [
"tf2rl/algos/td3.py"
] | [
"import numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras.layers import Dense\n\nfrom tf2rl.algos.ddpg import DDPG, Actor\nfrom tf2rl.misc.target_update_ops import update_target_variables\nfrom tf2rl.misc.huber_loss import huber_loss\n\n\nclass Critic(tf.keras.Model):\n def __init__(self, state_shape, ... | [
[
"tensorflow.clip_by_value",
"tensorflow.device",
"tensorflow.concat",
"tensorflow.Variable",
"tensorflow.shape",
"tensorflow.keras.layers.Dense",
"tensorflow.minimum",
"tensorflow.equal",
"tensorflow.stop_gradient",
"tensorflow.keras.optimizers.Adam",
"tensorflow.math.m... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"2.8",
"1.10",
"1.12",
"2.7",
"2.6",
"1.13",
"2.3",
"2.4",
"2.9",
"2.5",
"2.2",
"2.10"
]
}
] |
zsarnoczay/uqFEM | [
"425163f09fbe021a0b274b47e9a6c0207b587ce1"
] | [
"backend/modules/performUQ/UCSD_UQ/runTMCMC.py"
] | [
"\"\"\"\nauthors: Mukesh Kumar Ramancha, Maitreya Manoj Kurumbhati, and Prof. J.P. Conte \naffiliation: University of California, San Diego\n\n\"\"\"\n\nimport numpy as np\nimport tmcmcFunctions\nimport multiprocessing as mp\nfrom multiprocessing import Pool\nfrom runFEM import runFEM\nfrom numpy.random import Seed... | [
[
"numpy.log",
"numpy.asarray",
"numpy.random.SeedSequence",
"numpy.array",
"numpy.random.default_rng"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lightnerdevtech/pyADVISE | [
"7496729b57a777c5ac73d1ac08589b9794a77955"
] | [
"pyADVISE/data_step.py"
] | [
"import pandas as pd\npath='C:/Users/alightner/Documents/Source_Updates/ESDB/Database/'\n\n\nimport country_converter as coco\ncc = coco.CountryConverter()\n\n\ndef transform_to_codes(data, col, new_col_name, name_type='ISO3'): \n data.replace('Congo, Dem. Rep.', 'DR Congo', inplace=True)\n data[col_name] = ... | [
[
"pandas.merge",
"pandas.read_excel",
"pandas.read_sas",
"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": []
}
] |
davidmkwon/ray | [
"9053be0e639cf35a1b113ca8a4fc378d209ecb75"
] | [
"rllib/evaluation/tests/test_rollout_worker.py"
] | [
"from collections import Counter\nimport gym\nfrom gym.spaces import Box, Discrete\nimport numpy as np\nimport os\nimport random\nimport time\nimport unittest\n\nimport ray\nfrom ray.rllib.agents.pg import PGTrainer\nfrom ray.rllib.agents.a3c import A2CTrainer\nfrom ray.rllib.env.vector_env import VectorEnv\nfrom r... | [
[
"numpy.min",
"numpy.max",
"numpy.argmax",
"numpy.zeros_like",
"numpy.mean"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
qiaone/GIF | [
"2c551e844748c72395fc91fb080c7a2f9c8d5285"
] | [
"tests/compute_light_stastics.py"
] | [
"import numpy as np\n\n\nlight_code = []\nfl_param_dict = np.load('/is/cluster/work/pghosh/gif1.0/DECA_inferred/deca_flame_params_camera_corrected.npy',\n allow_pickle=True).item()\nfor i, key in enumerate(fl_param_dict):\n flame_param = fl_param_dict[key]\n light_code.append(flame_para... | [
[
"numpy.std",
"numpy.argmax",
"numpy.mean",
"numpy.load",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Kubasinska/Roots | [
"fc8915d6d043b527c622e3c78d3c658ffdd23cab"
] | [
"tests/generate_dynamic_source_arbor.py"
] | [
"from roots.core import Roots,Roots_math\nfrom roots.kmd import KMDD\nfrom roots.graphmethods import GraphMethods\nfrom roots.swcToolkit import swcToolkit\nfrom roots.root2neuron import Root2Hoc,Root2Py\nfrom roots.microstructures import Microstructures\nimport os\nfrom roots.visualization import swcVisualizer\nimp... | [
[
"numpy.arange",
"numpy.random.rand"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
h3dema/deepwifi | [
"2df0f5b4de7c9cb4c1d26e5629fa689e2a6036e4"
] | [
"DQL/ddql.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\n This module implements Double Deep QL\n\n\"\"\"\nimport numpy as np\nimport logging\n\nfrom DQL.dql import DQL\n\n\n\"\"\"LOG variable for the DDQL module\"\"\"\nLOG = logging.getLogger('DDQL')\nlogging.basicConfig(level=logging.INFO)\n\n\nclass DDQL(DQL)... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Akababa/torch2trt | [
"03063b74a7eb40f5aac88d49be6b8b5e4e4e92d7"
] | [
"torch2trt/conversion_utils.py"
] | [
"import numpy as np\n\nimport tensorrt as trt\nimport torch\nimport functools\n\nget_output_old = trt.ILayer.get_output\n\n\n# Wrap tensorrt.ILayer.get_output for better error checking and debugging\n@functools.wraps(get_output_old)\ndef __get_output_v2(*args, **kwargs):\n # allargs = tuple(args) + tuple(kwargs.... | [
[
"torch.device",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
CuiRuikai/Bidirectional-Residual-Declarative-Network | [
"af2601c35777ab967c620b9353dcd230445efebe"
] | [
"ddn/pytorch/sample_nodes.py"
] | [
"# SAMPLE DEEP DECLARATIVE NODES\n#\n# Dylan Campbell <dylan.campbell@anu.edu.au>\n# Stephen Gould <stephen.gould@anu.edu.au>\n\nimport torch\nimport math\nfrom ddn.pytorch.node import *\n\nclass SquaredErrorNode(AbstractNode):\n \"\"\"Computes the squared difference between the input and a given target vector.\... | [
[
"torch.abs",
"torch.enable_grad",
"torch.sign",
"torch.sqrt",
"torch.einsum",
"torch.zeros_like",
"torch.optim.LBFGS",
"torch.pow",
"torch.stack",
"torch.index_select",
"torch.ones_like"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
irfanimaduddin/lhires-observing-log | [
"74591520da6a99708ffcd8c45eadcd9416ef86c4"
] | [
"core_script/function.py"
] | [
"from PyQt5 import QtCore\r\nfrom PyQt5.QtWidgets import *\r\n\r\nimport numpy as np\r\nimport pandas as pd\r\nimport re\r\n\r\nclass pandasModel(QtCore.QAbstractTableModel):\r\n\r\n def __init__(self, data):\r\n QtCore.QAbstractTableModel.__init__(self)\r\n self._data = data\r\n\r\n def rowCoun... | [
[
"pandas.Timedelta",
"pandas.Series",
"pandas.DataFrame",
"pandas.Timestamp.utcnow"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
specter119/py4cytoscape | [
"11f968a8ab6518354406c9ed8321f331355b54f0"
] | [
"py4cytoscape/style_values.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"Functions for retrieving current values for visual properties.\n\nI. General functions for getting node, edge and network properties\nII. Specific functions for getting particular node, edge and network properties\n\"\"\"\n\n\"\"\"Copyright 2020 The Cytoscape Consortium\n\nPermissi... | [
[
"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": []
}
] |
flaxandteal/intro-to-fea-in-python | [
"c074e995efe0799dcc7f9e1e89e0d9e196f2c644"
] | [
"003-scripting-tasks/snippet/rainfall.py"
] | [
"from matplotlib import pyplot\nfrom mpl_toolkits.mplot3d import Axes3D, axes3d\nimport numpy\nimport datetime\nimport os\n\n# Load rainfall data\nX, Y, rainfall = numpy.loadtxt(\"rainfall-radar.csv\").T\n\n\n# Some clever 3D plotting\nfig = pyplot.figure()\naxes = Axes3D(fig)\naxes.plot_trisurf(X, Y, rainfall)\n\n... | [
[
"numpy.loadtxt",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Mufabo/robustsp | [
"c5f765600bdf087c159f75d6d10aeeacff5d4e1d"
] | [
"robustsp/LocationScale/MLocHub.py"
] | [
"'''\nMloc_HUB computes Huber's M-estimate of\nlocation, i.e.,\n\nmu_hat = arg min_mu SUM_i rho_HUB(y_i - mu)\n\n\n INPUTS: \n y: real valued data vector of size N x 1\n c: tuning constant c>=0 . default = 1.345\n default tuning for 95 percent efficiency under \n the Gau... | [
[
"numpy.asarray",
"numpy.median",
"numpy.absolute",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
tarakapoor/thyroid_deep_learning | [
"28fad8cf1b297d79bbff98960b2baa2d7cea6a75"
] | [
"mobilenet_dataset.py"
] | [
"print(\"\\nTHYROID DATASET\\n\")\nimport pandas as pd\nfrom PIL import Image\nimport os\nimport os.path\n\nimport numpy as np\nimport re\nfrom pathlib import Path\nimport tables\nimport cv2\nimport h5py\nimport math\nimport random\n\n#data aug\nfrom albumentations.pytorch import ToTensorV2\nfrom albumentations.pyt... | [
[
"torch.LongTensor",
"pandas.read_csv",
"torch.from_numpy",
"numpy.stack",
"numpy.shape",
"numpy.bincount",
"numpy.transpose"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
hereagain-Y/DeepTCR | [
"0fa6fff45231d4caa05ef17fb7066b88ac018185"
] | [
"ancillary_analysis/supervised/other/alpha_v_beta.py"
] | [
"\"\"\"Figure 2D\"\"\"\n\n\"\"\"This script is used to benchmark the performance of the Supervised Sequence Classifier\nwith either the alpha chain, beta chain, or both provided to the model.\"\"\"\n\nfrom DeepTCR.DeepTCR import DeepTCR_SS\nfrom multiprocessing import Pool\nimport matplotlib.pyplot as plt\nfrom skl... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.tight_layout",
"sklearn.metrics.roc_auc_score",
"matplotlib.pyplot.title",
"matplotlib.pyplot.ylim",
"sklearn.metrics.roc_curve",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlim",
"matplotlib.pyplo... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
worldlife123/maskrcnn-benchmark | [
"6c8bc908c2b7299ca6ffb292ae2680ac354d0eec"
] | [
"tools/train_lr_net.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nr\"\"\"\nBasic training script for PyTorch\n\"\"\"\n\n# Set up custom environment before nearly anything else is imported\n# NOTE: this should be the first import (no not reorder)\nfrom maskrcnn_benchmark.utils.env import setup_environment #... | [
[
"torch.distributed.init_process_group",
"torch.cuda.set_device",
"torch.cuda.empty_cache",
"torch.multiprocessing.set_sharing_strategy",
"torch.device",
"torch.nn.parallel.DistributedDataParallel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
shaanrockz/PyZPK | [
"95d9f8880a56e5a3666109f653998de78fc9a466"
] | [
"pyzpk/main.py"
] | [
"import torch\n\ndef sum(x,y):\n \n return torch.add(x, y)"
] | [
[
"torch.add"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
oikosohn/compound-loss-pytorch | [
"f53491f498434565c07761db99cea8b7079c14fe"
] | [
"jaccard_ce_loss_smp.py"
] | [
"import segmentation_models_pytorch as smp\nimport torch.nn as nn\n\nclass JaccardCELoss(smp.utils.base.Loss):\n def __init__(self, alpha=1.0, beta=0.5, **kwargs):\n super().__init__(**kwargs)\n self.alpha = alpha\n self.beta = beta\n\n self.jaccardloss=smp.losses.JaccardLoss(mode='mu... | [
[
"torch.nn.CrossEntropyLoss"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Milad-Rakhsha/Friction-Contact | [
"59d17b231c5dd764c741c941e5443141d43ec7e8"
] | [
"test_project.py"
] | [
"# =============================================================================\n# SIMULATION-BASED ENGINEERING LAB (SBEL) - http://sbel.wisc.edu\n# University of Wisconsin-Madison\n#\n# Copyright (c) 2020 SBEL\n# All rights reserved.\n#\n# Use of this source code is governed by a BSD-style license that can be fou... | [
[
"numpy.sqrt",
"numpy.meshgrid",
"numpy.linspace",
"numpy.linalg.norm",
"numpy.random.rand",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cta-rta/rta-sci-grb | [
"aa7de6aded51edfad4864ba99e2f345aaf68abfe"
] | [
"runCatVisibility.py"
] | [
"# *******************************************************************************\n# Copyright (C) 2020 INAF\n#\n# This software is distributed under the terms of the BSD-3-Clause license\n#\n# Authors:\n# Ambra Di Piano <ambra.dipiano@inaf.it>\n# *******************************************************************... | [
[
"numpy.save"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
yanglinGEM/ReDet | [
"80cb7b0643c57aa2641ad6a1fc5eada4e575fcfe"
] | [
"mmdet/models/necks/re_fpn.py"
] | [
"import e2cnn.nn as enn\nimport math\nimport os\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport warnings\nfrom e2cnn import gspaces\nfrom mmcv.cnn import constant_init, kaiming_init, xavier_init\n\nfrom ..registry import NECKS\n\n# Set default Orientation=8, .i.e, the group C8\n# One c... | [
[
"torch.nn.ModuleList"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
fossabot/mljar-supervised | [
"b77b945b093ea25edef41bbb0f58acd63b269bbe"
] | [
"supervised/utils/shap.py"
] | [
"import os\nimport logging\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom sklearn.preprocessing import OneHotEncoder\n\nfrom supervised.algorithms.registry import (\n BINARY_CLASSIFICATION,\n MULTICLASS_CLASSIFICATION,\n REGRESSION,\n)\nimport shap\n\n\nlogger = logging.get... | [
[
"numpy.abs",
"numpy.min",
"numpy.unique",
"sklearn.preprocessing.OneHotEncoder",
"numpy.random.shuffle",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.close",
"numpy.array",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dbcooney/Social-Dilemmas-of-Sociality-due-to-Beneficial-and-Costly-Contagion | [
"934e041d12170af97f297b3da455ee8557f516a3"
] | [
"Scripts/socialoptimumfigure.py"
] | [
"\"\"\"\nCode used to generate Figure 1, which illustrates the Cobb-Douglas utility function, the\nendemic equilibriua for the good and bad contagion, and the population utility ahieved at \nequilibrium and the result socially-optimal sociality strategy. \n\"\"\"\n\n\nimport matplotlib.pyplot as plt\nimport numpy a... | [
[
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.contourf",
"numpy.linspace",
"numpy.arange",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"numpy.vectorize",
"matplotlib.pyplot.contour",
"numpy.meshgrid",
"numpy.zeros",
"matplotlib.pyplot.show",
"m... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jimgoo/zipline | [
"67e3355c67e34ccad000d411a834262841a2c232"
] | [
"zipline/data/us_equity_pricing.py"
] | [
"# Copyright 2015 Quantopian, 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 ag... | [
[
"pandas.isnull",
"numpy.issubdtype",
"numpy.nan_to_num",
"pandas.DatetimeIndex",
"pandas.DataFrame",
"numpy.full",
"numpy.iinfo",
"numpy.array",
"pandas.Timestamp",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
DemisseG/Approximately_Covariant_CNN- | [
"19c4b2363083ba25a2af17a2672da330ae9ed7fc"
] | [
"ac/utils.py"
] | [
"from __future__ import absolute_import, division\nfrom typing import Tuple, List\n\nimport math\nimport numpy\nimport torch\n\n\ndef scheduled_learning(init: float, current_epoch: int, total_epoch: int) -> int:\n scale = lambda x, y :x * math.pow(0.2, y)\n if(current_epoch > int(total_epoch*0.8)):\n r... | [
[
"torch.mm",
"torch.sin",
"torch.zeros",
"numpy.arange",
"torch.tensor",
"torch.cos"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
karnation22/tmpstpvol | [
"1a25c4847af496c2fdd7092a56c2e0dffa6c75a9"
] | [
"triples_from_text.py"
] | [
"## NOT KARN'S WORK!\r\n# -*- coding: utf-8 -*-\r\nimport os\r\nimport pandas as pd\r\nimport argparse\r\nimport re\r\nimport spacy\r\nfrom spacy.attrs import intify_attrs\r\nimport en_core_web_sm\r\nnlp = spacy.load(\"en_core_web_sm\")\r\n\r\nimport neuralcoref\r\n\r\nimport networkx as nx\r\nimport matplotlib.pyp... | [
[
"matplotlib.pyplot.savefig",
"pandas.DataFrame",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
Avmb/lrn | [
"d71775d9f44efa2e73f126f56a41fe7d678203db",
"d71775d9f44efa2e73f126f56a41fe7d678203db"
] | [
"nli/code/utils/initializer.py",
"doc/code/vocab.py"
] | [
"# coding: utf-8\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport tensorflow as tf\n\n\ndef get_initializer(params):\n if params.initializer == \"uniform\":\n max_val = params.initializer_gain\n return tf.random_uniform_init... | [
[
"tensorflow.random_uniform_initializer",
"tensorflow.logging.warn",
"tensorflow.variance_scaling_initializer",
"tensorflow.glorot_uniform_initializer",
"tensorflow.random_normal_initializer"
],
[
"numpy.load",
"numpy.savez",
"tensorflow.logging.info"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.4",
"1.5",
"1.7",
"1.0",
"1.2"
]
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
clvcooke/densenet.pytorch | [
"ae3b0aca6743d4579ec43f693f283a341cf3911c"
] | [
"densenet.py"
] | [
"import torch\n\nimport torch.nn as nn\nimport torch.optim as optim\n\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\n\nimport torchvision.datasets as dset\nimport torchvision.transforms as transforms\nfrom torch.utils.data import DataLoader\n\nimport torchvision.models as models\n\nimport sy... | [
[
"torch.nn.Sequential",
"torch.cat",
"torch.nn.functional.avg_pool2d",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.BatchNorm2d"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
RozenAstrayChen/sound-anomaly-detection-for-manufacturing | [
"8ed0ec0cd6d436676c773cb323d7658c9259cde3"
] | [
"model_torch.py"
] | [
"import argparse, os\nimport numpy as np\nimport pickle\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.modules.linear import Linear\n\ndef autoencoder(input_dims, type=0):\n \"\"\"\n Define a torch model for anoamly detection\n\n PARAMS\n ===\n input_dims\n... | [
[
"torch.nn.Linear",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Kyubyong/pororo-1 | [
"d465a2699aa72cf7574de6c8c3f22c4be4647996"
] | [
"pororo/models/tts/synthesizer.py"
] | [
"import json\nfrom typing import Tuple\n\nimport librosa\nimport torch\n\nfrom pororo.models.tts.hifigan.checkpoint import load_checkpoint\nfrom pororo.models.tts.hifigan.model import Generator\nfrom pororo.models.tts.synthesis import synthesize\nfrom pororo.models.tts.tacotron.params import Params as tacotron_hp\n... | [
[
"torch.Tensor",
"torch.load"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
trichter/qopen | [
"998fe27ec2d98d46c76093bb70f477ab7bede1a6"
] | [
"qopen/tests/test_rt.py"
] | [
"# Copyright 2015-2017 Tom Eulenfeld, MIT license\n\"\"\"\nTests for rt module.\n\"\"\"\n\nimport matplotlib\nimport numpy as np\nimport unittest\nfrom pkg_resources import load_entry_point\nimport warnings\n\nfrom qopen.rt import G, rt3d_coda_reduced\nfrom qopen.tests.util import tempdir, quiet\n\nmatplotlib.use('... | [
[
"matplotlib.use",
"numpy.sum",
"numpy.linspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
KaihuaTang/mmdetection-support-LVIS | [
"3d69795666790e789595344f15c123391bcef831"
] | [
"mmdet/models/bbox_heads/bbox_head.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.modules.utils import _pair\n\nfrom mmdet.core import (auto_fp16, bbox_target, delta2bbox, force_fp32,\n multiclass_nms)\nfrom ..builder import build_loss\nfrom ..losses import accuracy\nfrom ..registry import... | [
[
"torch.nn.functional.softmax",
"torch.cat",
"torch.nn.init.constant_",
"torch.gather",
"torch.from_numpy",
"torch.sum",
"torch.nn.Linear",
"torch.nn.AvgPool2d",
"torch.nn.init.normal_",
"torch.nonzero",
"torch.nn.modules.utils._pair",
"torch.stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mozillakab/POSTAG-Kabyle | [
"177a299c8640f5cd19842ab56e7203509cae59e6"
] | [
"PosTagAnalysis.py"
] | [
"import csv\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\ncorpora=\"corpus-kab.txt\"\ndef tagset (corpora):\n tags=[]\n for sentence in open(corpora,encoding='utf-8'):\n tagged_sentence=sentence.replace('\\ufeff',\"\").replace('\\n',\"\").split()\n for tagged_word in tagged_sentence:... | [
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.pie",
"pandas.read_csv",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
kyleabeauchamp/pymc | [
"6ce0094584f1fa00eed0b2ecee533c2fb7f190d6",
"6ce0094584f1fa00eed0b2ecee533c2fb7f190d6",
"6ce0094584f1fa00eed0b2ecee533c2fb7f190d6"
] | [
"pymc/NumpyDeterministics.py",
"pymc/tests/test_graph.py",
"pymc/database/ram.py"
] | [
"\"\"\"\npymc.NumpyDeterministics\n\"\"\"\n\n__docformat__ = 'reStructuredText'\nfrom . import PyMCObjects as pm\nimport numpy as np\nfrom numpy import sum, ones, zeros, ravel, shape, size, newaxis\nfrom .utils import find_element, get_signature\nimport inspect\n\nfrom . import six\nxrange = six.moves.xrange\n\n# a... | [
[
"numpy.cosh",
"numpy.cos",
"numpy.sinh",
"numpy.sin",
"numpy.sign",
"numpy.tan",
"numpy.shape",
"numpy.tanh",
"numpy.exp"
],
[
"numpy.sum"
],
[
"numpy.shape",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sethah/transfer_nlp | [
"bd094ab80f7f8ce6854256f094bdaea6ad683455"
] | [
"src/text_utils.py"
] | [
"import torch\n\nimport spacy\nimport re\nimport html\nimport json\nimport ftfy\nre1 = re.compile(r' +')\n\n\nclass AttentionIterator(object):\n \"\"\"\n An iterator that adds positional indices to a sequence iterator\n \"\"\"\n\n def __init__(self, iterator, pos_start_index):\n self.iterator = ... | [
[
"torch.stack",
"torch.ones",
"torch.arange"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
pangeo-data/storage-benchmarks | [
"36dac78ffc30b93a58cba901441aae9609d709d3"
] | [
"benchmarks/gcp_kubernetes_read_zarr.py"
] | [
"\"\"\"Dask IO performance.\n\nThese ASV classes are meant to test the IO performance of various Dask/Xarray\nbased calculations and operations against a variety of storage backends and\narchitectures.\n\nASV Parameters:\n backend (str): Storage backend that will be used. e.g. POSIX fs, FUSE,\n etc.\n\n ... | [
[
"numpy.arange"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
HughLDDMM/TreeLDDMMCVPR | [
"528a79d39617481b5dde53bccefa86e9eb7e489a"
] | [
"Optimization/new_tree_structures.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed May 26 19:23:04 2021\n\"\"\"\nfrom constants import THRSHLD_ORTHANT, THRSHLD_LENGTH, N_INTERP, THRSHLD_CONSTRUCTION\n\nfrom registration import Hamiltonian_points\n\nfrom keops_utils import TestCuda\nimport torch\n\nuse_cuda,torchdeviceId,torchdtype,KeOpsdeviceId,KeO... | [
[
"torch.linspace",
"torch.ones",
"torch.Tensor",
"torch.zeros",
"torch.cat",
"torch.clone",
"torch.tensor",
"torch.unique",
"torch.where",
"torch.arange",
"torch.count_nonzero"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
AmirS2/sagemaker-python-sdk | [
"bb17c3b3de6a9af718279670c8177b5f3a19659c"
] | [
"tests/integ/test_tuner.py"
] | [
"# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#\n# or in th... | [
[
"numpy.zeros",
"numpy.random.rand"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
GT4SD/moses | [
"2fb13dc757f82484beaae19140be335affb60c4b"
] | [
"moses/metrics/metrics.py"
] | [
"import warnings\n\nimport numpy as np\nfrom scipy.spatial.distance import cosine\n\nfrom .utils import compute_fragments, average_agg_tanimoto, \\\n compute_scaffolds, fingerprints, \\\n get_mol, canonic_smiles, mol_passes_filters, \\\n logP, QED, SA, NP, weight\nfrom moses.utils import mapper\nfrom .util... | [
[
"numpy.var",
"numpy.cov",
"numpy.mean",
"scipy.spatial.distance.cosine"
]
] | [
{
"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"
... |
tobinsouth/privacy-preserving-synthetic-mobility-data | [
"fd4d1851b47e3e7304761a894b460e8345fae5db"
] | [
"MoveSim/code/gen_data.py"
] | [
"from evaluations import *\r\nfrom utils import *\r\nfrom tqdm import tqdm\r\n\r\ndef distance(gps1,gps2):\r\n x1,y1 = gps1\r\n x2,y2 = gps2\r\n return np.sqrt((x1-x2)**2+(y1-y2)**2 )\r\n\r\n \r\n \r\n\r\ndef gen_matrix(data='geolife'):\r\n train_data = read_data_from_file('../data/%s/real.data'%d... | [
[
"scipy.spatial.distance.cdist"
]
] | [
{
"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"
... |
utayao/MedicalZooPytorch | [
"34d0a735cec1bf554440423b52758d67334e64bf"
] | [
"lib/visual3D_temp/BaseWriter.py"
] | [
"import os\n\nimport numpy as np\nfrom torch.utils.tensorboard import SummaryWriter\n\nfrom lib.utils import datestr\n\n\"\"\"\nUnder construction ......\n\"\"\"\ndict_class_names = {\"iseg2017\": [\"air\", \"csf\", \"gm\", \"wm\"],\n \"mrbrains4\": [\"air\", \"csf\", \"gm\", \"wm\"],\n ... | [
[
"numpy.mean",
"torch.utils.tensorboard.SummaryWriter"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
zhengjw1992/focal-loss | [
"0b811228151005f7c90328771bcd0b5812efb47c"
] | [
"focalloss.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\n\nclass FocalLoss(nn.Module):\n def __init__(self, gamma=0, alpha=None, size_average=True):\n super(FocalLoss, self).__init__()\n self.gamma = gamma\n self.alpha = alpha\n # if ... | [
[
"torch.Tensor",
"torch.nn.functional.log_softmax",
"torch.autograd.Variable"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
chenynCV/SENet | [
"08b22d9961e3b2a6eb1b8cd25d33287d10eaddd5"
] | [
"pre_train.py"
] | [
"import tensorflow as tf\r\nimport numpy as np\r\nimport os\r\nfrom tensorpack import imgaug, dataset, ModelDesc, InputDesc\r\nfrom tensorpack.dataflow import (PrefetchDataZMQ, BatchData)\r\nfrom dataflow_input import MyDataFlow\r\nimport resnet_model\r\nfrom IPython import embed\r\n\r\nos.environ['CUDA_VISIBLE_DEV... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.nn.softmax_cross_entropy_with_logits",
"tensorflow.control_dependencies",
"tensorflow.cast",
"tensorflow.global_variables",
"tensorflow.equal",
"tensorflow.nn.l2_loss",
"tensorflow.get_collection",
"tensorflow.summary.image",
"ten... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.13",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
}
] |
yushun9897/OpenPNM | [
"031894a53650c3193d767b0460c8ea2e66799825"
] | [
"openpnm/utils/misc.py"
] | [
"import copy\nimport json\nimport inspect\nimport warnings\nimport functools\nimport numpy as _np\nimport scipy as _sp\nimport scipy.sparse\nimport time as _time\nfrom collections import OrderedDict\nfrom docrep import DocstringProcessor\n\n\nclass Docorator(DocstringProcessor):\n\n __instance__ = None\n\n de... | [
[
"numpy.square",
"numpy.absolute",
"scipy.sparse.issparse",
"numpy.isnan",
"numpy.shape",
"numpy.any",
"numpy.vstack"
]
] | [
{
"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"... |
martin-hunt/nglview | [
"9adbf974705e69b90ec1d99161ba4a64b665b80c"
] | [
"nglview/tests/test_widget.py"
] | [
"from __future__ import print_function\nimport os\nimport sys\nfrom itertools import chain\ntry:\n from cStringIO import StringIO\nexcept ImportError:\n from io import StringIO\n\nfrom mock import patch, MagicMock\nimport gzip\nimport time\nimport unittest\nimport pytest\nfrom numpy.testing import assert_almo... | [
[
"numpy.testing.assert_almost_equal",
"numpy.squeeze",
"numpy.arange"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
huixiancheng/SENet | [
"d9f2339c689d695d3ab304c601423c845a5dc543"
] | [
"train.py"
] | [
"#!/usr/bin/env python3\n# This file is covered by the LICENSE file in the root of this project.\n\nimport argparse\nimport shutil\nfrom shutil import copyfile\nimport yaml\nimport os\nfrom modules.trainer import Trainer\n\n\nif __name__ == '__main__':\n\n def seed_torch(seed=1024):\n import random\n ... | [
[
"torch.manual_seed",
"torch.cuda.manual_seed",
"numpy.random.seed",
"torch.cuda.manual_seed_all"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
wenh06/cinc2020 | [
"38105ed9dac6554e2dd51b94e5553fb8ba22dbe6"
] | [
"references/encase/code/resNet.py"
] | [
"# -*- coding: utf-8 -*-\n\nfrom __future__ import division, print_function, absolute_import\n\nimport tflearn\nimport tflearn.data_utils as du\n\nimport numpy as np\nimport ReadData\nimport tensorflow as tf\nfrom tensorflow.contrib import learn\nfrom tensorflow.contrib.learn.python.learn.estimators import model_fn... | [
[
"numpy.array",
"tensorflow.reset_default_graph",
"tensorflow.logging.set_verbosity",
"sklearn.model_selection.StratifiedKFold"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
EMBEDDIA/autoBOT | [
"d8ad6aef23f0ae4e47d6fffacbca73d6874123b1",
"d8ad6aef23f0ae4e47d6fffacbca73d6874123b1"
] | [
"autoBOTLib/optimization/optimization_random.py",
"autoBOTLib/features/features_sentence_embeddings.py"
] | [
"\"\"\"\nThis file contains code on random search across tfidf parameter space. Skrlj 2019\n\"\"\"\n\nimport logging\nlogging.basicConfig(format='%(asctime)s - %(message)s',\n datefmt='%d-%b-%y %H:%M:%S')\nlogging.getLogger().setLevel(logging.INFO)\nfrom feature_constructors import Normalizer, bu... | [
[
"numpy.round",
"numpy.random.uniform",
"sklearn.metrics.f1_score",
"sklearn.svm.LinearSVC"
],
[
"pandas.read_csv",
"scipy.sparse.csr_matrix"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
... |
hanyas/trajopt | [
"1cad9010be45851ec12fe4156ae73d9261304cb9"
] | [
"examples/rgps/mb_lqr.py"
] | [
"import numpy as np\n\nimport gym\n\nfrom trajopt.rgps import LRGPS\n\nfrom matplotlib import rc\nimport matplotlib.pyplot as plt\n\nimport tikzplotlib\n\nimport warnings\nwarnings.filterwarnings(\"ignore\")\n\nrc('lines', **{'linewidth': 1})\nrc('text', usetex=True)\n\n\ndef beautify(ax):\n ax.set_frame_on(True... | [
[
"numpy.sqrt",
"numpy.random.seed",
"numpy.linspace",
"numpy.eye",
"matplotlib.pyplot.yscale",
"matplotlib.rc",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.fill_between",
"matplotlib.pyplot.xscale",
"matplotlib.pyplot.suptitle",
"matplot... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
btw08/dask | [
"6e8c1b76feb12337574f40032dbd3818626b8e28"
] | [
"dask/array/wrap.py"
] | [
"from __future__ import absolute_import, division, print_function\n\nfrom functools import partial\nfrom itertools import product\n\nimport numpy as np\n\ntry:\n from cytoolz import curry\nexcept ImportError:\n from toolz import curry\n\nfrom ..base import tokenize\nfrom ..utils import funcname\nfrom .core im... | [
[
"numpy.dtype"
]
] | [
{
"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.