repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
cpuimage/albumentations
[ "300ee99386ad27f482387047dac4f6dddff11ac2" ]
[ "tests/test_transforms.py" ]
[ "from functools import partial\n\nimport cv2\nimport numpy as np\nimport pytest\nimport random\n\nimport albumentations as A\nimport albumentations.augmentations.functional as F\nimport albumentations.augmentations.geometric.functional as FGeometric\n\nfrom .utils import get_transforms, get_image_only_transforms, g...
[ [ "numpy.random.random", "numpy.allclose", "numpy.array_equal", "numpy.random.seed", "numpy.abs", "numpy.unique", "numpy.eye", "numpy.arange", "numpy.ones", "numpy.all", "numpy.testing.assert_almost_equal", "numpy.testing.assert_array_equal", "numpy.random.rand", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cguccione/NeutralEvolutionModeling
[ "42b0498f51d35aaf6558f1ab08844965e06f087d" ]
[ "nevo/neutral_fit_utils.py" ]
[ "import os\nimport numpy as np\nfrom scipy.stats import beta \n\ndef beta_cdf(p, N, m):\n '''Expected long term distribution under the \n neutral model (truncated cumulative beta-distribution)\n \n Copyright\n ---------\n Github: https://github.com/misieber/neufit\n Theroy as described in [...
[ [ "numpy.arange", "numpy.bincount", "scipy.stats.beta.cdf", "numpy.random.choice" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
m1so/pandera
[ "f22f9101f3a1671a64df7e3ac6c60eaca5810b36" ]
[ "pandera/schemas.py" ]
[ "\"\"\"Core pandera schema class definitions.\"\"\"\n# pylint: disable=too-many-lines\n\nimport copy\nimport json\nimport warnings\nfrom functools import wraps\nfrom pathlib import Path\nfrom typing import Any, Callable, Dict, List, Optional, Union\n\nimport pandas as pd\nfrom packaging import version\n\nfrom . imp...
[ [ "pandas.core.dtypes.dtypes.registry.find", "pandas.concat", "pandas.Index", "pandas.api.types.is_extension_array_dtype" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "0.24", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
DaDaMrX/ReaLiSe
[ "25843e0c2c32b3a364cee857b2e4f5ba8b2764e9" ]
[ "src/models.py" ]
[ "from __future__ import absolute_import, division, print_function, unicode_literals\nimport logging\nimport math\nimport os\nimport sys\n\nimport opencc\nimport torch\nfrom torch import nn\nfrom torch.nn import CrossEntropyLoss, MSELoss\n\nfrom transformers.modeling_bert import *\nfrom utils import pho_convertor, p...
[ [ "torch.nn.Dropout", "torch.nn.functional.softmax", "torch.nn.CrossEntropyLoss", "torch.cat", "numpy.asarray", "torch.nn.GRU", "torch.from_numpy", "torch.nn.utils.rnn.pack_padded_sequence", "torch.tensor", "torch.nn.Embedding", "torch.nn.Linear", "torch.nn.LayerNorm"...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ali493/pyro
[ "1245340077a733e2ab35765eae783b358d2f3af9" ]
[ "old/examples/twolinkmanipulator_with_ComputedTorque.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Mar 5 20:24:50 2016\n\n@author: alex\n\"\"\"\n\nfrom AlexRobotics.dynamic import Manipulator as M\nfrom AlexRobotics.control import ComputedTorque as CTC\n\nimport matplotlib.pyplot as plt\n\n\n\"\"\" Define system \"\"\"\n\n# Define dynamic system\nR = M.TwoLi...
[ [ "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
snlakshm/tensorflow-deeplab-v3
[ "357a050c7c697f8d6e1bb7269ec3e03c7e032035" ]
[ "inference.py" ]
[ "\"\"\"Run inference a DeepLab v3 model using tf.estimator API.\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport argparse\nimport os\nimport sys\n\nimport tensorflow as tf\n\nimport deeplab_model\nfrom utils import preprocessing\nfrom ...
[ [ "matplotlib.pyplot.imshow", "tensorflow.estimator.Estimator", "matplotlib.pyplot.savefig", "tensorflow.logging.set_verbosity", "matplotlib.pyplot.axis", "tensorflow.python.debug.LocalCLIDebugHook", "tensorflow.app.run" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
youngsm/chroma
[ "1e183c26aaff46fb9b0425ad8eef9995ebe0be2c" ]
[ "chroma/color/colormap.py" ]
[ "import numpy as np\nimport matplotlib.cm as cm\n\ndef map_to_color(a, range=None, map=cm.jet_r, weights=None):\n a = np.asarray(a,dtype=np.float32)\n \n if range is None:\n range = (a.min(), a.max())\n\n ax = (a - float(range[0]))/(float(range[1])-float(range[0]))\n\n frgba = map(ax)\n\n i...
[ [ "numpy.asarray" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
eng-tools/pysra
[ "aa4317eed85d7829fd862f85ec0f23fcc7723408" ]
[ "pysra/variation.py" ]
[ "# The MIT License (MIT)\n#\n# Copyright (c) 2016-2018 Albert Kottke\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n...
[ [ "numpy.diag", "numpy.log", "scipy.stats.norm.cdf", "numpy.abs", "numpy.clip", "numpy.power", "numpy.random.multivariate_normal", "numpy.random.exponential", "numpy.asarray", "scipy.sparse.diags", "scipy.stats.truncnorm.stats", "numpy.sqrt", "numpy.ceil", "nu...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zweien/pytorch-lightning
[ "ddc49c472fa1b0a320494508d7473640553cfeeb" ]
[ "pytorch_lightning/trainer/distrib_parts.py" ]
[ "\"\"\"\nLightning makes multi-gpu training and 16 bit training trivial.\n\n.. note:: None of the flags below require changing anything about your lightningModel definition.\n\nChoosing a backend\n==================\n\nLightning supports two backends. DataParallel and DistributedDataParallel.\n Both can be used for...
[ [ "torch.device", "torch.cuda.device_count", "torch.cuda.set_device" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
elcorto/pwtools
[ "cee068d1c7984d85e94ace243f86de350d3a1dba" ]
[ "pwtools/test/test_pw_more_forces.py" ]
[ "# Parse verbose PWscf force printing, i.e. more then one force block per time\n# step, e.g. one blok for ions, one for vdw forces, ...\n\nimport numpy as np\nfrom pwtools.parse import PwMDOutputFile, PwSCFOutputFile\nfrom pwtools import common\nfrom pwtools.constants import Bohr,Ang,Ry,eV\n\n\ndef test_pw_more_for...
[ [ "numpy.allclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
e6-1/dl6-1
[ "1eeeb5c2a81914da329a749e65b87973ae28dfff" ]
[ "helpers.py" ]
[ "import numpy as np\nimport pandas as pd\n\n\ndef get_sub_seq(seq, start, end):\n \"\"\"Get the sub sequence starting at the start index and ending at the end index.\"\"\"\n arr = seq[max([0, start]):end]\n if start < 0:\n arr = np.append(np.zeros((abs(start),2)), arr, axis=0)\n for i in range(le...
[ [ "numpy.random.permutation", "numpy.load", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
katjaschwarz/layout2im
[ "f931a09e349941a760ef89c97ee5515058c510a1" ]
[ "utils/model_saver.py" ]
[ "import os\nimport re\nimport torch\nfrom pathlib import Path\n\n\ndef prepare_dir(name):\n log_save_dir = 'checkpoints/{}/logs'.format(name)\n model_save_dir = 'checkpoints/{}/models'.format(name)\n sample_save_dir = 'checkpoints/{}/samples'.format(name)\n result_save_dir = 'checkpoints/{}/results'.for...
[ [ "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mao-wfs/nro45-merge
[ "ca15745c740b3f573e843de2c8c9954c45ba4b23" ]
[ "nro45_merge/correlator.py" ]
[ "__all__ = [\"convert\", \"to_zarr\"]\n\n\n# standard library\nfrom logging import getLogger\nfrom pathlib import Path\nfrom struct import Struct\nfrom typing import BinaryIO, Callable, Optional, Tuple\n\n\n# third-party packages\nimport zarr\nimport dask.array as da\nimport numpy as np\nimport xarray as xr\nfrom t...
[ [ "numpy.arange", "numpy.dtype", "numpy.datetime64", "numpy.timedelta64", "numpy.complex64" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
h1-the-swan/autoreview
[ "984834fbacd0ff81cf24dc6bf372bb2924818f7f" ]
[ "old/wos_review_paper_collect_data_run_experiments.py" ]
[ "import sys, os, time, json\nimport subprocess\nimport shlex\nfrom multiprocessing.pool import ThreadPool\nfrom datetime import datetime\nfrom timeit import default_timer as timer\ntry:\n from humanfriendly import format_timespan\nexcept ImportError:\n def format_timespan(seconds):\n return \"{:.2f} se...
[ [ "pandas.read_table", "pandas.to_datetime" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
Payal4/ga-learner-dsmp-repo
[ "74f4ccf4f99739429b854aec3e072ae6ba7ad19f" ]
[ "Amazon-Alexa-Reviews/code.py" ]
[ "# --------------\n# import packages\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\nimport warnings\nwarnings.filterwarnings(\"ignore\")\n\n# Load the dataset\ndf = pd.read_csv(path, sep=\"\\t\")\n\n# Converting date attribute from string to datetime.date datatyp...
[ [ "pandas.read_csv", "pandas.to_datetime", "matplotlib.pyplot.title", "sklearn.ensemble.RandomForestClassifier", "sklearn.metrics.accuracy_score", "sklearn.metrics.precision_score", "sklearn.model_selection.train_test_split", "sklearn.feature_extraction.text.CountVectorizer", "ma...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
alexrudy/aopy
[ "0242bdc81a10ac1a025e6e4cc447cfe90f16dd33" ]
[ "tests/postmortem/reconstructor.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# \n# reconstructor.py\n# aopy\n# \n# Created by Alexander Rudy on 2013-08-14.\n# Copyright 2013 Alexander Rudy. All rights reserved.\n# \n\n\nimport os, os.path, glob\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.gridspec import GridSpec...
[ [ "numpy.load", "matplotlib.pyplot.show", "matplotlib.gridspec.GridSpec", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
goncaloperes/scikit-learn-mooc
[ "b46dc840111b7bc6ca643e0f1cc79499c246ca8b" ]
[ "python_scripts/metrics_sol_01.py" ]
[ "# %% [markdown]\n# # 📃 Solution for Exercise M7.02\n#\n# We presented different classification metrics in the previous notebook.\n# However, we did not use it with a cross-validation. This exercise aims at\n# practicing and implementing cross-validation.\n#\n# We will reuse the blood transfusion dataset.\n\n# %%\...
[ [ "pandas.read_csv", "sklearn.model_selection.cross_val_score", "matplotlib.pyplot.title", "sklearn.model_selection.StratifiedKFold", "pandas.DataFrame", "sklearn.tree.DecisionTreeClassifier", "sklearn.metrics.make_scorer", "sklearn.model_selection.cross_validate" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
cnarte/meta_occ
[ "6f595e8283ba33615787cc4491b3aecfdd236177" ]
[ "meta_occ/utils.py" ]
[ "import numpy as np\nimport torch\nfrom torch.utils.data.dataloader import default_collate\nfrom sklearn.metrics import roc_auc_score\n\nfrom torchmeta.datasets.helpers import (\n omniglot,\n miniimagenet,\n tieredimagenet,\n cifar_fs,\n)\nfrom torchmeta.utils.data import BatchMetaDataLoader, Combinatio...
[ [ "sklearn.metrics.roc_auc_score", "numpy.std", "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SwastiKh/geomstats
[ "685f843e12188057f226e67769e2d500c8f57d2f" ]
[ "geomstats/_backend/tensorflow/__init__.py" ]
[ "\"\"\"Tensorflow based computation backend.\"\"\"\n\nimport math\nfrom collections import Counter\nfrom itertools import product\n\nimport numpy as _np\nimport tensorflow as tf\nfrom tensorflow import ( # NOQA\n abs,\n acos as arccos,\n acosh as arccosh,\n argmax,\n argmin,\n asin as arcsin,\n ...
[ [ "tensorflow.convert_to_tensor", "tensorflow.linalg.diag_part", "tensorflow.concat", "tensorflow.reduce_sum", "tensorflow.equal", "tensorflow.cast", "tensorflow.linalg.matmul", "tensorflow.abs", "tensorflow.map_fn", "tensorflow.where", "tensorflow.rank", "tensorflow....
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
INM-6/pcp_use_cases
[ "6a8b7dae88e7cb2b11ac831c3e72b978b925d8c0" ]
[ "ASSET/asset.py" ]
[ "\"\"\"\nASSET is a statistical method [1] for the detection of repeating sequences\nof synchronous spiking events in parallel spike trains.\nGiven a list `sts` of spike trains, the analysis comprises the following\nsteps:\n\n1) Build the intersection matrix `imat` (optional) and the associated\n probability matr...
[ [ "numpy.minimum", "numpy.sqrt", "numpy.arctan", "numpy.linspace", "numpy.all", "numpy.exp", "numpy.where", "numpy.tril", "sklearn.cluster.dbscan", "numpy.fliplr", "numpy.arange", "numpy.finfo", "numpy.sin", "numpy.diff", "numpy.outer", "numpy.triu", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
HazyResearch/mongoose
[ "890043b39b59a93b8e91a30bc79f4b8125febb78" ]
[ "mongoose_reformer/reformer_lib/generative_tools.py" ]
[ "from functools import partial\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\nfrom torch.nn.utils.rnn import pad_sequence\nfrom reformer_lib.reformer_pytorch import ReformerLM,ReformerLM_tune\nfrom reformer_lib.autopadder import Autopadder\n\ndef top_p(logits, thres = 0.9):\n sorted_logits...
[ [ "torch.nn.functional.softmax", "torch.cat", "torch.sum", "torch.multinomial", "torch.full_like", "torch.no_grad", "torch.sort", "torch.topk", "torch.nn.functional.pad" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
vbrichzin/udacity-ND-SDCE-BehavioralCloning-P4
[ "8b0d961cd2cdc0ce500a27fd5542f52c08a93f23" ]
[ "model_fit_generator.py" ]
[ "import csv\nimport cv2\nimport numpy as np\nimport sklearn\nfrom sklearn.utils import shuffle\nfrom scipy import ndimage\n\nlines = []\nwith open('../data/driving_log.csv') as csvfile:\n reader = csv.reader(csvfile)\n for line in reader:\n lines.append(line)\n\nfrom sklearn.model_selection import trai...
[ [ "scipy.ndimage.imread", "numpy.fliplr", "sklearn.utils.shuffle", "sklearn.model_selection.train_test_split", "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": [] } ]
RelevanceAI/RelevanceAI
[ "a0542f35153d9c842f3d2cd0955d6b07f6dfc07b" ]
[ "tests/unit/test_operations/test_operation.py" ]
[ "from relevanceai.dataset import Dataset\n\nfrom sklearn.cluster import KMeans\n\n\nclass TestOperation:\n def test_subcluster(self, test_dataset: Dataset):\n model = KMeans(n_clusters=4)\n\n vector_field = \"sample_1_vector_\"\n alias = \"cluster_test_1\"\n test_dataset.cluster(\n ...
[ [ "sklearn.cluster.KMeans" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SamsadSajid/mpl-probscale
[ "c65feeddbd8eb6ccca897b27dcd6738d72bd9fb2" ]
[ "probscale/probscale.py" ]
[ "import numpy\nfrom matplotlib.scale import ScaleBase\nfrom matplotlib.ticker import (\n FixedLocator,\n NullLocator,\n NullFormatter,\n FuncFormatter,\n)\n\nfrom .transforms import ProbTransform\nfrom .formatters import PctFormatter, ProbFormatter\n\n\nclass _minimal_norm(object):\n \"\"\"\n A ba...
[ [ "numpy.hstack", "numpy.log", "numpy.sqrt", "numpy.sign", "matplotlib.ticker.NullFormatter", "numpy.log10", "numpy.exp", "numpy.array", "matplotlib.ticker.NullLocator" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
xiawenwen49/IMGUCB
[ "18350ca24bbaf23834794dc188885517ded607ea" ]
[ "BanditAlg/CUCB.py" ]
[ "from random import choice, random, sample\nimport numpy as np\nimport networkx as nx\n\nclass ArmBaseStruct(object):\n def __init__(self, armID):\n self.armID = armID\n self.totalReward = 0.0\n self.numPlayed = 0\n self.averageReward = 0.0\n self.p_max = 1\n \n def u...
[ [ "numpy.asarray", "numpy.log", "numpy.abs" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
george0st/mlrun
[ "6467d3a5ceadf6cd35512b84b3ddc3da611cf39a", "6467d3a5ceadf6cd35512b84b3ddc3da611cf39a" ]
[ "mlrun/frameworks/tf_keras/callbacks/logging_callback.py", "mlrun/frameworks/_ml_common/plans/calibration_curve_plan.py" ]
[ "from typing import Callable, Dict, List, Union\n\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow import Tensor, Variable\nfrom tensorflow.keras.callbacks import Callback\n\nimport mlrun\n\nfrom ..._common import TrackableType\nfrom ..._dl_common.loggers import Logger, LoggerMode\n\n\nclass LoggingCal...
[ [ "tensorflow.size" ], [ "sklearn.calibration.calibration_curve" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensor...
MasterXiYu/stargan_mul
[ "98fa1fe618592c3cad57195a6a21de59aa97da3b" ]
[ "solver.py" ]
[ "from Stargan_net import Generator\nfrom Stargan_net import Discriminator\nfrom torch.autograd import Variable\nfrom torchvision.utils import save_image\nimport torch\nimport torch.nn.functional as F\nimport numpy as np\nimport os\nimport time\nimport datetime\n\n\nclass Solver(object):\n \"\"\"Solver for traini...
[ [ "torch.mean", "torch.abs", "torch.load", "torch.zeros", "torch.cat", "torch.nn.functional.binary_cross_entropy_with_logits", "torch.nn.functional.cross_entropy", "torch.sum", "numpy.arange", "torch.no_grad", "torch.cuda.is_available", "torch.autograd.grad" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
aws-samples/amazon-sagemaker-autopilot-demo
[ "38f6358ce7cc58220f54077dff3c2f880d81f0ed" ]
[ "Autopilot-HAC-DEMO-artifacts/generated_module/candidate_data_processors/dpp9.py" ]
[ "from numpy import nan\nfrom sagemaker_sklearn_extension.externals import Header\nfrom sagemaker_sklearn_extension.impute import RobustImputer\nfrom sagemaker_sklearn_extension.preprocessing import RobustLabelEncoder\nfrom sagemaker_sklearn_extension.preprocessing import RobustStandardScaler\nfrom sklearn.compose i...
[ [ "sklearn.compose.ColumnTransformer" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Pedroknoll/Chicago-Bikeshare-Analysis
[ "1ad7a5e0b7057f0ef87a45e3f691cc502aac745a" ]
[ "chicago_bikeshare.py" ]
[ "\n# coding: utf-8\n\n# Here goes the imports\nimport csv\nimport matplotlib.pyplot as plt\n\n# Let's read the data as a list\nprint(\"Reading the document...\")\nwith open(\"chicago.csv\", \"r\") as file_read:\n reader = csv.reader(file_read)\n data_list = list(reader)\nprint(\"Ok!\")\n\n# Let's check how ma...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.bar", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AndrewPaulChester/sage-code
[ "9fe676bfbcbc6f642eca29b30a1027fba2a426a0", "9fe676bfbcbc6f642eca29b30a1027fba2a426a0" ]
[ "domains/gym_craft/tests/matrix_construction.py", "forks/baselines/baselines/common/vec_env/test_vec_env.py" ]
[ "import numpy as np\n\nfrom matplotlib import pyplot as plt\n\n\nterrain = np.array([[0,0,0],[0,1,1],[0,1,2]])\n\n\ncolours = np.array([[0,0,255],[255,0,0],[0,255,0]])\n\n\nimage = colours[terrain]\n\n\nplt.ion()\nfig, ax = plt.subplots()\nim = ax.imshow(image)\nplt.draw()\nplt.pause(10)\nplt.draw()\n", "\"\"\"\n...
[ [ "matplotlib.pyplot.subplots", "matplotlib.pyplot.draw", "numpy.array", "matplotlib.pyplot.pause", "matplotlib.pyplot.ion" ], [ "numpy.array", "numpy.allclose", "numpy.random.seed", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
KAIST-vilab/OC-CSE
[ "35703390e13621a865aef4d9b75202c8c9e5822b" ]
[ "voc12/data.py" ]
[ "import os.path\nimport random\n\nimport numpy as np\nimport torch\nfrom torch.utils.data import Dataset\nfrom torchvision import transforms\n\nimport PIL.Image\nfrom matplotlib import pyplot as plt\nimport tools.imutils as imutils\n\nIMG_FOLDER_NAME = \"JPEGImages\"\nANNOT_FOLDER_NAME = \"Annotations\"\n\nCAT_LIST...
[ [ "matplotlib.pyplot.gca", "matplotlib.pyplot.imshow", "matplotlib.pyplot.tight_layout", "numpy.asarray", "matplotlib.pyplot.margins", "torch.from_numpy", "matplotlib.pyplot.savefig", "matplotlib.pyplot.axis", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots_adjust", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
spacegal-spiff/AST341
[ "cce49d730b3e6a5048549f6d777e3528b3090c13" ]
[ "Spring2020/PythonPhotometry/Sarah_DiffPhotometry.py" ]
[ "# python 2/3 compatibility\nfrom __future__ import print_function\n# numerical python\nimport numpy as np\n# file management tools\nimport glob\nimport os\n# good module for timing tests\nimport time\n# plotting stuff\nimport matplotlib.pyplot as plt\nimport matplotlib.cm as cm\n# ability to read/write fits files\...
[ [ "numpy.nanmax", "numpy.nanmedian", "numpy.savez", "numpy.linspace", "numpy.nanmin", "matplotlib.pyplot.plot", "numpy.zeros_like", "numpy.nanstd", "numpy.where", "numpy.arange", "numpy.std", "matplotlib.pyplot.figure", "matplotlib.pyplot.title", "numpy.isnan"...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kcyu2014/eval-nas
[ "385376a3ef96336b54ee7e696af1d02b97aa5c32", "385376a3ef96336b54ee7e696af1d02b97aa5c32", "385376a3ef96336b54ee7e696af1d02b97aa5c32" ]
[ "visualization/summarize_weight_sharing.py", "search_policies/cnn/search_space/nas_bench/model.py", "search_policies/cnn/nao_policy/model_search.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib import cm\n\n\ndef summarize_weight_sharing_plot(gt_data, ws_data, gt_ylim=None, ws_ylim=None, filename='ws_vs_gt.pdf'):\n \"\"\"\n\n :param gt_data: sorted.\n :param ws_data: index sort based on GT data.\n :param gt_ylim:\n :param...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "matplotlib.cm.get_cmap" ], [ "torch.cat", "torch.nn.ModuleList", "torch.nn.ModuleDict", "torch.nn.functional.avg_pool2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.ZeroP...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
JamesBrofos/Evaluating-the-Implicit-Midpoint-Integrator
[ "333dd79dfaeac2f7df0dcc7c41506efe8562a619" ]
[ "examples/banana/main.py" ]
[ "import argparse\nimport os\nimport time\nfrom typing import Callable, Tuple\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport scipy.linalg as spla\nimport scipy.stats as spst\nimport tqdm\n\nimport hmc\n\nparser = argparse.ArgumentParser(description='Comparison of implicit midpoint and generalized lea...
[ [ "numpy.min", "numpy.isnan", "numpy.median", "numpy.percentile", "numpy.max", "numpy.zeros", "numpy.isinf" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Kwongrf/B-ALL
[ "f190b3d0d3c47ffb05be7c6b33e5d8e71a6cfdf1" ]
[ "t_cnn.py" ]
[ "import torch.nn as nn\nimport torch.utils.model_zoo as model_zoo\n\n\nmodel_urls = {\n 'alexnet': 'https://download.pytorch.org/models/alexnet-owt-4df8aa71.pth',\n}\nsettings = { 'input_space': 'RGB',\n 'input_size': [3, 450, 450],\n 'input_range': [0, 1],\n 'mean': [0.485, 0...
[ [ "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.AvgPool2d", "torch.nn.ReLU", "torch.utils.model_zoo.load_url" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Maosef/options_pricing
[ "669fed3eeeac62495624f8b113c16aa4cdb7407f" ]
[ "functions/Solvers.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Jul 27 11:13:45 2019\n\n@author: cantaro86\n\"\"\"\n\nimport numpy as np\nfrom scipy import sparse\nfrom scipy.linalg import norm, solve_triangular\nfrom scipy.linalg.lapack import get_lapack_funcs\nfrom scipy.linalg.misc import LinAlgError\n\...
[ [ "numpy.diag", "numpy.ones_like", "scipy.sparse.issparse", "numpy.eye", "scipy.sparse.tril", "scipy.sparse.triu", "scipy.linalg.norm", "scipy.linalg.lapack.get_lapack_funcs", "scipy.linalg.misc.LinAlgError", "numpy.triu", "scipy.linalg.solve_triangular", "numpy.tril"...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.12", "0.14", "0.15" ], "tensorflow": [] } ]
liangz1/petastorm
[ "d2fbdaefc24a9f07e846bb157b4e7c785a45ca04" ]
[ "petastorm/tests/test_parquet_reader.py" ]
[ "# Copyright (c) 2017-2018 Uber Technologies, 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 app...
[ [ "numpy.testing.assert_equal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
educauchy/kaggle-tab-playground-aug21
[ "e740b251b8ab95c309255a42d32c5f105dccb35e" ]
[ "app/ml_tools/models/MetaRegressor.py" ]
[ "from sklearn.base import RegressorMixin\nfrom sklearn.ensemble import RandomForestRegressor, AdaBoostRegressor, GradientBoostingRegressor, \\\n StackingRegressor, BaggingRegressor\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.tree import DecisionTreeRegressor\nfr...
[ [ "sklearn.linear_model.LogisticRegression" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ChairOfStructuralMechanicsTUM/Mechanics_Apps
[ "b064a42d4df3fa9bde62a5cff9cb27ca61b0127c" ]
[ "Normal_Force_Rod/NFR_equations.py" ]
[ "\"\"\"\nNormal Force Rod - force and deformation equations\n\n\"\"\"\n# general imports\nfrom __future__ import division # float division only, like in python 3\nimport numpy as np # needs at least version 1.17\n\n# bokeh imports\n\n# internal imports\nfrom NFR_constants import(\n F, L, E, A, sigma, p0, T, ...
[ [ "numpy.linspace", "numpy.ones", "numpy.concatenate", "numpy.errstate", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
quantum-devices-physics-lab/qutip-parallel-simulator
[ "a4ba50a2b7e5f7744406bdfd2323859d228202ab" ]
[ "Example.py" ]
[ "from QutipSimulator import *\nimport numpy as np\nfrom qutip import *\n\n# This is script is an example of how to use QutipSimulator\n\n# Create a class that inherit class QuantumSystem\n# One have to implement the method run, which is the one that will be runned in parallel\nclass MyQuantumExperiment(QuantumSyste...
[ [ "numpy.array", "numpy.linspace" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dovletov/fantastic-robot
[ "3e95e06511da6295f02513ea0a871a139cc0cf02" ]
[ "utils/models.py" ]
[ "import tensorflow as tf\nimport tensorflow.contrib.slim as slim\nfrom tensorflow import initializers as tfinit\n\ndef cnn2d_example(inputs, pkeep_conv, pkeep_hidden):\n \"\"\"\n \"\"\"\n print(inputs.shape)\n net = slim.conv2d(inputs = inputs,\n num_outputs = 64,\n ...
[ [ "tensorflow.contrib.slim.flatten", "tensorflow.contrib.slim.dropout", "tensorflow.initializers.zeros", "tensorflow.initializers.truncated_normal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
MrMorning/solutionOfCS131
[ "36dc9f197335d70601973b024e3ad5cb816bd26e" ]
[ "hw5_release/segmentation.py" ]
[ "\"\"\"\nCS131 - Computer Vision: Foundations and Applications\nAssignment 5\nAuthor: Donsuk Lee (donlee90@stanford.edu)\nDate created: 09/2017\nLast modified: 09/25/2018\nPython Version: 3.5+\n\"\"\"\n\nimport numpy as np\nimport scipy\nimport random\nfrom scipy.spatial.distance import squareform, pdist\nfrom skim...
[ [ "numpy.allclose", "numpy.random.choice", "numpy.arange", "numpy.linalg.norm", "numpy.dstack", "numpy.logical_or", "numpy.max", "numpy.copy", "numpy.std", "numpy.mean", "numpy.argmin", "numpy.fill_diagonal", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
karshUniBremen/ActivityTracker
[ "26357008c66ddc116e3c3174abfa3cd3a1a3e846" ]
[ "MLP/activityApp.py" ]
[ "from glob import glob\n\nimport pandas as pd\n\nfrom activityAnalysis import MeasurementExtractor\nfrom activityClassifier import ActivityFeatureExtraction, ActivityClassifier\n\n\ndef app_main():\n files = sorted(glob(\"../FinaldataSet/*\"))\n measurements = list()\n for measurement_file in files:\n ...
[ [ "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": [] } ]
joselynzhao/Pytorch_advance
[ "c08c8362bc7812176fc1e366d2bcd5adc91bec72" ]
[ "Define/01.py" ]
[ "# from __future__ import print_function\n\nimport torch\n\nx = torch.empty(5,3) # 不进行初始化\nprint(x) # 生成了5*3的张亮\n\nx = torch.rand(5,3) # 随机初始化\nprint(x)\n\nx = torch.zeros(5,3,dtype=torch.long) # all are zero,\nprint(x)\n\nx = torch.tensor([5.5,3]) # 构造一个张量\nprint(x) #如果是浮点数,小数点是4位\n\nx = x.new_ones(5,3,dtype=tor...
[ [ "torch.randn_like", "torch.empty", "torch.add", "torch.zeros", "torch.randn", "torch.tensor", "torch.rand" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
grantgasser/vehicle-detection
[ "812932d545eba088f530fa77dc9ef0399d30b713" ]
[ "src/train.py" ]
[ "import glob \nimport os\nimport time\n\nimport cv2\nimport numpy as np\nimport pickle\nimport matplotlib.image as mpimg\nimport matplotlib.pyplot as plt\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.svm import SVC\nfrom sklearn.decomposition i...
[ [ "sklearn.model_selection.train_test_split", "numpy.concatenate", "sklearn.svm.SVC", "sklearn.preprocessing.StandardScaler", "sklearn.decomposition.PCA", "numpy.vstack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Gibbsdavidl/GeneSignalProc
[ "9710b495b969b1b16b43228fb6d2ff7004d819be" ]
[ "src/simulateData_DisjointSets.py" ]
[ "\n# create a set of genes, set membership, a weighted network, and\n# create two groups of samples with simulated expression data.\n# ... right now the sets are disjoint ...\n\n#simsets.py\n\n# need a set of sets, to find an ordering over all.\n# related to contigs, but with repeated sets.\n\nimport sys\nimport n...
[ [ "numpy.random.choice", "numpy.random.multivariate_normal", "numpy.random.exponential", "numpy.transpose", "numpy.savetxt", "numpy.array", "numpy.zeros", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
madwilliam/skccm
[ "82f0fd44f98b3efe67fdaa3ce5bd78cd0b49a9ee" ]
[ "skccm/paper.py" ]
[ "# \n# Data for analyzing causality.\n# By Nick Cortale\n#\n# Classes:\n# \tccm\n# \tembed\n#\n# Paper:\n# Detecting Causality in Complex Ecosystems\n# George Sugihara et al. 2012\n#\n# Thanks to Kenneth Ells and Dylan McNamara\n#\n# Notes:\n# Originally I thought this can be made way faster by only calculting the\...
[ [ "numpy.sqrt", "numpy.linspace", "numpy.min", "numpy.arange", "sklearn.metrics.mutual_info_score", "pandas.DataFrame", "sklearn.neighbors.KNeighborsRegressor", "numpy.max", "numpy.zeros_like", "numpy.mean", "numpy.logical_and", "numpy.zeros", "numpy.sum", "nu...
[ { "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": [] } ]
mayank-sfdc/dpu-utils
[ "72cac67490ccf19fede6b86269c57843549b526c" ]
[ "python/tests/ptutils/testmodel.py" ]
[ "from typing import NamedTuple, List, Optional, Dict, Any\r\n\r\nimport numpy as np\r\nimport torch\r\nfrom torch import nn as nn\r\n\r\nfrom dpu_utils.ptutils import BaseComponent\r\n\r\n\r\nclass SampleDatapoint(NamedTuple):\r\n input_features: List[float]\r\n target_class: bool\r\n\r\n\r\nclass TensorizedD...
[ [ "numpy.stack", "torch.tensor", "torch.nn.Linear", "torch.nn.BCEWithLogitsLoss", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
scrasmussen/icar
[ "88c59fed7595b176a81127993785fdeb514f28a3" ]
[ "helpers/ideal_linear.py" ]
[ "#!/usr/bin/env python\nimport sys\n\nimport matplotlib.pyplot as plt #graphics library\nimport numpy as np #numerical library (FFT etc)\n\nimport Nio # NCAR python io library\n\n# set up the physical domain of the experiment to be run\n# zs = topography (Fzs = FFT(zs))\n# dx ...
[ [ "matplotlib.pyplot.legend", "numpy.sqrt", "numpy.linspace", "matplotlib.pyplot.plot", "numpy.argmin", "numpy.exp", "numpy.where", "numpy.arange", "matplotlib.pyplot.gcf", "numpy.fft.ifftshift", "numpy.zeros", "matplotlib.pyplot.title", "matplotlib.pyplot.ylim", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
IDEMSInternational/opencdms-components-server-demo
[ "6fe056448b4f03d77d76fe29b9caef73c2781fc7" ]
[ "app/utils/product_data.py" ]
[ "import os\n\nfrom pandas import DataFrame, read_csv, read_sql\nfrom datetime import datetime\nfrom opencdms.models.climsoft import v4_1_1_core as climsoft\nfrom sqlalchemy.orm.session import Session\nfrom sqlalchemy.orm.query import Query as SqlQuery\n\nfrom app.api.products.schema import ProductDataParams\nfrom a...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
andrewfowlie/accumulating_evidence
[ "bcb11634d259543a32d6b98cb45d952d0dcd8c4c" ]
[ "data.py" ]
[ "\"\"\"\nGenerate pseudo-data\n====================\n\"\"\"\n\nimport numpy as np\nfrom scipy.stats import poisson\n\n# number of pseudo-data sets and channels\n\nn_pseudo = 100000\nn_channels = 6\n\n# detector resolution per channel\n\nsigma_gg = 1.5\nsigma_bb = 14.\nresolutions = [sigma_gg] * 5 + [sigma_bb]\n\n# ...
[ [ "numpy.save", "numpy.zeros_like", "numpy.random.seed", "numpy.linspace" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
junhyeokahn/PyPnC
[ "1a038ac282e0e8cf19a7af04928271ed00b61407" ]
[ "simulator/pybullet/draco_manipulation_main.py" ]
[ "import os\nimport sys\n\ncwd = os.getcwd()\nsys.path.append(cwd)\nimport time, math\nfrom collections import OrderedDict\nimport copy\nimport signal\nimport shutil\n\nimport cv2\nimport pybullet as p\nimport numpy as np\n\nnp.set_printoptions(precision=2)\n\nfrom config.draco_manipulation_config import SimConfig\n...
[ [ "numpy.set_printoptions", "numpy.radians" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
maliha93/Fairness-Analysis-Code
[ "acf13c6e7993704fc627249fe4ada44d8b616264", "acf13c6e7993704fc627249fe4ada44d8b616264", "acf13c6e7993704fc627249fe4ada44d8b616264", "acf13c6e7993704fc627249fe4ada44d8b616264" ]
[ "Inprocessing/Thomas/Python/core/optimizers/bfgs.py", "Postprocessing/Hardt/Hardt.py", "Inprocessing/Thomas/Python/experiments/classification/credit_predictions.py", "Inprocessing/Thomas/Python/baselines/fairlearn/classred.py" ]
[ "import cma\nimport numpy as np\n\nfrom core.optimizers import SMLAOptimizer\nfrom time import time\n\nfrom scipy.optimize import minimize\n\nclass BFGSOptimizer(SMLAOptimizer):\n\n\tdef __init__(self, n_features, sigma0=1.0, restarts=5, *args, **kwargs):\n\t\tself.n_features = n_features\n\t\tself.sigma0 = sig...
[ [ "numpy.random.random", "scipy.optimize.minimize" ], [ "numpy.log", "pandas.read_csv", "numpy.random.shuffle", "numpy.mean", "numpy.savetxt", "numpy.array" ], [ "numpy.savez" ], [ "pandas.Series", "numpy.sqrt", "pandas.DataFrame", "numpy.ones", "n...
[ { "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" ...
hexieshenghuo/Paddle
[ "2497f4392fe60f4c72e9b7ff5de9b8b6117aacac" ]
[ "python/paddle/fluid/tests/custom_op/test_jit_load.py" ]
[ "# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
barblin/lodestar
[ "b36c9b76374c111b24abad87fa4f573bfd129d0e" ]
[ "lodestar-backend/code/LineGeometry/line_projection.py" ]
[ "import numpy as np\nfrom code.LineGeometry.utils import distance\nfrom code.miscellaneous.utils import pairwise_loop\n\n\ndef distance2projectedVector(a, b, vec):\n \"\"\"Project point p onto line spanned by a & b\n Returns distance a-p on line a-b\n \"\"\"\n ap = vec-a\n ab = b-a\n # distance be...
[ [ "numpy.dot", "numpy.array", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ubc-vision/RefTR
[ "f31b28ba98d5716f8c5ba994af6cd284d016ebba" ]
[ "util/transforms.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"\nGeneric Image Transform utillities.\n\"\"\"\n\nimport cv2\nimport random, math\nimport numpy as np\nfrom collections import Iterable\n\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\n\n\ndef letterbox(img, mask, height, color=(123.7, 116.3, 103.5)): # resi...
[ [ "numpy.maximum", "numpy.clip", "numpy.eye", "numpy.ones", "numpy.concatenate" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jofrony/Neuromodulation
[ "b5e1502701399c02cecff20b85d4ff8af7772ec9" ]
[ "neuromodcell/analysis.py" ]
[ "import pathlib\nimport numpy as np\nimport json\nimport neuromodcell.modulation_functions as mf\nimport matplotlib.pyplot as plt\n\n\n'''\nClass for loading the result of the optimisation\n\nfunctions for analysing the data\n\n'''\n\n\nclass OptimisationResult:\n \n def __init__(self,dir_path):\n \n ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "matplotlib.pyplot.subplot", "matplotlib.pyplot.xlabel", "numpy.array", "numpy.loadtxt", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
weegreenblobbie/sd_audio_hackers
[ "25a9cfa5049d5a1155c80fb1242c061c096a0d14" ]
[ "20160821_wavetable_chorus/code/sdaudio/wavio.py" ]
[ "\"\"\"\nWavefile IO\n\nReads and writes RIFF WAVE files and headers.\n\n\nReference: http://soundfile.sapp.org/doc/WaveFormat/\n\n-------------------------------------------------------------------------------\nRIFF WAVE file format\n-------------------------------------------------------------------------------\n...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
taylormordan/openpifpaf
[ "c516dded6554de51d1126fabb748cdd782993cb1" ]
[ "openpifpaf/show/painters.py" ]
[ "import logging\n\nimport numpy as np\n\nfrom ..configurable import Configurable\n\ntry:\n import matplotlib\n import matplotlib.animation\n import matplotlib.collections\n import matplotlib.patches\nexcept ImportError:\n matplotlib = None\n\n\nLOG = logging.getLogger(__name__)\n\n\nclass DetectionPa...
[ [ "matplotlib.collections.PatchCollection", "numpy.asarray", "matplotlib.patches.Rectangle", "numpy.zeros_like", "numpy.any", "matplotlib.cm.get_cmap", "numpy.argsort", "numpy.array", "numpy.logical_and", "matplotlib.patches.Polygon", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wotmd5731/pytorch_dqn
[ "fb3062c3aff1e5e249551807e53e974363f7595c" ]
[ "test.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Jan 21 17:36:23 2018\n\n@author: JAE\n\"\"\"\nimport numpy as np\ntt=[]\n\nkk = [[5,5,5,5],[1],[2],[6,6,6,6]]\n\ntt.append([[5,5,5,5],[1],[2],[6,6,6,6]]) \ntt.append([[5,5,5,5],[1],[2],[6,6,6,6]]) \ntt.append([[5,5,5,5],[1],[2],[6,6,6,6]]) \ntt.append([[5,5,5,5],[1],...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
BILLXZY1215/museflow
[ "241a98ef7b3f435f29bd5d2861ac7b17d4c091d8" ]
[ "museflow/nn/rnn.py" ]
[ "import tensorflow.compat.v1 as tf\ntf.disable_v2_behavior()\n\n\nclass DropoutWrapper(tf.nn.rnn_cell.DropoutWrapper): # pylint: disable=abstract-method\n \"\"\"A version of `tf.nn.rnn_cell.DropoutWrapper` that disables dropout during inference.\"\"\"\n\n def __init__(self, cell, training, **kwargs):\n ...
[ [ "tensorflow.compat.v1.shape", "tensorflow.compat.v1.convert_to_tensor", "tensorflow.compat.v1.constant", "tensorflow.compat.v1.disable_v2_behavior" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
consbio/MPilot
[ "e0c48b6640982c8234404b2f2ca34859b0c96dc0" ]
[ "mpilot/libraries/eems/csv/io.py" ]
[ "from __future__ import absolute_import\n\nimport csv\n\nimport numpy\n\nfrom mpilot import params\nfrom mpilot.commands import Command\nfrom mpilot.libraries.eems.exceptions import EmptyDataFile, InvalidDataFile\nfrom mpilot.libraries.eems.mixins import SameArrayShapeMixin\n\n\nclass EEMSRead(Command):\n \"\"\"...
[ [ "numpy.ma.array" ] ]
[ { "matplotlib": [], "numpy": [ "1.10", "1.12", "1.11", "1.19", "1.13", "1.16", "1.9", "1.18", "1.20", "1.7", "1.15", "1.14", "1.17", "1.8" ], "pandas": [], "scipy": [], "tensorflow": [] } ]
Janie1996/PredNet_pytorch
[ "5581eed55a0a3506d175a124d7a6f9e55023c4ed" ]
[ "debug/reproduce_bug.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport numpy as np\nimport torch\nfrom torch.autograd import Variable\n\n# a = Variable(torch.from_numpy(np.arange(12).reshape(3, 4)).float(), requires_grad=True)\nL = [Variable(torch.from_numpy(np.arange(12).reshape(3, 4)).float(), requires_grad=True),\n\t Variable(torch.from_numpy(np.a...
[ [ "numpy.arange", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SBU-BMI/quip_prad_cancer_detection
[ "23b9c23c82bde63f2f2b681388e20b8951a9e2a4" ]
[ "training_codes/utils.py" ]
[ "import torch\nfrom torch.utils.data import DataLoader, Dataset\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nfrom torch.autograd import Variable\nimport sys\nimport argparse\nfrom PIL import Image\n\n\ndef get_label_from_filename(fn):\n # *_{lb}.png --> extract the label\n lb = int(fn[-5])...
[ [ "torch.zeros", "torch.utils.data.DataLoader", "torch.cuda.is_available", "torch.nn.DataParallel", "torch.autograd.Variable" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Telofy/swungdash
[ "b17f3983f3aa462912f914521ce1534c6591a82a" ]
[ "squigglypy/resolvers.py" ]
[ "from typing import Callable, Tuple, Union\n\nfrom scipy.integrate import quad # type: ignore\n\nfrom .context import Context\nfrom .tree import BaseValue, Resolveable\nfrom .utils import aslist\n\nquad: Callable[..., Tuple[float, float]]\n\n\nclass Integral(Resolveable):\n def __init__(\n self,\n ...
[ [ "scipy.integrate.quad" ] ]
[ { "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"...
jestra52/twitter-sentiment-analysis
[ "24e8d639dfec784b6ead0451e921323c761db315" ]
[ "ml_source/format_dataset.py" ]
[ "import numpy as np\nimport os\nimport pandas as pd\nimport re\n\nHTML_TAGS = re.compile(r'<.*?>')\nSPECIAL_CHARS_NO_SPACE = re.compile(r'[.;:!\\'?,\\\"()\\[\\]]')\nSPECIAL_CHARS_WITH_SPACE = re.compile(r'(<br\\s*/><br\\s*/>)|(\\-)|(\\/)')\n\nclass FormatDataset:\n def load_train_test_imdb_data(self, data_dir):\...
[ [ "numpy.random.shuffle", "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": [] } ]
etiennecollin/glycine-max-mitosis-ml
[ "cacd68f2a56df078cb1193bcc7ed4a0f86a659d4" ]
[ "src/yolov5/utils/activations.py" ]
[ "# YOLOv5 🚀 by Ultralytics, GPL-3.0 license\n\"\"\"\nActivation functions\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass SiLU(nn.Module):\n # SiLU activation https://arxiv.org/pdf/1606.08415.pdf\n @staticmethod\n def forward(x):\n return x * torch.sigmoid...
[ [ "torch.sigmoid", "torch.ones", "torch.randn", "torch.nn.Conv2d", "torch.nn.functional.hardtanh", "torch.nn.BatchNorm2d", "torch.nn.functional.softplus" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kelvin34501/pytorch3d
[ "36b451a49bdc481fb32707323c5bca53c34ac369" ]
[ "projects/nerf/nerf/nerf_renderer.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\nfrom typing import List, Optional, Tuple\n\nimport torch\nfrom pytorch3d.renderer import ImplicitRenderer, ray_bundle_to_ray_points\nfrom pytorch3d.renderer.cameras import CamerasBase\nfrom pytorch3d.structures import Pointclouds\nfrom pytorc...
[ [ "torch.stack", "torch.nn.ModuleDict", "torch.cat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ShNadi/study_motivation
[ "cff7c3995e69ce2d91d0a2753b57d8089df3cad2" ]
[ "src/lda_document_topic.py" ]
[ "from sklearn.utils import shuffle\nimport nltk\nnltk.download('stopwords')\nfrom nltk.corpus import stopwords\nimport re\nimport numpy as np\nimport pandas as pd\nfrom contextlib import redirect_stdout\nimport pickle\nimport os\n\n# Gensim\nimport gensim\nimport gensim.corpora as corpora\nfrom gensim.utils import ...
[ [ "sklearn.utils.shuffle", "numpy.array", "pandas.read_csv", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
kseetharam/zwPolaron
[ "b2599622cb1a1444cc0df9d6addb48170938a67d" ]
[ "zw_scratch.py" ]
[ "import numpy as np\nimport Grid\nimport pf_static_sph as pfs\nimport os\nfrom timeit import default_timer as timer\n\n\nif __name__ == \"__main__\":\n\n start = timer()\n\n # ---- INITIALIZE GRIDS ----\n\n (Lx, Ly, Lz) = (20, 20, 20)\n (dx, dy, dz) = (0.2, 0.2, 0.2)\n\n # (Lx, Ly, Lz) = (21, 21, 21)...
[ [ "numpy.ceil", "numpy.array", "numpy.load", "numpy.linspace" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
huachuan/Tiny_EKF
[ "003b0a955cb7891889400ad7c9567447fe7e8547" ]
[ "extras/python/altitude_fuser.py" ]
[ "#!/usr/bin/env python3\n'''\naltitude_fuser.py - Sonar / Barometer fusion example using TinyEKF. \n\nWe model a single state variable, altitude above sea level (ASL) in centimeters.\nThis is obtained by fusing the barometer pressure in Pascals and sonar above-ground level\n(ASL) in centimters.\n\nAlso requires Re...
[ [ "numpy.copy", "numpy.array", "numpy.eye", "numpy.random.rand" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
gwaygenomics/OpticalPooledScreens
[ "ac67b4e55562217055ed9283d0bdca4629582bce" ]
[ "ops/pool_design.py" ]
[ "from collections import defaultdict, Counter\nimport scipy.sparse\nimport numpy as np\nimport pandas as pd\nimport os\nfrom Levenshtein import distance\n\nimport ops.utils\nfrom ops.constants import *\n\n\n# LOAD TABLES\n\ndef validate_design(df_design):\n for group, df in df_design.groupby('group'):\n x...
[ [ "pandas.read_excel", "numpy.array", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
AhmadQasim/MedAL
[ "0ad6064d0d07f23722034b866ba86d93b62517f4", "0ad6064d0d07f23722034b866ba86d93b62517f4" ]
[ "code/active_learning/learning_loss.py", "code/semi_supervised/auto_encoder_cl.py" ]
[ "import time\nimport torch\nfrom torch.utils.data import DataLoader\n\nfrom active_learning.others import UncertaintySamplingOthers\nfrom data.isic_dataset import ISICDataset\nfrom data.matek_dataset import MatekDataset\nfrom data.cifar10_dataset import Cifar10Dataset\nfrom data.jurkat_dataset import JurkatDataset\...
[ [ "pandas.concat", "torch.nn.functional.softmax", "torch.max", "torch.cat", "torch.utils.data.DataLoader", "torch.sum", "pandas.DataFrame", "torch.no_grad", "pandas.DataFrame.from_dict", "numpy.array" ], [ "pandas.concat", "torch.autograd.set_detect_anomaly", ...
[ { "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": [] }, { "matplotlib": [], "nump...
emilydolson/genomic_stability_model
[ "07e8c7fe5ac633be5aecbbe8ebc8fe2c6b247886" ]
[ "scripts/munge_data.py" ]
[ "import sys\nimport pandas as pd\nimport glob\nimport os\n\n# This script expects two command line arguments:\n# - a glob-style pattern indicating which directories to analyze\n# (remember to put quotation marks around it)\n# - the prefix filename to store data in (main data fill get stored in filename....
[ [ "pandas.concat", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
parallelpro/Yaguang_stripped_rg_repo
[ "993f7459827b8e8f820a26768b5d2a281fe81709" ]
[ "modelling/coarse_v1/template/driver_template.py" ]
[ "from __future__ import print_function\nimport re\nimport numpy as np\nimport os\nimport sys\nfrom astropy.io import ascii\nimport glob\nfrom time import sleep\n\ndef set_gyre_inlist(inputFileName, summaryFileName, nu_max, delta_nu):\n # reads in the template inlist and writes out a new inlist with the \n # p...
[ [ "numpy.arange", "numpy.log", "numpy.where", "numpy.genfromtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ericyi/articulated-part-induction
[ "d02dc890400e6e996cac3adde739652aef7837a9" ]
[ "model.py" ]
[ "import os\nimport sys\nBASE_DIR = os.path.dirname(os.path.abspath(__file__))\nPN_DIR = os.path.join(BASE_DIR,'pointnet2')\nsys.path.append(os.path.join(PN_DIR,'utils'))\nimport tensorflow as tf\nimport numpy as np\nimport tf_util\nfrom pointnet_util import pointnet_sa_module, pointnet_fp_module, pointnet_sa_module...
[ [ "tensorflow.nn.dynamic_rnn", "tensorflow.concat", "tensorflow.zeros", "tensorflow.reduce_sum", "tensorflow.cast", "tensorflow.nn.sigmoid_cross_entropy_with_logits", "scipy.optimize.linear_sum_assignment", "tensorflow.Graph", "tensorflow.squeeze", "tensorflow.stop_gradient",...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.6", "1.4", "0.19", "1.5", "0.18", "1.2", "1.7", "1.0", "0.17", "1.3", "1.8" ], "tensorflow": [ "1.10" ] } ]
miaecle/dynamorph
[ "9bc04ae771e66938273eee102d404947546a69c5" ]
[ "plot_scripts/plottings.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Sep 17 15:20:21 2019\n\n@author: michaelwu\n\"\"\"\nimport numpy as np\nimport cv2\nimport os\nimport pickle\nimport torch as t\nimport torch\nimport h5py\nimport pandas as pd\nfrom NNsegmentation.models import Segment\nfrom NNsegmentation.dat...
[ [ "matplotlib.pyplot.legend", "numpy.expand_dims", "numpy.linspace", "torch.load", "numpy.cumsum", "pandas.DataFrame", "numpy.concatenate", "numpy.mean", "scipy.stats.spearmanr", "matplotlib.patches.Polygon", "numpy.where", "numpy.square", "matplotlib.pyplot.gca",...
[ { "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": [ ...
RudieLi/nni
[ "5a911b3061751a3441f18ff69a9279b16da9bda3" ]
[ "src/sdk/pynni/nni/compression/torch/speedup/compressor.py" ]
[ "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport logging\nimport torch\nfrom nni._graph_utils import build_module_graph\nfrom .compress_modules import replace_module\nfrom .infer_shape import ModuleMasks, infer_from_mask, infer_from_inshape, infer_from_outshape\n\n_logger = loggi...
[ [ "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
chemicalfiend/Oceananigans.jl
[ "04ca8e2f143afd53fd60bdaeb885a4dc1ed5825c" ]
[ "validation/lid_driven_cavity/plot_lid_driven_cavity.py" ]
[ "import joblib\nimport numpy as np\nimport xarray as xr\nimport matplotlib.pyplot as plt\nimport matplotlib.colors as colors\nimport cmocean\nimport ffmpeg\n\nfrom numpy import nan\nfrom xarray.ufuncs import fabs\n\n#####\n##### Data from tables 1, 2, and 4 of Ghia et al. (1982).\n#####\n\nj_Ghia = [1, 8, ...
[ [ "matplotlib.colors.SymLogNorm", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots_adjust" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
melloddy/MELLODDY-TUNERv1
[ "37a70402bee53fc4aa221257213e87ac4d6d750a" ]
[ "unit_test/test_descriptors.py" ]
[ "from melloddy_tuner.utils.helper import format_dataframe\nfrom melloddy_tuner.utils.df_transformer import DfTransformer\nfrom melloddy_tuner.utils.helper import read_csv\nfrom melloddy_tuner.utils.descriptor_calculator import DescriptorCalculator\nfrom melloddy_tuner.utils.chem_utils import run_fingerprint\nfrom m...
[ [ "numpy.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sakdag/experiments-on-classifiers
[ "294bd0850ca42c22311343c65626484e5853093c" ]
[ "src/supervised_learning/k_neighbors_regressor.py" ]
[ "import argparse\nimport os\nimport time\n\nimport numpy as np\nimport pandas as pd\n\nfrom sklearn.metrics import mean_squared_error, mean_absolute_percentage_error\nfrom sklearn.neighbors import KNeighborsRegressor\n\nimport src.config.config as conf\nimport src.preprocessing.preprocessing as prep\n\n\n# This cla...
[ [ "pandas.read_csv", "pandas.DataFrame", "sklearn.metrics.mean_squared_error", "sklearn.neighbors.KNeighborsRegressor", "sklearn.metrics.mean_absolute_percentage_error", "numpy.array", "numpy.array_split" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
johnsoncn/compression
[ "b470221bd5b8d28bf8e128bbe7aa4f45192b4711" ]
[ "tensorflow_compression/python/entropy_models/universal_test.py" ]
[ "# Copyright 2020 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl...
[ [ "tensorflow.convert_to_tensor", "tensorflow.nn.softmax", "tensorflow.random.stateless_normal", "tensorflow.reduce_mean", "tensorflow.range", "tensorflow.reduce_sum", "tensorflow.test.main", "tensorflow.ones", "tensorflow.math.log", "tensorflow.exp", "tensorflow.abs", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "1.12", "2.6", "2.2", "1.13", "2.3", "2.4", "2.9", "2.5", "2.8", "2.10" ] } ]
fmmanicacci/ppo
[ "4b97ba4d0d334d84b77635503b4838fd145a24b4" ]
[ "networks.py" ]
[ "\"\"\"\"\"\"\n\n# +\n# | DEPENDENCIES\n# +\n\n# | STANDARD LIBRARIES\nfrom copy import deepcopy\nfrom typing import Optional, Tuple, Union\n# | THIRD-PARTY LIBRARIES\nimport torch as th\n\n# +\n# | HELPER FUNCTIONS\n# +\n\ndef build_MLP(\n inputs:int,\n hidden:Union[int, Tuple[int]],\n outputs:int,\n a...
[ [ "torch.nn.Linear", "torch.nn.Sequential" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kngo107/testing
[ "81a225e36a9bd7160118171de19b98f6df5f009a" ]
[ "tests/scoring_tests.py" ]
[ "import os\nimport sys\nsys.path = [os.path.abspath(os.path.dirname(__file__))] + sys.path\n\nfrom auto_ml import Predictor\nimport numpy as np\n\nimport utils_testing as utils\n\ndef always_return_ten_thousand(estimator=None, actuals=None, probas=None):\n return 10000\n\ndef test_binary_classification():\n n...
[ [ "numpy.random.seed" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Ravi-0809/FlowDelta
[ "0321ea38401568f5d2330e72ce6bd8a8649c5563" ]
[ "FlowDeltaQA/general_utils.py" ]
[ "import re\nimport os\nimport sys\nimport random\nimport string\nimport logging\nimport argparse\nimport unicodedata\nfrom shutil import copyfile\nfrom datetime import datetime\nfrom collections import Counter\nimport torch\nimport msgpack\nimport json\nimport numpy as np\nimport pandas as pd\nfrom allennlp.modules...
[ [ "torch.ByteTensor", "torch.LongTensor", "torch.Tensor", "torch.eq", "numpy.random.permutation", "numpy.random.uniform" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nevinadalal/Hyperactive
[ "3232ffeda70c5d4853b9e71aaf5d1e761c0db9c2" ]
[ "examples/optimization_techniques/tpe.py" ]
[ "from sklearn.datasets import load_iris\nfrom sklearn.neighbors import KNeighborsClassifier\nfrom sklearn.model_selection import cross_val_score\n\nfrom hyperactive import Hyperactive, TreeStructuredParzenEstimators\n\ndata = load_iris()\nX, y = data.data, data.target\n\n\ndef model(opt):\n knr = KNeighborsClass...
[ [ "sklearn.datasets.load_iris", "sklearn.model_selection.cross_val_score", "sklearn.neighbors.KNeighborsClassifier" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ROCmSoftwarePlatform/DeepSpeed
[ "bb4d5bf6f70aaf3ef7afbef817dbef6047b0a242" ]
[ "op_builder/builder.py" ]
[ "\"\"\"\nCopyright 2020 The Microsoft DeepSpeed Team\n\"\"\"\nimport os\nimport sys\nimport time\nimport importlib\nfrom pathlib import Path\nimport subprocess\nimport shlex\nimport shutil\nimport tempfile\nimport distutils.ccompiler\nimport distutils.log\nimport distutils.sysconfig\nfrom distutils.errors import Co...
[ [ "torch.version.hip.split", "torch.__version__.split", "torch.cuda.get_device_capability", "torch.version.cuda.split", "torch.cuda.device_count" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
c-hydro/dryes-idx
[ "74969687766ab0ede0bd4a69a61c390b64f2ad35" ]
[ "downloader/hsaf/dryes_downloader_hsaf_h141_h142.py" ]
[ "#!/usr/bin/python3\r\n\"\"\"\r\nDRYES Downloading Tool - SATELLITE H SAF h141 and h142\r\n\r\n__date__ = '20210920'\r\n__version__ = '1.0.0'\r\n__author__ =\r\n 'Francesco Avanzi (francesco.avanzi@cimafoundation.org',\r\n 'Fabio Delogu (fabio.delogu@cimafoundation.org',\r\n 'Andrea Libertino (...
[ [ "pandas.DatetimeIndex" ] ]
[ { "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": [] } ]
Erenhub/Graph2Gauss
[ "49d54c1950fb9dd50b0e68a9a377b35bd57e3967" ]
[ "g2g/model.py" ]
[ "import numpy as np\nimport tensorflow as tf\nfrom .utils import *\n\n\nclass Graph2Gauss:\n \"\"\"\n Implementation of the method proposed in the paper:\n 'Deep Gaussian Embedding of Graphs: Unsupervised Inductive Learning via Ranking'\n by Aleksandar Bojchevski and Stephan Günnemann,\n published at...
[ [ "tensorflow.sparse_placeholder", "tensorflow.stack", "tensorflow.reduce_sum", "tensorflow.sparse_tensor_dense_matmul", "numpy.concatenate", "tensorflow.GPUOptions", "tensorflow.data.Dataset.from_generator", "tensorflow.train.AdamOptimizer", "numpy.arange", "tensorflow.gathe...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
drewmee/opcsim
[ "c430d359196939e219a2bdd20cd277f3c3dcc548" ]
[ "opcsim/metrics.py" ]
[ "\"\"\"Contains the scoring algorithms used in the model.\n\"\"\"\n\nimport numpy as np\nimport pandas as pd\nfrom .models import OPC\nfrom .utils import k_kohler, ri_eff\nfrom .mie import cscat\n\n\ndef compute_bin_assessment(opc, refr, kappa, rh_values=[0., 35., 95.]):\n \"\"\"Assess the ability of an OPC to a...
[ [ "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": [] } ]
mrmattuschka/DeePiCt
[ "0bdf1cd845cc306e66e30face1010c12ca3a38d0", "0bdf1cd845cc306e66e30face1010c12ca3a38d0", "0bdf1cd845cc306e66e30face1010c12ca3a38d0", "0bdf1cd845cc306e66e30face1010c12ca3a38d0" ]
[ "3d_cnn/src/tomogram_utils/coordinates_toolbox/clustering.py", "3d_cnn/src/pytorch_cnn/classes/metrics.py", "3d_cnn/pipelines/particle_picking/mask_motl.py", "3d_cnn/src/networks/utils.py" ]
[ "import h5py\nimport numpy as np\nfrom os.path import join\nfrom scipy import ndimage\nfrom skimage import morphology as morph\nfrom skimage.measure import regionprops_table\nfrom tqdm import tqdm\nfrom scipy import ndimage\n\nfrom constants import h5_internal_paths\nfrom tomogram_utils.coordinates_toolbox.subtomos...
[ [ "numpy.pad", "numpy.unique", "numpy.min", "numpy.rint", "numpy.ones", "numpy.max", "numpy.intersect1d", "numpy.array", "scipy.ndimage.distance_transform_cdt", "numpy.zeros", "numpy.isin" ], [ "numpy.sum", "numpy.multiply" ], [ "numpy.array", "pan...
[ { "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"...
AntonPotapchuk/playground
[ "e29cbc974c4d08f27a2078d47d1a79080e712efe" ]
[ "rl_agent/tambet/mcts_agent5.py" ]
[ "import argparse\nimport multiprocessing\nfrom queue import Empty\nimport random\nimport time\nimport os\nimport re\nimport glob\nimport pickle\nimport numpy as np\nimport time\n\nimport pommerman\nfrom pommerman.agents import BaseAgent, SimpleAgent\nfrom pommerman import constants\n\nfrom keras.models import Model...
[ [ "numpy.log", "numpy.random.choice", "numpy.stack", "numpy.full", "tensorflow.ConfigProto", "numpy.argmax", "numpy.mean", "numpy.any", "tensorflow.Session", "numpy.array", "numpy.zeros", "numpy.sum", "numpy.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
fcggamou/simpletransformers
[ "fd6914a76d125b09acc1fb931f0ec2727ce22a57" ]
[ "simpletransformers/conv_ai/conv_ai_model.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n\nfrom __future__ import absolute_import, division, print_function\n\nimport json\nimport logging\nimport math\nimport os\nimport random\nimport statistics\nimport warnings\nfrom collections import defaultdict\nfrom itertools import chain\nfrom multiprocessing import cpu_c...
[ [ "torch.nn.functional.softmax", "torch.utils.data.DataLoader", "pandas.DataFrame", "torch.multinomial", "torch.no_grad", "torch.cuda.is_available", "torch.cuda.manual_seed_all", "torch.topk", "torch.device", "torch.nn.CrossEntropyLoss", "torch.utils.data.TensorDataset", ...
[ { "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": [] } ]
Enteee/DeepPoseKit
[ "7533569481be03fec6cfedd50a0fbfbcdcae4c54", "7533569481be03fec6cfedd50a0fbfbcdcae4c54" ]
[ "deepposekit/models/saving.py", "deepposekit/io/video.py" ]
[ "# -*- coding: utf-8 -*-\n# Copyright 2018-2019 Jacob M. Graving <jgraving@gmail.com>\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-...
[ [ "tensorflow.python.keras.engine.saving.save_model" ], [ "numpy.stack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.13", "1.10", "1.12" ] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kgrigaityte/BayesPowerlaw
[ "994f60d6274036e05f8481dc5f98113c0c5f3ab7" ]
[ "BayesPowerlaw/docs/BayesPowerlaw.py" ]
[ "from scipy.special import zeta\nfrom scipy.optimize import newton\nimport scipy as sp\nimport numpy as np\nfrom scipy.stats import uniform\nimport matplotlib.pyplot as plt\nimport warnings\n\n\nclass bayes(object):\n \"\"\"This function fits the data to powerlaw distribution and outputs the exponent\n using ...
[ [ "scipy.special.zeta", "numpy.linspace", "matplotlib.pyplot.plot", "numpy.mean", "scipy.optimize.newton", "numpy.unique", "numpy.arange", "numpy.log", "numpy.random.choice", "matplotlib.pyplot.xscale", "scipy.stats.uniform", "numpy.array", "numpy.sum", "matpl...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
facebookresearch/phyre-fwd
[ "18eb9d5849a22172c8e6b92b2a6453b3931b7781" ]
[ "agents/offline_agents.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\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 app...
[ [ "numpy.concatenate", "numpy.mean", "numpy.nanmean", "numpy.argsort", "numpy.array", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
CheYulin/ScanOptimizing
[ "691b39309da1c6b5df46b264b5a300a35d644f70" ]
[ "paper/scalability_vary_threads/scalability_vary_threads.py" ]
[ "import math\nimport matplotlib.pyplot as plt\nimport os\n\nLABEL_SIZE = 24\nTICK_SIZE = 24\nLEGEND_SIZE = 24\nMARK_SIZE = 18\n\nserver_scalability_folder = '/home/yche/mnt/luocpu8/nfsshare/share/python_experiments/scalability_simd_paper2'\nu = 5\neps = 0.2\nthread_lst = [2 ** i for i in range(9)]\ntag_lst = ['prun...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.rc", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots_adjust" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
LinearZoetrope/abp
[ "2459c1b4d77606c1d70715ce8378d738ba102f37" ]
[ "abp/adaptives/hra/adaptive.py" ]
[ "import logging\nimport time\nimport random\nimport pickle\nimport os\nimport sys\n\nimport torch\nfrom baselines.common.schedules import LinearSchedule\n\n\nfrom abp.adaptives.common.prioritized_memory.memory import PrioritizedReplayBuffer\nfrom abp.utils import clear_summary_path\nfrom abp.models import HRAModel\...
[ [ "torch.abs", "torch.sum", "torch.cuda.is_available", "torch.arange" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
vbvg2008/RUA
[ "adeb719e479cbe4169b7847bab61ee670b9fb944" ]
[ "wrn2810_cifar10/rua/wrn2810_cifar10_rua.py" ]
[ "import os\nimport random\nimport tempfile\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom PIL import Image, ImageEnhance, ImageOps, ImageTransform\n\nimport fastestimator as fe\nfrom fastestimator.dataset.data import cifar10\nfrom fastestimator.op.numpyop import Nu...
[ [ "torch.nn.Sequential", "torch.nn.functional.dropout", "numpy.asarray", "torch.nn.functional.avg_pool2d", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.BatchNorm2d", "torch.optim.SGD", "torch.nn.ReLU", "numpy.where", "torch.nn.init.kaiming_normal_" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
oushu1zhangxiangxuan1/learn-neat
[ "f185e12282bf4346351cc4d6cfa75238c38afa51" ]
[ "meat/utils/playground.py" ]
[ "\ndef Test_OnehotEncoder_Inverse_Transform():\n from sklearn.preprocessing import OneHotEncoder\n enc = OneHotEncoder(handle_unknown='ignore')\n X = [['Male', 1], ['Female', 3], ['Female', 2]]\n enc.fit(X)\n print(enc.categories_)\n enc.transform([['Female', 1], ['Male', 4]]).toarray()\n enc.i...
[ [ "sklearn.preprocessing.OneHotEncoder" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]