repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
filipecn/maldives | [
"f20f17d817fc3dcad7f9674753744716d1d4c821"
] | [
"maldives/bot/exchanges/binance_exchange.py"
] | [
"from datetime import datetime, timezone\nimport logging\nimport os\nimport pandas as pd\nfrom ..models.order import Order\nfrom ..models.price import Price\nfrom ..models.dealer import Dealer\nfrom pandas import DataFrame\n\nfrom binance.client import Client\nfrom binance.enums import *\nfrom binance.websockets im... | [
[
"pandas.to_datetime",
"pandas.to_numeric",
"pandas.DataFrame"
]
] |
philiptzou/DeepSpeech | [
"eb2de2a5259ab000912eb6ad658651cf743212a8"
] | [
"data_utils/data.py"
] | [
"\"\"\"Contains data generator for orgnaizing various audio data preprocessing\npipeline and offering data reader interface of PaddlePaddle requirements.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport random\nimport tarfile\nimport m... | [
[
"numpy.zeros"
]
] |
tarasowski/customer-satisfaction-machine-learning | [
"850d8d2b3ae7eb9e27e82114c0dcfc79347a4a37"
] | [
"src/train_predict/predict.py"
] | [
"import argparse\nimport json\nimport os\nimport pickle\nimport sys\nimport sagemaker_containers\nimport pandas as pd\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.utils.data\n\nfrom model import LSTMClassifier\n\nfrom utils import review_to_words, convert_and_p... | [
[
"numpy.hstack",
"torch.from_numpy",
"torch.cuda.is_available",
"torch.load"
]
] |
acse-jat20/ci_acse1 | [
"9d90efc84f0fb8c4a2030c3b4da7b4c6582d7f8d"
] | [
"simple_functions/constants.py"
] | [
"\"\"\"Docsting to fulfil linting.\"\"\"\n\nfrom functools import lru_cache\nfrom numpy import sqrt\nfrom simple_functions.functions1 import factorial\n\n\n__all__ = ['pi']\n\n\ndef pi(terms=1):\n \"\"\" Calculating pi \"\"\"\n return 1./(2.*sqrt(2.)/9801.*rsum(terms))\n\n\n@lru_cache(maxsize=None) # Note: -... | [
[
"numpy.sqrt"
]
] |
A-suozhang/SpatioTemporalSegmentation-ScanNet | [
"479de1793afe6ec20bed6c0f68498b0c49e7315c",
"479de1793afe6ec20bed6c0f68498b0c49e7315c"
] | [
"lib/transforms.py",
"models_dev/pct_voxel_utils.py"
] | [
"# Copyright (c) Chris Choy (chrischoy@ai.stanford.edu). All Rights Reserved.\n#\n# Please cite \"4D Spatio-Temporal ConvNets: Minkowski Convolutional Neural\n# Networks\", CVPR'19 (https://arxiv.org/abs/1904.08755) if you use any part of\n# the code.\nimport random\n\nimport logging\nimport numpy as np\nimport tor... | [
[
"torch.ones",
"numpy.linspace",
"numpy.min",
"numpy.clip",
"numpy.empty_like",
"torch.cat",
"torch.randperm",
"scipy.interpolate.RegularGridInterpolator",
"torch.from_numpy",
"numpy.stack",
"numpy.ones",
"numpy.max",
"numpy.zeros_like",
"numpy.remainder",
... |
kasim95/pandas | [
"3526a7104c78ed498a84e778a60314df7daf439e"
] | [
"pandas/tests/series/indexing/test_setitem.py"
] | [
"from datetime import date\n\nimport numpy as np\nimport pytest\n\nfrom pandas import (\n DatetimeIndex,\n Index,\n MultiIndex,\n NaT,\n Series,\n Timestamp,\n date_range,\n period_range,\n)\nimport pandas._testing as tm\nfrom pandas.core.indexing import IndexingError\n\nfrom pandas.tseries.... | [
[
"pandas.Series",
"pandas.period_range",
"numpy.arange",
"pandas.MultiIndex.from_tuples",
"pandas._testing.rands_array",
"pandas.Index",
"pandas.DatetimeIndex",
"pandas.date_range",
"pandas._testing.assert_series_equal",
"pandas.Timestamp",
"numpy.zeros",
"pandas.tse... |
wtyuan96/Real-time-self-adaptive-deep-stereo | [
"e630bc610c134d348c8c15e660533b2f464bba5f"
] | [
"Nets/Stereo_net.py"
] | [
"import tensorflow as tf\nimport abc\nfrom collections import OrderedDict\n\n\nclass StereoNet(object):\n __metaclass__ = abc.ABCMeta\n \"\"\"\n Meta parent class for all the convnets\n \"\"\"\n #=======================Static Class Fields=============\n _valid_args = [\n (\"split_layer\", \... | [
[
"tensorflow.get_collection"
]
] |
annusgit/forestcoverUnet | [
"8ba4eafc6e5d637d3b08fa20d029e25173f96074",
"8ba4eafc6e5d637d3b08fa20d029e25173f96074"
] | [
"Statistical_Classifiers/inference_statistical_models.py",
"utilities/utils/random_code.py"
] | [
"\"\"\"\n Given the path to a single test image, this function generates its corresponding segmentation map\n\"\"\"\nfrom __future__ import print_function\nfrom __future__ import division\nimport os\nimport gdal\nimport time\nimport torch\nimport shutil\nimport random\nimport argparse\nimport numpy as np\nimport... | [
[
"numpy.pad",
"numpy.multiply",
"matplotlib.image.imsave",
"numpy.asarray",
"torch.utils.data.DataLoader",
"numpy.nan_to_num",
"numpy.dstack",
"numpy.save",
"numpy.ceil",
"torch.no_grad",
"numpy.zeros_like",
"numpy.load"
],
[
"matplotlib.pyplot.imshow",
"... |
SpioradObrach/python-control | [
"a4b4c43e51f0fc2cbf389336a90230a6a741c0dc",
"a4b4c43e51f0fc2cbf389336a90230a6a741c0dc"
] | [
"control/tests/modelsimp_test.py",
"control/freqplot.py"
] | [
"#!/usr/bin/env python\n#\n# modelsimp_test.py - test model reduction functions\n# RMM, 30 Mar 2011 (based on TestModelSimp from v0.4a)\n\nimport unittest\nimport numpy as np\nfrom control.modelsimp import *\nfrom control.matlab import *\nfrom control.exception import slycot_check\n\nclass TestModelsimp(unittest.Te... | [
[
"numpy.matrix",
"numpy.testing.assert_raises",
"numpy.testing.assert_array_almost_equal"
],
[
"numpy.asarray",
"numpy.squeeze",
"matplotlib.pyplot.plot",
"numpy.concatenate",
"numpy.max",
"numpy.round",
"scipy.cos",
"scipy.logspace",
"matplotlib.pyplot.gca",
... |
MolSSI/dqm_server | [
"ceff64fe032590095e0f865bc1d0c2da4684404e"
] | [
"qcfractal/interface/collections/collection.py"
] | [
"\"\"\"\nMongo QCDB Abstract basic Collection class\n\nHelper\n\"\"\"\n\nimport abc\nimport copy\nimport json\nfrom typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Union\n\nimport pandas as pd\n\nfrom ..models import ProtoModel\n\nif TYPE_CHECKING: # pragma: no cover\n from .. import FractalClient\... | [
[
"pandas.DataFrame"
]
] |
ghisvail/pyoperators | [
"af8bb089e1ac42b649592488dbd49a609e3f833a",
"af8bb089e1ac42b649592488dbd49a609e3f833a"
] | [
"pyoperators/fft.py",
"test/test_linear.py"
] | [
"from __future__ import absolute_import, division, print_function\n\nimport numpy as np\nimport os\nimport time\n\nfrom .config import LOCAL_PATH\nfrom .core import (\n AdditionOperator, CompositionOperator, DiagonalOperator, HomothetyOperator,\n Operator, _pool)\nfrom .flags import aligned, contiguous, inpla... | [
[
"numpy.dtype",
"numpy.array",
"numpy.conjugate"
],
[
"numpy.radians",
"numpy.arange",
"numpy.cos",
"numpy.ones",
"numpy.sin",
"numpy.diff",
"numpy.array",
"numpy.zeros",
"numpy.trapz"
]
] |
ClandininLab/multistim | [
"9aba24a85317e4cbd81555be45c4df87cfad035c",
"9aba24a85317e4cbd81555be45c4df87cfad035c"
] | [
"visanalysis/visanalysis/analysis/volumetric_data.py",
"visprotocol/visprotocol/clandinin_data.py"
] | [
"from visanalysis.analysis import imaging_data\nimport numpy as np\nfrom scipy import stats\nimport nibabel as nib\n\n\nclass VolumetricDataObject(imaging_data.ImagingDataObject):\n def __init__(self, file_path, series_number, quiet=False):\n super().__init__(file_path, series_number, quiet=quiet)\n\n ... | [
[
"numpy.logical_and",
"numpy.reshape",
"numpy.arange",
"numpy.isnan",
"numpy.nanmin",
"numpy.ndarray",
"numpy.concatenate",
"numpy.delete",
"numpy.append",
"numpy.mean",
"numpy.any",
"numpy.nanmean",
"numpy.array",
"numpy.where",
"numpy.empty"
],
[
... |
nadgeri14/allennlp | [
"2eefffaf71612263a1c20e8ce4107849cfd5efe3",
"2eefffaf71612263a1c20e8ce4107849cfd5efe3",
"2eefffaf71612263a1c20e8ce4107849cfd5efe3",
"2eefffaf71612263a1c20e8ce4107849cfd5efe3",
"2eefffaf71612263a1c20e8ce4107849cfd5efe3"
] | [
"allennlp/modules/seq2seq_decoders/lstm_cell_decoder_net.py",
"allennlp/models/decomposable_attention.py",
"scripts/write_srl_predictions_to_conll_format.py",
"allennlp/tests/common/from_params_test.py",
"allennlp/tests/training/metrics/spearman_correlation_test.py"
] | [
"from typing import Tuple, Dict, Optional\nfrom overrides import overrides\n\nimport torch\nfrom torch.nn import LSTMCell\n\nfrom allennlp.modules import Attention\nfrom allennlp.modules.seq2seq_decoders.decoder_net import DecoderNet\nfrom allennlp.nn import util\n\n\n@DecoderNet.register(\"lstm_cell\")\nclass Lstm... | [
[
"torch.nn.LSTMCell",
"torch.cat"
],
[
"torch.nn.CrossEntropyLoss",
"torch.nn.functional.softmax",
"torch.cat"
],
[
"torch.autograd.no_grad"
],
[
"torch.all"
],
[
"numpy.random.randint",
"numpy.random.randn",
"torch.FloatTensor",
"numpy.unique"
]
] |
dumpmemory/tianshou | [
"bc53ead273f6f9d3788a78ecc739249eeb96b8c6",
"9c100e07057ad99f0a62d6e329451093dd44300a"
] | [
"tianshou/utils/net/discrete.py",
"test/modelbased/test_ppo_icm.py"
] | [
"from typing import Any, Dict, Optional, Sequence, Tuple, Union\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\n\nfrom tianshou.data import Batch, to_torch\nfrom tianshou.utils.net.common import MLP\n\n\nclass Actor(nn.Module):\n \"\"\"Simple actor network.\n\n Will... | [
[
"torch.nn.functional.softmax",
"numpy.sqrt",
"torch.cat",
"torch.nn.init.constant_",
"torch.nn.functional.one_hot",
"torch.arange",
"torch.nn.Linear",
"torch.nn.functional.mse_loss",
"torch.FloatTensor",
"torch.rand",
"numpy.prod",
"torch.nn.init.xavier_uniform_",
... |
bpiwowar/capreolus-xpm | [
"5374eb48df96b54d51365fc32441ae50a3e634c2"
] | [
"capreolus/reranker/tests/test_rerankers.py"
] | [
"import pytest\nimport torch\n\nfrom capreolus.reranker.POSITDRMM import POSITDRMM\nfrom capreolus.reranker.KNRM import KNRM\n\n\ndef test_validate_params_for_knrm():\n with pytest.raises(ValueError):\n KNRM.validate_params({\"foo\": \"bar\"})\n\n with pytest.raises(ValueError):\n KNRM.validate_... | [
[
"torch.eq",
"torch.tensor"
]
] |
zhen-jia/incubator-tvm | [
"37af1e7fa8aeebb0d996d7018bceb9a1b567e4dd",
"37af1e7fa8aeebb0d996d7018bceb9a1b567e4dd"
] | [
"tests/micro/zephyr/test_zephyr_aot.py",
"tests/micro/zephyr/test_zephyr.py"
] | [
"# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y... | [
[
"numpy.load",
"numpy.zeros",
"numpy.ones"
],
[
"numpy.expand_dims",
"numpy.asarray",
"numpy.ones",
"numpy.concatenate",
"numpy.argmax",
"numpy.random.rand",
"numpy.array",
"numpy.zeros",
"numpy.random.randint"
]
] |
sogartar/torch-mlir | [
"19e9fc4ef12d7207eadd3dc9121aebe1555ea8dd",
"19e9fc4ef12d7207eadd3dc9121aebe1555ea8dd",
"19e9fc4ef12d7207eadd3dc9121aebe1555ea8dd"
] | [
"python/torch_mlir_e2e_test/torchscript/configs/torchscript.py",
"e2e_testing/torchscript/basic.py",
"python/test/annotations-sugar.py"
] | [
"# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.\n# See https://llvm.org/LICENSE.txt for license information.\n# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception\n# Also available under a BSD-style license. See LICENSE.\n\nimport copy\nfrom typing import Any\n\nimport torch\n\... | [
[
"torch.jit.script"
],
[
"torch.mm",
"torch.transpose",
"torch.cat",
"torch.nn.Flatten",
"torch.tensor",
"torch.nn.MaxPool2d",
"torch.nn.AdaptiveAvgPool2d",
"torch.bmm",
"torch.gather"
],
[
"torch.jit.script",
"torch.mm"
]
] |
michellqueiroz-ua/instance-generator | [
"8b431a64898bcf1006464a8394824ab57576811e"
] | [
"REQreate/retrieve_zones.py"
] | [
"import math\nimport matplotlib.pyplot as plt\nimport os\nimport osmnx as ox\nimport pandas as pd\nfrom shapely.geometry import Polygon\n\n\ndef retrieve_zones(G_walk, G_drive, place_name, save_dir, output_folder_base, BBx, BBy):\n\n zones = []\n zone_id = 0\n\n save_dir_csv = os.path.join(save_dir, 'csv')... | [
[
"matplotlib.pyplot.close",
"pandas.read_csv",
"pandas.DataFrame"
]
] |
SKKU-ESLAB/Auto-Compression | [
"a54143e97f5ba08daa4150fd880f5be1346f3d71"
] | [
"quantization/lbq-v2/lbq-v1/functions/duq_2.py"
] | [
"from __future__ import absolute_import\r\nfrom __future__ import division\r\nfrom __future__ import print_function\r\nfrom __future__ import unicode_literals\r\n\r\nimport torch \r\nimport torch.nn as nn \r\nimport torch.nn.functional as F\r\nfrom torch.nn.parameter import Parameter\r\nfrom torch import Tensor\r\n... | [
[
"torch.nn.functional.softmax",
"torch.nn.functional.gumbel_softmax",
"numpy.abs",
"torch.Tensor",
"torch.round",
"torch.nn.functional.conv2d",
"numpy.sort",
"torch.tensor",
"torch.tanh",
"torch.nn.functional.relu",
"torch.no_grad",
"torch.nn.functional.hardtanh",
... |
GMDennis/claf | [
"d1e064e593127e5d654f000f5506c5ae1caab5ce",
"d1e064e593127e5d654f000f5506c5ae1caab5ce",
"d1e064e593127e5d654f000f5506c5ae1caab5ce"
] | [
"claf/data/dataset/bert/multi_task.py",
"claf/tokens/embedding/cove_embedding.py",
"claf/modules/layer/normalization.py"
] | [
"\nimport json\nfrom overrides import overrides\nimport torch\nimport random\n\nfrom claf.config.factory.data_loader import make_data_loader\nfrom claf.data.dataset.base import DatasetBase\n\n\nclass MultiTaskBertDataset(DatasetBase):\n \"\"\"\n Dataset for Multi-Task GLUE using BERT\n\n * Args:\n b... | [
[
"torch.cuda.is_available"
],
[
"torch.nn.Dropout"
],
[
"torch.ones",
"torch.zeros"
]
] |
yzh119/dgl | [
"6a7c1eb2323383739585259c70c8b9065ca95d1e"
] | [
"examples/pytorch/graphsage/experimental/train_dist_unsupervised.py"
] | [
"import os\nos.environ['DGLBACKEND']='pytorch'\nfrom multiprocessing import Process\nimport argparse, time, math\nimport numpy as np\nfrom functools import wraps\nimport tqdm\nimport sklearn.linear_model as lm\nimport sklearn.metrics as skm\n\nimport dgl\nfrom dgl import DGLGraph\nfrom dgl.data import register_data... | [
[
"torch.ones_like",
"torch.randint",
"sklearn.linear_model.LogisticRegression",
"torch.distributed.init_process_group",
"torch.cat",
"numpy.asarray",
"numpy.arange",
"torch.utils.data.DataLoader",
"torch.zeros_like",
"torch.distributed.barrier",
"torch.no_grad",
"tor... |
rahulvenkk/pytorch3d | [
"68bfac3394f9a87fb268165d1c9dd264e1d9316b",
"68bfac3394f9a87fb268165d1c9dd264e1d9316b"
] | [
"tests/test_meshes.py",
"pytorch3d/transforms/transform3d.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n\nimport random\nimport unittest\n\nimport numpy as np\nimport torch\nfrom common_testing import TestCaseMixin\nfrom pytorch3d.structures.meshes import Meshes\n\n\nclass TestMeshes(TestCaseMixin, unittest.TestCase):\n def setUp(self) -> No... | [
[
"torch.randint",
"torch.max",
"torch.zeros",
"torch.cat",
"numpy.concatenate",
"torch.device",
"torch.allclose",
"torch.cuda.synchronize",
"numpy.allclose",
"numpy.unique",
"torch.eye",
"torch.tensor",
"torch.rand",
"torch.full",
"torch.min",
"torch.... |
vivaan-park/go | [
"f90004eccebf83e21f181f6c84b160b7b6a21ba6",
"f90004eccebf83e21f181f6c84b160b7b6a21ba6"
] | [
"dlgo/rl/zero_experience.py",
"test_ac.py"
] | [
"# © 2020 지성. all rights reserved.\n# <llllllllll@kakao.com>\n# MIT License\n\nimport numpy as np\n\nclass ZeroExperienceCollector:\n def __init__(self):\n self.states = []\n self.visit_counts = []\n self.rewards = []\n self._current_episode_states = []\n self._current_episode_... | [
[
"numpy.array"
],
[
"tensorflow.keras.models.Model",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.ZeroPadding2D",
"tensorflow.keras.layers.Flatten"
]
] |
llxcn/conformer_Informer | [
"717cc9edf6a65dbef4ad53d14e2e2811c57fe24b"
] | [
"loss/dilate_loss.py"
] | [
"import torch\nfrom . import soft_dtw\nfrom . import path_soft_dtw \n\ndef dilate_loss(outputs, targets, alpha, gamma, device):\n\t# outputs, targets: shape (batch_size, N_output, 1)\n\tbatch_size, N_output = outputs.shape[0:2]\n\tloss_shape = 0\n\tsoftdtw_batch = soft_dtw.SoftDTWBatch.apply\n\tD = torch.zeros((bat... | [
[
"torch.range",
"torch.sum",
"torch.zeros"
]
] |
ukaea/ALC_UQ | [
"a2747c94036b04f1279abb5683c6a225a878aea3"
] | [
"user_interface/python/container.py"
] | [
"# A simple container class with parents and children used to construct the DAKOTA input file.\n# Mulitple instances can be used to implement a tree which keeps track of the tiered structure \n# of the variables in the file. \n\n# Each line of the file is an instance of this class with the following member data:\n#... | [
[
"numpy.all"
]
] |
BrokenShell/LabsStarter | [
"04c11aa4d7149f38ee5597cab46ea3ed0408ccf3"
] | [
"model/builder.py"
] | [
"from sklearn import svm, datasets\nfrom joblib import dump\nfrom sklearn.model_selection import train_test_split\n\n\nX, y = datasets.load_iris(return_X_y=True)\nX_train, X_test, y_train, y_test = train_test_split(\n X, y,\n test_size=0.2,\n stratify=y,\n random_state=42,\n)\nmodel = svm.SVC(\n clas... | [
[
"sklearn.datasets.load_iris",
"sklearn.model_selection.train_test_split",
"sklearn.svm.SVC"
]
] |
Peefy/PythonsWithVSCode | [
"711e710d2903e056ffe2ff22e279b86bd950a925"
] | [
"src/neurolab/chnn.py"
] | [
"\n# python python/chnn.py\n# python3 python/chnn.py\n\nimport numpy as np\nimport neurolab as nl\nimport pylab as pl\nimport matplotlib.pyplot as plt\n# num of input layer\nn = 9\n# num of output layer\nm = 3\n# num of hidden layer\nH = 3\n# input and output data range min\ndata_min = 0\n# input and output data ra... | [
[
"matplotlib.pyplot.scatter",
"numpy.arange",
"numpy.sin",
"numpy.array",
"matplotlib.pyplot.show"
]
] |
gbdrt/lale | [
"291f824a6b96f088e787979ca768f50d7758424e",
"291f824a6b96f088e787979ca768f50d7758424e",
"291f824a6b96f088e787979ca768f50d7758424e",
"291f824a6b96f088e787979ca768f50d7758424e",
"291f824a6b96f088e787979ca768f50d7758424e"
] | [
"lale/lib/autogen/max_abs_scaler.py",
"lale/lib/sklearn/gradient_boosting_classifier.py",
"test/test_type_checking.py",
"lale/lib/sklearn/linear_regression.py",
"lale/lib/autogen/random_forest_regressor.py"
] | [
"from numpy import inf, nan\nfrom sklearn.preprocessing import MaxAbsScaler as Op\n\nfrom lale.docstrings import set_docstrings\nfrom lale.operators import make_operator\n\n\nclass MaxAbsScalerImpl:\n def __init__(self, **hyperparams):\n self._hyperparams = hyperparams\n self._wrapped_model = Op(**... | [
[
"sklearn.preprocessing.MaxAbsScaler"
],
[
"sklearn.ensemble.GradientBoostingClassifier"
],
[
"pandas.DataFrame.from_records",
"sklearn.datasets.load_iris",
"sklearn.model_selection.train_test_split"
],
[
"sklearn.linear_model.LinearRegression"
],
[
"sklearn.ensemble.Ran... |
FredrikM97/Medical-ROI | [
"54246341460c04caeced2ef6dcab984f6c260c9d"
] | [
"src/models/resnet_brew2.py"
] | [
"import torch\nimport torch.nn as nn\n\nmodel_urls = {\n 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth',\n 'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth',\n 'resnet50': 'https://download.pytorch.org/models/resnet50-19c8e357.pth',\n 'resnet101': 'https://... | [
[
"torch.nn.Sequential",
"torch.nn.init.constant_",
"torch.nn.AdaptiveAvgPool3d",
"torch.nn.MaxPool3d",
"torch.nn.Conv3d",
"torch.nn.Linear",
"torch.flatten",
"torch.nn.ReLU",
"torch.nn.init.kaiming_normal_"
]
] |
gepcel/spyder | [
"a7449407a5cac27a24419316b0c42f6737608b16"
] | [
"spyder/plugins/variableexplorer/widgets/collectionseditor.py"
] | [
"# -*- coding: utf-8 -*-\r\n# -----------------------------------------------------------------------------\r\n# Copyright © Spyder Project Contributors\r\n#\r\n# Licensed under the terms of the MIT License\r\n# (see spyder/__init__.py for details)\r\n# --------------------------------------------------------------... | [
[
"numpy.complex128",
"pandas.Series",
"numpy.linspace",
"numpy.bool",
"pandas.DataFrame",
"numpy.ma.array",
"numpy.bool_",
"numpy.complex64",
"numpy.random.randint",
"numpy.float16",
"numpy.int8",
"pandas.DatetimeIndex",
"numpy.save",
"numpy.float32",
"nu... |
darpanshah-wsu/openAlt_W2021 | [
"21926665bcb0ef5b0d6e8f130788bbea6fb3ebb0",
"21926665bcb0ef5b0d6e8f130788bbea6fb3ebb0"
] | [
"web/uploadUni.py",
"web/downloadResultsJSON.py"
] | [
"# Author: Darpan (Lines 1-236)\n\"\"\"\nMIT License\n\nCopyright (c) 2020 tdbowman-CompSci-F2020\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without l... | [
[
"pandas.read_csv",
"pandas.DataFrame"
],
[
"pandas.read_csv"
]
] |
CGruich/ocp | [
"dd97972b39d4a05e37f745e393a5245657ef5f9e"
] | [
"ocpmodels/trainers/forces_trainer.py"
] | [
"\"\"\"\nCopyright (c) Facebook, Inc. and its affiliates.\n\nThis source code is licensed under the MIT license found in the\nLICENSE file in the root directory of this source tree.\n\"\"\"\n\nimport os\nfrom collections import defaultdict\n\nimport numpy as np\nimport torch\nimport torch_geometric\nfrom torch.util... | [
[
"torch.abs",
"torch.LongTensor",
"torch.cat",
"numpy.unique",
"torch.utils.data.DataLoader",
"torch.cuda.empty_cache",
"torch.zeros_like",
"torch.cuda.amp.autocast",
"torch.tensor",
"torch.sum",
"numpy.savez_compressed",
"torch.no_grad",
"torch.split",
"nump... |
thatguuyG/ivy | [
"09447a9670d440a309b62cfb468c1036e3a4f5ed"
] | [
"ivy_tests/test_ivy/test_functional/test_nn/test_losses.py"
] | [
"# global\nimport pytest\nimport numpy as np\nfrom hypothesis import given, assume, strategies as st\n\n# local\nimport ivy\nimport ivy.functional.backends.numpy as ivy_np\nimport ivy_tests.test_ivy.helpers as helpers\n\n\n# cross_entropy\n@given(\n dtype_and_x=helpers.dtype_and_values(ivy_np.valid_numeric_dtype... | [
[
"numpy.asarray"
]
] |
KonradKarimi/K9UVR_ML | [
"866d25c29e13e1abe676bfcd3e0fff454f22a5f3"
] | [
"generate_tfrecords.py"
] | [
"\"\"\"\nUsage:\n # From tensorflow/models/\n # Create train data:\n python generate_tfrecords.py --csv_input=data/train_labels.csv --output_path=data/records/train.record --image_dir=/Datasets/\n # Create test data:\n python generate_tfrecords.py --csv_input=data/test_labels.csv --output_path=data/records/t... | [
[
"tensorflow.io.TFRecordWriter",
"pandas.read_csv"
]
] |
NielsRogge/flax | [
"f23cb3823fe27e60ecf3be4fc345e2f8593fde18"
] | [
"examples/wmt/bleu.py"
] | [
"# Copyright 2021 The Flax 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 applicable law or a... | [
[
"numpy.array"
]
] |
aminatadjer/CodeXGLUE | [
"7d3787979e8e0b504768a16607fe39ee7f1502f3"
] | [
"Code-Text/code-to-text/code/run.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.load",
"torch.utils.data.DataLoader",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device",
"numpy.exp",
"torch.distributed.init_process_group",
"torch.nn.TransformerDecoderLayer",
"torch.utils.data.distributed.DistributedSampler",
"torch.utils.data.TensorDatas... |
bycn/dm_control | [
"cb4f4e78fe2963502447a4fa224ac84522e1e408"
] | [
"dm_control/locomotion/tasks/go_to_target.py"
] | [
"# Copyright 2019 The dm_control 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 applicable law... | [
[
"numpy.array",
"numpy.cos",
"numpy.sin"
]
] |
UESTC-Liuxin/CVMI_Sementic_Segmentation | [
"dc5bf6e940cf6961ef65abb6e7ec372f29d55249"
] | [
"model/decode_heads/danet/danet.py"
] | [
"'''\nAuthor: Liu Xin\nDate: 2021-11-30 16:50:20\nLastEditors: Liu Xin\nLastEditTime: 2021-11-30 16:53:51\nDescription: file content\nFilePath: /CVMI_Sementic_Segmentation/model/decode_heads/danet/danet.py\n'''\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom model.builder import DECODE_H... | [
[
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.Dropout2d"
]
] |
tvlearn/tvo | [
"5a94f78781abc56446b87e74d8447ee73b74dd5b"
] | [
"tvo/utils/data.py"
] | [
"# -*- coding: utf-8 -*-\n# Copyright (C) 2019 Machine Learning Group of the University of Oldenburg.\n# Licensed under the Academic Free License version 3.0\n\nimport torch as to\nimport torch.distributed as dist\nfrom torch.utils.data import TensorDataset, DataLoader, Dataset, Sampler\nimport numpy as np\nimport ... | [
[
"numpy.random.choice",
"numpy.arange",
"torch.distributed.is_initialized",
"numpy.random.shuffle",
"torch.tensor",
"numpy.concatenate",
"torch.arange",
"torch.distributed.get_world_size"
]
] |
ergs/transmutagen-paper | [
"0ca7100d5b3021599558b6025c928e2bb8f88ae3"
] | [
"decay_compare.py"
] | [
"#!/usr/bin/env python\nfrom pprint import pprint\nfrom collections import defaultdict\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom sympy import exp\n\nfrom pyne import nucname\nfrom pyne.material import Material\nfrom pyne import cram\n\nfrom transmutagen.origen_all import TIME_STEPS\n\n\nnp.set_pr... | [
[
"numpy.logspace",
"numpy.set_printoptions",
"numpy.zeros",
"numpy.abs"
]
] |
feloundou/research-project | [
"fe7f5414901f02ae24ef33af31e65782d8511da1"
] | [
"algos/train_expert_cpo.py"
] | [
"from datetime import datetime as dt, timedelta\nimport numpy as np\nimport os\nimport torch\nfrom torch.nn import MSELoss\n\nfrom torch.optim import LBFGS, Adam\nfrom adabelief_pytorch import AdaBelief\n\nfrom torch_cpo_utils import *\n# from cpo_torch import CPO\nfrom buffer_torch import *\nfrom models_torch impo... | [
[
"torch.mean",
"numpy.sum",
"torch.load",
"torch.sqrt",
"torch.cat",
"torch.zeros",
"torch.sum",
"torch.unsqueeze",
"torch.tensor",
"torch.matmul",
"torch.pow",
"torch.no_grad",
"numpy.mean",
"torch.arange",
"torch.cumsum",
"torch.nn.MSELoss",
"to... |
FFI-Vietnam/CameraTraps-FFIVietnamAdaptation | [
"308107436332aa07a73bf75b124d11947fde557c"
] | [
"api/batch_processing/postprocessing/postprocess_batch_results.py"
] | [
"\"\"\"\n\npostprocess_batch_results.py\n\nGiven a .json or .csv file representing the output from the batch detection API,\ndo one or more of the following:\n\n* Evaluate detector precision/recall, optionally rendering results (requires\n ground truth)\n* Sample true/false positives/negatives and render to HTML... | [
[
"matplotlib.use",
"sklearn.metrics.precision_recall_curve",
"pandas.DataFrame",
"matplotlib.pyplot.savefig",
"numpy.append",
"numpy.argmax",
"numpy.mean",
"sklearn.metrics.average_precision_score",
"numpy.any",
"matplotlib.pyplot.close",
"numpy.savetxt",
"numpy.arra... |
FlyingOE/zipline | [
"220ffc54a8f4d4f5afdbab86db39f8f512083e53"
] | [
"tests/data/bundles/test_core.py"
] | [
"import os\n\nfrom nose_parameterized import parameterized\nimport pandas as pd\nfrom toolz import valmap\nimport toolz.curried.operator as op\n\nfrom zipline.assets.synthetic import make_simple_equity_info\nfrom zipline.data.bundles import UnknownBundle, from_bundle_ingest_dirname\nfrom zipline.data.bundles.core i... | [
[
"pandas.Timestamp",
"pandas.Index",
"pandas.Timedelta"
]
] |
wonambi-python/wonambi | [
"4e2834cdd799576d1a231ecb48dfe4da1364fe3a"
] | [
"wonambi/ioeeg/bci2000.py"
] | [
"from os import SEEK_CUR, SEEK_SET, SEEK_END\nfrom re import search, finditer, match\nfrom datetime import datetime\n\nfrom numpy import (fromfile,\n frombuffer,\n asmatrix,\n array,\n arange,\n c_,\n diff,\n... | [
[
"numpy.fromfile",
"numpy.arange",
"numpy.ndarray",
"numpy.empty",
"numpy.dtype",
"numpy.asmatrix",
"numpy.frombuffer",
"numpy.diff",
"numpy.array",
"numpy.vstack"
]
] |
aganostosrage/AI-based-stock-prediction | [
"e8d5599be97d3a05fbee1d727a6aba774b8a1534"
] | [
"User/views.py"
] | [
"from django.shortcuts import render, redirect\n#from .models import DoctorReg, predictions, Regdb\nfrom django.contrib import messages\nfrom django.contrib.auth.models import User, auth\nimport pandas as pd\n\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.tree import DecisionTreeRegressor\n\n\... | [
[
"pandas.read_csv",
"sklearn.tree.DecisionTreeRegressor"
]
] |
mortonne/PyMVPA | [
"98644c5cd9733edd39fac746ea7cf67398674645",
"98644c5cd9733edd39fac746ea7cf67398674645",
"98644c5cd9733edd39fac746ea7cf67398674645",
"98644c5cd9733edd39fac746ea7cf67398674645",
"98644c5cd9733edd39fac746ea7cf67398674645",
"98644c5cd9733edd39fac746ea7cf67398674645",
"98644c5cd9733edd39fac746ea7cf6739867464... | [
"mvpa2/misc/data_generators.py",
"mvpa2/misc/plot/topo.py",
"mvpa2/tests/test_misc_plot.py",
"mvpa2/clfs/mass.py",
"mvpa2/testing/datasets.py",
"mvpa2/tests/test_perturbsensana.py",
"mvpa2/support/scipy/stats.py"
] | [
"# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##\n#\n# See COPYING file distributed along with the PyMVPA package for the\n# copyright and license terms.\n#\n### ###... | [
[
"numpy.convolve",
"numpy.hstack",
"numpy.dot",
"numpy.sqrt",
"numpy.linspace",
"numpy.abs",
"numpy.random.standard_normal",
"numpy.arange",
"numpy.sin",
"numpy.ones",
"numpy.random.normal",
"scipy.signal.butter",
"numpy.random.randn",
"numpy.random.rand",
... |
tantao258/tensorflow-yolov3 | [
"6f6a1c92a58e019af5fc7ffaecf96e6f249355c4"
] | [
"quick_train.py"
] | [
"#! /usr/bin/env python\n# coding=utf-8\n#================================================================\n# Copyright (C) 2018 * Ltd. All rights reserved.\n#\n# Editor : VIM\n# File name : quick_train.py\n# Author : YunYang1994\n# Created date: 2018-12-07 17:58:58\n# Description :\n#\n#===... | [
[
"numpy.expand_dims",
"tensorflow.global_variables",
"tensorflow.placeholder",
"tensorflow.global_variables_initializer",
"tensorflow.train.AdamOptimizer",
"tensorflow.Session",
"tensorflow.variable_scope",
"numpy.array"
]
] |
dongxulee/lifeCycle | [
"2b4a74dbd64357d00b29f7d946a66afcba747cc6",
"2b4a74dbd64357d00b29f7d946a66afcba747cc6",
"2b4a74dbd64357d00b29f7d946a66afcba747cc6"
] | [
"20200616/functions/header.py",
"20210528/.ipynb_checkpoints/constant-checkpoint.py",
"20210528/.ipynb_checkpoints/constantHighSkill2-checkpoint.py"
] | [
"# header files and constant variables\nfrom mpl_toolkits.mplot3d import Axes3D\nimport numpy as np\nfrom scipy.interpolate import RectBivariateSpline as RS\nfrom multiprocessing import Pool\nfrom functools import partial\nfrom pyswarm import pso\nimport warnings\nwarnings.filterwarnings(\"ignore\")\nnp.printoption... | [
[
"numpy.load",
"numpy.array",
"numpy.printoptions"
],
[
"numpy.printoptions",
"numpy.linspace",
"numpy.genfromtxt",
"numpy.prod",
"numpy.load",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.printoptions",
"numpy.linspace",
"numpy.genfromtxt",
"numpy.prod",
... |
rift-labs-developer/colour | [
"15112dbe824aab0f21447e0db4a046a28a06f43a",
"15112dbe824aab0f21447e0db4a046a28a06f43a",
"15112dbe824aab0f21447e0db4a046a28a06f43a",
"15112dbe824aab0f21447e0db4a046a28a06f43a",
"15112dbe824aab0f21447e0db4a046a28a06f43a",
"15112dbe824aab0f21447e0db4a046a28a06f43a",
"15112dbe824aab0f21447e0db4a046a28a06f43... | [
"colour/quality/tm3018.py",
"colour/colorimetry/tests/test_luminance.py",
"colour/io/luts/tests/test__init__.py",
"colour/contrast/barten1999.py",
"colour/appearance/hunt.py",
"colour/models/rgb/transfer_functions/rimm_romm_rgb.py",
"colour/temperature/tests/test_krystek1985.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nANSI/IES TM-30-18 Colour Fidelity Index\n=======================================\n\nDefines the *ANSI/IES TM-30-18 Colour Fidelity Index* (CFI) computation\nobjects:\n\n- :class:`colour.quality.ColourQuality_Specification_ANSIIESTM3018`\n- :func:`colour.quality.colour_fidelity_inde... | [
[
"numpy.arange",
"numpy.linalg.norm",
"numpy.cos",
"numpy.sin",
"numpy.mean",
"numpy.floor",
"numpy.sum",
"numpy.empty"
],
[
"numpy.reshape",
"numpy.array",
"numpy.tile"
],
[
"numpy.array"
],
[
"numpy.log",
"numpy.exp",
"numpy.sqrt"
],
[
... |
jjohnson-arm/incubator-tvm | [
"2b6d69c62c07acc102c6ca42ee5c4edcc3de41f1"
] | [
"python/tvm/relay/frontend/tensorflow.py"
] | [
"\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\");... | [
[
"tensorflow.python.framework.tensor_util.MakeNdarray",
"numpy.expand_dims",
"numpy.squeeze",
"numpy.cumsum",
"numpy.dtype",
"tensorflow.python.framework.dtypes.as_dtype",
"numpy.prod",
"numpy.array",
"tensorflow.python.framework.tensor_util.TensorShapeProtoToList"
]
] |
cair/covid-19-us-dataset | [
"f4193c6c5ee8a7176c851065ed0a5879149f617a"
] | [
"main.py"
] | [
"import datetime\nfrom functools import reduce\n\nimport gym\nimport numpy as np\nimport pandas as pd\nfrom loguru import logger\nimport us_state_abbrev\nimport util\nimport matplotlib.pyplot as plt\nimport argparse\nimport seaborn as sns\npd.options.mode.chained_assignment = None\n\ndef print_full(x):\n pd.set_... | [
[
"pandas.reset_option",
"pandas.merge",
"matplotlib.pyplot.savefig",
"pandas.set_option",
"numpy.zeros"
]
] |
spring-epfl/trickster | [
"070a8ea8894d8bf3e97d0774b12c64458aa2c219",
"070a8ea8894d8bf3e97d0774b12c64458aa2c219"
] | [
"scripts/legacy/wfp_adversarial_deterministic_raw_features.py",
"scripts/legacy/malware.py"
] | [
"import sys\n\nsys.path.append(\"..\")\n\nimport os\nimport math\nimport pickle\nimport argparse\n\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nfrom itertools import groupby\nfrom IPython.display import display, HTML\n\nfrom trickster.search import a_star_search\nfrom trickster.wfp_helper import... | [
[
"numpy.abs",
"sklearn.linear_model.LogisticRegression",
"sklearn.model_selection.train_test_split",
"pandas.DataFrame",
"numpy.linalg.norm",
"numpy.array"
],
[
"scipy.sparse.issparse",
"numpy.random.seed",
"numpy.random.choice",
"numpy.arange",
"numpy.linalg.norm",
... |
jinyongyoo/QACProject | [
"2f5d63f68fb6d4959852b1b997abb4358d416ba4"
] | [
"data.py"
] | [
"import os\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data import IterableDataset\n\nclass Dictionary(object):\n def __init__(self, paths):\n self.char2idx = {}\n self.idx2char = []\n self.max_seq_len = 0\n self.build_dictionary(paths)\n\n def build_dictionary(self, pat... | [
[
"torch.LongTensor",
"torch.utils.data.get_worker_info"
]
] |
ubik2/PEGAS-kRPC | [
"8f6628743a48a2cc700d57e62c0a49c94846f8c8"
] | [
"kRPC/plane_error.py"
] | [
"import numpy as np\r\n\r\n\r\ndef plane_error(results, target):\r\n \"\"\"\r\n Computes angle between target orbital plane and actually achieved plane.\r\n \r\n :param results: Results struct as output by flight_manager (NOT flight_sim_3d).\r\n :param target: Target struct as output by launch_target... | [
[
"numpy.deg2rad",
"numpy.array",
"numpy.vdot"
]
] |
espittle/aws-deepracer-workshops | [
"aa3679f98d83fac7239e939ad593ca2876559519",
"aa3679f98d83fac7239e939ad593ca2876559519"
] | [
"Advanced workshops/AI Driving Olympics 2019/challenge_train_w_PPO/src/markov/utils.py",
"Advanced workshops/AI Driving Olympics 2019/challenge_train_w_PPO/src/markov/environments/deepracer_racetrack_env_original.py"
] | [
"import json\nimport logging\nimport os\nimport sys\nimport signal\nimport socket\nimport time\nimport datetime\nimport inspect\nfrom collections import OrderedDict\n\nSIMAPP_VERSION=\"1.0\"\n\nSIMAPP_SIMULATION_WORKER_EXCEPTION = \"simulation_worker.exceptions\"\nSIMAPP_TRAINING_WORKER_EXCEPTION = \"training_worke... | [
[
"tensorflow.graph_util.convert_variables_to_constants",
"tensorflow.train.write_graph"
],
[
"numpy.all",
"numpy.array",
"numpy.flipud",
"scipy.spatial.transform.Rotation.from_quat"
]
] |
Ung0d/NeuroAlign | [
"c73fd6f2d9c2fdb2e627a13ea1c45fb069e36ca4"
] | [
"code/TestProteinGNN.py"
] | [
"#third party imports\nimport tensorflow as tf\n\nfrom graph_nets import utils_np\nfrom graph_nets import utils_tf\nfrom graph_nets.demos import models\nfrom graph_nets import modules\nfrom graph_nets import blocks\n\nimport matplotlib.pyplot as plt\nimport networkx as nx\nimport argparse\nimport multiprocessing\ni... | [
[
"matplotlib.pyplot.draw",
"numpy.concatenate",
"tensorflow.global_variables_initializer",
"tensorflow.Session",
"tensorflow.train.Saver",
"matplotlib.pyplot.show",
"numpy.zeros",
"matplotlib.pyplot.figure"
]
] |
emily101-gif/immport-galaxy | [
"8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c",
"8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c"
] | [
"tools/flowtools/ftxt_tools/auto_collapse_pops.py",
"tools/flowtools/ftxt_tools/flowclrstats.py"
] | [
"#!/usr/bin/env python\n\n######################################################################\n# Copyright (c) 2016 Northrop Grumman.\n# All rights reserved.\n######################################################################\nfrom __future__ import print_function\ni... | [
[
"pandas.read_table"
],
[
"pandas.read_table"
]
] |
angusl95/darts-kbc | [
"85fc6f4bdb7ba73c07d96ce47e96634599b346f9"
] | [
"kbc/combined/train_search.py"
] | [
"import os\nimport sys\nimport time\nimport glob\nimport tqdm\nimport numpy as np\nimport torch\nimport utils\nimport logging\nimport argparse\nimport torch.nn as nn\nimport torch.utils\nimport torch.utils.data\nimport torch.nn.functional as F\nimport torch.backends.cudnn as cudnn\n\nfrom torch import optim\nfrom t... | [
[
"torch.nn.CrossEntropyLoss",
"torch.nn.LogSoftmax",
"torch.nn.functional.softmax",
"torch.norm",
"torch.cuda.set_device",
"torch.cuda.manual_seed",
"numpy.random.seed",
"torch.manual_seed",
"torch.utils.data.DataLoader",
"torch.zeros_like",
"torch.cuda.is_available",
... |
hujianhang2996/slambook_python | [
"26eabfe5a8d6f3e534452f6ccf5b43af838ffc8f"
] | [
"ch7/triangulation.py"
] | [
"import cv2 as cv\nimport numpy as np\nfrom ch7.pose_estimation_2d2d import find_feature_matches, pose_estimation_2d2d, pixel2cam\n\nK = np.array([[520.9, 0, 325.1],\n [0, 521.0, 249.7],\n [0, 0, 1]])\n\n\ndef triangulation(kp_1, kp_2, ms, r_mat, t_vec):\n T1 = np.array([[1, 0, 0, 0],\n... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.matmul"
]
] |
leelew/HRSEPP | [
"b841b1abe529e66b428bd7a265292cc1746b431d"
] | [
"src/factory/loss.py"
] | [
"import tensorflow as tf\nfrom tensorflow.keras import losses\nimport tensorflow.python.keras.backend as K\n\nclass ImageGradientDifferenceLoss(losses.Loss):\n def __init__(self):\n super().__init__()\n\n def call(self, y_true, y_pred):\n # for 5D inputs\n gdl = 0\n for i in range(... | [
[
"tensorflow.math.reduce_mean",
"tensorflow.math.multiply",
"tensorflow.python.keras.backend.abs",
"tensorflow.square",
"tensorflow.image.image_gradients",
"tensorflow.image.ssim"
]
] |
kazu0914/ssd_keras_anotation | [
"079ffb053125c38ee163c78ba0caac235161f1b2"
] | [
"moto/ssd_layers.py"
] | [
"\"\"\"Some special pupropse layers for SSD.\"\"\"\n\nimport keras.backend as K\nfrom keras.engine.topology import InputSpec\nfrom keras.engine.topology import Layer\nimport numpy as np\nimport tensorflow as tf\n\n\nclass Normalize(Layer):\n \"\"\"Normalization layer as described in ParseNet paper.\n\n # Argu... | [
[
"numpy.maximum",
"numpy.sqrt",
"numpy.linspace",
"numpy.meshgrid",
"tensorflow.shape",
"numpy.tile",
"numpy.ones",
"numpy.concatenate",
"numpy.array",
"tensorflow.tile"
]
] |
probabilisticdeeplearning/swa_gaussian | [
"033f2b956e98f7050793a0d8a4155feb98931a3d",
"033f2b956e98f7050793a0d8a4155feb98931a3d"
] | [
"experiments/uncertainty/temp_scaling.py",
"experiments/segmentation/train.py"
] | [
"# The code here is based on the code at\n# https://github.com/gpleiss/temperature_scaling/blob/master/temperature_scaling.py\n\nimport torch\nfrom torch import nn, optim\nfrom torch.nn import functional as F\nfrom torch.autograd import Variable\nimport numpy as np\n\ndef logits_from_probs(prob_arr):\n return np... | [
[
"torch.nn.CrossEntropyLoss",
"numpy.log",
"torch.ones",
"torch.nn.functional.softmax",
"torch.from_numpy",
"torch.optim.LBFGS",
"torch.log",
"numpy.exp",
"numpy.sum"
],
[
"torch.cuda.manual_seed",
"torch.load",
"torch.manual_seed",
"torch.optim.lr_scheduler.... |
sutd-visual-computing-group/dag-gans | [
"68a76153650df6de2a6919a93a2d3b98ca6407e6",
"68a76153650df6de2a6919a93a2d3b98ca6407e6"
] | [
"pytorch/examples/wgan-gp/gandag_cifar10.py",
"tensorflow/utils.py"
] | [
"import os, sys\nsys.path.append(os.getcwd())\n\nimport time\nimport tflib as lib\nimport tflib.save_images\nimport tflib.mnist\nimport tflib.cifar10\nimport tflib.plot\nimport tflib.inception_score\n\nimport os\nimport numpy as np\n\n\nimport torch\nimport torchvision\nfrom torch import nn\nfrom torch import autog... | [
[
"torch.nn.BatchNorm1d",
"torch.nn.ConvTranspose2d",
"numpy.multiply",
"torch.randn",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.tensor",
"numpy.concatenate",
"torch.nn.Tanh",
"torch.nn.Linear",
"torch.rand",
"torch.cuda.is_available",
"torch.nn.BatchNorm2d... |
oeg-upm/tada-num-dist | [
"d7845898c5405680a63bc86e60c994816fb4562a"
] | [
"tests/test_clus.py"
] | [
"import unittest\nimport os\nimport pandas as pd\nfrom tadaqq.clus import Clusterer\nfrom collections import Counter\nfrom tadaqq.clus import Clusterer, PMap\nfrom tadaqq.slabmer import SLabMer\n\n\ndef get_test_df():\n dbp = \"http://dbpedia.org/property/\"\n df = pd.DataFrame(\n [\n ['AAA'... | [
[
"pandas.DataFrame"
]
] |
sebasgo/OpenMDAO | [
"b78d840780b73209dc3a00a2fb3dbf729bfeb8d5",
"b78d840780b73209dc3a00a2fb3dbf729bfeb8d5"
] | [
"openmdao/solvers/tests/test_solver_parametric_suite.py",
"openmdao/visualization/scaling_viewer/scaling_report.py"
] | [
"\"\"\"Runs a parametric test over several of the linear solvers.\"\"\"\n\nimport numpy as np\nimport unittest\n\nfrom openmdao.core.group import Group\nfrom openmdao.core.problem import Problem\nfrom openmdao.core.implicitcomponent import ImplicitComponent\nfrom openmdao.utils.assert_utils import assert_near_equal... | [
[
"numpy.eye",
"numpy.array",
"numpy.ones"
],
[
"numpy.abs",
"numpy.full",
"numpy.atleast_1d",
"numpy.max",
"numpy.any",
"numpy.isscalar",
"numpy.array2string",
"numpy.zeros"
]
] |
King-Zach/3D-point-cloud-generation | [
"c06ed9bbe70e4c27d9d6bfc0fef3ac46ae1c8afe",
"c06ed9bbe70e4c27d9d6bfc0fef3ac46ae1c8afe"
] | [
"util.py",
"render/render_fixed.py"
] | [
"import numpy as np\nimport scipy.misc\nimport tensorflow as tf\nimport os\nimport termcolor\n\n# compute projection from source to target\ndef projection(Vs,Vt):\n\tVsN = tf.shape(Vs)[0]\n\tVtN = tf.shape(Vt)[0]\n\tVt_rep = tf.tile(Vt[None,:,:],[VsN,1,1]) # [VsN,VtN,3]\n\tVs_rep = tf.tile(Vs[:,None,:],[1,VtN,1]) #... | [
[
"tensorflow.transpose",
"tensorflow.range",
"tensorflow.shape",
"tensorflow.summary.image",
"tensorflow.reduce_sum",
"tensorflow.reshape",
"tensorflow.batch_to_space",
"tensorflow.tile",
"tensorflow.argmin"
],
[
"numpy.array"
]
] |
tripathiaakash/OCTIS | [
"1fb85f42020dd53cd3b3c7e5bfab4907ee47d8e8"
] | [
"octis/dashboard/server.py"
] | [
"import argparse\nimport webbrowser\nimport octis.dashboard.frameworkScanner as fs\nimport octis.configuration.defaults as defaults\nfrom multiprocessing import Process, Pool\nimport json\nfrom flask import Flask, render_template, request, send_file\nimport tkinter as tk\nimport pandas as pd\nimport numpy as np\nfr... | [
[
"pandas.DataFrame"
]
] |
jensengroup/elementary_step_om | [
"7ae7e5226f6be1f3ace3e3886a0284c4f8923ee9"
] | [
"elementary_step_om/io/io_gaussian.py"
] | [
"import numpy as np\n\ndef read_gaussian_out(content, property='energy'):\n \"\"\"Reads gaussian output file\n \n - quantity = 'structure' - final structure form output.\n - quantity = 'atomic_numbers' - atmoic numbers\n - quantity = 'energy' - final energy from output.\n - quantity = 'frequencies... | [
[
"numpy.asarray"
]
] |
smartguo/mars | [
"5fdd6e2d520fcdc3b7441379e0abaf0e07c6212a"
] | [
"mars/learn/cluster/_k_means_init.py"
] | [
"# Copyright 1999-2020 Alibaba Group Holding 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 appl... | [
[
"numpy.log",
"sklearn.cluster.KMeans",
"numpy.stack",
"numpy.dtype",
"sklearn.cluster.k_means_._k_init",
"numpy.argmin",
"numpy.bincount",
"numpy.zeros",
"sklearn.cluster._kmeans._kmeans_plusplus"
]
] |
sammosummo/sammosummo.github.io | [
"afecf92aadccf5a0ee1eda835e32a8dbbff35c7c",
"afecf92aadccf5a0ee1eda835e32a8dbbff35c7c"
] | [
"assets/scripts/bsem2.py",
"assets/scripts/neals-funnel-a.py"
] | [
"\"\"\"Example of Bayesian confirmatory factor analysis in PyMC3 in which the latent\nvariables are estimated.\n\n\"\"\"\nimport numpy as np\nimport pandas as pd\nimport pymc3 as pm\nimport theano.tensor as tt\nimport matplotlib.pyplot as plt\nfrom os.path import exists\n\nfrom matplotlib import rcParams\nfrom pymc... | [
[
"pandas.read_csv",
"numpy.asarray",
"numpy.eye",
"matplotlib.pyplot.savefig",
"numpy.ones",
"numpy.array",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.random.seed",
"numpy.linspace",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"scipy.stats.norm.log... |
DrJones142/Sepsis2019 | [
"c11344e3ee311ff15d9f752de1606b833ebdca3d",
"c11344e3ee311ff15d9f752de1606b833ebdca3d"
] | [
"evaluation-2019-master/evaluate_sepsis_score.py",
"get_sepsis_score.py"
] | [
"#!/usr/bin/env python\n\n# This file contains functions for evaluating algorithms for the 2019 PhysioNet/\n# CinC Challenge. You can run it as follows:\n#\n# python evaluate_sepsis_score.py labels predictions scores.psv\n#\n# where 'labels' is a directory containing files with labels, 'predictions' is a\n# direc... | [
[
"numpy.unique",
"numpy.min",
"numpy.concatenate",
"numpy.max",
"numpy.argmax",
"numpy.any",
"numpy.insert",
"numpy.argsort",
"numpy.array",
"numpy.zeros",
"numpy.sum"
],
[
"tensorflow.keras.models.load_model",
"numpy.hstack",
"numpy.load",
"sklearn.d... |
emeraldsrs/tensorflow-for-poets-2 | [
"355578ac26097e5cee5873ef2bcea165ed4539b3"
] | [
"scripts/label_image.py"
] | [
"# 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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.Graph",
"tensorflow.image.resize_bilinear",
"tensorflow.import_graph_def",
"tensorflow.read_file",
"tensorflow.gfile.GFile",
"numpy.squeeze",
"tensorflow.cast",
"tensorflow.image.decode_png",
"tensorflow.expand_dims",
"tensorflow.image.decode_bmp",
"tensorfl... |
Zhendong-Wang/arsm_image_captioning | [
"2282b76ab03b53952269d94d6c4b19ab98636ca5"
] | [
"misc/loss_wrapper.py"
] | [
"import torch\nimport misc.utils as utils\nimport numpy as np\nfrom misc.rewards import init_scorer, get_self_critical_reward, get_arsk_loss_cuda\n\nclass LossWrapper(torch.nn.Module):\n def __init__(self, model, opt):\n super(LossWrapper, self).__init__()\n self.opt = opt\n self.model = mod... | [
[
"torch.from_numpy"
]
] |
JonasFrey96/RPOSE | [
"7da77499ab777ce7ee37b731541982870da8d40b"
] | [
"src/common/visu/visualizer.py"
] | [
"import os\nimport random\nimport numpy as np\nimport torch\nimport matplotlib.pyplot as plt\n\nfrom PIL import Image, ImageDraw\nfrom scipy.spatial.transform import Rotation as R\nimport copy\nimport cv2\nimport io\nfrom matplotlib import cm\n\nimport math\nfrom math import pi\nimport imageio\nfrom skimage.morphol... | [
[
"numpy.dot",
"matplotlib.pyplot.imshow",
"torch.mean",
"numpy.expand_dims",
"torch.max",
"numpy.linspace",
"torch.sum",
"numpy.concatenate",
"numpy.zeros_like",
"numpy.mean",
"numpy.moveaxis",
"torch.norm",
"matplotlib.pyplot.tight_layout",
"numpy.unique",
... |
xyzhu8/mmocr | [
"c745667cd1af91dbff2385dcf2f2b80b9a40adb6",
"f62b4513f5411bde9f24e1902b1cb1945340022a",
"f62b4513f5411bde9f24e1902b1cb1945340022a",
"f62b4513f5411bde9f24e1902b1cb1945340022a",
"f62b4513f5411bde9f24e1902b1cb1945340022a"
] | [
"tests/test_dataset/test_ner_dataset.py",
"mmocr/datasets/pipelines/test_time_aug.py",
"docs_zh_CN/stats.py",
"mmocr/models/textrecog/recognizer/base.py",
"mmocr/models/textdet/necks/fpn_unet.py"
] | [
"import json\nimport os.path as osp\nimport tempfile\n\nimport torch\n\nfrom mmocr.datasets.ner_dataset import NerDataset\nfrom mmocr.models.ner.convertors.ner_convertor import NerConvertor\n\n\ndef _create_dummy_ann_file(ann_file):\n data = {\n 'text': '彭小军认为,国内银行现在走的是台湾的发卡模式',\n 'label': {\n ... | [
[
"torch.tensor"
],
[
"numpy.rot90"
],
[
"numpy.unique"
],
[
"torch.distributed.get_world_size",
"torch.distributed.is_available",
"torch.distributed.is_initialized"
],
[
"torch.nn.Conv2d",
"torch.nn.ConvTranspose2d",
"torch.cat"
]
] |
MetaCell/pygeppetto-django | [
"2222228af89ad3edb68ab4ff41c85ffd6c81af9c"
] | [
"pygeppetto_gateway/base.py"
] | [
"import copy\nimport json\nimport logging\nimport os\nimport pathlib\nimport typing as t\nimport zlib\n\nimport enforce\nimport quantities as pq\nimport requests\nimport websocket\nimport numpy as np\nfrom django.conf import settings\n\nfrom pygeppetto_gateway import helpers\nfrom pygeppetto_gateway.interpreters im... | [
[
"numpy.array"
]
] |
shakeelDS/ml_python | [
"d5e9e954ddcff2202532fc1aafdcffe0cd139331"
] | [
"exercise_answers/dim_red_function.py"
] | [
"from sklearn.decomposition import PCA \r\nfrom sklearn.linear_model import LogisticRegression\r\nfrom sklearn.model_selection import train_test_split\r\nfrom sklearn.metrics import f1_score\r\n\r\n\r\ndef PCA_train_predict_score(X, y, k, random_state=42):\r\n \"\"\"\r\n Function to perform PCA and generate m... | [
[
"sklearn.metrics.f1_score",
"sklearn.decomposition.PCA",
"sklearn.model_selection.train_test_split",
"sklearn.linear_model.LogisticRegression"
]
] |
suzannastep/eulers | [
"886da24546a490a11bc31ace4fbfa71536b129bf"
] | [
"solver/__init__.py"
] | [
"import matplotlib\nimport os\n\nif os.system != \"nt\": #pragma: no cover\n matplotlib.use(\"Agg\")\n"
] | [
[
"matplotlib.use"
]
] |
cshyundev/LW-PSMNet | [
"d80d3b12c55ba30c781a7578a4728a2cd6321866"
] | [
"lightmodels/channel_compression/stackhourglass.py"
] | [
"from __future__ import print_function\nimport torch\nimport torch.nn as nn\nimport torch.utils.data\nfrom torch.autograd import Variable\nimport torch.nn.functional as F\nimport math\nfrom .submodule import *\n\nclass hourglass(nn.Module):\n def __init__(self, inplanes):\n super(hourglass, self).__init__... | [
[
"torch.nn.functional.softmax",
"torch.nn.ConvTranspose3d",
"torch.nn.Conv3d",
"torch.nn.functional.relu",
"torch.nn.ReLU",
"torch.nn.BatchNorm3d",
"torch.squeeze"
]
] |
smilence86/A-Light-and-Fast-Face-Detector-for-Edge-Devices | [
"cea550ae7999394da9c02ec15cb58b44c154e306"
] | [
"license_plate_detection/accuracy_evaluation/predict.py"
] | [
"# coding: utf-8\nimport sys\nimport os\nimport numpy\nimport cv2\n\n# empty data batch class for dynamical properties\nclass DataBatch:\n pass\n\n\ndef NMS(boxes, overlap_threshold):\n '''\n\n :param boxes: numpy nx5, n is the number of boxes, 0:4->x1, y1, x2, y2, 4->score\n :param overlap_threshold:\n... | [
[
"numpy.maximum",
"numpy.minimum",
"numpy.squeeze",
"numpy.tile",
"numpy.argsort",
"numpy.array",
"numpy.where"
]
] |
arunbonagiri190/Cat-Dog-Classifier | [
"fe87a6547f423a6082366a07245b9c8b6bd288a1"
] | [
"app.py"
] | [
"import torch\nimport torchvision.transforms as transforms\nimport model\nfrom PIL import Image\nimport sys\n\nDIR=\"data/models/\"\nMODEL=\"model-100-epochs-adam-0003-lr-cpu.pth\"\n\n\ndef get_model(PATH, model):\n device = torch.device('cpu')\n model.load_state_dict(torch.load(PATH, map_location=device))\n ... | [
[
"torch.nn.functional.softmax",
"torch.load",
"torch.unsqueeze",
"torch.no_grad",
"torch.device"
]
] |
sdss/astra_thecannon | [
"3062025aa2ac3b8af257490be63201587b23762d"
] | [
"python/astra_thecannon/continuum.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nContinuum-normalization.\n\"\"\"\n\nfrom __future__ import (division, print_function, absolute_import,\n unicode_literals)\n\n__all__ = [\"normalize\", \"sines_and_cosines\"]\n\nimport numpy as np\nimport os\nfrom warnings import warn... | [
[
"numpy.dot",
"numpy.linalg.solve",
"numpy.ones_like",
"numpy.isfinite",
"numpy.arange",
"numpy.cos",
"numpy.sin",
"numpy.atleast_2d",
"numpy.max",
"numpy.zeros_like",
"numpy.diff",
"numpy.searchsorted",
"numpy.linalg.eigvalsh",
"numpy.array",
"numpy.zero... |
kerkelae/dkmri | [
"af07880faa09b007d7ea56018ab9dbd9ae1ca223"
] | [
"dkmri/tests/test_dkmri.py"
] | [
"import numpy as np\nimport numpy.testing as npt\n\nimport dkmri\n\n\nSEED = 123\n\nparams = np.array(\n [\n 7.90764792,\n 0.88660664,\n 0.82186469,\n 0.81741033,\n 0.25016042,\n 0.12341918,\n 0.28344717,\n 0.97744794,\n 0.64809536,\n 0.540477... | [
[
"numpy.random.random",
"numpy.random.seed",
"numpy.arange",
"numpy.linalg.norm",
"numpy.testing.assert_almost_equal",
"numpy.array",
"numpy.exp",
"numpy.vstack"
]
] |
martinfleis/transbigdata | [
"520cb59dd857ac1e30d904aabda1b76addf9354d"
] | [
"src/transbigdata/grids.py"
] | [
"import geopandas as gpd \nimport pandas as pd\nfrom shapely.geometry import Polygon,Point\nimport math \nimport numpy as np\ndef rect_grids(bounds,accuracy = 500):\n '''\n 生成研究范围内的方形栅格\n\n 输入\n -------\n bounds : List\n 生成范围的边界,[lon1,lat1,lon2,lat2] (WGS84坐标系) 其中,lon1,lat1是左下角坐标,lon2,lat2是右上... | [
[
"numpy.arange",
"pandas.merge",
"pandas.concat",
"pandas.DataFrame"
]
] |
NathanKlineInstitute/SMARTAgent | [
"751c880c43d73eca395b5533f6f7fe56bf5816d4"
] | [
"connUtils.py"
] | [
"# neuronal network connection functions\nimport numpy as np\n\n#\ndef gid2pos (numc, startgid, gid):\n nrow = ncol = int(np.sqrt(numc))\n y = int((gid - startgid) / nrow)\n x = (gid - startgid) % ncol\n return (x,y)\n\ndef prob2conv (prob, npre):\n # probability to convergence; prob is connection probability,... | [
[
"numpy.where",
"numpy.zeros",
"numpy.sqrt"
]
] |
tongyao-zhu/virtex | [
"43b33289ffc963b41b6b98affc5e94dfe25e29c8"
] | [
"scripts/clf_linear.py"
] | [
"import argparse\nfrom collections import Counter\nimport os\n\nfrom loguru import logger\nimport torch\nfrom torch import nn\nfrom torch.utils.data import DataLoader, DistributedSampler\nfrom torch.utils.tensorboard import SummaryWriter\n\nfrom virtex.config import Config\nfrom virtex.factories import (\n Downs... | [
[
"torch.nn.CrossEntropyLoss",
"torch.cuda.current_device",
"torch.nn.init.constant_",
"torch.load",
"torch.tensor",
"torch.nn.Linear",
"torch.set_grad_enabled",
"torch.nn.init.normal_",
"torch.utils.tensorboard.SummaryWriter",
"torch.device",
"torch.nn.parallel.Distribut... |
baohq1595/graph2graph | [
"3d1f33cd85c3c5ed0b7c67b5f74a0abe31a94271"
] | [
"fast_jtnn/diff_vae.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom fast_jtnn.mol_tree import Vocab, MolTree\nfrom fast_jtnn.nnutils import create_var, flatten_tensor, avg_pool\nfrom fast_jtnn.jtnn_enc import JTNNEncoder\nfrom fast_jtnn.jtnn_dec import JTNNDecoder\nfrom fast_jtnn.mpn import MPN\nfrom fast_j... | [
[
"torch.randn_like",
"torch.nn.CrossEntropyLoss",
"torch.mv",
"torch.LongTensor",
"torch.Tensor",
"torch.cat",
"torch.exp",
"torch.nn.Linear",
"torch.sort",
"torch.nn.ReLU"
]
] |
katana17/pensieve-dev | [
"ccad1f64d2c50a0346ccce91c8c3b10eac08c30a"
] | [
"sim/rl_test.py"
] | [
"import os\nimport sys\nimport numpy as np\nimport tensorflow as tf\nimport load_trace\nimport a3c\nimport fixed_env as env\n\nos.environ['CUDA_VISIBLE_DEVICES'] = ''\n\nS_INFO = 6 # bit_rate, buffer_size, next_chunk_size, bandwidth_measurement(throughput and time), chunk_til_video_end\nS_LEN = 8 # take how many ... | [
[
"numpy.minimum",
"numpy.abs",
"numpy.random.seed",
"numpy.reshape",
"numpy.cumsum",
"tensorflow.global_variables_initializer",
"numpy.max",
"tensorflow.Session",
"tensorflow.train.Saver",
"numpy.array",
"numpy.zeros",
"numpy.roll",
"numpy.random.randint"
]
] |
Lwenqi/RL | [
"2cd0b410638a7b08159b7f8c388a6fd785e14e97"
] | [
"gym-duckietown/learning/imitation/tensorflow/model.py"
] | [
"import numpy as np\nimport tensorflow as tf\n\nfrom imitation.tensorflow._layers import one_residual\n\n\nclass TensorflowModel:\n def __init__(self, observation_shape, action_shape, graph_location, seed=1234):\n # model definition\n self._observation = None\n self._action = None\n s... | [
[
"tensorflow.losses.mean_squared_error",
"tensorflow.train.latest_checkpoint",
"tensorflow.image.resize_images",
"numpy.squeeze",
"tensorflow.layers.dense",
"tensorflow.placeholder",
"tensorflow.global_variables_initializer",
"tensorflow.image.per_image_standardization",
"tensor... |
jkjkiiiii/PaddleHub | [
"061102402c5519ca7e1bfa2bb00a2cc40ec070a7"
] | [
"demo/text_classification/finetuned_model_to_module/module.py"
] | [
"# -*- coding:utf-8 -*-\n# 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/LIC... | [
[
"numpy.argmax"
]
] |
icewing1996/bert_dep | [
"692637bb9585363480f6a3b09ea355e5454d04b8"
] | [
"dep_parser.py"
] | [
"import modeling\nimport numpy as np\nimport tensorflow as tf\nimport linalg\n\nfrom tensorflow.contrib import rnn\nfrom tensorflow.contrib import crf\n\n\n\n\nclass Parser(object):\n\n\tdef __init__(self, is_training, num_head_labels, num_rel_labels, mlp_droput_rate, token_start_mask, arc_mlp_size, label_mlp_size,... | [
[
"tensorflow.get_variable",
"tensorflow.metrics.accuracy",
"tensorflow.concat",
"tensorflow.contrib.rnn.GRUCell",
"tensorflow.layers.dropout",
"tensorflow.stack",
"tensorflow.cast",
"tensorflow.nn.bidirectional_dynamic_rnn",
"tensorflow.orthogonal_initializer",
"tensorflow.c... |
SamKaiYang/timda_dual_arm | [
"8582945cb7bc9d955d224bffb5af2c207bbb311a"
] | [
"hand_eye/src/hand_eye/CharucoPosture.py"
] | [
"#!/usr/bin/env python\n\n# The following code is used to watch a video stream, detect Aruco markers, and use\n# a set of markers to determine the posture of the camera in relation to the plane\n# of markers.\n#\n# Assumes that all markers are on the same plane, for example on the same piece of paper\n#\n# Requires... | [
[
"numpy.sort",
"numpy.copy",
"numpy.std",
"numpy.delete",
"numpy.average",
"numpy.array",
"numpy.zeros"
]
] |
fxbriol/probnum | [
"7e0e94cf9146aaa2b730b02c6d75a022cd629b5c",
"7e0e94cf9146aaa2b730b02c6d75a022cd629b5c",
"7e0e94cf9146aaa2b730b02c6d75a022cd629b5c",
"7e0e94cf9146aaa2b730b02c6d75a022cd629b5c",
"7e0e94cf9146aaa2b730b02c6d75a022cd629b5c"
] | [
"benchmarks/linearsolvers.py",
"src/probnum/filtsmooth/optim/_iterated_component.py",
"src/probnum/filtsmooth/gaussian/_kalmanposterior.py",
"tests/test_filtsmooth/test_gaussian/test_approx/_linearization_test_interface.py",
"src/probnum/randvars/_utils.py"
] | [
"\"\"\"Benchmarks for linear solvers.\"\"\"\nimport numpy as np\n\nfrom probnum import linops, problems, randvars\nfrom probnum.linalg import problinsolve\nfrom probnum.problems.zoo.linalg import random_sparse_spd_matrix, random_spd_matrix\n\nLINEAR_SYSTEMS = [\"dense\", \"sparse\", \"linop\"]\nLINSYS_DIMS = [100, ... | [
[
"numpy.inner",
"numpy.minimum",
"numpy.linalg.norm",
"numpy.random.default_rng"
],
[
"numpy.ones"
],
[
"numpy.amax",
"numpy.ones_like",
"numpy.take",
"numpy.abs",
"numpy.asarray",
"numpy.amin",
"numpy.union1d",
"numpy.concatenate",
"scipy.stats.norm.... |
IrakozeFD/pyleecan | [
"5a93bd98755d880176c1ce8ac90f36ca1b907055",
"5a93bd98755d880176c1ce8ac90f36ca1b907055",
"5a93bd98755d880176c1ce8ac90f36ca1b907055",
"5a93bd98755d880176c1ce8ac90f36ca1b907055",
"5a93bd98755d880176c1ce8ac90f36ca1b907055",
"5a93bd98755d880176c1ce8ac90f36ca1b907055",
"5a93bd98755d880176c1ce8ac90f36ca1b90705... | [
"pyleecan/Methods/Slot/SlotW11/plot_schematics.py",
"Tests/Methods/Slot/test_SlotW22_meth.py",
"pyleecan/Methods/Slot/SlotW10/comp_surface.py",
"pyleecan/Functions/Plot/plot_2D.py",
"pyleecan/Methods/Slot/SlotM16/plot_schematics.py",
"Tests/Methods/Mesh/test_get_solution.py",
"pyleecan/Methods/Simulatio... | [
"import matplotlib.pyplot as plt\nfrom numpy import pi, exp\n\nfrom ....Classes.Arc1 import Arc1\nfrom ....Classes.LamSlot import LamSlot\nfrom ....Classes.Segment import Segment\nfrom ....definitions import config_dict\nfrom ....Functions.Plot import (\n ARROW_COLOR,\n ARROW_WIDTH,\n MAIN_LINE_COLOR,\n ... | [
[
"matplotlib.pyplot.gca",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.close",
"matplotlib.pyplot.gcf"
],
[
"numpy.angle"
],
[
"numpy.sin"
],
[
"numpy.split",
"matplotlib.pyplot.tight_layout",
"numpy.abs",
"numpy.squeeze",
"matplotlib.pyplot.close"
],
[
... |
Wakinguup/DRG | [
"c6134e3e4e13c55efe3290e722a60006723519a5"
] | [
"tools/test_net_VCOCO_sp_object_centric.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n# Set up custom environment before nearly anything else is imported\n# NOTE: this should be the first import (no not reorder)\nfrom maskrcnn_benchmark.utils.env import setup_environment # noqa F401 isort:skip\n\nimport argparse\nimport os\ni... | [
[
"numpy.minimum",
"numpy.asarray",
"numpy.round",
"numpy.max",
"numpy.concatenate",
"numpy.all",
"torch.FloatTensor",
"torch.no_grad",
"torch.cuda.is_available",
"torch.device",
"torch.distributed.init_process_group",
"numpy.full",
"numpy.argmax",
"numpy.zero... |
AlbertoEsc/cuicuilco | [
"6817316024e21c7e5dded3836bd685eb9cb06365"
] | [
"lattice.py"
] | [
"#####################################################################################################################\n# lattice: This module implements functions that are useful to build receptive fields localized over a lattice #\n# generalizing rectangular swichtboards. It is part of the Cuicuilco... | [
[
"numpy.ones",
"numpy.concatenate",
"numpy.int",
"numpy.floor",
"numpy.array"
]
] |
simhag/Compositional-Pre-Training-for-Semantic-Parsing-with-BERT | [
"352baf443f0fcfde0f275521b5927b17a5c0c2df",
"352baf443f0fcfde0f275521b5927b17a5c0c2df"
] | [
"src/sanity_check.py",
"src/semantic_parser.py"
] | [
"import torch\nfrom argparse import ArgumentParser\nimport os\nfrom utils import read_GeoQuery, data_iterator\nfrom pytorch_pretrained_bert.modeling import BertModel\nfrom tokens_vocab import Vocab\nimport domains\nfrom semantic_parser import TSP, BSP\nfrom utils import get_dataset_finish_by, save_model, get_datase... | [
[
"torch.no_grad",
"torch.cuda.is_available"
],
[
"torch.nn.Dropout",
"torch.max",
"torch.topk",
"torch.from_numpy",
"torch.tensor",
"numpy.ones",
"torch.stack",
"torch.nn.init.xavier_uniform"
]
] |
oscarvik/Language-Modelling-CSE291-AS2 | [
"18af16de61cbe8d820b1445207107b4ea4771680"
] | [
"model.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.utils.rnn as rnn_utils\nfrom utils import to_var\n\n\nclass SentenceVAE(nn.Module):\n\n def __init__(self, vocab_size, embedding_size, rnn_type, hidden_size, word_dropout, embedding_dropout, latent_size,\n sos_idx, eos_idx, pad_idx, unk_idx, m... | [
[
"torch.nn.Dropout",
"torch.Tensor",
"torch.randn",
"torch.nn.Embedding",
"torch.exp",
"torch.nn.Linear",
"torch.nn.utils.rnn.pad_packed_sequence",
"torch.sort",
"torch.cuda.is_available",
"torch.topk"
]
] |
jonasrothfuss/DeepEpisodicMemory | [
"1095315a5d75a4840ef4017af70432e2dd535e4c"
] | [
"models/model_zoo/model_conv4.py"
] | [
"import numpy as np\nimport tensorflow as tf\n\nimport tensorflow.contrib.slim as slim\nimport tensorflow.contrib.layers\nfrom tensorflow.contrib.layers.python import layers as tf_layers\nfrom models.conv_lstm import basic_conv_lstm_cell\n\n# Amount to use when lower bounding tensors\nRELU_SHIFT = 1e-12\nFC_LAYER_S... | [
[
"tensorflow.contrib.slim.layers.conv2d",
"tensorflow.contrib.slim.layers.conv2d_transpose",
"tensorflow.contrib.layers.python.layers.layer_norm",
"tensorflow.variable_scope",
"tensorflow.contrib.layers.python.layers.xavier_initializer"
]
] |
thomasjpfan/d3m_estimator_to_primitive | [
"f88b5ee9458634ba66456e9febcaf0042846b882"
] | [
"xgboost_wrap/tests/test_D3M_XGBClassifier.py"
] | [
"import unittest\nimport pickle\n\nfrom xgboost_wrap import D3M_XGBClassifier\nfrom pathlib import Path\nfrom d3m.metadata import base as metadata_base\nfrom d3m import container\nfrom d3m.primitive_interfaces.base import PrimitiveBase\nfrom d3m.exceptions import PrimitiveNotFittedError\nfrom pandas.testing import ... | [
[
"pandas.testing.assert_frame_equal"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.