repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
fepegar/resseg-ijcars | [
"963e5548fb02c777038ef550c969149377071cfc"
] | [
"datasets.py"
] | [
"import hashlib\nfrom pathlib import Path\n\nimport torch\nimport pandas as pd\nimport torchio as tio\nfrom tqdm import tqdm\nfrom resector import RandomResection\nfrom sklearn.model_selection import KFold\n\nfrom utils import sglob, get_stem\n\n\nclass DataModule:\n def __init__(\n self,\n ... | [
[
"pandas.read_csv",
"torch.random.fork_rng",
"torch.manual_seed",
"torch.utils.data.DataLoader",
"sklearn.model_selection.KFold",
"torch.utils.data.random_split",
"torch.utils.data.ConcatDataset"
]
] |
rxjx/autogluon | [
"648c19b8b76a6d663a2a8b42b9f3463e60c63e2c"
] | [
"text/src/autogluon/text/text_prediction/mx/models.py"
] | [
"import numpy as np\nimport scipy.special\nimport os\nimport math\nimport logging\nimport pandas as pd\nimport warnings\nimport time\nimport json\nimport pickle\nimport functools\nimport tqdm\nfrom typing import Tuple\n\nfrom autogluon.core.scheduler.scheduler_factory import scheduler_factory\nfrom autogluon.core.u... | [
[
"matplotlib.pyplot.legend",
"numpy.expand_dims",
"pandas.DataFrame",
"numpy.concatenate",
"matplotlib.pyplot.plot",
"numpy.argmin",
"sklearn.preprocessing.LabelEncoder",
"numpy.stack",
"numpy.ceil",
"numpy.argmax",
"pandas.to_numeric",
"pandas.concat",
"matplotl... |
HDembinski/aghast | [
"ed97e9abc870e729d300622253aa7e9c870f77ec",
"ed97e9abc870e729d300622253aa7e9c870f77ec"
] | [
"python/tests/test_getitem.py",
"python/tests/test_validity.py"
] | [
"#!/usr/bin/env python\n\n# BSD 3-Clause License; see https://github.com/scikit-hep/aghast/blob/master/LICENSE\n\nimport sys\nimport unittest\n\nimport numpy\n\nfrom aghast import *\n\n\nclass Test(unittest.TestCase):\n def runTest(self):\n pass\n\n def test_getitem_twodim(self):\n a = Histogram... | [
[
"numpy.arange",
"numpy.array"
],
[
"numpy.arange",
"numpy.array",
"numpy.zeros"
]
] |
Andy-math/optimizer | [
"a65f5ee54a0ae4e02aefb008d47c2d551d071ef0"
] | [
"optimizer/_internals/common/linneq.py"
] | [
"# -*- coding: utf-8 -*-\n\n\nfrom typing import Optional, Tuple\n\nimport numpy\n\nfrom overloads import bind_checker, dyn_typing\nfrom overloads.shortcuts import assertNoInfNaN, assertNoNaN\nfrom overloads.typedefs import ndarray\n\n\ndef noCheck(_: bool) -> None:\n pass\n\n\ndef constraint_check(\n constra... | [
[
"numpy.all",
"numpy.maximum",
"numpy.minimum",
"numpy.full"
]
] |
cowirihy/pymc3 | [
"f0b95773047af12f3c0ded04d707f02ddc4d4f6b",
"f0b95773047af12f3c0ded04d707f02ddc4d4f6b",
"f0b95773047af12f3c0ded04d707f02ddc4d4f6b",
"f0b95773047af12f3c0ded04d707f02ddc4d4f6b",
"f0b95773047af12f3c0ded04d707f02ddc4d4f6b"
] | [
"pymc3/tests/test_distributions_random.py",
"pymc3/model.py",
"pymc3/backends/ndarray.py",
"pymc3/blocking.py",
"pymc3/tests/test_data_container.py"
] | [
"# Copyright 2020 The PyMC Developers\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 appli... | [
[
"numpy.diag",
"numpy.dot",
"scipy.stats.pareto.rvs",
"numpy.sqrt",
"numpy.linspace",
"numpy.all",
"scipy.stats.wald.rvs",
"scipy.stats.uniform.rvs",
"scipy.stats.bernoulli.rvs",
"numpy.random.randn",
"scipy.stats.nbinom.rvs",
"scipy.stats.gumbel_r.rvs",
"scipy.s... |
natsutan/cocytus | [
"53840021eb5a84ab197d96fa37e8b43b0b255566"
] | [
"tools/cqt_diff/cqt_diff_vgg16.py"
] | [
"import os\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn\nimport sys\n\nkeras_dir = '../../example/vgg16/keras/output/'\ncqt_dir = '../../example/vgg16/c_fix/output/'\nqp_file = '../../examplevgg16/c_fix/weight/'\n\nfix16mode = True\n\ndef layer_dump(i, q, fnum = 3):\n \"\"\"\n 引数で指定された... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"numpy.load",
"matplotlib.pyplot.figure"
]
] |
utahnlp/therapist-observer | [
"31eaf9a5c82c6d0f9a62427ac5df030d81547472",
"31eaf9a5c82c6d0f9a62427ac5df030d81547472"
] | [
"tensorflow/classes/bilm/model.py",
"tensorflow/classes/bilm/data.py"
] | [
"\nimport numpy as np\nimport tensorflow as tf\nimport h5py\nimport json\nimport re\n\nfrom .data import UnicodeCharsVocabulary, Batcher\n\nDTYPE = 'float32'\nDTYPE_INT = 'int64'\n\n\nclass BidirectionalLanguageModel(object):\n def __init__(\n self,\n options_file,\n weight_file,... | [
[
"tensorflow.device",
"tensorflow.get_variable",
"tensorflow.concat",
"numpy.sqrt",
"tensorflow.control_dependencies",
"tensorflow.nn.rnn_cell.ResidualWrapper",
"tensorflow.nn.max_pool",
"tensorflow.zeros",
"tensorflow.nn.rnn_cell.LSTMStateTuple",
"tensorflow.cast",
"ten... |
winstonolson/isofit_imgspec | [
"b6a56ba1abade7e08f14aa9264e6984a77e40a79"
] | [
"isofit/radiative_transfer/look_up_tables.py"
] | [
"#! /usr/bin/env python3\n#\n# Copyright 2018 California Institute of Technology\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/LICENS... | [
[
"numpy.array",
"numpy.random.random",
"numpy.logical_and"
]
] |
B-tronics/KinemAutomation | [
"853e9ad2c9e702e1830571152393172960c0d055"
] | [
"poseestimation/poseestimation.py"
] | [
"import cv2\nimport numpy as np\nimport argparse\nimport csv\nimport os\nimport glob\n\nap = argparse.ArgumentParser()\nap.add_argument(\"-c\", \"--csv\", help=\"Path to the CSV file holding the 2D data for the video.\")\nap.add_argument(\"-v\", \"--video\", help=\"Path to the video file.\")\nargs = vars(ap.parse_a... | [
[
"numpy.array",
"numpy.zeros"
]
] |
ThomasLecat/ray | [
"eb025ea8cb27583e8ef6287f5654f23d1ab270ef",
"eb025ea8cb27583e8ef6287f5654f23d1ab270ef",
"eb025ea8cb27583e8ef6287f5654f23d1ab270ef"
] | [
"python/ray/util/sgd/tests/test_torch.py",
"python/ray/tune/integration/torch.py",
"python/ray/tune/tests/test_var.py"
] | [
"from unittest.mock import patch\nimport numpy as np\nimport os\nimport pytest\nimport time\nimport torch\nimport torch.nn as nn\nimport torch.distributed as dist\nfrom torch.utils.data import DataLoader\n\nimport ray\nfrom ray import tune\nfrom ray.util.sgd.torch import TorchTrainer\nfrom ray.util.sgd.torch.traini... | [
[
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"numpy.allclose",
"numpy.isnan",
"torch.distributed.is_initialized",
"torch.utils.data.DataLoader",
"torch.equal",
"torch.tensor",
"numpy.ceil",
"torch.nn.Linear",
"torch.distributed.is_available",
"numpy.random.randn",
... |
yangxu0110/yysScript | [
"079101f57fb1a64b871924c988760d9e74063a71"
] | [
"yys/YuHunModule.py"
] | [
"# -*- coding: utf-8 -*-\nimport datetime\nimport logging\nimport os\nimport random\nimport time\nfrom tkinter import END\n\nimport cv2\nimport numpy\nimport numpy as np\nimport pyautogui\nfrom PIL import ImageGrab\nfrom matplotlib import pyplot as plt\n\npyautogui.FAILSAFE = False\nlogging.basicConfig(format=\"%(a... | [
[
"numpy.asarray",
"numpy.int32",
"numpy.float32"
]
] |
KeDengMS/CNTK | [
"fce86cd9581e7ba746d1ec75bbd67dd35d35d11c"
] | [
"bindings/python/examples/test/SLUHandsOn_test.py"
] | [
"# Copyright (c) Microsoft. All rights reserved.\n\n# Licensed under the MIT license. See LICENSE.md file in the project root\n# for full license information.\n# ==============================================================================\n\n# TODO: This does not work yet, need to figure out the right pattern.\n\... | [
[
"numpy.allclose"
]
] |
backwardn/imagededup | [
"38ce34c35187ec33bd996d833293f8ee95ff8202",
"38ce34c35187ec33bd996d833293f8ee95ff8202",
"38ce34c35187ec33bd996d833293f8ee95ff8202"
] | [
"imagededup/utils/data_generator.py",
"tests/test_hashing.py",
"imagededup/methods/cnn.py"
] | [
"from pathlib import PurePath\nfrom typing import Tuple, List, Callable\n\nimport numpy as np\nfrom tensorflow.keras.utils import Sequence\n\nfrom imagededup.utils.image_utils import load_image\n\n\nclass DataGenerator(Sequence):\n \"\"\"Class inherits from Keras Sequence base object, allows to use multiprocessi... | [
[
"numpy.delete"
],
[
"numpy.testing.assert_array_equal",
"numpy.array",
"numpy.zeros"
],
[
"numpy.array",
"numpy.fill_diagonal"
]
] |
dendisuhubdy/flow_synthesizer | [
"7df51b574765c7834ebdda8a8936b2c0d363a93a",
"7df51b574765c7834ebdda8a8936b2c0d363a93a"
] | [
"code/semantic.py",
"code/latent_neighbors.py"
] | [
"#!/usr/bin/env python3\n\n#%% Plotting\nimport matplotlib\nmatplotlib.use('agg')\nimport os\nimport time\nimport argparse\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\n# Internal imports\nfrom utils.data import load_dataset, meta_pairs\nfrom models.basic import GatedMLP, Ga... | [
[
"torch.abs",
"torch.nn.CrossEntropyLoss",
"numpy.savez",
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"torch.zeros",
"torch.cat",
"matplotlib.use",
"torch.no_grad",
"torch.cuda.is_available",
"numpy.load",
"torch.save"
],
[
"torch.zeros",
"torch.cat",
"... |
JesseTG/Liar | [
"a952ebc99fe1907e0f40ec4b40a725c75e25ac01"
] | [
"liar/public/views.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"Public section, including homepage and signup.\"\"\"\n\nfrom collections import Counter, defaultdict\nimport operator\nimport re\nimport itertools\nimport math\n\nfrom flask import Blueprint, flash, redirect, render_template, request, url_for\nfrom flask import current_app\n\nfrom nl... | [
[
"scipy.zeros",
"numpy.amax",
"scipy.interpolate.interp1d",
"sklearn.manifold.MDS"
]
] |
Jet132/keras-tuner | [
"be682573c6f6be1e3f3e6dcac786a34ccac19d3b",
"be682573c6f6be1e3f3e6dcac786a34ccac19d3b"
] | [
"keras_tuner/engine/base_tuner.py",
"keras_tuner/tuners/randomsearch_test.py"
] | [
"# Copyright 2019 The KerasTuner Authors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable la... | [
[
"tensorflow.io.gfile.exists",
"tensorflow.get_logger",
"tensorflow.io.gfile.rmtree"
],
[
"tensorflow.keras.layers.Dense",
"tensorflow.keras.Sequential",
"numpy.ones"
]
] |
choderalab/gin | [
"9082431d8b664699a898c1e2fa490a18737d6e2d",
"9082431d8b664699a898c1e2fa490a18737d6e2d",
"9082431d8b664699a898c1e2fa490a18737d6e2d"
] | [
"lime/scripts/qc_datasets/ht_off_opt.py",
"lime/scripts/elf_with_wbo/ht_elf_with_wbo.py",
"lime/scripts/qc_datasets/exam_smirnoff_fit.py"
] | [
"# =============================================================================\n# imports\n# =============================================================================\nimport os\nimport sys\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\nimport tensorflow as tf\ntf.compat.v1.logging.set_verbosity(tf.compat.v1.logg... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.concat",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.stack",
"tensorflow.tanh",
"tensorflow.boolean_mask",
"tensorflow.Variable",
"tensorflow.keras.regularizers.l2",
"tensorflow.squeeze",
"tensorflow.subtract",
... |
jacksonwalters/wordchef | [
"3edc2f8d5cbbaa064245ebaae923da68cae6556f"
] | [
"gen_vocab_vecs.py"
] | [
"import spacy, numpy, random, pickle, pandas, sys\nimport sklearn.neighbors as nbs\nfrom spacy.lookups import load_lookups\n\n\nMIN_PROB = -18\n\n#load NLP tool spaCy\nprint(\"Loading spaCy...\")\nnlp=spacy.load(\"en_core_web_lg\")\nprint(\"spaCy loaded.\")\n\n#load lexeme probability table\nlookups = load_lookups(... | [
[
"sklearn.neighbors.BallTree"
]
] |
naik-aakash/pymatgen | [
"394e0d71bf1d1025fcf75498cbb16aa3f41ce78c",
"394e0d71bf1d1025fcf75498cbb16aa3f41ce78c",
"394e0d71bf1d1025fcf75498cbb16aa3f41ce78c",
"394e0d71bf1d1025fcf75498cbb16aa3f41ce78c"
] | [
"pymatgen/analysis/interfaces/coherent_interfaces.py",
"pymatgen/io/lobster/outputs.py",
"pymatgen/analysis/defects/tests/test_defect_compatibility.py",
"pymatgen/io/abinit/tests/test_abiobjects.py"
] | [
"# Copyright (c) Pymatgen Development Team.\n# Distributed under the terms of the MIT License.\n\"\"\"\nThis module provides classes to store, generate, and manipulate material interfaces.\n\"\"\"\n\nfrom itertools import product\nfrom typing import Iterator, Optional, Tuple, Union\n\nimport numpy as np\nfrom scipy... | [
[
"numpy.diag",
"numpy.linalg.solve",
"numpy.allclose",
"numpy.round",
"numpy.linalg.pinv",
"numpy.cross",
"numpy.array",
"scipy.linalg.polar"
],
[
"numpy.reshape",
"numpy.array",
"numpy.isclose"
],
[
"numpy.arange",
"numpy.identity",
"numpy.cos"
],
... |
venom12138/active_tracking_rl | [
"813342c322f8f710fc0f9ccf2a5d0746f955144f"
] | [
"envs/gym-track2d/gym_track2d/envs/track_1v1.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib import colors\nimport gym\nfrom gym import spaces\nfrom gym.utils import seeding\nfrom gym_track2d.envs.generators import RandomMazeGenerator, RandomBlockMazeGenerator\nfrom gym_track2d.envs.navigator import Navigator, RamAgent\n\n\nclass Track1v... | [
[
"matplotlib.colors.BoundaryNorm",
"numpy.random.random",
"numpy.abs",
"numpy.min",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.draw",
"matplotlib.colors.ListedColormap",
"matplotlib.pyplot.close",
"numpy.array",
"numpy.zeros",
"numpy.random.randint"
]
] |
djroxx2000/transformers | [
"77770ec79883343d32051cfb6a04f64523cd8df1",
"76cadb7943c8492ec481f4f3925e9e8793a32c9d"
] | [
"src/transformers/models/roberta/modeling_roberta.py",
"src/transformers/models/deberta/modeling_deberta.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may... | [
[
"torch.nn.Softmax",
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"torch.zeros",
"torch.cat",
"torch.einsum",
"torch.nn.Embedding",
"torch.nn.LayerNorm",
"torch.nn.Tanh",
"torch.nn.Linear",
"torch.matmul",
"torch.tanh",
"torch.nn.BCEWithLogi... |
ranigb/Set-Tree | [
"fa3971f9a8ef98dbfd0f6de654efcde3006a197b",
"fa3971f9a8ef98dbfd0f6de654efcde3006a197b"
] | [
"settree/set_rf.py",
"nodegraphtree/graphtree.py"
] | [
"import numbers\nfrom warnings import catch_warnings, simplefilter, warn\nimport threading\n\nfrom abc import ABCMeta, abstractmethod\nimport numpy as np\nfrom scipy.sparse import issparse\nfrom scipy.sparse import hstack as sparse_hstack\nfrom joblib import Parallel, delayed\n\nfrom sklearn.base import ClassifierM... | [
[
"sklearn.utils.validation.check_is_fitted",
"sklearn.metrics.r2_score",
"numpy.asarray",
"sklearn.utils.fixes._joblib_parallel_args",
"numpy.mean",
"numpy.iinfo",
"sklearn.ensemble._base._partition_estimators",
"sklearn.utils.compute_sample_weight",
"scipy.sparse.issparse",
... |
loevlie/ce_expansion | [
"17417b9467914dd91ee8e0325cfdc3bd19ad7f1e",
"17417b9467914dd91ee8e0325cfdc3bd19ad7f1e",
"17417b9467914dd91ee8e0325cfdc3bd19ad7f1e"
] | [
"example/ex_4_phase_diagrams/individual_size_plots.py",
"example/ex_1_agau_309_Icosahedron/main.py",
"ce_expansion/atomgraph/bcm.py"
] | [
"import collections\nimport os\nimport sys\n\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker as tick\nimport numpy as np\n\ndata = os.path.join(os.path.realpath(__file__), '..', '..', '..', 'data', 'larson_et_al')\nsys.path.append(data)\nimport ce_expansion.npdb.db_inter\n\nDEFAULT_DPI = 600 # Dots per ... | [
[
"numpy.log",
"matplotlib.ticker.MultipleLocator",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.close",
"matplotlib.ticker.FormatStrFormatter"
],
[
"numpy.zeros"
],
[
"numpy.log",
... |
aerdem4/cuml | [
"088763cda9fd5e363af092b1d05c155f256cf0d7"
] | [
"python/cuml/benchmark/datagen.py"
] | [
"# Copyright (c) 2019, NVIDIA CORPORATION.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l... | [
[
"numpy.zeros"
]
] |
rist-ro/argo | [
"a10c33346803239db8a64c104db7f22ec4e05bef",
"a10c33346803239db8a64c104db7f22ec4e05bef",
"a10c33346803239db8a64c104db7f22ec4e05bef",
"a10c33346803239db8a64c104db7f22ec4e05bef"
] | [
"word_embeddings/test/core/readers.py",
"datasets/BTSC.py",
"argo/core/hooks/ImportanceSamplingHook.py",
"argo/core/TFDeepLearningModel.py"
] | [
"import numpy as np\nimport operator, os, itertools\nfrom abc import ABC, abstractmethod\nimport numexpr as ne\nne.set_num_threads(20)\n\ndef rmtxt(s):\n if s.endswith(\".txt\"):\n s=os.path.splitext(s)[0]\n return s\n\ndef get_reader(inputfilename):\n basename=os.path.basename(inputfilename)\n r... | [
[
"numpy.array"
],
[
"matplotlib.pyplot.title",
"numpy.random.seed",
"numpy.asarray",
"numpy.unique",
"numpy.random.choice",
"numpy.arange",
"numpy.random.shuffle",
"numpy.log10",
"numpy.random.randint",
"matplotlib.pyplot.close",
"matplotlib.pyplot.xlabel",
"... |
aerisweather/rioxarray | [
"1755f90ed827ea66477a235677c1c5ecd245833d"
] | [
"rioxarray/_io.py"
] | [
"\"\"\"\n\nCredits:\n\nThis file was adopted from: https://github.com/pydata/xarray # noqa\nSource file: https://github.com/pydata/xarray/blob/1d7bcbdc75b6d556c04e2c7d7a042e4379e15303/xarray/backends/rasterio_.py # noqa\n\"\"\"\n\nimport contextlib\nimport os\nimport re\nimport threading\nimport warnings\n\nimport ... | [
[
"numpy.ix_",
"numpy.min",
"numpy.asarray",
"numpy.arange",
"numpy.squeeze",
"numpy.dtype",
"numpy.atleast_1d",
"numpy.max",
"numpy.fromstring",
"numpy.zeros"
]
] |
suvarnak/GenerativeFSLCovid | [
"0bdeb4ed444c5c9d59697c71d0733fc3a100944c"
] | [
"graphs/models/concept_discriminator.py"
] | [
"\"\"\"\r\n discriminator model\r\n\"\"\"\r\nimport torch\r\nimport torch.nn as nn\r\nimport torchvision.models as models\r\nimport json\r\nfrom easydict import EasyDict as edict\r\nfrom graphs.weights_initializer import weights_init\r\n\r\n\r\nclass EncoderModel(nn.Module):\r\n def __init__(self,config):\r\n ... | [
[
"torch.nn.Linear",
"torch.nn.MaxPool2d",
"torch.nn.ReLU",
"torch.nn.Conv2d"
]
] |
nhsx-mirror/SynthVAE | [
"64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651",
"64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651",
"64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651",
"64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651"
] | [
"opacus/privacy_analysis.py",
"opacus/utils/tensor_utils.py",
"opacus/layers/param_rename.py",
"Hyperparameter_Tuning/Hyperparameter_Tuning_MIMIC.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\nr\"\"\"\n*Based on Google's TF Privacy:* https://github.com/tensorflow/privacy/blob/master/tensorflow_privacy/privacy/analysis/rdp_accountant.py.\n*Here, we update this code to Python 3, and optimize dependencies.*\n\... | [
[
"numpy.log",
"numpy.isnan",
"scipy.special.binom",
"numpy.atleast_1d",
"numpy.nanargmin",
"scipy.special.log_ndtr",
"numpy.isinf"
],
[
"torch.stack",
"torch.functional.F.pad",
"numpy.prod"
],
[
"torch.nn.modules.module._IncompatibleKeys"
],
[
"torch.util... |
linksdl/futuretec-project-self_driving_cars_projects | [
"38e8f14543132ec86a8bada8d708eefaef23fee8",
"38e8f14543132ec86a8bada8d708eefaef23fee8",
"38e8f14543132ec86a8bada8d708eefaef23fee8",
"38e8f14543132ec86a8bada8d708eefaef23fee8",
"38e8f14543132ec86a8bada8d708eefaef23fee8"
] | [
"udacity-program_self_driving_car_engineer_v1.0/part01-computer vision and deep learning/module03-deep learning/lesson02-miniflow/exercise07-backpropagation/miniflow.py",
"udacity-program_self_driving_car_engineer_v2.0/module03-sensor fusion/Lesson7-Multi-Target Tracking/Exercise19-Gating/4_gating.py",
"udacity... | [
"\"\"\"\n# !/usr/bin/env python\n# -*- coding: utf-8 -*-\n@Time : 2022/3/26 16:58\n@File : miniflow.py\n\"\"\"\n\n\n\n\"\"\"\nImplement the backward method of the Sigmoid node.\n\"\"\"\nimport numpy as np\n\n\nclass Node(object):\n \"\"\"\n Base class for nodes in the network.\n\n Arguments:\... | [
[
"numpy.dot",
"numpy.mean",
"numpy.zeros_like",
"numpy.exp",
"numpy.sum"
],
[
"numpy.matrix",
"numpy.random.seed",
"scipy.stats.distributions.chi2.ppf",
"numpy.isnan",
"numpy.min",
"numpy.linalg.inv",
"matplotlib.pyplot.subplots",
"numpy.ones",
"matplotli... |
mailhexu/pymatgen | [
"b80ca9f34c519757d337487c489fb655f7598cc2",
"b80ca9f34c519757d337487c489fb655f7598cc2",
"b80ca9f34c519757d337487c489fb655f7598cc2",
"b80ca9f34c519757d337487c489fb655f7598cc2"
] | [
"pymatgen/electronic_structure/boltztrap.py",
"pymatgen/phasediagram/analyzer.py",
"pymatgen/symmetry/analyzer.py",
"pymatgen/phonon/dos.py"
] | [
"# coding: utf-8\n\nfrom __future__ import division, unicode_literals, print_function\n\nimport math\nimport os\nimport subprocess\nimport tempfile\nimport logging\n\nimport numpy as np\nfrom monty.dev import requires\nfrom monty.json import jsanitize\nfrom monty.os import cd\nfrom monty.os.path import which\nfrom ... | [
[
"numpy.dot",
"scipy.spatial.distance.correlation",
"numpy.abs",
"numpy.reshape",
"numpy.eye",
"numpy.sort",
"numpy.genfromtxt",
"numpy.all",
"numpy.loadtxt",
"numpy.linalg.eigh",
"numpy.trim_zeros",
"numpy.array",
"numpy.vstack"
],
[
"numpy.dot",
"nu... |
petrapoklukar/DCA | [
"e5b3f3481433306a4b33e712272f8bbf5e9d05ce"
] | [
"dca/visualization.py"
] | [
"from dca.DCA import DelaunayGraph\nfrom dca.schemes import DelaunayGraphVisualizer\nimport numpy as np\nimport os\nimport matplotlib as mpl\n\nif not \"DISPLAY\" in os.environ:\n print(\"no display found. Using non-interactive Agg backend\")\n mpl.use(\"Agg\")\nimport matplotlib.pyplot as plt\nfrom matplotli... | [
[
"matplotlib.pyplot.rc",
"matplotlib.pyplot.plot",
"numpy.max",
"numpy.round",
"numpy.concatenate",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.tight_layout",
"numpy.arange",
"matplotlib.pyplot.close",
"matplotlib.pyplot.axis",
"numpy.repeat",
"matplotlib.pyplot.figu... |
Parita-D/olympic-hero | [
"8a809a6308146c09235af43379f29e7e5e83827d"
] | [
"code.py"
] | [
"# --------------\n#Importing header files\r\nimport pandas as pd\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\n#Path of the file\r\ndata = pd.read_csv(path)\r\ndata.rename(columns={\"Total\":\"Total_Medals\"}, inplace=True)\r\ndata.head(10)\r\n#Code starts here\r\n\n\n\n# --------------\n#Code st... | [
[
"pandas.read_csv",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.xticks",
"numpy.where",
"matplotlib.pyplot.ylabel"
]
] |
pjk645/pyGAM | [
"29425798e13651f03c1fd3cc1096071cd752403a",
"29425798e13651f03c1fd3cc1096071cd752403a"
] | [
"pygam/tests/test_GAM_methods.py",
"pygam/utils.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport sys\n\nimport numpy as np\nimport pytest\nimport scipy as sp\n\nfrom pygam import *\n\n\ndef test_LinearGAM_prediction(mcycle_X_y, mcycle_gam):\n \"\"\"\n check that we the predictions we get are correct shape\n \"\"\"\n X, y = mcycle_X_y\n preds = mcycle_gam.predic... | [
[
"scipy.stats.norm.ppf",
"numpy.ones_like",
"numpy.allclose",
"numpy.linspace",
"numpy.abs",
"numpy.isfinite",
"numpy.arange",
"numpy.random.randn"
],
[
"numpy.linspace",
"numpy.asarray",
"numpy.max",
"numpy.zeros_like",
"scipy.sparse.issparse",
"numpy.un... |
NCBI-Hackathons/RNAseq_Cancer_Biomarkers | [
"4ad41888f6546f400a451633f964ed7999a05ad8"
] | [
"scripts/cm_work/model_feature_importance.py"
] | [
"from model_blender import important_gene_mask\nfrom sklearn.metrics import log_loss\nimport numpy as np\n\ndef gene_weight_finder(model, X_train, X_test, y_train, y_test):\n \"\"\"\n function that returns the most important features, weights and # of features\n\n inputs\n -------\n model: tree based... | [
[
"numpy.argsort",
"sklearn.metrics.log_loss"
]
] |
Dragoncall/GPflowOpt | [
"f1c268e6b5dc4d7f458e06c59095901d55b73c32"
] | [
"gpflowopt/domain.py"
] | [
"# Copyright 2017 Joachim van der Herten\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.arange",
"numpy.atleast_1d",
"numpy.atleast_2d",
"numpy.array",
"numpy.sum",
"numpy.isclose"
]
] |
AprilXiaoyanLiu/whitenoise-system | [
"0e94d2cc8114b97a61d5d2e45278428f91f1e687",
"0e94d2cc8114b97a61d5d2e45278428f91f1e687",
"0e94d2cc8114b97a61d5d2e45278428f91f1e687"
] | [
"synth/snsynth/pytorch/nn/privacy_utils.py",
"sql/tests/query/test_having.py",
"synth/snsynth/mwem.py"
] | [
"import torch\nimport torch.nn as nn\nimport math\nimport numpy as np\n\n\ndef weights_init(m):\n if type(m) == nn.Linear:\n nn.init.xavier_uniform_(m.weight)\n\n\ndef pate(data, teachers, lap_scale, device=\"cpu\"):\n \"\"\"PATE implementation for GANs.\n \"\"\"\n num_teachers = len(teachers)\n ... | [
[
"torch.abs",
"torch.Tensor",
"torch.sum",
"torch.exp",
"torch.nn.init.xavier_uniform_",
"torch.clamp",
"torch.DoubleTensor"
],
[
"pandas.read_csv",
"numpy.mean"
],
[
"numpy.hstack",
"numpy.unravel_index",
"numpy.random.choice",
"numpy.asarray",
"nump... |
DewanshuHaswani/fastai | [
"fa3aed62e9f7b842d335a92aa20fa7e1b2a7b266"
] | [
"mnist_pytorch/previewer.py"
] | [
"import torch\nimport matplotlib.pyplot as plt\nfrom torchvision import datasets, transforms\nfrom random import choice\n\nBATCH_SIZE=64\n\n# Load the mnist dataset\ntrain_loader = torch.utils.data.DataLoader(\n datasets.MNIST(\n \"./data\", \n train=True,\n download=True,\n ... | [
[
"matplotlib.pyplot.show"
]
] |
kaniblu/vhda | [
"35941097ef552568c29f66cc55d8ce1927f34978",
"35941097ef552568c29f66cc55d8ce1927f34978"
] | [
"loopers/inferencer/evaluator.py",
"embeds/fasttext.py"
] | [
"__all__ = [\"EvaluatingInferencer\"]\n\nfrom dataclasses import dataclass\nfrom typing import Sequence\n\nimport torch\nimport torch.utils.data as td\n\nimport utils\nfrom datasets import BatchData\nfrom .inferencer import Inferencer\nfrom evaluators import FinegrainedEvaluator\n\n\n@dataclass\nclass EvaluatingInf... | [
[
"torch.no_grad"
],
[
"numpy.fromstring"
]
] |
shamim-hussain/egt | [
"02187de16fcd672b8070191d29e9c9e7f681eb37",
"02187de16fcd672b8070191d29e9c9e7f681eb37",
"02187de16fcd672b8070191d29e9c9e7f681eb37"
] | [
"lib/base/xformer_layers/attention.py",
"lib/training/schemes/tsp/svd.py",
"lib/training/training_base.py"
] | [
"\nimport tensorflow as tf\ntfk = tf.keras\nfrom .shaping import move_dim\n\n\n\ndef move_ch2h(maybe_headed_tensor,\n channels_dim=-1, head_dim=1):\n if maybe_headed_tensor.shape.rank == 4:\n return move_dim(maybe_headed_tensor,\n from_dim=channels_dim,\n ... | [
[
"tensorflow.clip_by_value",
"tensorflow.matmul",
"tensorflow.nn.softmax",
"tensorflow.reduce_max",
"tensorflow.reduce_mean",
"tensorflow.shape",
"tensorflow.linalg.band_part",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.ones",
"tensorflow.math.log",
"ten... |
theislab/AutoGeneS | [
"22bde0d5eba013e90edb85341e0bd9c28b82e7fd"
] | [
"autogenes/core.py"
] | [
"import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom .ga import GeneticAlgorithm\n\nfrom . import objectives as ga_objectives\n\nimport deap\nimport warnings\n\nclass AutoGeneS:\n\n PLOT_PARAMS = {\n 'small': {\n 'figsize': (10,5),\n 'all_ms': 8,\n ... | [
[
"matplotlib.pyplot.legend",
"numpy.abs",
"numpy.isfinite",
"matplotlib.pyplot.figure",
"pandas.DataFrame",
"matplotlib.pyplot.plot",
"numpy.max",
"numpy.argmax",
"matplotlib.pyplot.xlabel",
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
gargraghav/tensorflow | [
"a0ea36b9dffc563deae6fa9e2f4d2ca912a3a224"
] | [
"Learning Tensorflow/Examples/handwrittendigit_classifier.py"
] | [
"import tensorflow as tf\nimport time\nfrom tensorflow.examples.tutorials.mnist import input_data\nimport matplotlib.pyplot as plt\n\nbeginTime=time.time()\nmnist = input_data.read_data_sets(\"MNIST_data/\", one_hot=True)\n\nlearning_rate = 0.01\ntraining_iterations = 30\nbatch_size = 100\ndisplay_step = 2\n\nx = t... | [
[
"tensorflow.matmul",
"tensorflow.summary.FileWriter",
"tensorflow.zeros",
"tensorflow.cast",
"tensorflow.placeholder",
"matplotlib.pyplot.subplots",
"tensorflow.global_variables_initializer",
"tensorflow.train.GradientDescentOptimizer",
"tensorflow.summary.merge_all",
"tens... |
AI-Mart/PaddleNLP | [
"0ababea960427e8b70220ea06d908ed58cbed0ed"
] | [
"examples/language_model/gpt-3/static/run_pretrain_static.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.random.seed"
]
] |
ozcelikfu/IC-GAN_fMRI_Reconstruction | [
"31b0dc7659afbf8d12b1e460a38ab6d8d9a4296c"
] | [
"KamitaniData/kamitani_data_handler.py"
] | [
"\nfrom scipy.io import loadmat\nimport numpy as np\nimport pandas as pd\nimport sklearn.preprocessing\nfrom sklearn import preprocessing\n\n\nclass kamitani_data_handler():\n \"\"\"Generate batches for FMRI prediction\n frames_back - how many video frames to take before FMRI frame\n frames_forward - how m... | [
[
"pandas.read_csv",
"numpy.abs",
"numpy.in1d",
"scipy.io.loadmat",
"numpy.nan_to_num",
"numpy.logical_or",
"numpy.sign",
"numpy.max",
"numpy.mean",
"numpy.array",
"sklearn.preprocessing.LabelEncoder",
"numpy.zeros"
]
] |
Pluto9th/ctapipe | [
"8c4faa674a1949210cbda8cb9e2413dd6362afea",
"8c4faa674a1949210cbda8cb9e2413dd6362afea"
] | [
"ctapipe/reco/tests/test_energy_regressor.py",
"ctapipe/tools/plot_charge_resolution.py"
] | [
"from tempfile import TemporaryDirectory\n\nimport numpy as np\nfrom numpy.testing import assert_allclose\n\nfrom astropy import units as u\n\nfrom ctapipe.reco.energy_regressor import EnergyRegressor\n\n\ndef test_prepare_model():\n cam_id_list = [\"FlashCam\", \"ASTRICam\"]\n feature_list = {\"FlashCam\": [... | [
[
"numpy.array",
"numpy.random.seed",
"numpy.testing.assert_allclose"
],
[
"numpy.arange"
]
] |
lucasiscovici/plotly_py | [
"42ab769febb45fbbe0a3c677dc4306a4f59cea36",
"42ab769febb45fbbe0a3c677dc4306a4f59cea36"
] | [
"plotly_study/tests/test_orca/test_sg_scraper.py",
"plotly_study/tests/test_io/test_renderers.py"
] | [
"import plotly_study\nimport os\nimport shutil\nimport pytest\n\n\n# Fixtures\n# --------\n@pytest.fixture()\ndef setup():\n # Reset orca state\n plotly_study.io.orca.config.restore_defaults(reset_server=False)\n\n\nhere = os.path.dirname(os.path.abspath(__file__))\n\n\n# Run setup before every test function ... | [
[
"numpy.random.randn"
],
[
"numpy.array"
]
] |
guilhermemg/trace-links-tc-br | [
"965cb57d17057d1c9c3841c4aba01e72cf008cab"
] | [
"modules/models_runner/tc_br_models_runner.py"
] | [
"import pandas as pd\nimport numpy as np\n\nfrom sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer\n\nfrom modules.utils import plots\nfrom modules.utils import firefox_dataset_p2 as fd\nfrom modules.utils import tokenizers as tok\nfrom modules.utils import aux_functions\n\nfrom modules.models... | [
[
"sklearn.feature_extraction.text.TfidfVectorizer",
"pandas.DataFrame"
]
] |
kumasento/gconv-prune | [
"f81c417d3754102c902bd153809130e12607bd7d",
"f81c417d3754102c902bd153809130e12607bd7d"
] | [
"evaluation/early_stage/prune.py",
"evaluation/early_stage/export.py"
] | [
"\"\"\" Pruning a pre-trained model by GSP.\n\nAuthor: Ruizhe Zhao\nDate: 12/02/2019\n\nThe work-flow of this script:\n- load a pre-trained model (suffixed by 'm')\n- compute the mask based on weights\n- fine-tune the model\n\n\"\"\"\n\nimport os\nimport sys\nimport argparse\nimport copy\nimport time\nimport shutil... | [
[
"torch.cuda.is_available"
],
[
"torch.cuda.is_available"
]
] |
wj-Mcat/Paddle | [
"0a931106008f4174a8556aa4a4b9f23167c33f4d"
] | [
"python/paddle/fluid/reader.py"
] | [
"# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"numpy.asarray"
]
] |
krishna1401/Digital-Image-Processing | [
"47a4da4bef9d08708ac84174b0fcd0ced6a8b5e2"
] | [
"edgeDetection.py"
] | [
"#Perform Edge Detection using Roberts Cross Gradient & Sobel Operators over an Image\n\nimport cv2\nimport math\nimport numpy as np\n\ndef robertCrossGradient(image):\n\t#Objective: Performing Robert Cross Gradient Edge Detection over an Image\n\t#Input: Original Image\n\t#Output: Resultant Image\n\t\n\t#Robert Cr... | [
[
"numpy.insert"
]
] |
strawberryfg/xraygan | [
"047474b0244e530f78b28db67564304cff692f5e"
] | [
"full_code/test_apr27.py"
] | [
"import os\nos.environ['KMP_DUPLICATE_LIB_OK']='True'\nimport math\nimport numpy as np\nfrom scipy import linalg\nfrom os import path as osp\nimport cv2\nimport random\nimport matplotlib.pyplot as plt\nimport pdb\n\n#0. torch imports\nimport torch\nfrom torch.utils.data import DataLoader,Dataset\nfrom torch import ... | [
[
"torch.max",
"torch.load",
"torch.zeros",
"torch.cat",
"torch.randperm",
"torch.sum",
"torch.nn.parallel.parallel_apply.get_a_var",
"torch.set_grad_enabled",
"torch.no_grad",
"torch.cuda.is_available",
"torch.flatten",
"torch.device",
"torch.is_grad_enabled",
... |
Yongtae723/88_face | [
"7a761cb277be2a28984161be1e7ae2b73cadf085"
] | [
"wtfml/data_loaders/pl_data_module/data_module.py"
] | [
"import pytorch_lightning as pl\nfrom torch.utils.data import DataLoader\n\n\nclass plDataModule(pl.LightningDataModule):\n def __init__(\n self,\n train_dataset,\n val_dataset,\n test_dataset=None,\n num_workers=2,\n train_sampler=None,\n train_shuffle=True,\n ... | [
[
"torch.utils.data.DataLoader"
]
] |
aimalz/justice | [
"2edcb471cd01d6659a498bcd0209cb5dae83375a",
"2edcb471cd01d6659a498bcd0209cb5dae83375a"
] | [
"justice/summarize.py",
"justice/features/dense_extracted_features.py"
] | [
"\"\"\"Tools for summarizing lightcurve data into statistics\"\"\"\n\nimport numpy as np\nimport scipy.optimize as spo\nfrom tensorflow.contrib.framework import nest\n\nfrom justice import lightcurve\nfrom justice import xform\n\n\ndef opt_alignment(\n lca: lightcurve._LC,\n lcb: lightcurve._LC,\n ivals=No... | [
[
"numpy.array",
"scipy.optimize.minimize"
],
[
"tensorflow.clip_by_value",
"tensorflow.fill",
"tensorflow.concat",
"tensorflow.stack",
"tensorflow.expand_dims",
"tensorflow.exp",
"tensorflow.where",
"numpy.array",
"tensorflow.sequence_mask",
"tensorflow.tile"
]... |
nilkeshpatra/kmodes | [
"f4b5582e7bb872b15ec4e2c135fd40bd42642e83"
] | [
"kmodes/kprototypes.py"
] | [
"\"\"\"\nK-prototypes clustering for mixed categorical and numerical data\n\"\"\"\n\n# pylint: disable=super-on-old-class,unused-argument,attribute-defined-outside-init\n\nfrom collections import defaultdict\n\nimport numpy as np\nfrom scipy import sparse\nfrom sklearn.externals.joblib import Parallel, delayed\nfro... | [
[
"scipy.sparse.issparse",
"sklearn.utils.validation.check_array",
"sklearn.externals.joblib.Parallel",
"numpy.asarray",
"sklearn.externals.joblib.delayed",
"numpy.argwhere",
"numpy.atleast_2d",
"numpy.std",
"numpy.asanyarray",
"numpy.argmin",
"numpy.mean",
"numpy.iin... |
anuragphadnis/im2latex2 | [
"3e5bcb400d7bdff9cfd8ed03b821b3b6cb809b9b",
"3e5bcb400d7bdff9cfd8ed03b821b3b6cb809b9b",
"a54a6c7208b9258218538a4d56c3a3bd3bed2ca8"
] | [
"model/utils/text.py",
"model/evaluation/text.py",
"model/decoder.py"
] | [
"import numpy as np\nfrom collections import Counter\n\n\nclass Vocab(object):\n\n def __init__(self, config):\n self.config = config\n self.load_vocab()\n\n\n def load_vocab(self):\n special_tokens = [self.config.unk, self.config.pad, self.config.end]\n self.tok_to_id = load_tok_t... | [
[
"numpy.asarray"
],
[
"numpy.array_equal"
],
[
"tensorflow.nn.l2_normalize",
"tensorflow.concat",
"tensorflow.nn.embedding_lookup",
"tensorflow.shape",
"tensorflow.reshape",
"tensorflow.contrib.rnn.LSTMCell",
"tensorflow.variable_scope",
"tensorflow.random_uniform",
... |
Devanthro/ball_in_socket_estimator | [
"5793db2dfd22b693c082694c2130a16c92164d70"
] | [
"python_old/magnetic_field_simulation.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nfrom magpylib.source.magnet import Box,Cylinder\nfrom magpylib import Collection, displaySystem, Sensor\nfrom scipy.optimize import fsolve, least_squares\nimport matplotlib.animation as manimation\nimport random\nimport MDAnalysis\nimport MDAnalysis.visualizatio... | [
[
"numpy.log",
"numpy.linspace",
"scipy.optimize.least_squares",
"numpy.array",
"numpy.meshgrid",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
niksell/phenotypes-prediction-using-genotypes-Master-Thesis | [
"c20b6ef89d0979d15266ad572c5aed56e28c4229"
] | [
"code/IO/Output.py"
] | [
"import os.path\nimport time\nimport numpy as np\nfrom DataStructure.PatientPhenotype import PatientPhenotype\nfrom DataStructure.Snp import Snp\n\nclass Output:\n \n def __init__(self,path,numberOfChromosomes):\n \n self.__path = path\n self.__numberOfChromosomes = numberOfChromosomes\n ... | [
[
"numpy.zeros"
]
] |
HugoSenetaire/vaeac | [
"451d34dd4986c52f2f37c508f03ee3db9e7408d3"
] | [
"fashion_mnist_dropout01/model.py"
] | [
"from torch import nn\nfrom torch.optim import Adam\n\nfrom mask_generators import ImageMaskGenerator, DropoutMaskGenerator\nfrom nn_utils import ResBlock, MemoryLayer, SkipConnection\nfrom prob_utils import normal_parse_params, GaussianLoss\n\n\n# sampler from the model generative distribution\n# here we return me... | [
[
"torch.optim.Adam",
"torch.nn.Conv2d",
"torch.nn.AvgPool2d",
"torch.nn.Upsample",
"torch.nn.LeakyReLU",
"torch.nn.BatchNorm2d"
]
] |
ncduy0303/fairseq | [
"a086afb15b7d1737cd98831e975fd21b14ef6b07"
] | [
"fairseq/modules/conformer_layer.py"
] | [
"# 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\n\nimport torch\nfrom typing import Optional\nfrom fairseq.modules import (\n LayerNorm,\n MultiheadAttention,\n ESPNETMulti... | [
[
"torch.nn.BatchNorm1d",
"torch.nn.Dropout",
"torch.nn.GLU",
"torch.nn.Linear",
"torch.nn.Conv1d"
]
] |
robertmacdavid/approx-upf | [
"3f6da80226f94b175afe0c9d463fa38abfd743b9"
] | [
"python/lookup_tables.py"
] | [
"from typing import List, Callable, Dict, Tuple, Union\n\nimport math\nimport matplotlib.pyplot as plt\n\n\nclass ApproxMultiplicationTable:\n \"\"\"\n Multiplication done using a lookup table instead of a math unit\n \"\"\"\n table_entries: Dict[Tuple[int, int], int]\n num_significant_bits: int\n\n ... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] |
A-Quarter-Mile/Muskits | [
"60d80727d2ec6b8ec405502d67796e8df319ea82",
"60d80727d2ec6b8ec405502d67796e8df319ea82",
"60d80727d2ec6b8ec405502d67796e8df319ea82",
"60d80727d2ec6b8ec405502d67796e8df319ea82"
] | [
"muskit/layers/conformer/convolution.py",
"muskit/torch_utils/nets_utils.py",
"muskit/tasks/abs_task.py",
"muskit/svs/gst/style_encoder.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# Copyright 2020 Johns Hopkins University (Shinji Watanabe)\n# Northwestern Polytechnical University (Pengcheng Guo)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\n\"\"\"ConvolutionModule definition.\"\"\"\n\nfrom torch import nn\n\... | [
[
"torch.nn.BatchNorm1d",
"torch.nn.ReLU",
"torch.nn.functional.glu",
"torch.nn.Conv1d"
],
[
"torch.sum",
"torch.from_numpy",
"numpy.ones",
"torch.arange",
"numpy.array"
],
[
"torch.cuda.set_device",
"torch.autograd.set_detect_anomaly",
"torch.load",
"nump... |
kunal-mulki/Materials | [
"b76bba123002972e4063b9b24cd5dc3d980e16e9"
] | [
"Code/Python/bootcamp_examples.py"
] | [
"\"\"\"\nExamples for Data Bootcamp course (data input and graphics)\n\n**Warning**\nWeb data access will change in the near future, when Pandas spins\noff the web access tools into a new package.\nhttp://pandas.pydata.org/pandas-docs/stable/remote_data.html\n\nRepository of materials (including this file):\n* http... | [
[
"matplotlib.pyplot.legend",
"pandas.read_excel",
"matplotlib.pyplot.axvline",
"matplotlib.pyplot.title",
"pandas.io.data.DataReader",
"pandas.io.data.Options",
"matplotlib.pyplot.get_cmap",
"pandas.io.wb.download",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"... |
Vincent34/mindspore | [
"fcb2ec2779b753e95c762cf292b23bd81d1f561b",
"fcb2ec2779b753e95c762cf292b23bd81d1f561b",
"fcb2ec2779b753e95c762cf292b23bd81d1f561b",
"a39a60878a46e7e9cb02db788c0bca478f2fa6e5",
"a39a60878a46e7e9cb02db788c0bca478f2fa6e5",
"a39a60878a46e7e9cb02db788c0bca478f2fa6e5",
"a39a60878a46e7e9cb02db788c0bca478f2fa6e... | [
"tests/ut/python/dataset/test_vocab.py",
"model_zoo/official/cv/ctpn/src/ctpn.py",
"tests/st/control/inner/test_111_if_after_if_in_while.py",
"model_zoo/official/nlp/cpm/src/lr_schedule.py",
"tests/st/auto_monad/test_auto_monad_mindtester.py",
"model_zoo/research/cv/StarGAN/export.py",
"mindspore/nn/met... | [
"# Copyright 2020-2021 Huawei Technologies Co., Ltd\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 applica... | [
[
"numpy.array",
"numpy.dtype"
],
[
"numpy.random.uniform",
"numpy.zeros"
],
[
"numpy.array"
],
[
"numpy.array"
],
[
"numpy.abs",
"numpy.allclose",
"numpy.isnan",
"numpy.full",
"numpy.random.randn",
"numpy.count_nonzero",
"numpy.array"
],
[
... |
kngwyu/infomax-option-critic | [
"9d907c041c1d0280db9b23eb2fdf9e0033e33bf3"
] | [
"src/option_select_impl.py"
] | [
"\"\"\" Implemenation of uncertainty-aware option selection\n\"\"\"\n\n\nfrom abc import ABC, abstractmethod\nfrom typing import Tuple\n\nimport torch\n\nfrom torch import BoolTensor, LongTensor, Tensor\nfrom torch.distributions import Categorical\n\nfrom rainy.net.policy import BernoulliPolicy\n\n\ndef _debug_minm... | [
[
"torch.zeros_like",
"torch.where"
]
] |
nathanielbunch/Nonstationary-Bandit-Problem-on-a-Quantum-Computer | [
"af9d4f508a42790249007d5237a2c0ee8b93e30a",
"af9d4f508a42790249007d5237a2c0ee8b93e30a"
] | [
"Classical/Bandit Problem/k-armed-bandit_non_stationary.py",
"Classical/QLearning/q_learning_neural_network.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport random\nimport sys\n\nclass KBanditProblem:\n \n def __init__(self, k, stationary=True):\n self.k = k\n self.stationary = stationary\n self.values = np.random.normal(loc=0.0, scale=1, size=k)\n self.optimal = self.values.... | [
[
"matplotlib.pyplot.plot",
"numpy.random.normal",
"numpy.append",
"numpy.mean",
"numpy.array",
"matplotlib.pyplot.show"
],
[
"tensorflow.matmul",
"tensorflow.placeholder",
"numpy.max",
"tensorflow.initialize_all_variables",
"tensorflow.reset_default_graph",
"tens... |
Alwaysproblem/examples-1 | [
"9754fa63ed1931489a21ac1f5b299f945e369a5c",
"9754fa63ed1931489a21ac1f5b299f945e369a5c",
"9754fa63ed1931489a21ac1f5b299f945e369a5c",
"9754fa63ed1931489a21ac1f5b299f945e369a5c",
"9754fa63ed1931489a21ac1f5b299f945e369a5c",
"9754fa63ed1931489a21ac1f5b299f945e369a5c",
"9754fa63ed1931489a21ac1f5b299f945e369a5... | [
"applications/tensorflow/cnns/models/resnet.py",
"applications/popart/bert/tests/unit/pytorch/nsp_test.py",
"code_examples/tensorflow/sharding/simple_sharding.py",
"applications/tensorflow/cnns/test_densenet.py",
"code_examples/tensorflow2/imdb/imdb_single_ipu.py",
"applications/tensorflow/cnns/training/v... | [
"# Copyright (c) 2019 Graphcore Ltd. 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 ... | [
[
"tensorflow.compat.v1.strided_slice",
"tensorflow.python.ipu.normalization_ops.group_norm",
"tensorflow.compat.v1.reduce_mean",
"tensorflow.compat.v1.get_variable",
"tensorflow.compat.v1.nn.xw_plus_b",
"tensorflow.compat.v1.zeros_initializer",
"tensorflow.compat.v1.nn.conv2d",
"ten... |
filangel/Eigenfaces | [
"55ddb705611ee351cc856d5a927a4dc82acaff03",
"55ddb705611ee351cc856d5a927a4dc82acaff03"
] | [
"src/app_a.py",
"src/svm_ovo.py"
] | [
"# matplotlib backtest for missing $DISPLAY\nimport matplotlib\nmatplotlib.use('Agg')\n\n# scientific computing library\nimport numpy as np\n\n# visualization tools\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n# prettify plots\nplt.rcParams['figure.figsize'] = [8.0, 6.0]\nsns.set_palette(sns.color_pal... | [
[
"numpy.dot",
"numpy.arange",
"matplotlib.use",
"numpy.linalg.eig",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.get_cmap",
"numpy.concatenate",
"numpy.apply_along_axis",
"numpy.argsort",
"numpy.sum",
"numpy.random.randint"
],
[
... |
shkarupa-alex/tfmiss | [
"4fe1bb3a47327c07711f910ee53319167032b6af",
"4fe1bb3a47327c07711f910ee53319167032b6af",
"4fe1bb3a47327c07711f910ee53319167032b6af"
] | [
"tfmiss/text/wordpiecelib.py",
"tfmiss/text/unicode_transform.py",
"tfmiss/keras/losses/bitemp.py"
] | [
"# Taken from https://raw.githubusercontent.com/tensorflow/text/v2.5.0/tensorflow_text/tools/wordpiece_vocab/wordpiece_tokenizer_learner_lib.py\n#\n# coding=utf-8\n# Copyright 2021 TF.Text Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in complia... | [
[
"numpy.reshape"
],
[
"tensorflow.name_scope",
"tensorflow.python.ops.ragged.ragged_tensor.convert_to_tensor_or_ragged_tensor"
],
[
"tensorflow.convert_to_tensor",
"tensorflow.concat",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"tensorflow.equal",
"tensorflow.cast",
... |
abhi12ravi/iwpa | [
"ebe133412b7ef24453e090b6b44d8d78a540c384"
] | [
"scripts/make_predictions.py"
] | [
"import lazypredict\nimport sys\nimport numpy as np\nnp.set_printoptions(threshold=sys.maxsize)\n\n#Read data file\n\nimport pandas as pd\n\nfilepath = \"dataset/trial_1200/balanced_dataset2.csv\"\ndf = pd.read_csv(filepath)\nfeatures = df\n\n# Labels are the values we want to predict\nlabels = np.array(df['protect... | [
[
"numpy.array",
"numpy.set_printoptions",
"pandas.read_csv",
"sklearn.model_selection.train_test_split"
]
] |
oz123/python-nvd3 | [
"fd4998549542343b74b82ca72cbcee97845b06ee"
] | [
"examples/lineChartXY.py"
] | [
"#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nExamples for Python-nvd3 is a Python wrapper for NVD3 graph library.\nNVD3 is an attempt to build re-usable charts and chart components\nfor d3.js without taking away the power that d3.js gives you.\n\nProject location : https://github.com/areski/python-nvd3\n\... | [
[
"numpy.linspace",
"numpy.sin"
]
] |
furgerf/GAN-for-dermatologic-imaging | [
"e90b06c46c7693e984a4c5b067e18460113cd23b",
"e90b06c46c7693e984a4c5b067e18460113cd23b"
] | [
"src/perceptual_scores.py",
"src/two_way_evaluation.py"
] | [
"#!/usr/bin/env python\n\nimport os\n\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras.models import Model\nfrom scipy.misc import imread\nfrom sklearn.cluster import KMeans\nfrom sklearn.decomposition.pca import PCA\nfrom tqdm import tqdm\n\nfrom utils import (kernel_classifier_distance_and_std_... | [
[
"tensorflow.contrib.gan.eval.frechet_classifier_distance_from_activations",
"tensorflow.keras.applications.resnet50.ResNet50",
"tensorflow.convert_to_tensor",
"tensorflow.concat",
"sklearn.cluster.KMeans",
"sklearn.decomposition.pca.PCA",
"tensorflow.reduce_mean",
"tensorflow.loggi... |
cloudspectatordevelopment/cudamat | [
"d26cf019a7855077b7d4344ae1a3202a156c5170"
] | [
"test/test_cudamat.py"
] | [
"import numpy as np\nimport nose\nimport cudamat as cm\n\ndef setup():\n cm.cublas_init()\n\ndef teardown():\n cm.cublas_shutdown()\n\ndef test_reshape():\n m = 256\n n = 1\n cm1 = np.array(np.random.rand(n, m)*10, dtype=np.float32, order='F')\n cm2 = np.array(np.random.rand(m, n)*10, dtype=np.flo... | [
[
"numpy.dot",
"numpy.minimum",
"numpy.sqrt",
"numpy.zeros_like",
"numpy.random.randn",
"numpy.mean",
"numpy.exp",
"numpy.where",
"numpy.log",
"scipy.special.gamma",
"numpy.random.rand",
"scipy.special.gammaln",
"numpy.tanh",
"numpy.array",
"numpy.sum",
... |
shun60s/BipedalWalkerHardcore-Weights-Choice | [
"76a3df3585a13881f1754274b8ded73a054d551d"
] | [
"train.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n-----------------------------------------------------------------------------\n Copyright 2017 David Griffis\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 t... | [
[
"torch.cuda.manual_seed",
"torch.zeros",
"torch.manual_seed",
"torch.from_numpy",
"torch.cuda.device",
"torch.autograd.Variable"
]
] |
shahad-bit/Disaster-Response-Pipeline | [
"76a86db14845c8d8ba8d87c81112580c96b2b0d4"
] | [
"data/process_data.py"
] | [
"import sys\nimport pandas as pd\nfrom sqlalchemy import create_engine\n\ndef load_data(messages_filepath, categories_filepath):\n \"\"\"Load disaster messages and categories from csv files.\n \n Arguments:\n messages_filepath {String} -- disaster message file path\n categories_filepath {Stri... | [
[
"pandas.concat",
"pandas.read_csv"
]
] |
adesgautam/objdet | [
"7154bd5035dd51de8a49b7ae59b65277a1727263"
] | [
"yolov3/yolo_detection/yolo_files/Utils/yolo3/model.py"
] | [
"\"\"\"YOLO_v3 Model Defined in Keras.\"\"\"\n\nfrom functools import wraps\n\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.python.ops import control_flow_ops\nimport keras\nfrom keras import backend as K\nfrom keras.layers import Conv2D, Add, ZeroPadding2D, UpSampling2D, Concatenate, MaxPooling2D\n... | [
[
"tensorflow.boolean_mask",
"numpy.expand_dims",
"numpy.maximum",
"numpy.minimum",
"tensorflow.image.non_max_suppression",
"tensorflow.python.ops.control_flow_ops.while_loop",
"numpy.argmax",
"numpy.floor",
"numpy.array"
]
] |
dipjyoti92/WaveRNN | [
"43c170dac7f6f27697fa4f04d44731f744c27fb4"
] | [
"gen_tacotron.py"
] | [
"import torch\nfrom models.fatchord_version import WaveRNN\nimport hparams as hp\nfrom utils.text.symbols import symbols\nfrom utils.paths import Paths\nfrom models.tacotron import Tacotron\nimport argparse\nfrom utils.text import text_to_sequence\nfrom utils.display import save_attention, simple_table\n\nif __name... | [
[
"torch.tensor"
]
] |
roycezhou/Anomaly-detection-and-classification-with-deep-learning | [
"12b26f7c6f97a0a5305c653ab36b5272f94696fa",
"12b26f7c6f97a0a5305c653ab36b5272f94696fa"
] | [
"src/anomaly_detection/knn/predict.py",
"src/anomaly_detection/dagmm/solver.py"
] | [
"import sys\r\nimport numpy as np\r\nfrom itertools import product\r\nimport torchvision.transforms as transforms\r\nfrom sklearn.metrics.pairwise import cosine_similarity\r\nfrom Utils.transform import *\r\nfrom Utils.pillowhelper import *\r\n\r\n\r\ndef rowcolumn2coor(row, col, patch_size):\r\n \"\"\" Map row ... | [
[
"sklearn.metrics.pairwise.cosine_similarity"
],
[
"matplotlib.pyplot.legend",
"sklearn.metrics.accuracy_score",
"torch.sum",
"numpy.percentile",
"numpy.concatenate",
"sklearn.metrics.precision_recall_fscore_support",
"matplotlib.pyplot.subplot",
"torch.cuda.is_available",
... |
thanhtung09t2/Hyperbox-classifier | [
"4b4cf9dfae68902bd9a742db421cacce8daf37a4"
] | [
"GFMM/agglo_onlgfmm.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Sep 28 15:41:27 2018\n\n@author: Thanh Tung Khuat\n\nAnother method for serial combination of online learning and agglomerative learning gfmm\n\n Using Agglomerative learning to train a base model, then deploy the trained model for online learning with different t... | [
[
"numpy.round",
"matplotlib.use",
"numpy.array"
]
] |
alcinos/dps | [
"5467db1216e9f9089376d2c71f524ced2382e4f6",
"5467db1216e9f9089376d2c71f524ced2382e4f6",
"5467db1216e9f9089376d2c71f524ced2382e4f6"
] | [
"dps/hyper/parallel_session.py",
"dps/utils/tf.py",
"scripts/iclr_2018/rl_size.py"
] | [
"from __future__ import print_function\nimport os\nimport datetime\nimport subprocess\nfrom future.utils import raise_with_traceback\nimport numpy as np\nimport time\nimport progressbar\nimport shutil\nfrom collections import defaultdict\nimport sys\nimport dill\nfrom zipfile import ZipFile\nfrom contextlib import ... | [
[
"numpy.ceil",
"numpy.floor"
],
[
"numpy.sqrt",
"tensorflow.count_nonzero",
"tensorflow.matrix_band_part",
"tensorflow.control_dependencies",
"tensorflow.reduce_sum",
"tensorflow.variables_initializer",
"tensorflow.train.get_or_create_global_step",
"numpy.ceil",
"ten... |
jiduque/scikit-fda | [
"5ea71e78854801b259aa3a01eb6b154aa63bf54b",
"5ea71e78854801b259aa3a01eb6b154aa63bf54b",
"5ea71e78854801b259aa3a01eb6b154aa63bf54b"
] | [
"tests/test_classification.py",
"skfda/exploratory/depth/multivariate.py",
"skfda/preprocessing/dim_reduction/feature_extraction/_ddg_transformer.py"
] | [
"\"\"\"Tests of classification methods.\"\"\"\n\nimport unittest\n\nimport numpy as np\nfrom sklearn.base import clone\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.neighbors import KNeighborsClassifier as _KNeighborsClassifier\n\nfrom skfda.datasets import fetch_growth\nfrom skfda.misc.metric... | [
[
"sklearn.base.clone",
"numpy.testing.assert_raises",
"sklearn.model_selection.train_test_split",
"sklearn.neighbors.KNeighborsClassifier"
],
[
"numpy.abs",
"numpy.median",
"numpy.sort",
"scipy.special.comb",
"sklearn.base.clone",
"numpy.vectorize",
"numpy.searchsort... |
theglossy1/Minesweeper | [
"9c641310e82e470a4c4e74bf91239f70b9dc7caa"
] | [
"minesweeper.py"
] | [
"import math\nimport random\n\nimport numpy as np\n\nMINE_BIT = 0b01\nFLAG_BIT = 0b10\n\nEMPTY_SLOT = 0xFF\nFLAG_SLOT = 0xFE\n\nSURROUNDING = [\n (1, 0),\n (1, 1),\n (0, 1),\n (-1, 1),\n (-1, 0),\n (-1, -1),\n (0, -1),\n (1, -1),\n]\n\n\nclass Minesweeper:\n def __init__(self, *shape, see... | [
[
"numpy.ndenumerate",
"numpy.zeros",
"numpy.nditer",
"numpy.full"
]
] |
Horacehxw/Multi-label | [
"76095c72327e9aa379eaa653dbbb775ca638e6db"
] | [
"src/LDPC/pyldpc/ldpcmatrices.py"
] | [
"import numpy as np\nfrom scipy.sparse import csr_matrix\nfrom .ldpcalgebra import*\n\n__all__ = ['BinaryProduct', 'InCode', 'BinaryRank','RegularH','CodingMatrix','CodingMatrix_systematic','HtG']\n\n\ndef RegularH(n,d_v,d_c):\n\n \"\"\" ---------------------------------------------------------------------------... | [
[
"scipy.sparse.csr_matrix",
"numpy.ones",
"numpy.concatenate",
"numpy.copy",
"numpy.identity",
"numpy.transpose",
"numpy.zeros"
]
] |
lixuekai2001/ml_for_log_data | [
"1e01c4c6c9a3ee6e20c5cfe8db44029c0aeaedd8"
] | [
"notebooks/c07_Recurrent_Neural_Networks/RNN_Depthseries.py"
] | [
"# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n# jupytext:\n# formats: ipynb,py:light\n# text_representation:\n# extension: .py\n# format_name: light\n# format_version: '1.5'\n# jupytext_version: 1.6.0\n# kernelspec:\n# display_name: deep_ml_curriculum\n# language: python\n... | [
[
"matplotlib.pyplot.legend",
"pandas.Series",
"pandas.DataFrame",
"numpy.concatenate",
"matplotlib.pyplot.plot",
"numpy.mean",
"torch.cuda.is_available",
"sklearn.preprocessing.LabelEncoder",
"numpy.roll",
"matplotlib.pyplot.gca",
"torch.nn.CrossEntropyLoss",
"torch.... |
siyuchen95/madminer | [
"dfcbd7ee26c47dd294610c195fafce15f74c10eb"
] | [
"madminer/utils/ml/trainer.py"
] | [
"from __future__ import absolute_import, division, print_function, unicode_literals\n\nimport six\nimport logging\nfrom collections import OrderedDict\nimport numpy as np\nimport time\nimport torch\nimport torch.optim as optim\nfrom torch.utils.data import Dataset, DataLoader\nfrom torch.utils.data.sampler import S... | [
[
"numpy.isfinite",
"numpy.min",
"torch.isnan",
"torch.utils.data.DataLoader",
"torch.utils.data.sampler.SubsetRandomSampler",
"numpy.random.shuffle",
"torch.from_numpy",
"numpy.max",
"numpy.mean",
"torch.cuda.is_available",
"numpy.floor",
"torch.device",
"numpy.a... |
steven0820/tensorflow | [
"36ebbf1ddc3ed820b7a5572ff4ed8e9bc707b8e5",
"36ebbf1ddc3ed820b7a5572ff4ed8e9bc707b8e5",
"36ebbf1ddc3ed820b7a5572ff4ed8e9bc707b8e5",
"36ebbf1ddc3ed820b7a5572ff4ed8e9bc707b8e5"
] | [
"tensorflow/contrib/learn/python/learn/graph_actions.py",
"tensorflow/contrib/learn/python/learn/estimators/rnn.py",
"tensorflow/python/kernel_tests/concat_op_test.py",
"tensorflow/python/saved_model/example/saved_model_half_plus_two.py"
] | [
"# Copyright 2016 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.training.monitored_session.MonitoredSession",
"tensorflow.python.training.basic_session_run_hooks.StepCounterHook",
"tensorflow.python.platform.tf_logging.error",
"tensorflow.python.training.basic_session_run_hooks.SummarySaverHook",
"tensorflow.python.framework.ops.add_to_c... |
OakCityLabs/numpy | [
"09f5c5a64eb019b3e058c7183ca1ead6190bdbc8"
] | [
"numpy/distutils/system_info.py"
] | [
"#!/usr/bin/env python3\n\"\"\"\nThis file defines a set of system_info classes for getting\ninformation about various resources (libraries, library directories,\ninclude directories, etc.) in the system. Usage:\n info_dict = get_info(<name>)\n where <name> is a string 'atlas','x11','fftw','lapack','blas',\n '... | [
[
"numpy.distutils._shell_utils.NativeParser.split",
"numpy.distutils.log.set_threshold",
"numpy.distutils.misc_util.is_string",
"numpy.distutils.misc_util.get_shared_lib_extension",
"numpy.distutils.misc_util.is_sequence",
"numpy.distutils.log.warn",
"numpy.distutils.exec_command.filepa... |
NVIDIA/Torch-TensorRT | [
"1a22204fecec690bc3c2a318dab4f57b98c57f05",
"1a22204fecec690bc3c2a318dab4f57b98c57f05",
"1a22204fecec690bc3c2a318dab4f57b98c57f05",
"1a22204fecec690bc3c2a318dab4f57b98c57f05"
] | [
"py/torch_tensorrt/fx/test/converters/acc_op/test_eq.py",
"py/torch_tensorrt/fx/test/converters/acc_op/test_embedding.py",
"py/torch_tensorrt/fx/input_tensor_spec.py",
"py/torch_tensorrt/fx/test/converters/acc_op/test_clamp.py"
] | [
"import torch\nimport torch_tensorrt.fx.tracer.acc_tracer.acc_ops as acc_ops\nfrom parameterized import parameterized\nfrom torch.testing._internal.common_utils import run_tests\nfrom torch_tensorrt.fx.tools.common_fx2trt import AccTestCase\n\n\nclass TestEqConverter(AccTestCase):\n @parameterized.expand(\n ... | [
[
"torch.zeros",
"torch.eq",
"torch.randn",
"torch.tensor",
"torch.testing._internal.common_utils.run_tests"
],
[
"torch.nn.functional.embedding",
"torch.randn",
"torch.testing._internal.common_utils.run_tests",
"torch.tensor"
],
[
"torch.device",
"torch.randn"
... |
hbrunie/PeleLM | [
"8b8c07aa1770c07e087f8976b6e16a71de68f751"
] | [
"Exec/RegTests/FlameSheet/pprocConvOrder.py"
] | [
"#!/usr/bin/env python3\n\n# Template post-processing script for PeleLM convergence analysis\n# Must be used after multirun.py script\n# Input are limited by the regression framework.\n\n# Usage:\n# ./pprocConvOrder.py --pproc_exec prog.exe --test_name DummyTest\n\n# Input:\n# * --pproc_exec: the processing exe... | [
[
"matplotlib.pyplot.legend",
"numpy.log",
"matplotlib.pyplot.xscale",
"matplotlib.pyplot.yscale",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.ylabel"
]
] |
Dou-Yu-xuan/deep-learning-visal | [
"da1ebc527d44c8c5a524e757a1d784ba37ec2d5c",
"da1ebc527d44c8c5a524e757a1d784ba37ec2d5c",
"da1ebc527d44c8c5a524e757a1d784ba37ec2d5c",
"da1ebc527d44c8c5a524e757a1d784ba37ec2d5c",
"da1ebc527d44c8c5a524e757a1d784ba37ec2d5c"
] | [
"models/ObjectDetection/FoveaBox.py",
"models/Attention/NonLocalBlock.py",
"models/ClassicNetwork/blocks/non_local_dot_product.py",
"models/ClassicNetwork/csp_densenet.py",
"models/SemanticSegmentation/FisheyeMODNet.py"
] | [
"import torch\nimport torch.nn as nn\nimport torchvision\n\ndef Conv3x3ReLU(in_channels,out_channels):\n return nn.Sequential(\n nn.Conv2d(in_channels=in_channels,out_channels=out_channels,kernel_size=3,stride=1,padding=1),\n nn.ReLU6(inplace=True)\n )\n\ndef locLayer(in_channels,out_channels):\... | [
[
"torch.nn.Sequential",
"torch.nn.ReLU6",
"torch.nn.ConvTranspose2d",
"torch.nn.init.constant_",
"torch.randn",
"torch.nn.Conv2d",
"torch.nn.init.kaiming_normal_"
],
[
"torch.randn",
"torch.nn.Softmax",
"torch.nn.Conv2d",
"torch.matmul"
],
[
"torch.nn.Sequent... |
Flodip/WaterMonitor | [
"5f7d8d6f266d35e7d4dd655e6e47933abb28c697"
] | [
"pimonitor.py"
] | [
"from sense_hat import SenseHat\nimport psycopg2\nimport numpy as np\nimport time\n\nsense = SenseHat()\nsense.set_imu_config(True, False, False) # compass, not gyro, not accel\n\ndatabase = \"watermonitor\"\n\ntry:\n try:\n conn = psycopg2.connect(\n user=\"pi\",\n password=\"piwat... | [
[
"numpy.linalg.norm"
]
] |
csbrasnett/lipid-md | [
"22ac04a01277da7e64e58ba10a1e7a9791393fcc"
] | [
"QIIDcurvature.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\n\nauthor: Chris Brasnett, University of Bristol, christopher.brasnett@bristol.ac.uk\n\n\"\"\"\n\nimport numpy as np\nfrom QIIDderivative import derivative\n\ndef nominator(F_x, F_y, F_z, F_xx, F_xy, F_yy, F_yz, F_zz, F_xz):\n m = np.array([[F_xx, F_xy, F_... | [
[
"numpy.linalg.det",
"numpy.array",
"numpy.linalg.norm"
]
] |
rungjoo/KoreaBERT_description | [
"ad35b14ac8fb65593c0fe987680c2759e47478ab",
"ad35b14ac8fb65593c0fe987680c2759e47478ab"
] | [
"run_squad_debug.py",
"run_squad_korea.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unl... | [
[
"tensorflow.contrib.cluster_resolver.TPUClusterResolver",
"tensorflow.logging.warning",
"tensorflow.FixedLenFeature",
"tensorflow.nn.log_softmax",
"tensorflow.gfile.GFile",
"tensorflow.reduce_sum",
"tensorflow.train.init_from_checkpoint",
"tensorflow.gfile.MakeDirs",
"tensorflo... |
elusenji/transformers | [
"b18dfd95e1f60ae65a959a7b255fc06522170d1b",
"b18dfd95e1f60ae65a959a7b255fc06522170d1b",
"b18dfd95e1f60ae65a959a7b255fc06522170d1b",
"b18dfd95e1f60ae65a959a7b255fc06522170d1b",
"af14c61973effd8b8077ac61b3f24bdd4a632f25"
] | [
"tests/openai/test_modeling_tf_openai.py",
"src/transformers/models/flaubert/modeling_tf_flaubert.py",
"tests/electra/test_modeling_tf_electra.py",
"tests/dpr/test_modeling_tf_dpr.py",
"examples/pytorch/question-answering/run_qa_no_trainer.py"
] | [
"# coding=utf-8\n# Copyright 2020 The HuggingFace Team. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.expand_dims"
],
[
"tensorflow.keras.layers.LayerNormalization",
"tensorflow.convert_to_tensor",
"tensorflow.concat",
"tensorflow.cast",
"tensorflow.gather",
"tensorflow.name_scope",
"tensorflow.tile",
"tensorflow.matmul",
... |
nihalsid/texture_fields | [
"dcd091a5f40fe433dbc47f2055d1cd2d3d2a1b87",
"dcd091a5f40fe433dbc47f2055d1cd2d3d2a1b87"
] | [
"scripts/sample_mesh.py",
"mesh2tex/texnet/generation.py"
] | [
"import argparse\nimport trimesh\nimport numpy as np\nimport os\nimport glob\nimport sys\nfrom multiprocessing import Pool\nfrom functools import partial\n# TODO: do this better\nsys.path.append('..')\n\nparser = argparse.ArgumentParser('Sample a watertight mesh.')\nparser.add_argument('in_folder', type=str,\n ... | [
[
"numpy.array",
"numpy.savez",
"numpy.zeros"
],
[
"torch.linspace",
"torch.from_numpy",
"numpy.random.normal",
"torch.no_grad",
"torch.nn.functional.interpolate",
"torch.stack"
]
] |
chineseocr/table-detect | [
"92488f30ffaf486d29791aab63802beeb1eaca32"
] | [
"table_line.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Sep 9 23:11:51 2020\ntable line detect\n@author: chineseocr\n\"\"\"\n\nfrom tensorflow.keras.layers import Input, concatenate, Conv2D, MaxPooling2D, BatchNormalization, UpSampling2D\nfrom tensorflow.keras.layers import LeakyReLU\nfrom tensorfl... | [
[
"tensorflow.keras.layers.LeakyReLU",
"tensorflow.keras.models.Model",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.UpSampling2D",
"tensorflow.keras.layers.concatenate",
"tensorflow.keras.layers.BatchNormalization",
"numpy.array",
"tensorflow.keras.layers.MaxPooling2D"... |
OmerMughal31/RetinaNet_modified | [
"207ec4fba35ef390af42fa0266ae95b86ecb9b08"
] | [
"keras_retinanet/bin/train.py"
] | [
"#!/usr/bin/env python\n\n\"\"\"\nCopyright 2017-2018 Fizyr (https://fizyr.com)\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless ... | [
[
"tensorflow.device"
]
] |
Jie-Yuan/Torchappy | [
"e722db1085fa2ff8e0267f7e6745875531c00f8b"
] | [
"models/lr.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom tqdm import tqdm, tqdm_notebook\nfrom ml_metrics import auc\nfrom sklearn.datasets import make_classification\n\n\nclass LogsticRegression(nn.Module):\n def __init__(self, in_dim, n_class):\n super().__init__()\n self.fc1 =... | [
[
"torch.nn.Linear",
"torch.nn.functional.softmax",
"sklearn.datasets.make_classification",
"torch.nn.modules.loss.CrossEntropyLoss"
]
] |
Jebediah/libwave | [
"c04998c964f0dc7d414783c6e8cf989a2716ad54"
] | [
"wave_utils/scripts/plot_matrix.py"
] | [
"import sys\nimport numpy as np\nimport matplotlib.pylab as plt\n\n\nif __name__ == \"__main__\":\n file = open(sys.argv[1], \"r\")\n X = np.loadtxt(file)\n X = np.matrix(X)\n print(X.shape)\n\n fig, ax = plt.subplots()\n cax = ax.matshow(X)\n ax.set_xticks(range(0, X.shape[1]))\n ax.set_yti... | [
[
"numpy.matrix",
"matplotlib.pylab.show",
"matplotlib.pylab.subplots",
"numpy.loadtxt"
]
] |
jinzhuoran/CogKGE | [
"b0e819a1d34cf61a7d70c33808da3377b73c8fd6",
"70d851d6489600c1e90eb25b0388a3ceba2f078c",
"b0e819a1d34cf61a7d70c33808da3377b73c8fd6",
"b0e819a1d34cf61a7d70c33808da3377b73c8fd6"
] | [
"cogkge/modules/gnn/helper.py",
"cogkge/modules/gnn/gat.py",
"examples/eventkg240k/example_eventkg240k_transh.py",
"tests/test_fb15k_run_transe.py"
] | [
"import numpy as np, sys, os, random, pdb, json, uuid, time, argparse\nfrom pprint import pprint\nimport logging, logging.config\nfrom collections import defaultdict as ddict\n# from ordered_set import OrderedSet\n\n# PyTorch related imports\nimport torch\nfrom torch.nn import functional as F\nfrom torch.nn.init im... | [
[
"torch.Tensor",
"numpy.set_printoptions",
"torch.nn.init.xavier_normal_",
"torch.rfft",
"torch.nonzero",
"torch.fft.rfft2",
"torch.stack",
"torch.complex"
],
[
"torch.nn.functional.softmax",
"torch.nn.functional.log_softmax",
"torch.nn.functional.dropout",
"torc... |
chenxiaoyu523/FEAT3D | [
"ba45ba7c26628a7cc0070b010f4f33893cdac926"
] | [
"train_matchnet.py"
] | [
"import argparse\nimport os.path as osp\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom torch.utils.data import DataLoader\nfrom feat.dataloader.samplers import CategoriesSampler\nfrom feat.models.matchnet import MatchNet \nfrom feat.utils import pprint, set_gpu, ensure_path, Averager, Ti... | [
[
"torch.zeros",
"torch.load",
"torch.nn.functional.cross_entropy",
"torch.utils.data.DataLoader",
"torch.no_grad",
"torch.cuda.is_available",
"torch.arange",
"numpy.zeros",
"torch.optim.lr_scheduler.StepLR"
]
] |
AutodidactaMx/cocid_python | [
"11628f465ff362807a692c79ede26bf30dd8e26a",
"11628f465ff362807a692c79ede26bf30dd8e26a",
"11628f465ff362807a692c79ede26bf30dd8e26a"
] | [
"Modulo_3/Semana 4/matplotlib/practica4.py",
"Modulo_3/Semana 4/matplotlib/practica2.py",
"Modulo_5/practica_sabado/Operaciones.py"
] | [
"import tkinter as tk\nimport matplotlib.pyplot as plt\nfrom matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk\n\ndata = {\n 'Basquet': 11,\n 'Futbol': 222,\n 'Natacion': 121,\n 'Esqui': 321,\n 'Tenis': 44\n }\nclave = data... | [
[
"matplotlib.backends.backend_tkagg.NavigationToolbar2Tk",
"matplotlib.pyplot.Figure",
"matplotlib.backends.backend_tkagg.FigureCanvasTkAgg"
],
[
"matplotlib.backends.backend_tkagg.NavigationToolbar2Tk",
"matplotlib.pyplot.Figure",
"matplotlib.backends.backend_tkagg.FigureCanvasTkAgg"
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.