repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
ruobop/InsightFace_TF | [
"1dd04e367371d3c7ee1216af099446df772842b4"
] | [
"train_nets.py"
] | [
"import tensorflow as tf\nimport tensorlayer as tl\nimport argparse\nfrom data.mx2tfrecords import parse_function\nimport os\n# from nets.L_Resnet_E_IR import get_resnet\n# from nets.L_Resnet_E_IR_GBN import get_resnet\nfrom nets.L_Resnet_E_IR_fix_issue9 import get_resnet\nfrom losses.face_losses import arcface_los... | [
[
"tensorflow.control_dependencies",
"tensorflow.core.protobuf.config_pb2.RunOptions",
"tensorflow.summary.scalar",
"tensorflow.assign_add",
"tensorflow.Variable",
"tensorflow.get_collection",
"tensorflow.data.TFRecordDataset",
"tensorflow.train.piecewise_constant",
"tensorflow.C... |
jaelgu/towhee | [
"34c79cf50831dc271ae0ab02f319f9e355c2d0bf",
"34c79cf50831dc271ae0ab02f319f9e355c2d0bf",
"34c79cf50831dc271ae0ab02f319f9e355c2d0bf"
] | [
"tests/unittests/models/mdmmt/test_bert_mmt.py",
"tests/unittests/models/layers/test_multi_head_attention_with_lrp.py",
"towhee/models/frozen_in_time/frozen_video_transformer.py"
] | [
"# Copyright 2021 Zilliz. 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 applicable... | [
[
"torch.randint",
"torch.rand"
],
[
"torch.Size",
"torch.rand"
],
[
"torch.nn.Dropout",
"torch.linspace",
"torch.cat",
"torch.zeros",
"torch.einsum",
"torch.nn.Tanh",
"torch.nn.Linear",
"torch.nn.Identity"
]
] |
google/edward2 | [
"5574e773ca4ff5f36a5d9bf3b75ac8505973aa4b"
] | [
"experimental/rank1_bnns/resnet_cifar_model_test.py"
] | [
"# coding=utf-8\n# Copyright 2021 The Edward2 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# Unless required by ... | [
[
"tensorflow.matmul",
"tensorflow.random.categorical",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.reshape",
"tensorflow.test.main",
"tensorflow.reduce_prod",
"tensorflow.random.normal",
"tensorflow.random.se... |
dmlap/transformers | [
"79588e6fdb5af8add092fc27dd695ea1ebc68b18",
"79588e6fdb5af8add092fc27dd695ea1ebc68b18",
"79588e6fdb5af8add092fc27dd695ea1ebc68b18",
"79588e6fdb5af8add092fc27dd695ea1ebc68b18",
"79588e6fdb5af8add092fc27dd695ea1ebc68b18"
] | [
"examples/distillation/run_squad_w_distillation.py",
"src/transformers/modeling_tf_albert.py",
"tests/test_modeling_tf_xlm_roberta.py",
"src/transformers/data/datasets/squad.py",
"src/transformers/modeling_tf_xlm.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.functional.softmax",
"torch.load",
"torch.utils.data.DataLoader",
"torch.no_grad",
"torch.cuda.manual_seed_all",
"torch.cuda.is_available",
"torch.device",
"torch.distributed.get_rank",
"torch.save",
"torch.distributed.init_process_group",
"torch.utils.data.di... |
ragatti/mne-python | [
"c6825a49c3452db616fc980d62d33f6dddf4cd65",
"c6825a49c3452db616fc980d62d33f6dddf4cd65"
] | [
"mne/io/nirx/nirx.py",
"mne/io/fieldtrip/tests/test_fieldtrip.py"
] | [
"# Authors: Robert Luke <mail@robertluke.net>\n#\n# License: BSD (3-clause)\n\nfrom configparser import ConfigParser, RawConfigParser\nimport glob as glob\nimport re as re\n\nimport numpy as np\n\nfrom ..base import BaseRaw\nfrom ..constants import FIFF\nfrom ..meas_info import create_info, _format_dig_points\nfrom... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.zeros",
"numpy.where"
],
[
"numpy.all",
"numpy.arange",
"numpy.array"
]
] |
quocdat32461997/Vacation2AI | [
"8fc92022144e35ecc79878d71d05c0e8f15b20fb"
] | [
"ai-course/homework/hw4/optimizers.py"
] | [
"# optimizers.py\n\nimport copy\nimport numpy as np\n\nfrom losses import *\n\n\nclass Optimizers(object):\n def __init__(self):\n self.loss = 0\n pass\n\n def compute_gradient(self):\n pass\n\n def backward(self):\n pass\n\n\nclass GradientDescent(Optimizers):\n def __init__... | [
[
"numpy.concatenate",
"numpy.square",
"numpy.zeros_like",
"numpy.sqrt"
]
] |
dpfried/phrasenode | [
"dcca59d617937f9e90de15e630690dcbc29e92f4",
"dcca59d617937f9e90de15e630690dcbc29e92f4"
] | [
"third-party/gtd/gtd/codalab.py",
"third-party/gtd/gtd/text.py"
] | [
"\"\"\"Tools for working with CodaLab.\"\"\"\nimport pickle as pickle\nimport json\nimport os\nimport platform\nimport shutil\nimport sys\nimport tempfile\nfrom contextlib import contextmanager\n\nimport matplotlib.image as mpimg\nfrom gtd.io import shell\n\n__author__ = 'kelvinguu'\n\n\n# need to be specified by u... | [
[
"matplotlib.use",
"matplotlib.image.imread"
],
[
"numpy.mean"
]
] |
Tristanovsk/trios | [
"d84a498f0b562d7a792a4588e4d983be885f24b9",
"d84a498f0b562d7a792a4588e4d983be885f24b9"
] | [
"exe/process_test_setup.py",
"exe/borges/db_borges.py"
] | [
"import glob\nimport matplotlib.pyplot as plt\nfrom scipy.interpolate import interp1d\n\nfrom trios.utils.sunposition import sunpos\nfrom trios.utils import utils as u\nfrom trios.process import *\n\n\ncoordf = glob.glob(\"/DATA/OBS2CO/data/info/mesures_in_situ.csv\")[0]\ncoords = pd.read_csv(coordf, sep=';')\nawrf... | [
[
"scipy.interpolate.interp1d",
"matplotlib.pyplot.subplots"
],
[
"pandas.concat",
"pandas.read_csv",
"numpy.linspace",
"pandas.Timedelta",
"scipy.interpolate.interp1d",
"pandas.datetime.strptime",
"pandas.MultiIndex.from_product"
]
] |
philipco/mcm-bidirectional-compression | [
"64f9d1cb2f302e948d8331477e5ef8f4fc7d872f",
"64f9d1cb2f302e948d8331477e5ef8f4fc7d872f"
] | [
"src/utils/data/DataPreparation.py",
"src/utils/Constants.py"
] | [
"\"\"\"\nCreated by Philippenko, 10 January 2020.\n\nThis class generate data for Logistic and Least-Square regression\n\"\"\"\nfrom copy import deepcopy\n\nimport numpy as np\nfrom numpy.random.mtrand import multivariate_normal\nfrom scipy.linalg.special_matrices import toeplitz\nimport torch\nfrom math import flo... | [
[
"numpy.random.seed",
"numpy.arange",
"torch.manual_seed",
"numpy.ones",
"numpy.zeros"
],
[
"numpy.arange",
"numpy.exp"
]
] |
sebemery/CS433-Machine-Learning-MiniProjects | [
"2fbcf540d2b12f987994850e6822fc365db3cdea"
] | [
"Project 2/script/fastai_package.py"
] | [
"import numpy as np\nimport pandas as pd\nimport fastai\nfrom fastai.collab import *\nfrom data_management import*\n\ndef load_data_fastai(path_data, path_rewritedata):\n \"\"\"Create a new csv for fastai and load the data\"\"\"\n new_dataset(path_data, path_rewritedata)\n data = pd.read_csv(path_rewriteda... | [
[
"numpy.copy",
"pandas.read_csv"
]
] |
SKA-INAF/efficientdet-pytorch | [
"8967bab88288d11e5547a7efa391adc0c987be47"
] | [
"effdet/evaluator.py"
] | [
"import os\nimport abc\nimport json\nimport logging\nimport time\nfrom tempfile import NamedTemporaryFile\n\nimport numpy as np\nimport torch\nimport torch.distributed as dist\n\nfrom pycocotools.cocoeval import COCOeval\nfrom .distributed import synchronize, is_main_process, all_gather_container\n\n# FIXME experim... | [
[
"torch.distributed.get_rank",
"torch.distributed.broadcast",
"torch.tensor"
]
] |
Reaction-Space-Explorer/reac-space-exp | [
"52f4b4eab755bd4a6830d838828c958149567396",
"52f4b4eab755bd4a6830d838828c958149567396"
] | [
"neo4j_loader_and_queries/mock_data/test.py",
"main/check_testset_matches.py"
] | [
"import pandas as pd\npd.options.mode.chained_assignment = None # default='warn'\nimport numpy as np\nimport os\nfrom py2neo import Graph, Node, Relationship, NodeMatcher, RelationshipMatcher\n# from neo4j import GraphDatabase\n# import neo4j\nimport networkx as nx\nimport json\nimport datetime\nimport matplotlib.... | [
[
"pandas.read_csv"
],
[
"pandas.read_csv"
]
] |
tacaswell/astropy | [
"75046e61916da36dffe87ddf59a7c6bfb00de81c",
"75046e61916da36dffe87ddf59a7c6bfb00de81c"
] | [
"astropy/time/formats.py",
"astropy/units/tests/test_quantity.py"
] | [
"# -*- coding: utf-8 -*-\n# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\nimport fnmatch\nimport time\nimport re\nimport datetime\nimport warnings\nfrom collections import OrderedDict, defaultdict\n\nimport numpy as np\n\nfrom astropy.utils.decorators import lazyproperty\nfrom astropy.utils.excep... | [
[
"numpy.trunc",
"numpy.ones_like",
"numpy.nditer",
"numpy.isfinite",
"numpy.isnat",
"numpy.isnan",
"numpy.asarray",
"numpy.nan_to_num",
"numpy.atleast_1d",
"numpy.zeros_like",
"numpy.any",
"numpy.ma.array",
"numpy.array",
"numpy.isinf"
],
[
"numpy.get... |
Hermes777/mmfashion | [
"b400d6b68d551c518112ea83008d22c97c12b7c6"
] | [
"mmfashion/models/virtual_tryon/tryon.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom ..import builder\nfrom ..registry import TRYON\n\n@TRYON.register_module\nclass Tryon(nn.Module):\n def __init__(self,\n ngf,\n num_downs,\n in_channels,\n out_channels,\n... | [
[
"torch.sigmoid",
"torch.load",
"torch.cat",
"torch.tanh",
"torch.split"
]
] |
arturofburgos/Comparing-Languages | [
"a20dc24699c762252c94c26e32c7053c04793d9d"
] | [
"Linear System/Python/linear_system.py"
] | [
"# Undergraduate Student: Arturo Burgos\n# Professor: João Rodrigo Andrade\n# Federal University of Uberlândia - UFU, Fluid Mechanics Laboratory - MFLab, Block 5P, Uberlândia, MG, Brazil\n\n\n# Fourth exercise: Solving a Linear System --> ax = b\n\n# Here I first set conditions\n\nimport numpy as np\nfrom numpy imp... | [
[
"numpy.sqrt",
"numpy.reshape",
"numpy.linalg.norm",
"numpy.ones",
"numpy.seterr",
"matplotlib.pyplot.colorbar",
"matplotlib.pyplot.show",
"numpy.zeros"
]
] |
jamesduke/professional-services | [
"c9787015e890c2a99e13a970ecdb8597fc1ad274"
] | [
"examples/cloudml-fraud-detection/trainer/input_fn_utils.py"
] | [
"\"\"\"File with functions to process input data and serve TF graph.\n\nCreate input function on processed data for training and evaluation and\nserving function for out of sample unprocessed data.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_funct... | [
[
"tensorflow.data.TFRecordDataset",
"tensorflow.parse_single_example",
"tensorflow.FixedLenFeature",
"tensorflow.train.match_filenames_once"
]
] |
YasmeenVH/growspace | [
"d153a22a4c7e94f36a265a268a5445c6d4d6d1b1"
] | [
"growspace/envs/growspace_multiplant.py"
] | [
"from enum import Enum\nfrom enum import IntEnum\nfrom random import sample\n\nimport cv2\nimport gym\nimport numpy as np\nfrom numpy.linalg import norm\nimport time\nfrom growspace.plants.tree import PixelBranch\nfrom numpy.linalg import norm\nfrom scipy.spatial import distance\nimport sys\nimport itertools\nfrom ... | [
[
"numpy.around",
"numpy.round",
"numpy.mean",
"numpy.where",
"numpy.random.randint",
"numpy.clip",
"numpy.zeros",
"scipy.spatial.distance.cdist",
"numpy.delete",
"numpy.random.rand",
"numpy.array",
"numpy.flip",
"numpy.logical_and",
"numpy.sum",
"numpy.ab... |
lacouth/scikit-learn | [
"d44c7ae8eb164ebf563f16301e67c519c54cb119",
"d44c7ae8eb164ebf563f16301e67c519c54cb119"
] | [
"sklearn/impute/_knn.py",
"sklearn/cluster/_affinity_propagation.py"
] | [
"# Authors: Ashim Bhattarai <ashimb9@gmail.com>\n# Thomas J Fan <thomasjpfan@gmail.com>\n# License: BSD 3 clause\n\nimport numpy as np\n\nfrom ._base import _BaseImputer\nfrom ..utils.validation import FLOAT_DTYPES\nfrom ..metrics import pairwise_distances_chunked\nfrom ..metrics.pairwise import _NAN_METRI... | [
[
"numpy.logical_not",
"numpy.nonzero",
"numpy.isnan",
"numpy.arange",
"numpy.flatnonzero",
"numpy.all",
"numpy.argpartition",
"numpy.any",
"numpy.ma.array",
"numpy.zeros",
"numpy.ma.average"
],
[
"numpy.diag",
"numpy.all",
"numpy.max",
"numpy.fill_dia... |
SebastianMacaluso/ReclusterTreeAlgorithms | [
"d868706dcfe592bf327d2b250ca638813dca0cdc",
"d868706dcfe592bf327d2b250ca638813dca0cdc"
] | [
"src/StandardHC/N2Greedy_invM.py",
"src/StandardHC/jetClustering.py"
] | [
"import sys\nimport numpy as np\nimport logging\nimport pickle\nimport itertools\nimport time\nimport copy\n\nfrom . import likelihood_invM as likelihood\nfrom . import auxFunctions_invM as auxFunctions\n\nfrom .utils import get_logger\n\nlogger = get_logger(level=logging.INFO)\n\n\n\"\"\"\nThis is an O(N^2) algori... | [
[
"numpy.asarray",
"numpy.copy",
"numpy.sum",
"numpy.append"
],
[
"numpy.asarray",
"numpy.std",
"numpy.sum"
]
] |
mariogarcc/comphy | [
"3ab05a07dfa2eb8a1165fca1bdfd9bda6c8e27d3",
"3ab05a07dfa2eb8a1165fca1bdfd9bda6c8e27d3",
"3ab05a07dfa2eb8a1165fca1bdfd9bda6c8e27d3",
"3ab05a07dfa2eb8a1165fca1bdfd9bda6c8e27d3"
] | [
"T01/ex03.py",
"T08/ex05.py",
"T08/ex06.py",
"package/differentiate.py"
] | [
"from package import redact_ex, ask_continue\n\nfrom package import \\\n find_sols, \\\n falsi_solve\n\nimport numpy as np\n\n\nEXERCISE_03 = \"\"\"\\\nCalculate the solutions for f(x) using the Regula-Falsi method.\\\n\"\"\"\n\nredact_ex(EXERCISE_03, 3)\n\n\n####################################\n\ndef f(x):\... | [
[
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.title",
"numpy.linspace",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.rc",
"matplotlib.pyplot.xlim",
"numpy.exp",
"matplotlib.pyplot.suptitle",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
],
[
"numpy.lin... |
sun-jiao/torch_DCEC | [
"0c168276f6f93c890f8c938c77e70cb15db6cdb1"
] | [
"torch_DCEC.py"
] | [
"from __future__ import print_function, division\n\nif __name__ == \"__main__\":\n\n import argparse\n import torch\n import torch.nn as nn\n import torch.optim as optim\n from torch.optim import lr_scheduler\n from torchvision import datasets, models, transforms\n import os\n import math\n ... | [
[
"torch.nn.KLDivLoss",
"torch.utils.data.DataLoader",
"torch.utils.tensorboard.SummaryWriter",
"torch.cuda.is_available",
"torch.nn.MSELoss",
"torch.optim.lr_scheduler.StepLR"
]
] |
johnberg1/Text-Based-Inference | [
"504f9246336277fe14ff11bfeabd61fcdb5d0ff9"
] | [
"models/psp.py"
] | [
"\"\"\"\nThis file defines the core research contribution\n\"\"\"\nimport copy\nfrom argparse import Namespace\n\nimport torch\nfrom torch import nn\nimport math\n\nfrom configs.paths_config import model_paths\nfrom models.encoders import psp_encoders\nfrom models.encoders import psp_encoders_adain\nfrom models.sty... | [
[
"torch.randn",
"torch.no_grad",
"torch.nn.AdaptiveAvgPool2d",
"torch.load"
]
] |
ZongSingHuang/Binary-Whale-Optimization-Algorithm | [
"482a7ffd19f1274a92bfa99b27782a59d134c70e"
] | [
"main_9010.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Nov 23 21:29:10 2020\n\n@author: ZongSing_NB\n\"\"\"\n\nfrom BWOA import BWOA\nimport numpy as np\nimport pandas as pd\nfrom sklearn.neighbors import KNeighborsClassifier\nfrom sklearn.model_selection import StratifiedKFold\nfrom sklearn.model_selection import cross_... | [
[
"pandas.read_csv",
"numpy.random.seed",
"sklearn.model_selection.StratifiedKFold",
"pandas.DataFrame",
"numpy.ones",
"sklearn.neighbors.KNeighborsClassifier",
"numpy.std",
"numpy.zeros",
"numpy.sum"
]
] |
gieses/pytrapment | [
"7c639b697e94da0307123b45303ce1a7743050d6"
] | [
"pytrapment/entrapment.py"
] | [
"\"\"\"Module to perform QC on the xiRT performance.\"\"\"\nimport numpy as np\nimport pandas as pd\nfrom pyteomics import fasta, parser\nfrom scipy.spatial import distance\n\n\ndef compute_composition_df(seq_df):\n \"\"\"\n Compute the composition matrix for all proteins.\n\n Args:\n seq_df: df, d... | [
[
"pandas.concat",
"numpy.zeros",
"pandas.DataFrame"
]
] |
oliverdutton/probability | [
"951adff452dbb26cf78a6765c10f70f18a934918"
] | [
"tensorflow_probability/python/experimental/sts_gibbs/gibbs_sampler.py"
] | [
"# Copyright 2020 The TensorFlow Probability 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# Unless required by a... | [
[
"tensorflow.compat.v2.nest.map_structure",
"tensorflow.compat.v2.zeros_like",
"tensorflow.compat.v2.not_equal",
"tensorflow.compat.v2.nest.is_nested",
"numpy.arange",
"tensorflow.compat.v2.concat",
"tensorflow.compat.v2.sqrt",
"tensorflow.compat.v2.minimum",
"tensorflow.compat.... |
EricSteinberger/DREAM | [
"bfe21bbb0f60ab27a1af9774308efbbbd41e68c4",
"bfe21bbb0f60ab27a1af9774308efbbbd41e68c4",
"bfe21bbb0f60ab27a1af9774308efbbbd41e68c4",
"bfe21bbb0f60ab27a1af9774308efbbbd41e68c4",
"bfe21bbb0f60ab27a1af9774308efbbbd41e68c4"
] | [
"Leduc_SDCFR.py",
"PokerRL/eval/_/EvaluatorMasterBase.py",
"DREAM_and_DeepCFR/workers/la/sampling_algorithms/MainPokerModuleFLAT_Baseline.py",
"DREAM_and_DeepCFR/workers/ps/dist.py",
"PokerRL/eval/rl_br/workers/la/Local_RLBR_LearnerActor.py"
] | [
"import numpy as np\n\nfrom DREAM_and_DeepCFR.EvalAgentDeepCFR import EvalAgentDeepCFR\nfrom DREAM_and_DeepCFR.TrainingProfile import TrainingProfile\nfrom DREAM_and_DeepCFR.workers.driver.Driver import Driver\nfrom HYPERS import *\nfrom PokerRL.game.games import StandardLeduc # or any other game\n\nif __name__ ==... | [
[
"numpy.random.randint"
],
[
"numpy.std",
"numpy.mean",
"numpy.sqrt"
],
[
"torch.nn.Dropout",
"torch.cat",
"torch.zeros_like",
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.full_like",
"numpy.array"
],
[
"torch.cuda.is_available"
],
[
"num... |
Patyrn/Divide-and-Learn | [
"ff03689c7ab6a7155ebd019babce8f79d0757a53",
"ff03689c7ab6a7155ebd019babce8f79d0757a53",
"ff03689c7ab6a7155ebd019babce8f79d0757a53"
] | [
"dnl/RelaxSolver.py",
"IntOpt/shortespath/shortespath.py",
"SPOTree_scheduling/leaf_model.py"
] | [
"from dnl.IconEasySolver import ICON_scheduling, calculate_energy_from_solver, ICON_scheduling_relaxation\nfrom KnapsackSolving import solveKnapsackProblem, solveKnapsackProblemRelaxation\nfrom dnl.Params import KNAPSACK, ICON_SCHEDULING_EASY\nimport numpy as np\n\ndef get_relax_optimization_objective(Y, weights, o... | [
[
"numpy.asarray",
"numpy.sum"
],
[
"torch.nn.Sequential",
"numpy.linalg.matrix_rank",
"torch.Tensor",
"torch.zeros",
"scipy.special.expit",
"numpy.arange",
"torch.eye",
"torch.from_numpy",
"numpy.random.shuffle",
"sklearn.metrics.mean_squared_error",
"torch.f... |
florischabert/fairseq | [
"21bd5ffc9928f33d01936aeca0298f1c339ce8b1"
] | [
"fairseq/modules/sinusoidal_positional_embedding.py"
] | [
"# Copyright (c) 2017-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the LICENSE file in\n# the root directory of this source tree. An additional grant of patent rights\n# can be found in the PATENTS file in the same directory.\n\nimport math\n\nimport ... | [
[
"torch.cos",
"torch.LongTensor",
"torch.zeros",
"torch.sin",
"torch.onnx.operators.shape_as_tensor",
"torch.FloatTensor",
"torch.arange",
"torch.onnx.operators.reshape_from_tensor_shape"
]
] |
OHBA-analysis/Quinn2021_Waveform | [
"76e4bbba719ee261dad4a59ab9c554cf05c152f6"
] | [
"emd_waveform_fig345.py"
] | [
"#!/usr/bin/python\n\n# vim: set expandtab ts=4 sw=4:\n\n# %% -----------------------------------------------------\n#\n# This script runs the simulations and analysis of the noisy 12Hz oscillator\n# seen in figures 3, 4 and 5. The oscillation is generated and some general EMD\n# and wavelet frequency metrics are c... | [
[
"numpy.nanmax",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.imshow",
"numpy.sqrt",
"numpy.linspace",
"numpy.nanmin",
"matplotlib.pyplot.axes",
"matplotlib.pyplot.plot",
"numpy.mean",
"numpy.nanmean",
"numpy.zeros_like",
"numpy.nanstd",
"scipy.signal.welch",
... |
Zuwei-Zhao/ort-customops | [
"4e78e9651bdcbe8518448c3cbeab90eb92a1be05"
] | [
"test/test_mytorch.py"
] | [
"import onnx\nimport unittest\nimport torchvision\nimport numpy as np\nfrom onnxruntime_customops.utils import trace_for_onnx, op_from_model\nfrom onnxruntime_customops import eager_op, hook_model_op, PyOp, mytorch as torch\n\n\nclass TestTorchE2E(unittest.TestCase):\n @classmethod\n def setUpClass(cls):\n ... | [
[
"numpy.testing.assert_array_equal",
"numpy.testing.assert_allclose"
]
] |
zhuoju36/StructEngPy | [
"ec279271e3468a4a8418bf722b5ceee003abb37c"
] | [
"csys.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Jun 22 21:57:50 2016\n\n@author: HZJ\n\"\"\"\nimport numpy as np\nimport uuid\n\nclass Cartisian(object):\n def __init__(self,origin, pt1, pt2, name=None):\n \"\"\"\n origin: 3x1 vector\n pt1: 3x1 vector\n pt2: 3x1 vector\n \"\"\... | [
[
"numpy.dot",
"numpy.array",
"numpy.linalg.norm",
"numpy.cross"
]
] |
apls777/kaggle-imaterialist2020-model | [
"7822b52f743afb3367a4448a303ac1ee0f869e1d",
"7822b52f743afb3367a4448a303ac1ee0f869e1d",
"6a653615fa48cbeaf34adda7c0545a49739b3189",
"7822b52f743afb3367a4448a303ac1ee0f869e1d",
"7822b52f743afb3367a4448a303ac1ee0f869e1d"
] | [
"tf_tpu_models/official/mnasnet/mnasnet_models.py",
"tf_tpu_models/official/mask_rcnn/submission.py",
"tf_tpu_models/official/detection/modeling/maskrcnn_model.py",
"tf_tpu_models/official/mask_rcnn/object_detection/preprocessor.py",
"tf_tpu_models/official/mnasnet/mnasnet_model.py"
] | [
"# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.compat.v1.variable_scope",
"tensorflow.compat.v1.expand_dims",
"tensorflow.compat.v1.identity"
],
[
"tensorflow.python.summary.summary_iterator.summary_iterator",
"numpy.asarray",
"numpy.argwhere",
"numpy.zeros",
"numpy.where"
],
[
"tensorflow.compat.v1.nn.s... |
payno/silx | [
"13301e61627f98fa837008250ac74a0627a7a560",
"13301e61627f98fa837008250ac74a0627a7a560",
"13301e61627f98fa837008250ac74a0627a7a560"
] | [
"setup.py",
"silx/gui/plot/MaskToolsWidget.py",
"silx/io/fabioh5.py"
] | [
"#!/usr/bin/python\n# coding: utf8\n# /*##########################################################################\n#\n# Copyright (c) 2015-2018 European Synchrotron Radiation Facility\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation... | [
[
"numpy.distutils.misc_util.Configuration",
"numpy.distutils.core.setup"
],
[
"numpy.load",
"numpy.array",
"numpy.zeros",
"numpy.logical_and"
],
[
"numpy.string_",
"numpy.bool",
"numpy.issubdtype",
"numpy.void",
"numpy.dtype",
"numpy.result_type",
"numpy.... |
1212Prajwol-Pdl/SmartProcessAnalytics | [
"b25b6e922e19cc61cfb9eb96395ad177af1daf71"
] | [
"Code-SPA/RNN_feedback.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Tue Jul 23 17:52:31 2019\r\n\r\n@author: Weike (Vicky) Sun vickysun@mit.edu/weike.sun93@gmail.com\r\n(c) 2020 Weike Sun, all rights reserved\r\n\"\"\"\r\n\r\n#!/usr/bin/env python3\r\n# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Mon Jun 4 09:15:46 2018\r\n\r\n@au... | [
[
"tensorflow.nn.dynamic_rnn",
"tensorflow.get_variable",
"tensorflow.reduce_sum",
"numpy.squeeze",
"tensorflow.nn.l2_loss",
"tensorflow.contrib.rnn.BasicRNNCell",
"tensorflow.train.AdamOptimizer",
"numpy.size",
"tensorflow.reset_default_graph",
"numpy.insert",
"tensorflo... |
virtualparadox/bbmap | [
"ea57dba1a1a112de3060793de600da91fa32fbc0"
] | [
"pytools/lib/readqc_utils.py"
] | [
"#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n Read qc utilities\n\n Created: Jul 24 2013\n sulsj\n\n\"\"\"\n\nimport os\nimport subprocess\nimport matplotlib\nimport numpy as np\n\nfrom common import checkpoint_step\nfrom os_utility import make_dir, change_mod, run_sh_command, rm_dir\nfrom readqc_con... | [
[
"matplotlib.ticker.MultipleLocator",
"numpy.log",
"matplotlib.use",
"matplotlib.font_manager.FontProperties",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.gcf",
"numpy.concatenate",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.ticker.For... |
lnfjpt/GraphScope | [
"917146f86d8387302a2e1de6963115e7568bf3ee"
] | [
"python/setup.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Copyright 2020 Alibaba Group Holding Limited. 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# h... | [
[
"numpy.get_include"
]
] |
minrk/bokeh | [
"ae4366e508355afc06b5fc62f1ee399635ab909d",
"8bf4a6f626c505dcb9c525409c0f74debf4499d7",
"ae4366e508355afc06b5fc62f1ee399635ab909d",
"ae4366e508355afc06b5fc62f1ee399635ab909d",
"ae4366e508355afc06b5fc62f1ee399635ab909d",
"8bf4a6f626c505dcb9c525409c0f74debf4499d7"
] | [
"examples/plotting/server/vector.py",
"bokeh/tests/web/two.py",
"examples/glyphs/glyph1.py",
"examples/glyphs/line2.py",
"examples/plotting/cloud/line.py",
"bokeh/tests/chaco_gg/tools.py"
] | [
"\nimport numpy as np\nfrom scipy.integrate import odeint\n\nfrom bokeh.plotting import *\n\ndef streamlines(x, y, u, v, density=1):\n '''Returns streamlines of a vector flow.\n\n * x and y are 1d arrays defining an *evenly spaced* grid.\n * u and v are 2d arrays (shape [y,x]) giving velocities.\n * den... | [
[
"numpy.sqrt",
"numpy.arctan",
"numpy.meshgrid",
"numpy.linspace",
"numpy.cos",
"numpy.sin",
"numpy.int",
"numpy.array",
"numpy.zeros"
],
[
"pandas.read_csv"
],
[
"numpy.arange",
"numpy.sin"
],
[
"numpy.arange",
"numpy.sin"
],
[
"numpy.lin... |
BlenderWang9487/DummyML | [
"42177c45778d79d4200d0e039dafc67ab29b4a8b"
] | [
"tests/test_k_means.py"
] | [
"import dummyml\nimport numpy as np\nimport pytest\n\ndef test_fit_predict():\n input_dim = 784\n k = 10\n dataset_size = 60\n kms = dummyml.k_means(input_dim,k)\n\n x = np.random.rand(dataset_size,input_dim)\n y = np.random.randint(0,k,size=dataset_size, dtype=np.int32)\n\n for i in range(10):... | [
[
"numpy.random.rand",
"numpy.random.randint"
]
] |
Mrinal18/fusion | [
"34e563f2e50139385577c3880c5de11f8a73f220",
"34e563f2e50139385577c3880c5de11f8a73f220",
"34e563f2e50139385577c3880c5de11f8a73f220",
"34e563f2e50139385577c3880c5de11f8a73f220"
] | [
"fusion/model/ae/tests/test_ae.py",
"fusion/dataset/utils.py",
"fusion/architecture/projection_head/conv_head.py",
"fusion/architecture/dcgan/dcgan_decoder.py"
] | [
"import torch\nimport unittest\n\nfrom fusion.model import AE\nclass TestAE(unittest.TestCase):\n\n def test_forward(self):\n # define parameters\n dim_in = 1\n dim_l = 4\n input_size = 32\n architecture = 'DcganAutoEncoder'\n architecture_params = dict(\n inp... | [
[
"torch.rand"
],
[
"torch.initial_seed",
"numpy.random.seed"
],
[
"torch.nn.ModuleList",
"torch.zeros"
],
[
"torch.nn.ModuleList"
]
] |
LewsTherin511/tf_models | [
"6c8b27e43249c84987f7c86749fd4bdf7a606871",
"6c8b27e43249c84987f7c86749fd4bdf7a606871"
] | [
"research/object_detection/custom_datasets/OiDtoolkit_csv/OiDtoolkit_csv.py",
"research/object_detection/object_detection_webcam.py"
] | [
"import os\nimport numpy as np\nimport pandas as pd\nimport cv2\n\n\npath_input_images = 'input_images/'\npath_input_txts = 'input_txts/'\npath_output_labels = 'output_labels/'\n\n\n# configuration\n# maximum resolution\nmax_pixels = 600\n# train/test ratio\nall_images_list = sorted([name for name in os.listdir(pat... | [
[
"numpy.append",
"pandas.read_csv"
],
[
"tensorflow.Graph",
"tensorflow.import_graph_def",
"numpy.expand_dims",
"tensorflow.gfile.GFile",
"numpy.squeeze",
"tensorflow.Session",
"tensorflow.GraphDef"
]
] |
hbrylkowski/model-analysis | [
"3ffa05396ca8cbb92755a40f58528a8808f63c5b",
"3ffa05396ca8cbb92755a40f58528a8808f63c5b",
"3ffa05396ca8cbb92755a40f58528a8808f63c5b"
] | [
"tensorflow_model_analysis/evaluators/metrics_and_plots_evaluator_test.py",
"tensorflow_model_analysis/writers/metrics_plots_and_validations_writer.py",
"tensorflow_model_analysis/metrics/multi_class_confusion_matrix_plot.py"
] | [
"# Lint as: python3\n# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | [
[
"tensorflow.compat.v1.Variable",
"tensorflow.shape",
"tensorflow.identity",
"tensorflow.test.main",
"tensorflow.compat.v1.py_func",
"numpy.sum"
],
[
"tensorflow.compat.v1.python_io.tf_record_iterator",
"tensorflow.io.gfile.isdir",
"tensorflow.io.gfile.glob",
"tensorflow... |
Lornatang/TensorFlow-MNIST | [
"36a91a62a12726724d9d1d135fd3573d754e9659"
] | [
"v0_1/datasets/kmnist.py"
] | [
"# Copyright 2019 ChangyuLiu Authors. All Rights Reserved.\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi... | [
[
"tensorflow.cast",
"tensorflow.image.resize"
]
] |
eddieschoute/qiskit-terra | [
"bf30f3551e0b163ebcb071a0d8186903703c5c8d",
"a87fe61992003e7e7e541f41194c5f0b3e458346"
] | [
"qiskit/circuit/library/iqp.py",
"qiskit/circuit/library/standard_gates/u3.py"
] | [
"# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2020.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE... | [
[
"numpy.array_str",
"numpy.array"
],
[
"numpy.exp",
"numpy.cos",
"numpy.sin"
]
] |
BenjaminETaylor/bjsfm | [
"a952183f5acca8139a1dd8ab2191c8dd3dc14710"
] | [
"tests/test_data.py"
] | [
"import numpy as np\n\n\n####################################################################################################################\n# geometry inputs\n####################################################################################################################\nDIAMETER = 0.15 # hole diameter\nST... | [
[
"numpy.linspace",
"numpy.linalg.inv",
"numpy.cos",
"numpy.sin",
"numpy.array"
]
] |
ReJackTion/heart_pred | [
"286358bc56beed96032b5a59f29b4aa49badfbb2"
] | [
"app.py"
] | [
"from flask import Flask, render_template, request\nimport jsonify\nimport requests\nimport pickle\nimport numpy as np\nimport pandas as pd\nimport sklearn\nfrom sklearn.preprocessing import StandardScaler\n\n\napp = Flask(__name__, template_folder='templates')\nmodel = pickle.load(open('heart_model.pkl', 'rb'))\n\... | [
[
"sklearn.preprocessing.StandardScaler",
"pandas.read_csv"
]
] |
DL-RenJian/retinanet-keras | [
"2d9ae0a89107f12ffcb6a1f2aa76d86503db96eb"
] | [
"get_dr_txt.py"
] | [
"import os\r\n\r\nimport numpy as np\r\nfrom keras.applications.imagenet_utils import preprocess_input\r\nfrom keras.layers import Input\r\nfrom PIL import Image\r\n\r\nfrom retinanet import Retinanet\r\nfrom utils.utils import BBoxUtility, letterbox_image, retinanet_correct_boxes\r\nfrom tqdm import tqdm\r\n\r\n\r... | [
[
"numpy.reshape",
"numpy.array",
"numpy.expand_dims",
"numpy.shape"
]
] |
yancie-yjr/StreamYOLO | [
"46eec034fb1a2f3b1ca211c9dc9703014da75ca3"
] | [
"exps/model/dfp_pafpn.py"
] | [
"#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom exps.model.darknet import CSPDarknet\nfrom yolox.models.network_blocks import BaseConv, CSPLayer, DWConv\n\n\nclass DFPPAFPN(n... | [
[
"torch.split",
"torch.nn.functional.interpolate",
"torch.cat"
]
] |
geyang/dmc_generalization | [
"051fefc470931810c856e89629d481b06cc8d530"
] | [
"dmc_gen/utils.py"
] | [
"import torch\nimport numpy as np\nimport os\nimport json\nimport random\nfrom dmc_gen.algorithms import augmentations\nfrom datetime import datetime\n\n\nclass Eval(object):\n\tdef __init__(self, *models):\n\t\tself.models = models\n\n\tdef __enter__(self):\n\t\tself.prev_states = []\n\t\tfor model in self.models:... | [
[
"numpy.random.seed",
"torch.manual_seed",
"numpy.ones",
"torch.as_tensor",
"torch.cuda.is_available",
"torch.cuda.manual_seed_all",
"numpy.copyto",
"numpy.zeros",
"numpy.empty",
"numpy.random.randint"
]
] |
pseudoPixels/SourceFlow | [
"e1738c8b838c71b18598ceca29d7c487c76f876b",
"e1738c8b838c71b18598ceca29d7c487c76f876b",
"019112147a3e6c208c3846ef699fb6ec24a45c30"
] | [
"app_collaborative_sci_workflow/pipeline_modules/Stats_LogisticRegression/Stats_LogisticRegression_main.py",
"webpage/lib/python3.5/site-packages/dask/array/tests/test_reductions.py",
"webpage/lib/python3.5/site-packages/scipy/special/tests/test_precompute_gammainc.py"
] | [
"\n\nimport matplotlib\n#matplotlib.use('Agg')\nimport numpy as np\nimport matplotlib.pyplot as plt\nplt.switch_backend('agg')\nimport pandas as pd\n\n\n\nimport warnings\nwarnings.filterwarnings('ignore')\n\n\n\n# with open(csv_dataset_path) as module_1_inp:\n# \tlines = module_1_inp.readlines()\n#\n# #only read t... | [
[
"matplotlib.pyplot.switch_backend",
"pandas.read_csv",
"sklearn.model_selection.cross_val_score",
"sklearn.linear_model.LogisticRegression"
],
[
"numpy.nanmax",
"numpy.nanargmax",
"numpy.random.random",
"numpy.nanprod",
"numpy.ones_like",
"numpy.arange",
"numpy.nanm... |
Datagatherer2357/Gareth-Duffy-GMIT-Problem-sets-Python-scripts | [
"f14f62e5b76dc27c04a616d3fe73abfb5052fc3f"
] | [
"numpy1.py"
] | [
"# Gareth Duffy 13-3-2018\n# basic numpy WTOP\n\nimport numpy as np\nx = np.arange(1, 10)\nprint(x)\n\nprint(x ** 2)\n\nM = x.reshape((3, 3)) # multidimensional\nprint(M)\n\nprint(M.T) # transpose\n\nprint(np.dot(M, [5, 6, 7])) # matrix vector\n\nprint(np.linalg.eigvals(M)) # eigenvalues decompostion\n"
] | [
[
"numpy.arange",
"numpy.dot",
"numpy.linalg.eigvals"
]
] |
Mozilla-GitHub-Standards/ee089678ec78c1555fc3f1eff2962a95ae31dcf042f14e37b019b4fbb4b13288 | [
"5d4d89070dc8da54a716bb3d0db7f394334b3325"
] | [
"src/lpcnet.py"
] | [
"#!/usr/bin/python3\n'''Copyright (c) 2018 Mozilla\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n\n - Redistributions of source code must retain the above copyright\n notice, this list of conditions a... | [
[
"numpy.diag",
"numpy.random.seed",
"numpy.reshape",
"numpy.arange",
"numpy.ones",
"numpy.transpose",
"numpy.random.uniform",
"numpy.repeat",
"numpy.sum"
]
] |
jmontgom10/Mimir_pyPol | [
"cb45e78c5ee7b24233cc154c0f3666cd34e2420a"
] | [
"oldCode/03b_examineHWPbkgImages.py"
] | [
"# Allows the user to view the constructed HWP bacxground images. Shows all four\n# HWP rotations associated with a single IPPA angle\n#\n\nimport os\nimport sys\nimport numpy as np\nfrom astropy.io import ascii\nfrom astropy.table import Table as Table\nfrom astropy.table import Column as Column\nfrom astropy.conv... | [
[
"numpy.logical_and",
"numpy.unique",
"numpy.min",
"numpy.arange",
"numpy.ones",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots_adjust",
"numpy.array",
"numpy.where",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
HeqingZhang/mmsegmentation | [
"93301b33d7b7634b018386681be3a640f5979957",
"90d8038e909be9f2154b49d15f95a648ceb75120"
] | [
"mmseg/datasets/builder.py",
"mmseg/models/backbones/cgnet.py"
] | [
"import copy\nimport platform\nimport random\nfrom functools import partial\n\nimport numpy as np\nfrom mmcv.parallel import collate\nfrom mmcv.runner import get_dist_info\nfrom mmcv.utils import Registry, build_from_cfg\nfrom mmcv.utils.parrots_wrapper import DataLoader, PoolDataLoader\nfrom torch.utils.data impor... | [
[
"torch.utils.data.DistributedSampler",
"numpy.random.seed"
],
[
"torch.cat",
"torch.nn.PReLU",
"torch.nn.ModuleList",
"torch.nn.Sigmoid",
"torch.nn.Linear",
"torch.nn.AvgPool2d",
"torch.nn.AdaptiveAvgPool2d",
"torch.utils.checkpoint.checkpoint",
"torch.nn.ReLU"
]
... |
sfox14/butterfly | [
"13cc15cee5bdb7adaf376219aaf20fab0459e9ef",
"13cc15cee5bdb7adaf376219aaf20fab0459e9ef",
"13cc15cee5bdb7adaf376219aaf20fab0459e9ef",
"13cc15cee5bdb7adaf376219aaf20fab0459e9ef"
] | [
"learning_transforms/training.py",
"tests/test_complex_utils.py",
"learning_transforms/speed_training_plot.py",
"learning_transforms/print_results.py"
] | [
"import copy\nimport os\n\nimport torch\nfrom torch import nn\nfrom torch import optim\n\nfrom ray.tune import Trainable\n\n\nN_LBFGS_STEPS_VALIDATION = 15\n\n\nclass PytorchTrainable(Trainable):\n \"\"\"Abstract Trainable class for Pytorch models, which checkpoints the model\n and the optimizer.\n Subclas... | [
[
"torch.nn.functional.mse_loss",
"torch.load",
"torch.save"
],
[
"torch.randn_like",
"torch.randperm",
"torch.randn",
"torch.allclose",
"torch.autograd.grad"
],
[
"matplotlib.pyplot.legend",
"matplotlib.patches.Patch",
"matplotlib.pyplot.axhline",
"matplotlib... |
DataLab-CQU/stellargraph | [
"5ca1e59e91cb6ac470bf19ff3da39b3a1a68650e",
"5ca1e59e91cb6ac470bf19ff3da39b3a1a68650e",
"5ca1e59e91cb6ac470bf19ff3da39b3a1a68650e"
] | [
"tests/layer/test_graph_attention.py",
"stellargraph/core/element_data.py",
"tests/utils/test_hyperbolic.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# Copyright 2018-2020 Data61, CSIRO\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... | [
[
"scipy.sparse.eye",
"tensorflow.keras.backend.int_shape",
"tensorflow.keras.Model",
"tensorflow.keras.models.model_from_json",
"tensorflow.keras.activations.get",
"tensorflow.keras.layers.Input"
],
[
"numpy.asarray",
"numpy.cumsum",
"pandas.Index",
"numpy.concatenate",
... |
zhaojuanmao/fairscale | [
"61ece000bd1b70029270e2dccab66ffa2ca16d51",
"61ece000bd1b70029270e2dccab66ffa2ca16d51",
"61ece000bd1b70029270e2dccab66ffa2ca16d51"
] | [
"fairscale/nn/pipe/checkpoint.py",
"fairscale/nn/pipe/rpc.py",
"tests/nn/model_parallel/test_random.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\n# Copyright 2019 Kakao Brain\n#\n\n# you may not use this file except in compliance with the License.\n# You ma... | [
[
"torch.set_rng_state",
"torch.enable_grad",
"torch.autograd.backward",
"torch.random.fork_rng",
"torch.get_rng_state",
"torch.no_grad",
"torch.cuda.get_rng_state",
"torch.cuda.set_rng_state"
],
[
"torch.empty",
"torch.cuda.current_device",
"torch.distributed.distrib... |
vrom7632/vrom_live_rep | [
"e56ec45a821f98c40bfa520387a4e895923c4241"
] | [
"Deep-Reinforcement-Learning-Book/meirotansaku/katihanpukuhou_Q/my_meirotansaku_katihanpukuhou_Q.py"
] | [
"import numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib import animation\r\n\r\ndef init_byouga(plt):\r\n \"\"\" 迷路の初期描画\"\"\"\r\n # 迷路を描画\r\n fig = plt.figure(figsize=(5, 5))\r\n \r\n ax = plt.gca()\r\n\r\n # 壁の描画\r\n plt.plot([1,1], [0,1], color='red', linewidth=2)\r\n pl... | [
[
"numpy.nanmax",
"matplotlib.pyplot.gca",
"numpy.nanargmax",
"numpy.abs",
"numpy.random.choice",
"numpy.nan_to_num",
"matplotlib.pyplot.plot",
"numpy.nansum",
"numpy.random.rand",
"matplotlib.pyplot.text",
"numpy.array",
"matplotlib.pyplot.figure"
]
] |
icdm2021submission/Continual-Neural-Network-Model-Retraining | [
"7a84f211c7750b862fa5e31293d22d4d0dabed23",
"7a84f211c7750b862fa5e31293d22d4d0dabed23",
"7a84f211c7750b862fa5e31293d22d4d0dabed23",
"7a84f211c7750b862fa5e31293d22d4d0dabed23"
] | [
"src_rnn_rl_group/collect_old.py",
"src_fc_rl_gradient/collect.py",
"src_rnn_rl/table.py",
"src_rl_gradient/model/modeling.py"
] | [
"# rm *.txt & ./bash.sh\n# experiments/base_model/params.json\n# cd /Users/xiaofengzhu/Documents/continual_learning/src\n# tensorboard --logdir\nimport argparse\nimport logging\nimport os\nimport time\nimport glob\nimport tensorflow as tf\nfrom model.utils import Params\nfrom model.utils import set_logger\nfrom mod... | [
[
"tensorflow.set_random_seed",
"tensorflow.reset_default_graph"
],
[
"tensorflow.set_random_seed",
"tensorflow.reset_default_graph"
],
[
"pandas.DataFrame"
],
[
"tensorflow.nn.softmax_cross_entropy_with_logits",
"tensorflow.get_variable",
"tensorflow.control_dependencies... |
mirishkarganesh/espresso | [
"874e04e4c564f80cb5bb12caedbe17a09e9fa2d1"
] | [
"espresso/models/speech_transformer.py"
] | [
"# Copyright (c) Yiming Wang\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport logging\nfrom typing import Any, Dict, List, Optional\n\nimport torch\nfrom torch import Tensor\nimport torch.nn as nn\n\nfrom fairseq import utils\... | [
[
"torch.Tensor",
"torch.cat",
"torch.nn.ModuleList",
"torch.nn.Linear",
"torch.rand",
"torch.where"
]
] |
indiewebconsulting/mind-tensorflow | [
"15ac248a9b883033b723d6fd6eb4335102c5780e",
"15ac248a9b883033b723d6fd6eb4335102c5780e"
] | [
"tensorflow/python/training/tracking/util.py",
"tensorflow/python/keras/layers/wrappers.py"
] | [
"\"\"\"Utilities for saving/loading Trackable objects.\"\"\"\n# Copyright 2017 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# ... | [
[
"tensorflow.python.training.tracking.base._SlotVariableRestoration",
"tensorflow.python.ops.variable_scope.variable_creator_scope",
"tensorflow.python.ops.variable_scope._get_default_variable_store",
"tensorflow.python.training.saving.saveable_object_util.saveable_objects_for_op",
"tensorflow.... |
ZakMiller/gpt-2 | [
"7d9b41dbabc3beaeef3d62b52a409fe712e24f8d"
] | [
"encode.py"
] | [
"#!/usr/bin/env python3\n# Usage:\n# PYTHONPATH=src ./encode.py <file|directory|glob> /path/to/output.npz\n# PYTHONPATH=src ./train --dataset /path/to/output.npz\n\nimport argparse\nimport numpy as np\n\nimport encoder\nfrom load_dataset import load_dataset\n\nparser = argparse.ArgumentParser(\n description='P... | [
[
"numpy.savez_compressed"
]
] |
doc-doc/NExT-OE | [
"a45d81a48ab5ccc45ff6f7bea60597cc59bc546e"
] | [
"networks/VQAModel/HME.py"
] | [
"import torch\nimport torch.nn as nn\nimport random as rd\nimport sys\nsys.path.insert(0, 'networks')\nfrom Attention import TempAttention\nfrom memory_rand import MemoryRamTwoStreamModule, MemoryRamModule, MMModule\n\n\nclass HME(nn.Module):\n def __init__(self, vid_encoder, qns_encoder, ans_decoder, max_len_v,... | [
[
"torch.LongTensor",
"torch.zeros",
"torch.cat",
"torch.nn.init.xavier_normal_",
"torch.nn.Linear"
]
] |
mkelley/mskpy | [
"41f41fd69bae71853abdfd2afbd535cd0b79c530"
] | [
"mskpy/models/surfaces.py"
] | [
"# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\"\"\"\nsurfaces --- Models for surfaces\n================================\n\n.. autosummary::\n :toctree: generated/\n\n Surface Models\n --------------\n SurfaceRadiation\n DAp\n DApColor\n HG\n NEATM\n\n Phase functions\n -----... | [
[
"numpy.radians",
"numpy.abs",
"numpy.linspace",
"numpy.sqrt",
"numpy.isnan",
"numpy.cos",
"scipy.integrate.quad",
"numpy.sin",
"numpy.tan",
"scipy.optimize.leastsq",
"numpy.log10",
"numpy.zeros_like",
"numpy.any",
"numpy.iterable",
"numpy.array",
"nu... |
ARF1/numba | [
"8a6d09b15f0090144161158d01550847f15fc1c8",
"8a6d09b15f0090144161158d01550847f15fc1c8"
] | [
"numba/cuda/tests/cudapy/test_alignment.py",
"numba/cuda/tests/cudapy/test_device_func.py"
] | [
"import numpy as np\nfrom numba import from_dtype, cuda\nfrom numba.cuda.testing import skip_on_cudasim, SerialMixin\nimport unittest\n\nclass TestAlignment(SerialMixin, unittest.TestCase):\n def test_record_alignment(self):\n rec_dtype = np.dtype([('a', 'int32'), ('b', 'float64')], align=True)\n r... | [
[
"numpy.all",
"numpy.recarray",
"numpy.dtype"
],
[
"numpy.all",
"numpy.arange",
"numpy.testing.assert_equal"
]
] |
neelabh17/mrf-calibration | [
"a5edcb257719d6ca787aca66e27dd86bb0dbbab6"
] | [
"calibration_library/models/resnet.py"
] | [
"import torch\nfrom torch import nn, optim\nfrom torch.nn import functional as F\nimport torch.nn.init as init\n\n\ndef _weights_init(m):\n classname = m.__class__.__name__\n #print(classname)\n if isinstance(m, nn.Linear) or isinstance(m, nn.Conv2d):\n init.kaiming_normal_(m.weight)\n\nclass Lambda... | [
[
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.nn.BatchNorm2d",
"torch.nn.functional.pad",
"torch.nn.init.kaiming_normal_"
]
] |
xuli2020sj/Intelligent-Vehicle | [
"d69d26147ed4f0adbbd4bff83a953f9ef3509131"
] | [
"motion/server.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Jul 10 21:52:21 2021\n\n@author: qq735\n\"\"\"\n\nfrom multiprocessing import Process\nfrom socket import *\n# import wiringpi\n\nimport RPi.GPIO as GPIO\nimport time\nimport string\nimport threading\nimport timeout_decorator\n\nimport serial\nimport pynmea2\n\nseria... | [
[
"numpy.frombuffer",
"numpy.max",
"numpy.argmax"
]
] |
hjkim-haga/TF-OD-API | [
"192ae544169c1230c21141c033800aa1bd94e9b6",
"192ae544169c1230c21141c033800aa1bd94e9b6",
"22ac477ff4dfb93fe7a32c94b5f0b1e74330902b",
"22ac477ff4dfb93fe7a32c94b5f0b1e74330902b",
"22ac477ff4dfb93fe7a32c94b5f0b1e74330902b",
"192ae544169c1230c21141c033800aa1bd94e9b6",
"22ac477ff4dfb93fe7a32c94b5f0b1e74330902... | [
"research/object_detection/exporter_lib_tf2_test.py",
"research/slim/export_inference_graph_test.py",
"research/slim/nets/mobilenet_v1.py",
"official/vision/beta/modeling/decoders/fpn_test.py",
"research/autoaugment/data_utils.py",
"research/object_detection/utils/variables_helper_tf1_test.py",
"officia... | [
"# Lint as: python2, python3\r\n# Copyright 2020 The TensorFlow Authors. All Rights Reserved.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n# http://www.apache... | [
[
"tensorflow.compat.v2.test.main",
"tensorflow.compat.v2.train.CheckpointManager",
"tensorflow.compat.v2.compat.v2.train.Checkpoint",
"tensorflow.compat.v2.enable_v2_behavior",
"numpy.ones",
"tensorflow.compat.v2.compat.v2.train.CheckpointManager",
"tensorflow.compat.v2.keras.initialize... |
jerrywgz/Paddle | [
"85c4912755b783dd7554a9d6b9dae4a7e40371bc",
"85c4912755b783dd7554a9d6b9dae4a7e40371bc"
] | [
"python/paddle/fluid/tests/test_lod_tensor.py",
"python/paddle/v2/image.py"
] | [
"# Copyright (c) 2018 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 ... | [
[
"numpy.random.random"
],
[
"numpy.array",
"numpy.random.randint"
]
] |
MattAlexMiracle/SmartPatch | [
"c485cb433d8e085d6eae10a335ee19f5e6c1a41c"
] | [
"Benchmark/research-seq2seq-HTR/models/encoder_vgg.py"
] | [
"from torch import nn\nfrom torch.autograd import Variable\nimport torch\nfrom torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence\nimport numpy as np\n\n# from models.vgg_tro_channel1 import vgg16_bn\nfrom models.vgg_tro_channel3 import vgg16_bn, vgg19_bn\n\n# torch.cuda.set_device(1)\n\nDROP_OUT =... | [
[
"torch.nn.Dropout2d",
"torch.cat",
"torch.zeros",
"torch.nn.Linear",
"torch.nn.utils.rnn.pad_packed_sequence",
"numpy.array"
]
] |
cvemeki/Computational-motor-control | [
"cf02c77bff44ffdff63630c445b35b657a1d2b6c",
"cf02c77bff44ffdff63630c445b35b657a1d2b6c"
] | [
"lab4_ZHANG_ZHENG_YANG/Python/Muscle.py",
"lab4_ZHANG_ZHENG_YANG/Python/exercise1_copy.py"
] | [
"import numpy as np\n\n\nclass Muscle(object):\n \"\"\"This class implements the muscle model.\n The muscle model is based on the hill-type muscle model.\n \"\"\"\n # Default Muscle Parameters\n\n c = np.log(0.05) # pylint: disable=no-member\n N = 1.5\n K = 5.0\n tau_act = 0.01 # Time cons... | [
[
"numpy.log",
"numpy.exp"
],
[
"matplotlib.pyplot.legend",
"numpy.linspace",
"matplotlib.pyplot.title",
"numpy.arange",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.show"
]
] |
JacobHA/HandsFree | [
"a374bcb823370963a1c0e30cbb4866018d6d4169",
"a374bcb823370963a1c0e30cbb4866018d6d4169"
] | [
".history/handtracking_v007_20220601173944.py",
".history/handtracking_v007_20220601211918.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Aug 2 00:20:41 2021\n\n@author: jacob\n\"\"\"\n\nimport cv2\nimport mediapipe as mp\nfrom vedo import *\nfrom time import sleep\nfrom google.protobuf.json_format import MessageToDict\n\nimport numpy as np\nfrom utils import *\n\nMEMORY_DEBUG = False\n\nTHUMB_TIP_IND... | [
[
"numpy.array",
"numpy.linalg.norm",
"numpy.cross"
],
[
"numpy.array",
"numpy.linalg.norm",
"numpy.cross"
]
] |
softbankrobotics-research/Generative_Continual_Learning | [
"66b121437c248993b41f154b5a2d6b7197278578"
] | [
"Generative_Models/Conditional_Model.py"
] | [
"from Generative_Models.Generative_Model import GenerativeModel\nimport torch\nfrom utils import *\n\n\nclass ConditionalModel(GenerativeModel):\n\n\n # if no task2generate are given we generate all labellize for all task\n # if task2generate and annotate == false we generate only for the actual task\n # i... | [
[
"torch.randperm",
"torch.FloatTensor",
"torch.ones",
"torch.load"
]
] |
DAMONYLY/YOLOv3 | [
"fae4e9533de70d187e09b97ee8b74d06deb0f037"
] | [
"utils/parse_yolo_weights.py"
] | [
"\nfrom __future__ import division\nimport torch\nimport numpy as np\n\n\ndef parse_conv_block(m, weights, offset, initflag):\n \"\"\"\n Initialization of conv layers with batchnorm\n Args:\n m (Sequential): sequence of layers\n weights (numpy.ndarray): pretrained weights data\n offset... | [
[
"numpy.fromfile",
"numpy.sqrt",
"torch.from_numpy",
"numpy.ones",
"numpy.random.normal",
"numpy.zeros"
]
] |
erikmannerfelt/GeoUtils | [
"96a044f7cca73f936e5b245a5e99e0d2102d279f"
] | [
"tests/test_spatial_tools.py"
] | [
"\"\"\"\nFunctions to test the spatial tools.\n\"\"\"\nfrom __future__ import annotations\n\nimport warnings\nfrom typing import Callable\n\nimport numpy as np\nimport pytest\nimport rasterio as rio\n\nimport geoutils as gu\nfrom geoutils import datasets\nfrom geoutils.georaster import RasterType\n\n# def test_dem_... | [
[
"numpy.ma.vstack",
"numpy.abs",
"numpy.unique",
"numpy.reshape",
"numpy.shares_memory",
"numpy.issubdtype",
"numpy.arange",
"numpy.ma.masked_array",
"numpy.sort",
"numpy.ones",
"numpy.ndim",
"numpy.size",
"numpy.mean",
"numpy.any",
"numpy.count_nonzero",... |
sarahthiele/hush | [
"5a6a67cacd21615c9c02a6c3539c598ddf3da405"
] | [
"src/figures/PSD.py"
] | [
"import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport astropy.units as u\n\n\ndef func(x, a, b, c, d, e):\n return a + b * x + c * x ** 2 + d * x ** 3 + e * x ** 4\n\nmodel = \"fiducial\"\ncolors = [\"#add0ed\", \"#2b5d87\", \"#4288c2\", \"#17334a\"]\nTobs = 4 * u.yr\n\npower_dat_F50 ... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.tight_layout",
"numpy.linspace",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.yscale",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.xscale"
]
] |
KorA6/open_model_zoo | [
"2856f9d6f5b4d2cb19b0c98c127b6c758851c51b"
] | [
"tools/accuracy_checker/openvino/tools/accuracy_checker/adapters/retinanet.py"
] | [
"\"\"\"\nCopyright (c) 2018-2022 Intel Corporation\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 required by applicable law ... | [
[
"numpy.expand_dims",
"numpy.minimum",
"numpy.sqrt",
"numpy.concatenate",
"numpy.max",
"numpy.exp",
"numpy.clip",
"numpy.reshape",
"numpy.arange",
"numpy.stack",
"numpy.size",
"numpy.argmax",
"numpy.zeros",
"numpy.log",
"numpy.nonzero",
"numpy.append"... |
DanRyanIrish/ndcube | [
"f98f97ad9e65a8ddd79f047d76c596599cf94882"
] | [
"ndcube/tests/test_lookup_table_coord.py"
] | [
"import astropy.units as u\nimport gwcs.coordinate_frames as cf\nimport numpy as np\nimport pytest\nfrom astropy.coordinates import SkyCoord\nfrom astropy.time import Time\n\nfrom ndcube.extra_coords import LookupTableCoord\n\n\n@pytest.fixture\ndef lut_1d_distance():\n lookup_table = u.Quantity(np.arange(10) * ... | [
[
"numpy.arange"
]
] |
AyeshaSadiqa/thesis | [
"761eb0c37acd42707d52d4a6bfabe8ac566d8aa4"
] | [
"codes/models/archs/TDAN_arch.py"
] | [
"'''\nNetwork architecture for TDAN:\nTDAN: Temporally Deformable Alignment Network for Video Super-Resolution\n'''\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport models.archs.arch_util as arch_util\ntry:\n from models.archs.dcn.deform_conv import ModulatedDef... | [
[
"torch.cat",
"torch.randn",
"torch.nn.Conv2d",
"torch.device",
"torch.nn.ReLU"
]
] |
javierrodenas/clearml_javi | [
"b6326104fe6a6f522223c2ac3d87468990a9e6f2"
] | [
"get_confusion_matrix.py"
] | [
"import numpy as np\nimport os\nfrom numpy import loadtxt\nfrom sklearn.metrics import confusion_matrix, classification_report\nimport pandas as pd\nimport glob\nfrom matplotlib import pyplot as plt\nfrom scipy.cluster.hierarchy import dendrogram\nfrom sklearn.cluster import AgglomerativeClustering\n\ndef buildData... | [
[
"matplotlib.pyplot.title",
"sklearn.metrics.classification_report",
"pandas.DataFrame",
"matplotlib.pyplot.savefig",
"numpy.argmax",
"numpy.column_stack",
"scipy.cluster.hierarchy.dendrogram",
"numpy.load",
"sklearn.cluster.AgglomerativeClustering",
"numpy.array",
"nump... |
edumur/Qcodes | [
"ac262035c299a872995cecd210f0e84b0b85d751",
"478af6e746f918a9e1dded7ec626484987f894d2"
] | [
"qcodes/instrument_drivers/rigol/DS4000.py",
"qcodes/data/hdf5_format.py"
] | [
"import logging\nimport re\nimport time\nimport warnings\nfrom collections import namedtuple\nfrom typing import Any\n\nimport numpy as np\nfrom packaging import version\n\nfrom qcodes import VisaInstrument\nfrom qcodes import validators as vals\nfrom qcodes.instrument.channel import ChannelList, InstrumentChannel\... | [
[
"numpy.frombuffer",
"numpy.linspace"
],
[
"numpy.isnan",
"numpy.append",
"numpy.array",
"numpy.prod"
]
] |
OneraHub/WhatsOpt-Tutorial | [
"12d14e04defa1d44e43c47486801af4bf1284987",
"12d14e04defa1d44e43c47486801af4bf1284987"
] | [
"examples/ssbj/mda/propulsion_base.py",
"examples/mod_branin/run_screening.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n propulsion_base.py generated by WhatsOpt 1.10.4\n\"\"\"\n# DO NOT EDIT unless you know what you are doing\n# whatsopt_url: \n# analysis_id: 3\n\n\nimport numpy as np\nfrom numpy import nan\nfrom os import path\nfrom importlib import import_module\nfrom yaml import load, FullLoade... | [
[
"numpy.ones"
],
[
"matplotlib.pyplot.show",
"numpy.zeros",
"matplotlib.pyplot.subplots"
]
] |
bendikbo/SSED | [
"fdd0e74d419687bc8cba65341d7248ca6ccd1a4e"
] | [
"train.py"
] | [
"import argparse\nimport logging\nimport torch\nimport pathlib\nimport numpy as np\nfrom classifier.config.defaults import cfg\nfrom classifier.data.build import make_data_loaders\nfrom classifier.logger import setup_logger\nfrom classifier.trainer import Trainer\nfrom classifier.models import build_model\nfrom cla... | [
[
"torch.manual_seed",
"numpy.random.seed"
]
] |
akshatabhat/TVQA | [
"85c50b26eb8941781dc4bb93bce61201aff4643d"
] | [
"model/bidaf.py"
] | [
"__author__ = \"Jie Lei\"\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\n\n\nclass BidafAttn(nn.Module):\n \"\"\"from the BiDAF paper https://arxiv.org/abs/1611.01603.\n Implemented by @easonnie and @jayleicn\n \"\"\"\n def __init__(self, ch... | [
[
"torch.nn.functional.softmax",
"torch.max",
"torch.cat",
"torch.nn.Linear",
"torch.bmm",
"torch.autograd.Variable"
]
] |
JiaHsin/ftf-re-api | [
"02e7ed5d0628a1d5a9aec3b37f6bcba93bf3284e"
] | [
"reporting_engine/transform_layer/tests/test_calc_new_families.py"
] | [
"from django.test import TestCase\nfrom django.db import connections\nimport pandas\nfrom pandas.testing import assert_frame_equal, assert_series_equal\nfrom transform_layer.services.data_service import DataService\nimport transform_layer.calculations as calc\n\nimport json\nimport math\nimport unittest\nimport os\... | [
[
"pandas.testing.assert_series_equal",
"pandas.testing.assert_frame_equal",
"pandas.Series",
"pandas.read_json"
]
] |
sagieppel/Predicting-Material-properties-of-objects-and-liquids-inside-transparent-vessels-from-image | [
"54d9e2649dc8d24a55ad1d05d4e395b80c9c141c"
] | [
"TRAIN.py"
] | [
"# Train net Given an image of vessel and content and mask (region) of the vessel predict the material of the vessel content and the material of the vessel\n#...............................Imports..................................................................\nimport os\nimport numpy as np\nimport NetModel\nimpo... | [
[
"torch.abs",
"numpy.min",
"torch.load",
"torch.cuda.empty_cache",
"numpy.save",
"torch.from_numpy",
"numpy.load"
]
] |
jamesliu/spark | [
"3fddc9468fa50e7683caa973fec6c52e1132268d"
] | [
"python/pyspark/mllib/linalg.py"
] | [
"#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo... | [
[
"numpy.dot",
"numpy.array_equal",
"numpy.frombuffer",
"numpy.array",
"numpy.zeros"
]
] |
arahangua/gnn_prediction_sn | [
"3b3b8da07ee920c94f1a88fab87472860eec6322",
"3b3b8da07ee920c94f1a88fab87472860eec6322"
] | [
"pred_models/gnn_torch_utils.py",
"pred_models/gnn_torch_models.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon May 3 13:23:59 2021\n\n@author: th\n\"\"\"\n\n\nimport torch\nfrom torch.nn import ReLU, Linear, Softmax, SmoothL1Loss, Tanh, LeakyReLU\nfrom torch_geometric.nn import GCNConv, global_max_pool, global_mean_pool, SGConv, GNNExplainer, SAGEConv... | [
[
"torch.abs",
"torch.max",
"numpy.squeeze",
"numpy.concatenate",
"torch.no_grad",
"numpy.where",
"numpy.setxor1d",
"torch.nn.CrossEntropyLoss",
"numpy.unique",
"torch.reshape",
"torch.tensor",
"numpy.copy",
"torch.square",
"numpy.zeros",
"numpy.argsort",
... |
Jiannan-Liu/nCoVSegNet | [
"7543e68edff011a7f7b694c97cf0f185d441fd6b"
] | [
"module/backbone/Res2Net.py"
] | [
"import torch.nn as nn\nimport math\nimport torch.utils.model_zoo as model_zoo\nimport torch\nimport torch.nn.functional as F\n\n__all__ = ['Res2Net', 'res2net50_v1b', 'res2net101_v1b', 'res2net50_v1b_26w_4s']\n\nmodel_urls = {\n 'res2net50_v1b_26w_4s': 'https://shanghuagao.oss-cn-beijing.aliyuncs.com/res2net/re... | [
[
"torch.nn.Sequential",
"torch.load",
"torch.cat",
"torch.nn.init.constant_",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.Linear",
"torch.nn.AvgPool2d",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.BatchNorm2d",
"torch.split",
"torch.nn.R... |
idoroditty/IML.HUJI | [
"fdc9c5166c33db679eca8ebd928ae487faadf39f"
] | [
"exercises/perform_model_selection.py"
] | [
"from __future__ import annotations\nimport numpy as np\nimport pandas as pd\nimport sklearn.datasets\nfrom sklearn import datasets\nfrom IMLearn.metrics import mean_square_error\nfrom IMLearn.utils import split_train_test\nfrom IMLearn.model_selection import cross_validate\nfrom IMLearn.learners.regressors import ... | [
[
"numpy.linspace",
"numpy.random.seed",
"sklearn.datasets.load_diabetes",
"pandas.DataFrame",
"sklearn.linear_model.Lasso",
"numpy.random.normal",
"numpy.argmin",
"numpy.array"
]
] |
oywtece/dstn | [
"5936811f81d419db82191a5939ee347f6d3359ed"
] | [
"dstn_self_att.py"
] | [
"import numpy as np\nimport tensorflow as tf\nimport datetime\nimport ctr_funcs as func\nimport config_dstn as cfg\nimport os\nimport shutil\n\n# config\nstr_txt = cfg.output_file_name\nbase_path = './tmp'\nmodel_saving_addr = base_path + '/dstn_s_' + str_txt + '/'\noutput_file_name = base_path + '/dstn_s_' + str_t... | [
[
"tensorflow.device",
"tensorflow.concat",
"numpy.sqrt",
"tensorflow.reduce_sum",
"numpy.cumsum",
"tensorflow.nn.sigmoid_cross_entropy_with_logits",
"numpy.round",
"numpy.mean",
"tensorflow.train.AdamOptimizer",
"tensorflow.greater",
"tensorflow.ConfigProto",
"tensor... |
MingchengZuo/fast-cma-es | [
"ada34f50b93d52493d768ad67addaf915f9e0d2f",
"ada34f50b93d52493d768ad67addaf915f9e0d2f"
] | [
"fcmaes/pygmoretry.py",
"examples/spring.py"
] | [
"# Copyright (c) Dietmar Wolz.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory.\n\nimport math\nimport os\nimport sys\nfrom numpy.random import Generator, MT19937, SeedSequence\nfrom scipy.optimize import OptimizeResult, Bounds\nimport multiprocessing as m... | [
[
"numpy.random.MT19937",
"scipy.optimize.Bounds",
"numpy.random.SeedSequence"
],
[
"scipy.optimize.Bounds",
"numpy.array",
"numpy.minimum",
"scipy.optimize.minimize"
]
] |
aseyboldt/arviz | [
"1fb40ff442f5ba4b8d11ceeaef27e6c339eb1685"
] | [
"arviz/plots/backends/bokeh/forestplot.py"
] | [
"# pylint: disable=all\n\"\"\"Bokeh forestplot.\"\"\"\nfrom collections import defaultdict, OrderedDict\nfrom itertools import cycle, tee\n\nimport bokeh.plotting as bkp\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom bokeh.layouts import gridplot\nfrom bokeh.models import Band, ColumnDataSource\nfrom bo... | [
[
"numpy.ones_like",
"numpy.isfinite",
"numpy.linspace",
"numpy.concatenate",
"numpy.atleast_2d",
"numpy.max",
"numpy.mean",
"numpy.mod",
"numpy.vstack"
]
] |
annoing-morda/b_diploma | [
"7c04b1014bbf8ebf3deb4fe0f60fd845475b3635",
"7c04b1014bbf8ebf3deb4fe0f60fd845475b3635"
] | [
"geometry.py",
"quadr_programming.py"
] | [
"import numpy as np\nfrom numpy import linalg as la\n\nclass cylinder: # Класс, описывающий цилиндр\n def __init__(self, o, a, b, c):\n # o - центр основания, a, b - оси эллпса, c - центральная ось цилиндра\n self.o = o\n self.a = a\n self.b = b\n self.c = c\n\n def check(... | [
[
"numpy.hstack",
"numpy.linalg.solve",
"numpy.eye",
"numpy.matmul",
"numpy.linalg.det",
"numpy.all",
"numpy.delete",
"numpy.transpose",
"numpy.array",
"numpy.vstack"
],
[
"numpy.dot",
"numpy.linalg.solve",
"numpy.matmul",
"numpy.linalg.det",
"numpy.de... |
FRidh/scipy | [
"dabfb4586e0b656b5f6da8b301643b918259e61f",
"dabfb4586e0b656b5f6da8b301643b918259e61f",
"dabfb4586e0b656b5f6da8b301643b918259e61f",
"dabfb4586e0b656b5f6da8b301643b918259e61f",
"dabfb4586e0b656b5f6da8b301643b918259e61f",
"dabfb4586e0b656b5f6da8b301643b918259e61f",
"dabfb4586e0b656b5f6da8b301643b918259e61... | [
"scipy/io/matlab/tests/test_mio.py",
"scipy/signal/setup.py",
"scipy/sparse/linalg/isolve/lgmres.py",
"scipy/optimize/minpack.py",
"scipy/weave/tests/test_ast_tools.py",
"scipy/linalg/blas.py",
"scipy/sparse/csgraph/tests/test_graph_laplacian.py",
"scipy/sparse/linalg/eigen/lobpcg/setup.py"
] | [
"#!/usr/bin/env python\n# -*- coding: latin-1 -*-\n''' Nose test generators\n\nNeed function load / save / roundtrip tests\n\n'''\nfrom __future__ import division, print_function, absolute_import\n\nimport os\nfrom os.path import join as pjoin, dirname\nfrom glob import glob\nfrom io import BytesIO\nfrom tempfile i... | [
[
"scipy.io.matlab.miobase.matdims",
"numpy.sqrt",
"scipy.io.matlab.mio.mat_reader_factory",
"numpy.ndarray",
"numpy.dtype",
"numpy.all",
"numpy.exp",
"scipy.io.matlab.mio5.varmats_from_mat",
"numpy.testing.assert_equal",
"scipy.sparse.coo_matrix",
"scipy.sparse.issparse"... |
StefanHD13/Machine_Learning_Projects | [
"2c6f935ed689a07d6bdb63a91566d40bf94809b8"
] | [
"SMS_spam_collection/results.py"
] | [
"import pandas\ndata_feat = pandas.read_csv('features_results.csv')\ndata_class = pandas.read_csv('class_results.csv')\n\nprint('\\nSelect K best Comparison:\\n')\nprint(data_feat)\nprint('\\n\\nClassifiers Comparison:\\n')\nprint(data_class)\n"
] | [
[
"pandas.read_csv"
]
] |
WildMeOrg/wbia-deprecate-tpl-lightnet | [
"b910aaa88f31d0bb4ca220229852a7f58f4ca905",
"b910aaa88f31d0bb4ca220229852a7f58f4ca905"
] | [
"lightnet/data/transform/_preprocess.py",
"lightnet/network/loss/_regionloss.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# Image and annotations preprocessing for lightnet networks\n# The image transformations work with both Pillow and OpenCV images\n# The annotation transformations work with brambox.annotations.Annotation objects\n# Copyright EAVISE\n#\n\nimport random\nimport collections\nimport... | [
[
"numpy.clip",
"torch.from_numpy",
"numpy.ones",
"numpy.concatenate",
"numpy.array",
"numpy.zeros"
],
[
"torch.nn.CrossEntropyLoss",
"torch.linspace",
"torch.ones",
"torch.Tensor",
"torch.zeros",
"torch.zeros_like",
"torch.is_tensor",
"torch.tensor",
... |
DipakBagal/BMS_Molecular_Translation | [
"881b252a3c30e5b0afce2ce2c5da73d02755394d"
] | [
"codes/data.py"
] | [
"import albumentations as A\nfrom albumentations.pytorch import ToTensorV2\nimport cv2\n\nimport torch\nfrom torch.utils.data import Dataset, DataLoader\nfrom torch.utils.data.sampler import RandomSampler, SequentialSampler, WeightedRandomSampler\nfrom torch.utils.data.distributed import DistributedSampler\nfrom to... | [
[
"torch.LongTensor",
"pandas.concat",
"torch.nn.utils.rnn.pad_sequence",
"torch.utils.data.DataLoader",
"numpy.ones",
"torch.stack",
"torch.utils.data.sampler.SequentialSampler",
"torch.utils.data.sampler.RandomSampler"
]
] |
rlratzel/custrings | [
"49dabc02aa74649eff09a10d183df94e55037e54"
] | [
"python/tests/test_offsets.py"
] | [
"\nimport nvstrings\nimport numpy as np\nvalues = np.array([97, 112, 112, 108, 101], dtype=np.int8)\nprint(\"values\",values.tobytes())\noffsets = np.array([0,1,2,3,4,5], dtype=np.int32)\nprint(\"offsets\",offsets)\ns = nvstrings.from_offsets(values,offsets,5)\nprint(s)\n\nbitmask = np.array([29], dtype=np.int8)\np... | [
[
"numpy.array"
]
] |
dohnlee/qufa2021 | [
"5fb42caee09ec228358e49768e32c75e3c0094ce"
] | [
"outlier_detection.py"
] | [
"import os\nimport json\nimport random\nimport argparse\n\nfrom tqdm import tqdm\nimport numpy as np\nimport pandas as pd\nfrom sklearn.preprocessing import StandardScaler\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport torch.nn.init as weight_init\nfrom to... | [
[
"torch.nn.Dropout",
"pandas.read_csv",
"numpy.random.seed",
"torch.manual_seed",
"torch.utils.data.DataLoader",
"torch.tensor",
"torch.nn.Linear",
"torch.relu",
"numpy.std",
"numpy.mean",
"torch.no_grad",
"torch.cuda.is_available",
"torch.cuda.manual_seed_all",
... |
hhoshino0421/SecurityMachineLearning | [
"bc627219ff3e8a1e79ccf09891803b50d2096503"
] | [
"ch4/SecurityML08/MachineLearningMain.py"
] | [
"\nimport ember\n\nfrom sklearn.preprocessing import StandardScaler\n\nfrom ReadFile import *\nfrom ReadModel import *\n\n\ndef check_malware(check_file_path, model_file_path):\n\n check_file_obj = read_file(check_file_path)\n\n scaler = StandardScaler()\n scaler.fit(check_file_obj)\n sample_data_new = ... | [
[
"sklearn.preprocessing.StandardScaler"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.