repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
isuthermography/spatialnde
[ "983de2e68139c33ab5eb8df59ac0aaa84bad096a" ]
[ "spatialnde/DGSViewer.py" ]
[ "###!!!! BUG: The name of this module is inappropriate (has nothing specific to do with DGS) and should be renamed. \n\nimport numpy as np\nimport cv2\nimport sys\nfrom matplotlib import pyplot as plt\nimport matplotlib\n\nimport copy\nimport itertools\nimport os\n\n#sys.path.insert(0, 'spatialnde/')\n#import calib...
[ [ "numpy.array", "matplotlib.pyplot.close", "matplotlib.pyplot.figure", "matplotlib.pyplot.draw", "matplotlib.pyplot.show" ] ]
ChrisThoung/fsic
[ "f549b6d99f3fbc74c16c5e4e4e6927ec58842ee1" ]
[ "examples/godley-lavoie_2007/3_sim.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n3_sim\n=====\nFSIC implementation of Model *SIM* (the SIMplest model with government money)\nfrom Chapter 3 of Godley and Lavoie (2007).\n\nWhile FSIC only requires NumPy, this example also uses:\n\n* `pandas`, to generate a DataFrame of final results using `fsic.tools`\n* `matplot...
[ [ "matplotlib.pyplot.savefig", "matplotlib.pyplot.ylim", "matplotlib.pyplot.legend", "matplotlib.pyplot.yticks", "matplotlib.pyplot.figure", "matplotlib.pyplot.xticks" ] ]
Taufiq06/data-pre-processing
[ "65dc4059612f7ecdbfbea4a6cdc0fae16f138189" ]
[ "upload_worldbank_data/contents/main.py" ]
[ "#!/usr/bin/env python3\nif __name__ == '__main__':\n import pandas as pd\n import os\n import logging\n import sys\n import glob\n import time\n \n logging.basicConfig(stream=sys.stderr, level=logging.INFO)\n\n import requests as req\n from collections import OrderedDict\n\n # Util...
[ [ "pandas.notnull", "pandas.io.json.json_normalize" ] ]
ar-visions/tensorflow
[ "c13b4b2813141c2c164326f3badc558e66b3bfd7" ]
[ "tensorflow/python/kernel_tests/sparse_ops/sparse_slice_op_test.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...
[ [ "numpy.array", "tensorflow.python.framework.sparse_tensor.SparseTensorValue", "numpy.empty", "tensorflow.python.ops.gradient_checker.compute_gradient_error", "tensorflow.python.framework.test_util.force_cpu", "tensorflow.python.ops.sparse_ops.gen_sparse_ops.sparse_slice", "tensorflow.p...
dengliming/iotnets
[ "db744e56769c799dbf765a27fc5aa91e3edeaaa3" ]
[ "networks/probenets.py" ]
[ "import torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\n\n####################################################################################\n### CONTAINS ALL PROBENETS ###\n####################################################################################\n### SEE: https://www.researchgate...
[ [ "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.Conv2d", "torch.nn.BatchNorm1d", "numpy.sqrt", "numpy.log10" ] ]
HaTT2018/BDA_traffic
[ "a999f634c16d575afa400cf4517699e4e2e077e7" ]
[ "BDA_SVR.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\nimport numpy as np\nimport pandas as pd\nimport scipy\nimport scipy.linalg\nimport matplotlib.pyplot as plt\nimport sklearn.metrics\nimport sklearn.neighbors\nimport time\nimport os\n\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\nfrom ...
[ [ "numpy.dot", "numpy.where", "torch.cuda.is_available", "sklearn.svm.LinearSVR", "numpy.linalg.norm", "pandas.DataFrame", "numpy.eye", "scipy.linalg.eig", "numpy.vstack", "numpy.linalg.multi_dot", "numpy.zeros", "numpy.shape", "numpy.argsort", "numpy.hstack",...
vvolhejn/ddsp
[ "f99c192473c84bbf5d083e8630bf105520ad6ad0" ]
[ "ddsp/training/decoders_test.py" ]
[ "# Copyright 2022 The DDSP Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or a...
[ [ "numpy.repeat", "tensorflow.compat.v2.ones", "numpy.zeros", "tensorflow.compat.v2.test.main" ] ]
SaeidAbdolian/seasonal-contrast
[ "5395c027922569f5c5b1785ad1ccddd839749c36" ]
[ "main_oscd.py" ]
[ "from pathlib import Path\nfrom copy import deepcopy\nfrom argparse import ArgumentParser\n\nimport torch\nfrom torch.nn import BCEWithLogitsLoss\nfrom torchvision.models import resnet\nimport pytorch_lightning as pl\nfrom pytorch_lightning import LightningModule, Trainer\nfrom pytorch_lightning.loggers import Tens...
[ [ "torch.zeros", "torch.sigmoid", "torch.optim.Adam", "torch.optim.lr_scheduler.ExponentialLR", "torch.nn.BCEWithLogitsLoss" ] ]
koreybea/tensorflow
[ "e252fffb16f2706688604dc91c426bae367ae5e8", "e252fffb16f2706688604dc91c426bae367ae5e8" ]
[ "tensorflow/python/training/checkpoint_utils.py", "tensorflow/python/keras/layers/preprocessing/text_vectorization_distribution_test.py" ]
[ "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.ops.resource_variable_ops.is_resource_variable", "tensorflow.python.training.saving.saveable_object_util.saveable_objects_for_op", "tensorflow.python.training.saving.saveable_object_util.op_list_to_dict", "tensorflow.python.training.py_checkpoint_reader.NewCheckpointReader", ...
yoonghm/pandapower
[ "1ee32b1e004ceb61157c16cf2706c837a070aa7c", "1ee32b1e004ceb61157c16cf2706c837a070aa7c" ]
[ "pandapower/io_utils.py", "pandapower/toolbox.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2020 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\nimport copy\nimport importlib\nimport json\nimport numbers\nimport os\nimport pickle\nimport sys\nimport types\nfrom functo...
[ [ "pandas.isnull", "numpy.equal", "pandas.notnull", "numpy.array", "numpy.isnan", "pandas.util.testing.assert_frame_equal", "pandas.Int64Index", "pandas.DataFrame.from_dict", "pandas.DataFrame", "pandas.util.testing.assert_series_equal", "numpy.allclose", "pandas.read...
farmerljx/deeplearning-coursera
[ "06748e88c6bf6cb408493a039c2661f3ae9fec2d" ]
[ "Course1-NeuralNetworksAndDeepLearning/week3/week3_assignment.py" ]
[ "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# @Author: Farmer Li (jxli.farmer@gmail.com)\n# @Date: 2018-12-04 12:03\n\n# 1 - Package imports\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom testCases import *\nimport sklearn\nimport sklearn.datasets\nimport sklearn.linear_model\nfrom planar_utils impor...
[ [ "numpy.dot", "numpy.zeros", "numpy.squeeze", "numpy.random.seed", "numpy.round", "numpy.sum", "matplotlib.pyplot.title", "numpy.random.randn", "numpy.log", "numpy.mean", "matplotlib.pyplot.figure", "numpy.tanh", "numpy.power", "matplotlib.pyplot.show", "...
kevinco27/attentional-similarity
[ "0041f2ddaad45fdf1c6b673fe91746b71d1e5427" ]
[ "main/loader.py" ]
[ "import torch\nfrom torch.utils.data import Dataset\nfrom extractor import *\n\n# data loader\n\nclass tr_data(Dataset):\n def __init__(self, X,Y, didx, args, n, m, mode):\n self.X = X\n self.Y = Y\n self.didx = didx\n self.args = args\n self.get_tag_idx = np.unique(Y[didx])\n ...
[ [ "torch.utils.data.DataLoader" ] ]
chamyeongseop/kaggle_evaluation_metrics
[ "c4fdeaf369aeaf8130c829cf60ef59969867e22a" ]
[ "kaggle_metrics/ranking_metrics.py" ]
[ "# (C) Mathieu Blondel, November 2013\n# License: BSD 3 clause\n\nimport numpy as np\n\n\ndef ranking_precision_score(y_true, y_score, k=10):\n \"\"\"Precision at rank k\n\n Parameters\n ----------\n y_true : array-like, shape = [n_samples]\n Ground truth (true relevance labels).\n\n y_score :...
[ [ "numpy.asarray", "numpy.sum", "numpy.take", "sklearn.metrics.average_precision_score", "numpy.argsort", "numpy.unique" ] ]
wrongtest/incubator-tvm
[ "99734d29b77ef88fe81b0fd0cb2b71db8dc2608e" ]
[ "tests/python/unittest/test_codegen_cuda.py" ]
[ "\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\");...
[ [ "numpy.full", "numpy.random.uniform", "numpy.random.randint", "numpy.zeros" ] ]
emiliofidalgo/tsdf-fusion-python
[ "1e98badcf3c0762ef855e46ff131ca9e1831f792" ]
[ "mussol/3drecons.py" ]
[ "#!/usr/bin/python\n\"\"\"\nBSD 2-Clause License\n\nCopyright (c) 2020, Emilio Garcia-Fidalgo\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the ...
[ [ "numpy.asarray", "numpy.zeros", "matplotlib.pyplot.legend", "numpy.array_str", "numpy.mean", "matplotlib.pyplot.figure", "numpy.eye", "numpy.loadtxt", "numpy.amax", "numpy.abs", "numpy.amin", "matplotlib.pyplot.show", "matplotlib.pyplot.axes" ] ]
Barry-Menglong-Yao/conll2019-snopes-crawling
[ "f803a99e27866036b92175c7d9786611ad1f389b" ]
[ "multi_media/util/tried_image_crawler/try_newspaper/test_newspaper.py" ]
[ "from newspaper import Article\nimport pandas as pd\ndef print_img_url(url):\n \n \n article = Article(url)\n article.download()\n # print(article.html)\n article.parse()\n \n\n # print(article.authors)\n\n\n # print(article.publish_date)\n\n\n # print(article.text)\n\n\n # pri...
[ [ "pandas.read_csv" ] ]
drewrisinger/numba
[ "102f177903ab8187400092dfdf5b81fa6590b239" ]
[ "numba/tests/support.py" ]
[ "\"\"\"\nAssorted utilities for use in tests.\n\"\"\"\n\nimport cmath\nimport contextlib\nimport enum\nimport errno\nimport gc\nimport math\nimport os\nimport shutil\nimport subprocess\nimport sys\nimport tempfile\nimport time\n\nimport numpy as np\n\nfrom numba import config, errors, typing, utils, numpy_support, ...
[ [ "numpy.dtype", "numpy.random.RandomState" ] ]
manassharma07/cysx_nn
[ "3781c3d27682094aafd10f8eb6544616ff9499c2" ]
[ "crysx_nn/activation.py" ]
[ "'''\nActivation functions and their gradients\ncrysx_nn \nManas Sharma\nfeedback@bragitoff.com\nhttps://www.bragitoff.com\n'''\n\n'''DEVELOPER NOTES:\n1. Whenever adding a new activation function, use Numba for CPU version and cupy for CUDA version.\n2. After adding a function here, also update the lists in utils....
[ [ "numpy.max", "numpy.zeros", "numpy.cosh", "numpy.ones", "numpy.exp", "numpy.eye", "numpy.tanh", "numpy.abs", "numpy.greater", "numpy.maximum" ] ]
tobias47n9e/GTK3-Matplotlib-Cookbook
[ "fea42a040e9e358740b3bda04c38ea164ff79b2d" ]
[ "examples/mpl-ntb.py" ]
[ "#!/usr/bin/python3\n\nfrom gi.repository import Gtk\nfrom matplotlib.figure import Figure\nfrom numpy import sin, cos, pi, linspace\n#Possibly this rendering backend is broken currently\n#from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas\nfrom matplotlib.backends.backend_gtk3cairo...
[ [ "matplotlib.backends.backend_gtk3cairo.FigureCanvasGTK3Cairo", "numpy.sin", "numpy.cos", "matplotlib.figure.Figure", "numpy.linspace", "matplotlib.backends.backend_gtk3.NavigationToolbar2GTK3" ] ]
simondlevy/NengoCPlusPlus
[ "ae09d4e96d866dd4a3748867cf8eb0df5d0acc8f" ]
[ "python/mousetracker.py" ]
[ "#!/usr/bin/env python3\n'''\nSimple Nengo PD control example using a mouse cursor \n\nCopyright 2018 Melanie Jouaiti and Simon D. Levy\n\nThis file is part of NengoCPlusPlus.\n\nNengoCPlusPlus is free software: you can redistribute it and/or modify\nit under the terms of the GNU Lesser General Public License as \n...
[ [ "numpy.round", "numpy.array", "numpy.zeros" ] ]
sharanramjee/single-image-stereo-depth-estimation
[ "2ec69a3980171189b75c996eca72c053fa6a5fd8" ]
[ "DepthGAN/losses/base_generator_loss.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom losses.bilinear_sampler import apply_disparity\nfrom .ssim import ssim_gauss, ssim_godard\n\n\nclass BaseGeneratorLoss(nn.modules.Module):\n def __init__(self, args):\n super(BaseGeneratorLoss, self).__init__()\n self.whi...
[ [ "torch.abs", "torch.nn.functional.pad", "torch.nn.functional.interpolate" ] ]
qixuanf/uncertainty-baselines
[ "e965d4e3129825f5710a26a8877d6d8703bbf023" ]
[ "baselines/jft/heteroscedastic.py" ]
[ "# coding=utf-8\n# Copyright 2021 The Uncertainty Baselines 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# Unles...
[ [ "tensorflow.keras.metrics.Mean", "tensorflow.keras.metrics.AUC", "numpy.array", "numpy.ceil", "numpy.ones_like", "numpy.zeros_like", "tensorflow.io.gfile.makedirs", "tensorflow.io.gfile.exists" ] ]
vahidfazelrezai/composer
[ "a18a1bc3d965b0877f782e1d43a39a4ce6721c24" ]
[ "tests/algorithms/test_colout.py" ]
[ "# Copyright 2021 MosaicML. All Rights Reserved.\n\nimport functools\n\nimport numpy as np\nimport pytest\nimport torch\nfrom PIL import Image\nfrom torch.utils.data import DataLoader\n\nfrom composer.algorithms import ColOut, ColOutHparams\nfrom composer.algorithms.colout.colout import ColOutTransform, colout_batc...
[ [ "torch.rand", "numpy.random.RandomState", "torch.manual_seed", "torch.utils.data.DataLoader", "torch.allclose", "torch.Tensor" ] ]
giussepi/cyto_CRLM
[ "4489d5d81c4270ec7b6048ceb2f2a02bfa699177", "4489d5d81c4270ec7b6048ceb2f2a02bfa699177" ]
[ "Utils/CRLM_Piwigo/Extract_annotations.py", "Utils/CRLM_Piwigo/Extract&Upload.py" ]
[ "\r\n# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Wed Jan 27 21:31:40 2016\r\n\r\n@author: JOHN\r\n\"\"\"\r\n\r\nfrom xml.etree import ElementTree\r\nimport openslide as ops\r\nimport cv2\r\nimport pylab as plt\r\nimport numpy as np\r\nimport os\r\n\r\n#im = ops.OpenSlide(r'D:/DATASET/CLRM/T12534-15-6E.ndpi')\r\...
[ [ "numpy.array" ], [ "matplotlib.use", "numpy.array", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots" ] ]
bhklab/imgtools
[ "0f0414533cb6667b68aa48541feb376226fd5515" ]
[ "imgtools/modules/datagraph.py" ]
[ "import os, time\nfrom typing import List\nfrom functools import reduce\nimport numpy as np\nimport pandas as pd\nfrom tqdm import tqdm\n\n\nclass DataGraph:\n '''\n This class given the crawled dataset in the form of CSV file, deals with forming a graph on the full dataset, taking advantage of connections be...
[ [ "pandas.merge", "pandas.DataFrame", "numpy.arange", "pandas.concat", "pandas.read_csv" ] ]
TeacherManoj0131/HacktoberFest2020-Contributions
[ "c7119202fdf211b8a6fc1eadd0760dbb706a679b" ]
[ "Machine Learning Projects/ImageClassificationAPI/API/views.py" ]
[ "from django.shortcuts import render\nfrom rest_framework import status\nfrom rest_framework.response import Response\nfrom urllib.request import urlopen\nfrom PIL import Image\nfrom tensorflow.keras.preprocessing import image\nimport numpy as np\nfrom .apps import ApiConfig\nfrom rest_framework.views import APIVie...
[ [ "tensorflow.keras.preprocessing.image.img_to_array", "numpy.argmax" ] ]
andrewsonin/abides_dev
[ "e8a9c8450bbbe98597f31767362c86eb193597a0" ]
[ "config/marketreplay_USD.py" ]
[ "import argparse\nimport datetime as dt\nimport sys\n\nimport numpy as np\nimport pandas as pd\nfrom dateutil.parser import parse\n\nimport backtesting.globals\nfrom backtesting import exchange\nfrom backtesting.agent import OrderBookImbalanceAgent\nfrom backtesting.agent.examples.MarketReplayAgentUSD import Market...
[ [ "pandas.to_datetime", "numpy.zeros", "numpy.random.seed", "pandas.to_timedelta", "pandas.Timestamp.now", "numpy.random.randint" ] ]
szbianka/visual-analytics-2021-exam-portfolio
[ "c85523b53041a85d507fe215cf24a68e1974d5b4" ]
[ "Project 2/src/nn-mnist.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n#importing libraries\nimport sys,os\nsys.path.append(os.path.join(\"..\"))\nimport argparse\nimport numpy as np\n\nfrom utils.neuralnetwork import NeuralNetwork\nfrom sklearn import metrics\nfrom sklearn.datasets import fetch_openml\nfrom sklearn.preprocessing import Label...
[ [ "sklearn.datasets.fetch_openml", "numpy.array", "sklearn.preprocessing.LabelBinarizer", "sklearn.model_selection.train_test_split" ] ]
phv2312/CenterNet
[ "8b2a633e5951527ac0f72dfb3dab940f202b747c" ]
[ "src/lib/datasets/dataset/coco_zalo.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport pycocotools.coco as coco\nfrom pycocotools.cocoeval import COCOeval\nimport numpy as np\nimport json\nimport os\n\nimport torch.utils.data as data\n\nclass COCOZALO(data.Dataset):\n num_classes...
[ [ "numpy.array", "numpy.random.RandomState" ] ]
jiayu-ch15/curriculum
[ "7305833b8f875c91f7598029f63fd3e543a0fd82" ]
[ "envs/hns/mujoco-worldgen/mujoco_worldgen/objs/material.py" ]
[ "import numpy as np\nimport hashlib\nfrom collections import OrderedDict\nfrom mujoco_worldgen.objs.obj import Obj\nfrom mujoco_worldgen.util.types import store_args\n\n\nclass Material(Obj):\n placeable = False\n\n @store_args\n def __init__(self,\n random=True,\n rgba=None...
[ [ "numpy.random.RandomState" ] ]
seung-lab/corgie_new
[ "46c803f4d6cf58bceff26f2271f37af73213ec53" ]
[ "corgie/cli/filter_skeletons.py" ]
[ "import click\nfrom cloudfiles import CloudFiles\nfrom cloudvolume import PrecomputedSkeleton, Skeleton\nimport numpy as np\nimport os\nimport pickle\n\nfrom corgie import scheduling, argparsers, stack\nfrom corgie.log import logger as corgie_logger\nfrom corgie.boundingcube import get_bcube_from_vertices\nfrom cor...
[ [ "numpy.where", "numpy.delete", "numpy.expand_dims", "numpy.isin" ] ]
GuoHaoren/Unifed-Lane-and-Traffic-Sign-detection
[ "80ed2690a7bb90861ccfc85de9a2feb6bce324ff" ]
[ "adet/data/dataset_mapper.py" ]
[ "import copy\nimport logging\nimport os.path as osp\n\nimport numpy as np\nimport torch\nfrom fvcore.common.file_io import PathManager\nfrom PIL import Image\nfrom pycocotools import mask as maskUtils\nimport torchvision.transforms as transf\n\nfrom detectron2.data import detection_utils as utils\nfrom detectron2.d...
[ [ "numpy.load", "numpy.asarray" ] ]
ESA-PhiLab/hypernet
[ "b33f7893d3dfcbbc2c10076fb61b2b1f1316402a" ]
[ "python_research/experiments/sota_models/utils/bass_utils.py" ]
[ "import torch\n\n\ndef build_block1(in_channels: int, out_channels: int, dtype: torch.Tensor) -> torch.nn.Sequential:\n \"\"\"\n Applies a spatial convolution with receptive filed of (1 x 1) over an input signal.\n Each filter extends throughout the entire spectral axis of the input volume.\n\n :param i...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.Conv1d", "torch.nn.ReLU", "torch.nn.Conv2d" ] ]
teonbrooks/mne-python
[ "fa643e8dcde1024d21d695e4c788f1a1a8a0e41f", "fa643e8dcde1024d21d695e4c788f1a1a8a0e41f" ]
[ "mne/viz/ica.py", "mne/epochs.py" ]
[ "\"\"\"Functions to plot ICA specific data (besides topographies).\"\"\"\n\n# Authors: Denis Engemann <denis.engemann@gmail.com>\n# Alexandre Gramfort <alexandre.gramfort@inria.fr>\n# Teon Brooks <teon.brooks@gmail.com>\n# Daniel McCloy <dan.mccloy@gmail.com>\n#\n# License: Simplified BSD...
[ [ "numpy.sort", "numpy.unique", "numpy.concatenate", "matplotlib.pyplot.subplots", "numpy.swapaxes", "numpy.arange", "numpy.sqrt", "numpy.append", "matplotlib.patheffects.withStroke", "numpy.array", "matplotlib.pyplot.figure", "numpy.diff", "numpy.isscalar", "...
draimundo/DPED_MSE
[ "d91f1fbf5797be8c823803ede5d6adbb83e7ce44" ]
[ "test_model_png.py" ]
[ "# Copyright 2020 by Andrey Ignatov. All Rights Reserved.\n\nfrom cgi import test\nimport numpy as np\nimport tensorflow as tf\nimport imageio\nfrom tqdm import tqdm\nimport os\nimport imageio\nimport utils\nimport sys\n\n\nfrom model import switch_model\nfrom datetime import datetime\nfrom load_dataset import extr...
[ [ "tensorflow.compat.v1.placeholder", "numpy.reshape", "tensorflow.compat.v1.train.Saver", "tensorflow.compat.v1.ConfigProto", "tensorflow.compat.v1.Session", "numpy.dstack", "numpy.floor" ] ]
pasted/mosaic_clusterer
[ "8b3e230e0be7edf29423cfd1135a238723e8cb14" ]
[ "chart_plotter.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nfrom itertools import cycle\nfrom mpl_toolkits.mplot3d import Axes3D\n\nclass ChartPlotter():\n\n def render(this_transposed_array, this_mean_shift):\n these_labels = this_mean_shift.labels_\n these_cluster_centers = this_mean_shift.cluster_centers_\...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.title", "numpy.unique", "matplotlib.pyplot.figure" ] ]
mihahauke/scinol_icml2019
[ "8f6bf250c9501a47d3c4b2323f830abcbf56cce3" ]
[ "models.py" ]
[ "from tensorflow.contrib.layers import fully_connected, conv2d,xavier_initializer\nimport tensorflow as tf\n\n\nclass _Model(object):\n def __init__(self, name=None):\n self.name = name\n\n def _model(self, inputs, outputs_num, dropout_switch):\n raise NotImplementedError()\n\n def __call__(s...
[ [ "tensorflow.zeros_initializer", "tensorflow.contrib.rnn.DropoutWrapper", "tensorflow.layers.flatten", "tensorflow.contrib.layers.xavier_initializer", "tensorflow.contrib.layers.fully_connected", "tensorflow.layers.batch_normalization", "tensorflow.contrib.layers.conv2d", "tensorflo...
dylantzx/TensorFlow_Yolo
[ "c002627c59bdc673a2a691c6d77dcf2d492ac1d4" ]
[ "yolov3/utils.py" ]
[ "#================================================================\n#\n# File name : utils.py\n# Author : PyLessons\n# Created date: 2020-09-27\n# Website : https://pylessons.com/\n# GitHub : https://github.com/pythonlessons/TensorFlow-2.x-YOLOv3\n# Description : additional yolov3 and yo...
[ [ "numpy.product", "numpy.minimum", "numpy.copy", "numpy.exp", "numpy.finfo", "numpy.concatenate", "numpy.full", "tensorflow.shape", "tensorflow.concat", "numpy.logical_and", "tensorflow.constant", "numpy.argmax", "numpy.logical_or", "numpy.array", "tensor...
cunningham-lab/monotonic-flds
[ "57c70b0f1e18bd3329a948cf4ebfc22242f97207" ]
[ "ssm_spline/ssm/emissions.py" ]
[ "import autograd.numpy as np\nimport autograd.numpy.random as npr\nfrom autograd.scipy.special import gammaln\nfrom autograd.scipy.linalg import block_diag\n\nfrom ssm.util import ensure_args_are_lists, ensure_args_not_none, \\\n ensure_slds_args_not_none, logistic, logit, softplus, inv_softplus, spline_func, lo...
[ [ "sklearn.decomposition.PCA", "sklearn.linear_model.LinearRegression" ] ]
ulebok/dlcourse_ai
[ "ba4b3e47ca97b862e3982fc875d0231d7d633d75" ]
[ "assignments/assignment1/knn.py" ]
[ "import numpy as np\n\n\nclass KNN:\n \"\"\"\n K-neariest-neighbor classifier using L1 loss\n \"\"\"\n def __init__(self, k=1):\n self.k = k\n\n def fit(self, X, y):\n self.train_X = X\n self.train_y = y\n\n def predict(self, X, num_loops=0):\n \"\"\"\n Uses the ...
[ [ "numpy.abs", "numpy.zeros" ] ]
dnilosek/evtech
[ "0cd7cc7f29a3f61bd7c09d92d795a2ef042250b2" ]
[ "tests/test_ray.py" ]
[ "#!/usr/bin/env python3\n\n\"\"\"Tests for ray class.\"\"\"\n\nimport sys\nimport unittest\nimport numpy as np\nimport math\n\nfrom pyproj import CRS\nfrom evtech import Ray\nfrom evtech import Camera\n\nclass TestRay(unittest.TestCase):\n \"\"\"Tests for `evtech.ray` package.\"\"\"\n\n def setUp(self):\n ...
[ [ "numpy.array" ] ]
Flsahkong/Deep-SVDD-PyTorch
[ "c20442fb394f679222ae49d299bcb3c95e2d67c8" ]
[ "src/networks/cifar10_LeNet.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom src.base.base_net import BaseNet\n\n\nclass CIFAR10_LeNet(BaseNet):\n\n def __init__(self):\n super().__init__()\n\n # 这里的这个fc的输出维度和mnist的不同\n self.rep_dim = 128\n self.pool = nn.MaxPool2d(2, 2)\n\n s...
[ [ "torch.nn.Linear", "torch.sigmoid", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.ConvTranspose2d", "torch.nn.Conv2d", "torch.nn.BatchNorm1d", "torch.nn.init.calculate_gain", "torch.nn.functional.leaky_relu" ] ]
Blobtoe/Android-APT-Decoder
[ "b11b9c4b1b6e3bbdf6053944670be760320bbb1f" ]
[ "app/src/main/python/app.py" ]
[ "import numpy\nimport scipy.io.wavfile\nimport scipy.signal\nfrom scipy import fftpack\nimport sys\nfrom PIL import Image\nfrom PIL import ImageEnhance\nimport subprocess\nimport argparse\nimport librosa\nfrom os.path import dirname, join\nimport os\nfrom scipy.signal import butter, sosfilt, sosfreqz\nimport imagei...
[ [ "numpy.concatenate", "numpy.array", "scipy.signal.sosfilt", "numpy.round", "numpy.percentile", "scipy.signal.butter", "numpy.split", "numpy.abs", "numpy.hstack" ] ]
HwangJae-won/ai-tox
[ "a3f2e3aaa345885117be845ca00c4d49c7106d75" ]
[ "grover/util/utils.py" ]
[ "\"\"\"\nThe general utility functions.\n\"\"\"\nimport csv\nimport logging\nimport os\nimport pickle\nimport random\nfrom argparse import Namespace\nfrom collections import defaultdict\nfrom logging import Logger\nfrom typing import List, Set, Tuple, Union, Dict\n\nimport numpy as np\nimport torch\nfrom rdkit impo...
[ [ "numpy.concatenate", "numpy.array", "numpy.count_nonzero", "numpy.isnan", "torch.nn.MSELoss", "torch.save", "torch.optim.Adam", "numpy.load", "numpy.nanmean", "numpy.savez_compressed", "torch.load", "torch.nn.BCEWithLogitsLoss", "numpy.unique" ] ]
pascalnagel/CarND-Capstone
[ "4dfe8998a0d85e6e8277410660e0777af08d9031" ]
[ "ros/src/bag_validator/light_classification/tl_classifier.py" ]
[ "from styx_msgs.msg import TrafficLight\nfrom PIL import Image\nfrom PIL.ImageDraw import Draw\nfrom PIL import ImageFont\nimport numpy as np\nimport tensorflow as tf\nfrom collections import Counter\n\nclass TLClassifier(object):\n def __init__(self):\n self.frozen_graph_filename = \"/capstone/ros/src/tl...
[ [ "numpy.array", "numpy.reshape", "tensorflow.GraphDef", "tensorflow.Session", "tensorflow.import_graph_def", "tensorflow.Graph", "tensorflow.gfile.GFile", "numpy.argmax" ] ]
NDOWAH/probnum
[ "1fed705b2443a14d08419e16f98f6ef815ae9ffa" ]
[ "src/probnum/randprocs/markov/integrator/_integrator.py" ]
[ "\"\"\"Integrated processes such as the integrated Wiener process or the Matern process.\"\"\"\n\nimport numpy as np\n\nfrom probnum import config, linops\nfrom probnum.randprocs.markov.integrator import _preconditioner\n\n__all__ = [\"IntegratorTransition\"]\n\n\nclass IntegratorTransition:\n r\"\"\"Transitions...
[ [ "numpy.zeros", "numpy.eye" ] ]
Jake-Jay/StyleNeRF_pl
[ "c9cc35bc0453a72f51b63512b3517e5f79da12a6" ]
[ "train.py" ]
[ "import os, sys\nos.environ[\"CUDA_DEVICE_ORDER\"]=\"PCI_BUS_ID\" # see issue #152\nos.environ[\"CUDA_VISIBLE_DEVICES\"]=\"0\"\n\nfrom opt import get_opts\nimport torch\nimport torchvision.transforms as transforms\nfrom collections import defaultdict\n\nfrom torch.utils.data import DataLoader\nfrom datasets impor...
[ [ "torch.cat", "torch.stack", "torch.utils.data.DataLoader", "torch.no_grad" ] ]
RittaNarita/numpy
[ "061aa26e1b772d46d3b97018cabb7d01637284cd" ]
[ "numpy/ma/core.py" ]
[ "\"\"\"\nnumpy.ma : a package to handle missing or invalid values.\n\nThis package was initially written for numarray by Paul F. Dubois\nat Lawrence Livermore National Laboratory.\nIn 2006, the package was completely rewritten by Pierre Gerard-Marchant\n(University of Georgia) to make the MaskedArray class a subcla...
[ [ "numpy.core.umath.equal", "numpy.ndarray.sort", "numpy.void", "numpy.core.umath.less", "numpy.core.umath.greater", "numpy.resize", "numpy.where", "numpy.iscomplexobj", "numpy.finfo", "numpy.size", "numpy.ndarray.__setitem__", "numpy.outer", "numpy.issubdtype", ...
sanchaymittal/hummingbot
[ "d4c5583740eaf033946f71856e7af14853cc486e" ]
[ "hummingbot/market/ddex/ddex_api_order_book_data_source.py" ]
[ "#!/usr/bin/env python\n\nimport asyncio\nimport aiohttp\nimport logging\nimport pandas as pd\nfrom typing import (\n AsyncIterable,\n Dict,\n List,\n Optional\n)\nimport re\nimport time\nimport ujson\nimport websockets\nfrom websockets.exceptions import ConnectionClosed\n\nfrom hummingbot.core.data_typ...
[ [ "pandas.DataFrame.from_records", "pandas.Timedelta", "pandas.Timestamp.utcnow" ] ]
lipovsek/aimet
[ "236fb02cc6c45e65c067030416c49a09ace82045", "236fb02cc6c45e65c067030416c49a09ace82045" ]
[ "TrainingExtensions/tensorflow/src/python/aimet_tensorflow/plotting_utils.py", "Examples/torch/compression/channel_pruning.py" ]
[ "# /usr/bin/env python3.5\n# -*- mode: python -*-\n# =============================================================================\n# @@-COPYRIGHT-START-@@\n#\n# Copyright (c) 2019-2021, Qualcomm Innovation Center, Inc. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without...
[ [ "pandas.DataFrame", "numpy.prod", "numpy.reshape" ], [ "torch.device", "torch.cuda.is_available" ] ]
NoamRosenberg/anchorF
[ "daf093f9851050dc46fd1c01721c91153cc4ff62" ]
[ "train.py" ]
[ "import time\nimport os\nimport copy\nimport argparse\nimport pdb\nimport collections\nimport sys\n\nimport numpy as np\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.optim import lr_scheduler\nfrom torch.autograd import Variable\nfrom torchvision import datasets, models, transforms...
[ [ "torch.optim.lr_scheduler.StepLR", "numpy.mean", "torch.cuda.is_available", "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.utils.data.DataLoader", "torch.load", "torch.nn.DataParallel" ] ]
greenglobal/hr-contact
[ "de38dd50f28514f014614e2818c4df032630d971" ]
[ "convert.py" ]
[ "#!usr/bin/env python3\n\nimport pandas as pd\n\n\nGOOGLE_CSV_FILE = './google-csv-headers.txt'\nDATA_SOURCE_FILE = './hr-data.csv'\nOUTPUT_FILE = './output.csv'\n\n\ndef normalizeDate(sdate):\n arr = sdate.split('/')\n return '-'.join([arr[2], arr[0], arr[1]])\n\n\ndef extract(row):\n return dict(\n ...
[ [ "pandas.read_csv" ] ]
bomeisl/cityspire-c-ds
[ "f02e69e6acd8df59bfb72f396ad6609c893628bf" ]
[ "app/locations.py" ]
[ "#app/locations.py\r\n\r\n\r\n\r\n\"\"\"Route that provides locations the model was trained on.\r\nGET '/locations'\r\n\"\"\"\r\n\r\n\r\n# Imports\r\n\r\nimport pandas as pd\r\n\r\nimport logging\r\nfrom typing import List\r\n\r\nfrom fastapi import APIRouter\r\nfrom fastapi.encoders import jsonable_encoder\r\nfrom...
[ [ "pandas.read_csv" ] ]
Nishant-codex/LSNN-official
[ "e16fa0283736acdef1ff1e3e6b4ca4cbb6e7c024" ]
[ "lsnn/toolbox/rewiring_tools.py" ]
[ "\"\"\"\nThe Clear BSD License\n\nCopyright (c) 2019 the LSNN team, institute for theoretical computer science, TU Graz\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the follo...
[ [ "numpy.random.choice", "numpy.random.rand", "tensorflow.logical_not", "tensorflow.gradients", "tensorflow.Assert", "numpy.sign", "tensorflow.zeros_like", "tensorflow.clip_by_value", "tensorflow.sqrt", "tensorflow.greater", "tensorflow.control_dependencies", "numpy.s...
MassimoClementi/CV-Crowd-Counting
[ "f148dc8a1aa99ddecb519a0637f801d96051c497" ]
[ "Counting-ICCV-DSSINet/src/crowd_counting.py" ]
[ "from __future__ import print_function\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport logging\nfrom torch.nn import DataParallel\nfrom torch.autograd import Variable\nfrom network import Conv2d, FC, Conv2d_dilated, np_to_variable\n\nimport network\nimport numpy as np\n\nimport importl...
[ [ "torch.no_grad", "torch.cuda.is_available", "torch.nn.DataParallel" ] ]
LielinJiang/hapi
[ "5ed8fa80c6b443ccb7e06395972925e600017017" ]
[ "hapi/vision/transforms/transforms.py" ]
[ "# Copyright (c) 2020 PaddlePaddle 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 re...
[ [ "numpy.random.normal", "numpy.array", "numpy.uint8", "numpy.errstate", "numpy.random.uniform", "numpy.random.randint", "numpy.clip", "numpy.random.random" ] ]
patliang/inpredo
[ "3133a9a64edb5f6cb2b91ee4c16ac61ce6c254e3" ]
[ "src/graphwerk.py" ]
[ "from numpy import genfromtxt\nimport matplotlib.pyplot as plt\nimport mpl_finance\nimport numpy as np\nimport uuid\n\n# Input your csv file here with historical data\n\nad = genfromtxt('../financial_data/eurusd.csv', delimiter=',' ,dtype=str)\npd = np.flipud(ad)\n\nbuy_dir = '../data/train/buy/'\nsell_dir = '../da...
[ [ "matplotlib.pyplot.autoscale", "matplotlib.pyplot.plot", "numpy.genfromtxt", "numpy.ones", "matplotlib.pyplot.cla", "matplotlib.pyplot.figure", "numpy.flipud", "matplotlib.pyplot.clf", "matplotlib.pyplot.axis" ] ]
lmijovic/carl-torch
[ "bd4e483b3c6a3685a874ba9c33d4dd5be524627d", "bd4e483b3c6a3685a874ba9c33d4dd5be524627d" ]
[ "utils_edb.py", "tests/inputs/generate_inputs.py" ]
[ "import pandas as pd\nimport numpy as np\n\nfrom scipy.stats import distributions\n\n# carl torch framework has a bunch of requirements on inputs;\n# aim of this module is to ensure these requirements are satisfied \n\ndef preprocess_input_file(df_in):\n # requirements on single file \n\n # if weights exits, ...
[ [ "numpy.concatenate", "numpy.median", "numpy.round", "numpy.cumsum", "numpy.exp", "numpy.mean", "numpy.std", "numpy.argsort", "pandas.concat", "numpy.abs", "numpy.searchsorted", "numpy.sqrt" ], [ "numpy.concatenate", "numpy.random.normal", "numpy.aran...
Huawei-Ascend/modelzoo
[ "df51ed9c1d6dbde1deef63f2a037a369f8554406", "df51ed9c1d6dbde1deef63f2a037a369f8554406", "df51ed9c1d6dbde1deef63f2a037a369f8554406", "df51ed9c1d6dbde1deef63f2a037a369f8554406" ]
[ "built-in/TensorFlow/Official/cv/image_segmentation/DeeplabV3_for_TensorFlow/00-access/core/feature_extractor.py", "contrib/Research/cv/xception/ATC_xception_tf_nkxiaolei/img_preprocess.py", "built-in/TensorFlow/Official/cv/image_classification/ResNet50_for_TensorFlow/src/layers/layers.py", "built-in/TensorFl...
[ "# Lint as: python2, python3\n# Copyright 2018 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/L...
[ [ "tensorflow.compat.v1.reshape", "tensorflow.compat.v1.cast", "tensorflow.compat.v1.zeros", "tensorflow.compat.v1.shape", "tensorflow.compat.v1.to_float" ], [ "numpy.array", "numpy.asarray" ], [ "tensorflow.nn.in_top_k", "tensorflow.metrics.accuracy" ], [ "tensor...
awesome-archive/arviz
[ "e11432bc065d0b2280f27c901beb4ac9fc5c5dba" ]
[ "arviz/tests/test_plot_utils.py" ]
[ "# pylint: disable=redefined-outer-name\nimport numpy as np\nimport xarray as xr\nimport pytest\n\nfrom ..plots.plot_utils import xarray_to_ndarray, xarray_var_iter, get_coords\n\n\n@pytest.fixture(scope=\"function\")\ndef sample_dataset():\n mu = np.arange(1, 7).reshape(2, 3)\n tau = np.arange(7, 13).reshape...
[ [ "numpy.concatenate", "numpy.arange" ] ]
c-data/outlier-utils
[ "440243b0d7ce548309f9c7a403d34521a4e1962b" ]
[ "tests/test_smirnov_grubbs.py" ]
[ "from unittest import TestCase\n\nimport numpy as np\n\nfrom scipy import stats\n\nfrom outliers import smirnov_grubbs as grubbs\n\ntry:\n import pandas as pd\nexcept ImportError:\n pd = None\n\n\nclass SmirnovGrubbsTests(TestCase):\n def setUp(self):\n self.data1 = [1, 10, 10, 10]\n self.dat...
[ [ "numpy.array", "scipy.stats.norm.rvs", "pandas.Series" ] ]
YakshHaranwala/PTRAIL
[ "6e139023fbdd73d7973055fc4b121c927aa8e244" ]
[ "ptrail/GUI/handler.py" ]
[ "\"\"\"\n This class is used to connect the PTRAIL GUI to PTRAIL\n backend. All the GUI's functionalities are handled in this\n class.\n\n | Authors: Yaksh J Haranwala\n\"\"\"\nimport io\nimport random\nimport folium\nimport pandas as pd\nfrom PyQt5 import QtWidgets, QtWebEngineWidgets\n\nfrom ptrail.GU...
[ [ "pandas.read_csv" ] ]
HirataYurina/RetinaNet-tf2.X-techi
[ "bbef9223f6ec7e7ba360042cad291b31bb00af44" ]
[ "train_keras.py" ]
[ "# -*- coding:utf-8 -*-\n# author:平手友梨奈ii\n# e-mail:1353593259@qq.com\n# datetime:1993/12/01\n# filename:train_keras.py\n# software: PyCharm\n\nimport tensorflow.keras as keras\nfrom retinanet import retinanet\nfrom config.configs import config\nfrom dataset.get_dataset import DataGenerator\nfrom core.loss import r...
[ [ "tensorflow.keras.Input", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.layers.Lambda", "tensorflow.keras.Model" ] ]
Ian-Dx/DxTorchUtils
[ "af1d522f58f1b7baed8f661757dd45c13343ddcd" ]
[ "dxtorchutils/utils/losses.py" ]
[ "from torch.nn import *\nimport torch\nimport torch.nn.functional as F\n\nclass BCEDiceLoss(Module):\n def __init__(self):\n super().__init__()\n\n def forward(self, input, target):\n bce = F.binary_cross_entropy_with_logits(input, target)\n smooth = 1e-10\n input = torch.sigmoid(i...
[ [ "torch.nn.functional.binary_cross_entropy_with_logits", "torch.sigmoid" ] ]
princessV/lab-for-EN.601.475
[ "0767091f47b886946a1af2dbfdc631a78efe9324" ]
[ "src/hw4/models.py" ]
[ "import numpy as np\n\n\nclass Model(object):\n\n def __init__(self):\n self.num_input_features = None\n\n def fit(self, X, y, **kwargs):\n \"\"\" Fit the model.\n\n Args:\n X: A compressed sparse row matrix of floats with shape\n [num_examples, num_features].\n ...
[ [ "numpy.max", "numpy.linalg.norm", "numpy.empty", "numpy.asarray", "numpy.zeros", "numpy.argmin", "numpy.dot", "numpy.sum", "numpy.min", "numpy.mean", "numpy.exp", "numpy.where", "numpy.row_stack" ] ]
Blue-Giant/MRFGAP_NET
[ "c0ea2fa2df0cd5e72ec6d2bf377c6ae9a609b63c", "c0ea2fa2df0cd5e72ec6d2bf377c6ae9a609b63c" ]
[ "part_seg/train_multi_gpu.py", "part_seg/part_seg_model.py" ]
[ "import argparse\nimport subprocess\nimport tensorflow as tf\nimport numpy as np\nfrom datetime import datetime\nimport json\nimport os\nimport sys\nBASE_DIR = os.path.dirname(os.path.abspath(__file__))\nsys.path.append(BASE_DIR)\nsys.path.append(os.path.dirname(BASE_DIR))\nsys.path.append(os.path.join(BASE_DIR, '....
[ [ "numpy.mean", "tensorflow.local_variables_initializer", "tensorflow.global_variables_initializer", "tensorflow.concat", "tensorflow.Variable", "tensorflow.global_variables", "tensorflow.ConfigProto", "tensorflow.get_variable_scope", "tensorflow.minimum", "tensorflow.train.A...
kisonho/torchmanager
[ "ac01c61a132238bc0d39bf2173dfd37f44dbbf30" ]
[ "core/devices/devices.py" ]
[ "from __future__ import annotations\nfrom typing import Any, Iterable, Optional, Tuple, Union\n\nimport torch, warnings\n\nfrom .protocols import _DeviceMovable\n\nCPU = torch.device('cpu')\nGPU = torch.device('cuda')\n\ndef data_parallel(raw_model: torch.nn.Module, *args, **kwargs) -> Tuple[Union[torch.nn.Module, ...
[ [ "torch.device", "torch.nn.parallel.DataParallel", "torch.cuda.is_available", "torch.cuda.empty_cache" ] ]
NaturalSolutions/ecoReleve-BE
[ "e120be8236d3f16d4a698058dcf43a4ed8b18e7b" ]
[ "Back/ecoreleve_be_server/Views/export.py" ]
[ "from sqlalchemy import select, join, exists, func, and_, text, or_, outerjoin\nimport json\nimport pandas as pd\nfrom ..Models import BaseExport, Project, Observation, Station, ModuleForms, FrontModules, Base, User, Client, Project\nfrom ..utils.generator import Generator\nfrom ..renderers import CSVRenderer, PDFr...
[ [ "pandas.ExcelWriter" ] ]
a5a/GPflow
[ "5fbff1955f4e81d5ec9b44947a9f409314dc2b91", "5fbff1955f4e81d5ec9b44947a9f409314dc2b91" ]
[ "gpflow/models/vgp.py", "tests/test_priors.py" ]
[ "# Copyright 2016 James Hensman, Valentine Svensson, alexggmatthews, fujiisoup\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#...
[ [ "tensorflow.matrix_band_part", "tensorflow.matrix_diag_part", "numpy.zeros", "tensorflow.expand_dims", "tensorflow.eye", "tensorflow.matmul", "numpy.ones", "tensorflow.transpose", "tensorflow.cholesky", "numpy.eye", "tensorflow.reduce_sum", "tensorflow.stack", "...
omunroe-com/nasasrompy
[ "35ae060b6a032d085a31574fbe3bf390b023631d" ]
[ "SROMPy/target/NormalRandomVariable.py" ]
[ "# Copyright 2018 United States Government as represented by the Administrator of\n# the National Aeronautics and Space Administration. No copyright is claimed in\n# the United States under Title 17, U.S. Code. All Other Rights Reserved.\n\n# The Stochastic Reduced Order Models with Python (SROMPy) platform is lice...
[ [ "scipy.stats.norm.pdf", "scipy.stats.norm.rvs", "scipy.stats.norm.ppf", "numpy.zeros", "scipy.stats.norm.moment", "scipy.stats.norm.cdf" ] ]
talos-gis/gdalos
[ "8ba3d8c512c9c13adee2287d0f254f35b3b74b57" ]
[ "src/gdalos/talos/geom_util.py" ]
[ "import numpy as np\nfrom typing import Tuple, Union\n\nfrom gdalos.talos.gen_consts import M_PI_180, M_2PI\n\nFloatOrArr = Union[float, np.ndarray]\n\n\ndef c_mod(a: int, n: int) -> int:\n return a % n if a >= 0 else a % n - n\n\n\ndef Frac(x: FloatOrArr) -> FloatOrArr:\n return x - np.trunc(x)\n\n\ndef Norm...
[ [ "numpy.trunc" ] ]
JulianKnodt/nerfactor
[ "bdb5d60eaff132e507b8d21d045494de81707425" ]
[ "nerfactor/models/shape.py" ]
[ "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "tensorflow.convert_to_tensor", "tensorflow.zeros", "tensorflow.range", "tensorflow.concat", "tensorflow.debugging.check_numerics", "tensorflow.shape", "numpy.ones_like", "numpy.zeros_like", "tensorflow.keras.losses.MSE", "tensorflow.ones_like", "tensorflow.reshape", ...
cool-RR/incubator-mxnet
[ "103d839aa8477419ddc82f09e2ddb246e24a8d3d" ]
[ "tests/python/gpu/test_predictor.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.random.uniform" ] ]
Codersbay4/Unsupervised-learning
[ "693b3ce2ff39d1a610e7795385b0574bcd531ff9" ]
[ "tsneONxor.py" ]
[ "\nfrom __future__ import print_function, division\nfrom builtins import range\n\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom sklearn.manifold import TSNE\n\n\ndef get_xor_data():\n X1 = np.random.random((100, 2))\n X2 = np.random.random((100, 2)) - np.array([1, 1])\n X3 = np.random.rando...
[ [ "numpy.array", "sklearn.manifold.TSNE", "matplotlib.pyplot.show", "matplotlib.pyplot.scatter", "numpy.random.random", "numpy.vstack" ] ]
rahulbhalley/cyclegan-qp
[ "cb82b314583f39c3896fa8480c1b0e501b8a8ac2" ]
[ "data.py" ]
[ "# -*- coding: utf-8 -*-\n\n__author__ = \"Rahul Bhalley\"\n\nfrom config import *\n\nfrom torch.utils.data import DataLoader\nimport torchvision.transforms as transforms\nimport torchvision.datasets as dsets\n\n\ndef load_data():\n\n # Preprocessing\n transform = transforms.Compose([\n transforms.Rand...
[ [ "torch.utils.data.DataLoader" ] ]
lucianoacsilva/iota_simulation
[ "0108f47f7b5203b0678fa147d933ab853f48fb34" ]
[ "simulation/helpers.py" ]
[ "import sys\nimport csv\nimport configparser\nimport ast\nimport numpy as np\nimport networkx as nx\nimport matplotlib.pyplot as plt\n\ndef update_progress(progress, transaction):\n\n bar_length = 50\n status = \"\"\n if isinstance(progress, int):\n progress = float(progress)\n if not isinstance(...
[ [ "numpy.round", "numpy.ones" ] ]
PictorSomni/Image_manipulations
[ "7b91dd8514a2bb4383308c199e03e26539cef430" ]
[ "COMMANDE/Order.pyw" ]
[ "# -*- coding: utf-8 -*-\r\n#############################################################\r\n# IMPORTS #\r\n#############################################################\r\n\r\n## --> GUI\r\nfrom PySide6 import QtCore, QtGui, QtWidgets\r\nfrom Order_data.ui_main imp...
[ [ "numpy.array", "numpy.linalg.solve" ] ]
jjmcnelis/netCDFeditor
[ "b71fe7d19b03dbadfbaadd587a31bbca45f4fa5b" ]
[ "dev/tifedit.py" ]
[ "#tifedit.py\nimport os\nimport sys\nimport glob\nimport pandas as pd\nfrom osgeo import gdal\n\ndrv = gdal.GetDriverByName(\"GTiff\")\n\ndef getbands(geotiff, verbose = False):\n print(\"~ Processing: \"+geotiff)\n raster = gdal.Open(geotiff)\n bands = []\n\n for bandnumber in range(1, raster.RasterCou...
[ [ "pandas.DataFrame", "pandas.read_csv" ] ]
HazyResearch/domino
[ "76ef413a9f9ee4a5d9c3fc044d8a0a0ea0cc4dc2" ]
[ "domino/gui.py" ]
[ "from typing import List, Union\n\nimport ipywidgets as widgets\nimport matplotlib.pyplot as plt\nimport meerkat as mk\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nfrom IPython.display import display\n\nfrom domino.utils import unpack_args\nfrom ._describe import describe\n\n\ndef explore(\n ...
[ [ "numpy.sum", "matplotlib.pyplot.show", "numpy.unique" ] ]
prabhupant/query-server
[ "d6ae16caaa83cbe6cbc15b42563f3cd286e3539c" ]
[ "app/scrapers/analysis.py" ]
[ "import math\nimport pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\n\ndef karl_pearson_coefficient(data1, data2):\n\n df1 = pd.DataFrame(data1)\n df2 = pd.DataFrame(data2)\n df = df1.append(df2, ignore_index=True)\n # print(np.corrcoef(data1, data2)[0,1])\n ...
[ [ "numpy.zeros", "pandas.DataFrame", "pandas.crosstab", "numpy.mean", "matplotlib.pyplot.show" ] ]
numpyLearningGroup/numpy-learn
[ "847d542f6541715f5842510911dd80eab4c6a44a" ]
[ "notes/lecture-4/2020-10-28-mrl.py" ]
[ "# 数学函数\n# ```\n# 本次学习内容为数学函数,顾名思义,就是常见的数学上的操作,最基础的有:加减乘除等\n# 运算符为 元素级,只用于位置相同的元素之间,所得到的运算结果组成一个\n# 新的数组\n# ```\n## 基础的数学操作\n# - 加法\n# ```\n# numpy.add(x1, x2, *args, **kwargs)\n# ```\n# - 减法\n# ```\n# numpy.subtract(x1, x2, *args, **kwargs)\n# ```\n# - 乘法\n# ```\n# numpy.multiply(x1, x2, *args, **k...
[ [ "numpy.divide", "numpy.square", "numpy.add", "numpy.multiply", "numpy.floor_divide", "numpy.subtract", "numpy.arange", "numpy.power", "numpy.sqrt", "numpy.linspace" ] ]
robust-dl-ai/irn
[ "b266bc98be152895935a346d01c82fc96f167faa" ]
[ "debug/deval_sem_seg.py" ]
[ "import os\n\nimport hydra\nimport imageio\nimport numpy as np\nfrom chainercv.datasets import VOCSemanticSegmentationDataset\nfrom chainercv.evaluations import calc_semantic_segmentation_confusion\nfrom omegaconf import DictConfig\n\nfrom irn.debug.deval_cam import cal_segment_cam_intersection_area, cal_total_segm...
[ [ "numpy.max", "numpy.zeros_like", "numpy.mean", "numpy.nanmean", "numpy.diag", "numpy.unique" ] ]
deepanshu1999/GSA
[ "2bd589eea24ac9df50b840c906622fae4165adf4" ]
[ "GSA/Search.py" ]
[ "import numpy as np\n\ndef distance(xi, xj):\n # returns Euclidean distance between two point i and j\n return np.linalg.norm(xi-xj)\n\ndef fitness(Points, label, particle):\n\n #Points : All Point Coordinates\n #Label : All Point Labels\n #Particle : The Solution Particle\n fitness = 0\n\n for...
[ [ "numpy.array", "numpy.linalg.norm", "numpy.zeros", "numpy.random.seed", "numpy.random", "numpy.ndarray", "numpy.finfo", "numpy.random.randint" ] ]
christophbrgr/brats-orchestra
[ "83f45060e06556af8c140e1f3bbe68980ea15330" ]
[ "orchestra/util/own_itk.py" ]
[ "# -*- coding: UTF-8 -*-\n\"\"\"Module containing functions enabling to read, make and\nwrite ITK images.\n\n\"\"\"\n__version__ = '0.2'\n__author__ = 'Esther Alberts'\n\nimport os\nimport numpy as np\nimport SimpleITK as itk\n\ndef reduce_arr_dtype(arr, verbose=False):\n \"\"\" Change arr.dtype to a more memory...
[ [ "numpy.asarray" ] ]
shriyanka/daemo-forum
[ "58c555f69208beedbb0c09f7b7d1e32ab741b2c5" ]
[ "crowdsourcing/viewsets/csvmanager.py" ]
[ "from rest_framework.viewsets import ViewSet\nfrom rest_framework import status\nfrom rest_framework.response import Response\nfrom crowdsourcing.serializers.requesterinputfile import RequesterInputFileSerializer\nfrom crowdsourcing.serializers.task import TaskSerializer\nfrom crowdsourcing.models import RequesterI...
[ [ "pandas.DataFrame", "pandas.read_csv" ] ]
sebhtml/assembly
[ "abd59f2adf2ba1a35671cc4a49a13c12c9ab74b6" ]
[ "lib/assembly/job.py" ]
[ "import os\nimport re\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nimport numpy.numarray as na\n\nimport asmtypes\nimport shock \n\nclass ArastJob(dict):\n \"\"\"\n\n \"\"\"\n def __init__(self, *args):\n dict.__init__(self, *args)\n self['pipelines'] = [] # Lis...
[ [ "matplotlib.use", "matplotlib.pyplot.xlim", "matplotlib.pyplot.savefig", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.bar", "matplotlib.pyplot.xticks" ] ]
drjubbs/lstm-demo
[ "a2bcf25d1b1903c1746c107a50b1d74fb20dde2f" ]
[ "testing.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Unit testing for LSTM demo.\"\"\"\n\nimport unittest\nfrom datetime import datetime, timedelta\nimport numpy as np\nimport pandas as pd\nimport lstmutil\nfrom lstmutil import Scaler\n\n\nclass TestTimeSeries(unittest.TestCase):\n \"\"\"Unittest for time series data\"\"\"\n\n de...
[ [ "numpy.concatenate", "pandas.isnull", "numpy.array", "numpy.isclose", "numpy.random.rand", "pandas.DataFrame" ] ]
rhong3/panoptes-he
[ "f2484c9f54b925cc6a33a9d3b6b3a6e7945081fc" ]
[ "panoptes/Panoptes1.py" ]
[ "\"\"\"\nPanoptes1 for TF2.0\n\nCreated on 01/21/2020\n\n@author: RH\n\"\"\"\nimport tensorflow as tf\nfrom keras.layers.convolutional import Conv2D\nfrom keras.layers.pooling import MaxPooling2D, AveragePooling2D, GlobalAveragePooling2D\nfrom keras.layers.core import Dense, Dropout, Flatten, Activation, Lambda\nfr...
[ [ "tensorflow.constant", "tensorflow.variable_scope", "tensorflow.add", "tensorflow.convert_to_tensor" ] ]
AlbertoRemus/GDR_Net
[ "114cff27c6fc6048724a6f2bdce2306ab51d798e", "114cff27c6fc6048724a6f2bdce2306ab51d798e", "114cff27c6fc6048724a6f2bdce2306ab51d798e" ]
[ "lib/meshrenderer/scenerenderer.py", "lib/meshrenderer/gl_utils/shader_storage_buffer.py", "lib/utils/bbox_utils.py" ]
[ "# -*- coding: utf-8 -*-\nimport os\nimport glob\n\nimport math\nimport numpy as np\nfrom .write_xml import *\nimport lib.meshrenderer.meshrenderer as mr\nimport lib.meshrenderer.meshrenderer_phong as mr_phong\nimport cv2\n\nfrom lib.pysixd import view_sampler\nfrom lib.pysixd import transform\n\n\nclass SceneRende...
[ [ "numpy.array", "numpy.linalg.norm", "numpy.random.choice", "numpy.minimum", "numpy.random.triangular", "numpy.random.uniform", "numpy.random.randint", "numpy.dstack", "numpy.maximum" ], [ "numpy.empty" ], [ "numpy.where", "numpy.clip", "numpy.hstack", ...
cnHeider/draugr
[ "b95e0bb1fa5efa581bfb28ff604f296ed2e6b7d6", "b95e0bb1fa5efa581bfb28ff604f296ed2e6b7d6" ]
[ "draugr/scipy_utilities/subsampling.py", "draugr/pandas_utilities/misc_utilities.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n__author__ = \"Christian Heider Nielsen\"\n__doc__ = r\"\"\"\n\n Created on 27-01-2021\n \"\"\"\n\n__all__ = [\n \"max_decimation_subsample\",\n \"min_decimation_subsample\",\n \"mag_decimation_subsample\",\n \"fir_subsample\",\n ...
[ [ "numpy.max", "numpy.array", "numpy.sin", "numpy.argmin", "numpy.min", "scipy.signal.resample", "numpy.argmax", "numpy.abs", "numpy.cos", "scipy.signal.decimate", "numpy.linspace" ], [ "pandas.core.dtypes.missing.array_equivalent" ] ]
sujathasatish/greyatom-python-for-data-science
[ "f3144fcb9961bc6e76dce198265ca49d97866004" ]
[ "Loan-Approval-Analysis/code.py" ]
[ "# --------------\n# Importing header files\r\nimport numpy as np\r\nimport pandas as pd\r\nfrom scipy.stats import mode \r\n \r\nimport warnings\r\nwarnings.filterwarnings('ignore')\r\n\r\n#Reading file\r\nbank_data = pd.read_csv(path)\r\ndf=pd.DataFrame(bank_data)\r\n#Code starts here\r\ncategorical_var=df.select...
[ [ "pandas.DataFrame", "pandas.read_csv", "pandas.pivot_table" ] ]
Puriney/scanorama
[ "064fd9289ba0089c742d6ef6ca0952d7ec16e936" ]
[ "bin/monocyte_macrophage.py" ]
[ "import numpy as np\nfrom scanorama import *\nfrom scipy.sparse import vstack\nfrom scipy.stats import mannwhitneyu\n\nfrom benchmark import write_table\nfrom process import load_names, merge_datasets, process\nfrom time_align import time_align_correlate, time_align_visualize, time_dist\n\nNAMESPACE = 'mono_macro'\...
[ [ "numpy.array", "scipy.sparse.vstack", "numpy.zeros", "scipy.stats.mannwhitneyu" ] ]
DarkTheCross/rl_experiments
[ "3b448d946e18b8d8e40b45b71f4da2fba4e6eb66" ]
[ "pong/run_dqn_atari.py" ]
[ "import argparse\nimport gym\nfrom gym import wrappers\nimport os.path as osp\nimport random\nimport numpy as np\nimport tensorflow as tf\nimport tensorflow.contrib.layers as layers\n\nimport dqn\nfrom dqn_utils import *\nfrom atari_wrappers import *\n\n\ndef atari_model(img_in, num_actions, scope, reuse=False):\n ...
[ [ "tensorflow.set_random_seed", "numpy.random.seed", "tensorflow.contrib.layers.fully_connected", "tensorflow.Session", "tensorflow.reset_default_graph", "tensorflow.python.client.device_lib.list_local_devices", "tensorflow.ConfigProto", "tensorflow.variable_scope", "tensorflow.c...
Fan1117/avspeech
[ "41c50d2c23edeaf2c4e0947d39b34067e86e282e" ]
[ "src/con_train_model.py" ]
[ "from keras.layers import *\nfrom keras import Model\nfrom keras.models import Sequential\nimport tensorflow as tf\nimport numpy as np\nimport keras\nconfig = tf.ConfigProto( device_count = {'GPU': 1 , 'CPU': 8} ) \nsess = tf.Session(config=config) \nkeras.backend.set_session(sess)\nimport keras.layers as layers\nf...
[ [ "tensorflow.ConfigProto", "tensorflow.Session" ] ]
openhumanoids/iris-distro
[ "bb98593d70dacd388b8b51d224104d996bee0fd9" ]
[ "iris/cython/irispy/setup.py" ]
[ "from distutils.core import setup, Extension\nfrom Cython.Build import cythonize\n\nimport numpy\nimport sys\n\nfor name in [\"iriscore\", \"iriscoretest\"]:\n\n setup(ext_modules = cythonize(Extension(\n name,\n sources=[name + \".pyx\", \"../../src/iris.cpp\"],\n language=\"c++\",\n ...
[ [ "numpy.get_include" ] ]
lchang20/onnxruntime
[ "97b8f6f394ae02c73ed775f456fd85639c91ced1", "97b8f6f394ae02c73ed775f456fd85639c91ced1" ]
[ "onnxruntime/test/python/transformers/test_parity_decoder_attention.py", "onnxruntime/test/python/quantization/test_op_reshape.py" ]
[ "# --------------------------------------------------------------------------\n# Copyright 2020 The HuggingFace Inc. 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 http://www....
[ [ "torch.nn.Linear", "torch.stack", "torch._shape_as_tensor", "torch.normal", "torch.bmm", "torch.manual_seed", "torch.tensor", "torch.nn.functional.softmax" ], [ "numpy.random.seed", "numpy.random.normal", "numpy.array", "numpy.random.randint" ] ]
hannawong/ColXLM
[ "56cb7fdd11244b8355d2181c668ee13edfcff457" ]
[ "colXLM/training/utils.py" ]
[ "import os\nimport torch\nimport random\nfrom colXLM.utils.runs import Run\nfrom colXLM.utils.utils import save_checkpoint\nfrom colXLM.parameters import SAVED_CHECKPOINTS\n\n\ndef print_progress(scores):\n positive_avg, negative_avg = round(scores[:, 0].mean().item(), 2), round(scores[:, 1].mean().item(), 2)\n ...
[ [ "torch.cat", "torch.full", "torch.bernoulli" ] ]
kornesh/text-to-text-transfer-transformer
[ "d21350e1699889d793f992a48c8bc33575435589" ]
[ "t5/models/mesh_transformer.py" ]
[ "# Copyright 2019 The T5 Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agr...
[ [ "tensorflow.compat.v1.data.TextLineDataset" ] ]
meyer-lab/gc-cytokines
[ "c48ba92f103b632943024a70174134d616134eb6" ]
[ "ckine/figures/figureS5.py" ]
[ "\"\"\"\nThis creates Figure S5. Full panel of measured vs simulated for IL-2 and IL-15.\n\"\"\"\nimport numpy as np\nimport matplotlib.cm as cm\nfrom .figureCommon import subplotLabel, getSetup, plot_conf_int, plot_scaled_pstat, calc_dose_response, expScaleWT\nfrom ..imports import import_Rexpr, import_samples_2_1...
[ [ "numpy.array" ] ]
SummerOf15/tiny-instance-segmentation
[ "bfb3f3403a4637d97763443e56841acda9405498" ]
[ "src/p_detector/engine.py" ]
[ "import math\nimport sys\nimport time\nimport torch\nimport os\nimport itertools\n\nimport torchvision.models.detection.mask_rcnn\nimport detectron2.utils.comm as comm\n\nfrom detectron2.checkpoint import DetectionCheckpointer\nfrom detectron2.config import get_cfg\nfrom detectron2.data import MetadataCatalog, buil...
[ [ "torch.device", "torch.cuda.synchronize", "torch.nn.utils.clip_grad_norm_", "torch.no_grad", "torch.get_num_threads", "torch.set_num_threads" ] ]