repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list | possible_versions list |
|---|---|---|---|---|---|
iceye-ltd/sarpy | [
"a7996a14ca2cf9eb2323bf835b11660aa1728b09"
] | [
"sarpy/io/complex/radarsat.py"
] | [
"\"\"\"\nFunctionality for reading Radarsat (RS2 and RCM) data into a SICD model.\n\"\"\"\n\n__classification__ = \"UNCLASSIFIED\"\n__author__ = (\"Thomas McCullough\", \"Khanh Ho\", \"Wade Schwartzkopf\", \"Nathan Bombaci\")\n\n\nimport logging\nimport re\nimport os\nfrom datetime import datetime\nfrom xml.etree i... | [
[
"numpy.dot",
"numpy.sqrt",
"numpy.polynomial.polynomial.polyfit",
"numpy.concatenate",
"numpy.max",
"numpy.all",
"numpy.any",
"numpy.reshape",
"numpy.arange",
"numpy.copy",
"numpy.zeros",
"numpy.min",
"numpy.polynomial.polynomial.polyval",
"numpy.meshgrid",
... | [
{
"matplotlib": [],
"numpy": [
"1.11",
"1.10",
"1.12",
"1.19",
"1.24",
"1.13",
"1.16",
"1.9",
"1.18",
"1.23",
"1.21",
"1.22",
"1.20",
"1.7",
"1.15",
"1.14",
"1.17",
"1.8"
],
"pandas": [],
... |
chck/faiss | [
"c4c5d6f73c2f2950b636ed78e5d46b5d81993808"
] | [
"python/faiss.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n#@nolint\n\n# not linting this file because it imports * form swigfaiss, which\n# causes a ton of useless warnings.\n\nimport numpy ... | [
[
"numpy.empty",
"numpy.zeros",
"numpy.dtype"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
NunoEdgarGFlowHub/poptorch | [
"2e69b81c7c94b522d9f57cc53d31be562f5e3749",
"2e69b81c7c94b522d9f57cc53d31be562f5e3749"
] | [
"tests/lstm_test.py",
"tests/dataloader_test.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) 2020 Graphcore Ltd. All rights reserved.\n\nimport torch\nimport torch.nn as nn\nimport poptorch\nimport poptorch.testing\nimport helpers\n\n\ndef test_lstm():\n torch.manual_seed(42)\n lstm = nn.LSTM(3, 3)\n ipuLstm = poptorch.inferenceModel(lstm)\n inputs = [to... | [
[
"torch.nn.CrossEntropyLoss",
"torch.testing.assert_allclose",
"torch.nn.LSTM",
"torch.cat",
"torch.manual_seed",
"torch.randn",
"torch.tensor",
"torch.nn.Linear"
],
[
"torch.Size",
"torch.full",
"torch.zeros",
"torch.sum",
"torch.equal",
"numpy.full"
]... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
nickderobertis/py-finstmt | [
"7903bce83b31e4425ac680020bf7d3536ed1ed11",
"7903bce83b31e4425ac680020bf7d3536ed1ed11"
] | [
"finstmt/forecast/models/manual.py",
"tests/expectdata/statements/fcst_capiq_cat_annual.py"
] | [
"from typing import Optional\n\nimport pandas as pd\nimport numpy as np\n\nfrom finstmt.exc import ImproperManualForecastException\nfrom finstmt.forecast.config import ForecastItemConfig, ForecastConfig\nfrom finstmt.forecast.models.base import ForecastModel\nfrom finstmt.items.config import ItemConfig\n\n\nclass M... | [
[
"pandas.concat",
"pandas.Series"
],
[
"pandas.to_datetime",
"pandas.Series"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"nump... |
HardiRathod/table-linker | [
"5d0542608cdba72b0d7d8afc58c27f27b8a59192",
"5d0542608cdba72b0d7d8afc58c27f27b8a59192",
"5d0542608cdba72b0d7d8afc58c27f27b8a59192",
"5d0542608cdba72b0d7d8afc58c27f27b8a59192"
] | [
"tl/candidate_generation/deduplicate_candidates.py",
"tl/features/add_color.py",
"tl/cli/join.py",
"tl/cli/create-pseudo-gt.py"
] | [
"import pandas as pd\nfrom tl.exceptions import RequiredInputParameterMissingException\n\n\nclass DedupCandidates(object):\n def process(self, column: str = 'kg_id', file_path: str = None, df: pd.DataFrame = None) -> pd.DataFrame:\n \"\"\"\n \n Args:\n column: column in the file w... | [
[
"pandas.concat",
"pandas.read_csv",
"pandas.DataFrame"
],
[
"pandas.to_numeric",
"pandas.DataFrame",
"pandas.ExcelWriter"
],
[
"pandas.read_csv"
],
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
... |
SpeagleYao/IP_Final_Project | [
"8df74c70322b48eb3a3e1ff2e6554c6a7a93cfc4"
] | [
"loss/Focal_Loss.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\n\nclass FocalLoss(nn.Module):\n def __init__(self, gamma=0., alpha=None, size_average=True):\n super(FocalLoss, self).__init__()\n self.gamma = gamma\n self.alpha = alpha\n if i... | [
[
"torch.Tensor",
"torch.nn.functional.log_softmax",
"torch.autograd.Variable"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
JayYip/bert-as-service | [
"65f7bc46467ab791f85539c5a931212cb5f1c419",
"65f7bc46467ab791f85539c5a931212cb5f1c419"
] | [
"server/bert_multitask_serving/server/helper.py",
"server/bert_multitask_serving/server/__init__.py"
] | [
"import argparse\nimport logging\nimport os\nimport sys\nimport uuid\nimport numpy as np\n\nimport zmq\nfrom zmq.utils import jsonapi\n\n__all__ = ['set_logger', 'send_ndarray', 'get_args_parser',\n 'check_tf_version', 'auto_bind', 'import_tf', 'send_dict_ndarray']\n\n\ndef set_logger(context, verbose=Fal... | [
[
"tensorflow.__version__.split",
"tensorflow.logging.set_verbosity"
],
[
"numpy.array",
"tensorflow.python.estimator.run_config.RunConfig",
"tensorflow.python.estimator.model_fn.EstimatorSpec"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.5",
"1.7",
"1.2"
]
}
] |
EdwardFerdian/WSSNet | [
"b5d2916348e834a5dc5d0c06b001059b2a020080"
] | [
"wssnet/pycpd/affine_registration.py"
] | [
"from builtins import super\nimport numpy as np\nfrom .emregistration import EMRegistration\nfrom .utility import is_positive_semi_definite\n\nclass AffineRegistration(EMRegistration):\n \"\"\"\n Affine registration.\n\n Attributes\n ----------\n B: numpy array (semi-positive definite)\n DxD a... | [
[
"numpy.diag",
"numpy.dot",
"numpy.log",
"numpy.abs",
"numpy.multiply",
"numpy.eye",
"numpy.tile",
"numpy.transpose",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
xmarcosx/LMS-Toolkit | [
"6f607a83956c9334fdba0bc003bd3f574a002998"
] | [
"src/google-classroom-extractor/tests/mapping/assignment_submissions/test_assignment_submissions.py"
] | [
"# SPDX-License-Identifier: Apache-2.0\n# Licensed to the Ed-Fi Alliance under one or more agreements.\n# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.\n# See the LICENSE and NOTICES files in the project root for more information.\n\nfrom typing import Dict, Tuple\nimport pytes... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
ramoslin02/howtrader | [
"ef87141456320cb6593e72dde3186e5907e35f63"
] | [
"howtrader/app/cta_strategy/strategies/martingle_future_strategyV3.py"
] | [
"from howtrader.app.cta_strategy import (\n CtaTemplate,\n StopOrder,\n TickData,\n BarData,\n TradeData,\n OrderData\n)\n\nfrom howtrader.app.cta_strategy.engine import CtaEngine\nfrom howtrader.trader.event import EVENT_TIMER\nfrom howtrader.event import Event\nfrom howtrader.trader.object impor... | [
[
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
deephyper/candlepb | [
"e99cf34c74bbcf85721a3091b587bf16ab4b667a"
] | [
"candlepb/Uno/structs/uno_mlp_baseline.py"
] | [
"import tensorflow as tf\n\nfrom deephyper.search.nas.model.space.node import ConstantNode, VariableNode\nfrom deephyper.search.nas.model.space.op.merge import AddByPadding, Concatenate\nfrom deephyper.search.nas.model.space.op.op1d import Dense, Dropout, Identity\nfrom deephyper.search.nas.model.space.struct impor... | [
[
"tensorflow.keras.utils.plot_model"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"2.7",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6"
]
}
] |
janniklasrose/diffusion-models | [
"3379e9b0cde59ee068508982cff1999bb53ce054"
] | [
"diffusion/analytical/diffusion.py"
] | [
"\"\"\"Routines to calculate 1D solutions to the diffusion problem.\"\"\"\n\nimport math\n\nimport numpy as np\n\n\ndef solution_1D(t, x, idx0, *args, **kwargs):\n \"\"\"Calculate the fundamental 1D solution.\n\n t := (scalar) time\n x = (array) position\n idx0 = (scalar) index such that x0 = x[idx0]\n ... | [
[
"numpy.sqrt",
"numpy.arange",
"numpy.squeeze",
"numpy.cumsum",
"numpy.cos",
"numpy.ones",
"numpy.where",
"numpy.exp",
"numpy.zeros",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
tadejsv/catalyst | [
"2553ce8fd7cecc025ad88819aea73faf8abb229b",
"2553ce8fd7cecc025ad88819aea73faf8abb229b"
] | [
"tests/pipelines/test_mnist_custom.py",
"catalyst/engines/torch.py"
] | [
"# flake8: noqa\nimport os\nfrom pathlib import Path\nfrom tempfile import TemporaryDirectory\n\nfrom pytest import mark\n\nfrom torch import nn, optim\nimport torch.distributed as dist\nimport torch.multiprocessing as mp\nfrom torch.nn import functional as F\nfrom torch.utils.data import DataLoader\n\nfrom catalys... | [
[
"torch.nn.Linear",
"torch.nn.functional.cross_entropy",
"torch.nn.Flatten"
],
[
"torch.distributed.init_process_group",
"torch.multiprocessing.spawn",
"torch.tensor",
"torch.nn.DataParallel",
"torch.distributed.destroy_process_group",
"torch.cuda.device_count"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
exeroot/MAL | [
"4425094d3c2ce5f72082bf341535e4633df88d36"
] | [
"Static/CNN.py"
] | [
"import cv2\nimport os\nimport numpy as np\nimport tensorflow as tf\nfrom Static import HEIGHT, WIDTH, PATH_IMG, PATH_IMG_BENIGN\n\nimport matplotlib.pyplot as plt\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Dropout, Activation, Flatten\nfrom keras.layers import Conv2D, MaxPooling2D\nfrom ... | [
[
"tensorflow.convert_to_tensor",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"tensorflow.keras.metrics.AUC",
"sklearn.model_selection.train_test_split",
"matplotlib.pyplot.plot",
"tensorflow.keras.metrics.Precision",
"matplotlib.pyplot.xlabel",
"tensorflow.keras.metri... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"2.7",
"2.6",
"2.4",
"2.3",
"2.5",
"2.2"
]
}
] |
charleshsc/autodeeplab | [
"1bd8399ac830fcafd506a4207b75e05682d1e260"
] | [
"dataloaders/datasets/pascal.py"
] | [
"from __future__ import print_function, division\nimport os\nfrom PIL import Image\nimport numpy as np\nfrom torch.utils.data import Dataset\nfrom mypath import Path\nfrom torchvision import transforms\nfrom dataloaders import custom_transforms as tr\n\nclass VOCSegmentation(Dataset):\n \"\"\"\n PascalVoc dat... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.title",
"torch.utils.data.DataLoader",
"matplotlib.pyplot.subplot",
"numpy.transpose",
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
IvanaEscobar/ECCOv4-py | [
"5017ab11488ed18c5bb7b8f65bd7db853333d877"
] | [
"ecco_v4_py/resample_to_latlon.py"
] | [
"#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\nfrom __future__ import division,print_function\nimport numpy as np\nimport matplotlib.pylab as plt\nimport xarray as xr\nfrom dask import delayed\nimport dask\n\n# The Proj class can convert from geographic (longitude,latitude) to native\n# map projection (x,y) co... | [
[
"numpy.max",
"numpy.meshgrid",
"numpy.min"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Euphoria16/DeeplabV3plus_origi | [
"084414dd1e853ea0f73e75b5995f45edc3d785c4"
] | [
"tools/train_voc_unet_decoder.py"
] | [
"# -*- coding: utf-8 -*-\n# @Time : 2018/9/26 15:48\n# @Author : HLin\n# @Email : linhua2017@ia.ac.cn\n# @File : train_voc.py\n# @Software: PyCharm\n#\n# import os\n# import pprint\n# import logging\n# import argparse\n# import torch\n# import torch.nn as nn\n# from tqdm import tqdm\n# import numpy as np\n... | [
[
"torch.nn.CrossEntropyLoss",
"torch.cuda.current_device",
"torch.load",
"numpy.argmax",
"torch.no_grad",
"torch.cuda.is_available",
"torch.cuda.get_device_name",
"torch.device",
"numpy.load",
"torch.squeeze",
"torch.save"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
saketkc/riboraptor | [
"cc17e82b11da743e88ec9b4126a8909705e83c4b"
] | [
"riboraptor/utils.py"
] | [
"from tqdm import tqdm\nimport numpy as np\nimport re\nimport pickle\nimport os\n\nimport pandas as pd\nfrom textwrap import dedent\nfrom .helpers import mkdir_p\nfrom .helpers import symlink_force\n\n\ndef load_tpm(path):\n df = pd.read_table(path, names=[\"gene_id\", \"tpm\"]).set_index(\"gene_id\")\n retur... | [
[
"pandas.read_table",
"pandas.concat",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
gertingold/scipy | [
"4d0d8958ad3f788a1a1c0bcac5cec1af9db26804"
] | [
"benchmarks/benchmarks/signal.py"
] | [
"from __future__ import division, absolute_import, print_function\n\nfrom itertools import product\n\nimport numpy as np\n\ntry:\n import scipy.signal as signal\nexcept ImportError:\n pass\n\nfrom .common import Benchmark\n\n\nclass Resample(Benchmark):\n\n # Some slow (prime), some fast (in radix)\n pa... | [
[
"numpy.linspace",
"scipy.signal.lsim2",
"scipy.signal.correlate",
"scipy.signal.correlate2d",
"numpy.random.randn",
"scipy.signal.lsim",
"scipy.signal.impulse",
"scipy.signal.welch",
"scipy.signal.csd",
"scipy.signal.step",
"scipy.signal.coherence",
"numpy.arange",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.6",
"1.10",
"1.4",
"1.3",
"1.9",
"0.19",
"1.5",
"0.18",
"1.7",
"1.0",
"1.2",
"1.8"
],
"tensorflow": []
}
] |
qcr/rosdata | [
"0529126f860bd73e85a3eb306843b23d7cda5057"
] | [
"rosdata/rosdata.py"
] | [
"#!/usr/bin/env python3\n\n### IMPORT MODULES ###\n# import sys\nimport csv\nimport yaml\nimport rosbag\nimport pathlib\nimport numpy as np\nfrom tqdm import tqdm\nfrom tabulate import tabulate \nimport matplotlib.pyplot as plt\n\nimport cv2\nimport imutils\nimport spatialmath as sm\n\nfrom .rosbag_extractor import... | [
[
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.title",
"numpy.arange",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.xlabel",
"numpy.array",
"matplotlib.pyplot.hist",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sumau/tick | [
"bbc561804eb1fdcb4c71b9e3e2d83a66e7b13a48",
"bbc561804eb1fdcb4c71b9e3e2d83a66e7b13a48"
] | [
"tick/linear_model/tests/serializing_test.py",
"tick/hawkes/inference/tests/hawkes_basis_kernels_test.py"
] | [
"# License: BSD 3 clause\n\nimport io, unittest\nimport numpy as np\n\nimport pickle\nimport scipy.sparse\nfrom scipy.sparse import csr_matrix\n\nfrom tick.solver.tests import TestSolver\n\nfrom tick.prox import ProxL1\nfrom tick.linear_model import ModelLinReg, SimuLinReg\nfrom tick.linear_model import ModelLogReg... | [
[
"numpy.random.rand"
],
[
"numpy.ceil",
"numpy.array",
"numpy.exp",
"numpy.zeros",
"numpy.testing.assert_array_almost_equal"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
encord-team/encord-dataset | [
"31793f292239c5d9b8a64d800e63758a2701cb4f"
] | [
"encord_dataset/dataloader.py"
] | [
"import torch\n\nfrom .objects import Ontology\nfrom .transforms import TransformOutput\n\n\ndef get_collate_top_level_object_classes(ontology: Ontology):\n ids = sorted([o.id for o in ontology.objects])\n classes = {id: i for i, id in enumerate(ids)}\n\n def collate_fn(objects: TransformOutput):\n ... | [
[
"torch.stack",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
fundamentalvision/Parameterized-AP-Loss | [
"0f36f022bfc2624f4add960cc27de464dba2c9f9"
] | [
"mmdet/models/dense_heads/paploss_retina_head.py"
] | [
"import torch.nn as nn\nfrom mmcv.cnn import ConvModule, bias_init_with_prob, normal_init\n\nfrom ..builder import HEADS\nfrom .anchor_head import AnchorHead\n\nfrom mmdet.core import (anchor_inside_flags, force_fp32, images_to_levels, multi_apply,\n multiclass_nms, unmap, vectorize_labels, g... | [
[
"torch.abs",
"numpy.log",
"torch.clamp",
"torch.cat",
"torch.zeros",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.zeros_like",
"torch.tensor",
"torch.exp",
"torch.split",
"torch.stack",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
microprediction/simdkalman | [
"31eabeb960d61ec92588442d5e59a6cd5dca9c3f"
] | [
"examples/multi_dimensional_observations.py"
] | [
"\"\"\"\nMulti-dimensional observations example\n\"\"\"\n\nimport simdkalman\nimport numpy as np\nimport numpy.random as random\n\n# In this model, there is a hidden trend and two independent noisy observations\n# are made at each step\nkf = simdkalman.KalmanFilter(\n state_transition = np.array([[1,1],[0,1]]),\... | [
[
"numpy.diag",
"numpy.sqrt",
"numpy.arange",
"numpy.eye",
"matplotlib.pyplot.subplots",
"numpy.random.normal",
"numpy.array",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
zmghub/ifvd | [
"7ddf3de016252b99179d0fea2e99be71e0bfb525"
] | [
"networks/spectral.py"
] | [
"import torch\r\nfrom torch.optim.optimizer import Optimizer, required\r\nfrom torch.autograd import Variable\r\nimport torch.nn.functional as F\r\nfrom torch import nn\r\nfrom torch import Tensor\r\nfrom torch.nn import Parameter\r\n\r\ndef l2normalize(v, eps=1e-12):\r\n return v / (v.norm() + eps)\r\n\r\nclass... | [
[
"torch.nn.Parameter"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
xkwei1119/qiskit-terra | [
"7a306872f00939f41ae29a5ec0e56eb7d9ac710d"
] | [
"qiskit/tools/visualization/_matplotlib.py"
] | [
"# -*- coding: utf-8 -*-\n\n# Copyright 2018, IBM.\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n# pylint: disable=invalid-name,anomalous-backslash-in-string,missing-docstring\n\n\"\"\"mpl circuit visualization... | [
[
"matplotlib.patches.Arc",
"numpy.abs",
"matplotlib.patches.Rectangle",
"matplotlib.patches.Circle",
"numpy.cos",
"numpy.sin",
"matplotlib.pyplot.close",
"matplotlib.patches.Polygon",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
stspyder/arrow | [
"16b2a44be2b71bc1a7c95df70795664b4d450b6d",
"16b2a44be2b71bc1a7c95df70795664b4d450b6d",
"16b2a44be2b71bc1a7c95df70795664b4d450b6d"
] | [
"python/pyarrow/tests/test_tensor.py",
"python/pyarrow/tests/strategies.py",
"python/pyarrow/tests/test_convert_builtin.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.testing.assert_equal",
"numpy.ascontiguousarray",
"numpy.arange",
"numpy.dtype",
"numpy.frombuffer",
"numpy.random.randn"
],
[
"numpy.isnan",
"numpy.uint8",
"numpy.insert"
],
[
"numpy.bool",
"numpy.int32",
"numpy.timedelta64",
"numpy.iinfo",
"... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Smart-Ag/xviz | [
"71c4470fdcb5c497793eb53666da6a5feb6832f0"
] | [
"python/examples/control_sim/plotting.py"
] | [
"import math\nimport matplotlib.pyplot as plt\n\nfrom control_sim.utils import get_value_list\nfrom scenarios.utils.gis import get_wheel_angle\n\n\nplt.rcParams['figure.figsize'] = [16, 10]\nplt.rcParams['savefig.facecolor'] = 'black'\nplt.rcParams['figure.facecolor'] = 'black'\nplt.rcParams['figure.edgecolor'] = '... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.close"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
yangfanthu/robel | [
"1123e3c641df06908f020db0f2a395603873a092"
] | [
"train_kitty/test_multiple.py"
] | [
"import robel\nimport gym\nimport torch\nimport torch.nn as nn\nimport gym\nimport numpy as np\nimport os\nimport sys\nimport datetime\nimport argparse\nimport random\n\n\nfrom modules import *\nimport utils\n\nif __name__ == \"__main__\":\n # env = gym.make('DClawTurnFixed-v0')\n env = gym.make('DClawTurnFix... | [
[
"numpy.random.seed",
"torch.manual_seed",
"numpy.save",
"numpy.ones",
"torch.no_grad",
"torch.device",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ncharchenko/sagemaker-deployment | [
"95130a2e0f602cc8cd0cff752fd09ec8c2253047"
] | [
"Project/train/train.py"
] | [
"import argparse\nimport json\nimport os\nimport pickle\nimport sys\nimport sagemaker_containers\nimport pandas as pd\nimport torch\nimport torch.optim as optim\nimport torch.utils.data\n\nfrom model import LSTMClassifier\n\ndef model_fn(model_dir):\n \"\"\"Load the PyTorch model from the `model_dir` directory.\... | [
[
"torch.load",
"torch.manual_seed",
"torch.utils.data.TensorDataset",
"torch.utils.data.DataLoader",
"torch.from_numpy",
"torch.nn.BCELoss",
"torch.cuda.is_available",
"torch.save"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
brennanaba/quickNAT_pytorch | [
"4e4e97e912b9f75f9c299065922009da737c4ef9"
] | [
"utils/log_utils.py"
] | [
"import itertools\nimport logging\nimport os\nimport re\nimport shutil\nfrom textwrap import wrap\n\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport torch\nfrom tensorboardX import SummaryWriter\n\nimport utils.evaluator as eu\n\nplt.switch_backend('agg')\nplt.axis('scaled')\n\n\n# TO... | [
[
"torch.mean",
"matplotlib.figure.Figure",
"matplotlib.pyplot.switch_backend",
"numpy.set_printoptions",
"numpy.arange",
"matplotlib.pyplot.subplots",
"numpy.mean",
"matplotlib.pyplot.axis"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
RikVoorhaar/ttml | [
"3786cfc02976f7d6cd5f045f213e28793f4ece61"
] | [
"notebooks/permutation_experiment.py"
] | [
"# %%\n\"\"\"This scripts fits a ttml model to every permutation of features for a given\ndatset. Does this multiple time to obtain statistics.\"\"\"\n\nimport sys\nimport os\nfrom tqdm import tqdm\nimport itertools\nfrom itertools import product\nimport numpy as np\nimport pandas as pd\nimport csv\n\n\nsys.path.in... | [
[
"pandas.read_csv",
"numpy.min",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.mean_squared_error",
"numpy.std",
"numpy.mean",
"sklearn.preprocessing.StandardScaler"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
colinleach/400B_Leach | [
"656abe04237d7a8de2cf56e9bfe986c333c62739",
"656abe04237d7a8de2cf56e9bfe986c333c62739"
] | [
"source/galaxy/approaches.py",
"source/galaxy/surfacedensity.py"
] | [
"# standard Python imports\nfrom pathlib import Path\n\n# scientific package imports\nimport numpy as np\nfrom numpy.linalg import norm\nimport astropy.units as u\n\nfrom galaxy.galaxies import Galaxies\n\n\nclass Approaches(Galaxies):\n \"\"\"\n A class to work with all 3 galaxies when in close proximity.\n\... | [
[
"numpy.array"
],
[
"numpy.log",
"numpy.sqrt",
"numpy.asarray",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"numpy.arctan2",
"numpy.diff",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ldb385/q2-winnowing | [
"f9c1dc7ecedbd3d204b3a26974f29a164de3eaf1"
] | [
"tests/test_step7_9.py"
] | [
"\nfrom unittest import TestCase, main as unittest_main\nimport pandas as pd\nimport numpy as np\nimport os\n\nfrom q2_winnowing.step7_9.jaccard import main as step7_9_main\nfrom q2_winnowing.step7_9.jaccard import jaccard_coefficient\n\nclass Step7_9Tests( TestCase ):\n # <><><> Testing class for Step 7 to 9 <>... | [
[
"numpy.testing.assert_almost_equal",
"pandas.read_csv",
"numpy.testing.assert_equal"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
ya-ds/crosspredict | [
"b64d6fe5d985b90c6845508b912482011b9b37cf"
] | [
"crosspredict/report_binary/_curves.py"
] | [
"from abc import ABC, abstractmethod\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport seaborn as sns\nimport numpy as np\nimport logging\nfrom sklearn.metrics import roc_curve\nfrom sklearn.metrics import precision_recall_curve\nfrom sklearn.metrics import auc, roc_auc_score\nfrom sklearn.metrics impor... | [
[
"sklearn.metrics.RocCurveDisplay",
"sklearn.metrics.roc_auc_score",
"sklearn.metrics.PrecisionRecallDisplay",
"numpy.arange",
"matplotlib.pyplot.sca",
"sklearn.metrics.roc_curve",
"sklearn.metrics.precision_recall_curve",
"matplotlib.pyplot.subplots",
"sklearn.metrics.average_p... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
chrisgervang/caqi | [
"1441ea0dc66add6611005b9aebdf37dfc12d3811"
] | [
"caqi/daos/mean_aqi_dao.py"
] | [
"\nfrom __future__ import annotations\nfrom dataclasses import dataclass\nfrom typing import List\nimport pandas as pd\nfrom caqi.daos.all_sensors_processed_dao import AllSensorsProcessedDao\nfrom caqi.transforms.mean_aqi_transforms import transform_mean_aqi\n\n@dataclass\nclass MeanAqiDao:\n df: pd.DataFrame\n ... | [
[
"pandas.concat"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
temoskal/carl-torch | [
"249a17729583092b49d72300acfeb7d0a729868b"
] | [
"ml/utils/loading.py"
] | [
"from __future__ import absolute_import, division, print_function, unicode_literals\nimport os\nimport time\nimport logging\nimport tarfile\nimport torch\nimport pickle\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nfrom pandas.plotting import scatter_matrix\nimport multiprocessing\nimport matplot... | [
[
"numpy.linspace",
"matplotlib.use",
"sklearn.model_selection.train_test_split",
"matplotlib.pyplot.savefig",
"numpy.ones",
"numpy.concatenate",
"numpy.std",
"matplotlib.pyplot.clf",
"numpy.mean",
"torch.cuda.is_available",
"numpy.zeros",
"numpy.vstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
faraz891/cufflinks | [
"5df644f91ad8817e85d05cec7d21cfaf9316947b"
] | [
"cufflinks/colors.py"
] | [
"##\n# Special thanks to @krey for the python3 support\n##\n\nimport numpy as np\nimport colorsys\nimport colorlover as cl\nimport operator\nimport copy\n\nfrom collections import deque\nfrom six import string_types\nfrom IPython.display import HTML, display\n\nfrom .utils import inverseDict\nfrom .auth import get_... | [
[
"numpy.arange"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
PaulEmmanuelSotir/DeepCV | [
"4c0ed68d47dceb713d7f34ca258dad957bcd3611"
] | [
"src/deepcv/meta/nn.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\" Neural Network meta module - nn.py - `DeepCV`__\nDefines various neural network building blocks (layers, architectures parts, transforms, loss terms, ...)\n.. moduleauthor:: Paul-Emmanuel Sotir\n\n*To-Do List*\n - TODO: Add EvoNorm_B0 and EvoNorm_S0 layer i... | [
[
"torch.randn_like",
"torch.mean",
"torch.cat",
"torch.zeros",
"numpy.max",
"torch.no_grad",
"torch.FloatTensor",
"torch.nn.functional.interpolate",
"torch.Size",
"torch.torch.arange",
"torch.nn.Dropout",
"torch.add",
"torch.from_numpy",
"torch.mul",
"num... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
moejoe95/capsnet-limitations | [
"eae6a0d9c3de576856509b774e50d5d8bedb52a9"
] | [
"capsule/capsule_layer.py"
] | [
"\n\nimport tensorflow as tf\nfrom capsule.utils import squash\n\nlayers = tf.keras.layers\nmodels = tf.keras.models\n\n\nclass Capsule(tf.keras.Model):\n\n def __init__(self, in_capsules, in_dim, out_capsules, out_dim, stdev=0.2, routing_iterations=2, use_bias=True, name=''):\n super(Capsule, self).__ini... | [
[
"tensorflow.nn.softmax",
"tensorflow.zeros",
"tensorflow.shape",
"tensorflow.reduce_sum",
"tensorflow.expand_dims",
"tensorflow.constant_initializer",
"tensorflow.name_scope",
"tensorflow.random_normal_initializer",
"tensorflow.tile"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.4",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
}
] |
VITA-Group/AsViT | [
"e326ccaf63e05f241f8f48a0e045b63d221be62a"
] | [
"lib/models/cell_infers/transformer.py"
] | [
"import torch\nimport torch.nn as nn\nimport sys\nfrom pathlib import Path\nroot_dir = (Path(__file__).parent / '..' / '..' ).resolve()\nif str(root_dir) not in sys.path:\n sys.path.insert(0, str(root_dir))\nfrom timm.models.layers import trunc_normal_\nfrom models.cell_operations import PatchMerging, Transforme... | [
[
"torch.nn.Dropout",
"torch.zeros",
"torch.nn.init.constant_",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.nn.Tanh",
"torch.nn.LayerNorm",
"torch.nn.Linear",
"torch.nn.Identity",
"torch.utils.checkpoint.checkpoint",
"torch.flatten",
"torch.nn.AdaptiveAvgPool1d",... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ska-sa/katdal | [
"1b1bf54c291597e5be1c63df7d8e85e2d42cec75"
] | [
"katdal/datasources.py"
] | [
"################################################################################\n# Copyright (c) 2017-2019, National Research Foundation (Square Kilometre Array)\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use\n# this file except in compliance with the License. You may obtain a co... | [
[
"numpy.arange"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
messiest/imagenet-downloader | [
"ebd19c4d49e11cecfb7ecbe9605a2535ba72d4ca"
] | [
"main.py"
] | [
"#!/usr/bin/env python3\nimport os\nimport argparse\nimport requests\n\nfrom tqdm import tqdm\nimport numpy as np\nfrom nltk.corpus import wordnet as wn\n\n# from imagenet.utils import downloader\n\n\nDATA_DIR = 'images/'\n\n\ndef get_wnid(term, user=False):\n assert isinstance(term, str), \"Must pass string\"\n... | [
[
"numpy.random.shuffle"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
HPQC-LABS/Quantum-Graph-Spectra | [
"b897d94dd03c48ffec5735b3dc5b86f8c3ab5a8f"
] | [
"gatecomplexity.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[94]:\n\n\nimport random\nimport numpy as np\nimport networkx as nx\nimport matplotlib.pyplot as plt\nfrom pyquil.paulis import PauliSum, sX, sZ, sI\nfrom networkx.drawing.nx_agraph import graphviz_layout\n\n\n# In[95]:\n\n\nc_1 = lambda n: 0.5*(sI(n)+sZ(n))\nc_2 = lam... | [
[
"numpy.matrix",
"matplotlib.pyplot.legend",
"numpy.log",
"numpy.log2",
"numpy.pad",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.get_cmap",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"numpy.array",
"matplotlib.pyplot.show",
"scipy.optimize.curve_fit",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
sp0x/orion | [
"7ba1856546afe48710ef12d1e201f854f8d8d8ae"
] | [
"app/tests/test_helpers.py"
] | [
"from utils import flatten\nimport pandas as pd\nimport numpy as np\nfrom dateutil.parser import parse\nimport os\n\n\ndef timeify(obj, col):\n obj[col] = parse(obj[col])\n return obj\n\n\ndef get_data_flags():\n fields = None\n flags = {\n 'collection': {\n 'timestamp': 'timestamp',\n... | [
[
"pandas.read_csv",
"numpy.random.randn"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
shellysheynin/Locally-Shifted-Attention-With-Early-Global-Integration | [
"a1284a468d0ad9bf359ddf37c34cab375e41f2d2"
] | [
"timm/utils/cuda.py"
] | [
"\"\"\" CUDA / AMP utils\n\nHacked together by / Copyright 2020 Ross Wightman\n\"\"\"\nimport torch\n\ntry:\n from apex import amp\n has_apex = True\nexcept ImportError:\n amp = None\n has_apex = False\n\nfrom .clip_grad import dispatch_clip_grad\n\n\nclass ApexScaler:\n state_dict_key = \"amp\"\n\n ... | [
[
"torch.cuda.amp.GradScaler"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mesejo/trex | [
"1a8dda661cf6896a83fe90b0e3ae67abeff13867"
] | [
"trrex/benchmarks/pandas_contains.py"
] | [
"import string\nfrom random import choice, sample\n\nimport pandas as pd\nimport perfplot\nfrom flashtext.keyword import KeywordProcessor\n\nfrom trrex import make\n\nkeyword_processor, compiled_re, union_re = None, None, None\n\n\ndef get_word_of_length(str_length):\n # generate a random word of given length\n ... | [
[
"pandas.Series.equals"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"1.5",
"2.0",
"1.4"
],
"scipy": [],
"tensorflow": []
}
] |
yewzijian/RegTR | [
"64e5b3f0ccc1e1a11b514eb22734959d32e0cec6"
] | [
"src/cvhelpers/lie/torch/so3_common.py"
] | [
"import torch\n\nfrom .utils import allclose, isclose\n\n_PI = 3.141592653589793\n\n\ndef is_valid_quaternion(q: torch.tensor) -> bool:\n return allclose(torch.norm(q, dim=-1), 1.0)\n\n\ndef normalize_quaternion(q: torch.tensor) -> torch.tensor:\n return q / torch.norm(q, dim=-1, keepdim=True)\n\n\ndef is_val... | [
[
"torch.svd",
"torch.zeros",
"torch.cat",
"torch.sin",
"torch.sum",
"torch.no_grad",
"torch.norm",
"torch.sqrt",
"torch.reshape",
"torch.eye",
"torch.rand",
"torch.arange",
"torch.cos",
"torch.zeros_like",
"torch.stack",
"torch.diagonal",
"torch.d... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
OlofHarrysson/metrics | [
"a286002455fb460023e19a7bad4e711755604420"
] | [
"torchmetrics/functional/audio/sdr.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.mean",
"torch.isinf",
"torch.isnan",
"torch.einsum",
"torch.sum",
"torch.tensor",
"torch.finfo",
"torch.log10"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dtorop/dmtools | [
"0ac501104c09c75237c6b19f54316153785309a6"
] | [
"dmtools/io.py"
] | [
"import os\nimport sys\nimport re\nimport numpy as np\nimport pkgutil\nfrom datetime import datetime\nfrom imageio import imread, imwrite\nfrom PIL import PngImagePlugin\nfrom typing import List\nfrom ._log import _log_msg\nimport logging\n\n\nclass Metadata:\n \"\"\"Maintain metadata for an image. Based on the ... | [
[
"numpy.split",
"numpy.fromfile",
"numpy.pad",
"numpy.reshape",
"numpy.ceil",
"numpy.copy",
"numpy.block",
"numpy.array",
"numpy.unpackbits"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lkk688/MyPseudoLidar | [
"f26755a43fc26a22f891107ad0bcd2919264a522"
] | [
"src/disp_models/submodule.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\nimport numpy as np\n\ndef convbn(in_planes, out_planes, kernel_size, stride, pad, dilation):\n\n return nn.Sequential(nn.Conv2d(... | [
[
"torch.nn.Sequential",
"torch.cat",
"torch.nn.Conv2d",
"torch.sum",
"torch.arange",
"torch.nn.Conv3d",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.nn.BatchNorm3d"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
long-m-r/few | [
"5aabcc5a4ce06560fc86e5c8c1065ecaa2d43dae"
] | [
"fea/Halfspace.py"
] | [
"#!/usr/bin/env python3\nimport logging\nlog=logging.getLogger('fea.halfspace')\n\nimport numpy as np\nimport itertools\n\nclass Halfspace:\n _id_gen = iter(itertools.count())\n \n # Class for Facet Constraint Storage/Calculation\n def __init__(self,variables,norm,point,real=True,eps=10**-6,interface=No... | [
[
"numpy.dot",
"numpy.linalg.norm",
"numpy.round",
"numpy.append",
"numpy.log10",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
iosurodri/annotated-transformer | [
"e5a7e27067d08c09f51b57bbf2824fbcd80ae4d9"
] | [
"src/optim/regularization.py"
] | [
"import torch\nimport torch.nn as nn\n\nclass LabelSmoothing(nn.Module):\n \"\"\"Implement label smoothing.\n We implement label smoothing using the KL div loss. Instead of using a one-hot target distribution, \n we create a distribution that has 'confidence' of the correct word and the rest of the 'smooth... | [
[
"torch.nn.KLDivLoss",
"torch.nonzero"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
0xreza/tvm | [
"f08d5d78ee000b2c113ac451f8d73817960eafd5"
] | [
"tests/python/unittest/test_tir_pass_loop_partition.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.zeros",
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
willandfree/tensorbay-python-sdk | [
"970a8b581ecf135cb32962978ef89266a860da61"
] | [
"docs/code/use_dataset_in_tensorflow.py"
] | [
"#!/usr/bin/env python3\n#\n# Copyright 2021 Graviti. Licensed under MIT License.\n#\n\n# pylint: disable=pointless-string-statement\n# pylint: disable=wrong-import-position\n# pylint: disable=import-error\n# type: ignore\n\n\"\"\"This is the example code for using dataset in TensorFlow.\"\"\"\n\n\n\"\"\"Build a Se... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.TensorSpec"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.13"
]
}
] |
mlpc-ucsd/CoaT | [
"cc33830b3d83480119865d7db334a5207d52277a"
] | [
"tasks/Deformable-DETR/main.py"
] | [
"# ------------------------------------------------------------------------\n# Deformable DETR\n# Copyright (c) 2020 SenseTime. All Rights Reserved.\n# Licensed under the Apache License, Version 2.0 [see LICENSE for details]\n# ------------------------------------------------------------------------\n# Modified fro... | [
[
"numpy.random.seed",
"torch.load",
"torch.manual_seed",
"torch.utils.data.SequentialSampler",
"torch.utils.data.DataLoader",
"torch.utils.data.RandomSampler",
"torch.optim.AdamW",
"torch.save",
"torch.nn.parallel.DistributedDataParallel",
"torch.optim.SGD",
"torch.devic... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
petercfontana/TimeSolver | [
"fb3bc660af90f58255e2526bee9a36fc9357deb0"
] | [
"examples/TrainGate/plot.py"
] | [
"import optparse\nimport yaml\n\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\n\n\n# Example of the data\n# - nlocations: 2\n# ntrains: 6\n# parsing: 0.057099\n# property: canreachocc\n# proving: 0.0001\n# result: Valid\n# total: 0.061387\n# - nlocations: 978\n# ntrains: 6... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"matplotlib.use",
"matplotlib.pyplot.yscale",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
BensonRen/AEM_DIM_Bench | [
"1ff82bfdcd6b0a736bf184f0bcb8a533743aacbb",
"1ff82bfdcd6b0a736bf184f0bcb8a533743aacbb"
] | [
"utils/peurifoy_batch_predict.py",
"inverse/predict.py"
] | [
"from utils.helper_functions import simulator\nfrom multiprocessing import Pool\nfrom utils.evaluation_helper import plotMSELossDistrib\nimport numpy as np\nimport os\nimport pandas as pd\n\n# This is the script for doing batch evaluation\nnum_cpu = 10\ndef eval_peurifoy_for_file(filename):\n # Read the Xpred fi... | [
[
"numpy.savetxt",
"pandas.read_csv"
],
[
"numpy.expand_dims",
"numpy.concatenate",
"numpy.mean",
"numpy.shape",
"numpy.savetxt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cybershiptrooper/CS747-assignments | [
"5b4b2bce8321b8fc48e578615034bb16df3ca88e"
] | [
"assignment1/submission/arms.py"
] | [
"import numpy as np\n\nclass bernoulliArms():\n\tdef __init__(self, file):\n\n\t\tf = open(file)\n\t\tinstances = []\n\t\tfor instance in f.readlines():\n\t\t\tinstances.append(float(instance.rstrip()))\n\t\tself.__instances = np.array(instances)\n\t\t\n\t\tk = len(instances) \n\t\tself.k = k\n\t\tself.Pavg = np.ze... | [
[
"numpy.max",
"numpy.random.binomial",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Muflhi01/apex | [
"79c018776129aad13abeb4ce63d24e1fbb4cd29e"
] | [
"tests/L0/run_transformer/test_batch_sampler.py"
] | [
"from itertools import product\nimport unittest\n\nimport torch\nfrom torch.utils.data import Dataset\nfrom torch.utils.data import RandomSampler\nfrom torch.utils.data import BatchSampler\nfrom torch.utils.data import DataLoader\n\nfrom apex.transformer.pipeline_parallel.utils import _split_batch_into_microbatch a... | [
[
"torch.Generator",
"torch.cat",
"torch.randperm",
"torch.manual_seed",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
X0Ken/swamp | [
"346822a0e1c6c26c5f248ad423026e997803c742"
] | [
"swamp/windows/device_check.py"
] | [
"import json\n\nfrom PyQt4 import QtGui\nfrom PyQt4.QtGui import QInputDialog\nfrom PyQt4.QtGui import QLineEdit\nfrom PyQt4.QtGui import QMessageBox\nfrom matplotlib.backends.backend_qt4agg import \\\n FigureCanvasQTAgg as FigureCanvas\nfrom matplotlib.backends.backend_qt4agg import \\\n NavigationToolbar2QT... | [
[
"matplotlib.backends.backend_qt4agg.NavigationToolbar2QT",
"matplotlib.backends.backend_qt4agg.FigureCanvasQTAgg",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Yugnaynehc/EasyTL | [
"192eb8f47eff02c93c758ccb682cad5765b24be5"
] | [
"KnowDistil/preliminary_small_net.py"
] | [
"# !/usr/bin/python2\n# Preliminary experiments on MNIST\n# Reference: Distilling the Knowledge in a Neural Network\n\nfrom __future__ import print_function\nimport numpy as np\nimport matplotlib\nmatplotlib.use('Agg')\nimport tensorflow as tf\nimport tensorlayer as tl\nimport time\nimport os\n\n\ndef small_net(X_p... | [
[
"tensorflow.InteractiveSession",
"numpy.asarray",
"matplotlib.use",
"tensorflow.cast",
"tensorflow.placeholder",
"tensorflow.train.SummaryWriter",
"tensorflow.ConfigProto",
"tensorflow.initialize_all_variables",
"tensorflow.nn.sparse_softmax_cross_entropy_with_logits",
"ten... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
josephko91/2d-path-finder | [
"50f3babd33c7ae42b7697e17ee00e593a9eea16b"
] | [
"random_numbers.py"
] | [
"# -------------------------------------------------------\n# CSCI 561, Spring 2021\n# Homework 1\n# The Oregon Trail\n# Author: Joseph Ko\n# Randomly generate arrays of numbers and print to file\n# -------------------------------------------------------\nfrom collections import deque\nfrom Node import Node\nimport... | [
[
"numpy.random.randint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
hmaarrfk/CrypTen | [
"a1051edc32aa429987b8d316cc642a972b787914"
] | [
"crypten/common/serial.py"
] | [
"#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport builtins # noqa\nimport collections\nimport inspect\nimport io\nimport logging\nimport pickle\n\ni... | [
[
"torch.serialization._legacy_load",
"torch.is_tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
coolbeans404/neuralNetwork | [
"d03d869cf0984094ffa818504c06f751c0043991"
] | [
"Tut-9/genTestData.py"
] | [
"import sys\n\noutputPath = \"./\"\nheaderFilePath = \"./\"\n\ntry:\n import cPickle as pickle\nexcept:\n import pickle\nimport gzip\nimport numpy as np\n\ndataWidth = 8 #specify the number of bits in test data\nIntSize = 1 #Number of bits of integer portion including sign bit\n\ntry:\n ... | [
[
"numpy.reshape"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
text-machine-lab/transformerpy | [
"314a99107287c436ee223132a08f7d4a6d571216"
] | [
"transformer/SubLayers.py"
] | [
"''' Define the sublayers in encoder/decoder layer '''\nimport numpy as np\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom transformer.Modules import ScaledDotProductAttention\n\n__author__ = \"Yu-Hsiang Huang\"\n\nclass MultiHeadAttention(nn.Module):\n ''' Multi-Head Attention module '''\n\n de... | [
[
"torch.nn.Dropout",
"numpy.sqrt",
"numpy.power",
"torch.nn.init.xavier_normal_",
"torch.nn.LayerNorm",
"torch.nn.Linear",
"torch.nn.Conv1d"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
YannThorimbert/RigidBodies2D | [
"859c1b31cd83cd573e4811be347ec2f8fc76a514"
] | [
"ellipse.py"
] | [
"from __future__ import print_function, division\nimport math, pygame, sys\nimport matplotlib.pyplot as plt\nfrom pygame.math import Vector2 as V2\nimport pygame.gfxdraw as gfx\n\ndef rad2deg(x):#180->pi, d->r\n return x*180./math.pi\n\ndef deg2rad(x):\n return x*math.pi/180.\n\nRESOLUTION = 1.\nTOLERANCE = 1... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
msiampou/neural-networks-for-wind-speed-prediction | [
"12ba4eb667ae9738f0d1effa9165507839252143"
] | [
"app/predict.py"
] | [
"import argparse\nimport util\nimport os\n\nimport numpy as np\nimport pandas as pd\n\nMODEL_PATH = '../models/WindDenseNN1.h5'\nACTUAL_PATH = '../datasets/actual.csv'\nPREDICTED_PATH = '../results/predicted.csv'\n\ndef make_args_parser():\n # Create an ArgumentParser object\n parser = argparse.ArgumentParser... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
pllim/reference-file-testing-tool | [
"f6ee7b6d306904c29b6321c738d8ac76c0a75157"
] | [
"ah_bootstrap.py"
] | [
"\"\"\"\nThis bootstrap module contains code for ensuring that the astropy_helpers\npackage will be importable by the time the setup.py script runs. It also\nincludes some workarounds to ensure that a recent-enough version of setuptools\nis being used for the installation.\n\nThis module should be the first thing ... | [
[
"matplotlib.use"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Jimboom7/what-a-goal-viewer | [
"d45b88bef1989fcfe89643336cfa6cd340cdbf6c"
] | [
"test.py"
] | [
"'''\nCan be used to evaluate the preprocessing of frames in the main class.\n\nVery low code quality in this file.\n'''\nfrom main import Main\nimport numpy as np\nimport cv2\nimport pytesseract\n\npytesseract.pytesseract.tesseract_cmd = r'Tesseract-OCR\\tesseract.exe'\n\nmain = Main()\nmain.DEBUG = True\n\noveral... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Dieptranivsr/DroneIVSR | [
"5b348465443524878418a6b1f89cf6dba3804c0f"
] | [
"offboardpy/scripts/pythongaas/fly_circle.py"
] | [
"#!/usr/bin/env python\n\nfrom commander import Commander\nimport time\nimport math\nimport matplotlib.pyplot as plt\n\nclass fly_circle:\n def __init__(self, Commander, height, building_radius, n):\n self.r = building_radius\n self.n = n\n self.rad_size = 2 * math.pi / self.n\n self.... | [
[
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
massung/python-pqs | [
"914d6ba375291e676a5abc2947f83c508e51c2f8"
] | [
"jockey/statement.py"
] | [
"import asyncio\nimport base64\nimport io\nimport matplotlib.pyplot as plt\nimport os\nimport pandas as pd\nimport re\nimport smart_open\nimport subprocess\nimport sys\nimport tempfile\n\nfrom dataclasses import dataclass\nfrom typing import Union\n\nfrom .context import Context\nfrom .dialect import CSV, Dialect\n... | [
[
"pandas.concat",
"pandas.DataFrame",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
idiap/IdiapTTS | [
"60413d6847508e269d44aa41885e668db7dfd440",
"60413d6847508e269d44aa41885e668db7dfd440"
] | [
"idiaptts/src/neural_networks/pytorch/utils.py",
"idiaptts/src/data_preparation/questions/label_normalisation.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2019 Idiap Research Institute, http://www.idiap.ch/\n# Written by Bastian Schnell <bastian.schnell@idiap.ch>\n#\nimport os\nimport filecmp\n\nimport torch\n\n\ndef equal_iterable(item1, item2):\n # if torch.is_tensor(item1) and torch.is_tensor(... | [
[
"torch.nn.functional.pad"
],
[
"numpy.linspace",
"numpy.empty",
"numpy.concatenate",
"numpy.array",
"numpy.zeros",
"matplotlib.mlab.normpdf"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
JiangFeng07/NLPIK | [
"bacd52e24690e8ba706895b54a076ee05d785d7b"
] | [
"model/bert/run_classifier.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unl... | [
[
"tensorflow.contrib.cluster_resolver.TPUClusterResolver",
"tensorflow.metrics.accuracy",
"tensorflow.FixedLenFeature",
"tensorflow.nn.log_softmax",
"tensorflow.reduce_sum",
"tensorflow.gfile.GFile",
"tensorflow.cast",
"tensorflow.train.init_from_checkpoint",
"tensorflow.gfile.M... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.13",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
}
] |
herley-shaori/Harmonic-K-Means-Implementation | [
"c0953efaeca5cb2af0b39f8b39ca5ced8db26720"
] | [
"imputasiKHMmissbuatan.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Wed May 22 11:12:44 2019\r\n\r\n@author: Anwar\r\n\"\"\"\r\n\r\n# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Thu Apr 25 14:41:16 2019\r\n\r\n@author: Anwar\r\n\"\"\"\r\n\r\nimport pandas as pd\r\nfrom math import factorial as fact\r\nfrom itertools import combinat... | [
[
"numpy.nanmax",
"pandas.concat",
"pandas.read_excel",
"numpy.isnan",
"numpy.nanmin",
"pandas.DataFrame",
"numpy.mean",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
Ascend-Huawei/Lip2Wav | [
"038718f993450a110712489ae6a6e0e0c028bc59"
] | [
"preprocess.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... | [
[
"numpy.asarray",
"numpy.savez_compressed"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
JeffreyAsuncion/openCV_20210507 | [
"292bff9101545bcfd6e439172d3b369c344bc228"
] | [
"draw005.py"
] | [
"import cv2 as cv\nimport numpy as np\n\nblank = np.zeros((500,500,3), dtype='uint8') # uint8 is a data type of an img\n# height, width, # of color channels(RGB)\ncv.imshow('Blank', blank)\n\n\n# # 1. Paint the image a certain color\n# blank[200:300, 300:400] = 0,255,0 # Green\n# # blank[:] = 0,255,0 # G... | [
[
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
clbarnes/profile_utils | [
"4ef71ecc303c8805f6e99564cba6924711023809"
] | [
"profile_utils.py"
] | [
"import time\nimport sys\nimport numpy as np\n\n\nclass Timer():\n def __init__(self):\n self._manual_start_time = None\n self.start_time = None\n if sys.platform == 'win32':\n self.default_timer = time.clock\n else:\n self.default_timer = time.time\n\n def ti... | [
[
"numpy.min",
"numpy.max",
"numpy.std",
"numpy.mean",
"numpy.empty"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
pranaysy/ETCPy | [
"d08c50ae5e379ee11cc9d9eb076ae4319516314c"
] | [
"setup.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\n\n\n@author: Pranay S. Yadav\n\"\"\"\n\nfrom setuptools import setup, find_packages\nfrom Cython.Build import cythonize\nimport numpy\n\nsetup(\n ext_modules=cythonize(\n [\n \"./ETC/NSRWS/x1D/core.pyx\",\n \"./ETC/NSRWS/x2D/c... | [
[
"numpy.get_include"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
BenjaminJonghyun/SuperStlyeNet | [
"2400c01b35f50b387b5f768fdece37688a077049"
] | [
"models/networks/__init__.py"
] | [
"\"\"\"\nCopyright (C) 2019 NVIDIA Corporation. All rights reserved.\nLicensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).\n\"\"\"\n\nimport torch\nfrom models.networks.base_network import BaseNetwork\nfrom models.networks.loss import *\nfrom models.networks.dis... | [
[
"torch.cuda.is_available"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
envil/plda-pmf | [
"f421fc3a03536127651589160847ffac2b403390"
] | [
"learn-tpf.py"
] | [
"import tensorflow_probability as tfp\nimport tensorflow as tf\n\nprint(tf.Session().run(tfp.bijectors.Transpose(rightmost_transposed_ndims=2).forward(\n [\n [1, 2, 3, 4],\n [5, 6, 7, 8]\n ])))\n"
] | [
[
"tensorflow.Session"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.13",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
}
] |
Feng-Yuze/ASP | [
"86c9227269871f97bb5c7db65d06ca54a814c2cc"
] | [
"py/HW2/option_models/normal.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Sep 19 22:56:58 2017\n\n@author: jaehyuk\n\"\"\"\nimport numpy as np\nimport scipy.stats as ss\nimport scipy.optimize as sopt\n\ndef normal_formula(strike, spot, vol, texp, intr=0.0, divr=0.0, cp_sign=1):\n div_fac = np.exp(-texp*divr)\n disc_fac = np.exp(-texp... | [
[
"scipy.stats.norm.cdf",
"numpy.sqrt",
"scipy.stats.norm.pdf",
"numpy.fmax",
"numpy.exp"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
xhdhr10000/Hierarchical-Localization | [
"39ced986d6eec9321a0e8666ed7010eb70569820"
] | [
"hloc/pairs_from_retrieval.py"
] | [
"import argparse\nimport logging\nfrom pathlib import Path\nimport h5py\nimport numpy as np\nimport torch\n\nfrom .utils.parsers import parse_image_lists_with_intrinsics\n\n\ndef main(descriptors, output, num_matched,\n db_prefix=None, query_prefix=None, db_list=None, query_list=None):\n logging.info('Ex... | [
[
"torch.topk",
"torch.einsum",
"numpy.stack",
"torch.cuda.is_available"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Jimmy2027/MMVAE_mnist_svhn_text | [
"e6e74059bd5feefc0af088f7b1abc31b0e9f2ab7",
"e6e74059bd5feefc0af088f7b1abc31b0e9f2ab7"
] | [
"mmvae_hub/utils/Dataclasses/Dataclasses.py",
"mmvae_hub/sylvester_flows/main_experiment.py"
] | [
"# -*- coding: utf-8 -*-\nfrom dataclasses import dataclass\nfrom typing import Mapping, Optional, Iterable\n\nimport torch\nfrom torch import Tensor\n\n\n@dataclass\nclass BaseLatents:\n enc_mods: dict\n joint: dict\n\n\n@dataclass\nclass BaseDivergences:\n joint_div: float\n mods_div: Mapping[str, Ten... | [
[
"torch.cat"
],
[
"numpy.hstack",
"torch.cuda.set_device",
"numpy.random.seed",
"torch.load",
"torch.manual_seed",
"numpy.std",
"numpy.mean",
"torch.cuda.is_available",
"numpy.array",
"torch.save"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jlin816/wge | [
"d6d392e084aa01ad47dfd29bae92260093a9bde0"
] | [
"gtd/ml/torch/seq_batch.py"
] | [
"from collections import namedtuple\n\n\nimport numpy as np\nimport torch\nfrom torch.autograd import Variable\n\nfrom gtd.ml.torch.utils import GPUVariable, conditional, is_binary\nfrom gtd.ml.torch.utils import expand_dims_for_broadcast, NamedTupleLike\n\n\nclass SequenceBatch(namedtuple('SequenceBatch', ['values... | [
[
"torch.max",
"torch.cat",
"torch.sum",
"torch.from_numpy",
"torch.exp",
"torch.log",
"torch.index_select",
"torch.prod",
"numpy.zeros",
"torch.squeeze"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
TissueC/ML-Project-2019 | [
"8e73708cffc0f349c1aaca595bedf357c6231da9"
] | [
"src/vgg_19_net.py"
] | [
"import torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nfrom torch.autograd import Variable\r\nimport cv2\r\n\r\ncfg = {\r\n 'VGG11': [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'],\r\n 'VGG13': [64, 64, 'M', 128, 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'],\r... | [
[
"torch.nn.Sequential",
"numpy.random.random",
"torch.nn.ConvTranspose2d",
"torch.nn.functional.dropout",
"torch.cat",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.AvgPool2d",
"torch.nn.MaxPool2d",
"torch.FloatTensor",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
bjornwallner/alphafold | [
"2bf650de5100f5de2162e27fce1f7fb793ad158c"
] | [
"run_alphafold.py"
] | [
"# Copyright 2021 DeepMind Technologies 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 required by applic... | [
[
"numpy.repeat",
"numpy.mean",
"numpy.median"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
TDAmeritrade/stumpy | [
"1aebabb290891d814afda2dccacb8b165eb9db35"
] | [
"stumpy/floss.py"
] | [
"# STUMPY\n# Copyright 2019 TD Ameritrade. Released under the terms of the 3-Clause BSD license. # noqa: E501\n# STUMPY is a trademark of TD Ameritrade IP Company, Inc. All rights reserved.\n\nimport copy\n\nimport numpy as np\nimport scipy.stats\n\nfrom . import core, config\n\n\ndef _nnmark(I):\n \"\"\"\n ... | [
[
"numpy.minimum",
"numpy.maximum",
"numpy.random.seed",
"numpy.isfinite",
"numpy.asarray",
"numpy.arange",
"numpy.argwhere",
"numpy.ones",
"numpy.ceil",
"numpy.mean",
"numpy.argmin",
"numpy.array",
"numpy.zeros",
"numpy.empty",
"numpy.random.randint"
]
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rishikanthc/torch-snippets | [
"b836c2c2fffbc5be1f08a1adae4b48473ad1fd60"
] | [
"torch_gists/models/mobilenetv2.py"
] | [
"'''MobileNetV2 in PyTorch.\n\nSee the paper \"Inverted Residuals and Linear Bottlenecks:\nMobile Networks for Classification, Detection and Segmentation\" for more details.\n'''\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass Block(nn.Module):\n '''expand + depthwise + pointwise... | [
[
"torch.nn.Sequential",
"torch.randn",
"torch.nn.Conv2d",
"torch.nn.Flatten",
"torch.nn.Linear",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm2d"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
haohhxx/dialog_wechat | [
"db56a579ee6774cf334b1f8aa668d6b80cc5a89c"
] | [
"src/torcg/pair_data.py"
] | [
"# -*- coding:utf8 -*-\n\nfrom torch.utils.data import DataLoader\nfrom torch.utils.data import Dataset\nfrom sklearn.model_selection import train_test_split\nimport numpy as np\n\nfrom .s2s_vocab import Vocab\n\n\nclass DialogPairDataSet(Dataset):\n\n def __init__(self, srcs, targets, vocabs, max_length=100):\n... | [
[
"numpy.asarray",
"torch.utils.data.DataLoader",
"sklearn.model_selection.train_test_split",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
googleinterns/loop-project | [
"28acb1c815e0a65f51e809d278eea08ffb06483e"
] | [
"lib/res_block.py"
] | [
"import tensorflow as tf\nfrom tensorflow.keras import layers\nfrom tensorflow.keras import regularizers\n\nclass ResBlock(tf.keras.Model):\n \"\"\"A ResBlock module class with expansion, depthwise conv and projection.\n\n In this ResBlock, standard 2D convolutions are replaced by 1x1 convolution\n that expands ... | [
[
"tensorflow.keras.layers.DepthwiseConv2D",
"tensorflow.keras.regularizers.l2",
"tensorflow.keras.layers.BatchNormalization"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"2.2",
"1.10"
]
}
] |
ezatterin/id01-sxdm-utils | [
"f1eb7117265e64050d48f757c2159531d3f20581"
] | [
"sxdm/plot.py"
] | [
"\"\"\"\nHelper functions useful to plot SXDM maps.\n\"\"\"\n\n\nimport numpy as np\nimport matplotlib.font_manager as fm\nimport matplotlib as mpl\n\nfrom mpl_toolkits.axes_grid1 import make_axes_locatable, anchored_artists\nfrom mpl_toolkits.axes_grid1.inset_locator import inset_axes\nfrom mpl_toolkits.axes_grid1... | [
[
"numpy.ones_like",
"numpy.abs",
"matplotlib.colors.hsv_to_rgb",
"matplotlib.patches.Rectangle",
"matplotlib.font_manager.FontProperties",
"numpy.dstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
GlodonAI/tensorflow_models | [
"13dd0f7f047754cf2d4e630e5bfe05b073aa9359"
] | [
"official/recommendation/ncf_common.py"
] | [
"# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.distribute.experimental.TPUStrategy",
"tensorflow.concat",
"numpy.random.seed",
"tensorflow.distribute.cluster_resolver.TPUClusterResolver"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
fabianbalsiger/mrf-reconstruction-mlmir2020 | [
"bfa979d60cf9d145773cb8872e14305ffed20117",
"bfa979d60cf9d145773cb8872e14305ffed20117"
] | [
"mrf/evaluation/forward.py",
"mrf/plot/statistics.py"
] | [
"import os\n\nimport numpy as np\n\nimport mrf.data.definition as defs\nimport mrf.data.normalization as norm\nimport mrf.evaluation.metric as metric\nimport mrf.evaluation.base as evalbase\nimport mrf.plot.fingerprint as pltfingerprint\nimport mrf.plot.labeling as pltlbl\nimport mrf.plot.statistics as pltstat\n\n\... | [
[
"numpy.zeros",
"numpy.where",
"numpy.empty",
"numpy.unique"
],
[
"matplotlib.pyplot.gca",
"numpy.polyfit",
"matplotlib.pyplot.axhline",
"numpy.poly1d",
"numpy.random.seed",
"numpy.min",
"matplotlib.use",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savef... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
zenoengine/open_spiel | [
"d569abb585caa651a4ec1d7153fa70bb5fd8771a"
] | [
"open_spiel/python/examples/mcts.py"
] | [
"# Copyright 2019 DeepMind Technologies Ltd. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless r... | [
[
"numpy.random.choice"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jevenzh/NeMo | [
"65257ef1a351d45c22c5e0395b2f9f51053fe16d"
] | [
"nemo/collections/tts/parts/helpers.py"
] | [
"# Copyright (c) 2019 NVIDIA Corporation\nimport librosa\nimport matplotlib.pylab as plt\nimport numpy as np\nimport torch\n\nfrom nemo.utils import logging\n\n__all__ = [\n \"waveglow_log_to_tb_func\",\n \"waveglow_process_eval_batch\",\n \"waveglow_eval_log_to_tb_func\",\n \"tacotron2_log_to_tb_func\"... | [
[
"matplotlib.pylab.tight_layout",
"torch.sigmoid",
"numpy.clip",
"matplotlib.pylab.ylabel",
"matplotlib.pylab.subplots",
"matplotlib.pylab.colorbar",
"matplotlib.pylab.xlabel",
"matplotlib.pylab.close",
"torch.stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
SkyeSong38/CSWinTT | [
"27b78f9b0b1eebecfd5b3d3dbdc591c6562e69d7"
] | [
"main/profile_model.py"
] | [
"import argparse\nimport torch\nfrom lib.utils.merge import merge_template_search\nfrom lib.utils.misc import NestedTensor\nfrom thop import profile\nfrom thop.utils import clever_format\nimport time\nimport importlib\n\n\ndef parse_args():\n \"\"\"\n args for training.\n \"\"\"\n parser = argparse.Argu... | [
[
"torch.randn",
"torch.no_grad",
"torch.rand",
"torch.cuda.set_device"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ddudt/DESC | [
"73327a87d60a38c9a74555428da3b8ccace2e92b"
] | [
"desc/perturbations.py"
] | [
"import numpy as np\nimport warnings\nfrom termcolor import colored\nfrom desc.utils import Timer\nfrom desc.backend import use_jax, jnp\nfrom desc.optimize.tr_subproblems import trust_region_step_exact_svd\n\n__all__ = [\"perturb\", \"optimal_perturb\"]\n\n\ndef perturb(\n eq,\n dRb=None,\n dZb=None,\n ... | [
[
"numpy.hstack",
"numpy.linalg.svd",
"numpy.ones_like",
"numpy.matmul",
"numpy.linalg.norm",
"numpy.ones",
"numpy.concatenate",
"numpy.linalg.pinv",
"numpy.zeros_like",
"numpy.any",
"numpy.isscalar",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ikuokuo/start-ai-compiler | [
"01a8601d1a84710f06bdae67ba9d77f502c83bbc"
] | [
"frameworks/tvm/autotvm_tune/autotvm_tune.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# pylint: disable=missing-docstring,invalid-name\nimport onnx\nfrom tvm.contrib.download import download_testdata\nfrom PIL import Image\nimport numpy as np\nimport tvm.relay as relay\nimport tvm\nfrom tvm.contrib import graph_executor\n\n\nprint(\"# TVM 编译运行模型\")\n\... | [
[
"numpy.expand_dims",
"numpy.asarray",
"numpy.squeeze",
"numpy.median",
"numpy.std",
"numpy.mean",
"numpy.transpose",
"numpy.argsort",
"numpy.array",
"scipy.special.softmax"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.6",
"1.10",
"1.4",
"1.9",
"1.5",
"1.2",
"1.7",
"1.3",
"1.8"
],
"tensorflow": []
}
] |
wsx66848/detection | [
"4b9c40d2c4d3c98c24e94e539f9867b3f826d147"
] | [
"mmdet/core/evaluation/eval_hooks.py"
] | [
"import os\nimport os.path as osp\n\nimport mmcv\nimport numpy as np\nimport torch\nimport torch.distributed as dist\nfrom mmcv.parallel import collate, scatter\nfrom mmcv.runner import Hook\nfrom pycocotools.cocoeval import COCOeval\nfrom torch.utils.data import Dataset\n\nfrom mmdet import datasets\nfrom .coco_ut... | [
[
"torch.cuda.current_device",
"numpy.arange",
"torch.distributed.barrier",
"numpy.ones",
"numpy.concatenate",
"torch.no_grad",
"numpy.array",
"numpy.zeros",
"numpy.vstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.