repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
dom-s/transformers | [
"83446a88d902661fab12bf8c37a1aa2845cdca5f",
"66ef8faf6ae805aeb4e71075d4da6eab7be3bc26"
] | [
"src/transformers/modeling_albert.py",
"src/transformers/modeling_tf_bert.py"
] | [
"# coding=utf-8\n# Copyright 2018 Google AI, Google Brain and the HuggingFace Inc. team.\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... | [
[
"torch.nn.Softmax",
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"torch.zeros",
"torch.einsum",
"torch.from_numpy",
"torch.nn.Embedding",
"torch.nn.LayerNorm",
"tensorflow.train.load_variable",
"torch.nn.Linear",
"torch.matmul",
"torch.nn.Tanh"... |
guyang3532/text | [
"e2fc987ff6a002018040cffac5e0d61c3d0b06c6",
"e2fc987ff6a002018040cffac5e0d61c3d0b06c6"
] | [
"benchmark/experimental_vectors.py",
"torchtext/experimental/transforms.py"
] | [
"import time\n\nimport torch\nfrom torchtext.experimental.datasets import AG_NEWS\nfrom torchtext.experimental.vectors import FastText as FastTextExperimental\nfrom torchtext.vocab import FastText\n\n\ndef benchmark_experimental_vectors():\n def _run_benchmark_lookup(tokens, vector):\n t0 = time.monotonic... | [
[
"torch.jit.script"
],
[
"torch.classes.torchtext.Regex"
]
] |
anonymous-user-commits/perturb-net | [
"66fc7c4a1234fa34b92bcc85751f0a6e23d80a23",
"66fc7c4a1234fa34b92bcc85751f0a6e23d80a23",
"66fc7c4a1234fa34b92bcc85751f0a6e23d80a23",
"66fc7c4a1234fa34b92bcc85751f0a6e23d80a23",
"66fc7c4a1234fa34b92bcc85751f0a6e23d80a23",
"66fc7c4a1234fa34b92bcc85751f0a6e23d80a23",
"66fc7c4a1234fa34b92bcc85751f0a6e23d80a2... | [
"cnns/nnlib/robustness/pni/code/models/nomarlization_layer.py",
"cnns/nnlib/robustness/pni/code/models/noise_layer_robust.py",
"cnns/nnlib/pytorch_architecture/net_eigen.py",
"cnns/nnlib/robustness/pni/code/utils.py",
"cnns/nnlib/solver.py",
"cnns/nnlib/pytorch_architecture/mobilenet.py",
"cnns/foolbox/... | [
"import torch\nimport torch.nn as nn\n\n\nclass Normalize_layer(nn.Module):\n\n def __init__(self, mean, std):\n super(Normalize_layer, self).__init__()\n self.mean = nn.Parameter(torch.Tensor(mean).unsqueeze(1).unsqueeze(1),\n requires_grad=False)\n self.std ... | [
[
"torch.Tensor"
],
[
"torch.nn.functional.conv2d"
],
[
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.nn.functional.max_pool2d",
"torch.nn.functional.log_softmax"
],
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"matplotlib.pyplot.ylim",
"matplo... |
yihui-he2020/epipolar-transformers | [
"6824f4345b2998500fbacd0f4e30f67f8e3da7b8",
"6824f4345b2998500fbacd0f4e30f67f8e3da7b8"
] | [
"modeling/backbones/resnet.py",
"vision/triangulation.py"
] | [
"import logging\nimport os\n\nimport torch\nimport torch.nn as nn\nimport torch.utils.model_zoo as model_zoo\nfrom modeling.layers.epipolar import Epipolar\nfrom modeling import registry\nfrom core import cfg\nfrom .basic_batch import find_tensor_peak_batch\nfrom utils.logger import setup_logger\nfrom utils.model_s... | [
[
"torch.nn.Sequential",
"torch.nn.ConvTranspose2d",
"torch.load",
"torch.nn.init.constant_",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.init.normal_",
"torch.nn.BatchNorm2d",
"torch.stack",
"torch.nn.ReLU",
"torch.utils.model_zoo... |
AntoineDidisheim/didipack | [
"9c9266bf248cae79e6ffddd98b7e573108abaa57"
] | [
"didipack/latex_table.py"
] | [
"import pandas as pd\nimport numpy as np\nimport statsmodels.api as sm\nfrom enum import Enum\n\nclass ParValue(Enum):\n TSTAT = 1\n PVALUE = 2\n STD = 3\n\nclass OneReg:\n def __init__(self, reg, show_list=[], hide_list=[], blocks=[], bottom_blocks=[]):\n self.reg = reg\n if show_list == ... | [
[
"numpy.round",
"pandas.concat",
"pandas.Series",
"numpy.sort"
]
] |
forgi86/pyMPC | [
"4b004ba707dab49cd36d96a3575b8593c870a904"
] | [
"test_scripts/main_cvxpy_simple.py"
] | [
"from cvxpy import Variable, Parameter, Minimize, Problem, OSQP, quad_form\nimport numpy as np\nimport scipy as sp\nimport scipy.sparse as sparse\nimport time\n\n\nif __name__ == \"__main__\":\n\n # Discrete time model of a quadcopter\n Ts = 0.2\n M = 2.0\n\n Ad = sparse.csc_matrix([\n [1.0, Ts],... | [
[
"scipy.sparse.csc_matrix",
"scipy.sparse.eye",
"numpy.arange",
"scipy.sparse.diags",
"matplotlib.pyplot.subplots",
"numpy.shape",
"numpy.array",
"numpy.zeros"
]
] |
SuryaThiru/ppscore | [
"59df800e32d4ef5fda4be2bdf4b3235db2a39fee"
] | [
"src/ppscore/calculation.py"
] | [
"from sklearn import tree\nfrom sklearn import preprocessing\nfrom sklearn.model_selection import cross_val_score\nfrom sklearn.metrics import mean_absolute_error, f1_score\n\nimport pandas as pd\nfrom pandas.api.types import (\n is_numeric_dtype,\n is_bool_dtype,\n is_categorical_dtype,\n is_string_dty... | [
[
"pandas.api.types.is_categorical_dtype",
"sklearn.model_selection.cross_val_score",
"sklearn.tree.DecisionTreeRegressor",
"sklearn.metrics.mean_absolute_error",
"sklearn.preprocessing.OneHotEncoder",
"pandas.api.types.is_datetime64_any_dtype",
"pandas.api.types.is_numeric_dtype",
"... |
joakimlindblad/py_alpha_amd_release | [
"6a95286753c48e9f0c882d650158b15b58bcdd46"
] | [
"register.py"
] | [
"\n#\n# Py-Alpha-AMD Registration Framework\n# Author: Johan Ofverstedt\n# Reference: Fast and Robust Symmetric Image Registration Based on Distances Combining Intensity and Spatial Information\n#\n# Copyright 2019 Johan Ofverstedt\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy o... | [
[
"numpy.array",
"numpy.zeros",
"numpy.ones"
]
] |
DeepPSP/torch_ecg | [
"6db5ffb063d0e8fb4ce97029a0d184a658f43a37",
"6db5ffb063d0e8fb4ce97029a0d184a658f43a37"
] | [
"torch_ecg/models/cnn/multi_scopic.py",
"torch_ecg/databases/physionet_databases/cinc2020.py"
] | [
"\"\"\"\nThe core part of the SOTA model of CPSC2019,\nbranched, and has different scope (in terms of dilation) in each branch\n\"\"\"\nfrom copy import deepcopy\nfrom itertools import repeat\nfrom collections import OrderedDict\nfrom typing import Union, Optional, Sequence, NoReturn\n\nimport numpy as np\nnp.set_p... | [
[
"torch.set_default_tensor_type",
"torch.nn.Dropout",
"torch.nn.BatchNorm1d",
"numpy.set_printoptions",
"torch.nn.ModuleDict"
],
[
"numpy.asarray",
"pandas.DataFrame",
"matplotlib.pyplot.MultipleLocator",
"numpy.all",
"numpy.nanmean",
"numpy.any",
"numpy.unique",... |
My-Technical-Architect/tensorflow | [
"35cf4653e6fe15953e2e565afc5a0fd2ab4d5290"
] | [
"tensorflow/contrib/distributions/python/kernel_tests/distribution_test.py"
] | [
"# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.TensorShape",
"tensorflow.shape",
"tensorflow.placeholder",
"tensorflow.test.main",
"tensorflow.python.framework.tensor_util.constant_value",
"tensorflow.random_normal"
]
] |
project-delphi/ACS-QG | [
"03aa5b79030b5ba4c09a99363a58454743876592"
] | [
"model/encoder.py"
] | [
"\"\"\"\nImplement input sentence encoder.\n\"\"\"\nimport torch.nn as nn\nfrom torch.nn.utils.rnn import pad_packed_sequence as unpack\nfrom torch.nn.utils.rnn import pack_padded_sequence as pack\nfrom .config import *\nfrom common.constants import DEVICE\nfrom util.tensor_utils import to_sorted_tensor, to_origina... | [
[
"torch.nn.utils.rnn.pad_packed_sequence",
"torch.nn.GRU",
"torch.nn.utils.rnn.pack_padded_sequence"
]
] |
RangeKing/Paddle | [
"2d87300809ae75d76f5b0b457d8112cb88dc3e27",
"2d87300809ae75d76f5b0b457d8112cb88dc3e27",
"2d87300809ae75d76f5b0b457d8112cb88dc3e27",
"2d87300809ae75d76f5b0b457d8112cb88dc3e27",
"2d87300809ae75d76f5b0b457d8112cb88dc3e27",
"2d87300809ae75d76f5b0b457d8112cb88dc3e27",
"2d87300809ae75d76f5b0b457d8112cb88dc3e2... | [
"python/paddle/fluid/tests/unittests/distribution/test_distribution_dirichlet_static.py",
"python/paddle/fluid/tests/unittests/op_test.py",
"python/paddle/fluid/tests/unittests/xpu/test_momentum_op_xpu.py",
"python/paddle/tensor/to_string.py",
"python/paddle/fluid/tests/unittests/dygraph_to_static/test_save... | [
"# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"numpy.random.rand"
],
[
"numpy.random.get_state",
"numpy.nditer",
"numpy.random.seed",
"numpy.abs",
"numpy.asarray",
"numpy.reshape",
"numpy.allclose",
"numpy.array_equal",
"numpy.logical_and",
"numpy.uint32",
"numpy.dtype",
"numpy.max",
"numpy.random.s... |
luckmoon/nmt | [
"4f6a4acf8d8e086f9d894444a2877ac1f0856ad0",
"4f6a4acf8d8e086f9d894444a2877ac1f0856ad0",
"4f6a4acf8d8e086f9d894444a2877ac1f0856ad0"
] | [
"nmt/utils/iterator_utils_test.py",
"nmt/model_helper.py",
"nmt/attention_model.py"
] | [
"# Copyright 2017 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | [
[
"tensorflow.constant",
"tensorflow.test.main",
"tensorflow.placeholder",
"tensorflow.set_random_seed",
"tensorflow.tables_initializer",
"tensorflow.contrib.training.HParams"
],
[
"tensorflow.device",
"tensorflow.get_variable",
"tensorflow.concat",
"tensorflow.contrib.rn... |
OlegSomov/light-motion-analysis | [
"4f510250aaa32929a6ccff3c796b53151addb9e9"
] | [
"misc/graph.py"
] | [
"import os\nimport matplotlib\nimport json\nfrom datetime import datetime\nfrom matplotlib import pyplot\n\n\ndef show_results_graph(timer, name=None):\n with (open('light_plot.json', 'r')) as f:\n data = json.load(f)\n\n with (open('light_plot_imporved.json', 'r')) as f:\n data_improved = json.... | [
[
"matplotlib.pyplot.plot_date",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.savefig",
"matplotlib.dates.date2num",
"matplotlib.pyplot.show"
]
] |
wanghongsheng01/framework_enflame | [
"debf613e05e3f5ea8084c3e79b60d0dd9e349526",
"debf613e05e3f5ea8084c3e79b60d0dd9e349526",
"debf613e05e3f5ea8084c3e79b60d0dd9e349526",
"debf613e05e3f5ea8084c3e79b60d0dd9e349526",
"debf613e05e3f5ea8084c3e79b60d0dd9e349526",
"debf613e05e3f5ea8084c3e79b60d0dd9e349526",
"debf613e05e3f5ea8084c3e79b60d0dd9e34952... | [
"oneflow/python/test/ops/test_function_input_output.py",
"oneflow/python/test/ops/test_binary_elementwise_ops.py",
"oneflow/python/test/ops/test_all_reduce_group.py",
"oneflow/python/test/ops/test_gelu.py",
"oneflow/python/test/ops/test_gather_nd.py",
"oneflow/python/test/ops/test_nn_conv2d_padding_dynami... | [
"\"\"\"\nCopyright 2020 The OneFlow Authors. All rights reserved.\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 ap... | [
[
"numpy.allclose",
"numpy.ones"
],
[
"numpy.allclose",
"tensorflow.Variable",
"tensorflow.config.experimental.set_memory_growth",
"tensorflow.config.experimental.list_physical_devices",
"numpy.random.uniform",
"tensorflow.GradientTape"
],
[
"numpy.all"
],
[
"tens... |
ConsultingMD/covid-data-public | [
"2b7091f7cc3877df45a7887709e999b0ebdf30ec"
] | [
"scripts/update_forecast_hub.py"
] | [
"import enum\nfrom typing import Any\n\nimport click\nimport pandas as pd\nimport numpy as np\nimport structlog\nimport pathlib\nimport pydantic\nimport datetime\n\nimport zoltpy.util\n\nfrom covidactnow.datapublic import common_init, common_df\nfrom scripts import helpers\n\n\nfrom covidactnow.datapublic.common_fi... | [
[
"pandas.to_datetime",
"numpy.logical_and.reduce",
"pandas.read_csv",
"pandas.Timedelta"
]
] |
FlingeR/pandas | [
"01f399854f9febefa9e97005f3720aa312409b98",
"01f399854f9febefa9e97005f3720aa312409b98"
] | [
"pandas/core/indexes/multi.py",
"pandas/io/stata.py"
] | [
"from sys import getsizeof\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Hashable,\n Iterable,\n List,\n Optional,\n Sequence,\n Tuple,\n Union,\n)\nimport warnings\n\nimport numpy as np\n\nfrom pandas._config import get_option\n\nfrom pandas._libs import algos as libalgos, index as lib... | [
[
"pandas.Series",
"numpy.asarray",
"pandas._libs.lib.tuples_to_object_array",
"numpy.cumsum",
"numpy.dtype",
"pandas.core.indexes.base.Index",
"pandas.core.indexes.frozen.FrozenList",
"numpy.concatenate",
"pandas._config.get_option",
"numpy.all",
"numpy.any",
"pandas... |
ihmeuw-msca/SLIME | [
"255dfc6fc1880545f1ca9a5062eff823571cc025"
] | [
"src/slime/core/utils.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n utils\n ~~~~~\n\"\"\"\nimport numpy as np\n\n\ndef sizes_to_indices(sizes):\n \"\"\"Converting sizes to corresponding indices.\n Args:\n sizes (numpy.dnarray):\n An array consist of non-negative number.\n Returns:\n list{range}:\n ... | [
[
"numpy.arange",
"numpy.insert",
"numpy.cumsum"
]
] |
KANG91/Deep_Learning | [
"e3e9de769ab835215d0ebeee79ff869afbe64ebf",
"e3e9de769ab835215d0ebeee79ff869afbe64ebf",
"e3e9de769ab835215d0ebeee79ff869afbe64ebf"
] | [
"lab-12-2-char-seq-rnn.py",
"lab-05-1-logistic_regression.py",
"lab-13-3-mnist_save_restore.py"
] | [
"import tensorflow as tf\nimport numpy as np\ntf.set_random_seed(777) # reproducibility\n\nsample = \" if you want you\"\nidx2char = list(set(sample)) # index -> char\nchar2idx = {c: i for i, c in enumerate(idx2char)} # char -> idex\n\n# hyper parameters\ndic_size = len(char2idx) # RNN input size (one hot size)... | [
[
"tensorflow.nn.dynamic_rnn",
"tensorflow.reduce_mean",
"tensorflow.contrib.seq2seq.sequence_loss",
"tensorflow.contrib.rnn.BasicLSTMCell",
"numpy.squeeze",
"tensorflow.placeholder",
"tensorflow.ones",
"tensorflow.global_variables_initializer",
"tensorflow.train.GradientDescentO... |
zhulingchen/deep-reinforcement-learning | [
"193486659e17861208fa0a8703487e7be5868ff9",
"193486659e17861208fa0a8703487e7be5868ff9"
] | [
"p2_continuous-control/agent_ddpg.py",
"p1_navigation/agent_dqn_tf.py"
] | [
"import numpy as np\nimport random\nimport copy\nfrom collections import namedtuple, deque\nimport torch\nimport torch.nn.functional as F\nimport torch.optim as optim\nfrom model_ddpg import Actor, Critic\nfrom replay_buffer import ReplayBuffer, PrioritizedReplayBuffer\n\nBUFFER_SIZE = int(1e6) # replay buffer siz... | [
[
"numpy.clip",
"torch.from_numpy",
"numpy.ones",
"torch.nn.functional.mse_loss",
"torch.no_grad",
"torch.cuda.is_available",
"torch.nn.functional.smooth_l1_loss",
"numpy.array"
],
[
"tensorflow.executing_eagerly",
"numpy.arange",
"tensorflow.losses.Huber",
"numpy... |
KustomApe/nerdape | [
"aef6fb2d1f8c364b26d91bf8570b4487a24de69a",
"aef6fb2d1f8c364b26d91bf8570b4487a24de69a",
"aef6fb2d1f8c364b26d91bf8570b4487a24de69a"
] | [
".history/mercari/mercari_search_20201124185000.py",
".history/spider/car_spider_20201124003716.py",
".history/spider/car_spider_20201124004636.py"
] | [
"from selenium import webdriver\nfrom selenium.webdriver.support.ui import Select\nimport pandas as pd\nimport re\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport PyQt5\nimport time\n\"\"\"[Initial Settings]\n初期設定\n\"\"\"\noptions = webdriver.ChromeOptions()\noptions.add_argument(... | [
[
"matplotlib.pyplot.show",
"pandas.Series",
"pandas.DataFrame"
],
[
"pandas.DataFrame"
],
[
"pandas.DataFrame"
]
] |
sanghuynh1501/mlcollect | [
"e85fe6a08e14fa6502166c1a7bfffdcd8c3a25b2",
"e85fe6a08e14fa6502166c1a7bfffdcd8c3a25b2"
] | [
"mlcollect/cnn/lenet.py",
"mlcollect/cnn/minivggnet.py"
] | [
"from tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Conv2D\nfrom tensorflow.keras.layers import MaxPooling2D\nfrom tensorflow.keras.layers import Activation\nfrom tensorflow.keras.layers import Flatten\nfrom tensorflow.keras.layers import Dense\nfrom tensorflow.keras import backend ... | [
[
"tensorflow.keras.layers.Activation",
"tensorflow.keras.backend.image_data_format",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.models.Sequential",
"tensorflow.keras.layers.Flatten"
],
[
"tensorflo... |
keisukefukuda/optuna | [
"ac4ea8d0c74726f8a603ba2cb0bfb7f4112f736e"
] | [
"optuna/visualization/matplotlib/_contour.py"
] | [
"from typing import Callable\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typing import Tuple\nfrom typing import Union\n\nimport numpy as np\nimport scipy\n\nfrom optuna._experimental import experimental\nfrom optuna.logging import get_logger\nfrom optuna.study import Study\... | [
[
"scipy.sparse.csc_matrix",
"numpy.abs",
"numpy.linspace",
"numpy.log10",
"numpy.array",
"numpy.zeros"
]
] |
kotori-y/kotori_work | [
"51ebfdf49571ae34c246dc5b37cc86e25f4ccf3d"
] | [
"py_work/AI/ML/FeatureSelection.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Mar 24 21:46:41 2019\n\nYou are not expected to understand my codes!\n\n@Author: Kotori_Y\n@Blog: blog.moyule.me\n@Weibo: Kotori-Y\n@Mail: yzjkid9@gmail.com\n\nI love Megumi forerver!\n\"\"\"\n\nprint(__doc__)\n\nfrom sklearn.ensemble import RandomForestClassifier\nf... | [
[
"pandas.concat",
"pandas.read_csv",
"sklearn.ensemble.RandomForestClassifier",
"sklearn.model_selection.train_test_split",
"sklearn.model_selection.KFold",
"pandas.DataFrame"
]
] |
jni/vispy | [
"8b61cd439076aa3f50ac5f6dacb4c0af8c1d0684",
"8b61cd439076aa3f50ac5f6dacb4c0af8c1d0684"
] | [
"vispy/visuals/line/line.py",
"vispy/visuals/surface_plot.py"
] | [
"# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\"\"\"\nLine visual implementing Agg- and GL-based drawing modes.\n\"\"\"\n\nfrom __future__ import division\n\nimport numpy as np\n\nfrom ... import glo... | [
[
"numpy.sqrt",
"numpy.arange",
"numpy.cumsum",
"numpy.dtype",
"numpy.arctan2",
"numpy.append",
"numpy.repeat",
"numpy.array"
],
[
"numpy.arange",
"numpy.array",
"numpy.empty"
]
] |
nghugo88/tf-pose-estimation | [
"0df660feeb52957f40f4a5e18920adc317af3653"
] | [
"src/slim/nets/nets_factory_test.py"
] | [
"# Copyright 2016 Google Inc. 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 applicab... | [
[
"tensorflow.Graph",
"tensorflow.random_uniform",
"tensorflow.test.main"
]
] |
JacopoTeneggi/InnerEye-DeepLearning | [
"988d9fa318a19cfd435370248970d976ee2e78b0",
"988d9fa318a19cfd435370248970d976ee2e78b0",
"988d9fa318a19cfd435370248970d976ee2e78b0",
"988d9fa318a19cfd435370248970d976ee2e78b0"
] | [
"InnerEye/ML/pipelines/inference.py",
"InnerEye/ML/models/architectures/classification/image_encoder_with_mlp.py",
"InnerEye/ML/utils/lr_scheduler.py",
"InnerEye/ML/models/layers/weight_standardization.py"
] | [
"# ------------------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.\n# -----------------------------------------------------------... | [
[
"numpy.unique",
"numpy.stack",
"torch.tensor",
"numpy.concatenate",
"torch.no_grad",
"numpy.array"
],
[
"torch.nn.Sequential",
"torch.ones",
"torch.cat",
"torch.nn.ModuleList",
"torch.nn.Tanh",
"numpy.any"
],
[
"torch.optim.lr_scheduler.MultiStepLR",
... |
smartdolphin/variational-autoencoder | [
"999e00c1f630d1e3b6b433c965f87d236ba18668",
"999e00c1f630d1e3b6b433c965f87d236ba18668"
] | [
"util/metric.py",
"model/base.py"
] | [
"from collections import Counter\nimport numpy as np\nfrom sklearn.metrics import accuracy_score, confusion_matrix\n\n\ndef __majority(arr):\n counter = Counter(arr)\n value, _ = counter.most_common(1)[0]\n return value\n\n\ndef clustering_accuracy(y_true, y_clustering):\n clustering_labels = list(set(y... | [
[
"numpy.argwhere",
"numpy.zeros_like",
"sklearn.metrics.confusion_matrix",
"sklearn.metrics.accuracy_score"
],
[
"sklearn.metrics.log_loss",
"sklearn.metrics.mean_squared_error"
]
] |
patelshival/ga-dsmp | [
"c355d28daf50c51b1610930f963dcd17b770e17a"
] | [
"numpy-arrays/code.py"
] | [
"# --------------\n# Importing header files\r\nimport numpy as np\r\n\r\n# Path of the file has been stored in variable called 'path'\r\n\r\n#New record\r\nnew_record=[[50, 9, 4, 1, 0, 0, 40, 0]]\r\n\r\ndata = np.genfromtxt(path, delimiter=\",\", skip_header=1)\r\n\r\nprint(\"\\nData: \\n\\n\", data)\r\n\r\np... | [
[
"numpy.min",
"numpy.genfromtxt",
"numpy.concatenate",
"numpy.max",
"numpy.std",
"numpy.mean"
]
] |
jloveric/high-order-layers-torch | [
"a50ccf0cf82c21fdda4c20c671e7d233a0b6f793"
] | [
"high_order_layers_torch/FunctionalConvolution.py"
] | [
"from .LagrangePolynomial import LagrangeExpand\nfrom pytorch_lightning import LightningModule, Trainer\n\nfrom high_order_layers_torch.PolynomialLayers import *\nfrom torch.nn import Conv2d\nimport torch.nn as nn\nimport torch\nfrom .utils import *\n\n\ndef conv2d_wrapper(\n in_channels: int,\n out_channels:... | [
[
"torch.reshape",
"torch.nn.Conv2d"
]
] |
KnockerPulsar/pytorch-image-models | [
"893f5dde27ae6b17389f738bd6e37160e2868c72"
] | [
"timm/models/byobnet.py"
] | [
"\"\"\" Bring-Your-Own-Blocks Network\r\n\r\nA flexible network w/ dataclass based config for stacking those NN blocks.\r\n\r\nThis model is currently used to implement the following networks:\r\n\r\nGPU Efficient (ResNets) - gernet_l/m/s (original versions called genet, but this was already used (by SENet author))... | [
[
"torch.nn.Sequential",
"torch.nn.MaxPool2d",
"torch.nn.Identity",
"torch.nn.init.ones_",
"torch.nn.init.normal_",
"torch.nn.init.zeros_"
]
] |
whn09/incubator-tvm | [
"657a6fa6554cc8402eca225f80e1b2cc2803c71a",
"657a6fa6554cc8402eca225f80e1b2cc2803c71a"
] | [
"tests/python/relay/test_op_level3.py",
"tests/python/topi/python/test_topi_conv2d_nchw.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.take",
"numpy.linspace",
"numpy.asarray",
"numpy.squeeze",
"numpy.random.random_sample",
"numpy.random.randn",
"numpy.where",
"numpy.random.randint",
"numpy.clip",
"numpy.reshape",
"numpy.arange",
"numpy.stack",
"numpy.full",
"numpy.copy",
"numpy.... |
Jhsmit/awesome-panel | [
"53f7754f7c505a2666f6724df26c851ae942ec40"
] | [
"application/pages/training_analysis/services/fit_file_services.py"
] | [
"\"\"\"In this module we provide services for working with fit files.\r\n\r\nResources\r\n\r\n- fitparse package: [GitHub](https://github.com/dtcooper/python-fitparse) and \\\r\n [Docs](http://dtcooper.github.io/python-fitparse/)\r\n- fitdecode pacakge: [GitHub](https://github.com/polyvertex/fitdecode) and \\\r\... | [
[
"pandas.DataFrame"
]
] |
rainwoodman/tensorflow | [
"9b7ff60faa841f0473facf618cb5b66b9cb99b5e",
"9b7ff60faa841f0473facf618cb5b66b9cb99b5e",
"9b7ff60faa841f0473facf618cb5b66b9cb99b5e",
"9b7ff60faa841f0473facf618cb5b66b9cb99b5e",
"9b7ff60faa841f0473facf618cb5b66b9cb99b5e"
] | [
"tensorflow/python/kernel_tests/sparse_xent_op_test.py",
"tensorflow/lite/python/interpreter.py",
"tensorflow/python/keras/feature_column/sequence_feature_column.py",
"tensorflow/python/keras/engine/base_layer_utils_test.py",
"tensorflow/python/ops/stateful_random_ops_test.py"
] | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.platform.app.run",
"numpy.amax",
"tensorflow.python.framework.test_util.run_in_graph_and_eager_modes",
"tensorflow.python.ops.array_ops.shape",
"tensorflow.python.ops.array_ops.placeholder",
"tensorflow.python.ops.array_ops.squeeze",
"numpy.random.randn",
"numpy.... |
stephanefschwarz/EMET | [
"92ab8b0a53bbdfe5618353f0055eba98ae93f53f"
] | [
"emet/hypothesis/generate_dictionary.py"
] | [
"import sys\nimport pandas as pd\nimport requests\nimport nltk\nnltk.download('stopwords')\nfrom nltk.tokenize import RegexpTokenizer\nfrom nltk.corpus import stopwords\n\nfrom bs4 import BeautifulSoup\n\n# --- open dataset --- #\ndata = pd.read_csv('./dataset/translated_twitter_posts.csv')\n\ndocuments = data['tra... | [
[
"pandas.read_csv"
]
] |
gujralsanyam22/models | [
"d96f8f043dbe2b5ca8ea1785f57df8faf68d8875",
"11ea5237818e791a5717716d5413977f4c4db1e3",
"11ea5237818e791a5717716d5413977f4c4db1e3",
"11ea5237818e791a5717716d5413977f4c4db1e3",
"d96f8f043dbe2b5ca8ea1785f57df8faf68d8875",
"11ea5237818e791a5717716d5413977f4c4db1e3",
"d96f8f043dbe2b5ca8ea1785f57df8faf68d887... | [
"official/nlp/bert/run_squad.py",
"official/vision/detection/dataloader/tf_example_decoder.py",
"research/object_detection/export_tflite_ssd_graph_lib.py",
"research/slim/nets/nasnet/pnasnet.py",
"official/modeling/hyperparams/base_config_test.py",
"research/object_detection/models/center_net_resnet_featu... | [
"# Copyright 2019 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.io.gfile.GFile",
"tensorflow.summary.scalar",
"tensorflow.summary.create_file_writer"
],
[
"tensorflow.sparse.to_dense",
"tensorflow.zeros",
"tensorflow.io.decode_png",
"tensorflow.stack",
"tensorflow.shape",
"tensorflow.io.parse_single_example",
"tensorflow... |
cns-iu/ccf-research | [
"e029c8985a249c1caec925e95f5286c505c706ea"
] | [
"hackathon/annotation_compare_viz.py"
] | [
"import json\nfrom re import split\nimport shutil\nimport os\nimport sys\nimport numpy as np\nfrom PIL import Image, ImageDraw, ImageFont\nfrom skimage import io\nfrom shapely.geometry import Polygon\n\nImage.MAX_IMAGE_PIXELS = None\n\n\ndef make_dir(path):\n if not os.path.exists(path):\n os.makedirs(pat... | [
[
"numpy.array",
"numpy.zeros"
]
] |
yizhe-ang/MMSceneGraph | [
"d4daec3d7930d6fe1efe75b9c0a265c8be0b70ba",
"d4daec3d7930d6fe1efe75b9c0a265c8be0b70ba",
"d4daec3d7930d6fe1efe75b9c0a265c8be0b70ba",
"d4daec3d7930d6fe1efe75b9c0a265c8be0b70ba"
] | [
"mmdet/models/relation_heads/imp_head.py",
"tools/gradcheck.py",
"mmdet/models/relational_caption_heads/triplelstm_head.py",
"mmdet/models/mask_heads/transfer_mask_head.py"
] | [
"# ---------------------------------------------------------------\r\n# imp_head.py\r\n# Set-up time: 2020/5/21 下午11:22\r\n# Copyright (c) 2020 ICT\r\n# Licensed under The MIT License [see LICENSE for details]\r\n# Written by Kenneth-Wong (Wenbin-Wang) @ VIPL.ICT\r\n# Contact: wenbin.wang@vipl.ict.ac.cn [OR] nkwang... | [
[
"torch.stack",
"torch.cat"
],
[
"numpy.hstack",
"torch.randn",
"torch.from_numpy",
"numpy.random.rand",
"numpy.random.randint"
],
[
"torch.nn.Sequential",
"torch.nn.Dropout",
"torch.mm",
"torch.ones",
"torch.empty",
"torch.cat",
"torch.zeros",
"t... |
jvel07/ast | [
"600e7cf952ec59ac9cc1bb3170d3da7578e1f384"
] | [
"src/models/ast_models.py"
] | [
"# -*- coding: utf-8 -*-\n# @Time : 6/10/21 5:04 PM\n# @Author : Yuan Gong\n# @Affiliation : Massachusetts Institute of Technology\n# @Email : yuangong@mit.edu\n# @File : ast_models.py\nimport os\nos.environ[\"CUDA_DEVICE_ORDER\"] = \"PCI_BUS_ID\"\nos.environ[\"CUDA_VISIBLE_DEVICES\"] = \"0,1,2,3\"\n\n\ni... | [
[
"torch.cat",
"torch.load",
"torch.randn",
"torch.zeros",
"torch.nn.Conv2d",
"torch.cuda.current_device",
"torch.sum",
"torch.nn.LayerNorm",
"torch.cuda.amp.autocast",
"torch.nn.Linear",
"torch.nn.functional.interpolate",
"torch.cuda.is_available",
"torch.nn.Data... |
zhaohengyin/irgail_example | [
"89f7661b5ab08bdf79686eaf8933ad7b5badced4"
] | [
"utils.py"
] | [
"from tqdm import tqdm\nimport numpy as np\nimport torch\nimport torch.nn as nn\n\ndef build_mlp(input_dim, output_dim, hidden_units=[64, 64],\n hidden_activation=nn.Tanh(), output_activation=None):\n layers = []\n units = input_dim\n for next_units in hidden_units:\n layers.append(nn.L... | [
[
"torch.nn.Linear",
"torch.nn.Sequential",
"torch.nn.Tanh"
]
] |
kyuhoJeong11/GrewRL | [
"a514698df8d38df34de0bd1667d99927f0aa3885",
"a514698df8d38df34de0bd1667d99927f0aa3885",
"a514698df8d38df34de0bd1667d99927f0aa3885",
"a514698df8d38df34de0bd1667d99927f0aa3885"
] | [
"carla/PythonAPI/examples/tutorial4.py",
"robustRL-master/robustRL/samplers.py",
"robustRL-master/robustRL/gym_env.py",
"maml_rl_taewoo/rllab/misc/logger.py"
] | [
"import glob\nimport os\nimport sys\nimport random\nimport time\nimport numpy as np\nimport cv2\nimport math\nfrom collections import deque\nfrom keras.applications.xception import Xception\nfrom keras.layers import Dense, GlobalAveragePooling2D\nfrom keras.optimizers import Adam\nfrom keras.models import Model\n\n... | [
[
"numpy.max",
"numpy.array",
"numpy.random.uniform"
],
[
"numpy.amax",
"numpy.random.seed",
"numpy.amin",
"numpy.percentile",
"numpy.ceil",
"numpy.std",
"numpy.mean",
"numpy.array",
"numpy.zeros"
],
[
"numpy.amax",
"numpy.amin",
"numpy.percentile"... |
vanderhe/fortnet-python | [
"118237f0ce750852d973b213161fc04623fd7f82",
"118237f0ce750852d973b213161fc04623fd7f82"
] | [
"test/test_fnetout.py",
"src/fortformat/fnetout.py"
] | [
"#!/usr/bin/env python3\n#------------------------------------------------------------------------------#\n# fortnet-python: Python Tools for the Fortnet Software Package #\n# Copyright (C) 2021 - 2022 T. W. van der Heide #\n# ... | [
[
"numpy.array"
],
[
"numpy.array",
"numpy.shape",
"numpy.empty"
]
] |
iamfaith/DeepLearning | [
"467c73e2d0435f0a05255e5b5e00454260d01f27",
"467c73e2d0435f0a05255e5b5e00454260d01f27"
] | [
"books/PRML/PRML-master-Python/prml/nn/optimizer/ada_delta.py",
"books/PRML/PRML-master-Python/prml/nn/linalg/inv.py"
] | [
"import numpy as np\nfrom prml.nn.optimizer.optimizer import Optimizer\n\n\nclass AdaDelta(Optimizer):\n \"\"\"\n AdaDelta optimizer\n \"\"\"\n\n def __init__(self, parameter, rho=0.95, epsilon=1e-8):\n super().__init__(parameter, None)\n self.rho = rho\n self.epsilon = epsilon\n ... | [
[
"numpy.zeros",
"numpy.sqrt"
],
[
"numpy.linalg.inv"
]
] |
laenan8466/DeerLab | [
"94f1942da1b506e0661a8e7e4901bb5ba6d69143",
"94f1942da1b506e0661a8e7e4901bb5ba6d69143",
"94f1942da1b506e0661a8e7e4901bb5ba6d69143"
] | [
"deerlab/utils/utils.py",
"test/test_mixmodels.py",
"test/test_fftspec.py"
] | [
"import warnings\r\nimport numpy as np\r\nimport cmath as math\r\nimport scipy as scp\r\nimport scipy.optimize as opt\r\n\r\nfrom types import FunctionType \r\n\r\n\r\ndef parse_multidatasets(V,K,weights,precondition=False):\r\n#===============================================================================\r\n ... | [
[
"numpy.diag",
"numpy.minimum",
"numpy.sqrt",
"numpy.linspace",
"numpy.concatenate",
"numpy.mean",
"numpy.fill_diagonal",
"numpy.linalg.qr",
"numpy.where",
"numpy.tril",
"numpy.linalg.svd",
"numpy.arange",
"numpy.eye",
"numpy.atleast_1d",
"numpy.size",
... |
linxi1158/iMIX | [
"99898de97ef8b45462ca1d6bf2542e423a73d769",
"99898de97ef8b45462ca1d6bf2542e423a73d769",
"99898de97ef8b45462ca1d6bf2542e423a73d769",
"af87a17275f02c94932bb2e29f132a84db812002",
"af87a17275f02c94932bb2e29f132a84db812002",
"99898de97ef8b45462ca1d6bf2542e423a73d769",
"99898de97ef8b45462ca1d6bf2542e423a73d76... | [
"imix/data/infocomp/ocrvqa_infocpler.py",
"imix/models/backbones/cagraph_backbone.py",
"imix/data/vqadata/vocabprocessor.py",
"imix/solver/lr_scheduler.py",
"imix/models/vqa_models/vilbert/vilbert.py",
"imix/engine/hooks/periods/tensorboard_logger.py",
"imix/models/losses/triple_logit_binary_cross_entro... | [
"import torch\n\nfrom ..utils.stream import ItemFeature\nfrom .base_infocpler import BaseInfoCpler\n\n\nclass OCRVQAInfoCpler(BaseInfoCpler):\n\n def __init__(self, cfg):\n super().__init__(cfg)\n\n def complete_info(self, item_feature: ItemFeature):\n tokens = self.tokenizer.tokenize(item_featu... | [
[
"torch.tensor",
"torch.Tensor",
"torch.zeros"
],
[
"torch.nn.Sequential",
"torch.nn.Dropout",
"torch.nn.functional.softmax",
"torch.cat",
"torch.nn.functional.dropout",
"torch.topk",
"torch.nn.Sigmoid",
"torch.nn.Tanh",
"torch.nn.Linear",
"torch.bmm",
"t... |
CatrionaMarr/OnlineMCMCTest | [
"92899d082c1bdfc2d61128ced453ac59812ae03a",
"92899d082c1bdfc2d61128ced453ac59812ae03a"
] | [
"results/8112a5333cb1bb472ee14fa5342f6422/pyfile.py",
"results/4a3182dfaaf9dfd540a677b1d9c323ed/pyfile.py"
] | [
"#!/usr/bin/env python\n\n# import required packages\nimport emcee\nimport numpy as np\nfrom numpy import exp, log\n\n# import model function from separate file\nfrom mymodel import mymodel\n\n# import post-processing function from theonlinemcmc package\nfrom theonlinemcmc import *\n\n# initialise error code value\... | [
[
"numpy.hstack",
"numpy.isfinite",
"numpy.random.rand",
"numpy.savetxt",
"numpy.array",
"numpy.sum",
"numpy.loadtxt"
],
[
"numpy.hstack",
"numpy.isfinite",
"numpy.random.rand",
"numpy.savetxt",
"numpy.array",
"numpy.sum",
"numpy.loadtxt"
]
] |
zjutcv/mmhid | [
"faeaf4fb5c634037c6e482f63ef73e7f2144c7b5"
] | [
"mmhid/datasets/builder.py"
] | [
"# Copyright (c) OpenMMLab. All rights reserved.\nimport 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 torch.utils.data import DataLoader\n\nfr... | [
[
"numpy.random.seed"
]
] |
amelliaaas/tugastkc4 | [
"f442382c72379e911f3780543b95345a3b1c9407",
"f442382c72379e911f3780543b95345a3b1c9407",
"f442382c72379e911f3780543b95345a3b1c9407",
"f442382c72379e911f3780543b95345a3b1c9407",
"f442382c72379e911f3780543b95345a3b1c9407",
"f442382c72379e911f3780543b95345a3b1c9407",
"f442382c72379e911f3780543b95345a3b1c940... | [
"venv/Lib/site-packages/skimage/transform/tests/test_radon_transform.py",
"venv/Lib/site-packages/skimage/segmentation/tests/test_slic.py",
"venv/Lib/site-packages/matplotlib/tests/test_axes.py",
"venv/Lib/site-packages/skimage/morphology/tests/test_reconstruction.py",
"venv/Lib/site-packages/skimage/morpho... | [
"import itertools\nimport pytest\n\nimport numpy as np\nfrom skimage.data import shepp_logan_phantom\nfrom skimage.transform import radon, iradon, iradon_sart, rescale\n\nfrom skimage._shared.utils import convert_to_float\nfrom skimage._shared import testing\nfrom skimage._shared.testing import test_parallel\nfrom ... | [
[
"matplotlib.pyplot.imshow",
"numpy.sqrt",
"numpy.linspace",
"numpy.all",
"numpy.max",
"numpy.mean",
"numpy.tri",
"numpy.allclose",
"numpy.clip",
"numpy.arange",
"numpy.ceil",
"numpy.std",
"matplotlib.pyplot.subplot",
"numpy.argmax",
"numpy.interp",
"... |
NickyBar/QIP | [
"11747b40beb38d41faa297fb2b53f28c6519c753"
] | [
"qiskit/basicplotter.py"
] | [
"# -*- coding: utf-8 -*-\n\n# Copyright 2017 IBM RESEARCH. 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\... | [
[
"numpy.sqrt",
"numpy.linspace",
"matplotlib.pyplot.title",
"numpy.arange",
"matplotlib.pyplot.annotate",
"matplotlib.pyplot.subplots",
"numpy.cos",
"numpy.sin",
"matplotlib.pyplot.plot",
"matplotlib.patches.FancyArrowPatch.draw",
"numpy.size",
"numpy.floor",
"ma... |
wfarah/frbpoppy | [
"e575c49e6b4a69015a66d3f38a3459e0ffe4eb05",
"e575c49e6b4a69015a66d3f38a3459e0ffe4eb05",
"e575c49e6b4a69015a66d3f38a3459e0ffe4eb05",
"e575c49e6b4a69015a66d3f38a3459e0ffe4eb05"
] | [
"tests/int_pro_surveys.py",
"tests/logn_logs_spectral_index.py",
"tests/int_pro_theory.py",
"frbpoppy/survey.py"
] | [
"\"\"\"Plot intensity profile of theoretical beam patterns.\"\"\"\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom scipy.stats import binned_statistic as bstat\n\nfrom frbpoppy.survey import Survey\n\nOBSERVATORIES = [('parkes', 'htru'),\n ('apertif', 'apertif')]\n\nn = int(1e6)\n\nfor obs... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.yscale",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.fill_between",
"numpy.argsort",
"matplotlib.pyplot.xlabel",
"scipy.stats.binned_statistic",
"matplotlib.pyplot... |
feature-engineer/glymur | [
"660b593ab7bfbb3036de5d15c3ecb43bef3bf919"
] | [
"tests/test_colour_specification_box.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nTest suite specifically targeting ICC profiles\n\"\"\"\n\n# Standard library imports ...\nfrom datetime import datetime\ntry:\n import importlib.resources as ir\nexcept ImportError: # pragma: no cover\n # before 3.7\n import importlib_resources as ir\nimport struct\nimp... | [
[
"numpy.array"
]
] |
LiRunyi2001/cnSoftBei | [
"72b90033ade1e926d3fb23621f5c67fa8eec9bb4",
"72b90033ade1e926d3fb23621f5c67fa8eec9bb4"
] | [
"roberta/scripts/convert_bert_text_classification_from_huggingface_to_uer.py",
"roberta/finetune/run_chid.py"
] | [
"import sys\nimport os\nimport torch\nimport argparse\nimport collections\n\nuer_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), \"..\"))\nsys.path.insert(0, uer_dir)\n\nfrom scripts.convert_bert_from_huggingface_to_uer import convert_bert_transformer_encoder_from_huggingface_to_uer\n\nparser = argpar... | [
[
"torch.save",
"torch.load"
],
[
"torch.cuda.device_count",
"torch.LongTensor",
"torch.cuda.is_available",
"torch.nn.DataParallel"
]
] |
zjplab/Pedestron | [
"07e1a2cee82b57e1584b0c744f5b44f1ae92be73",
"07e1a2cee82b57e1584b0c744f5b44f1ae92be73"
] | [
"mmdet/models/bbox_heads/mgan_head.py",
"mmdet/models/losses/focal_loss.py"
] | [
"import torch.nn as nn\n\nfrom ..registry import HEADS\nfrom ..utils import ConvModule\nfrom mmdetection.core import auto_fp16\n\n\n@HEADS.register_module\nclass MGANHead(nn.Module):\n\n def __init__(self,\n num_convs=2,\n roi_feat_size=7,\n in_channels=512,\n ... | [
[
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.nn.ReLU"
],
[
"torch.nn.functional.binary_cross_entropy_with_logits"
]
] |
bucaps/HotSpotMap | [
"655d83d98316acbf9328519850268f548ae44af4"
] | [
"HotSpotMap.py"
] | [
"# HotSpotMap: A python based temperature (thermal) map generation\n# tool for HotSpot-6.0 (http://lava.cs.virginia.edu/HotSpot/)\n# This tool uses python's turtle library\n#\n# Author: Gaurav Kothari (gkothar1@binghamton.edu) Copyright 2021\n#\n# This tool generates:\n# 1) Floor-plan image (using floor-plan file)\... | [
[
"matplotlib.colors.LinearSegmentedColormap.from_list",
"matplotlib.colors.Normalize"
]
] |
Xiaoying-Tian/selective-inference | [
"a20c5ad3f527beb709d5b8d7301016640738b092"
] | [
"selection/truncated/chi.py"
] | [
"\"\"\"\nThis module implements the class `truncated_chi2` which \nperforms (conditional) UMPU tests for Gaussians\nrestricted to a set of intervals.\n\n\"\"\"\nimport numpy as np\nimport mpmath as mp\nfrom scipy.stats import chi, chi2\n\nfrom .base import truncated, find_root\n\nclass truncated_chi(truncated):\n\n... | [
[
"scipy.stats.chi.ppf",
"scipy.stats.chi2.ppf",
"scipy.stats.chi2.pdf",
"scipy.stats.chi.pdf"
]
] |
lujiammy/coronavirus-machine-learning | [
"4af16b1c51a89a81206262b50a9bcf4d9b679853"
] | [
"mlp_uk_learning.py"
] | [
"import numpy as np\nnp.random.seed(1337)\nfrom keras.models import Sequential\nfrom keras.layers import Dense\nimport matplotlib.pyplot as plt\n\n\nmodel = Sequential()\nmodel.add(Dense(units=50, input_dim=1, activation='relu'))\nmodel.add(Dense(units=50, activation='relu'))\nmodel.add(Dense(units=1, activation='s... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.scatter",
"numpy.random.seed",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.xlabel",
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
CrackedSTone/algorithm-detects-liver-pathology | [
"d52d08e4e6931b3502f083f20d6332f7b6839a3b"
] | [
"diplom_test/main.py"
] | [
"#!/usr/bin/python3\n# -*- coding: utf-8 -*-\n\nfrom PyQt5.uic import loadUi\nfrom PyQt5.QtGui import *\nfrom PyQt5.QtWidgets import *\nfrom PyQt5.QtCore import *\n\n#from matplotlib.backends.backend_qt5agg import (NavigationToolbar2QT as NavigationToolbar)\nimport matplotlib.image as mpimg\n\nimport sys\n\nimport ... | [
[
"matplotlib.image.imread"
]
] |
Jbuxofplenty/quant | [
"2ef24012963e9ead6193e0f421c63fb009c78f80"
] | [
"strategies/hitoshi.py"
] | [
"from zipline.pipeline import Pipeline\nfrom zipline.api import attach_pipeline, pipeline_output\nfrom zipline.pipeline.data.equity_pricing import USEquityPricing\nfrom zipline.pipeline.data import morningstar\nfrom zipline.pipeline.factors import SimpleMovingAverage, AverageDollarVolume\nfrom zipline.pipeline.filt... | [
[
"numpy.isnan"
]
] |
Codelegant92/STC-ProtoNet | [
"f3e77bb1b363b0338cda6f1701bfabe0cd3accbe"
] | [
"save_features.py"
] | [
"import numpy as np\nimport torch\nfrom torch.autograd import Variable\nimport os\nimport glob\nimport h5py\n\nimport configs\nimport backbone\nfrom data.datamgr import SimpleDataManager\nfrom methods.baselinetrain import BaselineTrain\nfrom methods.baselinefinetune import BaselineFinetune\nfrom methods.protonet im... | [
[
"torch.autograd.Variable",
"torch.load"
]
] |
LSSTDESC/skyportal | [
"1a433aae67b26ffd3516e65e0fdbf866b4751486"
] | [
"skyportal/tests/api/test_photometry.py"
] | [
"import math\n\nimport numpy as np\nimport sncosmo\n\nfrom baselayer.app.env import load_env\nfrom skyportal.models import DBSession, Token\nfrom skyportal.tests import api\n\n_, cfg = load_env()\nPHOT_DETECTION_THRESHOLD = cfg[\"misc.photometry_detection_threshold_nsigma\"]\n\n\ndef test_token_user_post_get_photom... | [
[
"numpy.log",
"numpy.allclose",
"numpy.log10",
"numpy.testing.assert_allclose",
"numpy.random.uniform"
]
] |
smolendawid/ubaar-competition | [
"28de972d6beb13343c537fc030101be672a852a3"
] | [
"feature_extraction/other_features.py"
] | [
"import pandas as pd\nfrom sklearn.preprocessing import LabelEncoder\n\n\ndef categorical_features(data, features):\n features['vehicleType'] = data['vehicleType']\n features['vehicleOption'] = data['vehicleOption']\n\n features['vehicleTypeOption'] = [a + '_' + b for a, b in zip(data['vehicleType'].values... | [
[
"numpy.log",
"sklearn.preprocessing.LabelEncoder",
"pandas.get_dummies"
]
] |
nicolasoyharcabal/tensorflow | [
"0d3b58cfe91c6b865a14701345d7a84ce949c0e3"
] | [
"tensorflow/python/data/experimental/ops/batching.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.python.data.util.nest.map_structure_up_to",
"tensorflow.python.ops.array_ops.shape",
"tensorflow.python.data.ops.dataset_ops.flat_structure",
"tensorflow.python.data.ops.dataset_ops.StructuredFunctionWrapper",
"tensorflow.python.ops.control_flow_ops.Assert",
"tensorflow.python.... |
jsonbruce/MTSAnomalyDetection | [
"94e1b3177f8260804a4f9079ce7358f984521471",
"94e1b3177f8260804a4f9079ce7358f984521471",
"94e1b3177f8260804a4f9079ce7358f984521471"
] | [
"test/prophet_model.py",
"tsbitmaps/test/test_tsbitmaps.py",
"ensemblation/model.py"
] | [
"#!/usr/bin/env python\n# coding=utf-8\n\n# Created by max on 17-5-4.\n\nimport os\nimport sys\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nfrom fbprophet import Prophet\nfrom pandas import Series, DataFrame\n\n\nDATA_FILE = \"dataset/data0.csv\"\n\ndef main(args):\n data = pd.r... | [
[
"pandas.read_csv",
"matplotlib.pyplot.show"
],
[
"pandas.read_csv",
"numpy.random.rand",
"numpy.loadtxt"
],
[
"matplotlib.use"
]
] |
FeryET/pytorch-lightning | [
"b1f8b111b5085373599758a4e155a482259cdbf0",
"b1f8b111b5085373599758a4e155a482259cdbf0"
] | [
"tests/lite/test_wrappers.py",
"tests/loggers/test_base.py"
] | [
"# Copyright The PyTorch Lightning team.\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... | [
[
"torch.tensor",
"torch.get_default_dtype",
"torch.is_autocast_enabled",
"torch.nn.Identity",
"torch.device",
"torch.utils.data.dataloader.DataLoader"
],
[
"numpy.intc",
"numpy.byte",
"numpy.single",
"numpy.int_",
"numpy.cdouble",
"torch.tensor",
"numpy.longl... |
zjzh/jax | [
"8372b98c4856b6b2363b7bb28abdb4579440a656",
"84dcfcd7e52471f1ac1955d108255467e7950820"
] | [
"jax/_src/device_array.py",
"jax/_src/lax/linalg.py"
] | [
"# 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 applicable law or agreed ... | [
[
"numpy.asarray",
"numpy.array2string",
"numpy.get_printoptions"
],
[
"numpy.prod",
"numpy.array",
"numpy.dtype"
]
] |
983632847/video_analyst | [
"01b7ad278b828a3f7ff7a0488c5ca8f055240192",
"01b7ad278b828a3f7ff7a0488c5ca8f055240192"
] | [
"videoanalyst/model/task_model/taskmodel_impl/siamese_track.py",
"videoanalyst/evaluation/got_benchmark/experiments/got10k.py"
] | [
"# -*- coding: utf-8 -*\n\nimport numpy as np\nfrom loguru import logger\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom videoanalyst.model.common_opr.common_block import (conv_bn_relu,\n xcorr_depthwise)\nfrom videoanalyst.model... | [
[
"torch.sigmoid",
"torch.load",
"torch.set_printoptions",
"torch.nn.init.normal_",
"torch.device"
],
[
"numpy.greater",
"numpy.linspace",
"numpy.isnan",
"matplotlib.pyplot.subplots",
"numpy.concatenate",
"numpy.mean",
"matplotlib.rcParams.update",
"numpy.save... |
ysglh/DeepVideoAnalytics | [
"e401b3273782409b2604657514bec293d6aa75b0"
] | [
"repos/tf_ctpn_cpu/lib/utils/setup.py"
] | [
"from Cython.Build import cythonize\nimport numpy as np\nfrom distutils.core import setup\n\n\nsetup(ext_modules=cythonize([\"bbox.pyx\",\"cython_nms.pyx\"],include_path=[np.get_include()]\n ))\n\n"
] | [
[
"numpy.get_include"
]
] |
constracktor/testing-python-exercise | [
"70b15a9d8e193fc518e46996cbc3e9f52cb1336d"
] | [
"tests/unit/test_diffusion2d_functions.py"
] | [
"\"\"\"\nTests for functions in class SolveDiffusion2D\n\"\"\"\nimport numpy as np\n#import pytest\nfrom diffusion2d import SolveDiffusion2D\n\nfrom unittest import TestCase\n\n\nclass TestOperations(TestCase):\n \"\"\"\n Test suite for mathematical operations functions.\n \"\"\"\n def setUp(self):\n ... | [
[
"numpy.ones"
]
] |
nmardirossian/pyscf | [
"57c8912dcfcc1157a822feede63df54ed1067115",
"57c8912dcfcc1157a822feede63df54ed1067115",
"57c8912dcfcc1157a822feede63df54ed1067115",
"57c8912dcfcc1157a822feede63df54ed1067115",
"57c8912dcfcc1157a822feede63df54ed1067115",
"57c8912dcfcc1157a822feede63df54ed1067115",
"57c8912dcfcc1157a822feede63df54ed106711... | [
"examples/gto/20-ao_integrals.py",
"pyscf/gto/moleintor.py",
"pyscf/ci/ucisd.py",
"pyscf/cc/test/test_h2o.py",
"pyscf/symm/test/test_cg.py",
"pyscf/scf/jk.py",
"pyscf/cc/ccsd_lambda_incore.py",
"pyscf/dft/xcfun.py",
"pyscf/pbc/df/ft_ao.py"
] | [
"#!/usr/bin/env python\n#\n# Author: Qiming Sun <osirpt.sun@gmail.com>\n#\n\n'''\nAccess AO integrals\n\nMole.intor and Mole.intor_by_shell functions can generate AO integrals.\nCalling Mole.intor with the integral function name returns a integral matrix\nfor all basis functions defined in Mole. If the integral op... | [
[
"numpy.empty"
],
[
"numpy.rollaxis",
"numpy.asarray",
"numpy.ndarray",
"numpy.all",
"numpy.empty"
],
[
"numpy.random.random",
"numpy.einsum",
"numpy.random.seed",
"numpy.tril_indices",
"numpy.cumsum",
"numpy.linalg.norm",
"numpy.all",
"numpy.array",
... |
mcflugen/plume | [
"7fc65ba9461fece372eef4b2bee9ba6e72f42d19"
] | [
"setup.py"
] | [
"from setuptools import setup, find_packages\nfrom distutils.extension import Extension\n\nimport numpy as np\nimport cython_gsl\nimport versioneer\n\n\ndef read_requirements():\n import os\n\n path = os.path.dirname(os.path.abspath(__file__))\n requirements_file = os.path.join(path, 'requirements.txt')\n ... | [
[
"numpy.get_include"
]
] |
Ru-Xiang/x-deeplearning | [
"781545783a4e2bbbda48fc64318fb2c6d8bbb3cc",
"781545783a4e2bbbda48fc64318fb2c6d8bbb3cc",
"781545783a4e2bbbda48fc64318fb2c6d8bbb3cc"
] | [
"xdl-algorithm-solution/Rocket/script/rnn.py",
"xdl/test/python/unit_test/test_constant.py",
"blaze/thirdparty/onnx/onnx-1.2.2/onnx/backend/test/case/node/pool_op_common.py"
] | [
"# Copyright (C) 2016-2018 Alibaba Group Holding Limited\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 require... | [
[
"tensorflow.python.ops.array_ops.constant",
"tensorflow.python.framework.tensor_shape.TensorShape",
"tensorflow.python.ops.array_ops.shape",
"tensorflow.python.ops.math_ops.reduce_max",
"tensorflow.python.ops.control_flow_ops.while_loop",
"tensorflow.python.ops.array_ops.identity",
"te... |
ankurankan/game_of_life | [
"81cf2f7f70a05019e78206d1ee7a8205aa590186"
] | [
"main.py"
] | [
"from time import sleep\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\ndef get_initial_state(size):\n return np.random.choice([0, 1], size)\n\ndef compute_next_state(state):\n new_state = np.zeros(state.shape, dtype=int)\n for i in range(state.shape[0]):\n for j in range(state.shape[1])... | [
[
"matplotlib.pyplot.imshow",
"numpy.sum",
"numpy.random.choice",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.xlim",
"numpy.zeros",
"matplotlib.pyplot.pause"
]
] |
ioangatop/srVAE | [
"dfee765c53f11f4653e7c6e7118a339832656867"
] | [
"src/utils/args.py"
] | [
"import torch\nimport argparse\n\n# ----- Parser -----\n\ndef parser():\n PARSER = argparse.ArgumentParser(description='Training parameters.')\n\n # Dataset\n PARSER.add_argument('--dataset', default='CIFAR10', type=str,\n choices=['CIFAR10', 'CelebA', 'Imagenette', 'ImageNet32', 'Im... | [
[
"torch.cuda.is_available"
]
] |
KanHatakeyama/annealing_project | [
"eac2dfe65c480450a5d12b09db2c1c9f83d03389"
] | [
"lib/composite/LiPolymerDataScaler.py"
] | [
"import pandas as pd\nimport numpy as np\nfrom sklearn.preprocessing import StandardScaler\nfrom DataUtility import get_column_names\n\n\nclass LiPolymerDataScaler:\n \"\"\"\n a special class to scale the lithium polymer database\n \"\"\"\n\n def __init__(self):\n self.scaling_dict = {}\n ... | [
[
"sklearn.preprocessing.StandardScaler"
]
] |
danielschulz/MONAI | [
"54ef6e9e700f0de3d50184c0148f953be871a58e"
] | [
"monai/metrics/surface_distance.py"
] | [
"# Copyright 2020 - 2021 MONAI Consortium\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable law or agre... | [
[
"numpy.ndindex",
"numpy.mean",
"torch.from_numpy",
"numpy.empty"
]
] |
maxi-marufo/my-scipy | [
"be6c2597fcee86419592ac512319301c7ddfc118",
"be6c2597fcee86419592ac512319301c7ddfc118",
"be6c2597fcee86419592ac512319301c7ddfc118",
"be6c2597fcee86419592ac512319301c7ddfc118",
"be6c2597fcee86419592ac512319301c7ddfc118"
] | [
"scipy/integrate/quadrature.py",
"scipy/signal/signaltools.py",
"scipy/sparse/tests/test_construct.py",
"scipy/integrate/_ode.py",
"scipy/spatial/tests/test_spherical_voronoi.py"
] | [
"import functools\nimport numpy as np\nimport math\nimport types\nimport warnings\n\n# trapz is a public function for scipy.integrate,\n# even though it's actually a NumPy function.\nfrom numpy import trapz\nfrom scipy.special import roots_legendre\nfrom scipy.special import gammaln\n\n__all__ = ['fixed_quad', 'qua... | [
[
"numpy.dot",
"numpy.sum",
"scipy.special.roots_legendre",
"numpy.arange",
"numpy.asarray",
"numpy.linalg.inv",
"numpy.cumsum",
"numpy.full",
"numpy.real",
"numpy.diff",
"numpy.isscalar",
"scipy.special.gammaln",
"numpy.array",
"numpy.isinf",
"numpy.empty... |
fubiye/edgar-abs-kg | [
"3973059c7b1cdaab8a4e857a43c702ac0be7e725",
"3973059c7b1cdaab8a4e857a43c702ac0be7e725"
] | [
"dataset/corpus_to_txts.py",
"dataset/corpus_test.py"
] | [
"# coding=utf-8\n\nimport pandas as pd\nfrom pathlib import Path\n# extract corpus to seprate files\nOUT_PUT_DIR = r'D:\\data\\edgar\\example\\documents'\ndf = pd.read_csv(r'D:\\data\\edgar\\example\\corpus.csv')\n# def write_to_file(cik,filingId,fileName,content):\ndef write_to_file(cik,filingId,fileName,content):... | [
[
"pandas.read_csv"
],
[
"pandas.read_csv"
]
] |
Yili-Yang/Litterman_Carbon_Pricing | [
"71eeefc5e2d9b4c1473a9a6ae85c33b019e32d84"
] | [
"ezclimate/optimization.py"
] | [
"from __future__ import division, print_function\nimport numpy as np\nimport multiprocessing\nfrom tools import _pickle_method, _unpickle_method\ntry:\n import copy_reg\nexcept:\n import copyreg as copy_reg\nimport types\n\ncopy_reg.pickle(types.MethodType, _pickle_method, _unpickle_method)\n\nclass GeneticAl... | [
[
"numpy.square",
"numpy.random.random",
"numpy.maximum",
"numpy.linspace",
"numpy.random.choice",
"numpy.abs",
"numpy.power",
"numpy.ones",
"numpy.sign",
"numpy.max",
"numpy.copy",
"numpy.argmax",
"scipy.optimize.fmin",
"numpy.append",
"numpy.argsort",
... |
steuxyo/Pandora | [
"57db04f31d6cecba93fa3bc0091f624c8b8ec5f1"
] | [
"tests/test_disparity.py"
] | [
"#!/usr/bin/env python\n# coding: utf8\n#\n# Copyright (c) 2020 Centre National d'Etudes Spatiales (CNES).\n#\n# This file is part of PANDORA\n#\n# https://github.com/CNES/Pandora\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the L... | [
[
"numpy.isnan",
"numpy.arange",
"numpy.ones",
"numpy.testing.assert_array_equal",
"numpy.array",
"numpy.tril"
]
] |
mylar-pr/DaaS | [
"e41fa9e9fbda66d7150f00e6db13dd3a76cd3501"
] | [
"first_lambda/service.py"
] | [
"import datetime\nimport json\nimport os\nimport boto3\nimport pandas as pd\nimport io\nimport requests\nimport numpy as np\nfrom io import StringIO\nimport uuid\n\n\n\ns3 = boto3.resource(\n service_name='s3',\n region_name='us-east-2')\nbucket_name = 'secom-daas-bucket' # already created on S3\n\nlink1 = 'h... | [
[
"pandas.concat"
]
] |
antonyvigouret/Text-Recognition-PyTorch | [
"7576480684612e856602169b3229fe6c8f4b4b9d"
] | [
"train.py"
] | [
"import string\n\nimport torch\nfrom torch.nn import CrossEntropyLoss\nfrom torch.nn import CTCLoss\nimport torch.optim as optim\nfrom torch.utils.tensorboard import SummaryWriter\nfrom torchsummary import summary\nfrom tqdm import tqdm\n\nfrom cnn_seq2seq import ConvSeq2Seq\nfrom cnn_seq2seq import Decoder\nfrom c... | [
[
"torch.nn.CrossEntropyLoss",
"torch.load",
"torch.nn.CTCLoss",
"torch.utils.tensorboard.SummaryWriter",
"torch.save"
]
] |
aspuru-guzik-group/routescore | [
"3adedbc1d6193751bd1cd0af33395572b35a8e43",
"3adedbc1d6193751bd1cd0af33395572b35a8e43"
] | [
"_Figure_S18.py",
"_Figure_S11.py"
] | [
"#!/usr/bin/env python\n\nimport numpy as np\nimport pandas as pd\n\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n# Custom style\nplt.style.use('scientific')\n\n# absolute tolerances for chimera\nabsolutes = np.array([0.67, 1080000, 0.2, 0.15848931924611134])\n\n# load in gryffin runs with Naive score ... | [
[
"numpy.amax",
"matplotlib.pyplot.tight_layout",
"pandas.read_pickle",
"numpy.amin",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"numpy.array",
"matplotlib.pyplot.style.use",
"matplotlib.pyplot.show"
],
[
"matplotlib.pyplot.tight_layout",
"scipy.stats.... |
jingshuw/sctransfer | [
"380c3f26934c26cd177e63aacf4f3bdcf9a29c47",
"380c3f26934c26cd177e63aacf4f3bdcf9a29c47"
] | [
"sctransfer/network.py",
"build/lib/sctransfer/layers.py"
] | [
"## code simplified from the dca package\n\nimport os\nimport numpy as np\nimport scanpy.api as sc\n\nimport keras\nfrom keras.layers import Input, Dense, Dropout, Activation, BatchNormalization\nfrom keras.models import Model\nfrom keras.objectives import mean_squared_error\nfrom keras import backend as K\n\nimpor... | [
[
"tensorflow.nn.softplus"
],
[
"tensorflow.is_nan",
"tensorflow.zeros_like",
"tensorflow.reshape",
"tensorflow.identity"
]
] |
glos/ioos_qc | [
"17e69ad582275be7ad0f5a2af40c11d810b344e8"
] | [
"ioos_qc/results.py"
] | [
"#!/usr/bin/env python\n# coding=utf-8\nimport logging\nfrom typing import NamedTuple, List\nfrom dataclasses import dataclass\nfrom collections import OrderedDict as odict, defaultdict\n\nimport numpy as np\nfrom ioos_qc.qartod import QartodFlags\n\nL = logging.getLogger(__name__) # noqa\n\n\nclass CallResult(Nam... | [
[
"numpy.copy",
"numpy.ma.masked_all",
"numpy.ma.empty_like"
]
] |
semio/zipline | [
"f13e9fd1253a500771bf10217b1d37031272c03c"
] | [
"tests/test_assets.py"
] | [
"#\n# Copyright 2015 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or... | [
[
"pandas.DataFrame",
"pandas.Timedelta",
"pandas.util.testing.assert_frame_equal",
"pandas.date_range",
"pandas.DataFrame.from_records",
"pandas.Timestamp"
]
] |
keunhong/toolbox | [
"e8d1dadab4d9ccf8d78fe86ea933819ac6a07fca"
] | [
"toolbox/sampling/__init__.py"
] | [
"import logging\nimport random\nfrom typing import List, Tuple\n\nimport numpy as np\nfrom skimage.transform import resize\nfrom scipy.ndimage import zoom\n\nfrom toolbox import images\nfrom toolbox.images import crop, mask_bbox\nfrom .poisson_disk import sample_poisson_uniform\n\nlogger = logging.getLogger(__name_... | [
[
"numpy.split",
"scipy.ndimage.zoom",
"numpy.ones",
"numpy.diff",
"numpy.floor",
"numpy.where"
]
] |
medialandstudio/bias | [
"9548a2b66c0134c797fa3d00de3711cfef9dbb70"
] | [
"SCANNER_FTX_PERP.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Dec 7 12:02:50 2021\n\n@author: ministudio\n\"\"\"\n\nfrom datetime import datetime, timezone\nimport pandas as pd\nimport numpy as np\nfrom alive_progress import alive_bar\n\n\ndef get_all_futures(ftx_client):\n tickers = ftx_client.fetch... | [
[
"pandas.DataFrame"
]
] |
srijithmass/RANK-OF-A-MATRIX | [
"f0b2dacac02159a1385cfa23b180859444013911"
] | [
"Rank of a matrix.py"
] | [
"#Program to find the rank of a matrix.\r\n#Developed by: SRIJITH R\r\n#RegisterNumber: 21004191\r\nimport numpy as np\r\nA=np.array([[5,-3,-10],[2,2,-3],[-3,-1,5]])\r\nval=np.linalg.matrix_rank(A)\r\nprint(val)"
] | [
[
"numpy.array",
"numpy.linalg.matrix_rank"
]
] |
negiaditya/PROJECTS-Data_Science | [
"d26e1fdfc6ce51f02e65c4dbca3edfb5cd97f0a1"
] | [
"Data Science salary prediction/FlaskAPI/app.py"
] | [
"import flask\nfrom flask import Flask,jsonify,request\nimport json\nfrom data_input import data_in\nimport numpy as np\nimport pickle\n\n\n\ndef load_models():\n\tfile_name = './models/model_file.p'\n\twith open(file_name,'rb') as pickled:\n\t\tdata = pickle.load(pickled)\n\t\tmodel = data['model']\n\treturn model... | [
[
"numpy.array"
]
] |
lfdversluis/wta-tools | [
"e9d505df03fff9bb57208dfb82212977ef5e7ca2",
"e9d505df03fff9bb57208dfb82212977ef5e7ca2"
] | [
"parse_scripts/parquet_parsers/galaxy_to_parquet.py",
"parse_scripts/validate_parquet_files.py"
] | [
"import json\nimport os\nimport sys\nfrom datetime import datetime\n\nimport numpy as np\nimport pandas as pd\n\nfrom objects.task import Task\nfrom objects.workflow import Workflow\nfrom objects.workload import Workload\npd.set_option('display.max_columns', None)\n\n\nUSAGE = 'Usage: python(3) ./galaxy_to_parquet.... | [
[
"numpy.isnan",
"numpy.int64",
"pandas.set_option",
"pandas.isnull"
],
[
"pandas.read_parquet",
"pandas.DataFrame"
]
] |
KillerStrike17/PyDeNN | [
"2f0dfaf3e092a4f995ed30e2f8db946e30724551",
"2f0dfaf3e092a4f995ed30e2f8db946e30724551"
] | [
"DeNN/visualization/gradcam.py",
"DeNN/dataset_loader/data_loader.py"
] | [
"import seaborn as sns\nimport matplotlib.pyplot as plt\nimport torch\nimport numpy as np\nimport cv2\nfrom .cam import GradCAM\n\n\n# def load_gradcam(images, labels, model, device, target_layers):\ndef load_gradcam(test, model, device, target_layers,size = 25,classified = True):\n\n _images = []\n _target =... | [
[
"matplotlib.pyplot.tight_layout",
"torch.cat",
"numpy.uint8",
"torch.no_grad",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.show"
],
[
"torch.utils.data.DataLoader"
]
] |
jaeckie/covid19-containment-embeddings | [
"e27e63266113231ee399f3a55f76b823d514c6f7"
] | [
"store_data.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Apr 4 15:37:43 2020\n\n@author: moder\n\"\"\"\nimport os\nfrom datetime import datetime\nimport pandas as pd\nimport urllib.request\nfrom bs4 import BeautifulSoup \n\nuser_agent = \"user_agent = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64)\"\n\ndef scrap_wikipedia_text... | [
[
"pandas.read_csv"
]
] |
VIROBO-15/yolov1 | [
"b7824a6cc7e89a6c29ab63f636a236d923fa0a64"
] | [
"loss.py"
] | [
"import torch\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\nLAMBDA_COORD = 5\nLAMBDA_NOOBJ = 0.5\n\n\ndef calc_loss(inp , target, opt):\n if inp.size(0) != target.size(0):\n raise Exception(\"Batch size does not match\")\n\n total_loss = torch.tensor(0.0)\n #total_los... | [
[
"torch.abs",
"torch.max",
"torch.zeros",
"torch.min",
"torch.tensor",
"torch.cuda.is_available",
"torch.device",
"torch.clamp",
"torch.pow",
"torch.stack"
]
] |
EQt/graphidx | [
"9716488cf29f6235072fc920fa1a473bf88e954f"
] | [
"python/test/test_biadjacent.py"
] | [
"import numpy as np\nfrom graphidx.idx import BiAdjacent\n\n\ndef square():\n head = np.array([0, 0, 1, 2])\n tail = np.array([1, 2, 3, 3])\n return BiAdjacent(head, tail)\n\n\ndef test_sqare():\n neigh = square()\n assert repr(neigh) == \"BiAdjacent[m = 4, n = 4]\"\n assert set(neigh[0]) == {1, 2... | [
[
"numpy.array"
]
] |
tza0035/RMG-Py | [
"38c49f7107d1b19e4a534408a1040ddd313b8596",
"38c49f7107d1b19e4a534408a1040ddd313b8596",
"38c49f7107d1b19e4a534408a1040ddd313b8596"
] | [
"arkane/encorr/ae.py",
"rmgpy/thermo/nasaTest.py",
"arkane/statmechTest.py"
] | [
"#!/usr/bin/env python3\n\n###############################################################################\n# #\n# RMG - Reaction Mechanism Generator #\n# ... | [
[
"numpy.diag",
"numpy.linalg.solve",
"numpy.linalg.inv",
"scipy.stats.distributions.t.ppf",
"numpy.array",
"numpy.sum"
],
[
"numpy.array"
],
[
"numpy.array"
]
] |
intel/lp-opt-tool | [
"130eefa3586b38df6c0ff78cc8807ae273f6a63f",
"130eefa3586b38df6c0ff78cc8807ae273f6a63f"
] | [
"test/test_adaptor_pytorch.py",
"examples/pytorch/nlp/huggingface_models/text-classification/optimization_pipeline/prune_once_for_all/fx/run_glue_no_trainer_pruneOFA.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.quantized as nnq\nfrom torch.quantization import QuantStub, DeQuantStub\nimport torchvision\nimport unittest\nimport os\nfrom neural_compressor.adaptor import FRAMEWORKS\nfrom neural_compressor.model import MODELS\nfrom neural_compressor.adaptor.pytorch import P... | [
[
"torch.zeros",
"torch.load",
"torch.quantization.DeQuantStub",
"torch.nn.Embedding",
"torch.no_grad",
"torch.nn.Dropout",
"torch.ones",
"numpy.allclose",
"torch.randn",
"torch.tensor",
"torch.rand",
"numpy.load",
"torch.ones_like",
"torch.quantization.QuantS... |
0wu/mlflow | [
"2b5a21af05defcfa80255c081b5d9f07443f3f64"
] | [
"tests/tensorflow/test_tensorflow_model_export.py"
] | [
"# pep8: disable=E501\n\nfrom __future__ import print_function\n\nimport collections\nimport os\nimport pandas\nimport shutil\nimport unittest\n\nimport pandas as pd\nimport sklearn.datasets as datasets\nimport tensorflow as tf\n\nfrom mlflow import tensorflow, pyfunc\nfrom mlflow import tracking\nfrom mlflow.utils... | [
[
"tensorflow.feature_column.categorical_column_with_vocabulary_list",
"tensorflow.estimator.export.build_raw_serving_input_receiver_fn",
"sklearn.datasets.load_iris",
"tensorflow.placeholder",
"tensorflow.estimator.DNNRegressor",
"pandas.DataFrame",
"tensorflow.feature_column.numeric_co... |
helene-todd/XPPAUT_code | [
"e4caf112c03889a68eed0f4e5fa9d9d436918914"
] | [
"g_function_weak_coupling/G_function.py"
] | [
"from matplotlib import cm, rcParams\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport math as math\nimport random as rand\n\n\"\"\" G(phi) function in Rinzel & Lewis' article (2003) under weak coupling \"\"\"\n\"\"\" This is under weak coupling theory, although one can note that gamma only serves to sca... | [
[
"matplotlib.pyplot.legend",
"numpy.linspace",
"matplotlib.pyplot.title",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"numpy.sign",
"matplotlib.pyplot.ylabel",
"matplotlib.rcParams.update",
"matplotlib.pyplot.close",
"matplotlib.pyplot.xlabel",
"numpy.array",
... |
nevertheless-ui/TelegramData_Analyst | [
"6c7b33560a2b8b26bce99c9a82efa6b4796d5828"
] | [
"run_analyst.py"
] | [
"# Filename: analyst.py\n\"\"\"Analyst is a tool to look up (and export selected) data and insights\nfrom exported data from chats and channels in Telegram\nusing Python and PyQt5.\"\"\"\n\nimport sys\n\nimport pandas as pd\nfrom pathlib import Path\n\nfrom PyQt5 import QtWidgets, QtCore\nfrom PyQt5 import uic\n\nf... | [
[
"pandas.DataFrame"
]
] |
shallowyuan/cosegmentor-crf | [
"c84a9418b70f3f3c7c6a7e998de5835182619f30"
] | [
"tlib/networks/VGGnet_train.py"
] | [
"import tensorflow as tf\nfrom networks.network import Network\n\n\n#define\n\nn_classes = 21\n_feat_stride = [16,]\nanchor_scales = [8, 16, 32]\n\nclass VGGnet_train(Network):\n def __init__(self, trainable=True):\n self.inputs = []\n self.data = tf.placeholder(tf.float32, shape=[None, None, None,... | [
[
"tensorflow.placeholder"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.