repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
l45k/qiskit-aqua
[ "77589d5fa0da670c23a4f6730d8a5477c9b0d126", "77589d5fa0da670c23a4f6730d8a5477c9b0d126" ]
[ "qiskit/aqua/utils/random_matrix_generator.py", "qiskit/aqua/operators/common.py" ]
[ "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2018, 2020.\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...
[ [ "numpy.diag", "numpy.dot", "scipy.sparse.coo_matrix", "numpy.log2", "numpy.sqrt", "numpy.asarray", "scipy.sparse.csr_matrix", "numpy.ones", "scipy.special.comb", "numpy.identity", "scipy.special.factorial", "numpy.column_stack", "numpy.linalg.qr", "numpy.arr...
5tefan/ncagg
[ "3a54104b40e74756e334a4b6bc1e968b3dada43e" ]
[ "test/mag/MAGL1bGEOF_1hr/test_MAGL1bGEOF.py" ]
[ "import unittest\nimport tempfile\nimport netCDF4 as nc\nimport numpy as np\nfrom ncagg.config import Config\nfrom ncagg.aggregator import generate_aggregation_list, evaluate_aggregation_list\nfrom datetime import datetime, timedelta\nimport glob\nimport os\n\n\nclass TestMag(unittest.TestCase):\n def setUp(self...
[ [ "numpy.diff" ] ]
dHonerkamp/ActiveClassifier
[ "052675277153594db64261cd56699a057e633de2", "052675277153594db64261cd56699a057e633de2" ]
[ "activeClassifier/modules/stateTransition/additive.py", "activeClassifier/models/fullImgPred.py" ]
[ "import tensorflow as tf\n\nfrom activeClassifier.modules.stateTransition.base import StateTransition\n\n\nclass StAdditive(StateTransition):\n def __init__(self, FLAGS, batch_sz, conv_shape_z):\n super().__init__(FLAGS, batch_sz)\n\n self._conv_shape_z = conv_shape_z\n self._cell = _rnn_cel...
[ [ "tensorflow.reshape", "tensorflow.zeros" ], [ "tensorflow.is_nan", "tensorflow.count_nonzero", "tensorflow.zeros", "tensorflow.control_dependencies", "tensorflow.reduce_sum", "tensorflow.equal", "tensorflow.cast", "tensorflow.where", "tensorflow.summary.scalar", ...
jplind79/rcat
[ "dab7728be73950d5800d91ca90e27fd1992501cf" ]
[ "rcat/plot/colors.py" ]
[ "\"\"\"\nThis module provides access to predefined (Matplotlib) or self-produced\ncolors and color maps.\n\n@author Petter Lind\n@date 2015-05-18\n\"\"\"\n\nimport sys\nfrom matplotlib import colors\nimport matplotlib.pyplot as plt\nimport palettable\n\n# Self-produced colormaps\n#\nprct_diff = [\"#006400\", \"#3...
[ [ "matplotlib.colors.ListedColormap", "matplotlib.pyplot.cm.get_cmap" ] ]
trib-plan/TriB-QA
[ "996c763ac0bc5f69ce04a60376d5b3a3d5face3b" ]
[ "src/run_Baidu_v2.py" ]
[ "# -*- coding:utf-8 -*-\n\n# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. 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 wi...
[ [ "torch.load", "torch.utils.data.DataLoader", "torch.no_grad", "torch.cuda.manual_seed_all", "torch.cuda.is_available", "torch.device", "torch.distributed.get_rank", "torch.distributed.init_process_group", "torch.utils.data.distributed.DistributedSampler", "torch.utils.data....
tstepien/moth-mating
[ "eac5c735f40962f18d9d05b46bc3cc622ff5258d" ]
[ "figures_in_paper/Fig4/ParticleSimulations/simulation14.py" ]
[ "import numpy as np\nimport time\nimport csv\nimport multiprocessing\nimport os\nfrom numba import njit\n\n@njit()\ndef timestep(dist):\n t1 = 1e-5\n t2 = 1e-2\n k = 1\n timestep = (t2-t1)*np.tanh(k*dist)+t1\n return timestep\n\n@njit()\ndef random_walk(m,d,t,R,rt):\n time = 0\n #set up random ...
[ [ "numpy.sqrt", "numpy.linspace", "numpy.logspace", "numpy.save", "numpy.random.randn", "numpy.tanh", "numpy.array", "numpy.sum" ] ]
Junphy-Jan/Feature_Selection
[ "f45c8b934219dea0b34ecb8b2ca2a43f60fe5b0d" ]
[ "feature_selection/filter_selection/_univariate_selection.py" ]
[ "\"\"\"Univariate features selection.\"\"\"\n\n# Authors: V. Michel, B. Thirion, G. Varoquaux, A. Gramfort, E. Duchesnay.\n# L. Buitinck, A. Joly\n# License: BSD 3 clause\n\n\nimport numpy as np\nimport warnings\n\nfrom scipy import special, stats\nfrom scipy.sparse import issparse\n\nfrom sklearn.base imp...
[ [ "numpy.dot", "sklearn.utils.extmath.safe_sparse_dot", "sklearn.utils.validation.check_is_fitted", "numpy.asarray", "scipy.special.chdtrc", "sklearn.utils.safe_sqr", "numpy.mean", "numpy.zeros_like", "numpy.where", "sklearn.utils.check_X_y", "scipy.sparse.issparse", ...
Jyahoo/Pydev
[ "fa4701edf89b7df01e6dd0f7d5d3918efec2f138" ]
[ "BulkEmailSender/app.py" ]
[ "from tkinter import*\r\nfrom PIL import ImageTk\r\nfrom tkinter import messagebox,filedialog\r\nimport os\r\nimport pandas as pd\r\nimport email_function\r\n\r\nclass Bulk_Email:\r\n def __init__(self,root):\r\n self.root=root\r\n self.root.title(\"BULK EMAIL APPLICATION\")\r\n self.root.ge...
[ [ "pandas.read_excel", "pandas.isnull" ] ]
CDLUC3/merritt-aws
[ "1828e0cf74a707a53a4d1748aca3a57f54e92a19" ]
[ "src/config.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\n\n# ------------------------------------------------------------\n# Configuration\n\ndef __format_significant_digits(x: float, digits: int):\n return np.format_float_positional(x, digits, fractional=False).rstrip('.')\n\nplt.style.use('gg...
[ [ "numpy.format_float_positional", "matplotlib.pyplot.style.use" ] ]
dsgissin/Incremental-Learning
[ "4bb44d537e439adf3210982334527da52c410832" ]
[ "classification_experiment.py" ]
[ "import numpy as np\r\nfrom keras import backend as K\r\nfrom keras.layers import Layer, Input, Activation\r\nfrom keras.models import Model\r\nfrom keras.optimizers import SGD\r\nfrom keras.initializers import RandomNormal, Identity, Orthogonal, Zeros, Constant, Ones\r\nfrom keras.callbacks import Callback\r\nfrom...
[ [ "numpy.abs", "numpy.linalg.norm", "numpy.sign", "numpy.random.randn", "sklearn.svm.LinearSVC", "numpy.argsort", "numpy.zeros" ] ]
xindong95/SCRIP
[ "bb707b5a146e13bac6359d32c82b14c3eb38a7bc" ]
[ "SCRIP/enrichment/search.py" ]
[ "#!/usr/bin/env python\n# -*-coding:utf-8 -*-\n'''\n@File : search_giggle.py\n@Time : 2021/04/16 12:34:35\n@Author : Xin Dong\n@Contact : xindong9511@gmail.com\n@License : (C)Copyright 2020-2021, XinDong\n'''\n\n\nimport subprocess\nimport os\nfrom multiprocessing import Pool\nimport warnings\n# fr...
[ [ "pandas.concat", "numpy.array_split", "pandas.read_csv" ] ]
yourmoonlight/maro
[ "3d6715649467d49a83886c1fd4ae9b41ff012a50", "3d6715649467d49a83886c1fd4ae9b41ff012a50" ]
[ "maro/rl/algorithms/policy_optimization.py", "maro/cli/inspector/cim_dashboard.py" ]
[ "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nfrom collections import namedtuple\nfrom typing import Callable, List, Union\n\nimport numpy as np\nimport torch\n\nfrom maro.rl.algorithms.abs_algorithm import AbsAlgorithm\nfrom maro.rl.models.learning_model import LearningModel\nfrom m...
[ [ "numpy.log", "torch.min", "torch.from_numpy", "torch.exp", "torch.log", "torch.clamp" ], [ "numpy.arange", "pandas.concat", "numpy.array", "pandas.DataFrame" ] ]
tedai/ChemBench
[ "796453fcef9d88841332e89bdd17bd1b12e8f088" ]
[ "chembench/kekulescope/__init__.py" ]
[ "import pandas as pd\nfrom rdkit import Chem\nimport os\n\n\ncell_lines = ['A2780', \n 'CCRF-CEM',\n 'DU-145', \n 'HCT-15',\n 'KB',\n 'LoVo',\n 'PC-3',\n 'SK-OV-3']\n\ntargets = ['A2a',\n 'ABL1',\n 'Acetylcholinesterase',\n...
[ [ "pandas.DataFrame" ] ]
roholazandie/bert
[ "39d14f3056c4fc4e848ecfc0d94dd78601ef4982" ]
[ "create_pretraining_data.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unl...
[ [ "tensorflow.gfile.GFile", "tensorflow.python_io.TFRecordWriter", "tensorflow.logging.info", "tensorflow.logging.set_verbosity", "tensorflow.gfile.Glob", "tensorflow.train.Features", "tensorflow.app.run" ] ]
BArthur1972/Disease-Predictor
[ "6778428cb01d1a0e001c7fd3243dafcba998de99" ]
[ "predict_tools.py" ]
[ "import numpy as np\nimport joblib\nfrom scipy.stats import mode\nfrom fuzzywuzzy import fuzz\nfrom directory import SYMPTOM_NAMES, DATA_DICT\n\n\ndef take_input(input_text):\n '''This function takes in input_text and returns a list containing the symptoms in the string found in input_text seperated by commas.\n...
[ [ "numpy.array", "scipy.stats.mode" ] ]
sisl/InteractionSimulator
[ "a4f68349eb7fa55ed5855a94bb97d8242869149d", "a4f68349eb7fa55ed5855a94bb97d8242869149d" ]
[ "intersim/viz/animatedviz.py", "tests/intersim/envs/test_simulator.py" ]
[ "# animatedviz.py\nfrom numpy import pi\nimport numpy as np\nimport torch\nimport matplotlib\nfrom matplotlib import cm\nimport matplotlib.patches\nimport matplotlib.transforms\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\n\nfrom intersim.viz.utils import batched_rotate_around_center, ...
[ [ "numpy.linspace", "numpy.isnan", "numpy.stack", "numpy.random.shuffle", "matplotlib.pyplot.axes", "matplotlib.cm.get_cmap", "numpy.array", "matplotlib.patches.Polygon", "matplotlib.patches.FancyArrowPatch", "matplotlib.pyplot.figure" ], [ "torch.allclose", "torc...
andreuvall/HybridPlaylistContinuation
[ "6e31e50050c61a2c3ae55183e18b665fd54c7250" ]
[ "utils/mf.py" ]
[ "# Collaborative filtering utils.\n\nfrom __future__ import print_function\nfrom __future__ import division\n\nfrom tqdm import tqdm\n\nfrom utils.evaluation import mask_array_items, mask_array_rows, compute_metrics, summarize_metrics\nfrom implicit import _als\n\nimport implicit\nimport numpy as np\n\nimport cPick...
[ [ "numpy.where", "numpy.vstack" ] ]
Jaraxxus-Me/UAVpytrackers_for_Odroid
[ "fa9ce67d002e0be98a637e9eda8a31d5d29477fd" ]
[ "bacflibs/feature.py" ]
[ "import cv2\nimport numpy as np\nfrom .bacffeatures import fhog, TableFeature\nfrom .bacffeatures import TableFeature\nfrom .lookup_tables import fhog as pyfhog\n\n\ndef extract_hog_feature(img, cell_size=4):\n fhog_feature = fhog(img.astype(np.float32),cell_size,num_orients=9,clip=0.2)[:,:,:-1]\n return fhog...
[ [ "numpy.all", "numpy.array", "numpy.concatenate" ] ]
yunfeng-net/pytorch
[ "d0e7c7383074c05da95fee327d80042667436576" ]
[ "study_sequential.py" ]
[ "from __future__ import print_function\nimport argparse\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nfrom torchvision import datasets, transforms\n\nclass Reshape(nn.Module): \n def __init__(self, *args): \n super(Reshape, self).__init__() \n s...
[ [ "torch.nn.NLLLoss", "torch.nn.LogSoftmax", "torch.nn.functional.nll_loss", "torch.manual_seed", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.Linear", "torch.no_grad", "torch.cuda.is_available", "torch.device", "torch.nn.ReLU" ] ]
vishalbelsare/interpolation.py
[ "116d144700a1c78b5ad86eee097d064610be8325", "116d144700a1c78b5ad86eee097d064610be8325" ]
[ "examples/example_mlinterp.py", "interpolation/splines/filter_cubic.py" ]
[ "import numpy as np\n\nfrom numba import generated_jit\nimport ast\n\nC = ((0.1, 0.2), (0.1, 0.2))\nl = (0.1, 0.5)\n\nfrom interpolation.multilinear.fungen import extract_row, tensor_reduction\n\ntensor_reduction(C, l)\n\nll = np.row_stack([1 - np.array(l), l])\nll\nnp.einsum(\"ij,i,j\", np.array(C), ll[0, :], ll[1...
[ [ "numpy.random.random", "numpy.sqrt", "numpy.linspace", "numpy.array", "numpy.zeros" ], [ "numpy.random.random", "numpy.array", "numpy.zeros", "numpy.ones" ] ]
aarsheem/696-ds
[ "2d74b1e3f430e369202982d7ad8c56f362b00f76", "2d74b1e3f430e369202982d7ad8c56f362b00f76" ]
[ "Source/shared_modified.py", "Source/example.py" ]
[ "import numpy as np\n\ndef best_action_min_value(q, state, DP):\n if state in DP:\n return DP[state]\n max_value = -np.inf\n min_value = np.inf\n for action,_ in enumerate(q[state]):\n if q[state][action] == max_value:\n possible_actions.append(action)\n elif q[state][act...
[ [ "numpy.random.choice" ], [ "matplotlib.pyplot.legend", "numpy.random.random", "numpy.arange", "numpy.max", "numpy.mean", "numpy.exp", "matplotlib.pyplot.show", "numpy.random.randint" ] ]
briangrahamww/pandas-profiling
[ "62f8e3fd81720d444041069191c4aacd03d79ad5" ]
[ "tests/issues/test_issue200.py" ]
[ "\"\"\"\nTest for issue 200:\nhttps://github.com/pandas-profiling/pandas-profiling/issues/200\n\"\"\"\nimport pandas as pd\n\nfrom pandas_profiling import ProfileReport\n\n\ndef test_issue200():\n df = pd.DataFrame([0, 1, 2], columns=[\"a\"], index=[\"0\", \"1\", \"2\"])\n\n assert df.index.dtype == \"object\...
[ [ "pandas.DataFrame" ] ]
keyongyu/models
[ "57982fb0ea9d9541f330767bbcb6cb9603b8f32c" ]
[ "research/object_detection/core/preprocessor.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.convert_to_tensor", "tensorflow.cond", "tensorflow.is_nan", "tensorflow.concat", "tensorflow.image.random_contrast", "tensorflow.stack", "tensorflow.minimum", "tensorflow.image.pad_to_bounding_box", "tensorflow.equal", "tensorflow.image.random_saturation", "...
qfardet/Pandora
[ "67c23134844e5468ca529f1c605f540035fe57c3" ]
[ "pandora/matching_cost/sad_ssd.py" ]
[ "#!/usr/bin/env python\n# coding: utf8\n#\n# Copyright (c) 2020 Centre National d'Etudes Spatiales (CNES).\n#\n# This file is part of PANDORA\n#\n# https://github.com/CNES/Pandora\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the L...
[ [ "numpy.amax", "numpy.swapaxes", "numpy.amin", "numpy.arange", "numpy.lib.stride_tricks.as_strided", "numpy.append", "numpy.sum" ] ]
NIKKE1/weaver
[ "25ffba83e2eebb397ea367135a2a274341e55c20" ]
[ "train.py" ]
[ "#!/usr/bin/env python\n\nimport os\nimport shutil\nimport glob\nimport argparse\nimport functools\nimport numpy as np\nimport math\nimport torch\n\nfrom torch.utils.data import DataLoader\nfrom importlib import import_module\nimport ast\nfrom utils.logger import _logger, _configLogger\nfrom utils.dataset import Si...
[ [ "torch.optim.lr_scheduler.MultiStepLR", "torch.optim.lr_scheduler.OneCycleLR", "torch.nn.CrossEntropyLoss", "torch.optim.lr_scheduler.LambdaLR", "torch.ones", "torch.profiler.schedule", "torch.load", "torch.utils.data.DataLoader", "torch.profiler.profile", "numpy.random.shu...
maliesa96/akro
[ "7a9ff8bcc430bd0f68b5203b5fdbaaf5f4245e31" ]
[ "tests/akro/test_image.py" ]
[ "import pickle\nimport unittest\n\nimport numpy as np\n\nfrom akro import Image\n\n\nclass TestImage(unittest.TestCase):\n\n def test_pickleable(self):\n obj = Image((3, 3, 3))\n round_trip = pickle.loads(pickle.dumps(obj))\n assert round_trip\n assert round_trip.shape == obj.shape\n ...
[ [ "numpy.array_equal" ] ]
snugfox/rpsa
[ "9f193b887cc22b80d16c7f36357cbeaad48ac29d" ]
[ "rpsa/upstream.py" ]
[ "import pandas as pd\nimport tweepy\nimport os\nfrom typing import List\n\n\ndef fetch_sample(screen_names: List[str], size: int = 100):\n consumer_key = os.environ[\"TWITTER_CONSUMER_KEY\"]\n consumer_secret = os.environ[\"TWITTER_CONSUMER_SECRET\"]\n access_token = os.environ[\"TWITTER_ACCESS_TOKEN\"]\n ...
[ [ "pandas.DataFrame" ] ]
martinferianc/WineClassification-EIE3
[ "f84e3a57dff336f03aa8358102977f0e936be06c", "f84e3a57dff336f03aa8358102977f0e936be06c" ]
[ "src/Neural_Network/train.py", "Examples/sin_approximation.py" ]
[ "import os\nimport sys\nimport copy\nimport numpy as np\n\nfrom .network import Network\nimport tensorflow as tf\nfrom .postprocess import plot_confusion_matrix, calculate_scores, calculate_MAD\n\n# Convert labels into one-hot representation\ndef one_hot(labels):\n n_values = 11\n labels.astype(int)\n labe...
[ [ "numpy.concatenate", "numpy.eye", "numpy.array", "tensorflow.Graph" ], [ "numpy.dot", "matplotlib.pyplot.scatter", "numpy.ones", "numpy.sin", "numpy.random.normal", "numpy.identity", "matplotlib.pyplot.show", "numpy.zeros", "numpy.sum", "matplotlib.pyplo...
zhyever/DepthFormer
[ "5e9b49a48bd1654373e6a4ca3976d4de6f1d6941" ]
[ "mmseg/apis/test.py" ]
[ "# Copyright (c) OpenMMLab. All rights reserved.\nimport os.path as osp\nimport tempfile\nimport warnings\n\nimport mmcv\nimport numpy as np\nimport torch\nfrom mmcv.engine import collect_results_cpu, collect_results_gpu\nfrom mmcv.image import tensor2imgs\nfrom mmcv.runner import get_dist_info\n\n# for time\nimpor...
[ [ "torch.no_grad", "numpy.save" ] ]
Jitesh17/anomaly_detection
[ "bb51520c6b9174f5a53de4f3f44f8dcf8830b495" ]
[ "test/carpet/train_carpet.py" ]
[ "import os\nimport sys\n\nimport albumentations as A\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision as tv\nfrom PIL import Image\nfrom torch.utils.data import DataLoader, Dataset\nfrom torch.utils.tensorboard import Summ...
[ [ "torch.optim.lr_scheduler.MultiStepLR", "torch.nn.ConvTranspose2d", "torch.nn.Conv2d", "torch.nn.Flatten", "numpy.percentile", "torch.nn.Tanh", "numpy.ceil", "torch.nn.MaxPool2d", "torch.nn.Linear", "numpy.prod", "torch.nn.ReLU", "torch.nn.MSELoss" ] ]
mrunaljsarvaiya/toppra
[ "468d81d23f37fdee06ea1aa3f1d445d747fad7f6" ]
[ "tests/constraint/test_second_order.py" ]
[ "import pytest\nimport numpy as np\nimport toppra\n\n\n@pytest.fixture\ndef coefficients_functions():\n \"Coefficients for the equation: A(q) ddot q + dot q B(q) dot q + C(q) = w\"\n def A(q):\n return np.array([[np.sin(q[0]), 0],\n [np.cos(q[1]), q[0] + q[1]]])\n\n def B(q):...
[ [ "numpy.hstack", "numpy.random.seed", "numpy.linspace", "numpy.eye", "numpy.cos", "numpy.sin", "numpy.sign", "numpy.random.randn", "numpy.testing.assert_allclose", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
JWDebelius/American-Gut
[ "ed2479a5951946ed977a5916444b51c34c48e60c" ]
[ "scripts/generate_otu_signifigance_tables_AGP.py" ]
[ "#!/usr/bin/env python\n\nfrom argparse import ArgumentParser\nfrom os import mkdir\nfrom os.path import isfile, exists, join as pjoin\n\nfrom numpy import array, delete\nfrom biom.util import biom_open\nfrom biom.parse import parse_biom_table\n\nfrom americangut.generate_otu_signifigance_tables import (\n calcu...
[ [ "numpy.delete" ] ]
tiberiu44/WaveRNN-Pytorch
[ "1cc6cfc4458d144710b67b9ceeb2606cde683d33" ]
[ "hparams.py" ]
[ "import tensorflow as tf\n\n# Default hyperparameters:\nhparams = tf.contrib.training.HParams(\n name=\"WaveRNN\",\n num_workers=2,\n # Input type:\n # 1. raw [-1, 1]\n # 2. mixture [-1, 1]\n # 3. bits [0, 512]\n # 4. mulaw[0, mulaw_quantize_channels]\n #\n input_type='mulaw',\n #\n ...
[ [ "tensorflow.contrib.training.HParams" ] ]
another-s347/learning-to-communicate-pytorch
[ "18900133366bf5be3929fa9bdf2fcc772fdb7bf0" ]
[ "sc2/convgru.py" ]
[ "# ConvGRU from https://github.com/happyjin/ConvGRU-pytorch\n\nimport os\nimport torch\nfrom torch import nn\nfrom torch.autograd import Variable\n\n\nclass ConvGRUCell(nn.Module):\n def __init__(self, input_size, input_dim, hidden_dim, kernel_size, bias, dtype):\n \"\"\"\n Initialize the ConvLSTM ...
[ [ "torch.sigmoid", "torch.cat", "torch.zeros", "torch.nn.ModuleList", "torch.nn.Conv2d", "torch.tanh", "torch.rand", "torch.cuda.is_available", "torch.split", "torch.stack" ] ]
wasimakh2/Web-Scraping-Python
[ "2f4e58088355ddfcfb5dc23a96a88cd06942d3a1" ]
[ "1. Internshala/keyword_internship.py" ]
[ "from bs4 import BeautifulSoup\r\nimport pandas as pd\r\nimport requests\r\n\r\njob_title = []\r\ncompany_name=[]\r\nlocation=[]\r\nstart_date=[]\r\nduration=[]\r\nstipends=[]\r\nposted_on=[]\r\napply_by=[]\r\n\r\nkeyword = input(\"Enter the keyword : \")\r\n\r\nres = requests.get('https://internshala.com/internshi...
[ [ "pandas.DataFrame" ] ]
tiw51/TensorFlowGettingStarted
[ "8446857c40d7a801a72b46b109f8ef048984fa5d" ]
[ "MNIST_MultiLayer_ANN_Parameter_Optimization.py" ]
[ "import tensorflow as tf\nfrom tensorflow.examples.tutorials.mnist import input_data\nimport datetime as dt\nimport math\n\n\n#this is a dataset of numbers between zero and nine that is squashed down into a vector of\n#size 1x784\nmnist = input_data.read_data_sets(\"MNIST_data/\", one_hot=True)\n#this should create...
[ [ "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.matmul", "tensorflow.summary.FileWriter", "tensorflow.zeros", "tensorflow.cast", "tensorflow.placeholder", "tensorflow.global_variables_initializer", "tensorflow.summary.merge_all", "tensorflow.name_scope", "ten...
ashwin2802/Wind_Farm_Layout_Optimization
[ "9765c0d9cb6ce9a05cbd1527937dca298f80f457" ]
[ "Novelty_Search_Genetic_Algo/Utilities.py" ]
[ "import numpy as np \n\n\ndef GeneratePointsInCircle(n:int, center_x:float, center_y:float, radius:float):\n\tassert n>0 and isinstance(n, int), \"'n' should be a positive integer.\"\n\n\tradius_arr = radius * np.sqrt(np.random.rand(n))\n\ttheta_arr = 2*np.pi * np.random.rand(n)\n\n\tx_arr = center_x + (radius_ar...
[ [ "numpy.linspace", "numpy.cos", "numpy.dstack", "numpy.sin", "numpy.random.rand" ] ]
AlbertoJimenezDiaz/ctplanet
[ "66651288abfb2c8588aec3bca1af160b1ec1d574", "66651288abfb2c8588aec3bca1af160b1ec1d574" ]
[ "examples/Mars-j2.py", "examples/Mars-Crust-hydrostatic-tests.py" ]
[ "#!/usr/bin/env python3\n\"\"\"\nMars-j2\n\nCompute the contribution to the gravitational J2 of Mars from hydrostatic\ninterfaces beneath the lithosphere.\n\"\"\"\nimport numpy as np\n\nimport pyshtools as pysh\n\nfrom ctplanet import HydrostaticShapeLith\n\n# ==== MAIN FUNCTION ====\n\n\ndef main():\n\n d_lith ...
[ [ "numpy.zeros" ], [ "numpy.zeros" ] ]
tonglei100/look
[ "e78411eddae52d332b2b012541e63322ce286f46" ]
[ "look/cnn_model.py" ]
[ "import torch.nn as nn\nfrom look import setting\n\n# CNN Model (2 conv layer)\nclass CNN(nn.Module):\n def __init__(self):\n super(CNN, self).__init__()\n self.layer1 = nn.Sequential(\n nn.Conv2d(1, 32, kernel_size=3, padding=1),\n nn.BatchNorm2d(32),\n nn.Dropout(...
[ [ "torch.nn.Dropout", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.Linear", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
doru1004/ray
[ "7b1c207be33892df6e556e7b5f7fb4b44c81c821" ]
[ "python/ray/experimental/data/tests/test_dataset.py" ]
[ "import os\nimport random\nimport requests\nimport shutil\nimport time\n\nfrom unittest.mock import patch\nimport math\nimport numpy as np\nimport pandas as pd\nimport pyarrow as pa\nimport pyarrow.parquet as pq\nimport pytest\n\nimport ray\n\nfrom ray.tests.conftest import * # noqa\nfrom ray.experimental.data.dat...
[ [ "pandas.concat", "pandas.read_csv", "numpy.expand_dims", "numpy.array_equal", "torch.cat", "numpy.arange", "pandas.DataFrame", "torch.tensor", "numpy.concatenate", "numpy.ceil", "pandas.read_parquet", "numpy.sort", "pandas.read_json", "numpy.array", "num...
bprovanbessell/AttnGAN
[ "c3875ddce55a1f178708321673591d91d0e3fb6d" ]
[ "code/datasets.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\n\nfrom nltk.tokenize import RegexpTokenizer\nfrom collections import defaultdict\nfrom miscc.config import cfg\n\nimport torch\nimport torch.utils.data as data\...
[ [ "pandas.read_csv", "numpy.minimum", "numpy.maximum", "numpy.asarray", "numpy.arange", "numpy.random.shuffle", "numpy.sort", "numpy.random.randint", "torch.sort", "numpy.zeros", "torch.autograd.Variable" ] ]
TaikkPalat/delta
[ "3e84521e12e870b0e4270d46d7a2db23fda60d5c" ]
[ "delta/data/task/text_cls_task_test.py" ]
[ "# Copyright (C) 2017 Beijing Didi Infinity Technology and Development Co.,Ltd.\n# 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.o...
[ [ "numpy.shape", "tensorflow.test.main" ] ]
tyronechen/universal_data_format
[ "6d2e483414dba2a3abe4d03e728e34259ee718bf" ]
[ "src/compare_toptables.py" ]
[ "#!/usr/bin/python\n# extract gtf-like annotations and intersect gene names\nimport argparse\nimport os\nimport re\nimport subprocess as sp\nfrom time import time\nimport warnings\nimport matplotlib.pyplot as plt\n# from numba import njit, prange, set_num_threads\nimport pandas as pd\nfrom tqdm import tqdm\nfrom up...
[ [ "pandas.read_csv", "pandas.Series", "matplotlib.pyplot.savefig", "pandas.DataFrame", "matplotlib.pyplot.show" ] ]
jalexvig/meta_learning_optimizer
[ "4a2c0a7f49c4ff7c678699318d9072bb8e87be9e" ]
[ "meta_learning/saved_weights.py" ]
[ "import os\n\nimport torch\nfrom torch import nn\nfrom torch.optim import SGD\n\n\nclass MetaOptimizer(nn.Module):\n\n def forward(self, *input):\n pass\n\n def __init__(self):\n\n super().__init__()\n\n self.rnn = nn.LSTM(\n input_size=1,\n hidden_size=3,\n ...
[ [ "torch.nn.LSTM", "torch.load", "torch.cat", "torch.tensor", "torch.nn.Linear", "torch.optim.SGD" ] ]
ssthurai/tensorflow
[ "65a0a3a05b53477e09cff1bd027d4942231893c3" ]
[ "tensorflow/python/framework/test_util.py" ]
[ "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.client.device_lib.list_local_devices", "tensorflow.python.pywrap_tensorflow.IsGoogleCudaEnabled", "tensorflow.python.platform.tf_logging.error", "numpy.issubdtype", "tensorflow.python.util.tf_inspect.ismodule", "numpy.all", "tensorflow.python.util.tf_decorator.make_d...
soumyadeep17/Parking_Space_counter
[ "66681617b18e6b1a9d57e2e608bdbc525c991567" ]
[ "main.py" ]
[ "import cv2\nimport pickle\nimport cvzone\nimport numpy as np\n\n# Video feed\ncap = cv2.VideoCapture('carPark.mp4')\n\nwith open('CarParkPos', 'rb') as f:\n posList = pickle.load(f)\n\nwidth, height = 107, 48\n\n\ndef checkParkingSpace(imgPro):\n spaceCounter = 0\n\n for pos in posList:\n x, y = po...
[ [ "numpy.ones" ] ]
jgrss/geowombat
[ "e691102a3dcce13b272810b43bc9586681ae6934" ]
[ "geowombat/core/properties.py" ]
[ "from pathlib import Path\nfrom collections import namedtuple\n\nfrom .util import n_rows_cols\n\nimport pandas as pd\nimport geopandas as gpd\nfrom rasterio.coords import BoundingBox\nfrom affine import Affine\nimport shapely\nfrom shapely.geometry import Polygon\n\n\nWavelengthsPan = namedtuple('WavelengthsPan', ...
[ [ "pandas.to_datetime" ] ]
rasmus-rudling/crazyswarm
[ "1326fbc679061f64a8632a6553a9d6ae269bc1a4" ]
[ "ros_ws/src/crazyswarm/scripts/rasmus/trajectory.py" ]
[ "from matplotlib import pyplot as plt\nfrom planner.helperFunctions import cmToInches, getDirectionVectorFromAngleAndLength\nfrom position import Position\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom planner.drone import DroneState\nsns.set_theme(style=\"dar...
[ [ "numpy.arange", "matplotlib.pyplot.subplots", "pandas.DataFrame", "numpy.rad2deg", "numpy.interp", "numpy.array", "matplotlib.pyplot.show", "numpy.loadtxt" ] ]
safrooze/coach
[ "3e281b467b53849a6c204091306697b60d0a6b97" ]
[ "rl_coach/filters/observation/observation_stacking_filter.py" ]
[ "#\n# Copyright (c) 2017 Intel Corporation\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 ...
[ [ "numpy.append", "numpy.insert", "numpy.stack" ] ]
austinschneider/pisa
[ "55a2e5461c7c29465b0f1309d6c4f5282f54d5ea", "55a2e5461c7c29465b0f1309d6c4f5282f54d5ea" ]
[ "pisa/analysis/nutau_analysis.py", "pisa/stages/flux/honda.py" ]
[ "#! /usr/bin/env python\n# authors: J.Lanfranchi/P.Eller\n# date: March 20, 2016\n\nfrom __future__ import print_function\nfrom collections.abc import Sequence\nimport sys\nimport scipy.optimize as opt\nfrom scipy.stats import chi2\nimport time\nfrom uncertainties import unumpy as unp\nimport random\nimport os\n...
[ [ "numpy.random.seed", "scipy.optimize.minimize", "numpy.random.rand", "numpy.isscalar", "numpy.array", "scipy.stats.chi2.sf" ], [ "numpy.split", "scipy.interpolate.splrep", "numpy.linspace", "numpy.power", "numpy.isnan", "numpy.empty_like", "scipy.interpolate...
kilolux/fsp-demos
[ "50e96a10729477042b10291471c812d10bfd54fc" ]
[ "SmaEmaHelperFunctions.py" ]
[ "# SmaEmaHelperFunctions.py\n\n#################################################################\n\n## Libraries\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n\n################################################################\n\n## Exponential Moving Average (EMA) Functions\n\n# Calculate the alpha valu...
[ [ "numpy.arange", "numpy.size", "numpy.array", "numpy.sin" ] ]
WeilerP/muon
[ "8e0988f07ae23be4fa913bb297ef059e5ab702a0" ]
[ "muon/_atac/preproc.py" ]
[ "from typing import Union\n\nimport numpy as np\nfrom scipy.sparse import csr_matrix, dia_matrix, issparse\n\nfrom anndata import AnnData\nfrom .._core.mudata import MuData\n\n# Computational methods for preprocessing\n\n\ndef tfidf(\n data: Union[AnnData, MuData], log_tf=True, log_idf=True, log_tfidf=False, sca...
[ [ "numpy.diag", "numpy.dot", "numpy.greater", "scipy.sparse.issparse", "numpy.min", "numpy.clip", "numpy.nan_to_num", "scipy.sparse.csr_matrix", "numpy.max", "numpy.count_nonzero", "numpy.log1p", "scipy.sparse.dia_matrix" ] ]
marcio55afr/sktime
[ "25ba2f470f037366ca6b0e529137d3d0a6191e2e", "25ba2f470f037366ca6b0e529137d3d0a6191e2e" ]
[ "sktime/classification/dictionary_based/_muse.py", "sktime/forecasting/hcrystalball.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"WEASEL+MUSE classifier.\n\nmultivariate dictionary based classifier based on SFA transform, dictionaries\nand logistic regression.\n\"\"\"\n\n__author__ = [\"patrickzib\", \"BINAYKUMAR943\"]\n__all__ = [\"MUSE\"]\n\nimport math\nimport warnings\n\nimport numpy as np\nfrom numba impor...
[ [ "sklearn.feature_selection.chi2", "sklearn.linear_model.LogisticRegression", "numpy.asarray", "numpy.int32", "numpy.where", "sklearn.feature_extraction.DictVectorizer", "numpy.array", "numpy.zeros", "sklearn.utils.check_random_state" ], [ "sklearn.base.clone", "pand...
jfzhuang/DAVSS
[ "5dc785ee1417ade5b82f5e34b34817e3c4492acb", "5dc785ee1417ade5b82f5e34b34817e3c4492acb" ]
[ "lib/model/dmnet.py", "lib/dataset/utils.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torch.nn import init\nimport torch.nn.functional as F\n\n\nclass DMNet(nn.Module):\n def __init__(self):\n\n super(DMNet, self).__init__()\n\n self.conv1 = nn.Sequential(SeparableConv2d(3, 4, kernel_size=3, stride=1, padding=1, bias=True),\n ...
[ [ "torch.nn.ReLU", "torch.nn.Conv2d", "torch.nn.init.xavier_normal_", "torch.nn.SyncBatchNorm", "torch.no_grad", "torch.nn.functional.cosine_similarity", "torch.nn.init.normal_", "torch.rand", "torch.clamp" ], [ "numpy.diag", "numpy.take", "numpy.nanmean", "nu...
danhph/Cinder
[ "90a127a849c483b02a76c88e498a58ca2b514c25" ]
[ "src/features.py" ]
[ "import re\nimport lief\nimport hashlib\nimport numpy as np\nfrom sklearn.feature_extraction import FeatureHasher\nimport logging\n\n\nclass FeatureType(object):\n \"\"\"Base class that each feature group must implement. \"\"\"\n\n name = ''\n dim = 0\n\n def __repr__(self):\n return '{}({})'.for...
[ [ "numpy.hstack", "numpy.log2", "numpy.nonzero", "numpy.asarray", "numpy.lib.stride_tricks.as_strided", "numpy.frombuffer", "numpy.bincount", "sklearn.feature_extraction.FeatureHasher", "numpy.array", "numpy.zeros" ] ]
Javier-DlaP/OpenPCDet
[ "c4d308ea8052dd92948e2377b161b2519254275b" ]
[ "tools/test_fps.py" ]
[ "import argparse\nimport glob\nfrom pathlib import Path\n\nimport mayavi.mlab as mlab\nimport numpy as np\nimport torch\n\nfrom pcdet.config import cfg, cfg_from_yaml_file\nfrom pcdet.datasets import DatasetTemplate\nfrom pcdet.models import build_network, load_data_to_gpu\nfrom pcdet.utils import common_utils\nfro...
[ [ "numpy.abs", "numpy.arange", "numpy.quantile", "numpy.ones", "numpy.concatenate", "torch.no_grad" ] ]
anupgangwar/torch-mlir
[ "8250f50c811e855f3525587136d376fdcc1a6db9" ]
[ "python/torch_mlir_e2e_test/torchscript/configs/eager_mode.py" ]
[ "# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.\n# See https://llvm.org/LICENSE.txt for license information.\n# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception\n# Also available under a BSD-style license. See LICENSE.\n\nimport torch\nfrom torch.utils._pytree import tree_map...
[ [ "torch.utils._pytree.tree_map" ] ]
carlosebmachado/cnn-food-recognition
[ "15b72c0c67423b945cf290fdf4e8d39f147c1a36", "15b72c0c67423b945cf290fdf4e8d39f147c1a36" ]
[ "src/cnn-project/train.py", "src/cnn-project/predict.py" ]
[ "from keras.models import Sequential\nfrom keras.layers import Conv2D, MaxPooling2D, Flatten, Dense, Dropout\nfrom keras.layers.normalization import BatchNormalization\nfrom keras.utils import np_utils\nfrom sklearn.utils import shuffle\nfrom sklearn.model_selection import train_test_split\nfrom keras.models import...
[ [ "sklearn.utils.shuffle", "numpy.array", "numpy.expand_dims", "sklearn.model_selection.train_test_split" ], [ "numpy.set_printoptions", "numpy.expand_dims", "matplotlib.pyplot.imshow" ] ]
AFahri/ANBU
[ "d14fe39d6bd37a01add4a3369b479c6474537305" ]
[ "CNN_Model/train_classifier.py" ]
[ "#! /usr/bin/env python\n\nimport gc\nimport os\nimport pickle\nimport warnings\n\nimport numpy as np\nimport pandas as pd\n\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import roc_auc_score\n\nfrom keras.models import Model\nfrom keras.layers import Input, Dense, Embedding, SpatialDr...
[ [ "sklearn.metrics.roc_auc_score", "pandas.read_csv", "numpy.random.seed", "numpy.asarray", "sklearn.model_selection.train_test_split", "numpy.zeros" ] ]
ThisIsIsaac/A2C
[ "10a0f7d801204bc19b157b9434168c0f33f5c14e" ]
[ "models.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\n\ndef ortho_weights(shape, scale=1.):\n \"\"\" PyTorch port of ortho_init from baselines.a2c.utils \"\"\"\n shape = tuple(shape)\n\n if len(shape) == 2:\n flat_shape = shape[1], shape[0]\n elif len(shape) == 4:\n flat_shape = (np.pr...
[ [ "numpy.linalg.svd", "numpy.sqrt", "torch.nn.Conv2d", "torch.nn.Linear", "numpy.random.normal", "numpy.prod", "torch.nn.ReLU" ] ]
Hanson-Research-Lab/TRI_STILT
[ "764cb6ef624ec734a2bfdf4f84ccd57efdccc0f3" ]
[ "src/stilt_post_processing/make_stilt_outputs.py" ]
[ "# -*- coding: utf-8 -*-\n#Libraries\nimport click\nimport glob\nimport pandas as pd\nimport numpy as np\nimport xarray as xr \nimport geopandas as gpd\nfrom shapely.geometry import Point\nimport os \n\n#PIPE to convert stilt netcdf files to shapefiles \n\ndef nc_open(path):\n \"\"\"\n A function to open netc...
[ [ "pandas.concat", "pandas.read_csv", "pandas.DataFrame" ] ]
gokberkgul/self-learning-transformer-mil
[ "a3c3236daeb82859dec0cf2747f0dd121121fcdf" ]
[ "src/vit/train_dino.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\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 ...
[ [ "torch.nn.functional.softmax", "numpy.linspace", "torch.load", "torch.zeros", "torch.utils.data.DataLoader", "torch.sum", "torch.nn.SyncBatchNorm.convert_sync_batchnorm", "torch.cuda.amp.autocast", "torch.no_grad", "torch.cuda.synchronize", "torch.utils.data.Distributed...
Theeoi/MasterThesis
[ "ce3dc1718e4ff36959744af6acbd2b4364fd70ec" ]
[ "Code/EndurancePlot.py" ]
[ "#!/usr/bin/python\n\n### USAGE ###\n# ./EndurancePlot.py <Path to clean Endurace data>\n# Example ./EndurancePlot.py ../Data/InAsFlashIntA/Endu\n\nimport sys\nimport os\nimport numpy as np\nfrom scipy.signal import find_peaks\nfrom scipy.constants import pi\nimport matplotlib.pyplot as plt\n\n## Read data\n\nEnduP...
[ [ "numpy.abs", "matplotlib.pyplot.title", "numpy.min", "numpy.arange", "numpy.max", "numpy.append", "numpy.average", "numpy.array", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
mmenickelly/PyDDA
[ "a896c6b0268afed1a853f2f593f58103da6c4cb7" ]
[ "pydda/tests/test_plots.py" ]
[ "\"\"\" Testing module for PyDDA visualizations \"\"\"\nfrom matplotlib import use\nuse('agg')\nimport pydda\nimport pyart\nimport pytest\nimport matplotlib.pyplot as plt\nimport cartopy.crs as ccrs\n\n\n@pytest.mark.mpl_image_compare(tolerance=50)\ndef test_plot_horiz_xsection_barbs():\n Grids = [pyart.io.read_...
[ [ "matplotlib.pyplot.ylim", "matplotlib.use", "matplotlib.pyplot.figure" ] ]
luigi-borriello00/Metodi_SIUMerici
[ "cf1407c0ad432a49a96dcd08303213e48723c57a" ]
[ "sistemi_lineari/esercizi/Test8.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nEsercizio 8\r\n\r\n\"\"\"\r\n\r\nimport numpy as np\r\nimport numpy.linalg as npl\r\nimport scipy.linalg as sci\r\nimport funzioni_Sistemi_lineari as fz\r\nimport matplotlib.pyplot as plt\r\n\r\ndef HankelModificata(n):\r\n A = np.zeros((n,n), dtype = float)\r\n for i in ...
[ [ "matplotlib.pyplot.legend", "numpy.dot", "scipy.linalg.qr", "numpy.arange", "numpy.linalg.cond", "numpy.linalg.norm", "numpy.ones", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "numpy.zeros", "matplotlib.pyplot.ylabel" ] ]
cyq7on/DataMining
[ "77b2191661178192918d11af4ddd1225a7688470" ]
[ "practice/rw_visual.py" ]
[ "from practice.random_walk import RandomWalk\nimport matplotlib.pyplot as plot\n\nrw = RandomWalk(50000)\nrw.fill_walk()\npoint_numbers = list(range(rw.num_points))\n\n# 隐藏坐标轴\naxes = plot.axes()\naxes.xaxis.set_visible(False)\naxes.yaxis.set_visible(False)\n\nplot.scatter(rw.x, rw.y, c=point_numbers,\n ...
[ [ "matplotlib.pyplot.axes", "matplotlib.pyplot.show", "matplotlib.pyplot.scatter" ] ]
mayanks888/CenterNet
[ "e331bd17f158847564f5fb131185b21ece82b559", "e331bd17f158847564f5fb131185b21ece82b559" ]
[ "src/main_mayank_multitask copy.py", "src/onnx_ddd.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport _init_paths\nimport os\nimport torch\nimport torch.utils.data\nfrom lib.opts_mayank_multitask import opts\nfrom lib.models.model import create_model, load_model, save_model,create_model_custom\nfr...
[ [ "torch.device", "torch.manual_seed", "torch.no_grad" ], [ "torch.randn", "torch.onnx.export" ] ]
martinkim0/scvi-tools
[ "a5a7c596d1057a9fcd46dafd2a935b8ebbfbbc8d", "a5a7c596d1057a9fcd46dafd2a935b8ebbfbbc8d" ]
[ "tests/models/test_models.py", "tests/models/test_scarches.py" ]
[ "import os\nimport pickle\nimport tarfile\n\nimport anndata\nimport numpy as np\nimport pandas as pd\nimport pytest\nimport torch\nfrom pytorch_lightning.callbacks import LearningRateMonitor\nfrom scipy.sparse import csr_matrix\nfrom torch.nn import Softplus\n\nimport scvi\nfrom scvi.data import _constants, synthet...
[ [ "numpy.testing.assert_equal", "torch.nn.Softplus", "numpy.isnan", "numpy.isclose", "numpy.arange", "scipy.sparse.csr_matrix", "numpy.testing.assert_array_equal", "numpy.random.normal", "numpy.where", "numpy.savetxt", "numpy.array", "numpy.zeros", "numpy.sum", ...
roxax19/privacy-manager
[ "da805d6afbbd99dae6bb85b604f55fa7876e16ec" ]
[ "mounts/gen/gen.py" ]
[ "#Modified by: Manuel Ruiz Ruiz\n# \n# Esta API recibe un GET y devuelve la tabla entera anonimizada\n\nimport mysql.connector\nimport pandas as pd\nimport matplotlib.pylab as pl\nimport matplotlib.patches as patches\n\nfrom flask import Flask, request\nfrom flask_restful import Resource, Api\nfrom json import dump...
[ [ "pandas.read_sql", "matplotlib.patches.Rectangle", "pandas.DataFrame" ] ]
hanzopgp/JetsonAutonomousDriving
[ "b08600041e787ea0e79eb054d6a3efd99f3cfd8d" ]
[ "src/main/only_bounding_box_model/inference.py" ]
[ "import socket\nimport cv2\nimport pickle\nimport struct\nimport os\n\nimport torch\nfrom torch import nn\nfrom torchvision import models, transforms\n\nINPUT_SIZE = 400\nN_CLASS = 4\n\n# load model\nmodel_path = \"models/boundingbox_vgg_last.pth\"\nmodel = models.vgg16(pretrained=True)\nmodel.classifier = nn.Seque...
[ [ "torch.nn.Sigmoid", "torch.nn.Linear", "torch.no_grad", "torch.device", "torch.nn.ReLU" ] ]
hase1128/dragonfly
[ "4be7e4c539d3edccc4d243ab9f972b1ffb0d9a5c" ]
[ "examples/synthetic/multiobjective_hartmann/multiobjective_hartmann.py" ]
[ "\"\"\"\n Multi-objective version of the Hartmann functions.\n -- kandasamy@cs.cmu.edu\n\"\"\"\n\n# You should have one of the following two in this file:\n# 1. objectives: A list of functions, each of which corresponds to an objective.\n# 2. A function called compute_objectives which returns the value of all...
[ [ "numpy.exp", "numpy.array" ] ]
mynewstart/stanford-ml
[ "d402792a90fbe4bef638a4521f9abf050fefa579" ]
[ "test_feature_scaling.py" ]
[ "\n# coding: utf-8\nimport regression\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker as mtick\nfrom mpl_toolkits.mplot3d import axes3d\n\nif __name__==\"__main__\":\n srcX,y=regression.loadDataSet('data/houses.txt')\n\n m,n=srcX.shape\n #concatenate是数组拼接函数,axix=0是按照行拼接,axis=...
[ [ "matplotlib.pyplot.legend", "numpy.ones", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
inverthermit/sensor_data_ML
[ "779cc2e13c5ef2e92069d62478a0e3f3618659f8" ]
[ "script/clustering/cluster_statistic.py" ]
[ "from __future__ import division\nimport os\nimport numpy as np\nfrom datetime import datetime\nfrom os.path import isfile, join\nfrom os import listdir\nimport sys\nsys.path.append('../')\nfrom types import SimpleNamespace as Namespace\n# from SimpleNamespace import SimpleNamespace as Namespace\nimport random\nimp...
[ [ "numpy.savez", "sklearn.cluster.KMeans", "numpy.unique", "pandas.DataFrame", "numpy.load", "numpy.array", "numpy.vstack" ] ]
Tirth27/Mnist-and-Cifar10-Keras
[ "60707e7e4859be648e2287104c0b5a26b75c2acd" ]
[ "Mnist Source/mnist_conv.py" ]
[ "#98% Accuracy on 2 epoch\n\nfrom keras.datasets import mnist\nimport tensorflow.keras as keras\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Dropout, Flatten, BatchNormalization, Conv2D, MaxPooling2D\nfrom keras.utils import normalize\nfrom keras.callbacks import TensorBoard\nimport matplot...
[ [ "matplotlib.pyplot.plot", "tensorflow.keras.models.load_model" ] ]
prouast/ctc-intake-detection
[ "6dbfb9bbb0bb09980e4530b31742cb0d5357bf08" ]
[ "ctc.py" ]
[ "\"\"\"Using CTC for detection of events.\"\"\"\n\nimport tensorflow as tf\nfrom tensorflow_ctc_ext_beam_search_decoder import ctc_ext_beam_search_decoder\n\n@tf.function\ndef greedy_decode(inputs, seq_length, blank_index, def_val, shift):\n \"\"\"Naive inference by retrieving most likely output at each time-step....
[ [ "tensorflow.not_equal", "tensorflow.fill", "tensorflow.transpose", "tensorflow.sparse.to_dense", "tensorflow.reshape", "tensorflow.equal", "tensorflow.sparse.SparseTensor", "tensorflow.argmax" ] ]
i-tub/rdkit
[ "fb49a33b5adaa2c203efdbeae568134095b353c7" ]
[ "Contrib/AtomAtomSimilarity/AtomAtomPathSimilarity.py" ]
[ "# This is a reference implementation of the Atom-Atom-Path (AAP) similarity metric \n# from Gobbi et al, J. Cheminf. (2015) 7:11. https://doi.org/10.1186/s13321-015-0056-8\n#\n# Original author: Richard Hall\n#\nimport numpy\nimport time\nimport unittest\n\nfrom scipy.optimize import linear_sum_assignment\n\nfrom...
[ [ "numpy.ushort", "scipy.optimize.linear_sum_assignment", "numpy.nditer", "numpy.ones" ] ]
heartsh/rna-algos
[ "9a9e75662b0e79fa562a2053de197ada2d889a72" ]
[ "scripts/compile_rna_fams.py" ]
[ "#! /usr/bin/env python\n\nimport utils\nfrom Bio import SeqIO\nfrom Bio import AlignIO\nimport numpy\nimport seaborn\nfrom matplotlib import pyplot\nimport os\nimport multiprocessing\nimport time\nimport datetime\nimport shutil\n\ndef main():\n (current_work_dir_path, asset_dir_path, program_dir_path, conda_progr...
[ [ "numpy.random.choice" ] ]
luigiluz/pyCBPE
[ "e3e7282f7e234e67318d9a8c56d81f0956b79bdf" ]
[ "pyCBPE/normalization.py" ]
[ "\"\"\" This is the package responsible for realizing the ppg pulse normalization.\n\"\"\"\n\nimport numpy as np\nfrom sklearn.preprocessing import MinMaxScaler\nfrom pyampd.ampd import find_peaks\nimport pyCBPE.constants as consts\n\n\ndef normalize(signal):\n minimals = _detect_minimals(signal)\n central_pu...
[ [ "numpy.concatenate", "numpy.max", "numpy.floor", "numpy.array", "sklearn.preprocessing.MinMaxScaler" ] ]
dramoz/kv260-atrover
[ "7b698b5b033dad5dd40c96e2aa61ec7f6a186e0c" ]
[ "scripts/stereocam.py" ]
[ "# -----------------------------------------------------------------------------\nimport sys\nfrom pathlib import Path\nimport numpy as np\nimport cv2\n\n# -----------------------------------------------------------------------------\n# Local modules\n_workpath = Path(__file__).resolve().parent\nsys.path.append(str...
[ [ "numpy.ones" ] ]
Dok11/surface-match-dataset
[ "07d547b8756ca2b8e7340c99df8c9e4c77c1bfef" ]
[ "scripts/prepare_data.py" ]
[ "import json\nimport os\nimport re\n\nimport numpy as np\nfrom keras_preprocessing.image import load_img, img_to_array\nfrom tensorflow.python.keras.preprocessing.image import save_img\nfrom tensorflow.python.keras.utils import Progbar\n\n# ===========================================================================...
[ [ "tensorflow.python.keras.preprocessing.image.save_img", "numpy.savez_compressed", "numpy.array" ] ]
vkmb/ppe-detection
[ "40786d159a9db0416d5b61caac1d97cc010708ee" ]
[ "shape_utils.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.concat", "tensorflow.control_dependencies", "tensorflow.zeros", "tensorflow.stack", "tensorflow.map_fn", "tensorflow.pad", "tensorflow.where", "tensorflow.rank", "tensorflow.greater", "tensorflow.unstack", "tensorflow.shape", "tensorflow.less_equal", ...
rosenbrockc/782
[ "ec9927da0be17345b3f0d6819e59dfbf059ae4b2" ]
[ "basis/evaluate.py" ]
[ "\"\"\"Functions for evaluating basis functions for a given potential and\nconstructing the Hamiltonian matrix for the basis expansion\nsolution. By default, we use the Fourier :math:`\\sin(n \\pi x/L)`\nbasis functions as explained in [1]_.\n\n.. [1] http://dx.doi.org/10.1119/1.4944706\n\"\"\"\nimport numpy as np\...
[ [ "numpy.zeros", "numpy.sin" ] ]
passion4energy/pmdarima
[ "cafd5c79f1e5696c609716eca1514f0aaaf2d317" ]
[ "examples/example_simple_fit.py" ]
[ "\"\"\"\n=======================\nSimple auto_arima model\n=======================\n\n\nThis is a simple example of how we can fit an ARIMA model in several lines\nwithout knowing anything about our data or optimal hyper parameters.\n\n.. raw:: html\n\n <br/>\n\"\"\"\nprint(__doc__)\n\n# Author: Taylor Smith <tay...
[ [ "numpy.arange", "matplotlib.pyplot.show", "matplotlib.pyplot.title", "matplotlib.pyplot.scatter" ] ]
paulflang/PEtab
[ "f263174065109ad7c5500796d871a6326fabbc8c" ]
[ "petab/conditions.py" ]
[ "\"\"\"Functions operating on the PEtab condition table\"\"\"\n\nfrom typing import Iterable, Optional, List, Union\n\nimport numpy as np\nimport pandas as pd\n\nfrom . import lint, core\nfrom .C import *\n\n\ndef get_condition_df(\n condition_file: Union[str, pd.DataFrame, None]\n) -> pd.DataFrame:\n \"\...
[ [ "numpy.issubdtype", "pandas.read_csv", "pandas.DataFrame" ] ]
mdmohsinali/SGCT-Based-Fault-Tolerant-2D-SFI
[ "bc35188e1f9ade450dce75cfe934e9862e13059b" ]
[ "testing/petsc2h5.py" ]
[ "### ====================================================================\n### Python-file\n### author: Ethan T. Coon\n### filename: petsc2h5.py\n### version: \n### created: 15 November 2011\n### on: 10:07:25 MST\n### last modified: 15 November...
[ [ "numpy.arange", "numpy.zeros" ] ]
xiaobaishu0097/spconv
[ "4ef83629ea763477217a405f274fc870037eb93a" ]
[ "spconv/pytorch/spatial.py" ]
[ "# Copyright 2021 Yan Yan\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 t...
[ [ "torch.unique" ] ]
MicroMedIAn/MicroMind
[ "93e3e91ce4f210cf0a676a79edcdcf04fa6b4818" ]
[ "src/micromind/cv/image.py" ]
[ "import cv2\nimport numpy as np\n\nfrom micromind.geometry.vector import Vector2\n\nBINARY_FILL_COLOR = 255\n\n\ndef imnew(shape, dtype=np.uint8):\n return np.zeros(shape=shape, dtype=dtype)\n\n\ndef split_channels(image):\n return list(cv2.split(image))\n\n\ndef contours(image, exclude_holes=True):\n mode...
[ [ "numpy.argwhere", "numpy.all", "numpy.max", "numpy.mean", "numpy.zeros", "numpy.where" ] ]
cklb/odes
[ "945a461754c8155bca88aa83d725f77720a40539", "945a461754c8155bca88aa83d725f77720a40539", "945a461754c8155bca88aa83d725f77720a40539" ]
[ "docs/examples/performance_tests/egfngf_model.py", "scikits/odes/tests/test_odeint.py", "docs/examples/slidingpendulum.py" ]
[ "from numpy import linspace\n\nname = 'egfngf'\n\nts = linspace(0, 120, 121, dtype=float)\n\nk = [\n 2.18503E-5,\n 0.0121008,\n 1.38209E-7,\n 0.00723811,\n 694.731,\n 6086070.0,\n 389.428,\n 2112.66,\n 1611.97,\n 896896.0,\n 32.344,\n 35954.3,\n 1509.36,\n 1432410.0,\n 0...
[ [ "numpy.linspace" ], [ "numpy.dot", "numpy.testing.run_module_suite", "numpy.sqrt", "numpy.allclose", "numpy.arctan", "numpy.arange", "numpy.eye", "numpy.cos", "numpy.ones", "numpy.sin", "numpy.testing.assert_raises", "numpy.testing.assert_allclose", "num...
shivom2k/Topsis_ShivomChawla_101916036
[ "deb25abe2ff6e615aa476f24675805a42dc135fe" ]
[ "Topsis_ShivomChawla_101916036/__init__.py" ]
[ "import sys\r\nimport logging\r\nimport numpy as np\r\nimport pandas as pd\r\nimport os \r\n\r\ndef topsis(file_name,weight,impact,result_file_name):\r\n logging.basicConfig(filename=result_file_name+\"-log.txt\", level=logging.INFO)\r\n try:\r\n df=pd.read_csv(file_name)\r\n model_name=list(df...
[ [ "numpy.argsort", "numpy.array", "pandas.read_csv", "pandas.DataFrame" ] ]
kishansairam9/PlaNet
[ "cdc323115150e3c3781143b574476e1fc8a80535" ]
[ "main.py" ]
[ "import argparse\nfrom math import inf\nimport os\nimport numpy as np\nimport torch\nfrom torch import nn, optim\nfrom torch.distributions import Normal\nfrom torch.distributions.kl import kl_divergence\nfrom torch.nn import functional as F\nfrom torchvision.utils import make_grid, save_image\nfrom tqdm import tqdm...
[ [ "torch.randn_like", "torch.load", "torch.zeros", "torch.cat", "numpy.asarray", "torch.no_grad", "torch.cuda.is_available", "torch.device", "torch.ones", "numpy.zeros", "torch.nn.functional.pad", "torch.optim.Adam", "torch.full", "torch.nn.functional.mse_loss...
taeyeop-lee/detectron2-ros
[ "c8597a34f1d7cd883081a551c991279d1d47b556" ]
[ "detectron2/modeling/roi_heads/roi_heads.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\nimport inspect\nimport logging\nimport numpy as np\nfrom typing import Dict, List, Optional, Tuple\nimport torch\nfrom torch import nn\n\nfrom detectron2.config import configurable\nfrom detectron2.layers import ShapeSpec, nonzero_tuple\nfrom detectron2.structure...
[ [ "torch.nn.Sequential", "torch.cat", "torch.zeros_like", "torch.no_grad", "numpy.mean" ] ]
rwijtvliet/geopandas
[ "078062d303e401aaa5e37e04c0e7c3ce188920fe", "de58716e79602d63dff8622aa31feadd327a7e31" ]
[ "geopandas/tools/tests/test_clip.py", "geopandas/io/file.py" ]
[ "\"\"\"Tests for the clip module.\"\"\"\n\nimport warnings\n\nimport numpy as np\n\nimport shapely\nfrom shapely.geometry import Polygon, Point, LineString, LinearRing, GeometryCollection\n\nimport geopandas\nfrom geopandas import GeoDataFrame, GeoSeries, clip\nfrom geopandas.testing import assert_geodataframe_equa...
[ [ "numpy.array", "numpy.array_equal" ], [ "numpy.zeros" ] ]
ping-Huang/NCTU_DLSR_final_project
[ "a1724495fa2ea3eb80e1121c7438b3beea8165d5" ]
[ "team6/Classification/example_ngraph.py" ]
[ "from benchmark import benchmarking\nimport torch\nimport torchvision\nimport torchvision.transforms as transforms\nfrom torchvision.models.resnet import resnet18\nimport os\nimport sys\n#data_dir = os.environ['TESTDATADIR']\n#assert data_dir is not None, \"No data directory\"\nfrom models import resnet20_cifar\nfr...
[ [ "torch.load", "torch.utils.data.DataLoader", "numpy.argmax", "torch.no_grad", "numpy.equal" ] ]
iro-upgto/rkd
[ "7823781ddc81a9dac18fed55080205e8ed68b57b" ]
[ "rkd/__init__.py" ]
[ "#\n# Universidad Politécnica de Guanajuato\n# Departamento de Ingeniería Robótica\n#\n# rkd: Python library for kinematic analysis of robots\n\nimport numpy as np\nfrom .didactic import *\n\n# If True, always print floating point numbers using fixed point notation, \n# in which case numbers equal to zero in the cu...
[ [ "numpy.set_printoptions" ] ]
bkazi/Uni-Deep-Learning
[ "9c1cce722038b662c55dc17ae2a5de1293d60a76" ]
[ "shallow_nn.py" ]
[ "import tensorflow as tf\nfrom utils import tf_melspectogram\n\nFLAGS = tf.app.flags.FLAGS\n\n\ndef activation_func(x):\n return tf.nn.leaky_relu(x, alpha=0.3)\n\n\ndef shallow_nn(x, is_training):\n \"\"\"shallow_nn builds the graph for a shallow net for classifying music genres.\n Args:\n x: an input t...
[ [ "tensorflow.layers.flatten", "tensorflow.concat", "tensorflow.summary.image", "tensorflow.layers.dropout", "tensorflow.contrib.layers.l1_regularizer", "tensorflow.layers.max_pooling2d", "tensorflow.initializers.truncated_normal", "tensorflow.variable_scope", "tensorflow.initial...
Stormzqz/Study_ml_ba_ds
[ "525219a00339b83705120e798e6b40490d23fefe" ]
[ "knn_test.py" ]
[ "import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n# %matplotlib inline\n\nfrom sklearn.datasets import load_iris\nfrom sklearn.model_selection import train_test_split\nfrom collections import Counter\n\n# data\niris = load_iris()\ndf = pd.DataFrame(iris.data, columns=iris.feature_names)\ndf...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.scatter", "sklearn.datasets.load_iris", "sklearn.model_selection.train_test_split", "pandas.DataFrame", "numpy.linalg.norm", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.ylabel" ] ]
eshanMewantha/logistic-regression
[ "f1957e1a6c605c69375f04ec3bd292b91c3a1ba0" ]
[ "iris_data/iris_scikit_learn.py" ]
[ "from sklearn.datasets import load_iris\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import accuracy_score, recall_score, precision_score\n\n# Load and split data to data fields and target field\niris = load_iris()\nX, y = iris.data...
[ [ "sklearn.linear_model.LogisticRegression", "sklearn.metrics.precision_score", "sklearn.datasets.load_iris", "sklearn.model_selection.train_test_split", "sklearn.metrics.recall_score", "sklearn.metrics.accuracy_score" ] ]
ScriptBox99/triton
[ "6f7acad48fd94384f5b1fe0148e2c7f584a6aefd" ]
[ "python/tutorials/05-layer-norm.py" ]
[ "\"\"\"\nLayer Normalization\n====================\n\"\"\"\n\nimport torch\nimport triton.language as tl\nimport triton\n\n# Forward Pass\n@triton.jit\ndef _layer_norm_fwd_fused(X, Y, W, B, M, V, stride, N, eps, **META):\n BLOCK_SIZE = META['BLOCK_SIZE']\n # position of elements processed by this program\n ...
[ [ "torch.randn_like", "torch.nn.functional.layer_norm", "torch.empty_like", "torch.empty", "torch.zeros", "torch.randn", "torch.rand" ] ]
MuhammadAliShahzad/models
[ "984be23d3d0f7c324c230dd4014c5e5ee1359684" ]
[ "official/modeling/model_training_utils.py" ]
[ "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.convert_to_tensor", "tensorflow.executing_eagerly", "tensorflow.train.latest_checkpoint", "tensorflow.range", "tensorflow.train.Checkpoint", "tensorflow.io.gfile.GFile", "tensorflow.function", "tensorflow.summary.scalar", "tensorflow.keras.metrics.Mean", "tensor...
wangkangkan/LearningDenseCorrespondences
[ "724eb9521de1abeda551ede6d93cbecaba90efbd", "724eb9521de1abeda551ede6d93cbecaba90efbd" ]
[ "finetune_stage2/config_our_3dpoint.py", "finetune_stage1/config_our_3dpoint.py" ]
[ "\"\"\"\nSets default args\n\nNote all data format is NHWC because slim resnet wants NHWC.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport sys\nfrom absl import flags\nimport os.path as osp\nfrom os import makedirs\nfrom glob import...
[ [ "numpy.all" ], [ "numpy.all" ] ]