repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
xinglong-zh/nas-cnn-rnn
[ "48b5a7523524a792c9b5500263f2d474ef5399b2" ]
[ "data.py" ]
[ "import os\nimport torch\nfrom os.path import dirname, realpath, abspath,join,exists\n\nfrom collections import Counter\n\nclass Dictionary(object):\n def __init__(self):\n self.word2idx = {}\n self.idx2word = []\n self.counter = Counter()\n self.total = 0\n\n def add_word(self, wo...
[ [ "torch.LongTensor" ] ]
CMessinides/thrones-sentiment-analysis
[ "56dfb664d5a2912cc32f377db432d7220e71cf07" ]
[ "scripts/transform.py" ]
[ "import json\nimport math\n\nimport pandas as pd\nfrom scipy import stats\n\nfrom lib.settings import DATA_DIR\nfrom lib.characters import ALL_NAMES\nfrom lib.episodes import getSequentialEpisodeNumber\n\nraw_comments = pd.read_csv(DATA_DIR / \"comments.csv\")\nraw_mentions = pd.read_csv(DATA_DIR / \"character-ment...
[ [ "pandas.read_csv", "scipy.stats.t.ppf", "pandas.merge" ] ]
ancasag/labelGlandula
[ "ebc315bdc0cc3fca1e365ccf0e237cdace4d6f29" ]
[ "predict/detect.py" ]
[ "import cv2 as cv\nimport numpy as np\nimport xml.etree.ElementTree as ET\nfrom xml.dom import minidom\nfrom imutils import paths\nimport os\nfrom tqdm import tqdm\n\n\nconfThreshold = 0.4 # Confidence threshold\nnmsThreshold = 0.4 # Non-maximum suppression threshold\ninpWidth = 416 # Width of network's input im...
[ [ "numpy.argmax" ] ]
PASpine/Xspine
[ "6d427adb30abda9e6408e37e2a802af4f6db2feb" ]
[ "utils.py" ]
[ "import sys\r\nimport os\r\nimport time\r\nimport math\r\nimport torch\r\nimport numpy as np\r\nfrom PIL import Image, ImageDraw, ImageFont\r\nfrom torchvision import transforms\r\nimport torch.nn.functional as F\r\n\r\nimport itertools\r\nimport struct # get_image_size\r\nimport imghdr # get_image_size\r\n\r\n\r...
[ [ "torch.zeros", "torch.sigmoid", "numpy.array", "numpy.ceil", "torch.min", "numpy.zeros", "torch.max", "torch.FloatTensor", "torch.no_grad", "torch.nn.functional.interpolate", "torch.linspace", "torch.clamp", "torch.from_numpy", "numpy.loadtxt", "torch.te...
SuchockiArtur/t-SNE-for-FaceNet
[ "575731e1687a2d2201ab147823910e87b1f55d7c" ]
[ "packages/classifier.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport math\nimport os\nimport pickle\n\nimport numpy as np\nimport tensorflow as tf\nfrom sklearn.svm import SVC\n\nfrom packages import facenet\n\n\nclass training:\n def __init__(self, datadir, m...
[ [ "numpy.zeros", "tensorflow.get_default_graph", "tensorflow.Graph", "tensorflow.Session", "sklearn.svm.SVC" ] ]
koverman47/Sequential-Dynamic-Blotto
[ "6867ebb47a6f822c5671c6db6b071d22fb3e80e0" ]
[ "search.py" ]
[ "#!/usr/bin/env python3\n\nimport sys\nimport math\nimport numpy as np\nfrom time import time\nfrom shapely.geometry import Point\nfrom shapely.geometry.polygon import Polygon\nfrom scipy.spatial import ConvexHull\nfrom utils import gen_kspace\nfrom node import Node\n\nclass Minimax:\n\n def __init__(self, A, R,...
[ [ "numpy.array", "numpy.dot", "numpy.zeros", "numpy.round", "numpy.sum", "numpy.ones", "numpy.eye", "numpy.where", "scipy.spatial.ConvexHull", "numpy.unique" ] ]
ziming-liu/ObjectDet
[ "6e25fa784114b9773b052d9d5465aa6fed93468a" ]
[ "mmdet/models/backbones/shareresnet_sumup0.py" ]
[ "import logging\n\nimport torch\nimport torch.nn as nn\nimport torch.utils.checkpoint as cp\nfrom mmcv.cnn import constant_init, kaiming_init\nfrom mmcv.runner import load_checkpoint\nfrom torch.nn.modules.batchnorm import _BatchNorm\n\nfrom mmdet.models.plugins import GeneralizedAttention\nfrom mmdet.models.utils ...
[ [ "torch.nn.MaxPool2d", "torch.nn.Sequential", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.utils.checkpoint.checkpoint" ] ]
greenfieldvision/psiz
[ "37068530a78e08792e827ee55cf55e627add115e" ]
[ "src/psiz/keras/sparse_dispatcher.py" ]
[ "# coding=utf-8\n# Copyright 2020 The Tensor2Tensor 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 requir...
[ [ "tensorflow.shape", "tensorflow.concat", "tensorflow.expand_dims", "tensorflow.reshape", "tensorflow.transpose", "tensorflow.gather", "tensorflow.split", "tensorflow.unstack", "tensorflow.cast" ] ]
leonfoks/empymod
[ "6c5f158b6093f8dcc1dec63057e6d3fd523fdbee" ]
[ "empymod/kernel.py" ]
[ "r\"\"\"\n\n:mod:`kernel` -- Kernel calculation\n===================================\n\nKernel of ``empymod``, calculates the wavenumber-domain electromagnetic\nresponse. Plus analytical full- and half-space solutions.\n\nThe functions ``wavenumber``, ``angle_factor``, ``fullspace``, ``greenfct``,\n``reflections``,...
[ [ "numpy.exp", "numpy.min", "numpy.invert", "numpy.sign", "numpy.cos", "numpy.imag", "scipy.special.kve", "numpy.sin", "numpy.zeros_like", "numpy.vectorize", "numpy.log", "numpy.seterr", "numpy.sqrt", "numpy.real", "numpy.shape", "scipy.special.ive", ...
jbinder/nn-eval
[ "1aed1bb84683392569466071155bfa825fed36e0" ]
[ "test/unit_tests/normalizer/tools_test.py" ]
[ "import unittest\n\nimport numpy as np\n\nfrom normalizer.tools import get_normalizer\n\n\n# noinspection PyMethodMayBeStatic\nclass ToolsTest(unittest.TestCase):\n def test_normalize_valid_data(self):\n normalizer_names = ['Identity', 'Reciprocal', 'SklearnStandard']\n for normalizer_name in norma...
[ [ "numpy.array" ] ]
wwilla7/pAPRika
[ "11a45f144f9bdabaee3ed7ee47cdf93f982dad72" ]
[ "paprika/setup.py" ]
[ "\"\"\"\nThis class contains a simulation setup wrapper for use with the Property Estimator.\n\"\"\"\n\nimport logging\nimport os\nimport shutil\nimport subprocess as sp\nfrom pathlib import Path\n\nimport numpy as np\nimport parmed as pmd\nimport pkg_resources\nimport pytraj as pt\nimport simtk.openmm as openmm\ni...
[ [ "numpy.shape", "numpy.linalg.eig", "numpy.argsort", "numpy.cross", "numpy.empty_like" ] ]
tkarna/galene
[ "a05463d3d0c9191c51893df4593d9ce0252d25fb" ]
[ "examples/extract_profiles.py" ]
[ "\"\"\"\nRead NEMO timeprofiles and individual profiles at observation time stamps.\n\"\"\"\nimport galene as ga\nimport iris\nimport numpy\n\nvar_list = ['temp', 'psal']\nobs_id = 'ices-ctd'\ndataset_id = 'run001'\n\nnemo_standard_name = {\n 'temp': 'sea_water_potential_temperature',\n 'salt': 'sea_water_pra...
[ [ "numpy.ma.is_masked", "numpy.isfinite" ] ]
Brent1999/FastMOT
[ "7b9ef1398e78ac49131e810f703ceb68e2222744" ]
[ "fastmot/detector.py" ]
[ "from collections import defaultdict\nfrom pathlib import Path\nimport configparser\nimport abc\nimport numpy as np\nimport numba as nb\nimport cupy as cp\nimport cupyx.scipy.ndimage\nimport cv2\n\nfrom . import models\nfrom .utils import TRTInference\nfrom .utils.rect import as_rect, to_tlbr, get_size, area\nfrom ...
[ [ "numpy.concatenate", "numpy.asarray", "numpy.zeros", "numpy.rint", "numpy.roll", "numpy.where", "numpy.loadtxt", "numpy.prod", "numpy.append", "numpy.dtype", "numpy.maximum" ] ]
visr/xarray
[ "9e8707d2041cfa038c31fc2284c1fe40bc3368e9" ]
[ "xarray/testing.py" ]
[ "\"\"\"Testing functions exposed to the user API\"\"\"\nfrom __future__ import absolute_import, division, print_function\n\nimport numpy as np\n\nfrom xarray.core import duck_array_ops\n\n\ndef _decode_string_data(data):\n if data.dtype.kind == 'S':\n return np.core.defchararray.decode(data, 'utf-8', 'rep...
[ [ "numpy.core.defchararray.decode" ] ]
JanCVanB/netflix
[ "e3ff4feab832846640dbb3daa5877ef84a00adaf" ]
[ "utils/data_io.py" ]
[ "\"\"\"Reading and writing tools for interfacing with the large data files\n\n.. moduleauthor:: Jan Van Bruggen <jancvanbruggen@gmail.com>\n\"\"\"\nfrom __future__ import print_function\nimport numpy as np\n\n\ndef _generate_points_from_index(correct_index):\n from utils.data_paths import ALL_DATA_FILE_PATH, ALL...
[ [ "numpy.load" ] ]
EpicTrol/SCNU-AiMatch
[ "f67512be7aaf8aff1f8cda799d3e843e2f96a33e" ]
[ "one_hot_encoding.py" ]
[ "# -*- coding: UTF-8 -*-\nimport numpy as np\nimport captcha_setting\n\n\ndef encode(text):\n vector = np.zeros(captcha_setting.ALL_CHAR_SET_LEN * captcha_setting.MAX_CAPTCHA, dtype=float)\n def char2pos(c):\n if c =='_':\n k = 62\n return k\n k = ord(c)-48\n if k > ...
[ [ "numpy.zeros" ] ]
CoEich/gpt-neox
[ "49e60fe7ad14f6991a7fa678d3a0c330d09b9ff4" ]
[ "megatron/utils.py" ]
[ "# coding=utf-8\n\n# Copyright (c) 2021 Josh Levy-Kramer <josh@levykramer.co.uk>.\n# This file is based on code by the authors denoted below and has been modified from its original version.\n#\n# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the ...
[ [ "torch.distributed.get_world_size", "torch.cuda.synchronize", "torch.arange", "torch.cuda.max_memory_allocated", "torch.cuda.memory_allocated", "torch.cuda.device_count", "torch.cuda.current_device", "torch.distributed.is_initialized", "torch.cuda.max_memory_reserved", "tor...
jainajinkya/snopt-python
[ "832a12c2422d23bbd7d3a476a3a3ae50ac7fc84f" ]
[ "solvers/solution.py" ]
[ "import os, sys\nimport numpy as np\n\n#-------------------------------------------------------------------------------#\nclass SQIC_solution(object):\n '''\n SQIC_solution class:\n '''\n def __init__ (self,name=''):\n self.setup(name)\n\n def setup(self,name):\n self.name = name\...
[ [ "numpy.char.decode", "numpy.nditer" ] ]
FredHutch/map_viruses
[ "92186d4024c67b708ee652f232e8878e403fb661" ]
[ "map_viruses.py" ]
[ "#!/usr/bin/python\n\"\"\"Wrapper script to align FASTQ file(s) against a set of viral genomes.\"\"\"\n\nimport os\nimport uuid\nimport time\nimport shutil\nimport logging\nimport argparse\nimport pandas as pd\nfrom lib.exec_helpers import align_reads\nfrom lib.exec_helpers import return_results\nfrom lib.exec_help...
[ [ "pandas.read_table" ] ]
shashanksira13/ITSP
[ "7fba20d04c327c5cbc276b89e32d949a61ffed48" ]
[ "MIL Simulation/image_gen.py" ]
[ "def image_generate():\r\n #This function doesn't have any parameter the input file from which the acceleration values are taken is called \r\n #'acc.csv'\r\n #Here t is the smapling time \r\n #The created images are saved by the name 'image_<num>.jpeg' where num is the serial number corresponding to th...
[ [ "numpy.asarray", "numpy.zeros", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.axis", "matplotlib.pyplot.imread" ] ]
dianjixz/AutoDL
[ "48db4eb04d55ce69e93d4a3bdc24592bdb34a868" ]
[ "AutoDL_sample_code_submission/at_nlp/run_model.py" ]
[ "import numpy as np\nimport math\nimport gc\n\nimport tensorflow as tf\nfrom keras import backend as K\nfrom keras.preprocessing import sequence\nfrom keras.callbacks import EarlyStopping, LearningRateScheduler\n\nfrom at_toolkit.at_utils import autodl_nlp_install_download\n\nautodl_nlp_install_download()\n\nfrom l...
[ [ "numpy.concatenate", "numpy.max", "numpy.array", "tensorflow.Session", "numpy.mean", "tensorflow.ConfigProto" ] ]
virati/SCC_Readout
[ "9d72a8cf34f437259a3db2c49a2e4d2032422af3" ]
[ "temp_BS.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Jul 8 13:42:23 2020\n\n@author: virati\n\"\"\"\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n# returns 10 evenly spaced samples from 0.1 to 2*PI\nx = np.linspace(0.1, 2 * np.pi, 10)\n\nmarkerline, stemlines, baseline = plt.stem(x,...
[ [ "matplotlib.pyplot.show", "numpy.linspace", "matplotlib.pyplot.setp", "numpy.cos" ] ]
Mlak300/KeyMessages
[ "f7785f768f471b406d9c0dd3d3b1cf6585a6c43a" ]
[ "main_detect.py" ]
[ "import time\r\nfrom absl import app, flags, logging\r\nfrom absl.flags import FLAGS\r\nimport cv2\r\nimport numpy as np\r\nimport tensorflow as tf\r\nimport glob\r\n# from yolov3_tf2.models import (\r\n# \tYoloV3, YoloV3Tiny\r\n# )\r\n# from yolov3_tf2.dataset import transform_images\r\nfrom yolov3_tf2.dataset imp...
[ [ "tensorflow.saved_model.load", "tensorflow.expand_dims" ] ]
ananyaks/data_model
[ "ab3a827864e36e105bbb3fb50744e0f7ce046148" ]
[ "benchmark/postgres/util.py" ]
[ "#!/usr/bin/env python3\n\nimport os\nimport time\nimport yaml\nimport json\n\nimport numpy as np\nfrom resource import getrusage as resource_usage, RUSAGE_SELF\nfrom time import time as timestamp\n\npath_join = os.path.join\n\n_dir = os.path.dirname(os.path.realpath(__file__))\nworkload_dir = path_join(_dir, \"..\...
[ [ "numpy.mean" ] ]
Dora-The-Kid/culture_network_0
[ "ac3c3d2e0528f341fd50354300008c43df56e984" ]
[ "test_10_13.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nfrom scipy import stats\nimport math\nimport pandas as pd\ndata_1 = np.array([260925,296296,299490])\ndata_2 = np.array([356846,338160,292290])\ndata = [\n [260925,296296,299490],\n [356846,338160,292290]\n]\ndata = np.array(data)\ndf = pd.DataFrame(data.T...
[ [ "numpy.array", "matplotlib.pyplot.annotate", "pandas.DataFrame", "scipy.stats.ttest_ind", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "scipy.stats.levene", "matplotlib.pyplot.figure", "numpy.ones", "numpy.arange", "matplotlib.pyplot.show" ] ]
koukyo1994/pattern_recognition
[ "0bf835b98baa66cdb78aa46c677b8de91790a767" ]
[ "RL/openai/cartpole/util.py" ]
[ "import numpy as np\n\n\ndef discount_rewards(rewards, discount_rate):\n discounted_rewards = np.empty(len(rewards))\n cumulative_rewards = 0\n for step in reversed(range(len(rewards))):\n cumulative_rewards = rewards[step] + cumulative_rewards * discount_rate\n discounted_rewards[step] = cum...
[ [ "numpy.concatenate" ] ]
U0M0Z/tgpipe
[ "436b8166858f80d59dfedc07769ea1f5b0278423" ]
[ "tgboost/predict.py" ]
[ "import typing as t\n\nimport numpy as np\nimport pandas as pd # type: ignore\n\nfrom tgboost import __version__ as _version\nfrom tgboost.config.core import config\nfrom tgboost.processing.data_manager import load_pipeline\nfrom tgboost.processing.smiles_manager import SmilesEmbedder, SmilesWrapper\nfrom tgboost....
[ [ "pandas.DataFrame" ] ]
juhi24/radcomp
[ "ccb727e4fa516ae708362ed1b05335de92f8c7fd", "ccb727e4fa516ae708362ed1b05335de92f8c7fd" ]
[ "scripts/vertical/scr_store_pluvio.py", "scripts/misc/scr_fix_rhi.py" ]
[ "# coding: utf-8\n\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport baecc.instruments.pluvio as pl\nfrom os import path\nfrom glob import glob\nfrom warnings import warn\nfrom datetime import datetime, timedelta\nfrom radcomp import CACHE_TMP_DIR\nfrom radcomp.vertical import case, classification, plot...
[ [ "pandas.concat", "matplotlib.pyplot.close", "pandas.read_hdf", "pandas.Series", "matplotlib.pyplot.ioff", "pandas.read_csv" ], [ "matplotlib.pyplot.subplots" ] ]
gsalinaslopez/MagRSS
[ "615a6649572b044973f753d704d706d66ae12026" ]
[ "tf/nn/bpnn_2.py" ]
[ "from __future__ import absolute_import, division, print_function, unicode_literals\n\n# TensorFlow and tf.keras\nimport tensorflow as tf\nfrom tensorflow import keras\nfrom tensorflow import feature_column\nfrom tensorflow.keras import layers\nfrom sklearn.model_selection import train_test_split\n\n\n# Helper libr...
[ [ "tensorflow.keras.layers.DenseFeatures", "tensorflow.keras.optimizers.schedules.InverseTimeDecay", "sklearn.model_selection.train_test_split", "pandas.read_csv", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.callbacks.EarlyStopping" ] ]
chiccheung/PRD_rPPG_method_3DCNN
[ "c2da5c523dc960644b444c14b1417a8ec86eba25" ]
[ "pyVHR/pyVHR/analysis/stats.py" ]
[ "import pandas as pd\nimport numpy as np\nimport os\nimport re \nimport matplotlib.pyplot as plt\nimport plotly.graph_objects as go\nimport scipy.stats as ss\nimport scikit_posthocs as sp\nfrom .stattests import friedman_aligned_ranks_test as ft\nimport Orange\n\nclass StatAnalysis():\n \"\"\" Statistics analysi...
[ [ "scipy.stats.iqr", "numpy.divide", "numpy.array", "numpy.max", "numpy.savetxt", "numpy.argmin", "numpy.median", "matplotlib.pyplot.savefig", "pandas.DataFrame", "matplotlib.pyplot.title", "numpy.mean", "matplotlib.pyplot.figure", "pandas.read_hdf", "numpy.ar...
mhauru/Gilt-TNR
[ "73c288d8f9a60d9cd7bdc2bda071ff536c7448cf" ]
[ "GiltTNR3D_envspec.py" ]
[ "import numpy as np\nimport sys\nimport os\nimport warnings\nimport logging\nimport logging.config\nimport configparser\nimport datetime\nimport GiltTNR3D\nfrom tntools import datadispenser, multilineformatter\nfrom tntools.yaml_config_parser import parse_argv\n\ntools_path = os.path.dirname(multilineformatter.__fi...
[ [ "numpy.set_printoptions" ] ]
programmer1017/python
[ "3dce528be121ced032157c9d800b4770989889bf" ]
[ "matplotlib/legend/legend2.py" ]
[ "import matplotlib.pyplot as plt\n\nplt.plot([1, 2, 3, 4], [2, 3, 5, 10], label='Price ($)') # 그래프 1\nplt.plot([1, 2, 3, 4], [3, 5, 9, 7], label='Demand (#)') # 그래프 2\n\nplt.xlabel('X-Axis', labelpad = 10)\nplt.ylabel('Y-Axis')\n\n# plt.legend(loc='best',ncol = 1)\nplt.legend(loc='best', ncol = 2, fontsize = 10, fr...
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show" ] ]
tangchunbo/machine-learning
[ "22f289d30d456d5d220bb34d846a61d6fa0fe81e" ]
[ "ml/linearRegression/RegressionMetrics.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn import datasets\nfrom SimpleLinearRegression1 import SimpleLinearRegression2\nfrom model_selection import train_test_split\nfrom math import sqrt\n# scikit-learn 中的指标\nfrom sklearn.metrics import mean_squared_error, mean_absolute_error\n\n# boston 房...
[ [ "sklearn.metrics.mean_squared_error", "numpy.sum", "sklearn.metrics.mean_absolute_error", "matplotlib.pyplot.show", "numpy.absolute", "matplotlib.pyplot.scatter", "sklearn.datasets.load_boston" ] ]
erezposner/pytorch-CycleGAN-and-pix2pix
[ "842873a541dbc945f050515a3f39bc9029cf7701" ]
[ "models/separated_cg_model.py" ]
[ "import torch\nfrom pytorch3d.io import load_objs_as_meshes, save_obj\nfrom pytorch3d.renderer import MeshRenderer, MeshRasterizer, PointLights, TexturedSoftPhongShader, \\\n look_at_view_transform, OpenGLPerspectiveCameras, RasterizationSettings, BlendParams, DirectionalLights, Materials, \\\n SoftSilhouette...
[ [ "torch.nn.NLLLoss", "torch.zeros", "torch.cat", "numpy.array", "torch.arange", "torch.nn.functional.interpolate", "torch.no_grad", "numpy.load", "torch.nn.L1Loss", "torch.sum", "torch.tensor", "torch.nn.BCELoss", "matplotlib.pyplot.show", "torch.log", "t...
farhadmfar/ace
[ "c4fe4d4d9328a18b5c1ddcc79218605251520bf2" ]
[ "src/prepare_vocab.py" ]
[ "\"\"\"\r\nPrepare vocabulary and initial word vectors.\r\n\"\"\"\r\nimport json\r\nimport pickle\r\nimport argparse\r\nimport numpy as np\r\nfrom collections import Counter\r\n\r\nfrom utils import helper, vocab, constant\r\n\r\ndef parse_args():\r\n parser = argparse.ArgumentParser(description='Prepare vocab f...
[ [ "numpy.save" ] ]
materialvision/data-efficient-gans
[ "eb1b2287a13952f23d6611709953fadfc539e9ab" ]
[ "DiffAugment-stylegan2/project_images.py" ]
[ "import argparse\nimport os\nimport shutil\nimport numpy as np\n\nimport dnnlib\nimport dnnlib.tflib as tflib\nimport pretrained_networks\nimport projector\nimport dataset_tool\nfrom training import dataset\nfrom training import misc\n\n\ndef project_image(proj, src_file, dst_dir, tmp_dir, video=False):\n\n data...
[ [ "numpy.array", "numpy.ceil" ] ]
wen-zhi/hashing
[ "c7e6a54f870d4a49d2e40ce7c53e1b160acd478d" ]
[ "hashing/dataset.py" ]
[ "import numpy as np\n\n\ndef load_mnist_gist(root):\n \"\"\"load 512D GIST descriptor of MNIST and split it.\n\n query: 100 per class (total: 1000)\n train: 600 per class (total: 6000)\n database: 6900 (in average) per class (total: 69000)\n\n # Parameter...
[ [ "numpy.random.permutation", "numpy.load", "numpy.flatnonzero" ] ]
asceenl/lasp
[ "7cc77b073a91eb7470b449604544d9f57faf32e9" ]
[ "test/benchmark.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Jan 15 19:45:33 2018\n\n@author: anne\n\"\"\"\nfrom pycallgraph import PyCallGraph\nfrom pycallgraph.output import GraphvizOutput\n\nimport numpy as np\nfrom beamforming import Fft\n\nnfft=2**17\n\nprint('nfft:',nfft)\nnchannels = 50\nnumber_ru...
[ [ "numpy.linspace", "numpy.fft.rfft", "numpy.random.randn" ] ]
duchesneaumathieu/loader
[ "4725a816588bc33827360aa94c108ec4e2b4649d" ]
[ "Classification/Mnist.py" ]
[ "import numpy as np\nimport pickle\nimport gzip\nimport os\n\nimport loader\nfrom loader.AbstractLoader import AbstractLoader\n\nclass Mnist(AbstractLoader):\n def __init__(self, name='Mnist', img=False, **kwargs):\n super(Mnist, self).__init__(name=name, **kwargs)\n \n self.path = os.path.j...
[ [ "numpy.random.seed", "numpy.array" ] ]
denimalpaca/great_expectations
[ "0f28f3c2b3cc6fae3bc5d257c6d4d13dbcf37df0" ]
[ "tests/test_utils.py" ]
[ "import logging\nimport os\nimport uuid\nfrom contextlib import contextmanager\nfrom pathlib import Path\nfrom typing import Generator, List, Union, cast\n\nimport numpy as np\nimport pandas as pd\nimport pytest\n\nlogger = logging.getLogger(__name__)\n\ntry:\n import sqlalchemy as sa\n from sqlalchemy.exc im...
[ [ "pandas.read_csv" ] ]
jcdupuis-ulaval/gigul-pxrf-tools
[ "72bc7d6e29b89a2af43c6ecd006054c2fd509f43" ]
[ "proc/remove-background.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Tue Apr 7 13:44:00 2020\r\n\r\n@author: chdup58\r\n\"\"\"\r\n\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport gigul_pxrf_tools as gigul\r\n\r\n# File setup for data and results################################\r\nfname ='TDCAEXD332727z'\r\nddir = '...
[ [ "numpy.sum", "numpy.genfromtxt" ] ]
CARMinesDouai/MutiRobotExplorationPackages
[ "725f36eaa22adb33be7f5961db1a0f8e50fdadbd" ]
[ "noisy_odometry/scripts/view_distribution.py" ]
[ "from math import *\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\n# 20cm translation distance\ndx=0.2\ndy=0.35\ntrans = sqrt(dx*dx + dy*dy)\n# rotation1 = 30 degree\ntheta1 = 30.0*pi/180.0\n# rotation2 = 45 degree\ntheta2 = 10.0*pi/180.0\n\nrot1 = atan2(dy, dx) - theta1\nrot2 = theta2-the...
[ [ "matplotlib.pyplot.show", "numpy.random.normal", "matplotlib.pyplot.subplots" ] ]
MikeDepies/NeatKotlin
[ "5059f9c5754a159ad49997c70a466ffa9840e10b" ]
[ "mario/NeatNetwork.py" ]
[ "from collections import defaultdict\n\nimport json\nimport math\nimport enum\nfrom time import sleep\nimport networkx as nx\nimport numpy as np\nfrom typing import Dict, List, Set, Tuple\nfrom networkx.algorithms.dag import descendants\nfrom numpy import ndarray, vectorize\n\n\ndef sigmoidal(x: float):\n # prin...
[ [ "numpy.vectorize", "numpy.zeros" ] ]
sarvai/proposals
[ "578c0094db52594cd85acb843df82fe3c19db46d" ]
[ "codes/deeplearning/data/datasets/coco_dataset.py" ]
[ "import numpy as np\nfrom .dataset import dataset\nfrom ..image import coco_image\n\nclass coco_dataset( dataset ):\n def __init__( self, cfg, cls, part, img_type=coco_image ):\n super().__init__( cfg, img_type )\n\n self._dset_tag = 'coco_%s_%s' % ( cls, part )\n\n c = cls[:2]\n if p...
[ [ "numpy.where" ] ]
veritaem/RL_udemy
[ "f817be686b85406fbddd961441c4970bf8b05045" ]
[ "DDPGHelpers.py" ]
[ "import numpy as np\r\n\r\nclass OUActionNoise():\r\n def __init__(self, mu, sigma=.15, theta=.2, dt=1e-2, x0=None):\r\n self.theta = theta\r\n self.mu = mu\r\n self.sigma = sigma\r\n self.dt = dt\r\n self.x0=x0\r\n self.reset()\r\n\r\n def __call__(self):\r\n ...
[ [ "numpy.random.normal", "numpy.random.choice", "numpy.zeros", "numpy.zeroes", "numpy.sqrt" ] ]
YouthJourney/Deep-Learning-For-Image-Process
[ "2d5f273baa73882f6ec61e13cc4ffca32b228657" ]
[ "Pytorch_Classification/Pytorch_VGG/predict.py" ]
[ "# -*- coding: UTF-8 -*-\r\n\"\"\"\r\nAuthor: LGD\r\nFileName: predict\r\nDateTime: 2021/1/26 15:36 \r\nSoftWare: PyCharm\r\n\"\"\"\r\nimport torch\r\nfrom Pytorch_VGG.model import vgg\r\nfrom torchvision import transforms\r\nimport matplotlib.pyplot as plt\r\nimport json\r\nfrom PIL import Image\r\n\r\ndata_transf...
[ [ "torch.no_grad", "torch.softmax", "torch.unsqueeze", "torch.load", "matplotlib.pyplot.show", "torch.argmax", "matplotlib.pyplot.imshow" ] ]
adriaanph/katdal
[ "a3d01a08c5e74b6143caef02e499f2073056acd7" ]
[ "katdal/ms_extra.py" ]
[ "################################################################################\n# Copyright (c) 2011-2019, National Research Foundation (Square Kilometre Array)\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use\n# this file except in compliance with the License. You may obtain a co...
[ [ "numpy.full", "numpy.zeros_like", "numpy.ones_like", "numpy.array", "numpy.asarray", "numpy.zeros", "numpy.product", "numpy.ones", "numpy.tile", "numpy.eye", "numpy.float64", "numpy.iscomplexobj", "numpy.arange", "numpy.atleast_1d", "numpy.repeat", "...
Kh4L/gluon-cv
[ "849411ed56632cd854850b07142087d599f97dcb" ]
[ "gluoncv/model_zoo/center_net/deconv_dla.py" ]
[ "\"\"\"DLA network with Deconvolution layers for CenterNet object detection.\"\"\"\n# pylint: disable=arguments-differ,unused-argument\nfrom __future__ import absolute_import\n\nimport warnings\n\nimport numpy as np\nfrom mxnet.context import cpu\nfrom mxnet.gluon import nn\nfrom mxnet.gluon import contrib\nfrom . ...
[ [ "numpy.array", "numpy.log2" ] ]
abaisero/rl-psr
[ "ac3d1162f6629133b7f3f88a0d49e4f9fd6f2e69" ]
[ "rl_rpsr/value_function.py" ]
[ "from __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom typing import Iterable, List\n\nimport numpy as np\nimport yaml\n\n\n@dataclass\nclass Alpha(yaml.YAMLObject):\n yaml_tag = u'!Alpha'\n\n action: int\n vector: np.ndarray\n\n\nclass ValueFunction(yaml.YAMLObject):\n yaml_tag ...
[ [ "numpy.column_stack" ] ]
hamogu/specutils
[ "b873f2ac9b3c207c9e670246d102f46a9606d6ed" ]
[ "specutils/tests/test_slicing.py" ]
[ "import astropy.units as u\nimport astropy.wcs as fitswcs\nimport numpy as np\nfrom numpy.testing import assert_allclose\n\nfrom ..spectra.spectrum1d import Spectrum1D\n\n\ndef test_spectral_axes():\n spec1 = Spectrum1D(spectral_axis=np.arange(1, 50) * u.nm,\n flux=np.random.sample(49) * 10...
[ [ "numpy.array", "numpy.random.sample", "numpy.arange" ] ]
AAbdul12/Data-engineering-nanodegree
[ "794c57a52f79ceeb4201e408c8bad10fa76a9896" ]
[ "2_dend_cloud_data_warehouses/infrastructure_as_code.py" ]
[ "import pandas as pd \nimport boto3\nimport json\n\nfrom botocore.exceptions import ClientError\nimport configparser\n\n\nconfig = configparser.ConfigParser()\nconfig.read_file(open('/home/f.silvestre/Documents/Projects/Data-engineering-nanodegree/2_dend_cloud_data_warehouses/dhw.cfg'))\n\nKEY = ...
[ [ "pandas.DataFrame", "pandas.set_option" ] ]
marlesson/recsys-fair-metrics
[ "82c0a18486455718558fbd783e0bd3bf14d8bc67" ]
[ "recsys_fair_metrics/fairness/disparate_treatment.py" ]
[ "import pandas as pd\nimport numpy as np\n\nnp.seterr(divide=\"ignore\", invalid=\"ignore\")\nfrom typing import List, Dict, Any\nfrom sklearn.metrics import confusion_matrix\nfrom scipy.stats import norm\nfrom recsys_fair_metrics.util.util import mean_confidence_interval\nimport plotly.figure_factory as ff\nimport...
[ [ "numpy.max", "numpy.seterr", "numpy.arange", "numpy.sort", "scipy.stats.ks_2samp", "numpy.unique" ] ]
Elysium-Pool/torrent-transfer-logger
[ "4d9dc2f3197db5727eada9a07d26b9f5c0834a26" ]
[ "log_transfers.py" ]
[ "#!/usr/bin/env python3\n\n# When run, this script logs the peers for each torrent in qBittorrent to a sqlite database. It is useful for performing analytics on download progress and total number of downloads of other peers for torrents you are seeding/downloading.\n# Run this script in a cronjob or similar minutel...
[ [ "pandas.DataFrame" ] ]
mikessut/pandas
[ "4aa0783d65dc20dc450ef3f58defda14ebab5f6f" ]
[ "pandas/io/excel/_base.py" ]
[ "import abc\nimport datetime\nfrom io import BufferedIOBase, BytesIO, RawIOBase\nimport os\nfrom textwrap import fill\nfrom typing import Any, Mapping, Union\n\nfrom pandas._config import config\n\nfrom pandas._libs.parsers import STR_NA_VALUES\nfrom pandas._typing import StorageOptions\nfrom pandas.errors import E...
[ [ "pandas.io.excel._util.get_writer", "pandas.io.common.IOArgs", "pandas.io.parsers.TextParser", "pandas.io.common.urlopen", "pandas.io.common.validate_header_arg", "pandas.io.excel._util.maybe_convert_usecols", "pandas.util._decorators.deprecate_nonkeyword_arguments", "pandas.core.d...
intheon/stream_viewer
[ "386b9e27d5cd7e66eece0dc2e4977e917ef94877" ]
[ "stream_viewer/applications/minimal_markers.py" ]
[ "# Copyright (C) 2014-2021 Syntrogi Inc dba Intheon. All rights reserved.\n\n\"\"\"\nThis script is a minimal example of a basic marker presentation application.\nIt's so minimal that it doesn't even use any stream_viewer modules!\nThis example displays markers in a text window.\nThe markers can come from a provid...
[ [ "numpy.array", "numpy.random.rand" ] ]
Minsoo2022/DeepHuman
[ "46ca0916d4531cf111c3a0d334d73d59773f0474" ]
[ "TrainingDataPreparation/ObjIO.py" ]
[ "from __future__ import print_function, absolute_import, division\nimport numpy as np\n\n\ndef load_obj_data(filename):\n \"\"\"load model data from .obj file\"\"\"\n v_list = [] # vertex coordinate\n vt_list = [] # vertex texture coordinate\n vc_list = [] # vertex color\n vn_list = [] # vertex n...
[ [ "numpy.copy", "numpy.asarray" ] ]
MishaRubanov/SchulmanLab
[ "edb9249e5cee75211a2b8da2e0d57ae5287f9131" ]
[ "GeneletModel-Python/supp_figure36_IFFL1_2_leak.py" ]
[ "import numpy as np \r\nimport matplotlib.pyplot as plt\r\nimport GeneralGeneletModel as GGM\r\n\r\n''' \r\n###############################################################################\r\nSupplementary Figure 36\r\nThis simulates an extended IFFL where an upstream genelet produces the coactivator\r\nof the first...
[ [ "numpy.array", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.suptitle", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.yticks", "matplotlib.pyplot.figure", "numpy.linspace", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.gca", "matplotlib.pyplo...
acumos/acumos-onnx-client
[ "8cc7f29b369e84268fb17c007127d12409685d8c" ]
[ "acumos-package/onnx4acumos/FilledClientSkeletonsExamples/Iris_Model_OnnxClient.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue May 26 10:55:11 2020\n\n@author: Bruno Lozach OrangeFrance/TGI/OLS/SOFT_LANNION\n\"\"\"\n# Some standard imports\nimport io\nimport os\nfrom sys import argv\nimport re\nimport requests\nimport numpy as np\n\n# acumos import\nfrom acumos.modeli...
[ [ "numpy.array" ] ]
ekellbuch/ibllib
[ "6948f86c3f426cbebb39cc693f612d25079d7ef2" ]
[ "ibllib/io/extractors/training_audio.py" ]
[ "#!/usr/bin/env python\n# -*- coding:utf-8 -*-\nfrom pathlib import Path\nimport logging\n\nimport numpy as np\nfrom scipy import signal\nfrom scipy.io import wavfile\n\nfrom ibllib import dsp\nfrom ibllib.misc import log2session_static\nimport ibllib.io.raw_data_loaders as ioraw\nimport ibllib.io.extractors.traini...
[ [ "numpy.delete", "scipy.io.wavfile.read", "numpy.array", "numpy.median", "numpy.save", "numpy.diff", "numpy.float64", "numpy.std", "numpy.sqrt", "scipy.signal.welch", "numpy.log10", "numpy.insert" ] ]
schuetzepaul/allpix-squared
[ "737eba52fe13f56134c4e88a7928d1a5103dd40a" ]
[ "tools/root_analysis_macros/display_mc_hits.py" ]
[ "# Create Plots to visualize MC Data from Allpix Squared\n\n# ===TO DO== #\n# Create Batch processing for multiple detectors\n\n# ROOT imports\nimport ROOT\nfrom ROOT import TFile, gDirectory, gSystem, TClass\n\nimport os, sys\nimport argparse\nimport os.path as path\n\n# numpy\nimport numpy as np\nimport numpy.ma ...
[ [ "scipy.stats.norm.pdf", "matplotlib.cm.jet._segmentdata.copy", "numpy.max", "matplotlib.pyplot.colorbar", "scipy.stats.binned_statistic_2d", "matplotlib.pyplot.yscale", "scipy.stats.cauchy.pdf", "matplotlib.use", "matplotlib.pyplot.pcolormesh", "matplotlib.pyplot.title", ...
Seizzzz/DailyCodes
[ "9a617fb64ee27b9f254be161850e9c9a61747cb1" ]
[ "Course 202009/Python/Visualize/4.py" ]
[ "import numpy as np\nfrom matplotlib import pyplot as plt\n\nx = np.linspace(-5 * np.pi, 5 * np.pi, 500)\ny1 = 3 * np.cos(x)\ny2 = np.sin(4*x)\n\nfig, ax = plt.subplots()\nplt.style.use('classic')\n\nax.spines[\"right\"].set_visible(False)\nax.spines[\"top\"].set_visible(False)\nax.spines['bottom'].set_position(('d...
[ [ "numpy.sin", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.subplots", "matplotlib.pyplot.style.use", "numpy.cos", "matplotlib.pyplot.show", "numpy.linspace" ] ]
SAFedorov/bfieldtools
[ "7e64bc2033670f01d2b90df2210b60743731a948" ]
[ "bfieldtools/sphtools.py" ]
[ "\"\"\"\nFunctions for constructing real spherical harmonics (Ylms), their gradients\nand related magnetic field 'basis vectorfunctions'\n(Wlms for r**l components, Vlms for r**(-l) components).\n\nUses notations and definitions by Plattner and Simons (2014; https://arxiv.org/pdf/1306.3201.pdf)\nand the same normal...
[ [ "numpy.isinf", "numpy.array", "numpy.sin", "numpy.meshgrid", "numpy.reshape", "numpy.zeros", "numpy.sum", "numpy.mean", "numpy.transpose", "numpy.arctan2", "numpy.cos", "numpy.sqrt", "scipy.special.lpmn", "numpy.moveaxis", "numpy.linspace", "numpy.ab...
vrautela/treadmill
[ "05e47fa8acdf8bad7af78e737efb26ea6488de82" ]
[ "lib/python/treadmill/cli/scheduler/servers.py" ]
[ "\"\"\"Show servers report.\"\"\"\n\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport click\nimport pandas as pd\n\nfrom treadmill import cli\nfrom treadmill.cli.scheduler import fetch_report, print_re...
[ [ "pandas.to_datetime" ] ]
OMcBrien/imsu
[ "5a060f304a4308d55d7d8c4fc6d3f52e17487e48" ]
[ "imsu/population_generator.py" ]
[ "import sncosmo\nimport random\nimport math\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport matplotlib.path as mpltPath\nimport time\n\n## LAST MODIFIED : April 15, 2013\n## CREATED : April 15, 2013\n## AUTHOR : DRYX\ndef redshift2distance(z):\n \"\"\"Convert a redshift to various...
[ [ "matplotlib.path.Path", "numpy.array", "numpy.sin", "matplotlib.pyplot.figure", "numpy.arange", "numpy.cos", "numpy.append", "matplotlib.pyplot.show", "numpy.linspace", "matplotlib.pyplot.subplot" ] ]
bjodah/symvarsub
[ "aebbd3aabdc9f8c345c5892f5d3a0beebbbf906d" ]
[ "symvarsub/numtransform/numtransform.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"\nLightning fast binary callbacks using F90 for array expressions\n\"\"\"\n\nimport os\nimport sysconfig\nfrom collections import defaultdict\n\nimport sympy\nfrom sympy.core.compatibility import iterable\nimport numpy as np\nfrom pycompilation import import_module_from_file, FileN...
[ [ "numpy.array" ] ]
az85252/DataProfiler
[ "1303abe04b48fa87c67d8d9b3a13f8cb88e79afb" ]
[ "dataprofiler/tests/labelers/test_integration_struct_data_labeler.py" ]
[ "import os\nimport unittest\n\nimport numpy as np\nimport pandas as pd\n\nimport dataprofiler as dp\n\n\nclass TestStructuredDataLabeler(unittest.TestCase):\n\n @classmethod\n def setUpClass(cls) -> None:\n num_repeat_data = 50\n cls.data = np.array(\n [['123 Fake St.', '1/2/2020', 'n...
[ [ "pandas.DataFrame", "numpy.array" ] ]
natethinks/cherry
[ "a482621a3e397f6667f21e16d5ec0eb12c7fc4fb" ]
[ "cherry/performance.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"\ncherry.performance\n~~~~~~~~~~~~\nThis module implements the cherry performance.\n:copyright: (c) 2018-2019 by Windson Yang\n:license: MIT License, see LICENSE for more details.\n\"\"\"\n\nimport numpy as np\nfrom sklearn.model_selection import KFold\nfrom sklearn.pipeline import...
[ [ "sklearn.metrics.classification_report", "sklearn.pipeline.Pipeline", "sklearn.model_selection.KFold" ] ]
akhan118/Self-learing-quant
[ "81d5fc5af510e8d878b33a4c3c1e923b73092d26" ]
[ "openGYM.py" ]
[ "import gym ,sys,numpy as np\nimport numpy as np\nnp.random.seed(1335) # for reproducibility\nnp.set_printoptions(precision=5, suppress=True, linewidth=150)\n\nimport pandas as pd\nimport backtest as twp\nfrom matplotlib import pyplot as plt\nfrom sklearn import metrics, preprocessing\nfrom talib.abstract import *...
[ [ "numpy.random.seed", "numpy.set_printoptions", "numpy.array", "sklearn.preprocessing.StandardScaler" ] ]
yghlc/CSF
[ "d42ac9784a7326bc3d0ecbd5931e1f8326198352" ]
[ "install-python-demo/demo_tif.py" ]
[ "#!/usr/bin/env python\n# Filename: demo_tif.py \n\"\"\"\nintroduction: run a demo: applying CSF to digital surface model in GeoTiff.\n\nauthors: Huang Lingcao\nemail:huanglingcao@gmail.com\nadd time: 22 February, 2022\n\"\"\"\n\nimport os,sys\n# deeplabforRS = os.path.expanduser('~/codes/PycharmProjects/Deeplabfo...
[ [ "numpy.vstack" ] ]
LoicDagnas/models
[ "9cd7a576be6e80d13c2bc613ddd4004b05e95f27" ]
[ "official/vision/beta/projects/yolo/tasks/yolo.py" ]
[ "# Copyright 2021 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.shape", "tensorflow.train.latest_checkpoint", "tensorflow.GradientTape", "tensorflow.expand_dims", "tensorflow.io.gfile.isdir", "tensorflow.cast", "tensorflow.keras.layers.InputSpec", "tensorflow.keras.regularizers.l2", "tensorflow.tile", "tensorflow.train.Check...
rikichou/mmpose
[ "d1d23325f6d17d2888b45a34e1d8c1e18c878d1f" ]
[ "mmpose/models/backbones/resnet_tiny.py" ]
[ "import torch.nn as nn\nfrom mmcv.cnn import build_conv_layer, build_norm_layer\n\nfrom ..builder import BACKBONES\nfrom .resnet import ResNet,ResNetSimple\n\n@BACKBONES.register_module()\nclass ResNet_Tiny(ResNetSimple):\n \"\"\"ResNet backbone for CIFAR.\n\n Compared to standard ResNet, it uses `kernel_size...
[ [ "torch.nn.ReLU" ] ]
comp-neural-circuits/tctx
[ "4fcd1a195a64015e777e55f582e8df35c4913993" ]
[ "tctx/networks/base.py" ]
[ "\"\"\"\n Code to support the creation of network instances.\n\"\"\"\nimport logging\n\nfrom tctx.util import sim_nest\nimport nest\nimport numpy as np\nimport pandas as pd\n\nfrom tctx.util.profiling import log_time\nimport tctx.util.networks\n\n\nclass NetworkInstance(tctx.util.networks.NetworkInstance):\n ...
[ [ "numpy.concatenate", "numpy.max", "numpy.count_nonzero", "numpy.zeros", "numpy.round", "numpy.ones", "numpy.min", "numpy.abs", "pandas.concat", "pandas.Series" ] ]
Mirotivo/biovid
[ "4cc4b1d2afd3f37224c74fe982d67aee99b81dc0" ]
[ "DataPreparation/2.B ECG Filter.py" ]
[ "##################Signal Characteristics###########################\nimport pandas as pd\nSignals = pd.read_csv('Signals/071309_w_21-BL1-081_bio.csv',sep = \t'\t').iloc[:,:].values\nSignals_Filtered = pd.read_csv('Signals/071309_w_21-BL1-081_bio.csv',sep = \t'\t').iloc[:,:].values\n\n\nN = len(Signals[:,0]) ...
[ [ "scipy.signal.lfilter", "pandas.read_csv", "numpy.sqrt", "matplotlib.pyplot.gca", "matplotlib.pyplot.subplots_adjust", "matplotlib.pyplot.subplot", "matplotlib.pyplot.title", "matplotlib.ticker.FormatStrFormatter", "scipy.signal.freqz", "matplotlib.pyplot.show", "matplo...
kahnchana/Vesses
[ "beb7c64ce0d4ac943193fcef0c79b97eef7b362d" ]
[ "recognition/label_image.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\" \nCreated on Thu Feb 1 22:06:48 2018\n\n@author: kanchana\n\"\"\"\n\nimport os, sys\nimport tensorflow as tf\n\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'\n\n# change this as you see fit\nimage_path = sys.argv[1]\n\n# Read in the image_data\nimage_data = tf.gf...
[ [ "tensorflow.GraphDef", "tensorflow.Session", "tensorflow.import_graph_def", "tensorflow.gfile.GFile", "tensorflow.gfile.FastGFile" ] ]
ChristosChristofidis/h2o-3
[ "2a926c0950a98eff5a4c06aeaf0373e17176ecd8" ]
[ "h2o-py/tests/testdir_algos/glm/pyunit_wide_dataset_largeGLM.py" ]
[ "import sys\nsys.path.insert(1, \"../../../\")\nimport h2o\nimport numpy as np\n\ndef wide_dataset_large(ip,port):\n # Connect to h2o\n h2o.init(ip,port)\n\n print(\"Reading in Arcene training data for binomial modeling.\")\n trainDataResponse = np.genfromtxt(h2o.locate(\"smalldata/arcene/arcene_train_l...
[ [ "numpy.where", "numpy.column_stack" ] ]
machinelearning147/decision-forests
[ "e2e2c3f8f1c270a23ac97a6833f84a28ec99c51e" ]
[ "tensorflow_decision_forests/keras/keras_test.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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed...
[ [ "tensorflow.TensorSpec", "tensorflow.data.TFRecordDataset", "tensorflow.data.Dataset.from_tensor_slices", "numpy.minimum", "pandas.DataFrame", "tensorflow.feature_column.categorical_column_with_vocabulary_list", "tensorflow.io.FixedLenFeature", "tensorflow.feature_column.indicator_...
dattasiddhartha/GIFShop-Wizard
[ "a3e9ba198b3bdc6645e53e0d652430534c362442" ]
[ "vision/foreground_removal/image_inpainting.py" ]
[ "import tensorflow as tf\nphysical_devices = tf.config.experimental.list_physical_devices('GPU')\ntf.config.experimental.set_memory_growth(physical_devices[0], True)\nfrom absl import flags, app\nfrom absl.flags import FLAGS\nfrom vision.foreground_removal.pix2pix.utils.model import Pix2Pix\nfrom vision.foreground_...
[ [ "tensorflow.config.experimental.list_physical_devices", "tensorflow.config.experimental.set_memory_growth" ] ]
jedludlow/tolerance_interval_py
[ "cf3ecd1e2f9b870de3e71bc92e07e6394510c001" ]
[ "tests/test_oneside_nonparmetric.py" ]
[ "# -- coding: utf-8 --\nimport numpy as np\nfrom toleranceinterval.oneside import non_parametric\nimport unittest\n\n\nclass TestEverything(unittest.TestCase):\n\n # Tabuluar values from Table J11 from:\n # Meeker, W.Q., Hahn, G.J. and Escobar, L.A., 2017. Statistical intervals:\n # A guide for practitione...
[ [ "numpy.array", "numpy.isnan", "numpy.random.seed", "numpy.arange", "numpy.random.random" ] ]
dprada/OpenPharmacophore
[ "bfcf4bdafd586b27a48fd5d1f13614707b5e55a8" ]
[ "openpharmacophore/utils/direction_vector.py" ]
[ "import numpy as np\n\ndef donor_acceptor_direction_vector(molecule, feat_type, atom_indx, coords, conformer_idx):\n \"\"\"\n Compute the direction vector for an H bond donor or H bond acceptor feature \n\n Parameters\n ----------\n molecule : rdkit.Chem.rdchem.Mol\n Mo...
[ [ "numpy.cross", "numpy.zeros" ] ]
HinanawiTS/ECE-143-Project
[ "b23c85d4815943b284a4275f10f0a73f77d1c038" ]
[ "src/logistic_plus.py" ]
[ "import matplotlib\nimport pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.preprocessing import PolynomialFeatures\nfrom sklearn.pipeline import Pipeline\nfrom PlotPitch import draw_pitch\n#from sklearn.pipel...
[ [ "matplotlib.pyplot.colorbar", "numpy.arccos", "matplotlib.pyplot.contourf", "matplotlib.pyplot.contour", "pandas.qcut", "sklearn.preprocessing.PolynomialFeatures", "matplotlib.pyplot.title", "matplotlib.pyplot.subplots", "numpy.exp", "sklearn.linear_model.LogisticRegression...
samrobbins85/SM-AI_Search-Coursework
[ "4f7954b0c5c009ffb034037e0ea11429514d92ae" ]
[ "AlgBbasic.py" ]
[ "import os\nimport sys\nimport time\nimport random\nimport numpy as np\nimport collections\n\n\ndef read_file_into_string(input_file, from_ord, to_ord):\n # take a file \"input_file\", read it character by character, strip away all unwanted\n # characters with ord < \"from_ord\" and ord > \"to_ord\" and retur...
[ [ "numpy.full", "numpy.array", "numpy.asarray", "numpy.fill_diagonal", "numpy.argmin", "numpy.amin" ] ]
cjhillbrand/PyTradingBot
[ "aceb971c9630b2e3c8a68d912215ecc9e169b32d" ]
[ "LinReg.py" ]
[ "import pandas as pd\nimport numpy as np\n\nCEIL_PRICE = 40\nFLOOR_PRICE = 5\nSAMPLES = 500\nRANDOM_STATE = 42\nEPOCHS = 10\n\ndf = pd.read_csv('./data/russell_2000.csv')\nof_interest = df[(df['Price'] <= CEIL_PRICE) & (df['Price'] > FLOOR_PRICE)]\nof_interest = of_interest.sample(n=SAMPLES, random_state=RANDOM_STA...
[ [ "pandas.DataFrame", "pandas.read_csv", "pandas.merge", "numpy.random.random" ] ]
ocordeiro/pmdarima
[ "d0dadb42b631156367a8af71786d58d22c08ca4c" ]
[ "setup.py" ]
[ "# -*- coding: utf-8 -*-\n#\n# Author: Taylor Smith <taylor.smith@alkaline-ml.com>\n#\n# Setup the pmdarima module. This is heavily adapted from the scikit-learn\n# setup.py, since they have a similar package structure and build similar\n# Cython + C modules.\n\nimport sys\nimport os\nimport platform\nimport shutil...
[ [ "numpy.distutils.command.build_ext.build_ext.build_extensions", "numpy.distutils.misc_util.Configuration" ] ]
NREL/AEflow
[ "38d9e333f35bf0094993b96cd74391dad416245c" ]
[ "AEflow.py" ]
[ "import tensorflow as tf\nimport numpy as np\n\nclass AEflow:\n def __init__(self, x, status='full', reuse=False):\n '''\n Inputs:\n x: Input to the network. Depends on the given status\n Status: Which mode to run the model in\n Options:\n 'full': Input...
[ [ "tensorflow.nn.conv3d", "tensorflow.shape", "tensorflow.nn.leaky_relu", "tensorflow.nn.relu", "tensorflow.contrib.layers.xavier_initializer", "tensorflow.nn.conv3d_transpose", "tensorflow.variable_scope", "tensorflow.add", "tensorflow.reduce_mean", "tensorflow.get_collectio...
Rachit201/narknet
[ "87d7f7387f10a92c1df1daa5d5a8a366064a86c1" ]
[ "classify/video.py" ]
[ "#imports\n\nimport cv2\nimport numpy as np\nimport time\nimport sys\n\n#Load Yolo\nprint(\"Loading Model.....\")\nnet = cv2.dnn.readNet('../weights/yolov3.weights','../cfg/yolov3.cfg')\nclasses = []\n\nwith open('../dataset/coco.names','r') as f:\n\tclasses = [line.strip() for line in f.readlines()]\n\nlayer_names...
[ [ "numpy.argmax" ] ]
ShigekiKarita/tfd
[ "1ecd2b7306ee6e41f1805787b398da3bab816dd5" ]
[ "example/graph_import/graph_import.py" ]
[ "import tensorflow.compat.v1 as tf\n\nwith tf.Session() as sess:\n with open(\"add-d.bin\", \"rb\") as f:\n graph_def = tf.GraphDef()\n graph_def.ParseFromString(f.read())\n\n tf.import_graph_def(graph_def)\n graph = tf.get_default_graph()\n for op in graph.get_operations():\n print(op.name)\n\n a = g...
[ [ "tensorflow.compat.v1.Session", "tensorflow.compat.v1.get_default_graph", "tensorflow.compat.v1.import_graph_def", "tensorflow.compat.v1.GraphDef" ] ]
AvinoamCo/AvinoamSlime
[ "d53bc125b727c02df6c16eaa725987ee210eaa22" ]
[ "lib/BasicSlime.py" ]
[ "import numpy as np\n\n\nclass BasicSlime(object):\n \"\"\"\n This is the basic slime class.\n It includes the most basic features of slime\n \"\"\"\n\n def __init__(self, can_cyber=True):\n self.can_cyber = can_cyber\n self.is_cyber_unlocked = False\n\n def do(self, activity):\n ...
[ [ "numpy.deg2rad", "numpy.sin", "numpy.tan", "numpy.cos" ] ]
jwrr/python-stuff
[ "7be2a408b751fe6636537d478296350256e2f133" ]
[ "raw-img/raw-patgen.py" ]
[ "#!/usr/bin/env python3\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport sys\n\n\ndef get_args(required_num):\n scriptname = sys.argv[0]\n num_args = len(sys.argv) - 1\n if num_args < required_num:\n print(\"Example: {} width height bitwidth\".format(scriptname))\n sys.exit(1)\n return sy...
[ [ "numpy.empty", "numpy.zeros", "matplotlib.pyplot.subplots", "numpy.arange", "numpy.fromfile", "matplotlib.pyplot.show", "numpy.linspace", "numpy.vstack" ] ]
RafayAK/light-weight-refinenet
[ "18670c4177b91d53462b9dc30b78078b45d901ca" ]
[ "custom_aug.py" ]
[ "from abc import ABC\n\nimport matplotlib.pyplot as plt\nfrom PIL import Image\nimport numpy as np\nimport os\nimport random\nimport cv2\nimport albumentations as A\nfrom typing import Sequence, Dict, List, Callable, Any, Tuple\n\n\ndef change_background(img, msk, bg_path):\n # convert all values > 0 to 1 in the...
[ [ "numpy.array" ] ]
hebinalee/DreamAI_2020
[ "ec2d49bb3ec66626d6c6b1cc50a015aef5c1ac7f" ]
[ "audiodataset.py" ]
[ "###################################\n## LOAD AND PREPROCESS AUDIO DATA\n###################################\n\nimport os\nimport random\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data import Dataset\nimport glob\nimport numpy as np\nfrom util import read_filepaths\nfrom PIL import Image\nimport torchau...
[ [ "numpy.concatenate", "numpy.array", "numpy.sum", "torch.from_numpy", "torch.tensor", "sklearn.model_selection.train_test_split", "numpy.unique" ] ]
victorvg17/interpretable-reinforcement-learning-using-attention
[ "0f3ac27e10794ba5ea29eda27d83e4fb825eebf6" ]
[ "torchbeast/utils/conv_lstm.py" ]
[ "import torch\nimport torch.nn.functional as F\nfrom torch import nn\n\n\nclass ConvLSTMCell(nn.Module):\n def __init__(self, input_channels, hidden_channels, kernel_size):\n \"\"\"Initialize stateful ConvLSTM cell.\n\n Parameters\n ----------\n input_channels : ``int``\n N...
[ [ "torch.zeros", "torch.tanh", "torch.nn.Conv2d" ] ]
SimonCarozza/autoclf
[ "025bdc324c0c9ae064e88f229c3282125d92d185" ]
[ "examples/ottog_knc_exp.py" ]
[ "from sklearn.model_selection import StratifiedKFold\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.dummy import DummyClassifier\n\nfrom pandas import read_csv, DataFrame\nimport numpy as np\n\nimport os\nimport sys\nfrom autoclf import auto_utils as au\nfrom autoclf.classification import eval_utils as eu\nfr...
[ [ "numpy.random.seed", "pandas.read_csv", "sklearn.dummy.DummyClassifier", "sklearn.model_selection.StratifiedKFold" ] ]
yadupokhrel/Chaudhari_Amazon_Hydropower
[ "6ec80dca5cce607f7f4167d435b8af451c78a663" ]
[ "NatSus_Fig1.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport numpy as np\nfrom pylab import *\nimport math\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib.gridspec as gridspec\nfrom mpl_toolkits.basemap import Basemap\nfrom matplotlib.patches import Polygon\n\nr\"\"\"\n#%%--------------------...
[ [ "matplotlib.pyplot.subplot", "matplotlib.pyplot.annotate", "matplotlib.lines.Line2D", "matplotlib.pyplot.gca", "pandas.read_excel", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "matplotlib.colors.BoundaryNorm", "numpy.arange", "matplotlib.colorbar.ColorbarBase", ...
zhouai9070/QuanTangshi-AA-
[ "f598e459294ef6093781ebddb2df15a551566913" ]
[ "models/AttBiLSTM.py" ]
[ "# @Author : bamtercelboo\n# @Datetime : 2018/8/17 16:06\n# @File : BiLSTM.py\n# @Last Modify Time : 2018/8/17 16:06\n# @Contact : bamtercelboo@{gmail.com, 163.com}\n\n\"\"\"\n FILE : BiLSTM.py\n FUNCTION : None\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.ut...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.LSTM", "torch.manual_seed", "torch.nn.utils.rnn.pad_packed_sequence", "torch.nn.utils.rnn.pack_padded_sequence", "torch.nn.Embedding" ] ]
cameronraysmith/glow
[ "98acbed1d48ee487c24fcfec53d91f41143a6d7d" ]
[ "docs/source/conftest.py" ]
[ "# Copyright 2019 The Glow 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...
[ [ "pandas.testing.assert_series_equal" ] ]
openoakland/lovely-rita
[ "35ec5a5fc27fcf4ee27078e05fb38f15723ddf9a" ]
[ "lovelyrita/data.py" ]
[ "from __future__ import print_function\nimport numpy as np\nimport pandas as pd\nfrom shapely.geometry import Point\nimport geopandas\nfrom lovelyrita.clean import clean as clean_data\nfrom lovelyrita.config import VALID_COLUMN_NAMES as valid_column_names\n\n\ndef read_data(paths, usecols=None, delimiter=',', clean...
[ [ "pandas.DataFrame", "pandas.read_csv", "pandas.concat" ] ]
WaelAshraf/Image.TextScanner
[ "dbe8480209864d99a51b9f6d9d3d428da7ef4cd8" ]
[ "bank-check-ocr-2/bank_check_ocr.py" ]
[ "# USAGE\n# python bank_check_ocr.py --image example_check.png --reference micr_e13b_reference.png\n\n# import the necessary packages\nfrom skimage.segmentation import clear_border\nfrom imutils import contours\nimport imutils\nimport numpy as np\nimport argparse\nimport cv2\n\ndef extract_digits_and_symbols(image,...
[ [ "numpy.max", "numpy.argmax", "numpy.min", "numpy.absolute" ] ]
GAIA-DARPA-AIDA/face-building
[ "d1c574ceb6f48eb989ea077bec4b23267398f383" ]
[ "src/facenet.py" ]
[ "\"\"\"Functions for building the face recognition network.\n\"\"\"\n# MIT License\n# \n# Copyright (c) 2016 David Sandberg\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software withou...
[ [ "tensorflow.image.resize_with_crop_or_pad", "numpy.arccos", "numpy.random.choice", "tensorflow.compat.v1.summary.histogram", "tensorflow.image.random_flip_left_right", "tensorflow.io.read_file", "tensorflow.import_graph_def", "tensorflow.train.get_checkpoint_state", "tensorflow...
shanemmattner/Dash_Multipage
[ "8b451ccfa0b28553b8162f0fbd127b68788519c0" ]
[ "db_database.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Apr 21 13:41:45 2021\n\n@author: shane\n\"\"\"\n\nimport sqlite3\nimport os\nimport pandas as pd\nfrom datetime import datetime\n\n\nDEFAULT_PATH = os.path.join(os.path.dirname(__file__), 'database.sqlite3')\n\n#connect to sqlite database\ndef connect(db_path = DEFAU...
[ [ "pandas.read_sql_query" ] ]
M3nin0/data_cube_utilities
[ "badd774c35babc5becc17e1a2b38a0d1782d3540" ]
[ "data_cube_utilities/xarray_bokeh_plotting.py" ]
[ "from bokeh.models.widgets import Panel, Tabs\nimport numpy as np\nimport importlib\nimport pandas as pd\nfrom bokeh.models import FuncTickFormatter\nfrom bokeh.io import push_notebook, show, output_notebook\nfrom bokeh.layouts import row\nfrom bokeh.plotting import figure\nfrom bokeh.models.sources import ColumnDa...
[ [ "pandas.isnull", "pandas.DataFrame", "pandas.concat" ] ]