repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
btlorch/adversarial-robustness-toolbox
[ "3789bd9fa7b6ea6f62e0ffe61df362dfa9f6df5e", "3789bd9fa7b6ea6f62e0ffe61df362dfa9f6df5e" ]
[ "art/preprocessing/standardisation_mean_std/standardisation_mean_std_pytorch.py", "art/attacks/inference/membership_inference/black_box.py" ]
[ "# MIT License\n#\n# Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the Software without restriction, including without limita...
[ [ "torch.device", "torch.cuda.is_available", "torch.cuda.current_device", "torch.tensor" ], [ "sklearn.ensemble.RandomForestClassifier", "numpy.unique", "torch.zeros", "torch.cat", "torch.round", "torch.utils.data.DataLoader", "torch.nn.BCELoss", "numpy.concatenat...
knicos/voltu
[ "70b39da7069f8ffd7e33aeb5bdacc84fe4a78f01" ]
[ "SDK/CPP/tests/test_intrinsics.py" ]
[ "import unittest\nimport voltu\nimport numpy as np\n\nclass Intrinsics(unittest.TestCase):\n\n def test_default_ctor(self):\n intr = voltu.Intrinsics()\n self.assertIsNotNone(intr)\n\n def test_create(self):\n fx = 2.0\n fy = 3.0\n cx = 4.0\n cy = 5.0\n w = 6\n...
[ [ "numpy.array" ] ]
pth051001/Gender-Recognition-by-Voice-with-different-ML-classification-methods
[ "5158f951d8df52eeff229c80555194d50aeca41e" ]
[ "NaiveBayesFromScratch.py" ]
[ "import numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom scipy.stats import multivariate_normal\r\n\r\nclass NaiveBayesFromScratch():\r\n def __init__(self, X, y):\r\n self.num_examples, self.num_features = X.shape\r\n self.num_classes = len(np.unique(y))\r\n\r\n def fit(self, X, y):\r\n ...
[ [ "numpy.unique", "numpy.argmax", "numpy.mean", "numpy.var", "numpy.zeros" ] ]
alexamici/xpop
[ "940f935dfd125d5d51ab7b71a281196c55b29da4" ]
[ "xpop/data/italy.py" ]
[ "import numpy as np\nimport pandas as pd\nimport xarray as xr\n\n\ndef istat_deaths_to_pandas(path):\n istat = pd.read_csv(path, encoding=\"8859\", na_values=\"n.d.\", dtype={\"GE\": str})\n\n # make a date index from GE\n def ge2month_day(x):\n return f\"{x[:2]}-{x[2:]}\"\n\n month_day = istat[\...
[ [ "pandas.read_csv", "numpy.datetime64" ] ]
wangnmiaon5/stock_investiment
[ "468850106db71add64be1c81afad8209578a68ab" ]
[ "good_morning/good_morning.py" ]
[ "# Copyright (c) 2015 Peter Cerno\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publ...
[ [ "numpy.isnan", "pandas.tseries.offsets.YearEnd", "pandas.datetime.strptime", "pandas.DataFrame" ] ]
kundajelab/fastISM
[ "1573feccba1ad5d9f1cee508f5bb03c4aa09bb2b" ]
[ "test/test_simple_nested_architectures.py" ]
[ "import tensorflow as tf\nimport unittest\n\nfrom context import fastISM\n\ndef conv_block(input_shape=(108,4)):\n inp = tf.keras.Input(shape=input_shape)\n x = tf.keras.layers.Conv1D(20, 3, padding='same')(inp)\n x = tf.keras.layers.MaxPooling1D(3)(x)\n x = tf.keras.layers.Conv1D(20, 5, padding='same')...
[ [ "tensorflow.keras.layers.Maximum", "tensorflow.keras.Input", "tensorflow.keras.layers.Subtract", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Conv1D", "tensorflow.keras.layers.MaxPooling1D", "tensorflow.keras.Model", "tensorflow.keras.layers.Add", "tensorflow.keras...
Sloug/h2o-3
[ "74f3eeee85aea3513adef1a7b519865d314a068a" ]
[ "h2o-py/tests/pyunit_utils/utilsPY.py" ]
[ "from __future__ import print_function\nfrom future import standard_library\nstandard_library.install_aliases()\nfrom builtins import range\nfrom past.builtins import basestring\nfrom scipy.sparse import csr_matrix\nimport sys, os\nimport pandas as pd\nfrom six import string_types\n\ntry: # works with python...
[ [ "numpy.asarray", "numpy.kron", "pandas.DataFrame", "numpy.concatenate", "numpy.any", "numpy.exp", "numpy.where", "numpy.argmax", "numpy.ravel", "numpy.zeros", "pandas.concat", "numpy.isnan", "scipy.sparse.csr_matrix", "numpy.genfromtxt", "numpy.random.ra...
jasoriya/HackerEarth-DL-3-Challenge
[ "b1bd5b3955913327408541ef4b14c260b9014593" ]
[ "src/data_prep.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Apr 15 22:12:06 2018\n\n@author: Shreyans\n\"\"\"\n\nimport pandas as pd\nimport numpy as np\nfrom keras import applications\nfrom keras.applications.resnet50 import preprocess_input\nfrom keras.preprocessing import image\nimport os\n\ntrain_data = pd.read_csv(\"../d...
[ [ "numpy.char.mod", "pandas.read_csv", "numpy.expand_dims", "numpy.save" ] ]
safwanhossain/fairlearn
[ "87de12b6f3036fc61efdbf0b8918470064e5b783" ]
[ "test/unit/metrics/test_create_group_metric_set.py" ]
[ "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport numpy as np\nimport pytest\n\nfrom fairlearn.metrics import group_accuracy_score, group_roc_auc_score\nfrom fairlearn.metrics import create_group_metric_set\n\nfrom test.unit.input_convertors import conversions...
[ [ "numpy.array_equal" ] ]
Alessi0X/Graph_Sampling
[ "b906c35314ddfecca0132092a21d21ca8542073b" ]
[ "build/lib/Graph_Sampling/SRW_RWF_ISRW.py" ]
[ "import random\nimport time\nimport datetime\nimport io\nimport array,re,itertools\nimport numpy as np\nimport networkx as nx\nimport matplotlib.pyplot as plt\nfrom itertools import groupby\n\nclass SRW_RWF_ISRW:\n\n def __init__(self):\n self.growth_size = 2\n self.T = 100 #number of iterations\n ...
[ [ "numpy.random.choice" ] ]
BaldrLector/NeuralTracking
[ "ddf6a629937bc226b35928bea2f158aef833ed72" ]
[ "render/camera.py" ]
[ "'''\nMIT License\n\nCopyright (c) 2019 Shunsuke Saito, Zeng Huang, and Ryota Natsume\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation th...
[ [ "numpy.dot", "numpy.sqrt", "numpy.eye", "numpy.matmul", "numpy.linalg.norm", "numpy.cross", "numpy.array", "numpy.zeros" ] ]
cbd-nslc/LungCancerDetector
[ "50b2517814c68368a86752162d70b00115f9bd4a" ]
[ "DSB2017/net_classifier.py" ]
[ "import torch\nfrom torch import nn\nfrom DSB2017.layers import *\nfrom torch.nn import DataParallel\nfrom torch.backends import cudnn\nfrom torch.utils.data import DataLoader\nfrom torch import optim\nfrom torch.autograd import Variable\nfrom torch.utils.data import Dataset\nfrom scipy.ndimage.interpolation import...
[ [ "torch.nn.Sequential", "torch.nn.Dropout", "torch.sigmoid", "torch.Tensor", "torch.cat", "torch.nn.ConvTranspose3d", "torch.nn.Dropout3d", "torch.nn.Linear", "torch.nn.MaxPool3d", "torch.nn.Conv3d", "torch.nn.BatchNorm3d", "torch.prod", "torch.nn.ReLU", "num...
ckrogers/aviio_technical_component
[ "85cc3209098d335aee404937c0117a869d31650a" ]
[ "aviio_technical_component/aviio_technical_component.py" ]
[ "import logging\nimport os\nimport pandas as pd\nfrom pathlib import Path\nimport requests\nfrom requests.packages.urllib3.util.retry import Retry\nfrom requests.adapters import HTTPAdapter\n\n\nlogger = logging.getLogger()\nlogger.setLevel(logging.DEBUG)\nhandler = logging.FileHandler(\"aviio_technical_component.l...
[ [ "pandas.DataFrame" ] ]
akhambhati/pyEisen
[ "62ec6cb3168ff6f5c9ef81e51b0041b4809d2613" ]
[ "pyeisen/family.py" ]
[ "\"\"\"\nFunctions and Wrappers to define families of kernels for signal analysis.\n\nAuthor: Ankit N. Khambhati\nAdapted from: https://github.com/pennmem/ptsa_new/blob/master/ptsa/wavelet.py\nLast Updated: 2018/08/31\n\"\"\"\n\nimport numpy as np\nfrom scipy.signal import morlet as scipy_morlet\n\n\ndef morlet(fre...
[ [ "numpy.abs", "numpy.arange", "numpy.ceil", "scipy.signal.morlet", "numpy.argsort", "numpy.array" ] ]
Bhaskers-Blu-Org1/skills-for-planning
[ "98575d963e63d2c84075df9500c74c14f8a8553b" ]
[ "factops/factops/cgrid.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nimport seaborn as sns\nimport time\n\nclass CGridWorld:\n '''Continuous gridworld domain\n '''\n def __init__(self, n_dims=2, discrete_actions=False):\n if discrete_actions:\n self.n_actions = 9\n else:\n self.n_actio...
[ [ "numpy.clip", "matplotlib.pyplot.subplots", "numpy.stack", "matplotlib.pyplot.gcf", "numpy.all", "numpy.copy", "numpy.random.normal", "numpy.random.uniform", "numpy.random.randint" ] ]
ianthomas23/spatialpandas
[ "b6809e79f615e0be6fda6845b9725b5f87529c56" ]
[ "spatialpandas/geometry/base.py" ]
[ "import re\nfrom collections.abc import Container, Iterable\nfrom numbers import Integral\n\nimport numpy as np\nimport pandas as pd\nimport pyarrow as pa\nfrom pandas.api.extensions import ExtensionArray, ExtensionDtype\nfrom pandas.api.types import is_array_like\n\nfrom .._optional_imports import gp, sg\nfrom ..s...
[ [ "numpy.nonzero", "numpy.asarray", "numpy.isnan", "pandas.array", "numpy.dtype", "pandas.util._validators.validate_fillna_kwargs", "numpy.concatenate", "pandas.api.types.is_array_like", "numpy.isscalar", "pandas.isna", "numpy.array", "pandas.core.missing.get_fill_fun...
siriuslee/modeldb
[ "25e8354e126f2ddeb99ff76bb8136544b65dd581" ]
[ "client/verta/verta/_internal_utils/_utils.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport datetime\nimport glob\nimport inspect\nimport itertools\nimport json\nimport numbers\nimport os\nimport re\nimport string\nimport subprocess\nimport sys\nimport threading\nimport time\n\nimport requests\nfrom requests.adapters import HTTPAdapter\nfrom urllib3.util.retry import Ret...
[ [ "pandas.Timestamp" ] ]
RishikeshMagar/ManufacturingNet
[ "96e8624f0932123968d599a3b7c6511cd03a349d" ]
[ "ManufacturingNet/shallow_learning_methods/all_classification_models.py" ]
[ "from contextlib import redirect_stderr, redirect_stdout\nimport io\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.neural_network import MLPClassifier\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.metrics import roc_auc_score\nfrom sklearn.model_selection import train_test_s...
[ [ "sklearn.neural_network.MLPClassifier", "sklearn.svm.NuSVC", "sklearn.linear_model.LogisticRegression", "sklearn.ensemble.RandomForestClassifier", "sklearn.model_selection.train_test_split", "sklearn.svm.SVC", "sklearn.svm.LinearSVC" ] ]
Vole1/MC-CDP-BraTS2018
[ "32430dc87d40c8d1f41092598c839e0b34f32e7c" ]
[ "src/models/unets_do.py" ]
[ "from models.nasnet_do import NASNet_large_do\nfrom models.xception_padding import Xception\nfrom tensorflow.keras import Model\nfrom tensorflow.keras.applications import DenseNet169\nfrom tensorflow.keras.layers import UpSampling2D, Conv2D, BatchNormalization, Activation, concatenate, Add\nfrom tensorflow.keras.ut...
[ [ "tensorflow.keras.layers.Activation", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.UpSampling2D", "tensorflow.keras.applications.DenseNet169", "tensorflow.keras.layers.concatenate", "tensorflow.keras.Model", "tensorflow.keras.layers.BatchNormalization", "tensorflow.ke...
KeVincenty/single_timestamps_action_recognition
[ "35a60bba81d2875a46e94bef247cd3554cc3f08b" ]
[ "src/tf_model_zoo/bninception/parse_caffe.py" ]
[ "#!/usr/bin/env python\n\nimport argparse\n\nparser = argparse.ArgumentParser(description=\"Convert a Caffe model and its learned parameters to torch\")\nparser.add_argument('model', help='network spec, usually a ProtoBuf text message')\nparser.add_argument('weights', help='network parameters, usually in a name lik...
[ [ "numpy.array", "torch.from_numpy" ] ]
Leopard-X/tensorflow
[ "e4296aefff97e6edd3d7cee9a09b9dd77da4c034" ]
[ "tensorflow/python/framework/function.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.core.framework.function_pb2.FunctionDef", "tensorflow.python.util.tf_inspect.ismethod", "tensorflow.core.framework.op_def_pb2.OpDef", "tensorflow.python.ops.variable_scope.get_variable_scope", "tensorflow.python.ops.variable_scope._get_default_variable_store", "tensorflow.pytho...
Tyelab/sleap
[ "67b4b3e762571e70beadf940a64ed62d9481dafe" ]
[ "sleap/nn/model.py" ]
[ "\"\"\"This module defines the main SLEAP model class for defining a trainable model.\n\nThis is a higher level wrapper around `tf.keras.Model` that holds all the configuration\nparameters required to construct the actual model. This allows for easy querying of the\nmodel configuration without actually instantiatin...
[ [ "tensorflow.keras.Model", "tensorflow.keras.layers.Input" ] ]
cog-imperial/galini
[ "b27e62b4e981818624f8dc315f0cadee2f7cbed2" ]
[ "tests/unit/triangle/test_triangle.py" ]
[ "import pytest\nimport numpy as np\nimport pyomo.environ as aml\nfrom suspect.pyomo import create_connected_model\nfrom coramin.relaxations.iterators import relaxation_data_objects\nfrom coramin.utils.coramin_enums import RelaxationSide\nfrom coramin.relaxations.mccormick import PWMcCormickRelaxation\nfrom coramin....
[ [ "numpy.isclose" ] ]
dariusarnold/quadpy
[ "9dc7c1ebff99d15ae57ed9195cde94d97a599be8", "9dc7c1ebff99d15ae57ed9195cde94d97a599be8" ]
[ "tools/lebedev/import_lebedev.py", "quadpy/enr/_stroud_secrest.py" ]
[ "\"\"\"\nThis little helper takes Lebedev point and weight data from [1] and produces JSON files.\n\n[1]\nhttps://people.sc.fsu.edu/~jburkardt/datasets/sphere_lebedev_rule/sphere_lebedev_rule.html\n\"\"\"\nimport os\nimport re\n\nimport numpy\n\n\ndef read(filename):\n data = numpy.loadtxt(filename)\n azimuth...
[ [ "numpy.where", "numpy.loadtxt", "numpy.min" ], [ "numpy.full" ] ]
jasenjackson/FatFlies_scRNA
[ "f132ad94072c46d5b5e3778ee44154e189935da0" ]
[ "sample_sheet_parser.py" ]
[ "#!/usr/bin/env python3\n\"\"\"\n@author: Timothy Baker\n\nsamplesheet_parser.py\n\n04/01/2019:\n - Broke out original parse_sample_sheet() method to smaller\n parsing functions.\n - included new attributes for downstream configuration for zUMI\n and differential expression input...
[ [ "pandas.read_csv" ] ]
Niels-vv/Safe-RL-With-DR
[ "9f299661bb4cea9f0cd3121ea4b273cfb1016f9f" ]
[ "deepmdp/DeepMDP.py" ]
[ "import torch\nfrom torch import nn\nimport torch.nn.functional as F\n\n# Class to compute transition cost for DeepMDP\nclass TransitionAux(nn.Module):\n def __init__(self, device):\n super(TransitionAux, self).__init__()\n self.c_hid = 1\n self.action_dim = 32 * 32 # TODO pysc2 specific\n\n...
[ [ "torch.nn.SmoothL1Loss", "torch.rand_like", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.no_grad", "torch.nn.ZeroPad2d", "torch.autograd.grad", "torch.autograd.Variable" ] ]
ceroo1005/DATL
[ "ac7ceee4f6d0f9ce493743e80afdedd808806703" ]
[ "clusters.py" ]
[ "import torch\nimport torch.nn.functional as F\nfrom random import shuffle\nimport numpy as np\n\nclass CosineClusters():\n def __init__(self, num_clusters=100, Euclidean=False):\n self.clusters = [] # 储存各个集群\n self.item_cluster = {} # 储存每个样本所属集群\n self.Euclidean = Euclidean\n\n ...
[ [ "numpy.square", "matplotlib.pyplot.legend", "numpy.take", "matplotlib.pyplot.scatter", "matplotlib.pyplot.subplot", "torch.FloatTensor", "torch.nn.functional.cosine_similarity", "matplotlib.pyplot.show", "sklearn.datasets.make_blobs", "matplotlib.pyplot.figure" ] ]
DELTA37/TVN
[ "2c69a4147a5beedf4246401dafbca5b54906fea4" ]
[ "tvn/non_local/network.py" ]
[ "from torch import nn\n# from .non_local_concatenation import NONLocalBlock2D\n# from .non_local_gaussian import NONLocalBlock2D\nfrom .non_local_embedded_gaussian import NONLocalBlock2D\n# from .non_local_dot_product import NONLocalBlock2D\n\n\nclass Network(nn.Module):\n def __init__(self):\n super(Netw...
[ [ "torch.nn.Dropout", "torch.randn", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.Linear", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
polifonia-project/OCR
[ "81db8757556e27765a8512bec4b5271c0a2cb301" ]
[ "src/ocr_script.py" ]
[ "import argparse\nimport ntpath\nimport os\nimport re\n\nimport cv2\nimport numpy as np\nimport pytesseract\nfrom PIL import Image\nfrom pdf2image import convert_from_path\nfrom dotenv import load_dotenv\n\nload_dotenv()\nImage.MAX_IMAGE_PIXELS = 933120000\nSUPPORTED_IMAGE_FORMAT = ['.png', '.jpg', '.jpeg', '.tiff'...
[ [ "numpy.where", "numpy.ones" ] ]
svjack/Bu-Hts
[ "8621f4439bcd04800f887ac6b023ce49fc9a867f" ]
[ "script/feature-construct.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\nimport numpy as np\nimport pandas as pd\n\n\n# In[2]:\n\n\ntrain = pd.read_csv(\"../data/train.csv\", parse_dates=True, low_memory=False, index_col = \"Date\")\nstore = pd.read_csv(\"../data/store.csv\", low_memory=False)\nstore.fillna(0, inplace = True)\n\n\...
[ [ "pandas.merge", "pandas.read_csv", "pandas.DataFrame", "sklearn.preprocessing.OneHotEncoder" ] ]
averkij/transformer-deploy
[ "2a0b527dc187e14c718d36dbac8a3e29e34cf78b", "2a0b527dc187e14c718d36dbac8a3e29e34cf78b" ]
[ "src/transformer_deploy/convert.py", "src/transformer_deploy/benchmarks/utils.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright 2021, Lefebvre Sarrut Services\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#...
[ [ "torch.cuda.synchronize", "numpy.random.seed", "numpy.asarray", "torch.manual_seed", "torch.inference_mode", "torch.cuda.amp.autocast", "torch.quantization.quantize_dynamic", "torch.set_num_threads", "torch.cuda.is_available", "torch.cuda.get_device_name" ], [ "torc...
iht/kschool-challenge-dl
[ "da46222b1c8bd02e5294b9f6a7570dedb7a0ea9a" ]
[ "trainer/preprocessor.py" ]
[ "\"\"\"A class to preprocess images.\"\"\"\n\nfrom tensorflow.keras.preprocessing.image import ImageDataGenerator\n\n\nclass MyImagePreprocessor:\n \"\"\"Preprocess images for training or inference.\"\"\"\n\n def __init__(self, img_size, batch_size):\n \"\"\"Create a MyImagePreprocessor.\n\n Args:\n im...
[ [ "tensorflow.keras.preprocessing.image.ImageDataGenerator" ] ]
alexmagsam/keras-rpn
[ "394ed2506003f3bed3c5247d47213163f47931c0" ]
[ "lib/model.py" ]
[ "import os\nimport keras.layers as KL\nimport keras.models as KM\nimport keras.optimizers as KO\nimport tensorflow as tf\nfrom keras.callbacks import CSVLogger, ModelCheckpoint\n\nfrom lib import losses as ls\n\n\nclass RPN:\n\n def __init__(self, config, mode='train'):\n assert mode in ['train', 'inferen...
[ [ "tensorflow.shape", "tensorflow.reduce_mean" ] ]
finnhacks42/pandas
[ "64de074403c6e9a574e61aa0500d32ae48d2d4c6" ]
[ "pandas/io/parsers.py" ]
[ "\"\"\"\nModule contains tools for processing files into DataFrames or other objects\n\"\"\"\nfrom __future__ import print_function\nfrom collections import defaultdict\nimport re\nimport csv\nimport sys\nimport warnings\nimport datetime\nfrom textwrap import fill\n\nimport numpy as np\n\nfrom pandas import compat\...
[ [ "pandas.core.index.ensure_index_from_sequences", "pandas.errors.EmptyDataError", "numpy.asarray", "pandas.core.common.AbstractMethodError", "pandas.core.dtypes.common.is_dtype_equal", "pandas.errors.ParserError", "pandas.compat.range", "pandas.io.common._infer_compression", "pa...
UT-Austin-RPL/BUDS
[ "6b5ae1864b50bb6212fae4fdfba4ffc8e74f2e85", "6b5ae1864b50bb6212fae4fdfba4ffc8e74f2e85" ]
[ "models/model_utils.py", "multitask/generate_subgoal_embedding_singletask.py" ]
[ "import torch\nimport torch.nn as nn\n\nfrom collections import namedtuple\n\nUSE_GPU = torch.cuda.is_available()\n\nModality_input = namedtuple(\"Modality_input\", [\"agentview\", \"eye_in_hand\", \"force\", \"proprio\", \"frontview\"])\nModality_output = namedtuple(\"Modality_output\", [\"agentview_recon\", \"eye...
[ [ "torch.randn_like", "torch.sigmoid", "torch.ones", "torch.nn.Softplus", "torch.nn.ConvTranspose2d", "torch.cat", "torch.sqrt", "torch.randn", "torch.zeros", "torch.nn.Conv2d", "torch.nn.Sigmoid", "torch.exp", "torch.nn.Linear", "torch.flatten", "torch.nn...
grassking100/optuna
[ "3075a1cf6648b3a8f061f904177734a08bb3a3c3" ]
[ "examples/pytorch_simple.py" ]
[ "\"\"\"\nOptuna example that optimizes multi-layer perceptrons using PyTorch.\n\nIn this example, we optimize the validation accuracy of hand-written digit recognition using\nPyTorch and MNIST. We optimize the neural network architecture as well as the optimizer\nconfiguration. As it is too time consuming to use th...
[ [ "torch.nn.Sequential", "torch.nn.Dropout", "torch.nn.LogSoftmax", "torch.nn.functional.nll_loss", "torch.nn.Linear", "torch.no_grad", "torch.device", "torch.nn.ReLU" ] ]
ZhouKai90/object_detection_ssd_caffe
[ "47ae0ab8a6dff53f46f6d6be46a17479471f444e" ]
[ "demo/python/merge_bn_layers.py" ]
[ "import numpy as np\nimport sys, os\nimport caffe\n\ntrain_proto = os.path.join(os.getcwd(), '../../', 'models/deploy/ssd_vgg16_512.prototxt')\ntrain_model = os.path.join(os.getcwd(), '../../', 'models/deploy/ssd_vgg16_512.prototxt')\n\ndeploy_proto = os.path.join(os.getcwd(), '../../', 'models/deploy/deploy_ssd_vg...
[ [ "numpy.zeros", "numpy.sqrt" ] ]
sokian/tensorflow
[ "359f53686c87ee76e80353c32a3d22cfb1cf0989" ]
[ "tensorflow/python/kernel_tests/distributions/util_test.py" ]
[ "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.framework.test_util.run_in_graph_and_eager_modes", "numpy.sqrt", "numpy.asarray", "numpy.squeeze", "tensorflow.python.ops.array_ops.placeholder", "numpy.concatenate", "numpy.max", "tensorflow.python.ops.array_ops.zeros", "numpy.zeros_like", "tensorflow.py...
hunse/speedtest
[ "6e0edcd42d113a141b262d8d105c8f611dae63c4" ]
[ "test_theano_gpu.py" ]
[ "from __future__ import print_function\n\nimport os\nimport timeit\n\nimport numpy as np\n\ngpuflags = 'device=gpu,floatX=float32'\nif os.environ.has_key('THEANO_FLAGS'):\n os.environ['THEANO_FLAGS'] += gpuflags\nelse:\n os.environ['THEANO_FLAGS'] = gpuflags\nimport theano\nimport theano.tensor as T\ndtype = ...
[ [ "numpy.random.RandomState" ] ]
off99555/ssd_keras
[ "363ba6b47d0e631e7272031f9054f7c7ebc0615e" ]
[ "keras_layers/keras_layer_L2Normalization.py" ]
[ "'''\nA custom Keras layer to perform L2-normalization.\n\nCopyright (C) 2018 Pierluigi Ferrari\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE...
[ [ "tensorflow.keras.backend.l2_normalize", "tensorflow.keras.layers.InputSpec", "tensorflow.keras.backend.image_data_format", "numpy.ones" ] ]
basanovase/taming-transformers
[ "c30d4c0be67428fb63d0188b658d83a12fb4595f" ]
[ "taming/models/vqgan.py" ]
[ "import torch\nimport torch.nn.functional as F\nimport pytorch_lightning as pl\n\nfrom taming_transformers.main import instantiate_from_config\n\nfrom taming.modules.diffusionmodules.model import Encoder, Decoder\nfrom taming.modules.vqvae.quantize import VectorQuantizer2 as VectorQuantizer\nfrom taming.modules.vqv...
[ [ "torch.load", "torch.randn", "torch.nn.functional.conv2d", "torch.nn.Conv2d", "torch.no_grad", "torch.nn.functional.one_hot", "torch.argmax" ] ]
dineshresearch/Real_time_vehicle_tracking
[ "310d9cad9d151675c96fec3e5a103489ee9b2f46" ]
[ "opt1.py" ]
[ "import numpy as np\nimport cv2\n\ncap = cv2.VideoCapture('vtest.avi')\n\n# params for ShiTomasi corner detection\nfeature_params = dict( maxCorners = 100,\n qualityLevel = 0.3,\n minDistance = 7,\n blockSize = 7 )\n\n# Parameters for lucas kanade op...
[ [ "numpy.zeros_like", "numpy.random.randint" ] ]
meghu2791/DeepLearningModels
[ "d98190d1cc44f530b9cc6e51fb791c50c8fd5f4f" ]
[ "utils.py" ]
[ "import sys\nimport os\nimport operator\nimport re\nimport string\nimport nltk\n#Uncomment only for downloading NLTK collections (all): nltk.download()\nfrom nltk.tokenize import word_tokenize\nfrom nltk.stem import PorterStemmer\nfrom nltk.stem import WordNetLemmatizer\nfrom nltk.corpus import stopwords\nimport co...
[ [ "torch.LongTensor", "torch.Tensor", "torch.cat", "torch.from_numpy", "numpy.random.normal", "torch.no_grad", "torch.FloatTensor", "torch.stack", "numpy.zeros", "torch.cuda.memory_allocated" ] ]
yutashx/PiSense
[ "bc059e8e0bf17adafc116e10bd4a6a69b6d99cf1" ]
[ "reconstruction/reconstruction_system/sensors/realsense_recorder.py" ]
[ "# Open3D: www.open3d.org\n# The MIT License (MIT)\n# See license file or visit www.open3d.org for details\n\n# examples/python/reconstruction_system/sensors/realsense_recorder.py\n\n# pyrealsense2 is required.\n# Please see instructions in https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python\...
[ [ "numpy.hstack", "numpy.where", "numpy.dstack" ] ]
kex5n/Vehicles-Dispatch-Simulator
[ "d0cca03fbf56e4b0ceeef8dafc59de105c1d4507" ]
[ "objects/node.py" ]
[ "from typing import Any, List\n\nimport numpy as np\nimport pandas as pd\n\n\n# random.seed(1234)\nnp.random.seed(1234)\n# torch.manual_seed(1234)\n# torch.cuda.manual_seed_all(1234)\n# torch.backends.cudnn.deterministic = True\n\nclass Node:\n def __init__(self, id: int, node_index: int,longitude: float, latitu...
[ [ "numpy.array", "numpy.random.seed" ] ]
jiskattema/kernel_tuner
[ "dacd79e3371308092798f7f2394a5d20af8bdebd" ]
[ "kernel_tuner/interface.py" ]
[ "\"\"\"Kernel Tuner interface module\n\nThis module contains the main functions that Kernel Tuner\noffers to its users.\n\nAuthor\n------\nBen van Werkhoven <b.vanwerkhoven@esciencenter.nl>\n\nCopyright and License\n---------------------\n* Copyright 2016 Netherlands eScience Center\n\nLicensed under the Apache Lic...
[ [ "numpy.zeros_like", "numpy.isscalar" ] ]
alnah005/raccoon_identification
[ "1af1213b744e061bd6f5551b7f76585115f94b03" ]
[ "Mega_detector_raccoon_transfer_learning/log_files/parse_logs_to_csv.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nfile: parse_logs_to_csv.py\n\n@author: Suhail.Alnahari\n\n@description: \n\n@created: 2021-03-01T13:30:00.015Z-06:00\n\n@last-modified: 2021-03-02T19:24:22.570Z-06:00\n\"\"\"\n\n# standard library\nimport re \n\n# 3rd party packages\nimport pandas as pd\nimport numpy as np\n\n# loc...
[ [ "numpy.asarray" ] ]
sagek21/swift-coreml-transformers
[ "02228fbd905ffc1cebfad31b73de19dd1bd34969" ]
[ "model_generation/gpt2.py" ]
[ "import coremltools\nimport coremltools.models.datatypes as datatypes\nfrom coremltools.models import neural_network as neural_network\nfrom coremltools.models.utils import save_spec\nimport numpy as np\n# from test import *\n\n# get weights\nfrom pytorch_transformers import GPT2LMHeadModel\nmodel_name = \"gpt2\"\n...
[ [ "numpy.arange", "numpy.array", "numpy.zeros" ] ]
sajid-ali-nu/multislice
[ "1e36e067ff53809f4cc6286562b221c4bddbcb60" ]
[ "multislice/prop_utils.py" ]
[ "import numpy as np\nfrom multislice import prop\nfrom .fft_utils import FFT_2d_Obj\nimport matplotlib.pyplot as plt\nfrom tqdm import tqdm\nimport time\nimport numexpr as ne\nfrom skimage.restoration import unwrap_phase\n\n__all__ = ['modify',\n 'modify_two_materials_case_1',\n 'modify_two_mate...
[ [ "numpy.abs", "matplotlib.pyplot.subplots", "numpy.max", "numpy.copy", "numpy.int", "numpy.shape", "numpy.floor", "numpy.angle", "matplotlib.pyplot.show", "numpy.zeros" ] ]
dumpmemory/NonDeepNetworks
[ "5513bf588f4e64c99583440507232675c2e21e34" ]
[ "imagenet/timm/models/simplenet_impl/utils.py" ]
[ "import math\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport tqdm\nimport time as tm\nfrom timm.models.layers.drop import drop_path, drop_block_fast_2d\n\ndef round(f):\n return math.ceil(f / 2.) * 2\n\ndef num_param(net):\n return sum(p.numel() for p in net.parameters() if p.req...
[ [ "torch.transpose", "torch.zeros", "torch.cat", "torch.no_grad", "torch.mm", "torch.jit.trace", "torch.ones", "torch.sqrt", "torch.quantization.fuse_modules", "torch.reshape", "torch.nn.Sigmoid", "torch.ones_like", "torch.nn.functional.pad", "torch.nn.Sequent...
PrediktorAS/quarry
[ "80f14781506dcb2e85dbda8057ad184f93140ce5" ]
[ "tests/test_translate_from_rdslike_vanilla_with_owl.py" ]
[ "# Copyright 2021 Prediktor AS\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicabl...
[ [ "pandas.read_csv", "pandas.testing.assert_frame_equal" ] ]
Vishal-V/Tiny-ImageNet-Challenge
[ "14cbfc0785ee3026871ac39c3e9a677168fb8b1b" ]
[ "spp.py" ]
[ "from tensorflow.keras import Layer\nimport tensorflow.keras as K\n\n\nclass SpatialPyramidPooling(Layer):\n \"\"\"Spatial pyramid pooling layer for 2D inputs.\n See Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition,\n K. He, X. Zhang, S. Ren, J. Sun\n # Arguments\n po...
[ [ "tensorflow.keras.image_dim_ordering", "tensorflow.keras.max", "tensorflow.keras.cast", "tensorflow.keras.shape", "tensorflow.keras.concatenate", "tensorflow.keras.reshape", "tensorflow.keras.round" ] ]
xiaohan2012/lst
[ "793944d1dd8235adbe2f651270ab12e46ff8f6f7" ]
[ "tree_util.py" ]
[ "import matplotlib\n# Force matplotlib to not use any Xwindows backend.\nmatplotlib.use('Agg')\n\nimport networkx as nx\nfrom subprocess import check_output\n\nfrom dag_util import get_roots\nfrom test_util import make_path\n\n\ndef to_bracket_notation(tree):\n def aux(node):\n nbrs = sorted(tree.neighbor...
[ [ "matplotlib.use", "numpy.set_printoptions", "matplotlib.pyplot.savefig", "matplotlib.pyplot.figure" ] ]
luizperes/training-grammar-guru
[ "62bd0112a41c2833ae1b14c4b39d50c2c0778c25" ]
[ "neural-network/train_and_evaluate.py" ]
[ "# Based on https://csil-git1.cs.surrey.sfu.ca/lperesde/nlpclass-1777-pixel/blob/master/evaluator/tmosharr/deep_learning.py\nimport numpy as np\nimport pandas as pd\nfrom keras.models import Sequential\nfrom keras.layers import Dense\nfrom keras.wrappers.scikit_learn import KerasClassifier\nfrom keras.utils import ...
[ [ "sklearn.preprocessing.LabelEncoder", "pandas.read_csv", "numpy.random.seed" ] ]
srivama/Python
[ "809d4c077c179feb077f09a3cd2501f9724366a2" ]
[ "other/game_of_life/game_o_life.py" ]
[ "'''Conway's Game Of Life, Author Anurag Kumar(mailto:anuragkumarak95@gmail.com) \n\nRequirements:\n - numpy\n - random\n - time\n - matplotlib\n\nPython:\n - 3.5\n\nUsage:\n - $python3 game_o_life <canvas_size:int>\n\nGame-Of-Life Rules:\n \n 1.\n Any live cell with fewer than two live neighbours\n dies, as ...
[ [ "numpy.array", "matplotlib.colors.ListedColormap", "matplotlib.pyplot.subplots" ] ]
brucew2099/Machine-Learning-for-Time-Series-Forecasting
[ "53d6b9cf8dcc3fb9c4ec22675143e9815d72a72e" ]
[ "Notebooks/common/utils.py" ]
[ "import os\nimport re\nimport sys\nimport zipfile\nfrom collections import UserDict\n\nimport numpy as np\nimport pandas as pd\nimport requests\n\n\n# This function unzips the GEFCom2014 data zip file and extracts the 'extended'\n# load forecasting competition data. Data is saved in energy.csv\ndef extract_data(dat...
[ [ "pandas.to_timedelta", "pandas.MultiIndex.from_tuples", "pandas.melt", "numpy.transpose" ] ]
ashwani227/humanBodyFallDetection
[ "41e33f0c820d4a2b72c2998c6095d234ff698ab2" ]
[ "Fall detection.py" ]
[ "import cv2\r\nimport numpy as np\r\nimport math\r\nimport winsound\r\nimport time\r\ncap = cv2.VideoCapture(\"C:\\\\Users\\\\singl\\\\Downloads\\\\MM803\\\\Video DataSet\\\\Office\\\\Video (3).avi\")\r\n#cap = cv2.VideoCapture(\"C:\\\\Users\\\\singl\\\\Downloads\\\\MM803\\\\Video DataSet\\\\Home_02\\\\video (41).a...
[ [ "numpy.arctan" ] ]
ARBUCHELI/EXERCISE-VPU-AND-THE-DEVCLOUD
[ "4e8063ff6710d48a2406d6325f03c9ef8241ab5f" ]
[ "Exercise_VPU_and_the_DevCloud.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# # Exercise: VPU and the DevCloud\n# \n# Now that we've walked through the process of requesting a CPU with a VPU (Intel® NCS2) on Intel's DevCloud and loading a model on the Intel® NCS2, you will have the opportunity to do this yourself with the addition of running infer...
[ [ "matplotlib.pyplot.figure" ] ]
webbery/lovechat
[ "51b6fff53957c03b36f8e61d5a3593cccda2ae2c" ]
[ "deploy/dp/dp.py" ]
[ "import numpy as np\nnp.set_printoptions(suppress=True)\nimport hanlp\n\nclass SyntacticParser():\n def __init__(self):\n print('begin syntatic')\n self.tokenizer = hanlp.load('PKU_NAME_MERGED_SIX_MONTHS_CONVSEG')\n print('begin syntactic_parser')\n self.syntactic_parser = hanlp.load(...
[ [ "numpy.set_printoptions" ] ]
dan-r95/ChessVision
[ "736fff64f5743d9070bec7c817b7381a76944d57" ]
[ "board_old.py" ]
[ "import cv2\nimport numpy as np\nfrom utils import convertTo8U\nfrom math import *\n\nimg = cv2.imread('img1.jpg',0)\nim = cv2.resize(img, (int(0.2*img.shape[1]), int(0.2*img.shape[0])))\n\n# Otsu's thresholding - doesn't work\n# ret,thresh = cv2.threshold(im,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)\n# cv2.imshow('...
[ [ "numpy.vectorize" ] ]
dogfooter-master/dogfooter
[ "e1e39375703fe3019af7976f97c44cf2cb7ca0fa" ]
[ "dogfootermacro_main.py" ]
[ "\nimport threading\nimport time\nimport collections\nimport sys\nimport os\nimport likeyoubot_logger\nimport likeyoubot_win\nimport signal\nfrom PIL import ImageGrab\nimport cv2\nimport numpy as np\n\nfrom PyQt5.QtCore import *\nfrom PyQt5.QtGui import *\nfrom PyQt5.QtWebEngineWidgets import *\nfrom PyQt5.QtWidget...
[ [ "numpy.array" ] ]
coutouly/nenupy
[ "76cf9f6a6a93e9eed16f8450e3cfe385440a212e", "76cf9f6a6a93e9eed16f8450e3cfe385440a212e" ]
[ "nenupy/observation/sqldatabase.py", "nenupy/astro/sky.py" ]
[ "#! /usr/bin/python3\n# -*- coding: utf-8 -*-\n\n\n\"\"\"\n ************\n SQL Database\n ************\n\n Query obs containing 19 antennas in database:\n\n SELECT * \n FROM observation o \n inner join analogbeam a\n on o.id = a.observation_id\n where a.nAntennas = 19;\n\n Quer...
[ [ "numpy.arange", "numpy.array", "numpy.isin" ], [ "numpy.nanmax", "numpy.expand_dims", "numpy.sqrt", "numpy.nanmin", "numpy.arange", "numpy.sin", "matplotlib.ticker.LinearLocator", "matplotlib.pyplot.subplot", "matplotlib.patheffects.withStroke", "matplotlib....
dimaclimate/geocat-comp
[ "dcb55e22d69d96762b683652cf83f6b9ef4fcc38" ]
[ "src/geocat/comp/eofunc.py" ]
[ "import warnings\nfrom typing import Iterable\n\nimport numpy as np\nimport xarray as xr\nfrom eofs.xarray import Eof\n\n\ndef _generate_eofs_solver(data, time_dim=0, weights=None, center=True, ddof=1):\n \"\"\"Convenience function to be used in both `eofunc_eofs` and `eofunc_pcs`\n functions.\"\"\"\n\n # ...
[ [ "numpy.asarray", "numpy.arange", "numpy.transpose" ] ]
Vottivott/mildnet
[ "4787dc756f1abcab4f7cb57ffb8701dcaf27edba" ]
[ "trainer/image/directory_iterator.py" ]
[ "import logging\nimport multiprocessing\nimport os\nfrom functools import partial\n\nimport numpy as np\n\nfrom trainer.image.iterator import MildBatchFromFilesMixin, MildIterator\n\n\ndef _count_valid_files_in_directory(directory, white_list_formats, follow_links):\n \"\"\"Count files with extension in `white_l...
[ [ "numpy.zeros" ] ]
gbenznyc/neural-network
[ "84a7127cf5107facce0a5504f299e84135aa199f" ]
[ "perceptron.py" ]
[ "import numpy as np\n\nclass Perceptron:\n\tdef __init__(self, input_nodes, learning_rate, epochs=50, one_output=False):\n\t\tself.input_nodes = input_nodes\n\t\tself.learning_rate = learning_rate\n\t\tself.epochs = epochs\n\t\tself.one_output = one_output\n\n\t\t#Initialize weights, we add one to the input_nodes\n...
[ [ "numpy.dot", "numpy.asarray", "numpy.insert", "numpy.random.uniform", "numpy.exp" ] ]
JochenZoellner/tf_neiss-1
[ "c91019e5bce6d3c7512237eec5ea997fd95304ac" ]
[ "input_fn/input_fn_2d/data_gen_2dt/data_gen_t2d_util/triangle_2d_helper.py" ]
[ "import logging\n\nimport numpy as np\n\n\nclass Fcalculator:\n def __init__(self, p1=np.array([0.0, 0.0]), p2=np.array([1.0, 0.0]), p3=np.array([0.0, 1.0]),\n epsilon=np.array(0.0001), no_check=False, complex_phi=False):\n self._p1 = np.array(p1, dtype=np.float128)\n self._p2 = np....
[ [ "numpy.logical_xor", "numpy.abs", "numpy.logical_and", "numpy.isnan", "numpy.arange", "numpy.cos", "numpy.stack", "numpy.sin", "numpy.full_like", "numpy.exp", "numpy.errstate", "numpy.array", "numpy.zeros", "numpy.where" ] ]
athiede13/free_speech
[ "bde32c2d48724c98f089376876cf9888f67a9f20" ]
[ "stats/contrast_cluster_perm/cluster_correction.py" ]
[ "\"\"\"\nApply cluster correction for independent-samples T-test based on spatial proximity and cluster size.\n\nInspired by MNE tutorial.\n\nCreated on Fri Feb 22 13:21:40 2019\n@author: Anja Thiede <anja.thiede@helsinki.fi>\n\"\"\"\n\nimport numpy as np\nfrom scipy import stats\nfrom scipy.io import loadmat\nimpo...
[ [ "matplotlib.pyplot.hlines", "scipy.io.loadmat", "numpy.save", "matplotlib.pyplot.plot", "numpy.max", "scipy.stats.gaussian_kde", "numpy.int", "numpy.load", "numpy.where", "matplotlib.pyplot.hist", "matplotlib.pyplot.figure" ] ]
osu-anticheat/wtc-lzma-compressor
[ "bc67eeea6928f505b65e90b2884067c23671bf9d" ]
[ "wtc/wtc.py" ]
[ "import lzma\r\nimport struct\r\n\r\nimport numpy as np\r\n\r\ndef unsorted_diff_pack_16_8(int16s):\r\n \"\"\"\r\n Packs the differential of the input to bytes in little endian order.\r\n\r\n Args:\r\n List ints16s: The list of shorts to differentially compress.\r\n\r\n Returns:\r\n The di...
[ [ "numpy.int32", "numpy.int8", "numpy.cumsum", "numpy.int16", "numpy.diff", "numpy.array" ] ]
Just-DIRECT-Capstone/Protein-Purification-Model-Public
[ "cf18d9669dfc4d49e53bb3e6e78c06cb42bf404a" ]
[ "visualization/simple_data_vis.py" ]
[ "\"\"\"imports\"\"\"\nfrom inspect import isdatadescriptor\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport utils\nfrom surrogate_models.nn_defs import multi_mse\n\ndef histograms(data,x_data,y_data):\n \"\"\"builds histograms\"\"\"\n n_outputs = len(y_data)\n n_inputs = len(x_data)\n n_gen ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.gca", "matplotlib.pyplot.tight_layout", "numpy.log", "numpy.arange", "matplotlib.pyplot.ylim", "matplotlib.pyplot.subplots", "numpy.ones", "matplotlib.pyplot.plot", "numpy.ceil", "matplotlib.pyplot.xlim", "matplotlib.py...
Jonbroad15/cpg-transformer
[ "2d2a1ca787bb25869f3981ba977632fc0d2b5eb1" ]
[ "cpg_transformer/camelia.py" ]
[ "from catboost import CatBoostClassifier\nimport pandas as pd\nimport numpy as np\n\nclass CaMeliaModel():\n def __init__(self, dropnans=False, learning_rate=0.1, max_depth=7, verbose=100,\n eval_metric='AUC', device='GPU', train_dir=None):\n self.dropnans = dropnans\n self.model = ...
[ [ "pandas.isnull", "numpy.savez_compressed", "numpy.stack", "numpy.random.shuffle" ] ]
felizang/IIC-pytorch3
[ "c16928fd497089b3776c7dc3a2ac89b863314a62" ]
[ "iic/cluster_sobel_twohead.py" ]
[ "from __future__ import print_function\n\nimport argparse\n# import itertools\nimport os\nimport pickle\nimport sys\nfrom datetime import datetime\n\nimport matplotlib\nimport numpy as np\nimport torch\n\nimport matplotlib.pyplot as plt\nfrom torch.optim import Adam\n\nimport archs as archs\nfrom utils_cluster impo...
[ [ "torch.zeros", "torch.load", "matplotlib.use", "torch.nn.DataParallel", "numpy.array" ] ]
carlomt/dicom_tools
[ "4fc7dae1eadce562894792cae441721deaf01b5f" ]
[ "dicom_tools/ml_out_roi.py" ]
[ "#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Nov 22 09:46:37 2018\n\n@author: andrea\n\"\"\"\n\nfrom __future__ import division, print_function\n\nimport cv2\nimport numpy as np\n\ntry:\n from keras import backend as K\n K.set_image_data_format('channels_last')\n keras_found = T...
[ [ "numpy.std", "numpy.mean", "numpy.transpose", "numpy.load", "numpy.array", "numpy.zeros" ] ]
Abhay242/language-identification-
[ "4b05f6cba588bc4862a3034911407f5f503db0d0" ]
[ "keras/predict.py" ]
[ "import argparse\nimport numpy as np\nimport os\nimport sys\nfrom keras.models import load_model\n\nfrom data_loaders.SpectrogramGenerator import SpectrogramGenerator\n\nclass_labels = [\"EN\", \"DE\", \"FR\", \"ES\", \"CN\", \"RU\"]\n\ndef predict(cli_args):\n\n config = {\"pixel_per_second\": 50, \"input_shape...
[ [ "numpy.divide", "numpy.argmax", "numpy.mean", "numpy.stack" ] ]
nuaa-QK/1_NAS
[ "1660a9bb259d6f3844fa34e394921fea7f4183c3" ]
[ "1_nas/evaluator.py" ]
[ "import os\r\nimport tensorflow as tf\r\nimport numpy as np\r\n\r\nfrom base import Cell, NetworkItem\r\nfrom info_str import NAS_CONFIG\r\nfrom utils import NAS_LOG, Logger\r\n\r\nimport pickle\r\nimport random\r\nimport sys\r\nimport time\r\nimport copy\r\n\r\nclass DataSet:\r\n\r\n def __init__(self, image_si...
[ [ "tensorflow.get_variable", "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.contrib.keras.initializers.he_normal", "tensorflow.control_dependencies", "tensorflow.nn.max_pool", "tensorflow.profiler.ProfileOptionBuilder.trainable_variables_parameter", "tensorflow.cast", ...
metacogpe/python
[ "f7b2bcd0fae9ae9899399e3a314ffea3955896b0" ]
[ "crypto/bitcoinScraping.py" ]
[ "import requests # python -m pip install requests\nimport datetime \n \nr = requests.get(\"https://api.korbit.co.kr/v1/ticker/detailed?currency_pair=btc_krw\")\nbitcoin = r.json() \n\ntimestamp = bitcoin['timestamp'] \ndate = datetime.datetime.fromtimestamp(timestamp/1000)\nprint(date)\nprint(bitcoin['bid'])\nprin...
[ [ "pandas.Series", "pandas.DataFrame", "pandas.read_html" ] ]
Ushk/fourier-feature-networks
[ "af4947e137e31c5e3a887d800f1995485414297d" ]
[ "demo.py" ]
[ "import torch\nimport torch.nn as nn\nimport torchvision\nimport numpy as np\nfrom tqdm import tqdm\n\nfrom dataset import ImageDataset\n\n\nclass Swish(nn.Module):\n\n def __init__(self):\n super().__init__()\n\n def forward(self, x):\n return x * torch.sigmoid(x)\n\n\nclass SirenLayer(nn.Modul...
[ [ "torch.nn.Sequential", "torch.sigmoid", "numpy.sqrt", "torch.sin", "torch.zeros", "torch.randn", "torch.nn.Sigmoid", "torch.nn.Linear", "torch.no_grad", "torch.log10", "torch.nn.MSELoss", "torch.cos" ] ]
jpvelsamy/hotdog
[ "df45cdc0b9e6abfecd16a43f75f1671e51cbc47c" ]
[ "dataingestion.py" ]
[ "import pandas as pd\nimport logging\n\nlogger = logging.getLogger(\"ACE\")\n\n\nclass DataIngestion:\n\n def __init__(self, file_name):\n self.file_name = file_name\n\n def prepUp(self):\n try:\n data = pd.read_csv(self.file_name)\n logger.info(f'column listing #{data.colu...
[ [ "pandas.read_csv" ] ]
ashley062190/pycpa_taskchain
[ "4274371b90407fe9715ca2d5d5793bf4736f53e2" ]
[ "experiments/plot_hist_compare.py" ]
[ "#!/usr/bin/env python\nimport matplotlib.pyplot as pyplot\nimport matplotlib\n\nimport numpy as np\nimport argparse\nimport csv\n\nparser = argparse.ArgumentParser(description='Print statistics of path latency results.')\nparser.add_argument('file', metavar='csv_file', type=str, \n help='csv file to be proc...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "matplotlib.ticker.ScalarFormatter", "matplotlib.rcParams.update", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
lintondf/MorrisonPolynomialFiltering
[ "f5713f9ed9a24c1382875d8ebdec00100f39e3a5" ]
[ "Python/src/polynomialfiltering/PythonUtilities.py" ]
[ "''' PolynomialFiltering.PythonUtilities\n (C) Copyright 2019 - Blue Lightning Development, LLC.\n D. F. Linton. support@BlueLightningDevelopment.com\n\n SPDX-License-Identifier: MIT\n See separate LICENSE file for full text\n'''\n\n\"\"\"***************** DO NOT TRANSPILE THIS MODULE *************************\"\"\...
[ [ "scipy.stats.chi2.ppf", "scipy.stats.chi2.cdf", "scipy.stats.f.ppf", "scipy.stats.f.cdf" ] ]
jennyfothergill/msibi
[ "0e309eff836dc13016d87889fe8d8f6960a13599" ]
[ "msibi/tests/test_pair.py" ]
[ "import os\n\nimport numpy as np\nimport pytest\n\nfrom msibi import MSIBI, State, Pair, mie\n\nfrom .base_test import BaseTest\n\ndr = 0.1 / 6.0\nr = np.arange(0, 2.5 + dr, dr)\nr_range = np.asarray([0.0, 2.5 + dr])\nn_bins = 151\nk_B = 1.9872041e-3 # kcal/mol-K\nT = 298.0 # K\n\n\nclass TestPair(BaseTest):\n ...
[ [ "numpy.asarray", "numpy.arange", "numpy.array_equal" ] ]
v-cherian/GANComposer
[ "b02dd005467f8d366aeb4ddde6276de644fce6c6" ]
[ "train.py" ]
[ "# Copyright 2019 Christopher John Bayron\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required ...
[ [ "torch.mean", "matplotlib.pyplot.legend", "torch.empty", "torch.Tensor", "matplotlib.pyplot.subplots", "torch.log", "torch.cuda.is_available", "torch.clamp", "torch.nn.MSELoss" ] ]
danielgarm/FreeCodeCamp-Machine-Learning
[ "c0f7e808dba5a87cada8af1f5623283ac77c96a3" ]
[ "6 - Natural Language Processing with RNNs/theatre_play_generation.py" ]
[ "from keras.preprocessing import sequence\nimport keras\nimport tensorflow as tf\nimport os\nimport numpy as np\n\n# If we want to load a dataset of the Shakespeare script:\npath_to_file = tf.keras.utils.get_file('shakespeare.txt', 'https://storage.googleapis.com/download.tensorflow.org/data/shakespeare.txt')\n\n# ...
[ [ "tensorflow.keras.callbacks.ModelCheckpoint", "tensorflow.TensorShape", "tensorflow.train.latest_checkpoint", "tensorflow.keras.layers.Embedding", "tensorflow.random.categorical", "numpy.reshape", "tensorflow.data.Dataset.from_tensor_slices", "tensorflow.keras.losses.sparse_categor...
navierula/Research-Fall-2017
[ "beec5f116d5487e6a4e0d48ec57ad80aaf2ec26f" ]
[ "minMaxCalc/start_again.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Oct 23 23:06:12 2017\n\n@author: navrajnarula\n\"\"\"\n\n#c = [0.5, 3, 6, 40, 90, 130.8, 129, 111, 8, 9, 0.01, 9, 40, 90, 130.1, 112, 108, 90, 77, 68, 0.9, 8, 40, 90, 92, 130.4]\n#c= [0, 10, 11, 48, 50.5, 0.48, 17, 18, 23, 29, 33, 34.67, 50.1,...
[ [ "numpy.array", "scipy.signal.argrelextrema", "pandas.ExcelFile" ] ]
genfifth/cvopt
[ "1e55461fec937cd5af7a786a1b942cd846782b27" ]
[ "cvopt/search_setting/_base.py" ]
[ "import numpy as np, scipy as sp\nimport types\nfrom hyperopt import hp\nfrom hyperopt.pyll import scope\n\nclass ParamDist(dict):\n \"\"\"\n cvopt standard param setting class.\n \"\"\"\n pass\n\n\ndef search_category(categories):\n \"\"\"\n Set search target distribution for categorical variable...
[ [ "scipy.stats.randint", "scipy.stats.uniform" ] ]
Steffy-zxf/HubModule
[ "40b0563f86634714033ab7712a08a58eba81bad1" ]
[ "modules/text/semantic_model/simnet_bow/module.py" ]
[ "# -*- coding:utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport argparse\nimport ast\nimport json\nimport math\nimport os\nimport six\n\nimport numpy as np\nimport paddle.fluid as fluid\nfrom paddle.fluid.core import PaddleTensor, Ana...
[ [ "numpy.array" ] ]
raghavgupta0296/ASL
[ "5012e1f2fa66b7f75b22f576003c8be50c59286e" ]
[ "testCNN.py" ]
[ "import numpy as np\r\nimport tensorflow as tf\r\nimport cv2\r\n\r\nclass testing:\r\n\r\n def ini_wt(self,shape):\r\n initial = tf.truncated_normal(shape, stddev=0.1)\r\n return tf.Variable(initial)\r\n def ini_bias(self,shape):\r\n initial = tf.constant(0.1, shape=shape)\r\n retu...
[ [ "tensorflow.matmul", "tensorflow.constant", "tensorflow.truncated_normal", "tensorflow.Variable", "tensorflow.nn.max_pool", "numpy.reshape", "tensorflow.placeholder", "tensorflow.global_variables_initializer", "tensorflow.Session", "tensorflow.train.Saver", "tensorflow....
Qin-Folks/I2L-MeshNet_RELEASE
[ "2749441e03ae77d42837a4d8f0287e537d5e768c" ]
[ "common/utils/preprocessing.py" ]
[ "import numpy as np\nimport cv2\nimport random\nfrom config import cfg\nimport math\n\ndef load_img(path, order='RGB'):\n img = cv2.imread(path, cv2.IMREAD_COLOR | cv2.IMREAD_IGNORE_ORIENTATION)\n if not isinstance(img, np.ndarray):\n raise IOError(\"Fail to read %s\" % path)\n\n if order=='RGB':\n ...
[ [ "numpy.clip", "numpy.cos", "numpy.sin", "numpy.max", "numpy.random.randn", "numpy.float32", "numpy.array", "numpy.zeros" ] ]
RickOnEarth/pointpillars_based_CLOCs
[ "c6d4576a151540200dac2354b00dc4ecce6ee72d" ]
[ "second/core/box_np_ops.py" ]
[ "import numba\nfrom pathlib import Path\nimport numpy as np\nfrom second.utils.buildtools.pybind11_build import load_pb11\n\nfrom second.core.geometry import points_in_convex_polygon_3d_jit\nfrom second.core.non_max_suppression.nms_gpu import rotate_iou_gpu_eval\n\ntry:\n from second.core import box_ops_cc\nexce...
[ [ "numpy.split", "numpy.sqrt", "numpy.einsum", "numpy.linspace", "numpy.concatenate", "numpy.max", "numpy.arctan2", "numpy.zeros_like", "numpy.any", "numpy.linalg.qr", "numpy.exp", "numpy.where", "numpy.ones_like", "numpy.reshape", "numpy.arange", "num...
Daniel-H-99/FBINET
[ "3f0ff747b1ec430946eb8d2facb6e91c28236f93" ]
[ "models/ebconv.py" ]
[ "import torch\nimport torch.nn.functional as F\nfrom torch import nn\nfrom torch.nn.common_types import _size_2_t\n\nimport math\nimport numpy as np\nfrom functools import partial\nfrom typing import Union\n\nfrom bnn import BConfig, bconfig\nfrom bnn.layers.helpers import copy_paramters\n\n\nclass BinarySoftActiva...
[ [ "torch.nn.init.uniform_", "torch.Tensor", "torch.nn.functional.conv2d", "torch.zeros_like", "torch.nn.Sigmoid", "torch.nn.functional.adaptive_avg_pool2d", "torch.nn.Linear", "torch.matmul", "numpy.prod", "torch.nn.ReLU", "torch.ones_like" ] ]
JSchweisthal/Positive-and-Unlabeled-Learning-from-Imbalanced-Data
[ "82e193842e4f6a7b4a0ef476f1104944ef90ee47" ]
[ "ImbalancedSelfPU/utils/util.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nimport numpy as np\nfrom sklearn.utils import extmath\n\n\nnon_image_vars = ['Age', 'PTGENDER', 'PTEDUCAT', 'APOE Status', 'MMSCORE', 'CDR', 'AVLT-LTM', 'AVLT-Total', 'ADAS']\none_hot_vars = {\"APOE Status\":...
[ [ "numpy.diag", "numpy.dot", "torch.abs", "torch.nn.functional.softmax", "torch.zeros", "torch.sum", "torch.FloatTensor", "numpy.exp", "torch.autograd.Variable", "torch.nn.CrossEntropyLoss", "torch.mm", "torch.round", "numpy.float32", "numpy.zeros", "numpy...
wuyuebupt/doubleheadsrcnn
[ "a744b4121d52935741f49d845bae7878270ea291" ]
[ "maskrcnn_benchmark/modeling/poolers.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\n\nfrom maskrcnn_benchmark.layers import ROIAlign\n\nfrom .utils import cat\n\n\nclass LevelMapper(object):\n \"\"\"Determine which FPN level each RoI in a set of RoIs sho...
[ [ "torch.zeros", "torch.cat", "torch.nn.ModuleList", "torch.zeros_like", "torch.tensor", "torch.log2", "torch.nonzero", "torch.clamp" ] ]
ssantos97/SyMo
[ "58d7b64f888fd78cc27d4c1092071ef35725f0d4" ]
[ "Experiments_pendulum/train_noise.py" ]
[ "import torch, argparse\nimport numpy as np\nfrom torch.utils.data import TensorDataset, DataLoader\nfrom torch import optim\nfrom torch.optim.lr_scheduler import ReduceLROnPlateau\nimport pickle\nimport scipy.integrate\nsolve_ivp = scipy.integrate.solve_ivp\n\nimport os, sys\nTHIS_DIR = os.path.dirname(os.path.abs...
[ [ "torch.mean", "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.empty", "numpy.random.seed", "torch.cat", "torch.manual_seed", "torch.utils.data.TensorDataset", "torch.utils.data.DataLoader", "torch.tensor", "torch.flatten", "numpy.random.randn", "torch.cuda.is_a...
JuanPorrasl/AMSECovid19
[ "e8d754e04c301f164b19117e779ea82e79b79558" ]
[ "dash/cleaning_datas_tests.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon May 18 16:03:41 2020\n\n@author: juanporras\n\"\"\"\n\nimport pandas as pd\nimport numpy as np\n\nimport json\nimport urllib.request\nfrom urllib.request import urlopen\n\nimport datetime\nimport time\n\nconfig = {'displayModeBar': False}\n\nf...
[ [ "pandas.read_csv" ] ]
pin-hsuan-wu/caw-quant-training2
[ "d3bb66390c2060d8dde41725f0d4da97a02d07cf" ]
[ "section3/task2/sec3_task2.py" ]
[ "import talib\nimport numpy as np\nfrom binance.websockets import BinanceSocketManager\nfrom binance.client import Client\nimport pandas as pd\n\nwith open(\"./binance_api.txt\") as f:\n file = f.read()\nkey = file.split(',')[0]\nsecret = file.split(',')[1]\n\nclient = Client(api_key=key, api_secret=secret)\n\nb...
[ [ "pandas.to_datetime", "pandas.DataFrame" ] ]
ShiChenAI/ACCORD-tf
[ "1b07b133d55d702ddea0186ff8849da0346ec84f" ]
[ "utils.py" ]
[ "import numpy as np\nfrom tqdm import tqdm\nimport yaml\nimport glob\nfrom pathlib import Path\nfrom datasets import ACCORDDataloader\n\nclass Params:\n def __init__(self, project_file):\n self.params = yaml.safe_load(open(project_file).read())\n\n def __getattr__(self, item):\n return self.para...
[ [ "numpy.squeeze", "numpy.argmax", "numpy.where", "numpy.sum", "numpy.vstack" ] ]
ChenQingya/instagan-part
[ "1ff152a9340a88e0681d62a7250434ef50cede8a" ]
[ "featuresimilarityloss/vgg_model.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torchvision.models import vgg19, vgg16\nfrom collections import OrderedDict\n\n# VGG 19\n# vgg_layer = {\n# 'conv_1_1': 0, 'conv_1_2': 2, 'pool_1': 4, 'conv_2_1': 5, 'conv_2_2': 7, 'pool_2': 9, 'conv_3_1': 10, 'conv_3_2': 12, 'conv_3_3': 14, 'conv_3_4': 16, 'pool_3': 1...
[ [ "torch.unsqueeze", "torch.cat" ] ]
ougx/swatResultReader
[ "554128883095ed9a2e0f2cae46831ff92aff7ea6" ]
[ "save_flow.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nThis script read a SWAT output.rch file and plot against USGS observed flow.\n\nCreated on Fri Feb 14 00:21:31 2020\n\n@author: Michael Ou\n\nusage:\n python swat_plot.py \n\"\"\"\n\n\n\n\nimport os\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nfrom swat_reader import...
[ [ "pandas.concat", "pandas.to_numeric", "matplotlib.pyplot.style.use", "pandas.DatetimeIndex" ] ]
Davidnet/EmbedMask
[ "7f9082cdfc0ec41e4bdb86fff50008f99abd2c7e" ]
[ "fcos_core/structures/bounding_box.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport torch\n\n# transpose\nFLIP_LEFT_RIGHT = 0\nFLIP_TOP_BOTTOM = 1\n\n\nclass BoxList(object):\n \"\"\"\n This class represents a set of bounding boxes.\n The bounding boxes are represented as a Nx4 Tensor.\n In order to unique...
[ [ "torch.device", "torch.cat", "torch.as_tensor" ] ]
s-akanksha/DialoGraph_ICLR21
[ "d5bbc10b2623c9f84d21a99a5e54e7dcfdfb1bcc" ]
[ "src/bot/cocoa/src/model/graph_embedder.py" ]
[ "import tensorflow as tf\nfrom tensorflow.python.ops.math_ops import tanh\n#from tensorflow.python.ops.rnn_cell_impl import _linear as linear\nfrom tensorflow.contrib.rnn.python.ops.core_rnn_cell import _Linear as linear \n# from tensorflow.python.ops.rnn_cell import _linear as linear\nfrom src.model.util import ba...
[ [ "tensorflow.get_variable", "tensorflow.reduce_max", "tensorflow.concat", "tensorflow.constant", "tensorflow.range", "tensorflow.shape", "tensorflow.reduce_sum", "tensorflow.reshape", "tensorflow.cast", "tensorflow.expand_dims", "tensorflow.placeholder", "tensorflow....
avanoene/risk_dash
[ "0459c8d04e9586022799585a86f79cc51c390b93" ]
[ "pages/single_ticker.py" ]
[ "import json\n\nimport dash_core_components as dcc\nimport dash_html_components as html\nimport dash_bootstrap_components as dbc\nimport numpy as np\nimport pandas as pd\nfrom pandas.tseries.offsets import BDay\nimport plotly.graph_objs as go\nfrom dash.dependencies import Input, Output, State\n\nfrom app import ap...
[ [ "numpy.nanpercentile", "pandas.to_datetime", "numpy.sqrt", "numpy.nanstd", "numpy.exp", "pandas.tseries.offsets.BDay" ] ]