repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list | possible_versions list |
|---|---|---|---|---|---|
ajia1206/wgcpy | [
"fd7918b88c1cd55e8a7c0d5d254af8fd7eb8a25f"
] | [
"wgcpy/model/gen_pmml_model.py"
] | [
"#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\"\"\"\n@Project: wgcpy\n@File Name: gen_pmml_model.py\n@Author: weiguang\n@Date: 2021/6/28\n\"\"\"\nimport joblib\nfrom wgcpy.utils.ext_fn import *\nfrom .dz_eval import *\nfrom lightgbm import LGBMClassifier\nfrom xgboost import XGBClassifier\... | [
[
"sklearn.preprocessing.StandardScaler",
"sklearn.impute.SimpleImputer",
"sklearn.pipeline.FeatureUnion",
"sklearn.linear_model.LogisticRegression"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
CompMaterSci/python-geometry | [
"403244252b9d8521cd4d001ec63cd768d75f5393"
] | [
"python_geometry/plane.py"
] | [
"# -*- coding: utf-8 -*-\nfrom numpy import asanyarray, dot, isclose\n\nfrom .config import config\n\n\nclass Plane(object):\n\n def __init__(self, point_in_plane, normal_vector):\n self.point_in_plane = asanyarray(point_in_plane)\n self.normal_vector = asanyarray(normal_vector)\n\n def contains... | [
[
"numpy.dot",
"numpy.asanyarray"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
maximtrp/scikit-posthocs | [
"59299cd21c254f9589074b21ce9fbab8a63f49c7"
] | [
"scikit_posthocs/_outliers.py"
] | [
"from typing import Union, List\nimport numpy as np\nfrom scipy.stats import t\n\n\ndef outliers_iqr(\n x: Union[List, np.ndarray],\n ret: str = 'filtered',\n coef: float = 1.5) -> np.ndarray:\n \"\"\"Simple detection of potential outliers based on interquartile range\n (IQR). Data that l... | [
[
"numpy.sum",
"numpy.abs",
"numpy.sqrt",
"numpy.arange",
"numpy.percentile",
"scipy.stats.t.ppf",
"numpy.max",
"numpy.copy",
"numpy.std",
"numpy.random.normal",
"numpy.delete",
"numpy.argmax",
"numpy.mean",
"numpy.round",
"numpy.argsort",
"numpy.zeros... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
bigscience-workshop/catalogue_data | [
"6c289d5da1a90ea3ca1e81284c104fe5d1b9b482"
] | [
"clean.py"
] | [
"import argparse\nimport json\nimport logging\nimport random\nfrom functools import partial\n\nimport torch\nfrom datasets import Dataset, load_dataset, load_from_disk, concatenate_datasets, set_caching_enabled\nfrom pathlib import Path\nfrom typing import Tuple, Optional, Callable, List, Dict\nfrom datasets.utils.... | [
[
"torch.set_num_threads",
"numpy.random.default_rng"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
QianWeiZhou/Medical-AI-Adversarial-Attack | [
"0b53522b43358d2b07fec966f90f4bf8cbf4241d"
] | [
"trainV1728posPal41.py"
] | [
"# Copyright 2021 QianWei Zhou\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 to in ... | [
[
"torch.mean",
"torch.abs",
"torch.cat",
"torch.zeros",
"torch.utils.data.DataLoader",
"matplotlib.pyplot.get_cmap",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device",
"torch.autograd.Variable",
"numpy.random.randint",
"torch.nn.functional.sigmoid",
"mat... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ferrucc-io/kaggle-pets | [
"c1a0a99130dd76c7e5f6c7b2dbb4647690515986"
] | [
"models/NAIVE_BAYES/multinomialNaiveBayes.py"
] | [
"#model specific libraries\nfrom time import ctime\nfrom sklearn.naive_bayes import MultinomialNB\nfrom sklearn import metrics\nimport numpy as np\nimport pandas as pd\n\nclass PredictiveModel(object):\n \"\"\"\n base class for the prediction task of Adoption Prediction competition\n\n this is NB used for ... | [
[
"sklearn.model_selection.ShuffleSplit",
"sklearn.naive_bayes.MultinomialNB",
"sklearn.metrics.cohen_kappa_score",
"sklearn.model_selection.LeaveOneOut",
"sklearn.model_selection.KFold",
"numpy.array",
"pandas.get_dummies"
]
] | [
{
"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": []
}
] |
vikas04599/Fire-X | [
"1ec6ba73b3033ad03e7859fcf6917fc6aff89efc"
] | [
"firebot/modules/imagefun3.py"
] | [
"import asyncio\nimport os\nimport random\nimport shutil\n\nimport cv2\nimport numpy as np\nfrom PIL import Image\n\nfrom firebot import CMD_HELP, bot\n\nfrom ..utils import admin_cmd\n\npath = \"./dcobra/\"\nif not os.path.isdir(path):\n os.makedirs(path)\n\n\n# Originally Created by @danish_00\n# All Basics op... | [
[
"numpy.uint8",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jamal919/SCHISMMB | [
"f02106ffafeaeee6da5c7382e33f74ca1c327c37"
] | [
"scripts/plot_atlas_phase.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nPlot Tidal Atlas Amplitude.\n\n@author: khan\n@email: jamal.khan@legos.obs-mip.fr\n\"\"\"\nfrom netCDF4 import Dataset, num2date, date2num\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.tri as mtri\nfrom mpl_toolkits.axes_grid1 import make_axes_locatable\ni... | [
[
"numpy.asarray",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dheerajskylark/Facial-Expression-Detection | [
"0916c36a30cbf35ef0f20218e679277e29432d91"
] | [
"code/emotionRecognitionNetwork.py"
] | [
"import numpy as np\r\nimport keras as k\r\nimport cv2\r\n\r\n\r\ndef trainCnnNetwork(trainX, trainY, valX, valY, convLayers, denseLayers, epochs, storagePath):\r\n trainY = k.utils.to_categorical(trainY)\r\n valY = k.utils.to_categorical(valY)\r\n # Model Setup\r\n model = k.models.Sequential()\r\n ... | [
[
"numpy.array",
"numpy.argmax"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
adrn/apogee-koi-984 | [
"42173f98b1ee7bd303304df69ed179c7541e2194"
] | [
"fundept/plot.py"
] | [
"# Standard library\n\n# Third-party\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n# This project\nfrom .config import plot_path\nfrom .utils import AA, WVLNU\nfrom .data_helpers import apply_masks\n\nFRAME_COLOR = 'tab:purple'\nVISIT_COLOR = 'k'\nSPEC_STYLE = dict(marker='', ls='-', lw=1, drawstyle='step... | [
[
"numpy.nanmax",
"numpy.nanmin",
"numpy.nanmedian",
"matplotlib.pyplot.subplots"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Ensembl/gene_symbol_classifier | [
"ea099ee3c98ce2b555c3c0f39a2d8a915f4deccb"
] | [
"notebooks/assignments_threshold_statistics.py"
] | [
"# ---\n# jupyter:\n# jupytext:\n# formats: ipynb,py:percent\n# text_representation:\n# extension: .py\n# format_name: percent\n# format_version: '1.3'\n# jupytext_version: 1.11.3\n# kernelspec:\n# display_name: Python 3\n# language: python\n# name: python3\n# ---\n\n... | [
[
"pandas.read_csv",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.show",
"numpy.linspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
RunzZhang/SBCcode | [
"e75b8e751cec5fb2c28950edef0c82f005caedcb",
"e75b8e751cec5fb2c28950edef0c82f005caedcb"
] | [
"AnalysisModules/EventDealer.py",
"UserCode/jzhang/bubble_finder_test.py"
] | [
"import os\nimport re\nimport shutil\nimport time\n\nimport numpy as np\nimport copy\nimport numpy.matlib\n\nfrom SBCcode.AnalysisModules.AnalyzeDytran import dytranAnalysis as da\nfrom SBCcode.AnalysisModules.EventAnalysis import EventAnalysis as eva\n# from SBCcode.AnalysisModules.ImageAnalysis import BubbleFinde... | [
[
"numpy.arange",
"numpy.array",
"numpy.int32",
"numpy.sort"
],
[
"numpy.int32"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
LITdrive/aadc2018 | [
"93ce64286eef7eedd9e886da8c685f12827e396f"
] | [
"src/aadcUserPython/litdrive/litdrive/roads/road_access.py"
] | [
"from .road_list import *\nfrom litdrive.selfdriving.enums import ManeuverState\nimport numpy as np\n\ndef getLaneListByDecisions(road_list:RoadList, start_id: int, decision_list, steps=10):\n #Returns a tuple with: a list of the lane objects, a list of ids, a list of the fired decisions (the last one is the dec... | [
[
"numpy.arctan2",
"numpy.sqrt",
"numpy.linspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
PacktPublishing/Cleaning-Data-for-Effective-Data-Science | [
"e1a0a12158183cdcd15bc2cc8d987a59db41a797"
] | [
"src/whiten.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\ndef cart2pol(x, y):\n rho = np.sqrt(x**2 + y**2)\n phi = np.arctan2(y, x)\n return rho, phi\n\ndef pol2cart(rho, phi):\n x = rho * np.cos(phi)\n y = rho * np.sin(phi)\n return x, y\n\ndef rotate(x, y, angle=-np.pi/4):\n rho, phi = cart2pol... | [
[
"matplotlib.pyplot.gca",
"numpy.sqrt",
"matplotlib.pyplot.title",
"numpy.random.multivariate_normal",
"numpy.cos",
"matplotlib.pyplot.savefig",
"numpy.sin",
"numpy.arctan2",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.xlabel",
"matplotlib.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
amnahEltahir/voltammetry | [
"2e85a280bdcd186e30a5af1cf38046365cec0995"
] | [
"misc/select_idx.py"
] | [
"import voltammetry\nimport sys\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport h5py\n\n\nabfpath = sys.argv[1]\nvg = voltammetry.Data(abfpath)\nlabels = voltammetry.Mulabels(abfpath, 'run.csv')\nidx =np.where((labels.labels['5HT']==0) | (labels.labels['DA'] == 0))\nlabels.labels = labels.labels.iloc[i... | [
[
"numpy.squeeze",
"matplotlib.pyplot.show",
"numpy.where"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Gwiths/ATVGnet | [
"9b1170c005b342a0301e5adf43782d10319f061f"
] | [
"code/utils.py"
] | [
"import matplotlib.pyplot as plt\r\nplt.switch_backend('agg') \r\nimport matplotlib as mpl\r\nmpl.use('Agg')\r\nimport matplotlib.animation as manimation\r\nimport matplotlib.lines as mlines\r\nfrom mpl_toolkits import mplot3d\r\nimport argparse, os, fnmatch, shutil\r\nfrom collections import OrderedDict\r\nfrom sc... | [
[
"numpy.dot",
"numpy.expand_dims",
"numpy.linspace",
"matplotlib.pyplot.plot",
"numpy.round",
"numpy.max",
"numpy.concatenate",
"torch.FloatTensor",
"matplotlib.pyplot.axes",
"numpy.exp",
"torch.autograd.Variable",
"matplotlib.pyplot.gca",
"numpy.clip",
"nump... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.6",
"1.10",
"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": []
}
] |
kpertsch/mjrl | [
"79cd41f4b150603b43dad014f5a6a879feb3de9a"
] | [
"mjrl/utils/gym_env.py"
] | [
"\"\"\"\nWrapper around a gym env that provides convenience functions\n\"\"\"\n\nimport gym\nimport numpy as np\n\n\nclass EnvSpec(object):\n def __init__(self, obs_dim, act_dim, horizon):\n self.observation_dim = obs_dim\n self.action_dim = act_dim\n self.horizon = horizon\n\n\nclass GymEnv... | [
[
"numpy.amax",
"numpy.amin",
"numpy.percentile",
"numpy.ones",
"numpy.std",
"numpy.mean",
"numpy.array",
"numpy.zeros",
"numpy.random.randint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
atiselsts/tsch-scheduling-comparison | [
"80ca07857900f554814a9b9df233b0bf901a97a3"
] | [
"examples/autonomous/testing/analyze-testbed.py"
] | [
"#!/usr/bin/python3\n\nimport os\nimport sys\nimport time\nimport subprocess\nimport json\n\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as pl\nimport matplotlib.legend_handler as lh\nimport numpy as np\n\nfrom parameters import *\n\n#\n# This calculates and plots these metrics:\n# - End-to-e... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.scatter",
"matplotlib.style.use",
"matplotlib.pyplot.ylim",
"matplotlib.use",
"matplotlib.pyplot.xscale",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplo... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ksaito-ut/openworld_ldet | [
"8f07afeb76f323c8c4539ff0d5b6b1b61a539bcb"
] | [
"tools/trainer_ldet.py"
] | [
"\"\"\"\nDetectron2 training script with a copy-paste augmentation training loop.\n\nThis script reads a given config file and runs the training or evaluation.\nIt is an entry point that is able to train standard models in LDET.\n\nIn order to let one script support training of many models,\nthis script contains lo... | [
[
"torch.isfinite",
"torch.no_grad"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
vstenby/02460GraphRegularization | [
"d89b76535bc820beb5ccbc6a51ee39f63188d7e4"
] | [
"src/label_smoothing.py"
] | [
"import torch\n\ndef label_smoothing(y, C, epsilon):\n device = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n n = len(y)\n y_onehot = torch.zeros(n, C).to(device)\n y_onehot = y_onehot.scatter_(1, y.unsqueeze(1), 1).to(\"cpu\")\n return y_onehot.apply_(lambda x: epsilon/(C-1) if x == 0 else x-... | [
[
"torch.cuda.is_available",
"torch.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
junhocho/HGCAE | [
"d871ebdac323e7ccea24bedd50194aa9b01d26a6"
] | [
"layers/att_layers.py"
] | [
"\"\"\"Attention layers (some modules are copied from https://github.com/Diego999/pyGAT.)\"\"\"\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nimport manifolds \n\ndef HypAggAtt(in_features, manifold, dropout, act=None, att_type=None, att_logit=None, beta=0):\n att_l... | [
[
"torch.Size",
"torch.ones",
"torch.Tensor",
"torch.isnan",
"torch.sparse_coo_tensor",
"torch.matmul"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ZhiYuan-REN/mmcv | [
"8d2d78122538056d3ab60a6533abb2c8be45516c"
] | [
"setup.py"
] | [
"import glob\nimport os\nimport re\nfrom pkg_resources import DistributionNotFound, get_distribution\nfrom setuptools import find_packages, setup\n\nEXT_TYPE = ''\ntry:\n import torch\n if torch.__version__ == 'parrots':\n from parrots.utils.build_extension import BuildExtension\n EXT_TYPE = 'pa... | [
[
"torch.utils.hipify.hipify_python.hipify",
"torch.utils.cpp_extension.library_paths",
"torch.utils.cpp_extension.include_paths",
"torch.cuda.is_available"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Nico-Facto/Leukemia-Apl-Classification | [
"009912576ce398a3c67a15a9168fac2ad8c21ee1"
] | [
"lib/plot/history.py"
] | [
"import seaborn as sns\nimport pandas as pd\nfrom matplotlib import pyplot as plt\n\ndef plot_history(history, metrics=None, valid=False, figsize=(6,4), **kwargs):\n if metrics is None:\n metrics = []\n metrics += ['loss']\n df = pd.DataFrame()\n for metric in metrics:\n df[metric] = histo... | [
[
"matplotlib.pyplot.subplots",
"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": []
}
] |
carlohamalainen/nipype | [
"9099a5809487b55868cdec82a719030419cbd6ba",
"9099a5809487b55868cdec82a719030419cbd6ba"
] | [
"nipype/workflows/fmri/setup.py",
"nipype/interfaces/cmtk/setup.py"
] | [
"# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\ndef configuration(parent_package='',top_path=None):\n from numpy.distutils.misc_util import Configuration\n\n config = Configuration('fmri', parent_package, top_path)\n\n config.add_subpacka... | [
[
"numpy.distutils.misc_util.Configuration"
],
[
"numpy.distutils.misc_util.Configuration"
]
] | [
{
"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... |
ivanyu/kaggle-digit-recognizer | [
"4eec8be465ece821c29f88f167bb5fa7cb3b2f42"
] | [
"visualisation_display.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\nimport numpy as np\nfrom matplotlib import pyplot as plt\nimport meta\nfrom meta import data_filename\n\n\ndef display(images, row_n, col_n, vmin=0.0, vmax=1.0, labels=None):\n for i in range(len(images)):\n plt.subp... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.axis"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Aavache/CAESynth | [
"46edf957f72ae15a16916751bacaa436a9738873"
] | [
"lib/visualizer.py"
] | [
"# External libs\nimport os\nimport math\nimport pandas as pd\nimport time\nimport logging\nimport matplotlib.pyplot as plt\n# Internal libs\nfrom lib import util\n\nclass Visualizer():\n \"\"\"This class includes several functions that can display/save images and print/save logging information.\n \"\"\"\n\n ... | [
[
"matplotlib.pyplot.cla",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"matplotlib.pyplot.close",
"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": []
}
] |
gordonjun2/CornerNet | [
"d1a8d87903433ddbe0fa8b96c7388b955021e53c"
] | [
"app.py"
] | [
"import io\n\nimport flask\nimport numpy as np\nfrom flask import Flask, jsonify\nfrom PIL import Image\n\nfrom CornerNetEngine import CornerNetEngine\n\napp = Flask(__name__)\n\nclf = CornerNetEngine()\n\n@app.route(\"/ready\", methods=[\"GET\"])\ndef check_connection():\n \"\"\"End point to check connection\n ... | [
[
"numpy.asarray"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lvhuihui1988/pydm | [
"de87afb9ae758554686255a8a7ff694e3fc23f1f"
] | [
"pydm/widgets/archiver_time_plot.py"
] | [
"import json\nimport time\nimport numpy as np\nfrom collections import OrderedDict\nfrom typing import List, Optional, Union\nfrom pyqtgraph import DateAxisItem, ErrorBarItem, ViewBox\nfrom pydm.widgets.channel import PyDMChannel\nfrom pydm.widgets.timeplot import TimePlotCurveItem\nfrom pydm.widgets import PyDMTim... | [
[
"numpy.zeros",
"numpy.insert",
"numpy.searchsorted"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
miteshksingh/ClassyVision | [
"1897ef6a7b5ad1e13f236f878403e3c812eefe25"
] | [
"classy_vision/generic/visualize.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport math\nfrom typing import Any, Callable, Dict, List, Optional, Tuple, Union\n\nimport numpy as np\nimp... | [
[
"torch.ByteTensor",
"torch.from_numpy",
"torch.is_tensor",
"torch.FloatTensor",
"torch.utils.tensorboard.SummaryWriter",
"torch.arange"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
s-samarth/Learning-Tensorflow | [
"a46d8be1a741de5a0f366af83b8534cefcf0b615"
] | [
"quickstart_expert.py"
] | [
"import numpy as np\nimport tensorflow as tf \nfrom tensorflow import keras\nfrom tensorflow.keras.layers import Dense, Flatten, Conv2D\nfrom tensorflow.keras import Model\n\nmnist = tf.keras.datasets.mnist\n\n(x_train, y_train), (x_test, y_test) = mnist.load_data()\nx_train, x_test = x_train / 255.0, x_test / 255.... | [
[
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.keras.layers.Dense",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.optimizers.Adam",
"tensorflow.keras.metrics.SparseCategoricalAccuracy",
"tensorflow.keras.layers.F... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"2.7",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6"
]
}
] |
All-less/adpredictor-tensorflow | [
"cf99a602b8905fe157da0df6c98017f41b2f4e12"
] | [
"adpredictor_tensorflow/utils.py"
] | [
"# coding: utf-8\nfrom scipy.stats import norm\nimport numpy as np\n\n\ndef get_dists_init(config):\n \"\"\"Generate initial values of all normal distributions.\n \"\"\"\n init = []\n\n # Each possible value of each feature has a normal distribution associated to it.\n for f in range(config.num_featu... | [
[
"scipy.stats.norm.ppf",
"scipy.stats.norm.cdf",
"scipy.stats.norm.pdf",
"numpy.clip"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
leeyegy/pytorch-cifar | [
"a8a39891c7f7a86b636cfc615a431a761dfd74c6"
] | [
"util/analyze_influence.py"
] | [
"import sys\r\nsys.path.append(\"../\")\r\n\r\nfrom models import *\r\nimport torch\r\nimport numpy as np\r\nimport torch.nn as nn\r\nfrom advertorch.attacks import LinfPGDAttack\r\nimport torchvision.transforms as transforms\r\nimport torchvision\r\nfrom advertorch.context import ctx_noparamgrad_and_eval\r\nfrom ... | [
[
"torch.nn.DataParallel",
"torch.utils.data.DataLoader",
"torch.load"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
m-ulmestrand/self-driving-ai | [
"99a7d2c5d83bca9366cdb314916972aea41bd957"
] | [
"add_borders.py"
] | [
"'''\nIf you are unsatisfied with the borders of a track, you can make changes, plot it and save it here.\n\nAuthor: Mattias Ulmestrand\n'''\n\n\nfrom matplotlib import pyplot as plt\nimport numpy as np\nimport os.path\n\n\nname = \"racetrack12\"\ntrack_nodes = np.load(f\"tracks/{name}.npy\")\nouter_line = np.zeros... | [
[
"numpy.sqrt",
"numpy.abs",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.subplots",
"numpy.save",
"numpy.sin",
"matplotlib.pyplot.plot",
"numpy.arctan2",
"matplotlib.pyplot.xlim",
"numpy.sign",
"numpy.zeros_like",
"numpy.load",
"numpy.array",
"matplotlib.pypl... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
brunnovicente/CoTraining | [
"80e212d817fac51c55392452f3b5ea3304483a92"
] | [
"experimento.py"
] | [
"import warnings\nwarnings.filterwarnings(\"ignore\")\n\nimport sys\nimport pandas as pd\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import MinMaxScaler\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.neighbors import KNeighborsClassifier\... | [
[
"sklearn.neural_network.MLPClassifier",
"pandas.read_csv",
"sklearn.naive_bayes.GaussianNB",
"sklearn.linear_model.LogisticRegression",
"sklearn.ensemble.RandomForestClassifier",
"sklearn.model_selection.train_test_split",
"pandas.DataFrame",
"sklearn.neighbors.KNeighborsClassifier... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
makp/social_grid | [
"2671b9e5bf758712234ba87b2d7460fbed7d56aa"
] | [
"run_random-walk.py"
] | [
"import matplotlib.pyplot as plt\nimport matplotlib.animation as animation\nimport numpy as np\nfrom random_walk import RandWalk\n\n# pars\nnum_agents = 10\nside = 100\ntime_steps = 400\n\nrandw = RandWalk(side, 4)\n\n# Make initial array\narr = randw.create_init(num_agents)\n\n# Run simulation\narrays = randw.run(... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rwl/PyDyn | [
"87f89c63fdb1bc9449c05430dd4265eece771739"
] | [
"pydyn/Loadevents.py"
] | [
"# Copyright (C) 2009 Stijn Cole\n# Copyright (C) 2010-2011 Richard Lincoln\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... | [
[
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
khanfarhan10/R2CNN_Faster-RCNN_Tensorflow | [
"0bcc4209defefebd7b3644c6f4a0dcaaa6170c3f"
] | [
"libs/networks/build_whole_network.py"
] | [
"# -*-coding: utf-8 -*-\n\nfrom __future__ import absolute_import, division, print_function\n\nimport os\nimport tensorflow as tf\nimport tensorflow.contrib.slim as slim\nimport numpy as np\n\nfrom libs.networks import resnet\nfrom libs.networks import mobilenet_v2\nfrom libs.box_utils import encode_and_decode\nfro... | [
[
"tensorflow.concat",
"tensorflow.control_dependencies",
"tensorflow.zeros",
"tensorflow.image.non_max_suppression",
"tensorflow.stack",
"tensorflow.cast",
"tensorflow.equal",
"tensorflow.contrib.slim.l2_regularizer",
"tensorflow.to_int32",
"tensorflow.summary.scalar",
"... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
dannymota/SPCS_AI_PROJECT | [
"068643a191255a2e2b63cf1439834ee7774ad68e"
] | [
"identifier.py"
] | [
"from __future__ import print_function\nimport numpy as np\nnp.random.seed(1337) # for reproducibility\n\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Dropout, Activation, Flatten\nfrom keras.layers import Convolution2D, MaxPooling2D\nfrom keras.utils import np_utils\nfrom keras.optimizers ... | [
[
"numpy.random.seed"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
LingboTang/LearningFiles | [
"efe3174dd7700d1f39851d9d813929425b4e473f"
] | [
"batch_parallel_py/myParsePDB.py"
] | [
"#!/usr/bin/python\n\nimport re\nimport os\nimport sys\nimport math\nimport numpy as np\nimport getopt\nimport pandas\n\n# ===================================== Util Functions ============================== #\n\n# This function gives you the ability to rotate with arbitrary axis and theta\ndef rotation_matrix(axis,... | [
[
"numpy.asarray",
"numpy.dot",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
deepsentiment/deepsentiment | [
"620fc7175fc7cedfe13ab9c59d48fcfdb8c47ec8"
] | [
"datasets/download_images.py"
] | [
"import os\nimport urllib2\nimport io\n\nimport pandas as pd\nimport tensorflow as tf\n\nfrom PIL import Image\nfrom text_model.text_preprocessing import preprocess_one_df\nfrom text_model.text_preprocessing import _load_embedding_weights_glove, _load_embedding_weights_word2vec\n\n# Number of words in a post\n_POST... | [
[
"tensorflow.gfile.Exists",
"tensorflow.gfile.MakeDirs"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
BuildJet/k2 | [
"9b21fc4b97cd3e746b6526cd47359bb024d06b15",
"9b21fc4b97cd3e746b6526cd47359bb024d06b15"
] | [
"k2/python/tests/prune_on_arc_post_test.py",
"k2/python/tests/get_backward_scores_test.py"
] | [
"#!/usr/bin/env python3\n#\n# Copyright (c) 2021 Xiaomi Corporation (authors: Fangjun Kuang)\n#\n# See ../../../LICENSE for clarification regarding multiple authors\n\n# To run this single test, use\n#\n# ctest --verbose -R prune_on_arc_post_test_py\n\nimport unittest\n\nimport k2\nimport torch\n\n\nclass TestPr... | [
[
"torch.device",
"torch.cuda.is_available"
],
[
"torch.empty_like",
"torch.cat",
"torch.zeros_like",
"torch.cuda.is_available",
"torch.device",
"torch.allclose"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mrchu39/fritz-classification | [
"67fb0be0f5aa31eaaad6af64f7825cbc1d1b56b2"
] | [
"master.py"
] | [
"from __future__ import print_function\r\n\r\nimport astropy.units as u\r\nimport datetime\r\nimport json\r\nimport os, glob2\r\nimport numpy as np\r\nimport pandas as pd\r\nimport pickle\r\nimport pytz\r\nimport re\r\nimport requests, json, simplejson\r\nimport sys, getopt, argparse\r\nimport webbrowser as wb\r\ni... | [
[
"numpy.append"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
karan306/aml | [
"271c28e642b5200f8a8bd9e00a6e9bcd62efe780"
] | [
"models.py"
] | [
"import numpy as np\nimport tensorflow as tf\nslim = tf.contrib.slim\nimport pdb\nimport utils_wgan\n\ndef LeakyReLU(x, alpha=0.3):\n return tf.maximum(alpha*x, x)\n\ndef LeakyReLU2(x, alpha=0.2):\n return tf.maximum(alpha*x, x)\n\ndef Batchnorm(inputs, is_training, name=None, data_format='NHWC'):\n bn = t... | [
[
"tensorflow.transpose",
"tensorflow.contrib.framework.get_variables",
"tensorflow.contrib.layers.max_pool2d",
"tensorflow.image.resize_nearest_neighbor",
"tensorflow.concat",
"tensorflow.maximum",
"tensorflow.shape",
"tensorflow.reshape",
"tensorflow.variable_scope",
"numpy... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
kgkroenlein/chem-struct | [
"911ea21ea57fb55ddb0043539575283b6a39067e"
] | [
"scripts/neighbor_pred.py"
] | [
"import matplotlib.pyplot as plt\nimport pickle\nimport numpy as np\nfrom collections import defaultdict\n\ndef restore_data(filename = 'hist_data.pkl'):\n '''\n Unpickle and return dictionary of dictionary of neighbor counts\n\n filename: {str} File name, default of 'hist_data.pkl'\n '''\n with open... | [
[
"numpy.exp"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
htt1994/recurrent-unet-drive | [
"d260e39541a8224deebfd1bd47e7fefb1666cf05"
] | [
"ptsemseg/models/recurrent_unet.py"
] | [
"import IPython\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nfrom .utils import unetConv2, unetConv1\nfrom .unet import UnetEncoder, UnetDecoder, GeneralUNet_v2,unet\n\n\ndef init_hidden_state(layer, prev_h, prev_state, out_size, hidden_size, batch_size, spatial_size):\n \"\"\"\n ... | [
[
"torch.ones",
"torch.nn.ConvTranspose2d",
"torch.cat",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.cuda.is_available",
"torch.nn.BatchNorm2d",
"torch.device",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
w92hf7xje3n/pytorch-deform-conv-v2-visualization | [
"0145d4e28016768f5e9e838679bd7f2394ba4855"
] | [
"scaled_mnist/archs.py"
] | [
"# -*- coding: utf-8 -*-\nimport numpy as np\n\nfrom torch import nn\nfrom torch.nn import functional as F\nimport torch\nfrom torchvision import models\nimport torchvision\n\nfrom deform_conv_v2 import *\n\n\nclass ScaledMNISTNet(nn.Module):\n def __init__(self, args, num_classes):\n super().__init__()\n... | [
[
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.Sigmoid",
"torch.nn.MaxPool2d",
"torch.nn.Linear",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dme65/pytorch | [
"bc512253d5fe718a029324c45f175a81b088facd"
] | [
"test/forward_backward_compatibility/check_forward_backward_compatibility.py"
] | [
"import argparse\nimport datetime\nimport re\nimport sys\nimport warnings\nfrom collections import defaultdict\n\nimport torch\nfrom torch._C import parse_schema\n\n\n# The date specifies how long the allowlist exclusion should apply to.\n#\n# - If we NEVER give BC guarantee for an operator, you can put the\n# ... | [
[
"torch._C._get_operator_version_map",
"torch._C._jit_get_custom_class_schemas",
"torch._C.parse_schema",
"torch._C._jit_get_all_schemas"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
vitalik-ez/GStreamer_example | [
"77b546d3f86085ded226558bab318ff28c06e6a9"
] | [
"webrtc_out_wait_answer_v1.py"
] | [
"import mp as pn\nimport numpy\nimport cv2\nfrom io import BytesIO\nimport time\nimport argparse\nimport json\nimport sys\nimport signal\nimport os\nimport threading\nimport asyncio\nimport websockets\nimport ssl\nimport random\nimport gi\nfrom websockets.version import version as wsv\nfrom gi.repository import Gst... | [
[
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
JiarunLiu/WideResNet-pytorch | [
"630e59c3f8483a8cda6633157387f64735e2de51"
] | [
"wideresnet.py"
] | [
"import math\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass BasicBlock(nn.Module):\n def __init__(self, in_planes, out_planes, stride, dropRate=0.0):\n super(BasicBlock, self).__init__()\n self.bn1 = nn.BatchNorm2d(in_planes)\n self.relu1 = nn.ReLU(inplace=T... | [
[
"torch.nn.Sequential",
"torch.nn.functional.dropout",
"torch.nn.functional.avg_pool2d",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.nn.init.kaiming_normal_"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
aleksandryessin/graf | [
"511ef43a7510a62f66bf904ed01df66510c9f808"
] | [
"submodules/GAN_stability/gan_training/metrics/inception.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torchvision import models\n\ntry:\n from torchvision.models.utils import load_state_dict_from_url\nexcept ImportError:\n from torch.utils.model_zoo import load_url as load_state_dict_from_url\n\n# Inception weights ported to Pytorch f... | [
[
"torch.nn.Sequential",
"torch.nn.functional.dropout",
"torch.cat",
"torch.nn.ModuleList",
"torch.nn.functional.avg_pool2d",
"torch.nn.MaxPool2d",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.functional.interpolate",
"torch.flatten",
"torch.nn.functional.max_pool2d",
"torch.u... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
taylor-ka/flowtron | [
"5c18400a1620006b8f8e5e11c67a34de7527caf9"
] | [
"radam.py"
] | [
"\"\"\"RAdam\nOriginal source taken from https://github.com/LiyuanLucasLiu/RAdam\n\nCopyright 2019 Liyuan Liu\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.... | [
[
"torch.zeros_like"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
liuhe6/pycorrector | [
"4b90e8a3274e518d506608b8dac5181a7f082ef7"
] | [
"pycorrector/seq2seq_attention/preprocess.py"
] | [
"# -*- coding: utf-8 -*-\n# Author: XuMing <xuming624@qq.com>\n# Brief:\nimport sys\n\nsys.path.append('../..')\n\nfrom codecs import open\nfrom xml.dom import minidom\n\nfrom sklearn.model_selection import train_test_split\nfrom pycorrector.utils.tokenizer import segment\nfrom pycorrector.seq2seq_attention import ... | [
[
"sklearn.model_selection.train_test_split"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
burro-robotics/vision | [
"49432b6fb713e7ecf80a12d5122247e03ac07384"
] | [
"references/segmentation/coco_utils.py"
] | [
"import copy\nimport torch\nimport torch.utils.data\nimport torchvision\nfrom PIL import Image\n\nimport os\n\nfrom pycocotools import mask as coco_mask\n\nfrom transforms import Compose\n\n\nclass FilterAndRemapCocoCategories(object):\n def __init__(self, categories, remap=True):\n self.categories = cate... | [
[
"torch.utils.data.Subset",
"torch.zeros",
"torch.stack",
"torch.as_tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sebaspv/Mexico-Future-Covid-Cases-RNN | [
"6214c30625470b0fa029bb33d3c8bb310d313703"
] | [
"mexicofutureCOVID19RNN.py"
] | [
"from tensorflow.keras.models import Sequential\nfrom tensorflow.keras.callbacks import EarlyStopping\nfrom tensorflow.keras.layers import Dense, SimpleRNN, LSTM\nfrom sklearn.preprocessing import MinMaxScaler\nfrom tensorflow.keras.preprocessing.sequence import TimeseriesGenerator\nimport pandas as pd\nimport nump... | [
[
"pandas.read_csv",
"numpy.reshape",
"tensorflow.keras.layers.Dense",
"matplotlib.pyplot.show",
"pandas.DataFrame",
"numpy.append",
"tensorflow.keras.layers.LSTM",
"tensorflow.keras.preprocessing.sequence.TimeseriesGenerator",
"tensorflow.keras.callbacks.EarlyStopping",
"ten... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": [
"2.7",
"2.6",
"2.4",
"2.3",
"2.5",
"2.2"
]
}
] |
epigen-UCSD/MERlin | [
"3aa784fb28a2a4ebae92cfaf3a72f30a459daab9"
] | [
"merlin/util/decoding.py"
] | [
"import numpy as np\nimport pandas\nimport cv2\nfrom typing import Tuple\nfrom typing import Dict\nfrom skimage import measure\nfrom sklearn.neighbors import NearestNeighbors\n\nfrom merlin.util import binary\nfrom merlin.data import codebook as mcodebook\n\n\"\"\"\nUtility functions for pixel based decoding.\n\"\"... | [
[
"pandas.concat",
"numpy.min",
"numpy.reshape",
"numpy.linalg.norm",
"pandas.DataFrame",
"numpy.ones",
"numpy.ceil",
"numpy.nansum",
"numpy.mean",
"numpy.nanmean",
"numpy.prod",
"numpy.moveaxis",
"numpy.array",
"sklearn.neighbors.NearestNeighbors",
"numpy... | [
{
"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": []
}
] |
san2597/mmf | [
"2e4acaad7ca8eee4319e1205a560eed81733a0be",
"c0812e9281c6e679cb7f00af78a5eda267820aab",
"2e4acaad7ca8eee4319e1205a560eed81733a0be"
] | [
"mmf/utils/configuration.py",
"mmf/utils/dataset.py",
"mmf/utils/text.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\nimport collections\nimport json\nimport os\nimport warnings\nfrom ast import literal_eval\n\nimport demjson\nimport torch\nfrom omegaconf import OmegaConf\n\nfrom mmf.common.registry import registry\nfrom mmf.utils.env import import_user_module\nfrom mmf.utils.fi... | [
[
"torch.cuda.device_count",
"torch.hub._get_torch_home",
"torch.cuda.is_available"
],
[
"torch.zeros"
],
[
"torch.div",
"torch.nn.functional.softmax",
"torch.nn.functional.log_softmax",
"torch.multinomial",
"torch.tensor",
"torch.FloatTensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
awesome-archive/pytorch-widedeep | [
"abb74df8cef8564d13743c309c9e158aacbcdb75"
] | [
"examples/download_images.py"
] | [
"import pandas as pd\nimport os\nimport pickle\n\nfrom tqdm import tqdm\nfrom urllib.request import urlretrieve\nfrom pathlib import Path\n\n\ndef download_images(df, out_path, id_col, img_col):\n\tdownload_error = []\n\tcounter = 0\n\tfor idx,row in tqdm(df.iterrows(), total=df.shape[0]):\n\t\tif counter <1000:\n... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
jutanke/pak | [
"6f3be954ef68804ebe622cafe46f033ccf6eb2e7",
"6f3be954ef68804ebe622cafe46f033ccf6eb2e7"
] | [
"pak/datasets/MOT.py",
"tests/test_motm_algorithms.py"
] | [
"from pak.datasets.Dataset import Dataset\nimport numpy as np\nimport zipfile\nimport tarfile\nimport urllib.request\nimport shutil\nfrom os import makedirs, listdir\nfrom os.path import join, isfile, isdir, exists, splitext\nfrom scipy.ndimage import imread\nfrom scipy.misc import imresize\nfrom scipy.io import lo... | [
[
"numpy.vstack",
"scipy.ndimage.imread",
"numpy.memmap",
"numpy.loadtxt"
],
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"0.14",
"0.15",
"1.0",
"0.19",
"0.18",
"1.2",
"0.12",
"0.10",
"0.17",
"0.16"
],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [... |
OpenBMB/BMCook | [
"de31035e4d58d67433647e7c676f56ede7ac8477"
] | [
"example/train.py"
] | [
"import json\nimport torch\nimport random\nimport bmtrain as bmt\nimport layers\nfrom tqdm import tqdm\nimport time\nfrom data import MMapIndexedDataset, Dataset\nimport numpy as np\nimport pickle as pkl\nfrom pruning import BMPrune, m4n2_2d_greedy\nfrom distilling import BMDistill\nfrom arguments import parse_args... | [
[
"torch.nn.CrossEntropyLoss",
"torch.LongTensor",
"torch.scalar_tensor",
"torch.no_grad",
"numpy.mean",
"torch.arange",
"torch.stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ANL-CEEESA/LLEPE | [
"010688d21007021043b08400a1e04595fb10e080"
] | [
"llepe/utils.py"
] | [
"# LLEPE: Liquid-Liquid Equilibrium Parameter Estimator\n# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.\n# Released under the modified BSD license. See LICENSE for more details.\n\nimport xml.etree.ElementTree as ET\nimport matplotlib.pyplot as plt\n\n\ndef set_size(w, h, ax=None):\n \"\"\"... | [
[
"matplotlib.pyplot.gca"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
martinjaymckee/python-visualize | [
"fab69dcdebbf9cef2537c7cf7fb6245c5305ee51"
] | [
"fractal_profile.py"
] | [
"import math\nimport random\n\nimport numpy as np\n\n\n# TODO: IMPROVE SLOPE ESTIMATES IN CYCLIC CASE\n\nclass FractalProfile:\n @classmethod\n def Circular(cls, **kwargs):\n return FractalProfile(x_lims=(-math.pi, math.pi), cyclic=True, **kwargs)\n\n def __init__(self, ref_height=1, offset_height=0... | [
[
"matplotlib.pyplot.axhline",
"numpy.linspace",
"numpy.min",
"matplotlib.pyplot.plot",
"numpy.max",
"numpy.array",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
miyamotost/faster-rcnn.pytorch | [
"374396d87c85ffe2373d2ae13dc002ea6bb08734"
] | [
"lib/model/rpn/rpn.py"
] | [
"from __future__ import absolute_import\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\n\nfrom model.utils.config import cfg\nfrom .proposal_layer import _ProposalLayer, _ProposalLayer2\nfrom .anchor_target_layer import _AnchorTargetLayer\nfrom model.utils... | [
[
"torch.nn.functional.cross_entropy",
"torch.nn.functional.softmax",
"torch.nn.Conv2d",
"torch.autograd.Variable"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
GT-RAIL/rail_halloween | [
"9208911d72cc8995ddb5f07b5d49aa113d6a6af1"
] | [
"assistance_arbitration/assistance_arbitrator/src/assistance_arbitrator/monitoring.py"
] | [
"#!/usr/bin/env python\n# The code in this file monitors the status of a task execution. It does so by\n# listening in on the execution trace, monitoring outputs from fault detectors,\n# and monitoring critical node outputs in the rosgraph. The output is combined\n# monitoring data that can be used by some other di... | [
[
"matplotlib.pyplot.clf",
"matplotlib.pyplot.gcf"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sduprey/open_data_platform | [
"a20b5ab6a1ca99ae8aef11ac74a314114144d291"
] | [
"caf/scripts/TrancheAge.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport pandas as pd\nimport glob\n\n# Variable Type Label\n# Communes Char NOM DE LA COMMUNE\n# Codes_Insee Char NUMERO DE LA COMMUNE, CODE INSEE\n# NB_Allocataires Num NOMBRE TOTAL DE FOYERS ALLOCATAIRES DE LA BRANCHE FAMILLE\n# ALL0A19 Num NOMBRE DE FOYERS ALLOCATAIRES DONT LE T... | [
[
"pandas.merge",
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
PabloAMC/TFermion | [
"ed313a7d9cae0c4ca232732bed046f56bc8594a2"
] | [
"utils.py"
] | [
"import argparse\nimport json\nimport numpy as np\nimport random as rnd\nimport math\nimport sympy\nfrom scipy import integrate\nfrom scipy.optimize import NonlinearConstraint, LinearConstraint\nfrom itertools import groupby\nimport os\n\nMETHODS = [\n 'qdrift', \n 'rand_ham', \n 'taylor_naive'... | [
[
"scipy.optimize.NonlinearConstraint",
"numpy.log2",
"scipy.integrate.nquad",
"scipy.optimize.LinearConstraint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.6",
"1.10",
"1.4",
"1.3",
"1.9",
"1.5",
"1.7",
"1.2",
"1.8"
],
"tensorflow": []
}
] |
askerdb/nimfa | [
"3e3353e60d53fd409b53c46fde23f4f6fef64aaf"
] | [
"docs/code/snippet_icm.py"
] | [
"import numpy as np\n\nimport nimfa\n\nV = np.random.rand(40, 100)\nicm = nimfa.Icm(V, seed=\"nndsvd\", rank=10, max_iter=12, iiter=20,\n alpha=np.random.randn(V.shape[0], 10), beta=np.random.randn(10, V.shape[1]),\n theta=0., k=0., sigma=1.)\nicm_fit = icm()\n"
] | [
[
"numpy.random.randn",
"numpy.random.rand"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jakartaresearch/earth-vision | [
"2739b52a2784c45ee0972d93be045096e095d9ae"
] | [
"earthvision/models/regnet.py"
] | [
"# Modified from\n# https://github.com/facebookresearch/ClassyVision/blob/main/classy_vision/models/anynet.py\n# https://github.com/facebookresearch/ClassyVision/blob/main/classy_vision/models/regnet.py\nfrom functools import partial\nfrom typing import Any\n\nimport torch\nfrom torch import nn\nfrom torchvision.mo... | [
[
"torch.cuda.is_available"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
shambu09/Deep-Learning | [
"f2f8c80ec5754de695b7a88b31a0230952ad0184"
] | [
"NeuralNet (Old)/deepLnnframwork.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport h5py\nimport deepLnn\n\n\nclass NeuralNets:\n\n def __init__(self, layer_dims):\n \"\"\"\n The top level class of this framework.\n Arguments:\n layer_dims -- python array (list) containing the dimensions of each layer in ou... | [
[
"numpy.random.seed",
"numpy.squeeze",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"numpy.zeros",
"numpy.sum",
"numpy.divide",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
stefs304/mhclovac | [
"efd8e0e228cb377ab080848ddcd1295af992006c"
] | [
"research/figure_1.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\nfrom mhclovac.utils import load_index_data, pdf\nfrom mhclovac.sequence import model_distribution\nimport seaborn as sns\n\n\ndef plot_distribution(ax, sequence, index, ylabel=None, title=None):\n multiplier = 20\n overlap_distance = 1\n sigma = 0.8\n ... | [
[
"numpy.abs",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"numpy.linspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
3D-FRONT-FUTURE/ObjectDrawer-ToolBox | [
"0a74c18c1841b04e4bbbbc49ce444410e5c1352e"
] | [
"utils/label.py"
] | [
"import os\nimport cv2\nimport numpy as np\nimport math\nfrom sys import exit\nimport zipfile\nimport shutil\nfrom .visualize import vis_arrangeed_images\n\n# -----------config-------\ndist_threshold = 5\npadding_size = 20\nannotated_skip = 20\nmax_annotated = 3\n\n\nstatic_time = 4\nsample_rate = 3\nscale = 1\nimg... | [
[
"numpy.array",
"numpy.copy",
"numpy.logical_and",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
panlybero/gym-novel-gridworlds | [
"b375cb674337b6cd3c33b165d323cf98b46095e3"
] | [
"gym_novel_gridworlds/envs/novel_gridworld_v1_env.py"
] | [
"# Author: Gyan Tatiya\n# Email: Gyan.Tatiya@tufts.edu\n\nimport copy\nimport math\nimport random\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.lines import Line2D\nfrom matplotlib.cm import get_cmap\n\nimport gym\nfrom gym import error, spaces, utils\nfrom gym.utils import seeding\n\n\ncl... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.imshow",
"numpy.linspace",
"numpy.round",
"matplotlib.pyplot.tight_layout",
"numpy.pad",
"numpy.sin",
"matplotlib.pyplot.text",
"numpy.zeros",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.title",
"numpy.array",
"m... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
UnIcOrn7618/MonthlyRunoffForecastByAutoReg | [
"2d66c628141f001e4ffb3dc3b7520a0f0f0ff239"
] | [
"Huaxian_ssa/projects/ensemble_models.py"
] | [
"import matplotlib.pyplot as plt\n\nfrom variables import multi_step_lags,test_len,full_len\nimport os\nroot_path = os.path.dirname(os.path.abspath('__file__')) \n\nimport sys\nsys.path.append(root_path)\nfrom ensembler import ensemble\n\n# Set the project parameters\nORIGINAL = 'HuaxianRunoff1951-2018(1953-2018).x... | [
[
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
kamito/streamlit | [
"af68a915b3a1f37ddd411d081e430dad70869c45",
"af68a915b3a1f37ddd411d081e430dad70869c45"
] | [
"e2e/scripts/st_dataframe_sort_column.py",
"e2e/scripts/st_add_rows.py"
] | [
"# Copyright 2018-2021 Streamlit 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 ... | [
[
"numpy.random.randint"
],
[
"numpy.random.randn",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"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",
"... |
indistrachan/hydro | [
"c0c041367ad1f48a4fc6de371af02b27afbfdd6f",
"c0c041367ad1f48a4fc6de371af02b27afbfdd6f"
] | [
"wavespectra/input/triaxys.py",
"wavespectra/input/ww3_msl.py"
] | [
"import os\nimport glob\nimport copy\nimport datetime\nfrom collections import OrderedDict\nfrom dateutil import parser\nimport numpy as np\nimport xarray as xr\n\nfrom wavespectra.specdataset import SpecDataset\nfrom wavespectra.core.attributes import attrs, set_spec_attributes\nfrom wavespectra.core.misc import i... | [
[
"matplotlib.pyplot.legend",
"numpy.arange",
"matplotlib.pyplot.figure"
],
[
"numpy.arange"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
htpans/htpans | [
"49b9c6cec007577bde5e8dfbce9acde45be78fbf"
] | [
"YOLO_TrainingTools/preprocessing.py"
] | [
"import os\nimport cv2\nimport copy\nimport numpy as np\nimport imgaug as ia\nfrom imgaug import augmenters as iaa\nfrom keras.utils import Sequence\nimport xml.etree.ElementTree as ET\nfrom utils import BoundBox, normalize, bbox_iou\n\ndef parse_annotation(ann_dir, img_dir, labels=[]):\n all_imgs = []\n seen... | [
[
"numpy.random.shuffle",
"numpy.floor",
"numpy.random.binomial",
"numpy.random.uniform",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jvelasq9/Astr-119-hw-1 | [
"9d497f94991d216f8fa6e82e41a350a795837282"
] | [
"functions.py"
] | [
"import numpy as np\nimport sys\n\n#define a function that returns a value\ndef expo(x):\n return np.exp(x) #return the np e^x function\n \n#define a subroutine that does not return a value\ndef show_expo(n):\n for i in range(n):\n print(expo(float(i))) #call the expo function\n \n ... | [
[
"numpy.exp"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
pasztorlacos/Deep-Reinforcement-Learning-for-Automated-Stock-Trading-Ensemble-Strategy-ICAIF-2020 | [
"a785912de2b68472a4169d02f271cc74666af441"
] | [
"preprocessing/preprocessors.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom stockstats import StockDataFrame as Sdf\nfrom config import config\n\ndef load_dataset(*, file_name: str) -> pd.DataFrame:\n \"\"\"\n load csv dataset from path\n :return: (df) pandas dataframe\n \"\"\"\n #_data = pd.read_csv(f\"{config.DATASET_DIR}/{fil... | [
[
"numpy.linalg.inv",
"pandas.read_csv",
"numpy.mean",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
jaywalnut310/NeuralDialog-LAED | [
"606f4f10fccea9081674c8e01ae2c47e2ba3d4a3"
] | [
"laed/dataset/corpora.py"
] | [
"# -*- coding: utf-8 -*-\n# author: Tiancheng Zhao\nfrom __future__ import unicode_literals # at top of module\nfrom collections import Counter\nimport numpy as np\nimport json\nfrom laed.utils import get_tokenize, get_chat_tokenize, missingdict, Pack\nimport logging\nimport os\nimport itertools\nfrom collections ... | [
[
"numpy.max",
"numpy.mean",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
arjunsavel/SImMer | [
"71d9bf0bf329f597426ebcd71dd0cda731592ec6"
] | [
"src/simmer/sky.py"
] | [
"\"\"\"\nFunctions to work with skies.\n\"\"\"\n\nimport os\nfrom glob import glob\n\nimport astropy.io.fits as pyfits\nimport numpy as np\nfrom tqdm import tqdm\nimport re as re\n\nfrom . import plotting as pl\nfrom . import utils as u\n\ndef sky_driver(raw_dir, reddir, config, inst, sep_skies = False, plotting_ym... | [
[
"numpy.median",
"numpy.where"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
subeeshvasu/2018_subeesh_epsr_eccvw | [
"118b38de5282215ca075baa88446561a4d7fd4cc"
] | [
"EPSR_testcode/code/main.py"
] | [
"import torch\n\nimport utility\nimport data\nimport model\nfrom option import args\nfrom trainer import Trainer\n\ntorch.manual_seed(args.seed)\ncheckpoint = utility.checkpoint(args)\n\nif checkpoint.ok:\n loader = data.Data(args)\n model = model.Model(args, checkpoint)\n loss = None\n t = Trainer(args... | [
[
"torch.manual_seed"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
chihina/Classification_dogs_and_cats | [
"8797ff688592c148a1c13881394716e117db95a3"
] | [
"prepare.py"
] | [
"# coding: UTF-8\r\n\r\n\r\nimport torch\r\nfrom torch import nn\r\nimport os, cv2, random\r\nimport numpy as np\r\nimport pandas as pd\r\nfrom sklearn.model_selection import train_test_split\r\nfrom torch.utils.data import DataLoader\r\nfrom torch.autograd import Variable\r\n\r\n# for figure\r\nimport matplotlib.p... | [
[
"torch.nn.CrossEntropyLoss",
"matplotlib.pyplot.imshow",
"torch.nn.Dropout2d",
"torch.nn.Conv2d",
"torch.utils.data.DataLoader",
"numpy.ndarray",
"sklearn.model_selection.train_test_split",
"torch.from_numpy",
"numpy.concatenate",
"torch.nn.Linear",
"torch.autograd.Vari... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
n-log-n/lizard_tracker | [
"320dcd39416a59b40435fc38c231a16c91901069"
] | [
"tracker.py"
] | [
"import cv2\nimport numpy as np\nimport sys\n\nfrom filters import combined_threshold\nfrom filters import roi\n\nfrom moviepy.editor import VideoFileClip\n\ndef tracker(img):\n img = roi(img)\n img = combined_threshold(img)\n img = np.dstack((img, img, img))\n \n return img\n\nif __name__ == \"__mai... | [
[
"numpy.dstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
priyankagargnitk/spark | [
"3bf43fb60d6f8aba23eaa1e43405024725b50f22"
] | [
"python/pyspark/worker.py"
] | [
"#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo... | [
[
"pandas.concat",
"pandas.Series"
]
] | [
{
"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": []
}
] |
Cquential/transformer-drg-style-transfer | [
"47db7522eff2e2c39a31bd52b13bfaeb0ada0c87"
] | [
"run_classifier.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HugginFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may ... | [
[
"torch.load",
"torch.utils.data.DataLoader",
"torch.no_grad",
"torch.cuda.manual_seed_all",
"torch.cuda.is_available",
"torch.device",
"torch.distributed.get_rank",
"torch.distributed.init_process_group",
"torch.utils.data.distributed.DistributedSampler",
"torch.utils.data.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cjones6/cytosegmenter | [
"284aecf1db6ed25ae5ac055760e7f483cf63f6b2"
] | [
"utils/utils.py"
] | [
"import gsw\nimport numpy as np\n\n\ndef compute_distances(lat, lon):\n \"\"\"\n Given latitude and longitude values, compute the successive cumulative distances in kilometers.\n\n :param lat: Array of latitudes.\n :param lon: Array of longitudes.\n :return: Array with the cumulative distances in kil... | [
[
"numpy.concatenate",
"numpy.cumsum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Henrik0808/ikt590-project | [
"75e93dd52d9074c99ee5233176cdc0318d86ea21"
] | [
"plot_viewer.py"
] | [
"import argparse\nimport pathlib\nimport sys\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nrender_opts = {'save': True, 'show': False}\npaths_supervised = []\npaths_preproc = []\npaths_downstream = []\npaths_supervised_downstream = [[], [], []]\n\n\ndef render_plot_preproc(preproc):\n print(preproc)\... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"numpy.genfromtxt",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
NickVeld/argus | [
"37c1cade3b82a9bffc289894458d80cf1720532d"
] | [
"examples/cifar_advanced.py"
] | [
"import os\nimport argparse\nfrom pathlib import Path\n\nimport torch\nimport torch.distributed as dist\nfrom torch.nn import SyncBatchNorm\nfrom torch.utils.data import DataLoader, DistributedSampler\nfrom torch.nn.parallel import DistributedDataParallel\nfrom torchvision import transforms\nfrom torchvision.datase... | [
[
"torch.cuda.synchronize",
"torch.distributed.init_process_group",
"torch.cuda.set_device",
"torch.max",
"torch.eq",
"torch.sum",
"torch.utils.data.DataLoader",
"torch.nn.SyncBatchNorm.convert_sync_batchnorm",
"torch.cuda.amp.autocast",
"torch.cuda.amp.GradScaler",
"torc... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jieyu97/mvpp | [
"838c2553825b2061f51008b5cbed19526424c2f5"
] | [
"igep_model_test_wind.py"
] | [
"\nfrom tensorflow import keras\nfrom tensorflow.keras import layers\n\nimport numpy as np\nimport tensorflow as tf\nimport tensorflow.keras.backend as K\nfrom tensorflow.keras.models import Model\nfrom tensorflow.keras.losses import Loss\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nsns.set()\n\nimport ... | [
[
"tensorflow.keras.backend.repeat_elements",
"numpy.linspace",
"tensorflow.cast",
"numpy.concatenate",
"tensorflow.keras.backend.random_uniform",
"sklearn.preprocessing.MinMaxScaler",
"tensorflow.keras.layers.Concatenate",
"pandas.read_csv",
"tensorflow.keras.Input",
"numpy.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
eitin-infant/FinRL-Meta | [
"4c94011e58425796e7e2e5c1bf848afd65c828d6",
"4c94011e58425796e7e2e5c1bf848afd65c828d6"
] | [
"demos/demo_execution_optimizing.py",
"drl_agents/stablebaselines3_models.py"
] | [
"'''Source: https://github.com/AI4Finance-Foundation/Liquidation-Analysis-using-Multi-Agent-Reinforcement-Learning-ICML-2019/blob/master/Model_training.ipynb'''\n'''Paper: Multi-agent reinforcement learning for liquidation strategy analysis accepted by ICML 2019 AI in Finance: Applications and Infrastructure for Mu... | [
[
"numpy.delete",
"numpy.array",
"numpy.mean",
"numpy.append"
],
[
"numpy.quantile",
"pandas.DataFrame",
"numpy.ones",
"numpy.mean",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"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",
"... |
neuromusic/waver | [
"32eeab34fd46a4855f8ead12390b65da6af61457"
] | [
"examples/1D/point_source_object.py"
] | [
"import numpy as np\nfrom waver.datasets import run_and_visualize\n\n# Define a simulation, 12.8mm, 100um spacing\nspeed = 343 * np.ones((128,))\nspeed[70:80] = 2*343\nsim_params = {\n 'size': (12.8e-3,),\n 'spacing': 100e-6,\n 'duration': 80e-6,\n 'min_speed': 343,\n 'max_speed': 686,\n 'speed': ... | [
[
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
gertingold/tools4scicomp | [
"c7611f989bfc56891c3ed47a5dd843e9a71795f1"
] | [
"manuscript/imgsrc/uf_runtime.py"
] | [
"import math\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport time\n\ndef sin_math(nmax):\n xvals = np.linspace(0, 2*np.pi, nmax)\n start = time.time()\n for x in xvals:\n y = math.sin(x)\n return time.time()-start\n\ndef sin_numpy(nmax):\n xvals = np.linspace(0, 2*np.pi, nmax)\n ... | [
[
"numpy.linspace",
"numpy.empty_like",
"matplotlib.pyplot.xscale",
"numpy.arange",
"matplotlib.pyplot.rc",
"matplotlib.pyplot.yscale",
"numpy.sin",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jthickstun/glow | [
"a60d170368c5ba1a176c97de3abcbf6c23eb9f7c"
] | [
"model.py"
] | [
"import tensorflow as tf\n\nimport tfops as Z\nimport optim\nimport numpy as np\nimport horovod.tensorflow as hvd\nfrom tensorflow.contrib.framework.python.ops import add_arg_scope\n\n\n'''\nf_loss: function with as input the (x,y,reuse=False), and as output a list/tuple whose first element is the loss.\n'''\n\n\nd... | [
[
"numpy.diag",
"tensorflow.get_variable",
"tensorflow.concat",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.equal",
"numpy.random.randn",
"tensorflow.nn.conv2d",
"tensorflow.get_collection",
"numpy.reshape",
"tensorflow.floor",
"tensorflow.gradients",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"0.12",
"0.14",
"0.15"
],
"tensorflow": [
"1.10"
]
}
] |
jvicenti/tensorflow | [
"f57513e64a00f4feb94378b4cba27abbb19a1a36"
] | [
"tensorflow/python/compat/compat.py"
] | [
"# Copyright 2018 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.python.util.tf_export.tf_export"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.5",
"1.7",
"1.4"
]
}
] |
Shakshi3104/TensorFlow_CNN_Collections_for_HASC | [
"5678ad6c6922880230ae0c1e7ec39f32e8012279"
] | [
"src/tfgarden/applications/mobilenet_v2.py"
] | [
"import os\n\nfrom tensorflow.keras.layers import Conv1D, BatchNormalization, ReLU, SeparableConv1D, ZeroPadding1D, \\\n GlobalAveragePooling1D, GlobalMaxPooling1D\nfrom tensorflow.keras.layers import Input, Add, Dense\nfrom tensorflow.keras.models import Model\n\n\ndef _make_divisible(v, divisor, min_value=None... | [
[
"tensorflow.keras.layers.ZeroPadding1D",
"tensorflow.keras.layers.ReLU",
"tensorflow.keras.models.Model",
"tensorflow.keras.layers.GlobalMaxPooling1D",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv1D",
"tensorflow.keras.layers.GlobalAveragePooling1D",
"tensorflow.k... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"2.7",
"2.6",
"2.4",
"2.3",
"2.5",
"2.2"
]
}
] |
gitgjr/hope2 | [
"0b2f9d24f9decca99b5096c651de2507a6df3445"
] | [
"framework/utils.py"
] | [
"# coding:utf-8\n\nimport os\nimport uuid\nimport shutil\nimport logging\n# import cv2\nfrom logging.handlers import RotatingFileHandler\nimport numpy as np\nimport time\nfrom collections import abc\nimport re\nimport json\nfrom xml.etree import ElementTree as ET\n\n\nclass Mylog(object):\n def __init__(self, na... | [
[
"numpy.fromfile"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
oscar-carlsson/CGNet | [
"f9072b7d3b6b1efa0675870c2e6b9220a0d6cbc2"
] | [
"Results/analysing_runs.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport sys\nimport os\nimport csv\nimport tikzplotlib as tpl\n\ndef convert_str_to_bool(arr):\n new = []\n false_str = \"False\"\n true_str = \"True\"\n for elem in arr:\n if elem == false_str or elem == false_str.upper() or elem == false_str.... | [
[
"pandas.read_csv",
"matplotlib.font_manager.FontProperties",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots_adjust",
"numpy.array",
"matplotlib.pyplot.style.use"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
AdrianAlan/hls4ml | [
"03fd5d4112587b3c4e46c7befc9e342b369fb922"
] | [
"test/pytest/test_softmax.py"
] | [
"import hls4ml\nimport tensorflow as tf\nimport numpy as np\nimport pytest\nfrom sklearn.metrics import accuracy_score\nfrom pathlib import Path\n\ntest_root_path = Path(__file__).parent\n\ndef flat_distribution(shape):\n return np.random.rand(*shape)\n\n\ndef high_accuracy_distribution(shape):\n '''Start wit... | [
[
"tensorflow.keras.layers.Activation",
"numpy.argmax",
"numpy.random.rand",
"tensorflow.keras.models.Sequential",
"numpy.random.randint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"2.7",
"2.6",
"2.4",
"2.3",
"2.5",
"2.2"
]
}
] |
johnnewto/FLIR-pubsub | [
"71eec3a5bf8fe5959cf997f7f12d9cfe0f58d8fc"
] | [
"scratch/kivy_multi/videostream.py"
] | [
"# import the necessary packages\nfrom threading import Thread\n\nimport cv2, time\nfrom imutils.video import FPS\n\nclass VideoStream:\n\t\"\"\" Maintain live RTSP feed without buffering. \"\"\"\n\tINACTIVITY_TIMEOUT = 5\n\tCONNECTION_TIMEOUT = 5\n\tFPS_TIMEOUT = 5\n\n\tdef __init__(self, src=0, name=\"xx_VideoStr... | [
[
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
linshoa/siamese-cnn | [
"2194c097c932a605582d2ee9d58ef31bfa83eaff"
] | [
"evaluate_spatio_temparal.py"
] | [
"import utils.cuda_util as cuda\nimport utils.config as config\nimport tensorflow as tf\nimport tensorflow.contrib.slim as slim\nimport tensorflow.contrib.slim.nets as nets\nfrom utils.image_precess import *\nimport numpy as np\nfrom utils.extract_batch import *\nimport cv2\n\n# model_siamese_cnn = './model/spatio_... | [
[
"tensorflow.nn.l2_normalize",
"tensorflow.matmul",
"numpy.resize",
"tensorflow.concat",
"tensorflow.contrib.slim.nets.resnet_v1.resnet_arg_scope",
"tensorflow.contrib.slim.nets.resnet_v1.resnet_v1_50",
"tensorflow.reshape",
"tensorflow.placeholder",
"numpy.argmax",
"tensorf... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
furcelay/DRE | [
"1922ee6a413cd5ef766d49034832526a253c0e3e"
] | [
"DRE/misc/interpolation.py"
] | [
"from scipy.ndimage import map_coordinates\nimport numpy as np\nfrom itertools import product\n\n\ndef subgrid_cube(original_points, cube, idx_min, samples=3, window=3, order=3):\n sub_points = []\n sub_index = []\n for x, i_min in zip(original_points, idx_min):\n i0 = max(0, i_min - window // 2)\n ... | [
[
"numpy.linalg.solve",
"numpy.linalg.eigvals",
"numpy.sqrt",
"numpy.triu_indices",
"numpy.linalg.inv",
"numpy.tril_indices",
"numpy.isnan",
"numpy.linalg.lstsq",
"scipy.ndimage.map_coordinates",
"numpy.any",
"numpy.fill_diagonal",
"numpy.argmin",
"numpy.meshgrid"... | [
{
"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"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.