repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
jl45621/coach
[ "9a895a1ac73aff44b2e6eb8e4d01e8ec35ceb084", "9a895a1ac73aff44b2e6eb8e4d01e8ec35ceb084" ]
[ "rl_coach/filters/observation/observation_normalization_filter.py", "rl_coach/renderer.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.array" ], [ "numpy.stack", "numpy.transpose" ] ]
cday97/beam
[ "7e1ab50eecaefafd04daab360f8b12bc7cab559b", "7e1ab50eecaefafd04daab360f8b12bc7cab559b" ]
[ "src/main/python/smart/smartplots3_setup.py", "src/main/python/smart/smartplots2_setup.py" ]
[ "import matplotlib\nimport sys\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport matplotlib.patches as mpatches\nimport matplotlib.lines as mlines\nimport os\n\nplt.style.use('seaborn-colorblind')\n# plt.style.use('ggplot')\nplt.rcParams['axes.edgecolor'] = 'black'\nplt.rcParams['axe...
[ [ "matplotlib.pyplot.text", "matplotlib.pyplot.axhline", "pandas.DataFrame", "matplotlib.pyplot.savefig", "pandas.concat", "matplotlib.pyplot.legend", "matplotlib.pyplot.close", "matplotlib.pyplot.figure", "matplotlib.patches.Patch", "matplotlib.pyplot.style.use", "matplo...
Liangrj5/tf-encrypted
[ "3279cb81bd4242eec9afa60db00127a5bac228bf" ]
[ "tf_encrypted/tensor/shared.py" ]
[ "\"\"\"Commonly used tensor functions.\"\"\"\nimport math\nfrom typing import Union, Optional\n\nimport tensorflow as tf\nimport numpy as np\n\nfrom .factory import AbstractTensor\n\n\ndef binarize(tensor: tf.Tensor,\n bitsize: Optional[int] = None) -> tf.Tensor:\n \"\"\"Extract bits of values in `tens...
[ [ "tensorflow.range", "tensorflow.expand_dims", "tensorflow.bitwise.right_shift", "tensorflow.extract_image_patches", "tensorflow.transpose", "tensorflow.reshape", "tensorflow.name_scope" ] ]
Christian-Zwinkels-CAS/Machine-Learning-Attempt
[ "0042518da12367f8e34067a922ba46304059fec2" ]
[ "Supervised_Learning/Neural_Network/NN.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Dec 29 16:02:11 2019\n\n@author: Christian Zwinkels-Valero\n\"\"\"\n\nimport pandas as pd\nimport numpy as np\nfrom matplotlib import pyplot as plt\n\n# Activation functions\ndef sigmoid(z):\n return 1 / (1 + np.exp(z))\n\ndef d_sigmoid(z):\n return sigmoid(z)*...
[ [ "numpy.max", "numpy.dot", "numpy.random.rand", "numpy.zeros", "numpy.log", "matplotlib.pyplot.plot", "numpy.min", "numpy.mean", "numpy.exp", "numpy.multiply", "numpy.where", "numpy.sqrt", "matplotlib.pyplot.show", "pandas.read_csv", "numpy.maximum" ] ]
jrekoske-usgs/groundmotion-processing
[ "4cdbc328f3a70f721fa44745689c62b5aa474c1e" ]
[ "tests/gmprocess/metrics/imt/fas_greater_of_two_test.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# stdlib imports\nimport os.path\nimport re\n\n# third party imports\nimport numpy as np\nimport pandas as pd\nimport pkg_resources\n\n# Local imports\nfrom gmprocess.metrics.station_summary import StationSummary\nfrom gmprocess.core.stationstream import StationStr...
[ [ "pandas.read_pickle", "numpy.testing.assert_allclose" ] ]
bryevdv/holoviews
[ "8a8332cb15d591fb0b93a745e745f8d0ee306a3e" ]
[ "holoviews/selection.py" ]
[ "from collections import namedtuple\n\nimport numpy as np\nimport param\n\nfrom param.parameterized import bothmethod\n\nfrom .core.data import Dataset\nfrom .core.dimension import OrderedDict\nfrom .core.element import Element, Layout\nfrom .core.options import CallbackError, Store\nfrom .core.overlay import NdOve...
[ [ "numpy.zeros" ] ]
butterluo/oneflow
[ "cf2ce575d80f89642b71bee2248e69b09213007d" ]
[ "python/oneflow/test/graph/test_graph_optim_lamb.py" ]
[ "\"\"\"\nCopyright 2020 The OneFlow Authors. All rights reserved.\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-2.0\n\nUnless required by ap...
[ [ "numpy.zeros_like", "numpy.linalg.norm", "numpy.random.seed", "numpy.random.uniform", "numpy.power", "numpy.sqrt" ] ]
iclementine/practical-pytorch
[ "88e2e53e47328cdb3ec23573aec3ff0421f1a2b7" ]
[ "seq2seq-translation-batched/evaluate.py" ]
[ "from data import *\nfrom model import *\nfrom utils import *\n\nimport torch\nfrom torch.autograd import Variable\nimport torch.nn as nn\nfrom torch import optim\nimport torch.nn.functional as F\n\n#import matplotlib.pyplot as plt\n#import matplotlib.ticker as ticker\n#import numpy as np\n\n\n#import io\n#import t...
[ [ "torch.zeros", "torch.LongTensor" ] ]
molnarszilard/latent_3d_points
[ "cb66fe043c7e9cbb0ed16082bca81b0f50c325fb" ]
[ "src/generators_discriminators.py" ]
[ "'''\nCreated on May 11, 2017\n\n@author: optas\n'''\n\nimport numpy as np\nimport tensorflow as tf\nfrom tflearn.layers.normalization import batch_normalization\nfrom tflearn.layers.core import fully_connected, dropout\n\nfrom . encoders_decoders import encoder_with_convs_and_symmetry, decoder_with_fc_only\nfrom ....
[ [ "tensorflow.nn.sigmoid", "numpy.prod", "tensorflow.nn.relu", "tensorflow.reshape" ] ]
ziqingzeng/public
[ "4102b3bd42f43b49cf74599492d52d4f755ab7b2" ]
[ "tabla/tabla/benchmarks/onnx/svm_tf.py" ]
[ "import tensorflow.compat.v1 as tf\nimport numpy as np\n\n\nm = 1740\n\nx_batch = np.random.rand(m)\ny_batch = np.random.rand(1)\n\nweights = np.random.rand(m)\nbiases = np.random.rand(m)\n\nwith tf.Session() as sess:\n\n x = tf.placeholder(tf.float32, shape=(m, ), name='x')\n y = tf.placeholder(tf.float32, s...
[ [ "tensorflow.compat.v1.placeholder", "numpy.random.rand", "tensorflow.compat.v1.subtract", "tensorflow.compat.v1.greater", "tensorflow.compat.v1.train.Saver", "tensorflow.compat.v1.initialize_all_variables", "tensorflow.compat.v1.Session", "tensorflow.compat.v1.multiply", "tenso...
pulp-platform/multispectral-riemannian
[ "09b2db4bb31a9a3823e72577b18581a40af7277d" ]
[ "multiscale_bci_python/riemannian_model.py" ]
[ "#!/usr/bin/env python3\n\n''' \nModel for Riemannian feature calculation and classification for EEG data\n'''\n\nimport numpy as np\nfrom sklearn.svm import LinearSVC, SVC\n\nfrom riemannian_multiscale import RiemannianMultiscale, QuantizedRiemannianMultiscale\nfrom filters import load_filterbank\nfrom utilities i...
[ [ "numpy.array", "numpy.abs", "sklearn.svm.LinearSVC", "sklearn.svm.SVC" ] ]
AJMGroup/matador
[ "1fa94acc3be9c68920cb456b42262bdcab40aa95" ]
[ "tests/test_plotting.py" ]
[ "#!/usr/bin/env python\n\n\"\"\" These tests only check whether plots are created,\nnot that they look correct!\n\n\"\"\"\n\nimport unittest\nimport os\nimport sys\nfrom glob import glob\nimport numpy as np\nimport matador.cli.dispersion\nfrom matador.scrapers import res2dict, magres2dict\nfrom matador.hull import ...
[ [ "matplotlib.use" ] ]
callaunchpad/MOR
[ "becd8a181312882dae3d3495a730e268183f803f" ]
[ "environments/robot_arm/robot_arm.py" ]
[ "import numpy as np\nimport logging\nimport os, errno\nfrom datetime import datetime\nfrom ..abstract import Environment\nfrom maddux.environment import Environment\nfrom maddux.objects import Ball\nfrom maddux.robots import simple_human_arm\n\nclass RobotArm(Environment):\n\n\tdef __init__(self, env, training_dire...
[ [ "numpy.linalg.norm" ] ]
BIGWangYuDong/mmcv
[ "c46deb0576edaff5cd5a7d384c617478c7a73a70", "c46deb0576edaff5cd5a7d384c617478c7a73a70" ]
[ "mmcv/parallel/distributed.py", "tests/test_ops/test_upfirdn2d.py" ]
[ "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\nfrom torch.nn.parallel.distributed import (DistributedDataParallel,\n _find_tensors)\n\nfrom mmcv import print_log\nfrom mmcv.utils import TORCH_VERSION, digit_version\nfrom .scatter_gather import scatter_kwarg...
[ [ "torch.is_grad_enabled", "torch.nn.parallel.distributed._find_tensors" ], [ "torch.cuda.is_available", "torch.tensor", "torch.randn" ] ]
jjleewustledu/NiftyPETy
[ "6d0a84d20beb7a3692e01c306b4ac96ea6d12d48" ]
[ "respet/recon/recon_john_2018sep8.py" ]
[ "#!/usr/bin/env python\n\"\"\"Reconstruction of PET data using Python package NiftyPET.\"\"\"\n__author__ = \"Pawel Markiewicz\"\n__copyright__ = \"Copyright 2017, University College London\"\n# ---------------------------------------------------------------------------------\n\n\nimport matplotlib.pyplot as...
[ [ "numpy.float32", "numpy.transpose" ] ]
Adrian-Howard/MetaPhlAn
[ "4294990ee9a5dd48bdff564d5d31724627837c27" ]
[ "metaphlan/utils/plot_tree_graphlan.py" ]
[ "#!/usr/bin/env python\n__author__ = ('Duy Tin Truong (duytin.truong@unitn.it), '\n 'Aitor Blanco Miguez (aitor.blancomiguez@unitn.it)')\n__version__ = '3.0'\n__date__ = '21 Feb 2020'\n\nimport argparse as ap\nimport dendropy\nfrom io import StringIO\nimport re\nfrom collections import defaultdict\n...
[ [ "matplotlib.colors.cnames.keys" ] ]
laowng/GISR
[ "d95b9e6eafb719f17c7ce46cba57e3eecbdadbaf" ]
[ "src/model/PixelUnShuffle.py" ]
[ "# This code is heavily inspired from https://github.com/fangwei123456/PixelUnshuffle-pytorch\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\ndef pixel_unshuffle(input, downscale_factor):\n '''\n input: batchSize * c * k*w * k*h\n downscale_factor: k\n batchSize * c * k*w * k*...
[ [ "torch.zeros", "torch.nn.functional.conv2d" ] ]
bomm412/99-1-im-GTSRB-Testdatensatz-mit-Tensorflow
[ "079cbe8e2990db7916ca3444e6e3b38ab3bdfc2b" ]
[ "Programme/Trainingsprogramm_mit_Messdaten.py" ]
[ "#importieren aller notwenigen Bibliotheken\r\nimport tensorflow.compat.v1 as tf\r\n#Die Hauptbibliothek Tensorflow wird geladen\r\nfrom tensorflow.keras.models import Sequential, save_model\r\nfrom tensorflow.keras.layers import Conv2D, BatchNormalization, MaxPool2D, MaxPooling2D, Dense, Dropout, Activation, Flatt...
[ [ "tensorflow.keras.preprocessing.image.load_img", "numpy.asarray", "tensorflow.keras.layers.Flatten", "tensorflow.keras.layers.Activation", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.MaxPooling2D", ...
nmiculinic/minion-basecaller
[ "73a134c8ed3715e79319780e24a171dd21713408" ]
[ "mincall/_experiments/load_save_modify.py" ]
[ "import tensorflow as tf\nfrom google.protobuf import json_format, text_format\nfrom tensorflow.contrib import graph_editor as ge\n\n\ndef save():\n with tf.Graph().as_default() as g:\n x = tf.placeholder(tf.float32, name=\"input\")\n a = tf.Variable(5.0)\n res: tf.Tensor = tf.multiply(a, x,...
[ [ "tensorflow.multiply", "tensorflow.get_default_graph", "tensorflow.Graph", "tensorflow.Session", "tensorflow.Variable", "tensorflow.graph_util.convert_variables_to_constants", "tensorflow.import_graph_def", "tensorflow.get_session_handle", "tensorflow.GraphDef", "tensorflow...
gkswjdzz/gpt-2-model-generator
[ "be3c47268b21c746f5b7c7c322dd721cedd4d80e" ]
[ "src/sample.py" ]
[ "import tensorflow as tf\nif tf.__version__ > '2':\n import tensorflow.compat.v1 as tf\n\nimport model\n\ndef top_k_logits(logits, k):\n if k == 0:\n # no truncation\n return logits\n\n def _top_k():\n values, _ = tf.nn.top_k(logits, k=k)\n min_values = values[:, -1, tf.newaxis]...
[ [ "tensorflow.compat.v1.cast", "tensorflow.compat.v1.name_scope", "tensorflow.compat.v1.to_float", "tensorflow.compat.v1.gather_nd", "tensorflow.compat.v1.ones_like", "tensorflow.compat.v1.nn.softmax", "tensorflow.compat.v1.equal", "tensorflow.compat.v1.concat", "tensorflow.compa...
hpi-dhc/fiber
[ "0ba29c370c1b73add5f0cc7be5928b0ab00b3fd0" ]
[ "fiber/condition/database.py" ]
[ "from functools import reduce\nfrom itertools import chain\nfrom typing import Optional, Set\n\nimport pandas as pd\nfrom sqlalchemy import (\n func,\n or_,\n orm,\n sql,\n)\n\nimport fiber\nfrom fiber.condition.base import _BaseCondition\nfrom fiber.database import (\n compile_sqla,\n read_with_p...
[ [ "pandas.DataFrame" ] ]
zezhishao/BasicTS
[ "584ca6f8215a6fc9976789b600996934ba2d499e" ]
[ "basicts/options/DCRNN/DCRNN_PEMS07.py" ]
[ "import os\nfrom easydict import EasyDict\nimport torch\n# architecture \nfrom basicts.archs.DCRNN_arch import DCRNN\n# runner\nfrom basicts.runners.DCRNN_runner import DCRNNRunner\nfrom basicts.data.base_dataset import BaseDataset\nfrom basicts.metrics.mae import masked_mae\nfrom basicts.metrics.mape import masked...
[ [ "torch.tensor" ] ]
TreeerT/pymor
[ "e8b18d2d4c4b5998f0bd84f6728e365e0693b753" ]
[ "src/pymor/discretizers/builtin/gui/matplotlib.py" ]
[ "# This file is part of the pyMOR project (http://www.pymor.org).\n# Copyright 2013-2020 pyMOR developers and contributors. All rights reserved.\n# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)\n\n\"\"\" This module provides widgets for displaying plots of\nscalar data assigned to one-...
[ [ "numpy.concatenate", "numpy.zeros_like", "matplotlib.animation.FuncAnimation", "numpy.tile", "matplotlib.figure.Figure", "numpy.repeat", "numpy.vstack" ] ]
alix-tz/GT_generator
[ "7f7e13b6be731771bfebc6847eba9d84fd12e8f7" ]
[ "GT_generator/gt_image.py" ]
[ "import cv2\nimport numpy as np\n# import gt_utils\n\n\ndef binarize(img):\n \"\"\" Take an RGB image and binarize it.\n\n :param img: cv2 image\n :return:\n \"\"\"\n gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\n ret, bin = cv2.threshold(gray, 1, 255, cv2.THRESH_BINARY)\n return bin\n\n\ndef m...
[ [ "numpy.zeros" ] ]
MiraGeoscience/mirageoscience-apps
[ "8c445ec8f2391349aa4cac6c705426301b3c31ca" ]
[ "geoapps/contours/application.py" ]
[ "# Copyright (c) 2022 Mira Geoscience Ltd.\n#\n# This file is part of geoapps.\n#\n# geoapps is distributed under the terms and conditions of the MIT License\n# (see LICENSE file at the root of this source code package).\n\n\nimport numpy as np\nfrom geoh5py.io import H5Writer\nfrom geoh5py.objects import Curve...
[ [ "scipy.interpolate.LinearNDInterpolator", "numpy.ones", "numpy.arange", "numpy.hstack", "numpy.vstack" ] ]
Shakil-Mahmud-Programmer/Regular-Falsi-Method-or-False-Position-Method
[ "1b4447e9cfaf9772628a32ae9a5a372407fe4fd5" ]
[ "1st_formula.py" ]
[ "import tabulate\r\nimport matplotlib.pyplot as plt\r\nimport math\r\nimport numpy as np\r\nData=[]\r\ndata=[]\r\nx_axis=[]\r\ny_axis=[]\r\ndef falci(func,a,b,error_accept):\r\n def f(x):\r\n f = eval(func)\r\n return f\r\n error=b-a\r\n if(f(a)*f(b)>=0 and a>=b):\r\n print(\"wrong a,b...
[ [ "numpy.array", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.style.use", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show" ] ]
SungKu/gym-SBRV1
[ "0610f64aa2464ca878407ef4b91b830234e9976c", "0610f64aa2464ca878407ef4b91b830234e9976c" ]
[ "gym_SBR/envs/module_temperature.py", "gym_SBR/envs/SBR_model_batchPID_fbPID.py" ]
[ "import numpy as np\r\n\r\ndef DO_set(T_as):\r\n\r\n # Oxygen concentration at saturation\r\n # is function of Temp.\r\n\r\n #T_as = 15\r\n T_k = T_as + 273.15\r\n T_ast = T_k / 100\r\n\r\n A = -66.7354\r\n B = 87.4755\r\n C = 24.4526\r\n\r\n f_Tk = 56.12 * np.exp(A + B / T_ast + C * np.l...
[ [ "numpy.log" ], [ "numpy.vstack", "numpy.zeros" ] ]
tmieslinger/typhon
[ "588539e5c4831ee18753d7ead5b2f2736e922bb1" ]
[ "doc/pyplots/plot_qualitative1.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"Plot to demonstrate the qualitative1 colormap.\n\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom typhon.plots import (figsize, cmap2rgba)\n\n\nx = np.linspace(0, 10, 100)\n\nfig, ax = plt.subplots(figsize=figsize(10))\nax.set_prop_cycle(color=cmap2rgba('qualita...
[ [ "matplotlib.pyplot.show", "numpy.linspace", "numpy.arange" ] ]
davecyl/cohere-scripts
[ "726302f9f8785b4e79254567209da2acfdcf29df" ]
[ "scripts/alien_tools.py" ]
[ "# #########################################################################\n# Copyright (c) , UChicago Argonne, LLC. All rights reserved. #\n# #\n# See LICENSE file. #\n# #####...
[ [ "numpy.zeros_like", "numpy.array", "numpy.sum", "numpy.load", "numpy.logical_and", "numpy.where", "sklearn.cluster.DBSCAN", "numpy.argmax", "numpy.unique" ] ]
s3prl/End-to-end-ASR-Pytorch
[ "64e3d844cebca1eb442b9327f43145c95c9a6088" ]
[ "main.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\nimport os\nimport yaml\nimport torch\nimport argparse\nimport numpy as np\nfrom torch.distributed import get_rank, get_world_size\n\n# For reproducibility, comment these may speed up training\ntorch.backends.cudnn.deterministic = True\ntorch.backends.cudnn.benchmark = False\...
[ [ "torch.cuda.manual_seed_all", "numpy.random.seed", "torch.distributed.init_process_group", "torch.hub.set_dir", "torch.manual_seed", "torch.cuda.set_device", "torch.cuda.is_available" ] ]
pramitmallick/spinn
[ "a5d476b3fad8e4ee97eeed7ac914993bdf7be384" ]
[ "scripts/convert_ckpt.py" ]
[ "import gflags\nimport sys\nimport torch\n\nfrom spinn.util.misc import recursively_set_device\n\nFLAGS = gflags.FLAGS\n\n\ndef convert(inpt, outp, gpu=-1):\n ckpt = torch.load(inpt)\n\n if gpu < 0:\n ckpt['model_state_dict'] = {k: v.cpu() for k, v in ckpt['model_state_dict'].items()}\n else:\n ...
[ [ "torch.save", "torch.load" ] ]
William-Metz/OASFORNEURALNETWORKS
[ "b455f414224820d323cf96e77ca1c5d07b2dd3dd" ]
[ "openaerostruct/tests/test_multiple_aero_analysis.py" ]
[ "from __future__ import division, print_function\nfrom openmdao.utils.assert_utils import assert_rel_error\nimport unittest\nimport numpy as np\n\nfrom openaerostruct.geometry.utils import generate_mesh\nfrom openaerostruct.geometry.geometry_group import Geometry\nfrom openaerostruct.aerodynamics.aero_groups import...
[ [ "numpy.array", "numpy.zeros" ] ]
ml-jku/melvin
[ "70673638b6c19ec1b8f6c4854932850d8d5abce7" ]
[ "valid.py" ]
[ "import os\nimport argparse\nfrom shutil import rmtree\nfrom datetime import datetime\nimport numpy as np\nfrom tensorboardX import SummaryWriter\nfrom sklearn.metrics import confusion_matrix\nfrom time import sleep\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.utils.data.sampl...
[ [ "torch.device", "numpy.zeros", "torch.no_grad", "torch.manual_seed", "torch.load" ] ]
wesselb/ring
[ "ef195603b56e805a49018dafa952b422f529b1b8" ]
[ "tests/test_util.py" ]
[ "import operator\n\nimport numpy as np\nimport pytest\n\nfrom algebra.util import squeeze, get_subclasses, broadcast, identical, to_tensor\n\n\ndef test_squeeze():\n assert squeeze([1, 2]) == [1, 2]\n assert squeeze([1]) == 1\n\n\ndef test_get_subclasses():\n class A:\n pass\n\n class B1(A):\n ...
[ [ "numpy.array", "numpy.ones" ] ]
binggu56/qmd
[ "e2628710de15f8a8b9a1280fcf92f9e87559414c", "e2628710de15f8a8b9a1280fcf92f9e87559414c" ]
[ "GWP/2D/1.0.7/harm_data.py", "GWP/2D/1.1.0/fft.py" ]
[ "##!/usr/bin/python\n\nimport numpy as np\nimport pylab as plt \nimport subprocess \nimport seaborn as sns \n\n#sns.set_context('poster')\n\nplt.subplot(1,1,1)\nt,dat0,dat1 = np.genfromtxt(fname='cor.dat',usecols=(0,1,2),unpack=True) \n\n#for x in range(1,data.shape[-1]):\n \n#plt.plot(data[:,0],data[:,1],lw=2,l...
[ [ "numpy.genfromtxt" ], [ "numpy.savetxt", "numpy.log", "numpy.exp", "numpy.loadtxt", "numpy.column_stack" ] ]
eaton-lab/toyplot
[ "472f2f2f1bc048e485ade44d75c3ace310be4b41" ]
[ "features/steps/style.py" ]
[ "# Copyright 2014, Sandia Corporation. Under the terms of Contract\n# DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain\n# rights in this software.\n\nfrom behave import *\n\nimport numpy\nimport toyplot\n\nimport testing\n\n@given(u'a sample plot, the plot can be rendered with a dashed...
[ [ "numpy.linspace" ] ]
arshad2101/adas-tensorflow
[ "27320a7313e9c4c791f4d60534fbf39819025f60" ]
[ "dataset_parser/generator.py" ]
[ "import h5py\nimport numpy as np\nimport random\nimport cv2\n\nfrom keras.preprocessing.image import ImageDataGenerator\n\n# Use only 3 classes.\n# labels = ['background', 'person', 'car', 'road']\n\n\ndef pre_processing(img):\n # Random exposure and saturation (0.9 ~ 1.1 scale)\n rand_s = random.uniform(0.9,...
[ [ "numpy.logical_not", "numpy.array", "numpy.ones_like", "numpy.zeros", "numpy.where", "numpy.squeeze" ] ]
CHUJianchun/VAE_MLP_PSO
[ "76db540c7a6b97cd443af5abe5280271e176e56e", "76db540c7a6b97cd443af5abe5280271e176e56e" ]
[ "VAE_MLP/VAE_MLP_cat_model.py", "Multi_optim/Transform.py" ]
[ "import torch\r\nimport torch.nn as nn\r\nimport torch.optim as optim\r\nimport torch.nn.functional as f\r\nfrom torch.autograd import Variable\r\nimport os\r\nimport numpy as np\r\nfrom tqdm import tqdm\r\n\r\n\r\ndef reparameterize(mu, logvar):\r\n eps = Variable(torch.randn(mu.size(0), mu.size(1))).cuda()\r\n...
[ [ "torch.nn.Linear", "torch.cat", "numpy.argmin", "torch.nn.BatchNorm2d", "torch.nn.LeakyReLU", "torch.load", "torch.exp", "torch.nn.init.constant_", "torch.autograd.Variable", "torch.nn.ConvTranspose2d", "torch.nn.init.normal_", "torch.nn.Tanh", "torch.save", ...
Moon-sung-woo/Audio_classification_CRNN
[ "8b102413489c3a3f043d23a29a6d778cc4640be8" ]
[ "net/model.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom .base_model import BaseModel\n\n# F.max_pool2d needs kernel_size and stride. If only one argument is passed, \n# then kernel_size = stride\n\nfrom .audio import MelspectrogramStretch\nfrom torchparse import parse_cfg\n\n# Architecture inspi...
[ [ "torch.no_grad", "torch.nn.functional.log_softmax", "torch.nn.utils.rnn.pad_packed_sequence", "torch.tensor", "torch.nn.utils.rnn.pack_padded_sequence", "torch.exp" ] ]
shahaf-shafirstein/IML.HUJI
[ "94a49c3e4a58fab831ea4a052b471ac1103cd22e" ]
[ "exercises/house_price_prediction.py" ]
[ "from IMLearn.utils import split_train_test\nfrom IMLearn.learners.regressors import LinearRegression\nfrom IMLearn.metrics import *\n\nfrom typing import NoReturn\nimport numpy as np\nimport pandas as pd\nimport plotly.graph_objects as go\nimport plotly.express as px\nimport plotly.io as pio\n\npio.templates.defau...
[ [ "numpy.array", "numpy.cov", "numpy.random.seed", "numpy.std", "numpy.append", "pandas.read_csv" ] ]
Alexandros23Kazantzidis/orbitdeterminator
[ "6432046b57cbba3b85c28ea73da450151185d975" ]
[ "orbitdeterminator/kep_determination/ellipse_fit.py" ]
[ "import argparse\nfrom functools import partial\n\nimport math\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\nfrom scipy.optimize import minimize\n\ndef read_args():\n '''Reads command line arguments.\n\n Returns: Parsed arguments.'''\n\n parser = argparse...
[ [ "numpy.dot", "numpy.array_equal", "numpy.argmin", "numpy.min", "numpy.cos", "numpy.max", "numpy.divide", "numpy.sin", "numpy.linalg.norm", "numpy.empty", "numpy.sqrt", "numpy.column_stack", "numpy.linalg.inv", "scipy.optimize.minimize", "numpy.cross", ...
Lambda-School-Labs/Labs26-Citrics-DS-TeamC
[ "07420d8a6ecaf6ecfdb8229f918c8dc8bbc2a53b", "07420d8a6ecaf6ecfdb8229f918c8dc8bbc2a53b" ]
[ "project/app/api/wage_trade_transport_viz.py", "project/app/api/wage_hospitality_viz.py" ]
[ "from fastapi import APIRouter, HTTPException\nimport pandas as pd\nimport plotly.express as px\nimport json\nfrom dotenv import load_dotenv\nimport os\nimport psycopg2\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.types import Integer, Float, Text, String, DateTime\nfrom fastapi.encoders import jsonable_e...
[ [ "pandas.read_sql", "pandas.PeriodIndex" ], [ "pandas.read_sql", "pandas.PeriodIndex" ] ]
LiangHao151941/tvm
[ "a1854339cb1a3b609a3aefaa01cf39bb708e3feb" ]
[ "python/tvm/relay/frontend/tflite.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.array", "numpy.prod", "numpy.transpose" ] ]
melissawm/pandas
[ "9b2bb732f09d8e870d806b337b97d3d99fd5b118" ]
[ "pandas/core/indexes/datetimelike.py" ]
[ "\"\"\"\nBase and utility classes for tseries type pandas objects.\n\"\"\"\nfrom __future__ import annotations\n\nfrom datetime import datetime\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Sequence,\n TypeVar,\n cast,\n final,\n)\nimport warnings\n\nimport numpy as np\n\nfrom pan...
[ [ "numpy.array_equal", "pandas.core.indexes.range.RangeIndex", "pandas.core.indexes.extension.NDArrayBackedExtensionIndex.take", "pandas.core.common.asarray_tuplesafe", "pandas._libs.Timedelta", "pandas.core.tools.timedeltas.to_timedelta", "pandas.core.indexes.extension.inherit_names", ...
rhayman/ephysiopy
[ "c0f876a258bd34234f26b362c44c17fe75dc06f4" ]
[ "ephysiopy/common/spikecalcs.py" ]
[ "import warnings\nimport numpy as np\nfrom scipy import signal\nfrom scipy import stats\nimport matplotlib.pylab as plt\n\n\nclass SpikeCalcsGeneric(object):\n \"\"\"\n Deals with the processing and analysis of spike data.\n\n Parameters\n ----------\n spike_times : array_like\n The times of '...
[ [ "numpy.argmin", "numpy.tile", "scipy.stats.linregress", "numpy.mean", "scipy.stats.pearsonr", "numpy.linalg.qr", "scipy.signal.filtfilt", "numpy.nanmean", "numpy.min", "numpy.imag", "numpy.bincount", "numpy.histogram", "numpy.count_nonzero", "numpy.full", ...
josef-pkt/statsmodels
[ "9eebbfa000b9f7ca853247efbced99f4ddaa088c" ]
[ "statsmodels/tsa/stattools.py" ]
[ "\"\"\"\nStatistical tools for time series analysis\n\"\"\"\nfrom statsmodels.compat.python import (iteritems, range, lrange, string_types,\n lzip, zip, long)\nfrom statsmodels.compat.scipy import _next_regular\n\nimport numpy as np\nfrom numpy.linalg import LinAlgError\nfrom s...
[ [ "numpy.dot", "numpy.finfo", "numpy.fft.fft", "numpy.cumsum", "numpy.conjugate", "scipy.stats.chi2.sf", "pandas.DataFrame", "numpy.interp", "scipy.stats.f.sf", "numpy.eye", "numpy.arange", "numpy.sqrt", "numpy.array", "numpy.zeros", "numpy.diff", "num...
bflaven/BlogArticlesExamples
[ "5df2dfc26170ffbbade78ba136bf3172391e3b2a", "5df2dfc26170ffbbade78ba136bf3172391e3b2a" ]
[ "fake_news_nlp_detection/fake_news_nlp_detection_2.py", "stop_starting_start_stopping/pandas_convert_json/basketball_app.py" ]
[ "\"\"\"[directory]\ncd /Users/brunoflaven/Documents/02_copy/_000_IA_bruno_light/article_bert_detecting_fake_news_1/fake_news_nlp_detection/\n\n\npython fake_news_nlp_detection_2.py\n\n\"\"\"\n\n# This is a Python 3 environment\n\n# Base level imports for data science work\n\nimport numpy as np \nimport pandas as pd...
[ [ "matplotlib.pyplot.draw", "matplotlib.pyplot.gcf", "sklearn.feature_extraction.text.CountVectorizer", "pandas.concat", "pandas.read_csv", "matplotlib.pyplot.xticks", "matplotlib.pyplot.savefig", "matplotlib.pyplot.subplots", "sklearn.metrics.accuracy_score", "matplotlib.pyp...
HAOCHENYE/yehc_mmdet
[ "491cc13c6ff769996b7a23b871b10f9a5a1c56fa" ]
[ "mmdet/models/dense_heads/fsaf_head.py" ]
[ "import numpy as np\nimport torch\nfrom mmcv.cnn import normal_init\n\nfrom mmdet.core import (anchor_inside_flags, images_to_levels,\n multi_apply, unmap)\nfrom mmcv.runner import force_fp32\nfrom ..builder import HEADS\nfrom ..losses.accuracy import accuracy\nfrom ..losses.utils import wei...
[ [ "torch.nonzero", "torch.cat", "torch.stack", "torch.arange", "torch.no_grad", "torch.ones_like", "numpy.cumsum", "torch.zeros_like" ] ]
shahrukhx01/advanced-information-retrieval-tu-wien
[ "28b68c6cedef8241b29173b2323a64328c09a59d" ]
[ "lecture1/code/bm25_search_relevance.py" ]
[ "from dataloader import AmazonProductDataloader\nfrom inverted_index import InvertedIndex\nfrom utils import preprocess_text\nimport numpy as np\n\nclass BM25SearchRelevance:\n def __init__(self, inverted_index, b=0.65, k1=1.6):\n self.inverted_index = inverted_index\n self.b = b\n self.k1 =...
[ [ "numpy.log" ] ]
daoliker/xgboost
[ "48835c3a4e087f88310fd0b11c71f0b47c59f59f" ]
[ "tests/python/test_fast_hist.py" ]
[ "import xgboost as xgb\nimport testing as tm\nimport numpy as np\nimport unittest\n\nrng = np.random.RandomState(1994)\n\n\nclass TestFastHist(unittest.TestCase):\n def test_fast_hist(self):\n tm._skip_if_no_sklearn()\n from sklearn.datasets import load_digits\n try:\n from sklear...
[ [ "numpy.random.choice", "sklearn.datasets.load_digits", "sklearn.datasets.load_svmlight_file", "numpy.random.RandomState", "sklearn.cross_validation.train_test_split" ] ]
mother-db/ezEMLmotherDB
[ "c6a6fba7587307e4f0c1a44b7f8c3c48ffdd0eff" ]
[ "webapp/home/views.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\":Mod: views.py\n\n:Synopsis:\n\n:Author:\n costa\n servilla\n ide\n\n:Created:\n 7/23/18\n\"\"\"\nimport daiquiri\nfrom datetime import date, datetime\nimport html\nimport json\nimport math\nimport os.path\nimport pandas as pd\nfrom pathlib import...
[ [ "pandas.read_csv" ] ]
sagnik/baseline
[ "8d75616e04c1cca509dbebbb6d08ad7e1a7b9f88", "8d75616e04c1cca509dbebbb6d08ad7e1a7b9f88" ]
[ "tests/test_calc_feats.py", "scripts/speed_test/run.py" ]
[ "import random\nimport pytest\nimport numpy as np\nfrom eight_mile.utils import calc_nfeats\n\n\ndef test_use_nfeats():\n filtsz = [random.randint(1, 10) for _ in range(random.randint(2, 6))]\n input_nfeat = random.randint(1, 100)\n gold_nfeats = [input_nfeat] * len(filtsz)\n _, nfeat = calc_nfeats(filt...
[ [ "numpy.array", "numpy.testing.assert_equal" ], [ "torch.backends.cudnn.version" ] ]
OzFlux/PFP_Classic
[ "a567cc986c2e220d95a377ca129994b018f0248c" ]
[ "scripts/pfp_cpd.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Python modules\nimport ast\nfrom configobj import ConfigObj\nimport constants as c\nimport datetime as dt\nimport logging\nimport matplotlib.pyplot as plt\nimport matplotlib.mlab as mlab\nimport netCDF4\nimport numpy as np\nimport os\nimport pandas as pd\nfrom scipy import stats\nimpor...
[ [ "matplotlib.pyplot.text", "matplotlib.pyplot.xlim", "matplotlib.mlab.normpdf", "scipy.stats.describe", "scipy.stats.linregress", "numpy.where", "numpy.linalg.lstsq", "matplotlib.pyplot.draw", "pandas.concat", "scipy.stats.t.ppf", "numpy.empty", "pandas.DataFrame", ...
lkaiser/QUANTAXIS
[ "8703d241f8f11fbab89a75b79495b2f9ff036812" ]
[ "EXAMPLE/test_backtest/example/indicator/simple_valued_spark2.py" ]
[ "# -*- coding: utf-8 -*-\nimport QUANTAXIS as QA\nfrom QUANTAXIS.QAFetch import QATusharePro as pro\nimport pandas as pd\nimport numpy as np\nfrom pyspark.sql.functions import pandas_udf, PandasUDFType\nfrom pyspark import SparkContext,SparkConf\nfrom pyspark.sql.session import SparkSession\nfrom QUANTAXIS.ML impor...
[ [ "pandas.DataFrame", "pandas.read_csv", "pandas.concat" ] ]
onejiin/CycleGAN-VC2
[ "e8ef1ab0c43e18268ae820e2fe6fa4ea3073b39f" ]
[ "module.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport tensorflow as tf\nfrom ops import *\n\n# ------------------------------------------------------------------------------------------------------------------- #\n# CycleGAN-VC1 #\n...
[ [ "tensorflow.shape", "tensorflow.expand_dims", "tensorflow.transpose", "tensorflow.variable_scope", "tensorflow.layers.dense" ] ]
Cophy08/datacleaner
[ "63f51a2ce265f59aca57655d08e0f3fb1e826782" ]
[ "datacleaner/datacleaner.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"\nCopyright (c) 2016 Randal S. Olson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software\nand associated documentation files (the \"Software\"), to deal in the Software without restriction,\nincluding without limitation the rights to use...
[ [ "sklearn.preprocessing.LabelEncoder", "pandas.read_csv" ] ]
huhwang/realtime-webcam-sudoku-solver
[ "dedfd088e3c607d320b45c16a42517c716c394c2" ]
[ "src/nn_model.py" ]
[ "import os\nimport numpy as np\nimport random\n\nfrom nn_activations import sigmoid, sigmoid_prime\n\n\nclass NeuralNetwork(object):\n\n def __init__(self, sizes=list(), learning_rate=1.0, mini_batch_size=16,\n epochs=10):\n \"\"\"Initialize a Neural Network model.\n\n Parameters\n ...
[ [ "numpy.array", "numpy.random.randn", "numpy.argmax", "numpy.zeros" ] ]
AdrianNicu/PracticalTest01Var04
[ "00434ce1c9ac43fa8303ecb74386eadc332a5355" ]
[ "sf_MntRbccaShared/Laborator 7-20170403/layer.py" ]
[ "# Tudor Berariu, 2016\n\nimport numpy as np\n\nclass Layer:\n\n def __init__(self, inputs_no, outputs_no, transfer_function):\n # Number of inputs, number of outputs, and the transfer function\n self.inputs_no = inputs_no\n self.outputs_no = outputs_no\n self.f = transfer_function\n\...
[ [ "numpy.array", "numpy.zeros" ] ]
ytoyama/yans_chainer_hackathon
[ "744e7a5a67da8dec2869879f0adfae2d43eaf75c", "744e7a5a67da8dec2869879f0adfae2d43eaf75c", "744e7a5a67da8dec2869879f0adfae2d43eaf75c", "744e7a5a67da8dec2869879f0adfae2d43eaf75c" ]
[ "chainer/functions/array/concat.py", "tests/chainer_tests/functions_tests/loss_tests/test_mean_squared_error.py", "tests/chainer_tests/functions_tests/normalization_tests/test_batch_normalization.py", "chainer/variable.py" ]
[ "import numpy\n\nfrom chainer import cuda\nfrom chainer import function\nfrom chainer.utils import type_check\n\n\nclass Concat(function.Function):\n\n \"\"\"Concatenate multiple tensors towards specified axis.\"\"\"\n\n # concat along the channel dimension by default\n def __init__(self, axis=1):\n ...
[ [ "numpy.array" ], [ "numpy.ndindex", "numpy.random.uniform" ], [ "numpy.random.uniform" ], [ "numpy.ones_like" ] ]
ford-core-ai/neural-programming-architectures
[ "66320b8ba64dc978a34b1df0c1357efd104cec27" ]
[ "tasks/bubblesort/env/generate_data.py" ]
[ "\"\"\"\ngenerate_data.py\n\nCore script for generating training/test addition data. First, generates random pairs of numbers,\nthen steps through an execution trace, computing the exact order of subroutines that need to be\ncalled.\n\"\"\"\nimport pickle\n\nimport numpy as np\n\nfrom tasks.bubblesort.env.trace imp...
[ [ "numpy.random.randint" ] ]
ZWZseven/Kaggle_TGS2018_solution
[ "1ae2c014d1bb02d6ca7bb3dc452692bda9cdf6a3" ]
[ "model/model.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nfrom torchvision import models\nimport torch.nn.functional as F\nimport math\nimport torch.utils.model_zoo as model_zoo\n\nnonlinearity = nn.ReLU\nclass EncoderBlock(nn.Module):\n def __init__(self, inchannel, outchannel, stride):\n ...
[ [ "torch.nn.Linear", "torch.cat", "torch.nn.functional.upsample", "torch.nn.MaxPool2d", "torch.nn.Sigmoid", "torch.nn.BatchNorm2d", "torch.nn.ConvTranspose2d", "torch.nn.functional.dropout", "torch.nn.functional.adaptive_avg_pool2d", "torch.nn.ReLU", "torch.nn.Upsample", ...
fbickfordsmith/attention-toad
[ "2d0cd2adced54e537aa4b6cbd23116b16d49d61a" ]
[ "src/object_detection.py" ]
[ "import argparse\nparser = argparse.ArgumentParser()\nparser.add_argument('--class_id', type=int, choices=range(1000))\nargs = parser.parse_args()\n\nimport numpy as np\nimport tensorflow_hub\nfrom tqdm import tqdm\nfrom utils.data import get_sorted_filepaths, load_image_tensorflow_hub\nfrom utils.paths import path...
[ [ "numpy.loadtxt", "numpy.savetxt", "numpy.stack" ] ]
aemccoy/GrayCode-QubitEncoding
[ "26e0fa9f434bf05e0f7752c6b6105ccdf7f82875" ]
[ "paper-data/noise/8state_layout_comparison.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nsns.set_style('whitegrid')\n\nimport sys\nimport os\n\nimport pandas as pd\nfrom scipy import stats\n\nHEADERS = ['device', 'layout', 'enc_type', 'n_states', 'sim_type', 'shots', 'optimizer', 'en...
[ [ "pandas.DataFrame", "matplotlib.pyplot.savefig", "numpy.load", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ] ]
odebeir/scikits-image
[ "13b2170dfd3ee9065ba6d65f29ff37f6b3bf948e" ]
[ "doc/examples/plot_holes_and_peaks.py" ]
[ "\"\"\"\n===============================\nFilling holes and finding peaks\n===============================\n\nIn this example, we fill holes (i.e. isolated, dark spots) in an image using\nmorphological reconstruction by erosion. Erosion expands the minimal values of\nthe seed image until it encounters a mask image....
[ [ "matplotlib.pyplot.show", "numpy.copy", "matplotlib.pyplot.subplots" ] ]
preetham-ganesh/multi-sensor-human-activity-recognition
[ "42b491fa39fee36870e48960b96af01b836e2e9f" ]
[ "codes/model_training_testing.py" ]
[ "# authors_name = 'Preetham Ganesh'\n# project_title = 'Multi Sensor-based Human Activity Recognition using OpenCV and Sensor Fusion'\n# email = 'preetham.ganesh2015@gmail.com'\n\n\nimport numpy as np\nimport os\nimport pandas as pd\nimport itertools\nimport logging\nimport sklearn.pipeline\nfrom sklearn.metrics im...
[ [ "numpy.array", "pandas.merge", "sklearn.ensemble.RandomForestClassifier", "pandas.DataFrame", "sklearn.metrics.balanced_accuracy_score", "sklearn.naive_bayes.GaussianNB", "sklearn.svm.SVC", "sklearn.model_selection.ParameterGrid", "sklearn.metrics.accuracy_score", "sklearn....
richardbaihe/semantic_unwrittern
[ "d4fab8b5d2dd690056f47b3a85f5b3cb828c0e9a", "d4fab8b5d2dd690056f47b3a85f5b3cb828c0e9a" ]
[ "transformers/modeling_tf_openai.py", "transformers/modeling_mmbt.py" ]
[ "# coding=utf-8\n# Copyright 2018 The OpenAI Team Authors and 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 with the License.\n# You may obtain a copy o...
[ [ "tensorflow.range", "tensorflow.math.sigmoid", "tensorflow.keras.layers.Activation", "tensorflow.matmul", "tensorflow.reshape", "tensorflow.transpose", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.LayerNormalization", "tensorflow.squeeze", "tensorflow.math.sq...
aewallwi/calamity
[ "0312974e3332b312973dbb74ddbab2faab88b346" ]
[ "calamity/calibration.py" ]
[ "import numpy as np\nimport tensorflow as tf\nfrom pyuvdata import UVData, UVCal, UVFlag\nfrom . import utils\nimport copy\nimport argparse\nimport itertools\nimport datetime\nfrom pyuvdata import utils as uvutils\nfrom .utils import echo\nfrom .utils import PBARS\nfrom . import cal_utils\nfrom . import modeling\ni...
[ [ "numpy.isclose", "tensorflow.config.LogicalDeviceConfiguration", "numpy.min", "tensorflow.function", "numpy.mean", "tensorflow.profiler.experimental.stop", "tensorflow.profiler.experimental.start", "numpy.nanmean", "tensorflow.reshape", "tensorflow.stack", "numpy.zeros_...
johnwlambert/argoverse2-api
[ "caf514b972460e103dc69bbb561152b161aced81" ]
[ "src/av2/datasets/motion_forecasting/eval/metrics.py" ]
[ "# <Copyright 2022, Argo AI, LLC. Released under the MIT license.>\n\"\"\"Utilities to evaluate motion forecasting predictions and compute metrics.\"\"\"\n\nimport numpy as np\n\nfrom av2.utils.typing import NDArrayBool, NDArrayFloat, NDArrayNumber\n\n\ndef compute_ade(forecasted_trajectories: NDArrayNumber, gt_tra...
[ [ "numpy.linalg.norm", "numpy.mean" ] ]
MINGUKKANG/PNU_Capstone_Design
[ "448e9e54bd7caa803a8643779241b1d337585c3d" ]
[ "main_child_trainer.py" ]
[ "import os\r\nimport shutil\r\nimport sys\r\nimport time\r\n\r\nimport tensorflow as tf\r\nimport numpy as np\r\n\r\nfrom utils import Logger\r\nfrom utils import DEFINE_boolean\r\nfrom utils import DEFINE_float\r\nfrom utils import DEFINE_integer\r\nfrom utils import DEFINE_string\r\nfrom utils import print_user_f...
[ [ "tensorflow.train.SingularMonitoredSession", "numpy.reshape", "tensorflow.train.CheckpointSaverHook", "tensorflow.Graph", "tensorflow.train.Saver", "numpy.shape", "tensorflow.ConfigProto", "tensorflow.app.run" ] ]
jiajunhua/asyml-texar
[ "22d7b8eea5bd43eef68b615ba87b2e8220bafdf8" ]
[ "texar/tf/utils/utils.py" ]
[ "# Copyright 2018 The Texar 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 required...
[ [ "numpy.iinfo", "tensorflow.stop_gradient" ] ]
ryanvolz/echolect
[ "ec2594925f34fdaea69b64e725fccb0c99665a55", "ec2594925f34fdaea69b64e725fccb0c99665a55" ]
[ "echolect/jicamarca/read_raw.py", "echolect/filtering/filtering.py" ]
[ "#-----------------------------------------------------------------------------\n# Copyright (c) 2014, Ryan Volz\n# All rights reserved.\n#\n# Distributed under the terms of the BSD 3-Clause (\"BSD New\") license.\n#\n# The full license is in the LICENSE file, distributed with this software.\n#---------------------...
[ [ "numpy.concatenate", "numpy.empty", "numpy.asarray", "numpy.fromfile" ], [ "numpy.empty", "numpy.random.rand", "numpy.zeros", "numpy.argmin", "numpy.fft.fft", "numpy.iscomplexobj", "numpy.argmax", "numpy.arange", "numpy.fft.ifft" ] ]
HeGang3/3DDFA_V2
[ "a8df22fa465caf5cd5e84d9c957c757bcffbe0e2" ]
[ "TDDFA.py" ]
[ "# coding: utf-8\n\n__author__ = 'cleardusk'\n\nimport os.path as osp\nimport time\nimport numpy as np\nimport cv2\nimport torch\nfrom torchvision.transforms import Compose\nimport torch.backends.cudnn as cudnn\n\nimport models\nfrom bfm import BFMModel\nfrom utils.io import _load\nfrom utils.functions import (\n ...
[ [ "torch.set_grad_enabled" ] ]
ndkgit339/filledpause_prediction_group
[ "db511c081f155ec2c23afe82bc44c03c38618590" ]
[ "fp_pred_group/preprocessor/preprocess_feat.py" ]
[ "import time\nfrom pathlib import Path\nfrom tqdm import tqdm\nimport hydra\nfrom omegaconf import DictConfig\n\n# 言語処理\n# import fasttext\n# import fasttext.util\nfrom transformers import BertTokenizer, BertModel\n\n# データ処理\nimport numpy as np\nimport torch\n\ndef extract_feats(config):\n start = time.time()\n\...
[ [ "numpy.array", "torch.no_grad", "torch.Tensor", "numpy.save" ] ]
paradoxysm/sleepens
[ "9ee4bd8fc8fe2a901e8c16e778daabd31cc5d793" ]
[ "sleepens/analysis/_report.py" ]
[ "\"\"\"Classification Report\"\"\"\r\n\r\n# Authors: Jeffrey Wang\r\n# License: BSD 3 clause\r\n\r\nimport numpy as np\r\n\r\nfrom sleepens.analysis import multiconfusion_matrix\r\n\r\ndef calculate_statistics(Y_hat, Y, beta=1, average=None):\r\n\t\"\"\"\r\n\tCalculate the precisions, recalls, F-beta scores, and\r\...
[ [ "numpy.zeros_like", "numpy.array", "numpy.isposinf", "numpy.errstate", "numpy.zeros", "numpy.where", "numpy.average" ] ]
AhmedBadar512/Badr_AI_Repo
[ "33921e539ecd787e065db2a9a832e40511fd2ce5" ]
[ "models/non_integrated/hrnet.py" ]
[ "\"\"\"\n HRNet for ImageNet-1K, implemented in TensorFlow.\n Original paper: 'Deep High-Resolution Representation Learning for Visual Recognition,'\n https://arxiv.org/abs/1908.07919.\n\"\"\"\n\n__all__ = ['hrnet_w18_small_v1', 'hrnet_w18_small_v2', 'hrnetv2_w18', 'hrnetv2_w30', 'hrnetv2_w32', 'hrnetv2_w4...
[ [ "tensorflow.keras.layers.UpSampling2D", "tensorflow.keras.layers.AveragePooling2D", "tensorflow.keras.layers.Dense", "tensorflow.keras.backend.get_value", "tensorflow.keras.layers.ReLU" ] ]
ngctnnnn/Simulation_experiments_for_optimizing_objective_function
[ "910f6be50ea95ce04672a6b91c379e4b05a9565d" ]
[ "test_function.py" ]
[ "import numpy as np\nimport math\ndef Sphere(ind):\n sum = 0\n for i in ind:\n sum += i**2\n return sum\n\ndef Rastrigin(ind):\n sum = 10 * len(ind)\n for i in ind:\n sum += i**2 - 10 * np.cos(2*np.pi*i)\n return sum \n\ndef Rosenbrock(ind):\n sum = 0\n for i in range(len(ind) ...
[ [ "numpy.exp", "numpy.cos" ] ]
dgole/audioReactiveFadeCandy
[ "aa54325052efb6b1a09741ea4d26b824a1183c5e" ]
[ "deprecated/ledWall/ar_bassThumpAllSame.py" ]
[ "#!/usr/bin/env python\n\nimport numpy as np\nimport sys\nsys.path.append(\"../ar/\")\nimport fastopc, time\nimport functionLib as lib\nimport micStream\nnStrips = 16\nlStrip = 64\nclient = fastopc.FastOPC('localhost:7890')\n\npixels = lib.Pixels(nStrips, lStrip, 0)\ntheoStrip = np.zeros([lStrip, 3])\n\nstream ...
[ [ "numpy.sum", "numpy.mod", "numpy.zeros" ] ]
sdh9446/3D-SGG
[ "1137aaa1e72a228c9208a4299d7b67c60e2a7222", "1137aaa1e72a228c9208a4299d7b67c60e2a7222" ]
[ "data_preprocessing.py", "ARNet_ai2thor/faster_rcnn/datasets/ai2thor_attribute_dataset_loader.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport json\nimport os\nimport os.path as osp\nimport time\nfrom pprint import pprint\nimport random\nimport glob\n\nimport numpy as np\nimport cv2\n\n\ndef generate_db(dataPath='./thor_DB.json', categoryPath='./categories.json', \\\n newDataPath='./thor_DB_msdn.json'):\n ...
[ [ "numpy.array", "numpy.zeros_like", "numpy.zeros" ], [ "numpy.max", "numpy.array", "numpy.round", "torch.FloatTensor", "numpy.min", "torch.ones", "torch.LongTensor" ] ]
jpodivin/keras-tuner
[ "86cff68ae4c7f35bb6557e75ec6a60e0766454d2" ]
[ "tests/kerastuner/tuners/bayesian_test.py" ]
[ "import math\n\nimport numpy as np\nimport pytest\nimport tensorflow as tf\n\nimport kerastuner as kt\nfrom kerastuner.engine import hyperparameters as hp_module\nfrom kerastuner.engine import trial as trial_module\nfrom kerastuner.tuners import bayesian as bo_module\n\n\n@pytest.fixture(scope=\"function\")\ndef tm...
[ [ "numpy.isclose", "numpy.random.rand", "tensorflow.keras.layers.Flatten", "tensorflow.keras.layers.Dense", "tensorflow.keras.Sequential", "numpy.multiply" ] ]
olliethomas/torchtyping
[ "81e1cffa841307d700b11e9a2c970a5face65020" ]
[ "test/test_shape.py" ]
[ "import pytest\nfrom typing import Any\nimport torch\nfrom torchtyping import TensorType\nimport typeguard\n\n\na = b = c = None\n\n\ndef test_fixed_int_dim():\n @typeguard.typechecked\n def _3_dim_checker(x: TensorType[3]):\n pass\n\n @typeguard.typechecked\n def _3m1_dim_checker(x: TensorType[3...
[ [ "torch.rand" ] ]
TOPO-EPFL/CrossLoc
[ "a9f9a3fbb6d6fb1edd82f38efe02b2ca9d6afeb0" ]
[ "test_single_task.py" ]
[ "import pdb\nimport glob\nimport torch\nimport numpy as np\n\nimport argparse\nimport os\nimport matplotlib.pyplot as plt\nfrom tqdm import tqdm\n\nfrom utils.learning import get_nodata_value, set_random_seed\nfrom utils.evaluation import config_dataloader, config_network, scene_coords_eval, scene_coords_printout,\...
[ [ "torch.no_grad", "numpy.unique", "torch.split" ] ]
thisisjako/UdemyTF
[ "ee4102391ed6bd50f764955f732f5740425a9209" ]
[ "Chapter9_AdvancedDL/Chapter9_7_AdvancedTechniques2/dogsCatsTransferLearning.py" ]
[ "from tensorflow.keras.applications import MobileNetV2\nfrom tensorflow.keras.callbacks import EarlyStopping\nfrom tensorflow.keras.callbacks import LearningRateScheduler\nfrom tensorflow.keras.layers import Activation\nfrom tensorflow.keras.layers import Dense\nfrom tensorflow.keras.layers import GlobalAveragePool...
[ [ "tensorflow.keras.layers.experimental.preprocessing.Resizing", "tensorflow.keras.layers.Input", "tensorflow.keras.layers.Activation", "tensorflow.keras.models.Model", "tensorflow.keras.layers.Dense", "tensorflow.keras.applications.MobileNetV2", "tensorflow.keras.callbacks.LearningRateS...
abdoo8080/youtube-8m
[ "2c30a14c9fc55bad68d52dbbb171e30d3d2355c9" ]
[ "video_level_models.py" ]
[ "# Copyright 2016 Google Inc. 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 required by app...
[ [ "tensorflow.contrib.slim.l2_regularizer", "tensorflow.contrib.slim.max_pool2d", "tensorflow.expand_dims", "tensorflow.reshape", "tensorflow.flags.DEFINE_integer", "tensorflow.reduce_sum", "tensorflow.tile" ] ]
Gab0/pureples
[ "c6f7daf747681a0922a95ece08cbf9881a6cccfa" ]
[ "pureples/es_hyperneat/es_hyperneat.py" ]
[ "import neat \nimport copy\nimport numpy as np\nfrom pureples.hyperneat.hyperneat import query_cppn\nfrom pureples.shared.visualize import draw_es\n\n\nclass ESNetwork:\n\n def __init__(self, substrate, cppn, params):\n self.substrate = substrate\n self.cppn = cppn\n self.initial_depth = par...
[ [ "numpy.zeros" ] ]
fresher96/arabic-speech-commands
[ "182a5af811957abce11198d83123cf19028504ec" ]
[ "src/trainer.py" ]
[ "import os\nfrom comet_ml import Experiment\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\nfrom torch import optim\nfrom tqdm import tqdm\nimport numpy as np\nimport random\nfrom sklearn.metrics import confusion_matrix\nimport matplotlib.pyplot as plt\n\nfrom src.ClassDict import ClassDi...
[ [ "sklearn.metrics.confusion_matrix", "matplotlib.pyplot.semilogx", "matplotlib.pyplot.grid", "torch.no_grad", "torch.from_numpy", "torch.nn.functional.cross_entropy", "torch.cuda.is_available", "matplotlib.pyplot.show", "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.lo...
kei0822kei/twinpy
[ "14b47df1fa5b57a54f57d5c2120ed3fe9502a9bc" ]
[ "twinpy/plot/twinboundary.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nTwinboundary plot\n\nThis module provide various kinds of plot related to twin boudnary.\n\"\"\"\n\nimport numpy as np\nfrom copy import deepcopy\nfrom twinpy.plot.base import line_chart\n\n\ndef plot_plane(ax,\n distances:list,\n ...
[ [ "numpy.sum" ] ]
marco-braun/CarND-Behavioral-Cloning-P3
[ "c43aa18c3789531839786138881dd70b7bd9417b" ]
[ "train_model.py" ]
[ "import argparse\nimport cv2\nimport csv\nimport keras\nfrom keras.callbacks import CSVLogger\nimport numpy as np\nimport os\nfrom tqdm import tqdm\nfrom keras.layers import Lambda, Cropping2D\nimport matplotlib.pyplot as plt\n\n\nclass steering_model(object):\n\n def __init__(self):\n self.layers = [{'ty...
[ [ "numpy.array", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.ylabel" ] ]
cescgina/satumut
[ "5fca2f974da30ed51d9db02eafac4bbfbe88a638" ]
[ "satumut/analysis.py" ]
[ "from glob import glob\r\nimport pandas as pd\r\nimport seaborn as sns\r\nimport argparse\r\nfrom os.path import basename, dirname, abspath, isdir, isfile, join\r\nimport os\r\nimport sys\r\nimport re\r\nfrom fpdf import FPDF\r\nimport logging\r\nimport matplotlib.pyplot as plt\r\nimport multiprocessing as mp\r\nfr...
[ [ "matplotlib.pyplot.switch_backend", "pandas.DataFrame", "matplotlib.pyplot.close", "pandas.concat", "pandas.read_csv" ] ]
jmercat/fast-transformers
[ "1061f2ffa09c6d74aa252389e47f76ae827b1064" ]
[ "tests/sparse_product/test_clustered_sparse_product_gpu.py" ]
[ "#\n# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/\n# Written by Angelos Katharopoulos <angelos.katharopoulos@idiap.ch>,\n# Apoorv Vyas <avyas@idiap.ch>\n#\n\nimport os\nimport time\nimport unittest\n\nimport torch\nfrom torch.nn.init import normal_\n\nfrom fast_transformers.aggregate import ag...
[ [ "torch.zeros", "torch.cuda.synchronize", "torch.einsum", "torch.cuda.Event", "torch.arange", "torch.abs", "torch.nn.init.normal_", "torch.cuda.is_available", "torch.full", "torch.ones_like", "torch.randn", "torch.topk" ] ]
Catherine0505/mar-scf-flow
[ "aa7c3564cb9f2967c5e580a633516dba1b597f98" ]
[ "flow_modules/common_modules.py" ]
[ "from __future__ import print_function\nimport numpy as np\nimport scipy.linalg\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom flow_modules.misc import cpd_sum, cpd_mean\n\n\n\ndef squeeze2d(input, factor=2):\n\t#assert factor >= 1 and isinstance(factor, int)\n\tif factor == 1:\n\t\tr...
[ [ "torch.cat", "numpy.sign", "torch.cuda.is_available", "torch.exp", "numpy.log", "numpy.triu", "numpy.eye", "torch.slogdet", "torch.zeros_like", "torch.Tensor", "torch.nn.functional.conv2d", "torch.zeros", "numpy.random.randn", "torch.matmul", "torch.no_g...
priyasundaresan/kaolin
[ "ddae34ba5f09bffc4368c29bc50491c5ece797d4", "ddae34ba5f09bffc4368c29bc50491c5ece797d4" ]
[ "diffsim_torch3d/pysim/plot_cloth_params_results.py", "diffsim_torch3d/pysim/exp_learn_jacket_hang_pcl_video.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport pprint\nfrom mpl_toolkits.mplot3d import Axes3D\nfrom matplotlib import cm\nfrom matplotlib.cm import ScalarMappable\n\nresults = np.load('results.npy')\nini_p1, ini_p2, final_p1, final_p2, loss = results.T\n\nparam1_lab = 'Stiffness'\n#param2_lab = 'Mass...
[ [ "matplotlib.cm.ScalarMappable", "numpy.zeros_like", "numpy.meshgrid", "matplotlib.pyplot.savefig", "matplotlib.pyplot.get_cmap", "numpy.load", "numpy.min", "matplotlib.pyplot.subplots", "numpy.amax", "numpy.ptp", "numpy.amin", "numpy.dstack", "matplotlib.pyplot....
lvheyang/arrow
[ "2d50da645e34498cbf2894c63e02f5a7c554449b" ]
[ "python/pyarrow/tests/test_pandas.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "pandas.SparseArray", "numpy.random.rand", "pandas.DatetimeIndex", "pandas.Timestamp.now", "numpy.where", "pandas.Timestamp", "pandas.concat", "numpy.frombuffer", "pandas.period_range", "numpy.dtype", "numpy.empty", "pandas.DataFrame", "numpy.random.randint", ...
invite-you/mmdetection
[ "15a1e589bb11f2c8eaa7777a3fa2285dbfc080ff" ]
[ "mmdet/datasets/coco_car.py" ]
[ "import itertools\nimport logging\nimport os.path as osp\nimport tempfile\n\nimport mmcv\nimport numpy as np\nfrom mmcv.utils import print_log\nfrom pycocotools.coco import COCO\nfrom pycocotools.cocoeval import COCOeval\nfrom terminaltables import AsciiTable\n\nfrom mmdet.core import eval_recalls\nfrom .builder im...
[ [ "numpy.round", "numpy.array", "numpy.mean", "numpy.zeros" ] ]
vietdelta/TrafficCounting
[ "f136dc14e451ec7ff7fa33654655c9fd6c820726" ]
[ "train.py" ]
[ "\"\"\"\nRetrain the YOLO model for your own dataset.\n\"\"\"\nimport tensorflow as tf\ngpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.7)\n\nsess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))\n\t\t\n\nimport numpy as np\nimport keras.backend as K\nfrom keras.layers import Input, Lambda...
[ [ "numpy.array", "numpy.zeros", "numpy.random.seed", "numpy.random.shuffle", "tensorflow.ConfigProto", "tensorflow.GPUOptions" ] ]
mshubhankar/ADADP
[ "674113122cd544cb850758f75eb66786aeea2fd6", "674113122cd544cb850758f75eb66786aeea2fd6" ]
[ "MNIST_tests/gaussian_moments.py", "MNIST_tests/adadp_cpu.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...
[ [ "numpy.isinf", "numpy.testing.assert_allclose", "numpy.log", "numpy.exp", "numpy.float64", "numpy.testing.assert_array_less", "scipy.integrate.quad" ], [ "numpy.sqrt" ] ]
Queuecumber/pytorch-lightning
[ "2a57816a25f0fc84debc8046c299914e43442b24" ]
[ "pytorch_lightning/utilities/imports.py" ]
[ "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law...
[ [ "torch.profiler.kineto_available" ] ]
barcawy/google-research
[ "bb8f5457fd9dba56018b23a038249c539c1b7491" ]
[ "simple_probabilistic_programming/trace_test.py" ]
[ "# coding=utf-8\n# Copyright 2019 The Google Research Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.test.main" ] ]
chunhua-ccny/FixedPoint
[ "408edaeb6b75fb84421e170490557808fddb6f20" ]
[ "mnist/model.py" ]
[ "import torch.nn as nn\nfrom collections import OrderedDict\nimport torch.utils.model_zoo as model_zoo\nfrom utee import misc\nprint = misc.logger.info\n\nmodel_urls = {\n 'mnist': 'http://ml.cs.tsinghua.edu.cn/~chenxi/pytorch-models/mnist-b07bb66b.pth'\n}\n\nclass MLP(nn.Module):\n def __init__(self, input_d...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.Sequential", "torch.utils.model_zoo.load_url", "torch.nn.ReLU" ] ]
dpetrini/cs231n.github.io
[ "7dc3be43c523889eafebdef3dc65ef35aab69d16" ]
[ "assignments/2018/assignment1/cs231n/classifiers/k_nearest_neighbor.py" ]
[ "import numpy as np\n\nclass KNearestNeighbor(object):\n \"\"\" a kNN classifier with L2 distance \"\"\"\n\n def __init__(self):\n pass\n\n def train(self, X, y):\n \"\"\"\n Train the classifier. For k-nearest neighbors this is just \n memorizing the training data.\n\n Inputs:\n - X: A numpy ar...
[ [ "numpy.bincount", "numpy.square", "numpy.zeros", "numpy.sum", "numpy.argmax", "numpy.argsort" ] ]
selfemergence/self-taught-neat-multiprocessing
[ "d3829ef0cf7eb752c832f3d737390a6c82d5b6fc" ]
[ "population.py" ]
[ "\"\"\"\nCreated on Sun Jul 18 17:56:02 2021\n\n@author: namlh\n\"\"\"\nimport time\nimport random\nimport numpy as np\nimport torch\n\nfrom multiprocessing.pool import ThreadPool\nfrom torch.multiprocessing import Pool\nfrom torch import multiprocessing\n#torch.multiprocessing.set_sharing_strategy('file_system')\n...
[ [ "torch.multiprocessing.Pool", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "numpy.mean", "matplotlib.pyplot.figure", "torch.cuda.is_available", "matplotlib.pyplot.ylabel", "numpy.average" ] ]