repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
DJT777/Tensorrt_Detection_With-SQL
[ "7762eb832af926861f9a6116f9dbc79280e177f3" ]
[ "tracklite/yolov3_tiny_to_onnx.py" ]
[ "#\n# Copyright 1993-2019 NVIDIA Corporation. All rights reserved.\n#\n# NOTICE TO LICENSEE:\n#\n# This source code and/or documentation (\"Licensed Deliverables\") are\n# subject to NVIDIA intellectual property rights under U.S. and\n# international Copyright laws.\n#\n# These Licensed Deliverables contained here...
[ [ "numpy.array" ] ]
Lando-L/code-embeddings
[ "1506b55e6f43a7a843a8d66cbaaa4cb9800a2112" ]
[ "src/training/loss.py" ]
[ "import tensorflow as tf\n\n\"\"\"\nTaken from: https://www.tensorflow.org/tutorials/text/transformer\n\"\"\"\n\nLOSS_OBJECT = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True, reduction='none')\n\ndef loss_function(real, pred):\n mask = tf.math.logical_not(tf.math.equal(real, 0))\n loss_ = LOSS...
[ [ "tensorflow.reduce_sum", "tensorflow.keras.losses.SparseCategoricalCrossentropy", "tensorflow.math.equal", "tensorflow.cast" ] ]
dooglewoogle/pystiche
[ "14b61123ede2abdb00daaa5b4981de6d7edaf034" ]
[ "tests/integration/test_optim.py" ]
[ "import sys\n\nimport pytest\nimport pytorch_testing_utils as ptu\n\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\nfrom torch.utils import data\n\nfrom pystiche import loss, ops, optim\n\nfrom tests import mocks\n\nskip_if_py38 = pytest.mark.skipif(\n sys.version_info >= (3, 8),\n reaso...
[ [ "torch.zeros", "torch.rand", "torch.rand_like", "torch.manual_seed", "torch.nn.functional.mse_loss", "torch.nn.Conv2d", "torch.nn.Module", "torch.empty" ] ]
Xavierxhq/fruit_identification
[ "54cdf2c3e0aad26ae98b081e44ad1655b6f0a758" ]
[ "triplet_tester.py" ]
[ "import torch\nfrom models.networks import get_baseline_model\nfrom datasets import data_loader\nfrom torch.autograd import Variable\nfrom utils.transforms import TestTransform\nimport numpy as np\nimport os\nimport re\nimport sys\nimport shutil\nimport pickle\nimport time\nfrom get_xls_from_map import init_dict\n\...
[ [ "numpy.array", "torch.cuda.manual_seed", "numpy.nditer", "numpy.zeros", "torch.FloatTensor", "torch.from_numpy", "torch.load", "torch.pow" ] ]
20zinnm/datasets
[ "fb82e5d32845f465f0f5db6b1293da73ba1e9bd6" ]
[ "tensorflow_datasets/core/registered.py" ]
[ "# coding=utf-8\n# Copyright 2019 The TensorFlow Datasets 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 ...
[ [ "tensorflow.compat.as_text" ] ]
kianho/sentiment-playground
[ "9327afcbe18d92b12c4ca0ec5f39a22b3557b0d1" ]
[ "experiments/make_train_data.py" ]
[ "#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"\n\nDate:\n Sat Feb 14 17:13:48 AEDT 2015\n\nAuthor:\n Kian Ho <hui.kian.ho@gmail.com>\n\nDescription:\n Read a list of paths to text files from stdin and concatenate their contents\n into a minimal-quoted csv format.\n\nUsage:\n make_train_data.py --l...
[ [ "pandas.DataFrame.from_records" ] ]
raviqqe/simple-entity-recognition
[ "2649a62e2dd0a8886077b14830a3f4c095f87e2c" ]
[ "entrec/char_rnn_test.py" ]
[ "import tensorflow as tf\n\nfrom .char_rnn import char_rnn\n\n\ndef test_char_rnn():\n for i, (sentence_shape, labels_shape) in enumerate([\n [[11, 64, 8], [11, 64]],\n [[None, 64, 8], [None, 64]],\n [[None, None, 8], [None, None]],\n [[None, None, None], [None, None]]...
[ [ "tensorflow.placeholder" ] ]
google-coral/demo-manufacturing
[ "9b2806f9d558d8ad06f951fcf8765ea097edb99c" ]
[ "models/retraining/train_classifier.py" ]
[ "# Copyright 2021 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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "tensorflow.io.read_file", "tensorflow.keras.layers.Dense", "tensorflow.keras.applications.MobileNetV2", "tensorflow.keras.layers.GlobalAveragePooling2D", "tensorflow.cast", "numpy.uint8", "matplotlib.pyplot.savefig", "tensorflow.keras.layers.Conv2D", "numpy.argmax", "matpl...
sean-mackenzie/gdpyt-analysis
[ "b03931ee431862573aaf449a6b5db2aea00bf998", "b03931ee431862573aaf449a6b5db2aea00bf998" ]
[ "test/single_particle_tracking.py", "utils/bin.py" ]
[ "# test bin, analyze, and plot functions\nimport numpy as np\nfrom mpl_toolkits.axes_grid1 import make_axes_locatable\n\nfrom utils import io, plotting, bin, modify, fit, functions\nimport filter, analyze\nfrom tracking import plotting as trackplot\n\nimport random\n\nimport matplotlib.pyplot as plt\n\n# read .xlsx...
[ [ "matplotlib.pyplot.colorbar", "matplotlib.pyplot.subplots", "matplotlib.pyplot.figure", "numpy.stack", "numpy.dstack", "matplotlib.pyplot.show" ], [ "numpy.max", "numpy.ones_like", "numpy.argmin", "numpy.round", "numpy.min", "numpy.where", "pandas.concat", ...
Ankit-Dhankhar/PySyft
[ "750bd2c3987a570ef1dc8554b933696d416724c7" ]
[ "syft/frameworks/torch/tensors/interpreters/autograd.py" ]
[ "from functools import wraps\nimport torch\n\nimport syft\nfrom syft.generic.tensor import AbstractTensor\nfrom syft.generic.frameworks.overload import overloaded\nfrom . import gradients\n\n\ndef backwards_grad(grad_fn, in_grad=None):\n if grad_fn is None:\n raise ValueError(\n \"The gradient ...
[ [ "torch.nn.functional.native_linear" ] ]
naylor-b/dymos
[ "56ee72041056ae20c3332d060e291c4da93844b1", "56ee72041056ae20c3332d060e291c4da93844b1" ]
[ "dymos/transcriptions/pseudospectral/components/state_independents.py", "dymos/examples/battery_multibranch/batteries.py" ]
[ "\"\"\"Define the StateIndependents class.\"\"\"\n\nfrom __future__ import print_function, division, absolute_import\n\nfrom six import iteritems\n\nimport numpy as np\n\nfrom openmdao.api import ImplicitComponent\n\nfrom dymos.transcriptions.grid_data import GridData\n\n\nclass StateIndependentsComp(ImplicitCompon...
[ [ "numpy.in1d", "numpy.array", "numpy.prod", "numpy.arange" ], [ "numpy.array", "scipy.interpolate.Akima1DInterpolator", "numpy.arange", "numpy.ones" ] ]
urbaneman/CenterNet
[ "9d712e0d6f4c9bf4725489633a3fdfbb2ef0d416" ]
[ "src/lib/models/networks/pose_dla_dcn_att.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport math\nimport logging\nimport numpy as np\nfrom os.path import join\n\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\nimport torch.utils.model_zoo as model_zoo\n\...
[ [ "numpy.array", "torch.cat", "torch.nn.MaxPool2d", "torch.nn.Sequential", "torch.nn.init.constant_", "torch.nn.BatchNorm2d", "torch.nn.functional.interpolate", "torch.utils.model_zoo.load_url", "torch.nn.ConvTranspose2d", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.lo...
ss892714028/milvus
[ "288ad629976697aca43fd8bec79cdb68776c14cd" ]
[ "tests/python_client/chaos/test_chaos_memory_stress.py" ]
[ "import threading\nfrom time import sleep, time\n\nimport pytest\nimport datetime\n\nfrom pymilvus import connections\nfrom base.collection_wrapper import ApiCollectionWrapper\nfrom chaos.checker import Op, CreateChecker, InsertFlushChecker, IndexChecker, SearchChecker, QueryChecker\nfrom common.cus_resource_opts i...
[ [ "pandas.read_hdf" ] ]
Iroy30/cudf
[ "c333f4191d8bc2dc00c1144df10e6d1f77610f8f" ]
[ "cudf/tests/test_categorical.py" ]
[ "# Copyright (c) 2018, NVIDIA CORPORATION.\n\nimport pytest\n\nimport numpy as np\nimport pandas as pd\n\nfrom cudf.dataframe import Series, DataFrame\n\n\ndef test_categorical_basic():\n cat = pd.Categorical(['a', 'a', 'b', 'c', 'a'], categories=['a', 'b', 'c'])\n pdsr = pd.Series(cat)\n sr = Series(cat)\...
[ [ "numpy.testing.assert_equal", "numpy.random.seed", "pandas.DataFrame", "numpy.testing.assert_array_equal", "numpy.any", "pandas.Categorical", "pandas.Series", "numpy.all" ] ]
TropComplique/single-shot-detector
[ "3714d411305f1a55bebb7e38ee58dfea70aa328d" ]
[ "model.py" ]
[ "import tensorflow as tf\nfrom detector import SSD\nfrom detector.anchor_generator import AnchorGenerator\nfrom detector.box_predictor import RetinaNetBoxPredictor\nfrom detector.feature_extractor import RetinaNetFeatureExtractor\nfrom detector.backbones import mobilenet_v1, shufflenet_v2\nfrom metrics import Evalu...
[ [ "tensorflow.control_dependencies", "tensorflow.add_to_collection", "tensorflow.identity", "tensorflow.trainable_variables", "tensorflow.train.latest_checkpoint", "tensorflow.summary.histogram", "tensorflow.logging.info", "tensorflow.losses.get_total_loss", "tensorflow.constant"...
wangjia1234/tensorflow
[ "6e28586003981ffdc9f1f6bad09bb34cef6d9385" ]
[ "tensorflow/python/data/ops/dataset_ops.py" ]
[ "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.ops.array_ops.identity", "tensorflow.python.ops.gen_dataset_ops.tensor_slice_dataset", "tensorflow.python.framework.smart_cond.smart_constant_value", "tensorflow.python.framework.ops.convert_n_to_tensor", "tensorflow.python.training.tracking.tracking.ResourceTracker", "t...
Marcellinoliong/CrowdCounting
[ "3c11448d5175c5ac4c61b78f49a13705e7b55777", "3c11448d5175c5ac4c61b78f49a13705e7b55777" ]
[ "test.py", "datasets/WE/loading_data.py" ]
[ "from matplotlib import pyplot as plt\n\nimport matplotlib\nimport os\nimport random\nimport torch\nfrom torch.autograd import Variable\nimport torchvision.transforms as standard_transforms\nimport misc.transforms as own_transforms\nimport pandas as pd\n\nfrom models.CC import CrowdCounter\nfrom config import cfg\n...
[ [ "torch.device", "matplotlib.pyplot.colorbar", "torch.autograd.Variable", "matplotlib.pyplot.savefig", "torch.no_grad", "matplotlib.pyplot.close", "pandas.read_csv", "scipy.io.savemat", "matplotlib.pyplot.figure", "torch.load", "matplotlib.pyplot.gca", "matplotlib.py...
albuslee/Accommodation-Booking-System
[ "fdb2e26e4d783a8fcd8ac8817165f11d25c56d78" ]
[ "Datamodel/data/new_merge.py" ]
[ "import os\nimport pandas as pd\nfrom collections import Counter\nimport numpy as np\n\ndataPath = './data/'\nfileMergedName = 'street_name_popular.csv'\npath = 'street_name/'\nfiles = os.listdir(dataPath + path)\n\n## merge all the data\nData = pd.DataFrame()\nfor file in files:\n tempData = pd.read_csv(dataPat...
[ [ "pandas.DataFrame", "pandas.read_csv", "pandas.concat" ] ]
jweyn/DLWP
[ "3f32bfab98eacee2abe880d5bd214b6060627edd" ]
[ "DLWP/plot/plot_functions.py" ]
[ "#\n# Copyright (c) 2017-18 Jonathan Weyn <jweyn@uw.edu>\n#\n# See the file LICENSE for your rights.\n#\n\n\"\"\"\nCollection of random plotting functions. Unfortunately these are not very robust or well-documented, but I thought it\na bit cleaner to place them here than have plotting functions defined in every use...
[ [ "matplotlib.pyplot.text", "matplotlib.pyplot.savefig", "numpy.nonzero", "numpy.arange", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.fill_betweenx", "numpy.sqrt", "matplotlib.pyplot.clabel", "matplotlib.pyplot.subplot", "matplotlib.pyplot.title", "matplotlib.pyp...
mikhailkin/dataset
[ "7417483fdbe2e3743af4d614cb9036fd5b1375c0", "7417483fdbe2e3743af4d614cb9036fd5b1375c0" ]
[ "dataset/models/tf/vgg.py", "dataset/models/tf/resnet.py" ]
[ "\"\"\" Simonyan K., Zisserman A. \"`Very Deep Convolutional Networks for Large-Scale Image Recognition\n<https://arxiv.org/abs/1409.1556>`_\"\n\"\"\"\nimport tensorflow as tf\n\nfrom ... import is_best_practice\nfrom . import TFModel\nfrom .layers import conv_block\n\n\n_VGG16_ARCH = [\n (2, 0, 64, 1),\n (2,...
[ [ "tensorflow.variable_scope", "tensorflow.identity" ], [ "tensorflow.get_default_graph", "tensorflow.variable_scope", "tensorflow.identity", "tensorflow.add_n" ] ]
Qiuyan918/m5_forcasting
[ "eda085e63a7d6ad5b2ca11986bcda33a2c30c235" ]
[ "tf_utils.py" ]
[ "import tensorflow as tf\r\n\r\n\r\ndef temporal_convolution_layer(inputs, output_units, convolution_width, causal=False, dilation_rate=[1], bias=True,\r\n activation=None, dropout=None, scope='temporal-convolution-layer', reuse=False,\r\n batch_norm=None)...
[ [ "tensorflow.contrib.rnn.LSTMCell", "tensorflow.constant_initializer", "tensorflow.concat", "tensorflow.shape", "tensorflow.nn.bidirectional_dynamic_rnn", "tensorflow.expand_dims", "tensorflow.layers.batch_normalization", "tensorflow.cast", "tensorflow.sqrt", "tensorflow.var...
baldassarreFe/pytorch-lightning
[ "3f1e4b953f84ecdac7dada0c6b57d908efc9c3d3" ]
[ "tests/base/utils.py" ]
[ "import os\nfrom argparse import Namespace\n\nimport numpy as np\nimport torch\n\n# from pl_examples import LightningTemplateModel\nfrom pytorch_lightning import Trainer\nfrom pytorch_lightning.callbacks import ModelCheckpoint\nfrom pytorch_lightning.loggers import TestTubeLogger, TensorBoardLogger\nfrom tests.base...
[ [ "numpy.random.seed", "torch.manual_seed", "numpy.random.randint", "torch.tensor", "torch.mean", "torch.argmax", "torch.sum" ] ]
shenzebang/fed_functional_gradient
[ "3321a2c73f7e963c1c66351013c2fff6e88befd8" ]
[ "run_x_distill.py" ]
[ "import torch.utils.data\nfrom torch.utils.tensorboard import SummaryWriter\nfrom Dx_losses import Dx_cross_entropy\nfrom config import make_parser\nfrom utils.data_utils import load_dataset, make_transforms, make_dataloader, split_dataset\nfrom utils.model_utils import make_model as _make_model\nfrom core.ffgb_dis...
[ [ "torch.utils.tensorboard.SummaryWriter" ] ]
Intelligent-Sensing/D-VDAMP
[ "0405a68dc386324b94890d9cea102f2f26d4d1b4" ]
[ "train/main.py" ]
[ "\"\"\"Main program for training/testing Colored DnCNN\nPerform one of the following actions based on the command line arguments.\n - preprocess\n - train\n\"\"\"\n\nimport os, sys\nsys.path.append(os.path.dirname(sys.path[0]))\n\nimport argparse\nimport torch\nfrom torch import optim\nfrom torch.utils.data i...
[ [ "torch.device", "torch.cuda.is_available", "torch.tensor", "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.utils.data.DataLoader", "torch.utils.tensorboard.SummaryWriter" ] ]
ArturPrzybysz/finite-element-method
[ "f6edc466c3020f3c7d7563458cc9fc60ba378d43" ]
[ "source/week2a/xy.py" ]
[ "import numpy as np\n\n\ndef xy(x0, y0, L1, L2, noelms1, noelms2):\n all_nodes = (1 + noelms1) * (1 + noelms2)\n X = np.zeros(all_nodes)\n\n for i, x in enumerate(np.linspace(start=x0, stop=x0 + L1, num=noelms1 + 1)):\n start_idx = i * (noelms2 + 1)\n stop_idx = start_idx + (noelms2 + 1)\n ...
[ [ "numpy.linspace", "numpy.tile", "numpy.zeros" ] ]
sripadh8/transformers
[ "9f6a0fa573b25c90191d58443661db7d187de511" ]
[ "examples/research_projects/distillation/utils.py" ]
[ "# coding=utf-8\n# Copyright 2019-present, the HuggingFace Inc. team and Facebook, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICE...
[ [ "torch.cuda.manual_seed_all", "numpy.random.seed", "torch.distributed.init_process_group", "torch.manual_seed", "torch.cuda.set_device", "torch.cuda.is_available" ] ]
l1987deterding/web-scraping-challenge
[ "2fafa02cca32f1520750d30c2c1c0ed4727b47ea" ]
[ "Mission_to_Mars/scrape_mars.py" ]
[ "from splinter import Browser\nfrom bs4 import BeautifulSoup as bs\nimport time\nfrom webdriver_manager.chrome import ChromeDriverManager\nimport pandas as pd\n\ndef scrape_info():\n # Set up Splinter\n executable_path = {'executable_path': ChromeDriverManager().install()}\n browser = Browser('chrome', **e...
[ [ "pandas.read_html" ] ]
simi48/Ef-If_Jassen
[ "6076839492bff591cf9b457e949999e9167903e6" ]
[ "Dataset_Generation/img_gen_advanced.py" ]
[ "# -*- coding: utf-8 -*-\r\n\r\n# -----------------------------------------------------------------------------\r\n# This script generates a set of training data for a playing card recognition\r\n# software. More precisely, it generates a scene of a random amount of randomly \r\n# augmented random playing cards on ...
[ [ "numpy.array", "numpy.float32", "matplotlib.pyplot.subplots" ] ]
astridtijskens/Shark
[ "c3ca01fc0eb23c3583f987cd27f5d924b187ba3a" ]
[ "Examples/Example 2/postproc_convergence.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nExample of how to use shark to for probabilistic Monte-Carlo simulations with DELPHIN 5.8.\n===============================================================================\n2018-05-04\n\nThis script contains functions to postprocess the output of Delphin simulations when monitoring...
[ [ "pandas.read_pickle", "numpy.isnan", "pandas.DataFrame", "pandas.MultiIndex.from_tuples", "numpy.mean", "numpy.std", "pandas.concat", "numpy.repeat" ] ]
giorgiodomen/Supplementary_code_for_Quantum_Alchemy
[ "2db1c1386f1a408cae05b7cbe21e2dab5159c181" ]
[ "Alchemical_CPHF_perturbator/alch_deriv.py" ]
[ "import pyscf.qmmm\nfrom pyscf import gto, scf\nimport numpy as np\nimport pyscf.qmmm\nfrom pyscf import gto, scf\nimport numpy as np\nfrom pyscf import lib\nfrom functools import reduce\nfrom pyscf.scf import cphf\nfrom pyscf import lib\nfrom pyscf.prop.nmr import rhf as rhf_nmr\nfrom AP_utils import alias_param,p...
[ [ "numpy.zeros_like", "numpy.linalg.norm", "numpy.einsum", "numpy.zeros" ] ]
dymaxionlabs/satlomas-back
[ "f4568f6535755fd4a2432ecc661a264872206c6c" ]
[ "stations/management/commands/populate_from_sudeste_dataset.py" ]
[ "import json\nimport os\nfrom datetime import datetime\n\nimport pandas as pd\nfrom django.conf import settings\nfrom django.contrib.gis.geos import Point\nfrom django.core.management.base import BaseCommand, CommandError\n\nfrom stations.models import Measurement, Place, Station\n\n\ndef chunker(seq, size):\n r...
[ [ "pandas.read_csv" ] ]
FDSJK/pytorch-image-models
[ "5eb0e363a63e823f27810ea6bf5b6b8e136c4176" ]
[ "validate.py" ]
[ "#!/usr/bin/env python\n\"\"\" ImageNet Validation Script\n\nThis is intended to be a lean and easily modifiable ImageNet validation script for evaluating pretrained\nmodels or training checkpoints against ImageNet or similarly organized image datasets. It prioritizes\ncanonical PyTorch, standard Python style, and ...
[ [ "torch.nn.CrossEntropyLoss", "torch.jit.script", "torch.no_grad", "torch.jit.optimized_execution" ] ]
pabvald/instagram-caption-generator
[ "99f0c130aeb3c4bc59c267ac1f49c762e5023756" ]
[ "evaluation/pycocoevalcap/cider/cider_scorer.py" ]
[ " #!/usr/bin/env python\n# Tsung-Yi Lin <tl483@cornell.edu>\n# Ramakrishna Vedantam <vrama91@vt.edu>\n\nimport copy\nfrom collections import defaultdict\nimport numpy as np\nimport pdb\nimport math\n\ndef precook(s, n=4, out=False):\n \"\"\"\n Takes a string as input and returns an object that can be given...
[ [ "numpy.array", "numpy.sqrt", "numpy.mean" ] ]
ktodorov/historical-ocr
[ "d4d7bf0addf5ff98b7182c00ff716e79c97e050e" ]
[ "tests/test_bert.py" ]
[ "from tests.fakes.log_service_fake import LogServiceFake\nfrom enums.language import Language\nfrom enums.configuration import Configuration\nfrom enums.challenge import Challenge\nfrom enums.ocr_output_type import OCROutputType\nfrom enums.pretrained_model import PretrainedModel\nimport os\nfrom tests.fakes.non_co...
[ [ "torch.nn.utils.rnn.pad_sequence", "torch.Tensor" ] ]
rosalindfranklininstitute/DosNa
[ "da75470b591d78ba5648f9ca05c88c96999fdf5f" ]
[ "dosna/tests/test_hdf_converter.py" ]
[ "import logging\nimport sys\nimport unittest\nimport os\nimport numpy as np\nfrom numpy.testing import assert_array_equal\nimport h5py\n\nimport dosna as dn\nfrom dosna.tests import configure_logger\n\nfrom dosna.tools.hdf_converter import HdfConverter\n\nlog = logging.getLogger(__name__)\n\nBACKEND = 'ram'\nENGINE...
[ [ "numpy.testing.assert_array_equal", "numpy.random.randint" ] ]
ultrons/autokeras
[ "0e24f14038fd49f655ff1249c5f84a9d01d66362" ]
[ "autokeras/keras_layers.py" ]
[ "# Copyright 2020 The AutoKeras 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...
[ [ "tensorflow.io.gfile.GFile", "tensorflow.keras.layers.Add", "tensorflow.keras.regularizers.get", "tensorflow.keras.layers.Activation", "tensorflow.ones", "tensorflow.matmul", "tensorflow.reshape", "tensorflow.keras.layers.Dense", "tensorflow.zeros_like", "tensorflow.broadca...
brandontrabucco/design_bench
[ "824516ec59396aded3ca55ec7c1c313626ecaceb" ]
[ "design_bench/oracles/tensorflow/lstm_oracle.py" ]
[ "from design_bench.oracles.tensorflow.tensorflow_oracle import TensorflowOracle\nfrom design_bench.datasets.discrete_dataset import DiscreteDataset\nimport tensorflow.keras as keras\nimport tensorflow.keras.layers as layers\nimport tempfile\nimport math\nimport numpy as np\n\n\nclass LSTMOracle(TensorflowOracle):\n...
[ [ "tensorflow.keras.experimental.CosineDecay", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Embedding", "tensorflow.keras.models.load_model", "tensorflow.keras.Model", "tensorflow.keras.layers.LSTM", "tensorflow.keras.Input", "tensorflow.keras.optimizers.Adam", "tens...
Iliricon/DeepNotebooks
[ "036c807753254504c8546fbdfc91a86cd94e6a3d" ]
[ "src/util/CSVUtil.py" ]
[ "\"\"\"\ncreated 18/11/01\n@author Claas Völcker\n\"\"\"\nimport numpy as np\nimport pandas as pd\nimport pandas as pd\nfrom sklearn.preprocessing import LabelEncoder\n\nfrom spn.algorithms.LeafLearning import learn_leaf_from_context\nfrom spn.algorithms.LearningWrappers import learn_mspn, learn_mspn_with_missing\n...
[ [ "numpy.array", "numpy.isnan", "sklearn.preprocessing.LabelEncoder", "numpy.timedelta64", "pandas.read_csv" ] ]
Sergey-Baranenkov/audio_recognition_system
[ "4472a76e495fe6a679ffbd4dd3706ce971540e79" ]
[ "python-worker/tests.py" ]
[ "import unittest\nimport numpy as np\nfrom helpers.downsampling import downsampling\nfrom helpers.stereo_to_mono import stereo_to_mono\nfrom helpers.pydub_to_np import pydub_to_np\nfrom helpers.downsample_sound import downsample_sound\nfrom helpers.butter_lowpass import lowpass_filter\nfrom helpers.get_windowed_fft...
[ [ "numpy.array" ] ]
binodkumar23/IITJ_IDDEDA
[ "2c2f9ec14bcbb882c23866f1329a5fd0a1a7a993" ]
[ "RTOS_Task_Scheduler/LDF.py" ]
[ "#Importing Libraries\r\nfrom collections import defaultdict\r\nimport networkx as nx\r\nfrom heapq import *\r\nfrom tabulate import tabulate\r\nimport matplotlib.pyplot as plt\r\n\r\n# class for doing heap operations\r\nclass minHeap:\r\n def __init__(self):\r\n self.hea = []\r\n \r\n def push_heap...
[ [ "matplotlib.pyplot.savefig", "matplotlib.pyplot.get_cmap" ] ]
sriyash421/CrowdNav_DSRNN
[ "968f54f1f37ae65ee0a13a5a8e96eda1af1916ab" ]
[ "pytorchBaselines/a2c_ppo_acktr/envs.py" ]
[ "import os\n\nimport gym\nimport numpy as np\nimport torch\nfrom gym.spaces.box import Box\nfrom gym.spaces.dict import Dict\n\nfrom baselines import bench\nfrom baselines.common.atari_wrappers import make_atari, wrap_deepmind\nfrom baselines.common.vec_env import VecEnvWrapper\nfrom baselines.common.vec_env.dummy_...
[ [ "torch.zeros", "torch.device", "torch.from_numpy", "numpy.sqrt", "numpy.repeat" ] ]
ipab-rad/RRC21
[ "32aa3108eadd2fef527ea4150064a476f0661e73" ]
[ "submission/mp/states/base_states.py" ]
[ "\"\"\"\nFile: base_states.py\nAuthor: yourname\nEmail: yourname@email.com\nGithub: https://github.com/yourname\nDescription:\n This file implements a bunch of base states that are used in a state\n machine. The `OpenKLoopState` is a generic state inherited by most of the\n members implemented here. The id...
[ [ "numpy.array", "numpy.linalg.norm", "numpy.dot", "numpy.mean", "numpy.sign", "numpy.argmax" ] ]
paszti96/RODSIE_yolov5
[ "2419802dbd897028f02ad45232342316d4a73233" ]
[ "hubconf.py" ]
[ "\"\"\"File for accessing YOLOv5 via PyTorch Hub https://pytorch.org/hub/\n\nUsage:\n import torch\n model = torch.hub.load('ultralytics/yolov5_', 'yolov5s', pretrained=True, channels=3, classes=80)\n\"\"\"\n\ndependencies = ['torch', 'yaml']\nimport torch\n\nfrom models.yolo import Model\nfrom utils import g...
[ [ "torch.load" ] ]
scorum/scorum
[ "fb4aa0b0960119b97828865d7a5b4d0409af7876" ]
[ "programs/util/inflation_plot.py" ]
[ "#!/usr/bin/env python3\n\nimport datetime\nimport json\nimport sys\n\nimport matplotlib\nmatplotlib.use(\"Agg\")\n\nimport matplotlib.pyplot as plt\nfrom matplotlib.ticker import AutoMinorLocator\n\nx = []\ny = []\n\nnames = [\"curate\", \"content\", \"producer\", \"liquidity\", \"pow\"]\ninflections = {}\nmarkers...
[ [ "matplotlib.use", "matplotlib.ticker.AutoMinorLocator", "matplotlib.pyplot.grid", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.gca", "matplotlib.pyplot.axis" ] ]
joseph-x-li/pystreaming
[ "31cd0129fdedfe4b11d73ead90bf4792f343ff42" ]
[ "pystreaming/stream/interface.py" ]
[ "import zmq\nimport numpy as np\n\n\ndef send(*, socket, fno, ftime, meta, arr=None, buf=None, flags=0):\n \"\"\"Internal video data send command.\n\n Args:\n socket (zmq.Context.socket): Socket through which to send data.\n fno (int): Frame number.\n ftime (float): Frame timestamp.\n ...
[ [ "numpy.frombuffer" ] ]
ynxue/FabFlee
[ "c49c9f6726d9da1ab6ede00a8e8b52b1729cdacd" ]
[ "config_files/moo_ssudan_R0_5obj/run.py" ]
[ "from flee import flee\nfrom flee.datamanager import handle_refugee_data,read_period\nfrom flee.datamanager import DataTable #DataTable.subtract_dates()\nfrom flee import InputGeography\nimport numpy as np\nimport flee.postprocessing.analysis as a\nimport sys\n\ndef AddInitialRefugees(e, d, loc):\n \"\"\" Add the ...
[ [ "numpy.sum" ] ]
killamocingbird/black-scholes-modeling
[ "b0c410f2d4b910b2ba813fc410df3c785ad83640" ]
[ "model.py" ]
[ "import math\r\nimport numpy as np\r\nimport os\r\nimport torch\r\nfrom torch.autograd import grad\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\nimport modules as m\r\n\r\nL2 = nn.MSELoss()\r\n\r\nclass scaled_tanh(nn.Tanh):\r\n def __init__(self):\r\n super().__init__()\r\n \r\n ...
[ [ "torch.nn.Linear", "torch.zeros", "torch.unique", "numpy.reshape", "torch.stack", "torch.nn.MSELoss", "torch.nn.Tanh", "torch.nn.functional.relu", "torch.ones", "numpy.loadtxt", "torch.tensor", "torch.as_tensor", "torch.tanh", "torch.exp" ] ]
abhishek0901/-2-1-texas-hodem-cfr-implementation
[ "fe279d30ef2bd1f2c5d8833cb7cbf9c568b79930" ]
[ "InfosetAbstraction.py" ]
[ "from sklearn.cluster import KMeans\nimport numpy as np\nimport pickle\nimport pandas as pd\n\nclass InfosetAbstraction:\n\n def __init__(self):\n return\n\n def run_k_means(self,data,cluster):\n self.kmeans = KMeans(n_clusters=cluster, random_state=0).fit(data)\n a=1\n\n def save_mode...
[ [ "pandas.read_csv", "sklearn.cluster.KMeans" ] ]
annayqho/SN2018gep
[ "93cd64a1aab326771199f9093339df5bc4eb8002" ]
[ "code/paper_plots/fig20_piro_models.py" ]
[ "\"\"\" The various calculations for shock cooling,\nusing analytical formulas from Piro (2015) \"\"\"\n\nimport matplotlib.pyplot as plt\nfrom matplotlib import rc\nrc(\"font\", family=\"serif\")\nrc(\"text\", usetex=True)\nimport numpy as np\nimport sys\nsys.path.append(\"/Users/annaho/Dropbox/Projects/Research/Z...
[ [ "matplotlib.pyplot.xlim", "numpy.random.rand", "matplotlib.pyplot.errorbar", "numpy.exp", "matplotlib.pyplot.savefig", "matplotlib.pyplot.tight_layout", "numpy.isfinite", "matplotlib.pyplot.gca", "matplotlib.pyplot.yscale", "numpy.array", "numpy.savetxt", "matplotli...
bertiewooster/chempy
[ "115adc1d570aa1631baff4374f3128ce23fa7776", "115adc1d570aa1631baff4374f3128ce23fa7776" ]
[ "chempy/tests/test_reactionsystem.py", "chempy/tests/test_units.py" ]
[ "# -*- coding: utf-8 -*-\n\nfrom itertools import chain\n\nimport pytest\n\nfrom ..util.testing import requires\nfrom ..util.parsing import parsing_library\nfrom ..units import default_units, units_library, allclose\nfrom ..chemistry import Substance, Reaction\nfrom ..reactionsystem import ReactionSystem\n\n\n@requ...
[ [ "numpy.all" ], [ "numpy.array", "numpy.arctan", "numpy.exp", "numpy.linspace" ] ]
mgorny/gsd
[ "4c544c412f1a65a8800e8169af044d32201bd985" ]
[ "gsd/test/test_hoomd.py" ]
[ "# Copyright (c) 2016-2021 The Regents of the University of Michigan\n# This file is part of the General Simulation Data (GSD) project, released under\n# the BSD 2-Clause License.\n\n\"\"\"Test the gsd.hoomd API.\"\"\"\n\nimport gsd.fl\nimport gsd.hoomd\nimport numpy\nimport pickle\nimport pytest\n\n\ndef test_crea...
[ [ "numpy.array", "numpy.testing.assert_array_equal" ] ]
campos537/deep-fashion-system
[ "1de31dd6260cc967e1832cff63ae7e537a3a4e9d" ]
[ "model-server/classifier/classifier.py" ]
[ "import cv2\nimport asyncio\nimport numpy as np\n\nclass Classifier:\n\n def __init__(self, config):\n\n if config[\"framework\"] == \"ONNX\":\n self.net = cv2.dnn.readNetFromONNX(config[\"trained_file\"])\n else:\n self.net = cv2.dnn.readNet(\n config[\"trained...
[ [ "numpy.argmax" ] ]
aiosin/comvi
[ "a1b54043f722be8cfcfac881ee3b145244aa0cdd" ]
[ "programming/dimred/contour-test/contour.py" ]
[ "#contour.py\n#find biggest contour\n#this file serves for testing purposes only\n\nimport numpy as np\nimport cv2\nfrom skimage.transform import resize\n\nimg = cv2.imread('flower.jpg',0)\n\ncv2.imshow('img',img)\ncv2.waitKey()\ncv2.destroyAllWindows()\n\n\nim_bw = cv2.threshold(img,127,255,cv2.THRESH_BINARY)[1]\n...
[ [ "numpy.array", "numpy.fft.fft", "numpy.ones", "numpy.empty" ] ]
seedpcseed/DiTaxa
[ "127177deb630ad66520a2fdae1793417cd77ee99" ]
[ "utility/math_utility.py" ]
[ "__author__ = \"Ehsaneddin Asgari\"\n__license__ = \"Apache 2\"\n__version__ = \"1.0.0\"\n__maintainer__ = \"Ehsaneddin Asgari\"\n__email__ = \"asgari@berkeley.edu\"\n__project__ = \"LLP - DiTaxa\"\n__website__ = \"https://llp.berkeley.edu/ditaxa/\"\n\n\nfrom scipy import stats\nfrom sklearn.preprocessing import no...
[ [ "numpy.triu_indices", "numpy.zeros", "scipy.stats.entropy", "matplotlib.pyplot.title", "scipy.spatial.distance.squareform", "numpy.finfo", "matplotlib.pyplot.hist", "sklearn.preprocessing.normalize", "matplotlib.pyplot.show" ] ]
akihironitta/jax
[ "24c02148f27345b35555b0898bfc1d694a68c19a" ]
[ "tests/batching_test.py" ]
[ "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.dot", "numpy.size", "numpy.broadcast_to", "numpy.full", "numpy.eye", "numpy.swapaxes", "numpy.transpose", "numpy.arange", "numpy.ndim", "numpy.linalg.cholesky", "numpy.array", "numpy.zeros", "numpy.random.randn", "numpy.shape", "numpy.float32", ...
tarasowski/finding-donors-ml
[ "bc6cc9e8b29157aa2c5c8f957fb9aa161572578d" ]
[ "src/optimize.py" ]
[ "import os\nimport joblib\nfrom sklearn.model_selection import GridSearchCV\nfrom sklearn.metrics import make_scorer, fbeta_score, accuracy_score\nfrom . import dispatcher\nimport warnings\nwarnings.simplefilter(action='ignore', category=FutureWarning)\n\nMODEL = str(os.environ.get('MODEL'))\n\nX_TRAIN = str(os.env...
[ [ "sklearn.metrics.make_scorer", "sklearn.metrics.fbeta_score", "sklearn.model_selection.GridSearchCV", "sklearn.metrics.accuracy_score" ] ]
DSSG-Firebird/risk-model
[ "9e681b50de2b3d4c1ae5f61c949d77385a979ce5" ]
[ "python_scripts/construct_features.py" ]
[ "# This code extract the features from the raw joined dataset (data.csv)\n# and save it in the LibSVM format.\n# Usage: python construct_features.py\n\nimport pandas as pd\nimport numpy as np\nfrom sklearn.datasets import dump_svmlight_file\n\ndf = pd.read_csv(\"data.csv\", low_memory=False)\n\n# NPU\n\nNPU = df.NP...
[ [ "sklearn.datasets.dump_svmlight_file", "numpy.log1p", "pandas.concat", "pandas.read_csv", "pandas.get_dummies" ] ]
CogSciUOS/DeepLearningToolbox
[ "bf07578b9486d8c48e25df357bc4b9963b513b46", "bf07578b9486d8c48e25df357bc4b9963b513b46" ]
[ "dltb/thirdparty/datasource/widerface.py", "dltb/thirdparty/caffe/tests/test_caffe_network.py" ]
[ "\"\"\"The WiderFace dataset.\n\"\"\"\n\n# standard imports\nimport os\nimport logging\n\n# third party imports\nimport numpy as np\n\n# toolbox imports\nfrom dltb.base.data import Data\nfrom dltb.base.image import BoundingBox, Region, Landmarks\nfrom dltb.tool.classifier import ClassScheme\nfrom dltb.datasource im...
[ [ "numpy.ndarray" ], [ "numpy.allclose", "numpy.array" ] ]
simeonreusch/at2019fdr
[ "f0c61d98753c8169c20d0952d3220bb2d447252c" ]
[ "subtract_host_from_p200.py" ]
[ "#!/usr/bin/env python3\n# Author: Simeon Reusch (simeon.reusch@desy.de)\n# License: BSD-3-Clause\n\nimport os, time\nimport astropy\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.gridspec as gridspec\nfrom astropy.utils.console import ProgressBar\n\n# from astropy.time...
[ [ "pandas.DataFrame", "pandas.read_csv", "pandas.read_table", "numpy.abs" ] ]
Dradoue/Boids
[ "d7b79e49243c4a6fd437285b58ef6c0899e910d2" ]
[ "generate_figures_from_csv.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nimport seaborn as sns\nimport pandas as pd\n\nif __name__ == \"__main__\":\n\n # collect the data you want to plot\n # choose a method for the plot\n method = 3\n if method == 1:\n name = \"DBSCAN_position_Euclidean_metric\"\n eps = [70...
[ [ "numpy.concatenate", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.close", "matplotlib.pyplot.plot", "matplotlib.pyplot.figure", "matplotlib.pyplot.fill_between", "numpy.arange", "matplotl...
dereina/pypreprocessing
[ "7eed46693a5ef1b3f1a14d0428a57d88f1915d04" ]
[ "units/energy_equalizer.py" ]
[ "import sys\r\nimport units.unit as unit\r\n#sys.path.insert(1, '../')\r\n#from preprocessing.schemas.image_list import ImageList \r\nimport pandas\r\nimport numpy as np\r\n#cimport numpy as np\r\nimport schemas.image_list as i\r\nimport utils \r\nimport math\r\nimport time\r\nimport cython\r\nimport imageio\r\nimp...
[ [ "numpy.max", "numpy.zeros_like", "numpy.sin", "numpy.linalg.norm", "numpy.zeros", "pandas.DataFrame", "numpy.min", "numpy.abs", "numpy.cos" ] ]
StevenJokess/Awesome-GANs
[ "b78410e072ec3c0c39a4dac853dea7c219817c65", "b78410e072ec3c0c39a4dac853dea7c219817c65" ]
[ "awesome_gans/anogan/anogan_train.py", "awesome_gans/magan/magan_model.py" ]
[ "import os\nimport time\n\nimport numpy as np\nimport tensorflow as tf\n\nimport awesome_gans.anogan.anogan_model as anogan\nimport awesome_gans.image_utils as iu\nfrom awesome_gans.datasets import CelebADataSet as DataSet\nfrom awesome_gans.datasets import DataIterator\n\nresults = {\n 'output': './gen_img/',\n...
[ [ "numpy.reshape", "tensorflow.Session", "tensorflow.train.get_checkpoint_state", "tensorflow.ConfigProto", "numpy.random.uniform", "tensorflow.global_variables_initializer" ], [ "tensorflow.set_random_seed", "tensorflow.trainable_variables", "tensorflow.nn.relu", "tensor...
saneravi/ML_Stuff
[ "4347a9b7bf54ef378d16d26ef9e357ddc710664b" ]
[ "ML/50-mlps/13-keras-cnn-dropout/main.py" ]
[ "#!/usr/bin/env python\n\n# internal modules\nimport hasy_tools\nimport numpy as np\n# 3rd party modules\nfrom keras.callbacks import CSVLogger, ModelCheckpoint\nfrom keras.layers import Conv2D, Dense, Dropout, Flatten, MaxPooling2D\nfrom keras.models import Sequential\n\n# Load the data\ndata = hasy_tools.load_dat...
[ [ "numpy.eye" ] ]
coranholmes/illegal_vehicle_detection
[ "bbefdb0b79b0a667e329c5226af71cabb2731f22" ]
[ "yolo.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nClass definition of YOLO_v3 style detection model on image and video\n\"\"\"\n\nimport colorsys\nimport os\nfrom timeit import default_timer as timer\n\nimport numpy as np\nfrom keras import backend as K\nfrom keras.models import load_model\nfrom keras.layers import Input\nfrom PIL...
[ [ "numpy.array", "numpy.asarray", "numpy.random.seed", "numpy.random.shuffle", "numpy.expand_dims", "numpy.floor" ] ]
19dufbri/hackathon
[ "9624ccf9e2c830de6ecf145aa76cb957495a5cc1" ]
[ "app/app.py" ]
[ "import base64\nimport csv\nimport json\nfrom flask import Flask, render_template, url_for, request, jsonify, redirect\nimport matplotlib.pyplot as plt\nfrom io import BytesIO\nfrom flask import jsonify\nimport numpy as np\n\napp = Flask(__name__)\n\nfinalData = []\nnames = []\n\n@app.route('/')\ndef index():\n ...
[ [ "matplotlib.pyplot.savefig", "matplotlib.pyplot.pie", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "matplotlib.pyplot.Circle", "matplotlib.pyplot.gcf", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.axis" ] ]
christophpernul/crypto-trading-assistant
[ "1a12609dc8a51980f121477464cf9721cdbb926e" ]
[ "crypto_trading_lib.py" ]
[ "import pandas as pd\nimport os\n\ndef load_data(crypto_path: str = \"/home/chris/Dropbox/Finance/data/crypto/exported/\",\n fname: str = \"crypto_orders.csv\") -> pd.DataFrame:\n df = pd.read_csv(os.path.join(crypto_path, fname))\n df = df.assign(date=pd.to_datetime(df.date))\n return df\n\nd...
[ [ "pandas.to_datetime" ] ]
JULIELab/EmoMap
[ "3de2a00b70e4d485b61d082cce2c1487012024c6" ]
[ "coling18/analysis/corpus_statistics/count.py" ]
[ "import pandas as pd\nfrom main import data\nfrom framework.util import save_tsv\ndf=pd.DataFrame(columns=['N'])\n\nfor s in data.SETTINGS:\n df.loc[s.name]=len(s.load_data())\n\ndf.rename(index=data.IN_PAPER_NAMES, inplace=True)\n\nprint(df)\nsave_tsv(df, 'corpus_statistics.tsv')\n" ]
[ [ "pandas.DataFrame" ] ]
Cafolkes/koopman_learning_and_control
[ "e0e7999399368f140c6cc2776860b2087a3fb7f7", "0152a2bd5079da4d672dbaac404b6c084410297d" ]
[ "koopman_core/handlers/handler.py", "koopman_core/controllers/embedded_controllers/knmpc_18_4_25/src/setup.py" ]
[ "from numpy import array, zeros, append, delete\n\nclass Handler(object):\n \"\"\"\n Class to handle Episodic Learning. This class is a template only.\n \"\"\"\n def __init__(self, n, m, Nlift, Nep, w, initial_controller, pert_noise):\n \"\"\"Handler \n \n Arguments:\n ob...
[ [ "numpy.delete", "numpy.zeros", "numpy.append" ], [ "numpy.get_include" ] ]
zc-play/face-model
[ "4afb468b3a2ea6e7f3acdef3245d79852095da84", "4afb468b3a2ea6e7f3acdef3245d79852095da84" ]
[ "face_detect/simple_parser.py", "face_classifier/net.py" ]
[ "import cv2\nimport json\nimport os\nimport logging\nimport numpy as np\n\n\ndef get_data(input_path, cache=True, cache_path='./train_data_info.json'):\n if cache and os.path.exists(cache_path):\n try:\n with open(cache_path, 'r') as fp:\n res = json.loads(fp.read())\n ...
[ [ "numpy.random.randint" ], [ "numpy.random.seed" ] ]
Hoff97/mot_neural_solver
[ "39e0c6ae6306f86f4fac07520744319f714e3083" ]
[ "scripts/evaluate.py" ]
[ "import sacred\nfrom sacred import Experiment\n\nfrom mot_neural_solver.utils.misc import make_deterministic, get_run_str_and_save_dir\n\nfrom mot_neural_solver.path_cfg import OUTPUT_PATH, DATA_PATH\nimport os.path as osp\n\nfrom mot_neural_solver.pl_module.pl_module import MOTNeuralSolver\nfrom mot_neural_solver....
[ [ "pandas.option_context" ] ]
rtg0795/data-validation
[ "16e57d7d5f1aeb4b7b9b897c5021abf006261bbd" ]
[ "tensorflow_data_validation/api/validation_api_test.py" ]
[ "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.array", "tensorflow.compat.v1.io.tf_record_iterator", "pandas.DataFrame.from_dict", "tensorflow.train.Example", "tensorflow.python.util.protobuf.compare.assertProtoEqual" ] ]
Cryoris/qiskit-nature
[ "c24a85140eb514628e2b9b1a5f0e03a689f8ade7" ]
[ "qiskit_nature/transformers/active_space_transformer.py" ]
[ "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2021.\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 modifications or ...
[ [ "numpy.einsum", "numpy.asarray", "numpy.transpose" ] ]
hoangt/tensorflow
[ "f055fb23b726baef93b887d378f4539ad524146f" ]
[ "tensorflow/contrib/tpu/python/tpu/tpu.py" ]
[ "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.ops.array_ops.identity", "tensorflow.python.framework.ops.control_dependencies", "tensorflow.contrib.tpu.python.tpu.tpu_function.check_function_argument_count", "tensorflow.python.framework.device.DeviceSpec.from_string", "tensorflow.contrib.tpu.python.ops.tpu_ops.tpu_replic...
tamiya-onodera/qiskit-finance
[ "d9e93d589a314fdf676ce152a3046929fa5b53ba" ]
[ "qiskit_finance/data_providers/_base_data_provider.py" ]
[ "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2019, 2021.\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...
[ [ "numpy.array", "numpy.cov", "numpy.vectorize", "numpy.zeros", "numpy.mean" ] ]
chalothon/GRAN-graph-recurrent-attention-neural-network
[ "ae15f4d1e2b056108924d4bc8a5d1fde87d0eac4" ]
[ "dataset/gran_data.py" ]
[ "import torch\nimport time\nimport os\nimport pickle\nimport glob\nimport numpy as np\nimport networkx as nx\nfrom tqdm import tqdm\nfrom collections import defaultdict\nimport torch.nn.functional as F\nfrom utils.data_helper import *\n\n\nclass GRANData(object):\n\n def __init__(self, config, graphs, tag='train')...
[ [ "numpy.concatenate", "numpy.isinf", "numpy.array", "numpy.pad", "torch.cat", "numpy.ones_like", "numpy.zeros", "numpy.random.RandomState", "numpy.ones", "torch.from_numpy", "numpy.stack", "numpy.arange", "numpy.cumsum", "numpy.tril", "numpy.floor" ] ]
OriolAbril/pymc-experimental
[ "576931bc40191c7a2f9f40054d84dc31b5500c9b" ]
[ "pymc_experimental/tests/test_bart.py" ]
[ "import numpy as np\nimport pytest\n\nfrom numpy.random import RandomState\nfrom numpy.testing import assert_almost_equal, assert_array_equal\n\nimport pymc as pm\nimport pymc_experimental as pmx\n\nfrom pymc.tests.test_distributions_moments import assert_moment_is_expected\n\n\ndef test_split_node():\n split_no...
[ [ "numpy.random.normal", "numpy.random.binomial", "numpy.array_equal", "numpy.zeros", "numpy.random.RandomState", "numpy.testing.assert_almost_equal", "numpy.hstack" ] ]
ktmurray1999/ctrnn-examples
[ "85273a908207f881326b9258981a661b9f42cba8" ]
[ "model.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Nov 25 11:52:03 2021\n\n@author: murra\n\"\"\"\nimport torch\nimport torch.nn as nn\n\nclass ctrnnCell(nn.Module):\n def __init__(self, dim, dt):\n super(ctrnnCell, self).__init__()\n self.linear = nn.Linear(dim, dim, bias=True)\n self.tau = n...
[ [ "torch.nn.Linear", "torch.zeros", "torch.nn.Sigmoid", "torch.ones", "torch.tensor" ] ]
zjy8006/MonthlyRunoffForecastByAutoReg
[ "661fcb5dcdfbbb2ec6861e1668a035b50e69f7c2" ]
[ "results_analysis/plot_two_vs_three_stage_decomposer_svr.py" ]
[ "import matplotlib.pyplot as plt\nplt.rcParams['font.size']=10\nimport pandas as pd\nimport numpy as np\nimport os\nroot_path = os.path.dirname(os.path.abspath('__file__'))\n# root_path = os.path.abspath(os.path.join(root_path,os.path.pardir))\ngraphs_path = root_path+'/graphs/'\nimport sys\nsys.path.append(root_pa...
[ [ "matplotlib.pyplot.text", "matplotlib.pyplot.xlim", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylim", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.savefig", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show", ...
pcorrado/Cardiac-Segmentation-4D-Flow
[ "23cfa4dcd17dd8195490018879fec104e362c5f5", "23cfa4dcd17dd8195490018879fec104e362c5f5" ]
[ "cnnSegmentShortAxis.py", "common/deploy_network.py" ]
[ "import sys\r\nimport os\r\nimport time\r\nimport random\r\nimport numpy as np\r\nimport nibabel as nib\r\nimport tensorflow as tf\r\nimport math\r\nfrom scipy.ndimage import zoom\r\nsys.path.insert(1, '/export/home/pcorrado/CODE/')\r\n\r\nprint(sys.path)\r\nfrom ukbb_cardiac.common.network import build_FCN\r\nfrom...
[ [ "numpy.pad", "numpy.zeros", "tensorflow.Session", "numpy.transpose", "scipy.ndimage.zoom", "tensorflow.global_variables_initializer", "numpy.expand_dims" ], [ "tensorflow.compat.v1.global_variables_initializer", "numpy.pad", "numpy.zeros", "tensorflow.compat.v1.app....
sinodanishspain/BioMulti-L-NL-Model
[ "ce3ef6834f82d14c3a9b44f6ce79175c79fed432" ]
[ "saliency/main.py" ]
[ "#!usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n'''\n======================================================================\nDigitialBrain Version 2.1\nCopyright(c) 2020 Qiang Li\nAll Rights Reserved.\nqiang.li@uv.es\nDistributed under the (new) BSD License.\n####################################################...
[ [ "numpy.rot90", "numpy.dot", "numpy.lib.stride_tricks.as_strided", "numpy.fft.ifft2", "numpy.fft.fft2", "numpy.min", "numpy.exp", "numpy.mean", "numpy.multiply", "numpy.where", "numpy.sign", "matplotlib.pyplot.gcf", "numpy.size", "numpy.cos", "matplotlib....
boeddeker/cntk_helper
[ "c13bf249d4576fbd90f3ac8efb262f54b462a386" ]
[ "cntk_helper/ops/parameterized_vector_norm.py" ]
[ "import numpy as np\n\nimport cntk\nfrom cntk import output_variable, user_function\nfrom cntk.ops.functions import UserFunction\n\nfrom cntk_helper.numerical_grad import test_numerical_grad\n\nclass ParameterizedVectorNorm(UserFunction):\n\n def __init__(self, arg1, axis=0, \n name='Parameterize...
[ [ "numpy.sum", "numpy.random.normal", "numpy.random.uniform", "numpy.sqrt" ] ]
georkap/ego_md_mtl
[ "2190100a046df2c9ca6228c23ba99bd6094b4fc8" ]
[ "other/dataset preparation/build_splits_adl.py" ]
[ "\"\"\"\nTakes a folder with frame ranges and action annotations for the ADL dataset and produces a split file suitable for\nmtl advanced\n\"\"\"\n\nimport os, argparse\nimport numpy as np\n\nvalid_actions = [1,2,3,4,5,6,9,10,11,12,13,14,15,17,20,22,23,24]\n\ndef make_class_mapping_generic(classes):\n classes = ...
[ [ "numpy.sort" ] ]
YCAyca/deepface
[ "1f2df15ecd8db517047c1327e0bb998b96e79680" ]
[ "deepface/model_comparison/face_recognition_compare_models.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sat Sep 19 16:51:38 2020\r\n\r\n@author: aktas\r\n\"\"\"\r\n\r\n# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sat Sep 19 14:03:31 2020\r\n\r\n@author: aktas\r\n\"\"\"\r\n\r\nfrom deepface import DeepFace\r\nfrom deepface.basemodels import VGGFace, OpenFace, Facenet...
[ [ "numpy.expand_dims" ] ]
shiyaol/flappy_backup_2
[ "ca428d53f718f079445ccfd8d26eee2a5041ce6c" ]
[ "test.py" ]
[ "import argparse\nimport torch\nimport cv2\nfrom src.deep_q_network import DeepQNetwork\nfrom src.flappy_bird import FlappyBird\nfrom src.utils import pre_processing\n\n\ndef get_args():\n parser = argparse.ArgumentParser(\n \"\"\"Implementation of Deep Q Network to play Flappy Bird\"\"\")\n parser.add...
[ [ "torch.cat", "torch.cuda.manual_seed", "torch.from_numpy", "torch.manual_seed", "torch.cuda.is_available", "torch.argmax" ] ]
IanYHWu/tied-representation-learning
[ "bda9814dc40cf552f7bdd2ade78f5e2958a7ea83" ]
[ "finetune_test.py" ]
[ "\"\"\" Test a finetuned model. \"\"\"\nimport torch\nimport torch.nn.functional as F \nimport numpy as np\nimport pandas as pd\nimport wandb\nfrom transformers import MBart50TokenizerFast, MBartForConditionalGeneration, MBartConfig\nfrom datasets import load_dataset\nfrom itertools import combinations\nimport time...
[ [ "pandas.DataFrame", "torch.cuda.is_available", "torch.utils.data.DataLoader" ] ]
kariustobias/Covid-19-analysis
[ "b86fc7ebd375b2368dad7bba1eced3092d320cd3" ]
[ "src/CovidMap.py" ]
[ "import pandas as pd\nimport numpy as np\nimport pygal\nimport os\nfrom pygal.maps.world import World\nfrom pygal.style import Style\nfrom PIL import Image, ImageDraw, ImageFont\nfrom datetime import timedelta, date\nfrom IPython.display import SVG, display\nfrom dataclasses import dataclass\nfrom Colormap import C...
[ [ "pandas.to_datetime" ] ]
alexrockhill/img_pipe
[ "e068a4ae69588768c677d54091ede9016e4710cf" ]
[ "img_pipe/surface_warping_scripts/project_electrodes_anydirection.py" ]
[ "import numpy as np\n\ndef project_electrodes_anydirection(tri, vert, elecmatrix, proj_direction):\n ''' \n Projects electrode locations onto the convex hull of a cortical surface.\n This allows for the electrode locations to wrap smoothly around the\n cortical surface instead of being outside the brain...
[ [ "numpy.array", "numpy.zeros", "numpy.sum", "numpy.tile", "numpy.any", "numpy.where", "numpy.invert", "numpy.abs", "numpy.cross" ] ]
LukasSteffensen/movielens-imdb-exploration
[ "a7de353b3a065a98820175ef58ac4621e72a9b2b" ]
[ "rec_app/app.py" ]
[ "from flask import Flask, request, render_template, session\nimport numpy as np\nimport pandas as pd\nfrom surprise import NMF, Dataset, Reader\nfrom scipy.stats import hmean \nimport os\n\nfrom src.data import initial_data, get_trending_movie_ids, update_data, onehotencoding2genre\nfrom src.siamese_training import...
[ [ "numpy.dot", "pandas.merge", "pandas.DataFrame", "scipy.stats.hmean", "pandas.read_csv" ] ]
ClaireDelplancke/CCPi-Framework
[ "3f0cb9dd363ac386832d3034717f022c3b2952a1" ]
[ "Wrappers/Python/cil/optimisation/algorithms/CGLS.py" ]
[ "# -*- coding: utf-8 -*-\n# This work is part of the Core Imaging Library (CIL) developed by CCPi \n# (Collaborative Computational Project in Tomographic Imaging), with \n# substantial contributions by UKRI-STFC and University of Manchester.\n\n# Licensed under the Apache License, Version 2.0 (the \"License...
[ [ "numpy.maximum" ] ]
amywinecoff/t-recs
[ "c4db28013f397ccad9eb5f5e530ca301599f36fb" ]
[ "trecs/tests/test_measurements.py" ]
[ "import test_helpers\nimport numpy as np\nfrom trecs.models import SocialFiltering, ContentFiltering, BassModel\nfrom trecs.metrics import (\n Measurement,\n HomogeneityMeasurement,\n MSEMeasurement,\n DiffusionTreeMeasurement,\n StructuralVirality,\n InteractionMeasurement,\n RecSimilarity,\n ...
[ [ "numpy.random.choice", "numpy.array_equal", "numpy.zeros", "numpy.ones", "numpy.eye", "numpy.random.randint" ] ]
jimeffry/MTCNN-TF
[ "4d41c5fd2dc13008d39b868aa2e921a7ff731e10" ]
[ "Detection/detector.py" ]
[ "import tensorflow as tf\nimport numpy as np\nimport os\n#from print_ckpt import print_ckpt\nfrom tensorflow.contrib import slim\nimport sys\nsys.path.append(\"../\")\nfrom train_models.MTCNN_config import config\n\nclass Detector(object):\n #net_factory:rnet or onet\n #datasize:24 or 48\n def __init__(sel...
[ [ "numpy.concatenate", "tensorflow.GPUOptions", "tensorflow.Graph", "tensorflow.train.Saver", "tensorflow.train.get_checkpoint_state", "numpy.shape", "tensorflow.placeholder", "numpy.arange", "tensorflow.summary.merge_all", "tensorflow.summary.FileWriter", "tensorflow.ide...
RodrigoLima82/Maratona_IBM_2021
[ "c49236c5c7ef6586c121392a254de2ef14150c9e" ]
[ "Desafio_02/functions/api.py" ]
[ "import pandas as pd\nimport numpy as np\nimport csv\nimport json\nimport sys\n\ndef createDataframeConfig():\n data = [{\"info\": \"co2\", \"unit\": \"PPM\", \"env\": \"activity-room\", \"val_ini\": \"-1000000\", \"val_end\": \"500\"}, {\"info\": \"co2\", \"unit\": \"PPM\", \"env\": \"refectory\", \"val_ini\": ...
[ [ "pandas.DataFrame.from_dict", "pandas.DataFrame", "pandas.to_numeric" ] ]
pulse2percept/pulse2percept
[ "65c11393a33d1531cd02a3e38243414bf8172e9a" ]
[ "pulse2percept/implants/tests/test_bvt.py" ]
[ "import numpy as np\nimport pytest\nimport numpy.testing as npt\nfrom pulse2percept.implants.base import ProsthesisSystem\nfrom pulse2percept.implants.bvt import BVT24\n\n\n@pytest.mark.parametrize('x', (-100, 200))\n@pytest.mark.parametrize('y', (-200, 400))\n@pytest.mark.parametrize('rot', (-45, 60))\ndef test_BV...
[ [ "numpy.array", "numpy.sin", "numpy.matmul", "numpy.testing.assert_equal", "numpy.testing.assert_almost_equal", "numpy.ones", "numpy.cos", "numpy.deg2rad" ] ]
Ghidra-Guys/openpilot
[ "033473df409d9449efd76c56dcc86bc8ad827eb8" ]
[ "selfdrive/test/longitudinal_maneuvers/test_longitudinal.py" ]
[ "#!/usr/bin/env python3\nimport os\nos.environ['OLD_CAN'] = '1'\nos.environ['NOCRASH'] = '1'\n\nimport unittest\nimport shutil\nimport matplotlib\nmatplotlib.use('svg')\n\nfrom selfdrive.config import Conversions as CV\nfrom selfdrive.car.honda.values import CruiseButtons as CB\nfrom selfdrive.test.longitudinal_man...
[ [ "matplotlib.use" ] ]
xyvivian/adlib
[ "79a93baa8aa542080bbf55734168eb89317df83c", "79a93baa8aa542080bbf55734168eb89317df83c" ]
[ "adlib/adversaries/adversarial_learning.py", "adlib/tests/datasets/email_dataset_test.py" ]
[ "from adlib.adversaries.adversary import Adversary\nfrom typing import List, Dict\nfrom data_reader.binary_input import Instance\nfrom copy import deepcopy\nimport numpy as np\nimport math\n\n\"\"\"\nBased on the Adversarial learning by Daniel Loaw and Christopher Meek.\nImplementation of the adversarial classifier...
[ [ "numpy.linspace" ], [ "sklearn.svm.SVC" ] ]
taneishi/unet_torch
[ "7827eb740121722fc50111ccba6a08704c854c27" ]
[ "models.py" ]
[ "import torch\nimport torch.nn as nn\nimport torchvision.models as models\n\ndef double_conv(in_channels, out_channels):\n return nn.Sequential(\n nn.Conv2d(in_channels, out_channels, 3, padding=1),\n nn.ReLU(inplace=True),\n nn.Conv2d(out_channels, out_channels, 3, padding=1),\n nn.R...
[ [ "torch.cat", "torch.nn.MaxPool2d", "torch.nn.Sequential", "torch.nn.Sigmoid", "torch.nn.ReLU", "torch.nn.Upsample", "torch.nn.Conv2d" ] ]
Antiguru11/uplift
[ "ffaa5bcd20d6aa264fa3b2d191327c86384e4f7c" ]
[ "uplift/metrics.py" ]
[ "from functools import partial\n\nimport numpy as np\nfrom sklearn.utils import check_array, check_consistent_length, check_scalar\n\nfrom .utils import check_w\n\n\ndef uplift_at_k(uplift, y, w,\n *,\n k: float = 0.3,\n strategy: str = 'overall',) -> float:\n uplift ...
[ [ "sklearn.utils.check_array", "sklearn.utils.check_scalar", "sklearn.utils.check_consistent_length" ] ]
hou-yz/FairMOT
[ "207ad7ba6bd0807de0333d2e423132772a1f2968" ]
[ "src/lib/tracker/multitracker.py" ]
[ "import numpy as np\nfrom numba import jit\nfrom collections import deque\nimport itertools\nimport os\nimport os.path as osp\nimport time\nimport torch\nimport cv2\nimport torch.nn.functional as F\n\nfrom lib.models.model import create_model, load_model\nfrom lib.models.decode import mot_decode\nfrom lib.tracking_...
[ [ "numpy.concatenate", "torch.device", "numpy.array", "numpy.linalg.norm", "torch.nn.functional.normalize", "numpy.asarray", "torch.no_grad", "numpy.where", "matplotlib.pyplot.show", "numpy.partition", "matplotlib.pyplot.imshow" ] ]
mingming81/PBRE-
[ "2e800d918a0466217cc35c9c91015d3c0865b64d" ]
[ "light_services/pedagogicalRuleEvaluation_light_service_dqn_v2.py" ]
[ "# Compared pedagogical method and neural network method by comparing data acquired from\r\n# 'logicalRuleEvaluation.py' and 'generate_testing_dataSet.py (seen in enst cloud service)'\r\n# %%\r\nimport torch \r\nimport numpy as np \r\n\r\nimport random\r\nimport os\r\n\r\n# device=torch.device(\"cuda\" if torch.cud...
[ [ "numpy.concatenate", "torch.device", "numpy.delete", "numpy.full", "numpy.array", "numpy.load", "numpy.save" ] ]
gabrielcabana21/pyro
[ "a3107d7b676a0fe1afb89a18a5a63d08fe9f0998" ]
[ "pyro/control/robotcontrollers.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed May 8 12:43:21 2019\n\n@author: alxgr\n\"\"\"\n\n###############################################################################\nimport numpy as np\n###############################################################################\nfrom pyro.control import controller...
[ [ "numpy.dot", "numpy.zeros", "numpy.linalg.pinv", "numpy.ones", "numpy.identity", "numpy.linalg.inv" ] ]