repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
ntraut/example
[ "5b7501ee7c8ad4e7c61b3ff8e9b1d3c0380c33de" ]
[ "run.py" ]
[ "#!/usr/bin/env python3\nimport argparse\nimport os\nimport subprocess\nimport nibabel\nimport numpy\nfrom glob import glob\n\n__version__ = open(os.path.join(os.path.dirname(os.path.realpath(__file__)),\n 'version')).read()\n\ndef run(command, env={}):\n merged_env = os.environ\n ...
[ [ "numpy.array" ] ]
benbenti/fuzzyclustering
[ "f67224105528d82f6d950ec7692a50d927ca0621" ]
[ "tests/conftest.py" ]
[ "import pytest\nimport random\nimport numpy as np\nfrom numpy.random import rand\nimport lib.algorithms as al\n\n@pytest.fixture(scope=\"session\")\ndef unif_1D():\n \"\"\"\n Test case: one dimension, samples evenly distributed.\n \"\"\"\n data = np.array([[0], [1], [2], [3], [4], [5], [6],\n ...
[ [ "numpy.array", "numpy.random.rand" ] ]
jssprz/video_captioning_with_visual_syntactic_embedding
[ "0687772b22c56f448dabbe46932422363964abd4" ]
[ "test.py" ]
[ "import os\nimport argparse\nimport pickle\n\nfrom utils import decode_from_tokens\nfrom vocabulary import Vocabulary\nfrom configuration_file import ConfigurationFile\nfrom model.encoder import SCNEncoder\nfrom model.decoder import SemSynANDecoder\n\nimport h5py\nimport torch\nimport numpy as np\n\n\nif __name__ =...
[ [ "torch.no_grad", "torch.from_numpy", "torch.Tensor", "torch.load" ] ]
vncsna/mirror
[ "0de84de6fa4f8a4569beed0bf2e313901d95a17d" ]
[ "app/routers/images.py" ]
[ "# TODO: Add exception checking\n# TODO: Use wrong uuids as input\n\nimport os\nimport cv2\nimport shutil\nimport numpy as np\nfrom enum import Enum\nfrom uuid import uuid4\nfrom pathlib import Path\nfrom dotenv import load_dotenv\nfrom fastapi import APIRouter, File, UploadFile\nfrom fastapi.responses import FileR...
[ [ "numpy.zeros_like" ] ]
alisafaya/shalstm
[ "3d85f29c82451b393975ba587d53e0db0e43fff9" ]
[ "shalstm/qa/model.py" ]
[ "import torch.nn as nn\nimport torch\n\nfrom shalstm import SHALSTM\nfrom shalstm.utils import top_k_top_p_filtering\n\nclass SHALSTMforQuestionAnswering(SHALSTM):\n\n def forward(self, input, attention_mask=None, type_ids=None, hidden=None, mems=None, return_loss=False, lm_loss=False):\n \"\"\"\n ...
[ [ "torch.all", "torch.ones", "torch.full", "torch.zeros", "torch.cat", "torch.multinomial", "torch.cuda.amp.autocast", "torch.cuda.amp.GradScaler", "torch.no_grad", "torch.where", "torch.device", "torch.triu", "torch.argmax" ] ]
itsliya/modin
[ "d4ce5390816ae7eb8717bf271e1feabd3d5fabee" ]
[ "modin/pandas/test/utils.py" ]
[ "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the \"License\"); you...
[ [ "pandas.testing.assert_extension_array_equal", "pandas.read_csv", "pandas.testing.assert_series_equal", "pandas.Series", "numpy.arange", "pandas.MultiIndex.from_tuples", "pandas.DataFrame", "numpy.testing.assert_array_equal", "numpy.testing.assert_almost_equal", "pandas.api...
Razorro/xalpha
[ "bcecd53dc9d081deb1b8235437a4f6b74951c23d" ]
[ "xalpha/cons.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nbasic constants and utility functions\n\"\"\"\n\nimport datetime as dt\nimport os\nimport time\nimport logging\nimport inspect\nfrom decimal import Decimal\nimport requests\nfrom functools import wraps\nfrom simplejson.errors import JSONDecodeError\n\nimport pandas as pd\nfrom pyec...
[ [ "pandas.Timestamp", "numpy.sqrt" ] ]
huawei-noah/Disout
[ "dd4a131ee27043fd3da638056808216944722336" ]
[ "models/resnet_imagenet.py" ]
[ "#Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.\n\n#This program is free software; you can redistribute it and/or modify it under the terms of the BSD 3-Clause License.\n\n#This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied war...
[ [ "torch.nn.Sequential", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.AvgPool2d", "torch.nn.Linear", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
blocktorch/blocktorch
[ "044aa269813ab22c5fd27f84272e5fb540fc522b", "044aa269813ab22c5fd27f84272e5fb540fc522b", "044aa269813ab22c5fd27f84272e5fb540fc522b", "044aa269813ab22c5fd27f84272e5fb540fc522b" ]
[ "ml_source/src/blocktorch/blocktorch/pipelines/components/estimators/classifiers/logistic_regression_classifier.py", "ml_source/src/blocktorch/blocktorch/tests/component_tests/test_xgboost_regressor.py", "ml_source/src/blocktorch/blocktorch/tests/data_checks_tests/test_no_variance_data_check.py", "ml_source/s...
[ "\"\"\"Logistic Regression Classifier.\"\"\"\nimport numpy as np\nfrom sklearn.linear_model import LogisticRegression as SKLogisticRegression\nfrom skopt.space import Real\n\nfrom blocktorch.model_family import ModelFamily\nfrom blocktorch.pipelines.components.estimators import Estimator\nfrom blocktorch.problem_ty...
[ [ "numpy.linalg.norm", "sklearn.linear_model.LogisticRegression" ], [ "numpy.isnan", "pandas.MultiIndex.from_tuples", "pandas.Series", "pandas.DataFrame" ], [ "numpy.arange", "pandas.Series", "pandas.DataFrame" ], [ "numpy.isnan", "pandas.Series" ] ]
komorihi/GPyOpt
[ "5c8424f92ffaa745d3daebca3f38de2569500d6d" ]
[ "GPyOpt/util/general.py" ]
[ "# Copyright (c) 2016, the GPyOpt Authors\n# Licensed under the BSD 3-clause license (see LICENSE.txt)\n\nimport numpy as np\nfrom scipy.special import erfc\nimport time\nfrom ..core.errors import InvalidConfigError\n\ndef compute_integrated_acquisition(acquisition,x):\n '''\n Used to compute the acquisition ...
[ [ "numpy.hstack", "numpy.sqrt", "numpy.abs", "numpy.clip", "numpy.ones", "numpy.atleast_2d", "numpy.argmax", "numpy.argmin", "numpy.exp", "numpy.random.uniform", "numpy.array", "numpy.zeros" ] ]
dawidkski/federated-faceid
[ "95b1f4b7da0e8baf1cac35edf3b49528c650c491", "95b1f4b7da0e8baf1cac35edf3b49528c650c491" ]
[ "src/federatedid/federated.py", "src/facenet/datasets/generate_csv_files.py" ]
[ "import copy\nfrom dataclasses import dataclass\nfrom typing import List, Optional\n\nimport torch\nfrom torch.nn import CrossEntropyLoss, Module\nfrom torch.utils.data import DataLoader\n\n\ndef federated_averaging(models: List[Module]) -> Module:\n global_model = copy.deepcopy(models[0])\n global_weights = ...
[ [ "torch.div", "torch.nn.CrossEntropyLoss" ], [ "pandas.factorize", "pandas.DataFrame" ] ]
ianhuang0630/CSQ
[ "5f1fe99a8d9da73692643b3911d675dce269a03d" ]
[ "setup.py" ]
[ "\"\"\"Setup learnable_primitives\"\"\"\n\nfrom distutils.core import setup\nfrom Cython.Build import cythonize\nfrom distutils.extension import Extension\n\nfrom itertools import dropwhile\nimport numpy as np\nfrom os import path\n\n\ndef collect_docstring(lines):\n \"\"\"Return document docstring if it exists\...
[ [ "numpy.get_include" ] ]
source-data/soda-roberta
[ "28f23ae68a1bb17c9844815a7c36d4c590e8c3d0" ]
[ "src/lm/metrics.py" ]
[ "from transformers import EvalPrediction\nfrom sklearn.metrics import precision_recall_fscore_support\nimport numpy as np\n\n\ndef compute_metrics(pred: EvalPrediction):\n \"\"\"Compute recall at the masked position\n \"\"\"\n mask = pred.label_ids != -100\n # filter everything except the masked positio...
[ [ "sklearn.metrics.precision_recall_fscore_support", "numpy.array" ] ]
jlmaurer/tectosaur
[ "7cc5606d814f061395b19754e7a4b6c5e4c236e5", "7cc5606d814f061395b19754e7a4b6c5e4c236e5", "7cc5606d814f061395b19754e7a4b6c5e4c236e5" ]
[ "tectosaur/fmm/ts_terms.py", "tests/test_farfield.py", "tectosaur/qd/basis_convert.py" ]
[ "from math import factorial\nimport scipy.special\nimport numpy as np\n\ndef sloppy_spherical(y):\n r = np.linalg.norm(y)\n costheta = y[2] / r\n theta = np.arccos(costheta)\n phi = np.arccos(y[0] / r / np.sin(theta))\n return r, theta, phi\n\ndef Rdirect(n_max, y):\n r, theta, phi = sloppy_spheri...
[ [ "numpy.arccos", "numpy.cos", "numpy.linalg.norm", "numpy.sin", "numpy.zeros" ], [ "numpy.arange", "numpy.testing.assert_almost_equal", "numpy.random.rand", "numpy.random.seed" ], [ "numpy.ones", "numpy.zeros", "numpy.empty", "numpy.unique" ] ]
pyjhzwh/hiddenlayer
[ "59f84299986d9aed7e0534147a87f7dd491ab08d" ]
[ "hiddenlayer/graph.py" ]
[ "\"\"\"\nHiddenLayer\n\nImplementation of the Graph class. A framework independent directed graph to\nrepresent a neural network.\n\nWritten by Waleed Abdulla. Additions by Phil Ferriere.\nLicensed under the MIT License\n\"\"\"\nfrom __future__ import absolute_import, division, print_function\nimport os\nimport re\...
[ [ "numpy.unique" ] ]
SungbinChoi/traffic4cast2021
[ "3d63b7e90ad0d9c7346f2a6c6c89d605849bf49e", "3d63b7e90ad0d9c7346f2a6c6c89d605849bf49e", "3d63b7e90ad0d9c7346f2a6c6c89d605849bf49e" ]
[ "train/t2m2/run.py", "test/t1m2/run3.py", "test/t1m3/run4.py" ]
[ "import random\nfrom random import shuffle\nimport numpy as np\nfrom datetime import datetime\nimport time\nimport queue\nimport threading\nimport logging\nfrom PIL import Image\nimport itertools\nimport re\nimport os\nimport glob\nimport shutil\nimport sys\nimport copy\nimport h5py\nfrom typing import Any, List, T...
[ [ "torch.cat", "torch.load", "numpy.asarray", "torch.nn.ELU", "numpy.concatenate", "torch.no_grad", "numpy.mean", "torch.cuda.manual_seed_all", "torch.nn.functional.interpolate", "numpy.moveaxis", "numpy.random.randint", "torch.save", "torch.from_numpy", "torc...
jwsiegel2510/ESPEI
[ "cb72f676138c96d560d8b83cea6b7ca2da100078" ]
[ "espei/datasets.py" ]
[ "import fnmatch, warnings, json, os\n\nimport numpy as np\nfrom six import string_types\nfrom tinydb.storages import MemoryStorage\nfrom tinydb import where\n\nfrom espei.utils import PickleableTinyDB\nfrom espei.core_utils import recursive_map\n\nclass DatasetError(Exception):\n \"\"\"Exception raised when data...
[ [ "numpy.atleast_1d", "numpy.array", "numpy.isscalar" ] ]
kornesh/text
[ "f762def9dbb14f8f182936dd25af154af79f366e" ]
[ "tensorflow_text/python/ops/bert_tokenizer.py" ]
[ "# coding=utf-8\n# Copyright 2019 TF.Text Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl...
[ [ "tensorflow.python.ops.lookup_ops.TextFileIdTableInitializer", "tensorflow.python.ops.lookup_ops.StaticVocabularyTableV1", "tensorflow.python.ops.array_ops.expand_dims", "tensorflow.python.ops.string_ops.regex_replace" ] ]
Abner0627/IPRV_Optical-Flow
[ "85c0650f671ad44c8bbe1d820a761be42cbe56d0" ]
[ "func.py" ]
[ "import cv2\nimport os\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# %%\ndef _pick(L, ty, path):\n L_ = [cv2.imread(os.path.join(path, i)) for i in L if i.split('_')[0]==ty]\n # 輸入影像\n return L_\n\ndef _gray(img):\n return cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\n\ndef _Pos(img, idx):\n def...
[ [ "matplotlib.pyplot.imshow", "numpy.abs", "numpy.copy", "matplotlib.pyplot.close", "numpy.load", "numpy.array", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
Rossil2012/mindspore
[ "55372b41fdfae6d2b88d7078971e06d537f6c558", "8a20b5d784b3fec6d32e058581ec56ec553a06a0", "8a20b5d784b3fec6d32e058581ec56ec553a06a0", "8a20b5d784b3fec6d32e058581ec56ec553a06a0", "8a20b5d784b3fec6d32e058581ec56ec553a06a0", "8a20b5d784b3fec6d32e058581ec56ec553a06a0", "8a20b5d784b3fec6d32e058581ec56ec553a06a...
[ "mindspore/ops/operations/nn_ops.py", "tests/ut/python/dataset/test_bounding_box_augment.py", "tests/ut/python/parallel/test_sparse_feature_bprop.py", "mindspore/nn/layer/conv.py", "tests/ut/python/parallel/test_transpose.py", "mindspore/ops/operations/math_ops.py", "mindspore/dataset/transforms/vision/...
[ "# Copyright 2020 Huawei Technologies Co., Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l...
[ [ "numpy.all", "numpy.array" ], [ "numpy.array" ], [ "numpy.ones" ], [ "numpy.expand_dims" ], [ "numpy.ones" ], [ "numpy.fmod", "numpy.log", "numpy.true_divide", "numpy.minimum", "numpy.sqrt", "numpy.maximum", "numpy.power", "numpy.greater"...
nfuster2017/AmazonWebCrawler
[ "d45e2dec826b5cadd632ed8a94c2c4c127430000" ]
[ "venv/Scripts/f2py.py" ]
[ "#!D:\\School\\UMD\\INST326\\Group Project\\venv\\Scripts\\python.exe\n# See http://cens.ioc.ee/projects/f2py2e/\nfrom __future__ import division, print_function\n\nimport os\nimport sys\nfor mode in [\"g3-numpy\", \"2e-numeric\", \"2e-numarray\", \"2e-numpy\"]:\n try:\n i = sys.argv.index(\"--\" + mode)\...
[ [ "numpy.f2py.main" ] ]
mjsML/fast_flax
[ "d982b59b715524884d08d6ed506ab325e8be1ece", "d982b59b715524884d08d6ed506ab325e8be1ece" ]
[ "examples/lm1b/main.py", "flax/training/checkpoints.py" ]
[ "# Copyright 2021 The Flax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or a...
[ [ "tensorflow.config.experimental.set_visible_devices" ], [ "tensorflow.io.gfile.isdir", "tensorflow.io.gfile.exists", "tensorflow.io.gfile.GFile", "tensorflow.io.gfile.glob", "tensorflow.io.gfile.remove", "tensorflow.io.gfile.rename" ] ]
keonlee9420/DiffSinger
[ "2bfcae4a78068c2061eae64ee675959a077aa54b" ]
[ "model/optimizer.py" ]
[ "import torch\r\nimport numpy as np\r\n\r\n\r\nclass ScheduledOptim:\r\n \"\"\" A simple wrapper class for learning rate scheduling \"\"\"\r\n\r\n def __init__(self, model, train_config, model_config, current_step):\r\n\r\n self._optimizer = torch.optim.Adam(\r\n model.parameters(),\r\n ...
[ [ "numpy.power" ] ]
Joevaen/Scikit-image_On_CT
[ "e3bf0eeadc50691041b4b7c44a19d07546a85001", "e3bf0eeadc50691041b4b7c44a19d07546a85001", "e3bf0eeadc50691041b4b7c44a19d07546a85001" ]
[ "Feature/structure_tensor_eigenvalues.py", "Restoration/cycle_spin.py", "Morphology/flood_fill.py" ]
[ "# 计算结构张量的特征值。\n\nfrom skimage.feature import structure_tensor\nfrom skimage.feature import structure_tensor_eigenvalues\nimport numpy as np\nsquare = np.zeros((5, 5))\nsquare[2, 2] = 1\nA_elems = structure_tensor(square, sigma=0.1, order='rc')\nprint(structure_tensor_eigenvalues(A_elems)[0])\n\n\n\n\n", "# 循环旋转(...
[ [ "numpy.zeros" ], [ "numpy.random.standard_normal" ], [ "matplotlib.pyplot.show", "numpy.unravel_index", "matplotlib.pyplot.subplots" ] ]
desertfireballnetwork/DFN_darkflight
[ "f41d2a2b82ce96f380f26acfe278c0afa536b9cd" ]
[ "orbital_utilities.py" ]
[ "#!/usr/bin/env python\n\"\"\"\nFunctions and objects to deal with meteoroids orbits\n\"\"\"\n\n__author__ = \"Hadrien A.R. Devillepoix, Trent Jansen-Sturgeon \"\n__copyright__ = \"Copyright 2016-2017, Desert Fireball Network\"\n__license__ = \"MIT\"\n__version__ = \"1.0\"\n\nimport numpy as np\nfrom numpy.linalg i...
[ [ "matplotlib.pyplot.legend", "numpy.dot", "numpy.sqrt", "numpy.linspace", "numpy.rad2deg", "matplotlib.pyplot.plot", "numpy.max", "numpy.arctan2", "numpy.arcsin", "numpy.sin", "matplotlib.pyplot.subplot", "numpy.zeros", "matplotlib.pyplot.figure", "numpy.isna...
idigitopia/Distributed-VI
[ "323be8c50862d8dff9cae68313c518080a9df72e", "323be8c50862d8dff9cae68313c518080a9df72e", "323be8c50862d8dff9cae68313c518080a9df72e" ]
[ "vi_engine_s.py", "gpu_vi_engine_s.py", "env_frozen_lake.py" ]
[ "import numpy as np\nimport ray\n\nray.shutdown()\nray.init()\n\n\n# A : Action Space\n# S : State Space \n\n@ray.remote\nclass VI_worker(object):\n def __init__(self, list_of_actions, tran_dict, reward_dict, beta, backup_states, true_action_prob=0.8,\n unknown_value=0):\n self.backup_stat...
[ [ "numpy.array" ], [ "numpy.array", "numpy.random.randint" ], [ "numpy.set_printoptions", "numpy.array", "matplotlib.pyplot.subplots", "numpy.random.choice" ] ]
yyuting/learning_from_program_trace
[ "e0e4ac9bc2d4069eef64bdc2de64a87a735fa508" ]
[ "apps/render_mandelbulb_slim.py" ]
[ "from render_util import *\nfrom render_single import *\nimport numpy\nimport skimage\nimport skimage.io\n\ndef mb(p, time):\n\n z = [p[0], p[1], p[2]]\n dr = 1.0\n t0 = 1.0\n\n cond = True\n\n power = 20.0\n\n for i in range(4):\n r = sqrt(z[0] ** 2.0 + z[1] ** 2.0 + z[2] ** 2.0)\n ...
[ [ "numpy.random.rand", "numpy.array", "numpy.linalg.norm", "numpy.empty" ] ]
yeonseok-jeong-cm/multimodal_research
[ "bb1140f13f76d4cda6175a072806a0ee0908bd0d", "bb1140f13f76d4cda6175a072806a0ee0908bd0d" ]
[ "downstream/UNITER/adapter/src/transformers/adapters/models/gpt2.py", "downstream/UNITER/model/pretrain.py" ]
[ "from typing import Union\n\nimport torch\nfrom torch import nn\n\nfrom ..composition import AdapterCompositionBlock, parse_composition\nfrom ..heads import CausalLMHead, ClassificationHead, MultiLabelClassificationHead\nfrom ..model_mixin import InvertibleAdaptersMixin, ModelAdaptersMixin\nfrom .bert import (\n ...
[ [ "torch.zeros" ], [ "torch.nn.functional.kl_div", "torch.max", "torch.nn.functional.log_softmax", "torch.zeros", "torch.nn.functional.cross_entropy", "torch.nn.functional.mse_loss", "torch.nn.Linear" ] ]
SzymonSzyszko/AeroPy
[ "b061c690e5926fdd834b7c50837c25108e908156", "b061c690e5926fdd834b7c50837c25108e908156" ]
[ "examples/structural/beam.py", "examples/2D/flight_conditions/expected_airfoil.py" ]
[ "from aeropy.geometry.parametric import poly\nfrom aeropy.structural.stable_solution import (structure, mesh_1D, properties,\n boundary_conditions)\nfrom aeropy.xfoil_module import output_reader\n\nimport matplotlib.pyplot as plt\nimport matplotlib.cm as cm\nimport nump...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.scatter", "matplotlib.pyplot.plot", "matplotlib.pyplot.grid", "numpy.array", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "matplotlib.pyplot.scatter", "numpy.array", "matplotlib.p...
sandymule/Credit-Card-Default
[ "c9d67feffa65fb7aad514bd9c1991766e8e2777b" ]
[ "credit_default/app/views.py" ]
[ "import logging\nimport json\n\nimport pandas as pd\nfrom flask import render_template\nfrom flask_wtf import Form\nfrom wtforms import fields\nfrom wtforms.validators import Required\n\nfrom . import app, estimator, target_names\n\nlogger = logging.getLogger('app')\n\nclass PredictForm(Form):\n \"\"\"Fields for...
[ [ "pandas.DataFrame" ] ]
xiangzhemeng/epfl-ml2017-project2
[ "16345b3e453989dfeba70667773b76362897a782" ]
[ "cnn_training.py" ]
[ "import pandas as pd\nimport numpy as np\nimport pickle\nfrom keras.preprocessing.text import Tokenizer\nfrom keras.preprocessing import sequence\nfrom keras.models import Sequential\nfrom keras.layers.embeddings import Embedding\nfrom keras.layers.convolutional import Conv1D\nfrom keras.layers.convolutional import...
[ [ "pandas.read_pickle", "numpy.random.seed", "numpy.arange", "numpy.random.shuffle", "numpy.array" ] ]
IlyaKodua/colorization_with_averaging_ab_channels_test
[ "425a9f3e8b875b21c76424e892cbf489a9e408cb" ]
[ "sig.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass SIGGRAPHGenerator(nn.Module):\n def __init__(self, norm_layer=nn.BatchNorm2d, classes=529):\n super(SIGGRAPHGenerator, self).__init__()\n\n # Conv1\n model1=[nn.Conv2d(4, 64, kernel_size=3, stride=1, padding=1, bi...
[ [ "torch.nn.Sequential", "torch.nn.Softmax", "torch.nn.ConvTranspose2d", "torch.cat", "torch.nn.Conv2d", "torch.nn.Tanh", "torch.nn.Upsample", "torch.nn.LeakyReLU", "torch.nn.ReLU", "torch.utils.model_zoo.load_url", "torch.nn.functional.pad" ] ]
TuranSKT/detectron2_class
[ "c90e68abbd39afa8c34d83ac760cabf3b5d02868" ]
[ "imgcls/modeling/backbone/mobilenet.py" ]
[ "'''\n@Copyright (c) tkianai All Rights Reserved.\n@Author : tkianai\n@Github : https://github.com/tkianai\n@Date : 2020-04-26 14:14:18\n@FilePath : /ImageCls.detectron2/imgcls/modeling/backbone/mobilenet.py\n@Description : \n'''\n\n\nimport torch\nimport torch.nn as nn\nfrom dete...
[ [ "torch.nn.ReLU6", "torch.nn.ModuleList", "torch.flatten", "torch.nn.Linear", "torch.nn.AdaptiveAvgPool2d", "torch.nn.LeakyReLU", "torch.nn.init.normal_", "torch.nn.BatchNorm2d" ] ]
kokoff/mlflow
[ "062722b172f403e613c41f9bb024b3e1673dfe31", "062722b172f403e613c41f9bb024b3e1673dfe31" ]
[ "tests/onnx/test_onnx_model_export.py", "tests/fastai/test_fastai_model_export.py" ]
[ "import sys\nimport os\nimport pytest\nimport mock\n\nfrom keras.models import Sequential\nfrom keras.layers import Dense\nimport sklearn.datasets as datasets\nimport pandas as pd\nimport numpy as np\nimport yaml\n\nimport tensorflow as tf\nimport mlflow.pyfunc.scoring_server as pyfunc_scoring_server\nfrom mlflow i...
[ [ "tensorflow.Graph", "tensorflow.multiply", "numpy.random.random", "sklearn.linear_model.LogisticRegression", "sklearn.datasets.load_iris", "tensorflow.placeholder", "pandas.DataFrame", "tensorflow.identity", "tensorflow.Session", "pandas.read_json" ], [ "pandas.conc...
JohnZhang000/adaptive-jpeg-compression
[ "f54e4798c01169812958f4d5539a03927dbdc313", "f54e4798c01169812958f4d5539a03927dbdc313", "f54e4798c01169812958f4d5539a03927dbdc313" ]
[ "remove_code/sotas/SSAH-adversarial-attack-main/utils/fid_score.py", "remove_code/my_data_mining.py", "remove_code/models/resnet_reg.py" ]
[ "\"\"\"Calculates the Frechet Inception Distance (FID) to evalulate GANs\n\nThe FID metric calculates the distance between two distributions of images.\nTypically, we have summary statistics (mean & covariance matrix) of one\nof these distributions, while the 2nd distribution is given by a GAN.\n\nWhen run as a sta...
[ [ "numpy.abs", "numpy.isfinite", "numpy.eye", "torch.nn.functional.adaptive_avg_pool2d", "numpy.atleast_1d", "numpy.atleast_2d", "numpy.cov", "numpy.mean", "torch.no_grad", "torch.cuda.is_available", "numpy.iscomplexobj", "numpy.load", "numpy.diagonal", "numpy...
prcalopa/reactable-autocalibration
[ "1985d4c73fabd5f08f54b922e73a9306e09c77a5", "1985d4c73fabd5f08f54b922e73a9306e09c77a5", "1985d4c73fabd5f08f54b922e73a9306e09c77a5", "1985d4c73fabd5f08f54b922e73a9306e09c77a5", "feac08cd3935569057e75531fe80bd0e1f982a93", "1985d4c73fabd5f08f54b922e73a9306e09c77a5" ]
[ "autocalibration/lib/python2.7/site-packages/matplotlib/tests/test_units.py", "autocalibration/lib/python2.7/site-packages/matplotlib/tests/test_backend_ps.py", "autocalibration/lib/python2.7/site-packages/mpl_toolkits/axes_grid1/colorbar.py", "autocalibration/lib/python2.7/site-packages/matplotlib/units.py",...
[ "from matplotlib.cbook import iterable\nimport matplotlib.pyplot as plt\nfrom matplotlib.testing.decorators import image_comparison\nimport matplotlib.units as munits\nimport numpy as np\n\ntry:\n # mock in python 3.3+\n from unittest.mock import MagicMock\nexcept ImportError:\n from mock import MagicMock\...
[ [ "matplotlib.cbook.iterable", "matplotlib.units.AxisInfo", "numpy.linspace", "numpy.asarray", "matplotlib.pyplot.subplots", "matplotlib.testing.decorators.image_comparison", "matplotlib.units.ConversionInterface", "numpy.ma.array" ], [ "matplotlib.rc_context", "numpy.ara...
jolinlaw/turicreate
[ "6b2057dc29533da225d18138e93cc15680eea85d" ]
[ "src/unity/python/turicreate/toolkits/drawing_classifier/drawing_classifier.py" ]
[ "# -*- coding: utf-8 -*-\n# Copyright © 2019 Apple Inc. All rights reserved.\n#\n# Use of this source code is governed by a BSD-3-clause license that can\n# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause\n\nimport turicreate as _tc\nimport numpy as _np\nimport time as _time\nfro...
[ [ "numpy.argsort" ] ]
jaydenmedia/OpenCV3-Python
[ "e0bfed6582447c567f100c507f5a8c59b621dfe1" ]
[ "opencv3_align_images.py" ]
[ "# -*- coding: utf-8 -*-\n# Input data files are available in the \"../input/\" directory.\n# For example, running this (by clicking run or pressing Shift+Enter) will\n# list the files in the input directory from subprocess import check_output\n#print(check_output([\"ls\", \"../input\"]).decode(\"utf8\"))\n\n\n#O...
[ [ "numpy.float32" ] ]
josepablocam/janus-public
[ "4713092b27d02386bdb408213d8edc0dc5859eec", "4713092b27d02386bdb408213d8edc0dc5859eec", "4713092b27d02386bdb408213d8edc0dc5859eec", "4713092b27d02386bdb408213d8edc0dc5859eec" ]
[ "kaggle/ghouls-goblins-and-ghosts-boo/script_3.py", "kaggle/ghouls-goblins-and-ghosts-boo/script_41.py", "janus/janus/evaluation/code_evaluation.py", "kaggle/ghouls-goblins-and-ghosts-boo/script_53.py" ]
[ "#Libraries\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nsns.set_style('whitegrid')\nfrom sklearn.preprocessing import LabelEncoder\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.calibratio...
[ [ "pandas.read_csv", "sklearn.naive_bayes.GaussianNB", "sklearn.linear_model.LogisticRegression", "sklearn.ensemble.RandomForestClassifier", "matplotlib.pyplot.subplots", "sklearn.model_selection.train_test_split", "sklearn.ensemble.VotingClassifier", "pandas.DataFrame", "sklearn...
macky168/gaopt
[ "bf2785325d3cb4489513f47ed06f745a059262f8" ]
[ "example.py" ]
[ "import gaopt\nfrom gaopt import search_space\n\nimport pandas as pd\nimport numpy as np\n\nimport lightgbm as lgb\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import r2_score\nfrom sklearn.datasets import load_diabetes\n\nparams_range={\n 'lambda_l1': search_space.discrete_int(-8,...
[ [ "sklearn.metrics.r2_score", "sklearn.model_selection.train_test_split", "sklearn.datasets.load_diabetes" ] ]
t-imamichi/qiskit-core
[ "8d2eeeac44f97af1e10514cdae4157e5923ff2e5" ]
[ "qiskit/tools/jupyter/backend_overview.py" ]
[ "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2018.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any modificatio...
[ [ "matplotlib.pyplot.close" ] ]
wattanapong/DFA
[ "c05851beca2f8739f80531eb4de2f61639715cab", "c05851beca2f8739f80531eb4de2f61639715cab", "c05851beca2f8739f80531eb4de2f61639715cab" ]
[ "pysot/datasets/dataset_template.py", "pysot/tracker/siamrpn_attack_template_search.py", "pysot/models/loss.py" ]
[ "# Copyright (c) SenseTime. All Rights Reserved.\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport json\nimport logging\nimport sys\nimport os\n\nimport cv2\nimport numpy as np\nfrom torch.utils.data i...
[ [ "numpy.random.random", "numpy.sqrt", "numpy.random.choice", "numpy.random.shuffle", "numpy.random.randint" ], [ "torch.nn.functional.softmax", "numpy.sqrt", "torch.max", "numpy.mean", "torch.no_grad", "numpy.hanning", "torch.sqrt", "torch.from_numpy", "n...
yifeim/gluon-nlp
[ "ea30d3399d87404b731d513535af9a31a5672799", "ea30d3399d87404b731d513535af9a31a5672799" ]
[ "src/gluonnlp/data/utils.py", "scripts/bert/dataset.py" ]
[ "# coding: utf-8\n\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the...
[ [ "numpy.arange", "numpy.random.shuffle", "numpy.ceil" ], [ "numpy.array" ] ]
philiptmassey/Cirq
[ "b8b457c2fc484d76bf8a82a73f6ecc11756229a6", "b8b457c2fc484d76bf8a82a73f6ecc11756229a6" ]
[ "cirq/ops/common_gates.py", "cirq/optimizers/merge_interactions.py" ]
[ "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law o...
[ [ "numpy.diag", "numpy.array", "numpy.sqrt" ], [ "numpy.dot", "numpy.eye", "numpy.array" ] ]
PEI-I1/Nos_Tech_Problems
[ "cf8b0b51285a912988a96cc96438f81c75fa45b7" ]
[ "NTP_Bot/msg_interpreter.py" ]
[ "#!/usr/bin/env python3\nimport tensorflow_hub as hub\nimport numpy as np\nimport tensorflow_text\nimport json, re, os\nfrom threading import Thread\nfrom keywords import keywords\n\nembeddings = {}\nembed = None\n\ndef loadModelData():\n ''' Loads Tensorflow enconder and pre-encodes the problem data\n '''\n ...
[ [ "numpy.inner" ] ]
Nobu575/AppItk
[ "91de313115b753a6fb1ae67f53d4979580ef768b" ]
[ "opening2d.py" ]
[ "import numpy as np\nimport itk\nimport matplotlib.pyplot as plt\n\n# Input file name\ninput_filename = './jenga_g_150.png'\n\n# Set dimension\nDimension = 2\n\n# Read input image\nitk_image = itk.imread(input_filename)\n\n# Setting for input image (Grayscale)\nInputPixelType = itk.UC\nInputImageType = itk.Image[In...
[ [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.title", "matplotlib.pyplot.savefig", "matplotlib.pyplot.subplot", "matplotlib.pyplot.figure" ] ]
veo-ibd/Genie
[ "735e3aa0dc71aab0c404fd0cb3a34c8e1d9784c2" ]
[ "genie/assay.py" ]
[ "import os\nimport logging\nimport subprocess\nimport yaml\n\nimport pandas as pd\n\nfrom .example_filetype_format import FileTypeFormat\nfrom . import process_functions\n\nlogger = logging.getLogger(__name__)\n\n\nclass Assayinfo(FileTypeFormat):\n '''\n Assay information file type\n '''\n _fileType = ...
[ [ "pandas.isnull", "pandas.DataFrame" ] ]
jamesgregson/easy_image_io
[ "4b5af29f3ccc37e4b10fbdc1e18d508ed04b882d" ]
[ "setup.py" ]
[ "from setuptools import setup, Extension\nimport numpy\nimport os\nimport config\n\ndef find(name, path):\n for root, dirs, files in os.walk(path):\n if name in files:\n return os.path.join(root, name)\n return '';\n\nprint('locating directories...')\ndefines = [ ('MAJOR_VERSION',0),('M...
[ [ "numpy.get_include" ] ]
UMBCvision/Consistent-Explanations-by-Contrastive-Learning
[ "589ff89cbcc96a1d8bd8d5b7bd7a785448ed2de3", "589ff89cbcc96a1d8bd8d5b7bd7a785448ed2de3" ]
[ "TorchRay/torchray/benchmark/evaluate_imagenet_gradcam_energy_inside_bbox.py", "RISE/utils.py" ]
[ "import argparse\nimport time\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.optim\nimport torch.utils.data.distributed\nimport torchvision.transforms as transforms\nimport resnet_multigpu_cgc as resnet\nimport cv2\nimport datas...
[ [ "torch.load", "numpy.arange", "torch.utils.data.DataLoader", "torch.from_numpy", "torch.nn.DataParallel", "torch.nn.ReLU", "numpy.zeros" ], [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.title", "numpy.clip", "torch.unsqueeze", "numpy.array", "numpy.loadtx...
500kg/learn2branch
[ "693d6f68def3ce290a0f5f289820e708019c019a" ]
[ "04_test.py" ]
[ "import os\nimport sys\nimport importlib\nimport argparse\nimport csv\nimport numpy as np\nimport time\nimport pickle\nimport pathlib\nimport gzip\n\nimport tensorflow as tf\nimport tensorflow.contrib.eager as tfe\n\nimport svmrank\n\nimport utilities\n\nfrom utilities_tf import load_batch_gcnn\n\n\ndef load_batch_...
[ [ "tensorflow.convert_to_tensor", "tensorflow.reduce_max", "tensorflow.enable_eager_execution", "tensorflow.executing_eagerly", "tensorflow.shape", "numpy.asarray", "tensorflow.reduce_sum", "tensorflow.data.Dataset.from_tensor_slices", "tensorflow.reshape", "tensorflow.squeez...
marpyr/forecast_predictability
[ "2285b37e20095ae6f67533595bcb0580882924a2" ]
[ "predictability_utils/utils/helpers.py" ]
[ "import numpy as np\n\ndef compute_anomaly_corrs(out_true, out_pred):\n \n anomaly_corrs = np.zeros(out_pred.shape[1])\n for i in range(anomaly_corrs.size):\n anomaly_corrs[i] = np.corrcoef(out_pred[:,i], out_true[:,i])[0,1]\n \n return anomaly_corrs\n\ndef split_train_data(train_months, t...
[ [ "numpy.corrcoef", "numpy.zeros", "numpy.asarray" ] ]
dataiku/dss-plugin-model-error-analysis
[ "4c0f42a5c0aa1710005db3d81ca9bd9d7f829e6b" ]
[ "python-lib/dku_error_analysis_mpp/dku_error_visualizer.py" ]
[ "# -*- coding: utf-8 -*-\nimport numpy as np\nfrom graphviz import Source\nimport matplotlib\nmatplotlib.use('agg')\nimport matplotlib.pyplot as plt\nfrom dku_error_analysis_mpp.dku_error_analyzer import DkuErrorAnalyzer\nfrom mealy import _BaseErrorVisualizer, ErrorAnalyzerConstants\nfrom dku_error_analysis_utils ...
[ [ "matplotlib.use", "numpy.array", "matplotlib.pyplot.show", "matplotlib.pyplot.rc" ] ]
SmallMunich/Smoke
[ "591a03bdb5cad962999914c9a97c7a8bed9e529b" ]
[ "smoke/data/build.py" ]
[ "import logging\nimport copy\nimport bisect\nimport numpy as np\n\nimport torch.utils.data\n\nfrom smoke.utils.comm import get_world_size\nfrom smoke.utils.imports import import_file\nfrom smoke.utils.envs import seed_all_rng\n\nfrom . import datasets as D\nfrom . import samplers\nfrom .transforms import build_tran...
[ [ "numpy.random.randint" ] ]
aalekhpatel07/retworkx
[ "ae93fcab17d55bc259476c65a677221b4177870a" ]
[ "tests/graph/test_floyd_warshall.py" ]
[ "# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License. You may obtain\n# a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distri...
[ [ "numpy.diag", "numpy.fill_diagonal", "numpy.array_equal", "numpy.full" ] ]
melfm/lsdr
[ "36b0a85e970fdcaae828eeff6c147432aa767c93" ]
[ "lsdr/envs/analysis.py" ]
[ "import numpy as np\nimport torch\nimport matplotlib.pyplot as plt\nimport os\nimport math\nimport scipy.stats as stats\nimport lsdr.envs.environment_sampler as env_sampler\nfrom enum import IntEnum\n\n\n############################\n# Optimization Loss Opt\n############################\nclass Objectives(IntEnum):\...
[ [ "torch.optim.Adam", "matplotlib.pyplot.legend", "torch.Size", "torch.distributions.MultivariateNormal", "numpy.sqrt", "numpy.linspace", "scipy.stats.norm.pdf", "numpy.asarray", "numpy.arange", "numpy.eye", "matplotlib.pyplot.savefig", "torch.tensor", "numpy.copy...
ImperialCollegeLondon/al_cfd_benchmark
[ "03b51d7e7d4def804e2ac18084deee8401636851", "03b51d7e7d4def804e2ac18084deee8401636851" ]
[ "examples/pitz_daily/pitz_daily_runner.py", "cases/mixer3D/mixer_reference_2.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Pitz Daily\n\nThis case uses the pitzDaily example from the OpenFOAM tutorials \nand varies two parameters: Reynolds number and height of the inlet. \nIt returns the pressure difference between inlet and outlet.\n\n\"\"\"\n\nimport numpy as np\nfrom active_learning_cfd.cfd_case impor...
[ [ "numpy.log10", "numpy.power" ], [ "numpy.savetxt", "numpy.log", "numpy.array", "numpy.random.seed" ] ]
li-ziang/cogdl
[ "60022d3334e3abae2d2a505e6e049a26acf10f39", "60022d3334e3abae2d2a505e6e049a26acf10f39", "60022d3334e3abae2d2a505e6e049a26acf10f39", "60022d3334e3abae2d2a505e6e049a26acf10f39", "60022d3334e3abae2d2a505e6e049a26acf10f39" ]
[ "cogdl/oag/dual_position_bert_model.py", "cogdl/utils/evaluator.py", "cogdl/models/nn/diffpool.py", "cogdl/models/nn/ppnp.py", "cogdl/models/nn/daegc.py" ]
[ "import torch\nfrom torch import nn\nfrom torch.nn import CrossEntropyLoss\nimport logging\nfrom .bert_model import BertPreTrainedModel, BertPreTrainingHeads, BertModel, BertEncoder, BertPooler, BertLayerNorm\n\n\nlogger = logging.getLogger(__name__)\n\n\nclass DualPositionBertEmbeddings(nn.Module):\n \"\"\"Cons...
[ [ "torch.nn.CrossEntropyLoss", "torch.nn.Dropout", "torch.zeros_like", "torch.nn.Embedding", "torch.ones_like" ], [ "torch.mean", "torch.nn.functional.nll_loss", "torch.nn.functional.log_softmax", "torch.cat", "torch.is_tensor", "torch.nn.BCEWithLogitsLoss", "skle...
QinHan-Erin/AMOS
[ "634bf48edf4015e4a69a8c32d49b96bce2b5f16f", "634bf48edf4015e4a69a8c32d49b96bce2b5f16f", "634bf48edf4015e4a69a8c32d49b96bce2b5f16f" ]
[ "python/tvm/tensor_graph/testing/relay_examples/lenet.py", "python/tvm/tensor_graph/testing/tensorflow2_examples/MILSTM.py", "tests/python/tensor_graph/test/test_tvm/performance/build_time.py" ]
[ "import tvm\nimport numpy as np\nfrom tvm import relay\nfrom tvm.relay.testing import run_infer_type, gradient\n\ndef get_lenet(batch_size,\n num_classes=10,\n image_shape=(1, 28, 28),\n dtype=\"float32\"):\n \"\"\"Get lenet funciton\n\n Parameters\n ----------\n batch_s...
[ [ "numpy.zeros", "numpy.random.seed" ], [ "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.shape", "tensorflow.keras.layers.Dense", "numpy.median", "tensorflow.python.keras.activations.sigmoid", "tensorflow.function", "numpy.random.randn", "tensorflow.python...
chen1i/fedlearner
[ "981514dadbd0aa49ae87d185dd247d310e35605c", "981514dadbd0aa49ae87d185dd247d310e35605c" ]
[ "test/data_join/test_data_block_dumper.py", "fedlearner/trainer/bridge.py" ]
[ "# Copyright 2020 The FedLearner Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.compat.v1.train.BytesList", "tensorflow.compat.v1.gfile.Remove", "tensorflow.compat.v1.gfile.ListDirectory", "tensorflow.compat.v1.gfile.Exists", "tensorflow.compat.v1.enable_eager_execution", "tensorflow.compat.v1.io.tf_record_iterator", "tensorflow.compat.v1.train.Int64Li...
ctralie/GeometricBeatTracking
[ "2c35183f638c4afb51808c09e46da0f74384cba6", "2c35183f638c4afb51808c09e46da0f74384cba6", "2c35183f638c4afb51808c09e46da0f74384cba6" ]
[ "TheoryValidation/CirculantGraphs.py", "MetricalHierarchies.py", "SoundTools.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport scipy.sparse as sparse\nimport sys\nsys.path.append(\"..\")\nfrom Laplacian import *\n\ndef getCirculantAdj(N, lags):\n #Setup circular parts\n I = range(N)*(len(lags)+2)\n J = range(1, N+1) + range(-1, N-1)\n J[N-1] = 0\n J[N] = N-1\n f...
[ [ "matplotlib.pyplot.imshow", "scipy.sparse.coo_matrix", "matplotlib.pyplot.title", "numpy.arange", "numpy.cos", "matplotlib.pyplot.savefig", "numpy.sort", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.subplot", "matplotlib.pyplot.xlabel", "...
adrienycart/PEAMT
[ "d3ae41e86dedeb64fcf54e2454c9feee993574f9" ]
[ "peamt/features/polyphony.py" ]
[ "import numpy as np\n\n\n########################################\n### Polyphony --- discarded\n########################################\n\ndef polyphony_level_diff(roll_output,roll_target):\n poly_output = np.sum(roll_output,axis=0)\n poly_target = np.sum(roll_target,axis=0)\n\n poly_diff = np.abs(poly_ou...
[ [ "numpy.abs", "numpy.min", "numpy.max", "numpy.std", "numpy.mean", "numpy.sum" ] ]
KnowingNothing/akg-test
[ "114d8626b824b9a31af50a482afc07ab7121862b", "114d8626b824b9a31af50a482afc07ab7121862b", "114d8626b824b9a31af50a482afc07ab7121862b", "114d8626b824b9a31af50a482afc07ab7121862b", "114d8626b824b9a31af50a482afc07ab7121862b", "114d8626b824b9a31af50a482afc07ab7121862b", "114d8626b824b9a31af50a482afc07ab7121862...
[ "tests/common/test_run/round_run.py", "tests/operators/test_op/test_fused_mul_div_rsqrt_mul_isfinite_red.py", "tests/common/test_run/col2im_run.py", "tests/st/ops/gpu/test_ms_trans_data.py", "tests/operators/test_op/test_ms_less_equal.py", "tests/common/test_run/conv_filter_ad_run.py", "tests/common/tes...
[ "# Copyright 2019 Huawei Technologies Co., Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l...
[ [ "numpy.round", "numpy.full" ], [ "numpy.sqrt", "numpy.isfinite", "numpy.multiply", "numpy.logical_and.reduce", "numpy.full", "numpy.divide" ], [ "numpy.zeros", "numpy.full" ], [ "numpy.full" ], [ "numpy.less_equal", "numpy.full" ], [ "num...
rise-lang/iree
[ "46ad3fe392d38ce3df6eff7826cc1ab331a40b72" ]
[ "integrations/tensorflow/e2e/conv_test.py" ]
[ "# Lint as: python3\n# Copyright 2019 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 appl...
[ [ "tensorflow.compat.v2.test.main", "tensorflow.compat.v2.nn.conv2d", "numpy.arange", "tensorflow.compat.v2.enable_v2_behavior", "numpy.ones", "numpy.array", "tensorflow.compat.v2.TensorSpec" ] ]
bruinxiong/fedlearner
[ "9cdeaf44b279acedd5bc88bbffd4a390697b06aa" ]
[ "fedlearner/trainer/estimator.py" ]
[ "# Copyright 2020 The FedLearner Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.compat.v1.metrics.mean", "tensorflow.compat.v1.train.MonitoredTrainingSession", "tensorflow.compat.v1.no_op", "tensorflow.compat.v1.group", "tensorflow.compat.v1.train.Scaffold", "tensorflow.compat.v1.train.MonitoredSession", "tensorflow.compat.v1.train.replica_device_sette...
Nazukixv/OpenNMT-py
[ "6265ddbbe9053b018714ac1fb4be9ec8adbaa128" ]
[ "onmt/model_builder.py" ]
[ "\"\"\"\nThis file is for models creation, which consults options\nand creates each encoder and decoder accordingly.\n\"\"\"\nimport re\nimport torch\nimport torch.nn as nn\nfrom torch.nn.init import xavier_uniform_\n\nimport onmt.inputters as inputters\nimport onmt.modules\nfrom onmt.encoders.rnn_encoder import RN...
[ [ "torch.device", "torch.nn.init.xavier_uniform_", "torch.nn.LogSoftmax", "torch.load" ] ]
eepsmedia/ping-pong-bounce
[ "8e06363032da88976f14146704af26d9312d195a" ]
[ "code/extractWAVdata.py" ]
[ "\"\"\"Convert a .wav file to .csv\n\nUses the `wave` package to convert a .wav file to a .csv. \nAssumes that the file is monoaural (one channel).\n\nBe sure to edit the code to point to correct values of `inFileName` and `outFileName`\n\"\"\"\n\nimport wave\nimport numpy\n\ninFileName = \"../data/pingpong.wav\"\n...
[ [ "numpy.dtype" ] ]
m4rkl1u/tensorflow
[ "90a8825c7ae9719e8969d45040b4155b0e7de130", "90a8825c7ae9719e8969d45040b4155b0e7de130", "90a8825c7ae9719e8969d45040b4155b0e7de130", "90a8825c7ae9719e8969d45040b4155b0e7de130" ]
[ "tensorflow/python/ops/variables.py", "tensorflow/python/kernel_tests/random/multinomial_op_test.py", "tensorflow/python/kernel_tests/unicode_transcode_op_test.py", "tensorflow/python/keras/optimizer_v2/gradient_descent.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.ops.array_ops.constant", "tensorflow.python.ops.state_ops.assign_add", "tensorflow.python.ops.array_ops.split", "tensorflow.python.ops.gen_state_ops.scatter_nd_update", "tensorflow.python.ops.state_ops.assign_sub", "tensorflow.python.framework.ops.register_dense_tensor_l...
johnnylord/trytry-segmentation
[ "a88d75571ddba92bd10ac2d7303bee9426188b62" ]
[ "agent/segmentation.py" ]
[ "import os\nimport os.path as osp\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torchvision.transforms as T\nfrom torch.utils.data import DataLoader\nfrom tensorboardX import SummaryWriter\n\nfrom data.segmentation import SegmentDataset\nfrom model.segmentation.fcn ...
[ [ "torch.nn.CrossEntropyLoss", "torch.load", "torch.utils.data.DataLoader", "torch.no_grad", "torch.cuda.is_available", "torch.device", "numpy.sum", "numpy.vstack", "torch.save" ] ]
BradyBromley/DeepCTR
[ "3d12ffc0e0a5e893dce8bd315824c180445b772e" ]
[ "deepctr/models/din.py" ]
[ "# -*- coding:utf-8 -*-\n\"\"\"\nAuthor:\n Weichen Shen,wcshen1994@163.com\n\nReference:\n [1] Zhou G, Zhu X, Song C, et al. Deep interest network for click-through rate prediction[C]//Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. ACM, 2018: 1059-1068. (http...
[ [ "tensorflow.python.keras.layers.Concatenate", "tensorflow.python.keras.models.Model", "tensorflow.python.keras.layers.Flatten", "tensorflow.python.keras.layers.Dense" ] ]
bernssolg/pyntcloud-master
[ "84cf000b7a7f69a2c1b36f9624f05f65160bf992", "84cf000b7a7f69a2c1b36f9624f05f65160bf992", "84cf000b7a7f69a2c1b36f9624f05f65160bf992" ]
[ "pyntcloud/structures/kdtree.py", "pyntcloud/samplers/mesh.py", "tests/unit/filters/test_xyz_filters.py" ]
[ "from scipy.spatial import cKDTree\n\nfrom .base import Structure\n\n\nclass KDTree(cKDTree, Structure):\n\n def __init__(self, *, points, leafsize=16, compact_nodes=False, balanced_tree=False):\n Structure.__init__(self, points=points)\n self._leafsize = leafsize\n self._compact_nodes = com...
[ [ "scipy.spatial.cKDTree.__init__" ], [ "numpy.random.uniform", "numpy.linalg.norm", "numpy.sum", "pandas.DataFrame" ], [ "numpy.testing.assert_array_equal" ] ]
bhargavyagnik/FaceMaskDetection
[ "990c41a921a2a8a7760492a8dd21e4ab51391e51" ]
[ "facemask.py" ]
[ "import tensorflow as tf\r\nimport cv2\r\nimport numpy as np\r\n\r\nmodel = tf.keras.models.load_model('saved_model/model_3.h5')\r\nface_clsfr = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')\r\n\r\nsource = cv2.VideoCapture(1)\r\n\r\nlabels_dict = {0: 'with_mask', 1: 'without_mask'}\r\ncolor_dict = {...
[ [ "numpy.reshape", "tensorflow.keras.models.load_model" ] ]
nlpming/tensorflow-DSMM
[ "dc982cc49bf03f474da2895e4dd4fb37061c0271", "dc982cc49bf03f474da2895e4dd4fb37061c0271" ]
[ "dssm/data_input.py", "dssm/dssm.py" ]
[ "#!/usr/bin/env python\n# encoding=utf-8\nfrom inspect import getblock\nimport json\nimport os\nfrom os import read\nfrom numpy.core.fromnumeric import mean\nimport numpy as np\nimport paddlehub as hub\nimport six\nimport math\nimport random\nimport sys\nfrom util import read_file\nfrom config import Config\n# 配置文件...
[ [ "numpy.mean", "numpy.zeros", "numpy.core.fromnumeric.mean" ], [ "numpy.sqrt", "tensorflow.control_dependencies", "tensorflow.reduce_sum", "tensorflow.nn.sigmoid_cross_entropy_with_logits", "tensorflow.train.ExponentialMovingAverage", "tensorflow.train.AdamOptimizer", "t...
baagaard-usgs/groundmotion-processing
[ "6be2b4460d598bba0935135efa85af2655578565", "6be2b4460d598bba0935135efa85af2655578565", "6be2b4460d598bba0935135efa85af2655578565" ]
[ "gmprocess/waveform_processing/clipping/clipping_check.py", "tests/gmprocess/waveform_processing/corner_frequencies_test.py", "tests/gmprocess/metrics/imc/radial_transverse_test.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport numpy as np\n\nfrom obspy.geodetics.base import gps2dist_azimuth\n\nfrom gmprocess.waveform_processing.clipping.clipping_ann import clipNet\nfrom gmprocess.waveform_processing.clipping.max_amp import Max_Amp\nfrom gmprocess.waveform_processing.clipping.histo...
[ [ "numpy.clip" ], [ "numpy.sort" ], [ "numpy.isnan", "numpy.testing.assert_almost_equal" ] ]
HKUST-KnowComp/HPHG
[ "48b704b28c217e4590edf4dd3c7825495dffb76e" ]
[ "src/hypergraph.py" ]
[ "import numpy as np\nfrom tqdm import tqdm\n\n\nclass Hypergraph(object):\n def __init__(self,graph_type='0',nums_type=None):\n self._nodes = {} # node set\n self._edges = {} # edge set (hash index)\n self.graph_type = graph_type # graph type, homogeneous:0, heterogeneous:1\n self....
[ [ "numpy.cumsum", "numpy.random.randint" ] ]
pingsutw/tfx
[ "bf0d1d74e3f6ea429989fc7b80b82bea08077857", "bf0d1d74e3f6ea429989fc7b80b82bea08077857", "bf0d1d74e3f6ea429989fc7b80b82bea08077857" ]
[ "tfx/components/example_gen/base_example_gen_executor_test.py", "tfx/components/example_gen/csv_example_gen/component_test.py", "tfx/examples/custom_components/tuner/example/iris_utils.py" ]
[ "# Lint as: python2, python3\n# Copyright 2019 Google LLC. 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\...
[ [ "tensorflow.train.Feature", "tensorflow.io.gfile.exists", "tensorflow.io.gfile.GFile", "tensorflow.test.main", "tensorflow.train.Features", "tensorflow.train.Int64List" ], [ "tensorflow.test.main" ], [ "tensorflow.estimator.export.build_parsing_serving_input_receiver_fn", ...
uta-smile/CD-MVGNN
[ "b48f4cd14befed298980a83edb417ab6809f0af6", "b48f4cd14befed298980a83edb417ab6809f0af6", "b48f4cd14befed298980a83edb417ab6809f0af6", "b48f4cd14befed298980a83edb417ab6809f0af6", "b48f4cd14befed298980a83edb417ab6809f0af6" ]
[ "service/moleprop.py", "dglt/contrib/moses/moses/model/gvae/model_cvae.py", "dglt/data/featurization/mol2graph.py", "dglt/contrib/grover/mol2features.py", "dglt/models/zoo/VAE.py" ]
[ "import os\nimport time\nimport math\nimport numpy as np\nimport torch\n\n# torch.multiprocessing.set_start_method('spawn')\ntorch.multiprocessing.set_start_method('forkserver', force=True)\nimport torch.nn as nn\nfrom torch.utils.data import DataLoader\nfrom tqdm import tqdm\nfrom argparse import Namespace\nfrom t...
[ [ "torch.multiprocessing.set_start_method", "numpy.array", "torch.utils.data.DataLoader", "torch.no_grad" ], [ "torch.randn_like", "torch.nn.Softmax", "torch.transpose", "torch.zeros", "torch.randn", "torch.nn.ModuleList", "torch.nn.GRU", "torch.tensor", "torc...
ipovalyaev/events
[ "64ec6324368dd21f9cedd464304eed01e1737024" ]
[ "cv-competition-1/pytorch_baseline/compute_overlaps_np.py" ]
[ "import time\nimport numpy as np\nfrom compute_overlap import compute_overlap\n\n\ndef compute_overlap_np(a: np.array, b: np.array) -> np.array:\n \"\"\"\n Args\n a: (N, 4) ndarray of float [xmin, ymin, xmax, ymax]\n b: (K, 4) ndarray of float [xmin, ymin, xmax, ymax]\n\n Returns\n ove...
[ [ "numpy.array", "numpy.zeros", "numpy.array_equal", "numpy.random.randint" ] ]
wesleytao/Checkers-Reinforcement-Learning
[ "80d45f1c29fb7cd4503cdadedf344267553cad31" ]
[ "policy_value_net_numpy.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nImplement the policy value network using numpy, so that we can play with the\ntrained AI model without installing any DL framwork\n\n@author: Junxiao Song\n\"\"\"\n\nfrom __future__ import print_function\nimport numpy as np\n\n\n# some utility functions\ndef softmax(x):\n probs ...
[ [ "numpy.dot", "numpy.maximum", "numpy.pad", "numpy.arange", "numpy.tile", "numpy.max", "numpy.sum" ] ]
arvincsh/multiobjectdetection
[ "26b4d43ce981a7a4cd031611df70b8f7c08757df" ]
[ "yolo_app/etc/commons/opencv_helpers.py" ]
[ "import cv2\nimport numpy as np\nfrom math import sqrt\nfrom scipy.spatial import distance\nfrom yolo_app.etc.config import config\n\n\ndef crop_image(save_path, img, xywh):\n x = xywh[0]\n y = xywh[1]\n w = xywh[2]\n h = xywh[3]\n crop_img = img[y:y + h, x:x + w]\n cv2.imwrite(save_path, crop_img...
[ [ "numpy.asarray", "scipy.spatial.distance.cityblock", "numpy.zeros_like" ] ]
MilesQLi/highway-networks
[ "de1875c33e311c12df7dc33decda67706dbf250a" ]
[ "python/caffe/detector.py" ]
[ "#!/usr/bin/env python\n\"\"\"\nDo windowed detection by classifying a number of images/crops at once,\noptionally using the selective search window proposal method.\n\nThis implementation follows ideas in\n Ross Girshick, Jeff Donahue, Trevor Darrell, Jitendra Malik.\n Rich feature hierarchies for accurate o...
[ [ "numpy.clip", "numpy.tile", "numpy.ones", "numpy.array", "numpy.zeros" ] ]
geometrikal/tensorflow_models
[ "44a82f3f18a2e62b1cd99b94922f752be0672f46" ]
[ "research/object_detection/training/TFLite_detection_video.py" ]
[ "######## Webcam Object Detection Using Tensorflow-trained Classifier #########\n#\n# Author: Evan Juras\n# Date: 10/2/19\n# Description: \n# This program uses a TensorFlow Lite model to perform object detection on a\n# video. It draws boxes and scores around the objects of interest in each frame\n# from the video....
[ [ "numpy.expand_dims", "tensorflow.lite.python.interpreter.Interpreter", "numpy.float32", "tensorflow.lite.python.interpreter.load_delegate" ] ]
RuoyuX-2018/6998DL
[ "a9b75ee63a92c6824db9ac25cc6d931713e0cae5" ]
[ "my_test/get_graph.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Apr 14 15:47:45 2021\n\n@author: xuery\n\"\"\"\n\nimport cv2\nimport time\nimport numpy as np\nimport os\nimport copy\nimport pickle\nimport random\nimport math\nimport matplotlib.pyplot as plt\nfrom scipy import spatial\nfrom skimage import m...
[ [ "numpy.dot", "matplotlib.pyplot.scatter", "numpy.linalg.norm", "numpy.arccos", "matplotlib.pyplot.plot", "numpy.all", "numpy.delete", "scipy.spatial.KDTree", "numpy.zeros_like", "numpy.array", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
HotaekHan/FCOS
[ "8e3a0438cf1a53f8916d21ea81d892b260c100a9" ]
[ "datagen.py" ]
[ "'''Load image/labels/boxes from an annotation file.\n\nThe list file is like:\n\n img.jpg width height xmin ymin xmax ymax label xmin ymin xmax ymax label ...\n'''\nimport random\nimport numpy as np\nimport json\nimport os\n# from PIL import Image, ImageDraw, ImageFile\n# ImageFile.LOAD_TRUNCATED_IMAGES = True\...
[ [ "numpy.random.seed", "torch.zeros", "numpy.ascontiguousarray", "torch.manual_seed", "numpy.uint8", "torch.utils.data.DataLoader", "numpy.random.shuffle", "torch.tensor", "numpy.transpose", "torch.stack", "numpy.random.randint" ] ]
edawson/SigProfilerMatrixGenerator
[ "bd6d3bb15e87805cdc7e771c3fdd886f4a9fc29b" ]
[ "SigProfilerMatrixGenerator/install.py" ]
[ "#!/usr/bin/env python3\n\n#Author: Erik Bergstrom\n\n#Contact: ebergstr@eng.ucsd.edu\n\nfrom __future__ import print_function\nimport os\nimport sys\nimport re\nimport subprocess\nimport argparse\nimport time\nfrom scipy import spatial\nimport pandas as pd\nimport shutil\nimport logging\nimport hashlib\nfrom SigPr...
[ [ "pandas.read_csv", "scipy.spatial.distance.cosine" ] ]
AnaharaYasuo/mlPractice
[ "1a3d110fdc6cf4084ee6b1268d215151de5939cb", "1a3d110fdc6cf4084ee6b1268d215151de5939cb" ]
[ "src/subplot1.py", "src/contour1.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\nif __name__ == \"__main__\":\n x = np.linspace(-5, 5, 300)\n sin_x = np.sin(x)\n cos_x = np.cos(x)\n \n flg, aexs = plt.subplots(2, 1)\n aexs[0].set_ylim([-1.5,1.5])\n aexs[1].set_ylim([-1.5,1.5])\n aexs[0].plot(x,sin_x,color=\"r\") ...
[ [ "numpy.linspace", "matplotlib.pyplot.subplots", "numpy.cos", "numpy.sin", "matplotlib.pyplot.show" ], [ "numpy.meshgrid", "matplotlib.pyplot.contour", "matplotlib.pyplot.show", "numpy.linspace" ] ]
Saran-nns/sorn
[ "619772c508b88aa711780ab9155fe5d0aa5214eb" ]
[ "sorn/utils.py" ]
[ "from __future__ import division\nimport numpy as np\nfrom scipy.stats import norm\nimport random\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom scipy.optimize import curve_fit\nfrom scipy import stats\nimport networkx as nx\nimport pandas as pd\nfrom mpl_toolkits.axes_grid1.inset_locator import Inse...
[ [ "matplotlib.pyplot.legend", "numpy.split", "numpy.expand_dims", "numpy.asarray", "pandas.DataFrame", "matplotlib.pyplot.plot", "numpy.max", "numpy.zeros_like", "numpy.mean", "numpy.var", "numpy.exp", "numpy.where", "scipy.optimize.curve_fit", "numpy.histogra...
kc611/aeppl
[ "d24eee80a7448c48b55a8ec41aec150d1dd9d6a7" ]
[ "tests/test_joint_logprob.py" ]
[ "import aesara\nimport aesara.tensor as at\nimport numpy as np\nimport pytest\nimport scipy.stats.distributions as sp\nfrom aesara.graph.basic import Apply, ancestors, equal_computations\nfrom aesara.graph.op import Op\nfrom aesara.tensor.subtensor import (\n AdvancedIncSubtensor,\n AdvancedIncSubtensor1,\n ...
[ [ "scipy.stats.distributions.bernoulli", "numpy.stack", "numpy.testing.assert_almost_equal", "numpy.random.normal", "scipy.stats.distributions.norm", "numpy.prod", "scipy.stats.distributions.norm.logpdf", "numpy.array", "numpy.random.RandomState" ] ]
sanils2002/PYTHON-CODES
[ "607fadc2cba4b185a5529bd101faefa08f4c3469" ]
[ "Codes-B/matplotlib-py-files/matplot-image.py" ]
[ "# importing required libraries\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib.image as img\r\n\r\n# reading the image\r\ntestImage = img.imread('g4g.png')\r\n\r\n# displaying the image\r\nplt.imshow(testImage)\r\n\r\n# displaying the image as an array\r\nprint(testImage)\r\n\r\n###########################...
[ [ "matplotlib.image.imread", "matplotlib.pyplot.imshow" ] ]
czgdp1807/numpy
[ "e4894aef5c93c845081388818a2eb4264c5e1d72" ]
[ "numpy/random/tests/test_generator_mt19937.py" ]
[ "import sys\nimport hashlib\n\nimport pytest\n\nimport numpy as np\nfrom numpy.linalg import LinAlgError\nfrom numpy.testing import (\n assert_, assert_raises, assert_equal, assert_allclose,\n assert_warns, assert_no_warnings, assert_array_equal,\n assert_array_almost_equal, suppress_warnings)\n\nfrom nump...
[ [ "numpy.random.MT19937", "numpy.testing.assert_no_warnings", "numpy.asarray", "numpy.vstack", "numpy.dtype", "numpy.all", "numpy.iinfo", "numpy.nextafter", "numpy.testing.assert_equal", "numpy.uint32", "numpy.unique", "numpy.testing.suppress_warnings", "numpy.ara...
daobook/ray
[ "c18caa4db36d466718bdbcb2229aa0b2dc03da1f", "af9f1ef4dc160e0671206556b387f8017f3c3930", "af9f1ef4dc160e0671206556b387f8017f3c3930" ]
[ "rllib/examples/env/parametric_actions_cartpole.py", "rllib/env/vector_env.py", "release/nightly_tests/dataset/ray_sgd_training.py" ]
[ "import gym\nfrom gym.spaces import Box, Dict, Discrete\nimport numpy as np\nimport random\n\n\nclass ParametricActionsCartPole(gym.Env):\n \"\"\"Parametric action version of CartPole.\n\n In this env there are only ever two valid actions, but we pretend there are\n actually up to `max_avail_actions` actio...
[ [ "numpy.array", "numpy.random.randn" ], [ "numpy.isfinite", "numpy.isreal", "numpy.isscalar" ], [ "torch.nn.Dropout", "torch.sigmoid", "torch.nn.Linear", "torch.nn.BCEWithLogitsLoss", "torch.no_grad", "torch.utils.tensorboard.SummaryWriter", "torch.cuda.is_av...
stelselim/python-control
[ "d73b635d2b130af5c2829eefd59c99b9bd53fb01", "d73b635d2b130af5c2829eefd59c99b9bd53fb01" ]
[ "doc/pvtol-nested.py", "control/margins.py" ]
[ "# pvtol-nested.py - inner/outer design for vectored thrust aircraft\n# RMM, 5 Sep 09\n#\n# This file works through a fairly complicated control design and\n# analysis, corresponding to the planar vertical takeoff and landing\n# (PVTOL) aircraft in Astrom and Murray, Chapter 11. It is intended\n# to demonstrate th...
[ [ "numpy.linspace", "numpy.logspace", "matplotlib.pyplot.figure", "numpy.squeeze", "matplotlib.pyplot.gcf", "matplotlib.pyplot.plot", "matplotlib.pyplot.clf", "matplotlib.pyplot.subplot", "numpy.log10", "matplotlib.pyplot.axis", "matplotlib.pyplot.xlabel", "matplotlib...
machineko/jax
[ "1e3c4833c97302caf6046ff99656b8ff21430b8d" ]
[ "tests/jet_test.py" ]
[ "# Copyright 2020 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.random.RandomState" ] ]
bpbpublications/Time-Series-Forecasting-using-Deep-Learning
[ "fd84553d33e912edb4a1400af0f9374e72747457", "fd84553d33e912edb4a1400af0f9374e72747457", "fd84553d33e912edb4a1400af0f9374e72747457" ]
[ "Chapter 05/enc_dec/model.py", "Chapter 05/tcn/example.py", "Chapter 02/dfdx/function.py" ]
[ "import numpy as np\nimport random\nimport torch\nimport torch.nn as nn\nfrom torch import optim\n\n\nclass Encoder(nn.Module):\n\n def __init__(self, input_size, hidden_size, num_layers = 1):\n super(Encoder, self).__init__()\n self.input_size = input_size\n self.hidden_size = hidden_size\n...
[ [ "torch.zeros", "torch.nn.LSTM", "numpy.full", "torch.nn.Linear", "torch.nn.MSELoss" ], [ "matplotlib.pyplot.legend", "numpy.random.seed", "matplotlib.pyplot.title", "torch.manual_seed", "matplotlib.pyplot.yscale", "matplotlib.pyplot.plot", "matplotlib.pyplot.xla...
Challenging6/YoloDB
[ "bdc1c4239ec112c21a65df64b9f4dc8447b739fa", "bdc1c4239ec112c21a65df64b9f4dc8447b739fa" ]
[ "dataset/processes/make_center_points.py", "dataset/processes/resize_image.py" ]
[ "import numpy as np\n\n#from concern.config import State\nfrom .data_process import DataProcess\n\n\nclass MakeCenterPoints(DataProcess):\n box_key = 'charboxes'\n size = 32\n\n def process(self, data):\n shape = data['image'].shape[:2]\n points = np.zeros((self.size, 2), dtype=np.float32)\n ...
[ [ "numpy.array", "numpy.zeros" ], [ "numpy.zeros" ] ]
BAD-Classifier/Signal-Processing
[ "8163657fb8b8e1ec32ea299a5b4cda9473b91fd0", "8163657fb8b8e1ec32ea299a5b4cda9473b91fd0" ]
[ "Noise Elimination/mean_elimination_script.py", "Signal Splitting/signal_split.py" ]
[ "import numpy\nimport librosa\nimport glob\nimport os\nimport shutil\n\nfull_clips = glob.glob(\"Full_Clips/*.mp3\")\nprint(\"Number of full clips: \" + str(len(full_clips)))\n\nfor clip in full_clips:\n clip_name = clip[11:]\n print(\"Current clip: \" + clip_name)\n signal, fs = librosa.load(clip)\n si...
[ [ "numpy.absolute", "numpy.mean", "numpy.abs" ], [ "sklearn.preprocessing.scale", "matplotlib.pyplot.savefig" ] ]
bartekx43/AlphaTTT
[ "a01c38833a7f841483146bebeef73323d527d812" ]
[ "alphazero/mcts.py" ]
[ "import os\nimport sys\nimport math\nimport random\nimport numpy as np\nfrom copy import deepcopy\n\nsys.path.append(os.path.join(os.environ[\"HOME\"], \"AlphaTTT\"))\n\nfrom environment import Environment\n\nfrom alphazero.database import prepare_state\n\nnp.random.seed(80085)\nrandom.seed(80085)\n\ndef PUCT_score...
[ [ "numpy.unravel_index", "numpy.random.seed", "numpy.power", "numpy.argmax", "numpy.zeros", "numpy.sum" ] ]
SultanAbuGhazal/3detr
[ "f9725ae655c6ced290c3ec2c53c07566350270f4" ]
[ "main.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n\nimport argparse\nimport os\nimport sys\nimport pickle\n\nimport numpy as np\nimport torch\nfrom torch.multiprocessing import set_start_method\nfrom torch.utils.data import DataLoader, DistributedSampler\n\n# 3DETR codebase specific imports\nfrom datasets import...
[ [ "torch.multiprocessing.set_start_method", "torch.utils.data.DistributedSampler", "torch.cuda.set_device", "torch.multiprocessing.spawn", "torch.utils.data.SequentialSampler", "torch.utils.data.DataLoader", "torch.utils.data.RandomSampler", "torch.nn.SyncBatchNorm.convert_sync_batch...
muglyon/https-github.com-muglyon-DCOP-Decentralised-Control-of-Intelligent-Devices
[ "68cb868a0875f5e119ac0dbea024c17d241347ac" ]
[ "app/features/steps/value_propagation_test.py" ]
[ "#! python3\n# value_propagation_test.py - Test the VALUE Propagation behavior\n\nfrom behave import *\nfrom hamcrest import *\n\nimport numpy\n\n\n@when('get VALUE from parent after UTIL propagation')\ndef step_impl(context):\n set_up(context)\n context.dpop_to_test.util_manager.JOIN = context.util_matrix\n\...
[ [ "numpy.asmatrix", "numpy.arange" ] ]
sdpython/manyapi
[ "dc2aadc58a5d72904f95424dbe57bb832d3ccd73" ]
[ "_unittests/ut_plotting/test_dummy.py" ]
[ "\"\"\"\n@brief test log(time=13s)\n\"\"\"\nimport unittest\nfrom pyquickhelper.pycode import ExtTestCase\nfrom manydataapi.plotting import plot_aggregated_ts, daily_timeseries\n\n\nclass TestDummm(ExtTestCase):\n\n def test_agg_raise(self):\n df = daily_timeseries()\n\n from matplotlib import...
[ [ "matplotlib.pyplot.subplots", "matplotlib.pyplot.close" ] ]
irisTa56/ease4lmp
[ "0ad69632fbe0d8c2a55e58af13efd7be1d566394" ]
[ "tests/test_lammps_cycle.py" ]
[ "import unittest\n\nfrom ease4lmp import (\n BondedAtoms, LammpsWriter,\n create_atoms_from_data, create_atoms_from_molecule)\n\nfrom ase.build import bulk, molecule\n\nimport numpy as np\n\nimport os\nimport itertools\n\n\ndef write_files(atoms):\n writer = LammpsWriter(atoms, atom_style=\"molecular\")\n\n wri...
[ [ "numpy.array", "numpy.linalg.norm" ] ]