repo_name stringlengths 8 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
cch1999/protein_dynamics | [
"f24031d19f527f196d7c8bb822435ec1ac657da0"
] | [
"obselete/model4.py"
] | [
"import torch\nimport torch.nn as nn\nfrom torch.utils.data import Dataset\nfrom torch.nn.functional import normalize\n\nfrom random import shuffle\n\nfrom utils import MLP, read_input_file, _compute_connectivity, rmsd, save_structure\nimport matplotlib.pyplot as plt\nimport os\nfrom pykeops.torch import LazyTensor... | [
[
"torch.ones",
"matplotlib.pyplot.legend",
"torch.nn.Linear",
"torch.randn",
"matplotlib.pyplot.savefig",
"torch.no_grad",
"torch.tensor",
"matplotlib.pyplot.xlim",
"torch.set_num_threads",
"matplotlib.pyplot.title",
"torch.nn.ReLU",
"torch.log",
"matplotlib.pypl... |
contactlp/xgboost | [
"1d0ca49761d6a7dace5aec6af80c4aef7367fc2f"
] | [
"python-package/xgboost/training.py"
] | [
"# coding: utf-8\n# pylint: disable=too-many-locals, too-many-arguments, invalid-name\n# pylint: disable=too-many-branches, too-many-statements\n\"\"\"Training Library containing training routines.\"\"\"\nfrom __future__ import absolute_import\n\nimport warnings\nimport numpy as np\nfrom .core import Booster, STRIN... | [
[
"numpy.diff",
"pandas.DataFrame.from_dict",
"numpy.random.seed",
"numpy.arange",
"numpy.array_split",
"numpy.array",
"numpy.std",
"numpy.mean"
]
] |
Weiqi97/LilyPadz | [
"b374908444b8594e3f3a2ccf4bc39e3e731f31aa"
] | [
"lilypadz/model/clustering.py"
] | [
"import numpy as np\nimport pandas as pd\nimport plotly.graph_objs as go\nfrom typing import List\nfrom flask import jsonify\nfrom plotly.offline import plot\nfrom sklearn.cluster import KMeans\nfrom sklearn.decomposition import PCA\nfrom lilypadz.model.data_processor import get_toad_processed_hop\n\n\ndef get_all_... | [
[
"pandas.DataFrame",
"sklearn.cluster.KMeans",
"numpy.where",
"numpy.unique",
"sklearn.decomposition.PCA"
]
] |
rakesh1988/pandas_market_calendars | [
"327763f6c7692b575b1844c67acf2bdd0835360e"
] | [
"tests/test_hkex_calendar.py"
] | [
"import datetime\n\nimport pandas as pd\nimport pytz\n\nfrom pandas_market_calendars.exchange_calendar_hkex import HKEXExchangeCalendar\n\n\ndef test_time_zone():\n assert HKEXExchangeCalendar().tz == pytz.timezone('Asia/Shanghai')\n assert HKEXExchangeCalendar().name == 'HKEX'\n\n\ndef test_2018_holidays():\... | [
[
"pandas.Timestamp"
]
] |
JLUNeverMore/FAR-HO | [
"1f381f50f99b83ee5bed9700fcbfa4375096a0ca"
] | [
"far_ho/hyper_gradients.py"
] | [
"from __future__ import absolute_import, print_function, division\n\nimport sys\nfrom collections import defaultdict, deque\n\nimport tensorflow as tf\nfrom tensorflow.python.training import slot_creator\nfrom tensorflow.contrib.opt import ScipyOptimizerInterface\n\nfrom far_ho import utils\nfrom far_ho.optimizer i... | [
[
"tensorflow.no_op",
"tensorflow.python.training.slot_creator.create_zeros_slot",
"tensorflow.variable_scope",
"tensorflow.reduce_mean",
"tensorflow.get_default_session",
"tensorflow.zeros_like",
"tensorflow.name_scope",
"tensorflow.gradients",
"tensorflow.contrib.opt.ScipyOptim... |
seono/SKKALBERT | [
"0fe68260558656c9732205391539aa202e70ba67"
] | [
"src/utils/models/word_utils.py"
] | [
"import argparse, os, sys, math\nimport numpy as np\nfrom gensim.models import Word2Vec\nfrom sklearn.decomposition import TruncatedSVD\nfrom soynlp.word import pmi\nfrom soynlp.vectorizer import sent_to_word_contexts_matrix\nfrom collections import defaultdict\n\nsys.path.insert(0, os.path.abspath(os.path.join(os.... | [
[
"numpy.zeros",
"numpy.asarray",
"numpy.argmax",
"sklearn.decomposition.TruncatedSVD",
"numpy.array",
"numpy.dot",
"numpy.linalg.norm"
]
] |
ness001/NeteaseMusic-playlist-download-app | [
"a06bc04493cc8b0ae4ad08eeb2db1b05d96bd3d2"
] | [
"batch.py"
] | [
"# -*- coding: utf-8 -*-\n\n# Form implementation generated from reading ui file 'batch.ui'\n#\n# Created by: PyQt5 UI code generator 5.14.2\n#\n# WARNING! All changes made in this file will be lost!\n\n\nfrom PyQt5 import QtCore, QtWidgets\nfrom PyQt5.QtCore import QThread, pyqtSignal\nfrom PyQt5.QtWidgets import ... | [
[
"pandas.DataFrame"
]
] |
itsvetkov/pyqtgraph | [
"aa26d8ac82e00ea9ba992fef365933960e9e8aa2"
] | [
"pyqtgraph/functions.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nfunctions.py - Miscellaneous functions with no other home\nCopyright 2010 Luke Campagnola\nDistributed under MIT/X11 license. See license.txt for more infomation.\n\"\"\"\n\nfrom __future__ import division\nfrom .python2_3 import asUnicode\nfrom .Qt import QtGui, QtCore, USE_PYSI... | [
[
"numpy.ones",
"numpy.argwhere",
"numpy.take",
"numpy.dtype",
"numpy.argsort",
"numpy.asarray",
"numpy.log",
"numpy.ascontiguousarray",
"numpy.isscalar",
"numpy.ndindex",
"numpy.isfinite",
"numpy.argmin",
"numpy.abs",
"numpy.isnan",
"numpy.fft.rfft",
... |
Sam-Armstrong/MNIST-GAN | [
"56143cecf50df5dd331278eaf4e0e387fe59bf5c"
] | [
"run_model.py"
] | [
"\"\"\"\nAuthor: Sam Armstrong\nDate: Autumn 2021\n\nDescription: The code for generating a single sample using the model (saves the image to the local folder)\n\"\"\"\n\nimport torch\nimport numpy as np\nfrom Generator import Generator\nfrom PIL import Image\nfrom matplotlib import cm\nfrom torch.autograd import V... | [
[
"numpy.random.rand",
"torch.device",
"torch.load",
"matplotlib.cm.gist_earth"
]
] |
JosephKJ/hat | [
"a6386c8a5435573034f3a55c86438c0a82ee9d8d"
] | [
"src/dataloaders/mixture.py"
] | [
"import os,sys\nimport os.path\nimport numpy as np\nimport torch\nimport torch.utils.data\nfrom torchvision import datasets,transforms\nfrom sklearn.utils import shuffle\nimport urllib.request\nfrom PIL import Image\nimport pickle\nimport utils\n\n####################################################################... | [
[
"torch.utils.data.DataLoader",
"torch.stack",
"numpy.transpose",
"sklearn.utils.shuffle",
"numpy.arange",
"numpy.array",
"torch.LongTensor"
]
] |
weijiawu/SyntoReal_STD | [
"4f92809cfa276d0424019bcc1fb77659d20423b8"
] | [
"lib/utils.py"
] | [
"import numpy as np\nfrom shapely.geometry import Polygon\nimport numpy as np\nimport cv2\nfrom PIL import Image\nimport math\nimport os\nimport torch\n\n\ndef get_MSER(image_path,):\n image = cv2.imread(image_path)\n rgb_img = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)\n negtive_map = np.zeros(image.shape[:2... | [
[
"numpy.zeros",
"numpy.dot",
"numpy.maximum",
"numpy.argsort",
"numpy.arange",
"numpy.where",
"numpy.expand_dims",
"numpy.random.rand",
"numpy.array",
"numpy.around",
"numpy.concatenate",
"numpy.meshgrid",
"torch.Tensor",
"numpy.minimum"
]
] |
snigdhagit/compare-selection | [
"26f41d06405e9a9be9894878bf604c38049a4729"
] | [
"statistics.py"
] | [
"from __future__ import division\n\nimport numpy as np, pandas as pd, time\nfrom utils import BHfilter\n\ndef interval_statistic(method,\n instance,\n X,\n Y,\n beta,\n l_theory,\n l_m... | [
[
"numpy.sqrt",
"numpy.zeros_like",
"numpy.maximum",
"pandas.DataFrame",
"numpy.ones_like",
"numpy.asarray",
"numpy.median",
"numpy.nonzero",
"numpy.mean",
"numpy.std",
"numpy.linalg.norm",
"numpy.unique",
"numpy.isfinite"
]
] |
fluiddyn/fluidpythran | [
"e34e9886680e6b8e365d24a77fcb66b67e554043"
] | [
"doc/examples/not_implemented/pythran_class_with_calls.py"
] | [
"\"\"\"\nWith classes, we have a problem with heritage. Note that for standard functions\n(like sum_arrays), we actually also have the problem with monkey patching.\n\nWe can just say that monkey patching of `sum_arrays` is not supported (so that\n`sum_arrays` can be treated as a Pythran function, and potentially i... | [
[
"numpy.zeros"
]
] |
tangibleai/rasa | [
"d92cda129bbbf4b52151d981535bd02fc7597d6d"
] | [
"tests/core/featurizers/test_single_state_featurizers.py"
] | [
"from typing import Text\nimport numpy as np\nfrom rasa.shared.core.constants import ENTITY_LABEL_SEPARATOR\nimport scipy.sparse\n\nimport pytest\n\nfrom rasa.core.featurizers.single_state_featurizer import SingleStateFeaturizer\nfrom rasa.shared.core.domain import Domain\nfrom rasa.shared.nlu.constants import (\n ... | [
[
"numpy.all",
"numpy.random.randint"
]
] |
mohammadzainabbas/tensorflow | [
"049dfd5e070cfa84c82eea71c6c746a70cba4a3f"
] | [
"tensorflow/contrib/eager/python/datasets_test.py"
] | [
"# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"numpy.ediff1d",
"tensorflow.python.ops.math_ops.mod",
"tensorflow.contrib.data.python.ops.unique.unique",
"tensorflow.contrib.eager.python.datasets.Iterator",
"tensorflow.python.ops.math_ops.add",
"tensorflow.python.eager.test.gpu_device_name",
"numpy.random.randn",
"numpy.median"... |
minuJeong/moderngl-window | [
"6386478f1e6b07cefda8f4d9324d972ab88b34ec"
] | [
"examples/advanced/boids.py"
] | [
"from pathlib import Path\r\nimport random\r\nimport numpy\r\nfrom pyrr import matrix44\r\n\r\nimport moderngl\r\nimport moderngl_window\r\nfrom moderngl_window.opengl.vao import VAO\r\n\r\n\r\nclass Boids(moderngl_window.WindowConfig):\r\n \"\"\"\r\n An attempt to make something boid-list with GL3.3.\r\n ... | [
[
"numpy.fromiter"
]
] |
linearlabstech/blox | [
"6a5c8a28fcfcb17731be89939284e7ac13a047d7"
] | [
"BLOX/Modules/EfficientNetBody.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCopyright (c) 2019, Linear Labs Technologies\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses... | [
[
"torch.cuda.is_available"
]
] |
motokimura/M3D-RPN | [
"7a9be66cb257c349e51a3eac7e67bdea3a6ddd72"
] | [
"scripts/test_rpn_3d.py"
] | [
"# -----------------------------------------\n# python modules\n# -----------------------------------------\nfrom importlib import import_module\nfrom easydict import EasyDict as edict\nimport torch.backends.cudnn as cudnn\nimport sys\nimport numpy as np\nimport os\n\n# stop python from writing so much bytecode\nsy... | [
[
"numpy.set_printoptions"
]
] |
MuAuan/llightning-pytorch | [
"38dc9ed75dd8e6f4a2a05e5a10072a549dcbf4d6"
] | [
"Coloring/simple_YCC_resnet.py"
] | [
"import os\nimport time\nimport numpy as np\n\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\n\nimport torchvision\nfrom torchvision.datasets import CIFAR10 #MNIST\nfrom torch.utils.data import DataLoader, random_split\nfrom torchvision import transforms\nimport pytorch_lightning as pl\nimport... | [
[
"torch.utils.data.DataLoader",
"torch.nn.functional.mse_loss",
"matplotlib.pyplot.pause",
"numpy.transpose",
"matplotlib.pyplot.savefig",
"torch.cuda.is_available",
"torch.utils.data.random_split",
"matplotlib.pyplot.text",
"matplotlib.pyplot.close",
"numpy.array"
]
] |
JiaxiangBU/xgboost-LightGBM_demo | [
"ea9b443121c8124340b5906340a0b9d5a098ac1a"
] | [
"Xgboost_prac/UCI_CAD/UCI_test.py"
] | [
"import numpy as np\nimport time\nimport pandas as pd\nfrom xgboost.sklearn import XGBClassifier\nfrom sklearn import preprocessing\nfrom sklearn.model_selection import KFold\nfrom sklearn.grid_search import GridSearchCV\nfrom sklearn.metrics import accuracy_score\n\ndata_np=np.array(pd.read_csv('./UCI_CAD.csv'))\n... | [
[
"numpy.array",
"sklearn.metrics.accuracy_score",
"pandas.read_csv",
"sklearn.model_selection.KFold"
]
] |
iryzhkov/stock-trading-backend | [
"7161026b7b4deb78a934b66550c85a27c6b32933"
] | [
"tests/agent/test_polynomial_model.py"
] | [
"\"\"\"Unit tests for PolynomialModel class\n\"\"\"\nimport os\nimport unittest\n\nimport pandas as pd\n\nfrom stock_trading_backend.agent import PolynomialModel\n\n\nclass TestPolynomialModel(unittest.TestCase):\n \"\"\"Unit tests for PolynomialModel class.\n \"\"\"\n def test_initializes(self):\n ... | [
[
"pandas.Series",
"pandas.DataFrame"
]
] |
licanisme/Paddle | [
"d11c140e280880b9d031fa38361f3230aef6cf9c"
] | [
"python/paddle/incubate/hapi/vision/transforms/functional.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.array",
"numpy.dot",
"numpy.abs"
]
] |
cpelley/improver | [
"ca028e3a1c842e3ff00b188c8ea6eaedd0a07149",
"ca028e3a1c842e3ff00b188c8ea6eaedd0a07149"
] | [
"improver/cli/nbhood_land_and_sea.py",
"improver/nbhood/recursive_filter.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n# (C) British Crown Copyright 2017-2021 Met Office.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provid... | [
[
"numpy.logical_not"
],
[
"numpy.allclose",
"numpy.ma.is_masked",
"numpy.ma.MaskedArray"
]
] |
SimengSun/revisit-nplm | [
"bbe1cdaecf1d7d104d27b1035a591ebbd3b5141e"
] | [
"data/text.py"
] | [
"\"\"\"\n\tImplement torch iterable dataset\n\t\t- build vocab ordered by freq for \n\"\"\"\nfrom tqdm import tqdm\nimport torch\nimport torch.utils.data\nfrom torch.utils.data.dataloader import DataLoader\nimport os\nimport sys\nimport pickle5 as pickle #import pickle\nimport math\nfrom collections import defaultd... | [
[
"torch.utils.data.get_worker_info",
"torch.cat",
"torch.tensor"
]
] |
VarunNangalia/ga-learner-dsmp-repo | [
"c7c1485e6745ba62e666cce7e2accf6eee30ed17"
] | [
"-Publish-Superhero-Statistics/code.py"
] | [
"# --------------\n#Header files\r\nimport pandas as pd\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport seaborn as sns\r\n\r\n#path of the data file- path\r\ndata = pd.read_csv(path)\r\n#Code starts here \r\ndata['Gender'].replace('-','Agender',inplace=True)\r\ngender_count = data['Gender'].value... | [
[
"numpy.quantile",
"pandas.read_csv",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.title",
"matplotlib.pyplot.show"
]
] |
ParikhKadam/cycloid | [
"c5e64e8379f801417a38755eb6b2fde881dabd8c"
] | [
"design/trackplan/trackplan.py"
] | [
"# racetrack route planner\n# based on apex cone locations and track widths, get a \nimport numpy as np\n\n\nmaxv = 10\nlaterala = 8\nmaxk = 1.5\nbw_v = np.pi*2*0.7\nbw_w = np.pi*2*1.5\n\n# track is a set of points and radii (positive or negative if track goes CCW/CW\n# around each point)\n# so first we determine t... | [
[
"numpy.sum",
"matplotlib.pyplot.plot",
"numpy.vstack",
"numpy.argmin",
"numpy.abs",
"numpy.cos",
"numpy.linspace",
"numpy.sqrt",
"numpy.zeros",
"matplotlib.pyplot.axis",
"numpy.hstack",
"numpy.linalg.norm",
"numpy.arctan2",
"numpy.sign",
"numpy.exp",
... |
GaoxiangLuo/flame | [
"16bd1715a545421d45ea0fc32544e448389de49c"
] | [
"lib/python/flame/examples/mnist/aggregator/pytorch/main.py"
] | [
"# Copyright 2022 Cisco Systems, Inc. and its affiliates\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | [
[
"torch.utils.data.DataLoader",
"torch.nn.functional.log_softmax",
"torch.nn.Linear",
"torch.nn.functional.max_pool2d",
"torch.flatten",
"torch.nn.functional.nll_loss",
"torch.no_grad",
"torch.nn.functional.relu",
"torch.cuda.is_available",
"torch.nn.Conv2d",
"torch.nn.D... |
Ravie403/chainerrl-visualizer | [
"302bcd574d435ab68652b084764d4bb777300494"
] | [
"examples/a3c_breakout/main.py"
] | [
"import chainer\nimport numpy as np\nfrom chainerrl.agents import a3c\nfrom chainerrl import links\nfrom chainerrl import misc\nfrom chainerrl.optimizers import rmsprop_async\nfrom chainerrl import policy\nfrom chainerrl import v_function\n\nfrom chainerrl.wrappers import atari_wrappers\n\nfrom chainerrl_visualizer... | [
[
"numpy.asarray"
]
] |
mbed92/rl-physnet | [
"62b6e8a84a6704a50855434933a147f507f94263"
] | [
"nn/train/log.py"
] | [
"import os\n\nimport tensorflow as tf\nfrom tqdm import tqdm\n\n\nclass ExperimentHandler:\n\n def __init__(self, working_path, out_name, max_to_keep=3, **objects_to_save) -> None:\n super().__init__()\n\n # prepare log writers\n train_log_path = _get_or_create_dir(working_path, out_name, 'l... | [
[
"tensorflow.train.Checkpoint",
"tensorflow.train.latest_checkpoint",
"tensorflow.summary.create_file_writer",
"tensorflow.train.CheckpointManager"
]
] |
pirovc/grimer | [
"169f8d3009004d6d2f4ca4d3e7dfec819078cb34"
] | [
"scripts/ehomd_download.py"
] | [
"#!/usr/bin/env python3\nimport pandas as pd\nimport sys\nimport urllib.request\nimport re\n\n\ndef get_taxid(url):\n try:\n sys.stderr.write(url+\"\\n\")\n assembly_stats = url + \"/\" + url.split(\"/\")[-1] + \"_assembly_stats.txt\"\n filedata = urllib.request.urlopen(assembly_stats).read(... | [
[
"pandas.read_table"
]
] |
Hiroshiba/hifi-gan | [
"17601a07573309ee305c58bf87a041f267b1c0c8"
] | [
"hifi_gan/meldataset.py"
] | [
"import math\nimport os\nimport random\nimport torch\nimport torch.utils.data\nimport numpy as np\nfrom librosa.core import load\nfrom librosa.util import normalize\nfrom librosa.filters import mel as librosa_mel_fn\n\nMAX_WAV_VALUE = 32768.0\n\n\ndef load_wav(full_path, sampling_rate=None):\n if os.path.splitex... | [
[
"numpy.load",
"torch.FloatTensor",
"torch.min",
"torch.exp",
"numpy.exp",
"numpy.clip",
"torch.from_numpy",
"torch.max",
"torch.hann_window",
"torch.clamp"
]
] |
pbevan1/Skin-Deep-Unlearning | [
"b8802db8bd61bbf3fdeb10c9899a4117ae38e89c"
] | [
"misc_code/marking_detection.py"
] | [
"import cv2\nimport numpy as np\nimport pandas as pd\nimport os\nimport matplotlib.pyplot as plt\nimport shutil\nfrom zipfile import ZipFile\n\n# Detecting Gentian Violet Markers\n\n# defining numpy arrays for HSV threshold values to look for in images\nlower_violet = np.array([125, 100, 60], dtype=np.uint8)\nupper... | [
[
"numpy.array",
"pandas.read_csv"
]
] |
ncilfone/fairscale | [
"b434b7354898febf718f23c7ff21368a6e0bbe1a"
] | [
"fairscale/optim/adascale.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\n# Copyright 2020 Petuum, Inc. All Rights Reserved.\n#\n# Redistribution and use in source and binary forms, wit... | [
[
"numpy.sum",
"torch.autograd.Variable._execution_engine.queue_callback",
"numpy.append",
"torch.distributed.get_world_size",
"numpy.zeros",
"torch.distributed.is_initialized",
"torch.distributed.all_reduce",
"numpy.maximum"
]
] |
lianghongzhuo/ycb-tools | [
"e5d99a23a2b8b345c571acf9c8ea10a648d7fb03"
] | [
"create_ycb_sdf.py"
] | [
"import os\nimport trimesh\nimport numpy as np\n\n\"\"\"\nCreates Gazebo compatible SDF files from downloaded YCB data.\n\nThis looks through all the YCB objects you have downloaded in a particular \nfolder, and creates Gazebo compatible SDF files from a set of templates.\n\nIf the object has google_16k meshes down... | [
[
"numpy.linalg.inv"
]
] |
neilzhang-ucsb/ABRS | [
"03acc766f87e58870fe39d5403570c44be69f235"
] | [
"real_time_ABRS.py"
] | [
"#real_time_ABRS\r\n\r\n# Copyright (c) 2019 Primoz Ravbar UCSB\r\n# Licensed under BSD 2-Clause [see LICENSE for details]\r\n# Written by Primoz Ravbar\r\n\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport cv2\r\nimport pickle\r\nimport msvcrt\r\n\r\n\r\nfrom scipy import misc #pip install pillow\... | [
[
"numpy.vstack",
"numpy.sum",
"tensorflow.keras.models.load_model",
"numpy.zeros",
"numpy.argmax",
"numpy.count_nonzero",
"numpy.shape",
"numpy.delete",
"numpy.absolute"
]
] |
DT021/GamestonkTerminal | [
"10d231ec2f86a19e69fdb65a2f4d37f33f723f6a"
] | [
"gamestonk_terminal/etf/etf_controller.py"
] | [
"\"\"\"ETF Controller\"\"\"\n__docformat__ = \"numpy\"\n\nimport argparse\nimport os\nfrom typing import List\nimport matplotlib.pyplot as plt\nfrom prompt_toolkit.completion import NestedCompleter\nfrom gamestonk_terminal import feature_flags as gtff\nfrom gamestonk_terminal.helper_funcs import get_flair\nfrom gam... | [
[
"matplotlib.pyplot.close"
]
] |
ding-ma/applied-ml | [
"91f5ade1984e84fd252fbc76d72f0ee8bd5c96d0"
] | [
"mini-project-2/twenty_news_run.py"
] | [
"import pandas as pd\r\nimport matplotlib.pyplot as plt\r\nimport seaborn as sns\r\nimport numpy as np\r\nimport itertools\r\nfrom random import randrange\r\nfrom sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer\r\nfrom sklearn.utils import shuffle\r\nfrom sklearn.naive_bayes import Multinomi... | [
[
"sklearn.feature_extraction.text.TfidfVectorizer",
"sklearn.feature_extraction.text.CountVectorizer",
"sklearn.utils.shuffle"
]
] |
pjordan/deep-reinforcement-learning | [
"4784635b67a30aadb5a7d93a0945781f55b6dccf"
] | [
"p3_collab-compet/view-actors.py"
] | [
"from model import Actor, Critic\nfrom config import Config\nimport torch\nfrom rlcc.act import NetworkActor, StackedActor\nfrom unityagents import UnityEnvironment\nimport numpy as np\nimport imageio\nimport os\nfrom itertools import cycle\n\nconfigs = []\nnames = []\n\n# \nconfigs.append(Config())\nconfigs[-1].fc... | [
[
"numpy.any",
"torch.load"
]
] |
hytsang/cs-ranking | [
"241626a6a100a27b96990b4f199087a6dc50dcc0"
] | [
"csrank/dataset_reader/labelranking/survey_dataset_reader.py"
] | [
"import os\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.model_selection import ShuffleSplit\nfrom sklearn.preprocessing import Imputer, StandardScaler\nfrom sklearn.utils import check_random_state\n\nfrom csrank.constants import LABEL_RANKING\nfrom csrank.util import ranking_ordering_conversion\nfrom ..... | [
[
"sklearn.model_selection.ShuffleSplit",
"sklearn.utils.check_random_state",
"pandas.io.stata.read_stata",
"sklearn.preprocessing.Imputer",
"sklearn.preprocessing.StandardScaler",
"numpy.array"
]
] |
jbwang1997/BboxToolk | [
"a1e6b9dfcf1f533b630d656dc114ff62a5b37ba9"
] | [
"BboxToolkit/datasets/HRSCio.py"
] | [
"import os\nimport time\nimport os.path as osp\nimport xml.etree.ElementTree as ET\nimport numpy as np\n\nfrom PIL import Image\nfrom functools import partial\nfrom multiprocessing import Pool\nfrom .misc import img_exts, get_classes, _ConstMapper\n\n\ndef load_hrsc(img_dir, ann_dir, classes=None, img_keys=None, ob... | [
[
"numpy.array",
"numpy.zeros"
]
] |
glauberrleite/ventilator-microcontroller | [
"3b0b489a71e841bf152059585de1d54f4e95e4cc"
] | [
"test/collect_data.py"
] | [
"import serial\nimport numpy as np\nimport time\nimport signal\nimport sys\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\ndef signal_handler(sig, frame):\n ser.close()\n \n df = pd.DataFrame({'time':l_time, 'state':l_state, 'fl_int':l_fl_int, 'pres_int':l_pres_int, 'pres_pac':l_pres_pac, 'pres_ex... | [
[
"pandas.DataFrame"
]
] |
yieldsfalsehood/rng_fdw | [
"31a181a6a912f0b1072c7ed9f09c5bd0afa052b8"
] | [
"rng_fdw/__init__.py"
] | [
"#!/usr/bin/env python\n\nfrom multicorn import ForeignDataWrapper\n\nimport numpy as np\nimport scipy.stats\n\nclass RNGWrapper(ForeignDataWrapper):\n\n def __init__(self, options, columns):\n\n super(RNGWrapper, self).__init__(options, columns)\n self.columns = columns\n\n # default to the... | [
[
"numpy.float"
]
] |
Grazziela/ChiralLigands | [
"8a786212c464bdef8141643d29122c18fd73bc5f"
] | [
"Dragon_signature desciptors/Step 2 - Regression Models/RandomForestRegression_SHAP_Analysis.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Thu Jul 4 13:52:25 2019\r\n\r\nSHAP importance calculation for Random Forests with standard parameters\r\nusing training/test split\r\n\r\nObs: Run the code in the same folder as your data files\r\n\r\n@author: Grazziela Figueredo\r\n\"\"\"\r\nimport pandas as pd #f... | [
[
"matplotlib.pyplot.legend",
"sklearn.metrics.mean_squared_error",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.grid",
"pandas.DataFrame",
"pandas.read_excel",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.title",
"sklearn.ensemble.RandomForestR... |
BEL-Public/mffpy | [
"8515824d89a77cf10f7c36bb405f61d338b6f5fe"
] | [
"mffpy/header_block/header_block.py"
] | [
"\"\"\"Management of header blocks in .mff binary files\n\n.mff binary files have a blocked structure. Consecutive blocks can be\nseparated by a header, which brings us to the topic of this module.\n\nThe header consists of either a single flag (`flag=0`) or a block describing\nthe following bytes of signal data (... | [
[
"numpy.arange",
"numpy.ones"
]
] |
ashao/SmartSim | [
"54ca7a72e4e19a167b67b8d16daf113e81f75817"
] | [
"smartsim/experiment.py"
] | [
"# BSD 2-Clause License\n#\n# Copyright (c) 2021, Hewlett Packard Enterprise\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain the above c... | [
[
"pandas.DataFrame"
]
] |
WerzSoft/PElyzer | [
"18ab87bb4aafaf7a9f02749545a4ba110c1036fe"
] | [
"tests/estadisticas.py"
] | [
"import numpy as np\r\nimport pandas as pd\r\nfrom sklearn.decomposition import PCA\r\nfrom sklearn.manifold import TSNE\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib.cm as cm\r\nfrom mpl_toolkits.mplot3d import Axes3D\r\nimport seaborn as sns\r\n\r\n\r\ndatos = pd.read_csv(\"pelyzer/recursos/dataset.csv\... | [
[
"pandas.read_csv",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.title",
"matplotlib.pyplot.ylabel"
]
] |
pawangeek/CovidHack | [
"3a57106eeb443550bb801a8120243b992bc960fb"
] | [
"app.py"
] | [
"import requests, json, populartimes\nimport numpy as np\nimport pandas as pd\nfrom itsdangerous import URLSafeTimedSerializer, SignatureExpired\nfrom form import DetailForm, UserForm, UserLogin, NGOForm\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.orm import scoped_session, sessionmaker\nfrom datetime im... | [
[
"pandas.DataFrame"
]
] |
jmichellehu/vmap | [
"0f631a0e2d625215ea419cd7ea537f6d5a2ccd57"
] | [
"vmap/vmap.py"
] | [
"#! /usr/bin/env python\n\n#David Shean\n#dshean@gmail.com\n\n#This script uses ASP correlator to produce disparity maps from two inputs\n#Input data should be orthorectified/mapped in the same projected coordinate system\n#Run disp2v.py to convert to surface velocities\n\nimport sys\nimport os\nimport argparse\nim... | [
[
"numpy.ma.array",
"numpy.max",
"numpy.ma.sqrt",
"numpy.array",
"numpy.ma.abs"
]
] |
SobhanOmranian/spark-dca | [
"cd0c5ddbe433a1772442456549e37bf8838f75e3"
] | [
"scripts/figure10_experiment[static_solution_ssd]/plot_dca_static_ssd.py"
] | [
"import matplotlib.pyplot as plt\nfrom matplotlib.pyplot import savefig\nimport matplotlib.patches as mpatches\nimport pandas as pd\nimport numpy as np\nfrom numpy import dtype\nfrom matplotlib.pyplot import ylabel\nimport math\nimport re\n\nimport sys\nsys.path.append(f'./common')\nimport util\nfrom util import *... | [
[
"matplotlib.pyplot.legend",
"numpy.append",
"matplotlib.pyplot.xticks",
"pandas.read_csv",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.show",
"pandas.concat",
"numpy.array",
"matplotlib.patches.Patch",
"matplotlib.pyplot.bar"
]
] |
shenghh2015/automl | [
"8c2cca6e35b1f27adf4ad709128aa586badc8a76"
] | [
"efficientdet/backbone/efficientnet_builder_test.py"
] | [
"# Copyright 2020 Google Research. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by... | [
[
"tensorflow.compat.v1.disable_eager_execution",
"tensorflow.compat.v1.zeros",
"numpy.prod",
"tensorflow.compat.v1.test.main",
"tensorflow.compat.v1.trainable_variables"
]
] |
shenjl/PStudy | [
"d49c710524781b604acf4cb3d28b774ab09ff73d"
] | [
"PythonStudy/Tensorflow4mnist/mnist/v1/train.py"
] | [
"import tensorflow as tf\nfrom tensorflow.examples.tutorials.mnist import input_data\nfrom model import Network\n\n'''\npython 3.6\ntensorflow 1.4\n'''\n\n\nclass Train:\n def __init__(self):\n self.net = Network()\n\n # 初始化 session\n # Network() 只是构造了一张计算图,计算需要放到会话(session)中\n self.s... | [
[
"tensorflow.global_variables_initializer",
"tensorflow.Session",
"tensorflow.examples.tutorials.mnist.input_data.read_data_sets"
]
] |
JevinJ/pyvista | [
"c9be18ed209de3f80e1a70ef01eef3355b3616ce"
] | [
"pyvista/utilities/geometric_objects.py"
] | [
"\"\"\"Provides an easy way of generating several geometric objects.\n\nCONTAINS\n--------\nvtkArrowSource\nvtkCylinderSource\nvtkSphereSource\nvtkPlaneSource\nvtkLineSource\nvtkCubeSource\nvtkConeSource\nvtkDiskSource\nvtkRegularPolygonSource\nvtkPyramid\n\n\"\"\"\nimport numpy as np\nimport vtk\n\nimport pyvista\... | [
[
"numpy.allclose",
"numpy.sum",
"numpy.linalg.norm",
"numpy.empty",
"numpy.zeros",
"numpy.cross",
"numpy.cos",
"numpy.arange",
"numpy.full",
"numpy.array",
"numpy.sin",
"numpy.meshgrid",
"numpy.linspace"
]
] |
joegeisz/pylith | [
"f74060b7b19d7e90abf8597bbe9250c96593c0ad"
] | [
"examples/2d/subduction/viz/plot_slipprofile.py"
] | [
"#!/usr/bin/env python\n\"\"\"\nThis script generates a plot showing slip or fault tractions.\n\"\"\"\n\n# The code requires the numpy, h5py, and matplotlib packages.\nimport numpy\nimport h5py\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as pyplot\n\n\n# -------------------------------------... | [
[
"numpy.cumsum",
"numpy.zeros",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.savefig",
"numpy.argsort",
"matplotlib.pyplot.show",
"matplotlib.use"
]
] |
artificially-ai/FewShotVision | [
"909bc414ea27ef0300091e1dd6baba4fb063324b"
] | [
"utils/io_utils.py"
] | [
"import glob\nimport os\n\nimport numpy as np\nimport torch\n\nfrom utils import configs, backbones\n\nmodel_dict = dict(\n Conv4=backbones.Conv4,\n Conv4S=backbones.Conv4S,\n Conv6=backbones.Conv6,\n ResNet10=backbones.ResNet10,\n ResNet18=backbones.ResNet18,\n ResNet34=backbones.ResNet34,\n R... | [
[
"numpy.max",
"numpy.random.seed",
"numpy.random.randint"
]
] |
phaustin/a301_2020 | [
"9be7ead5f641013e2cec4e736ea76171b849e8d5"
] | [
"sat_lib/process_bands.py"
] | [
"import a301_lib\nimport numpy as np\nfrom matplotlib import pyplot as plt\nfrom pyhdf.SD import SD\nfrom pyhdf.SD import SDC\nfrom pathlib import Path\nimport h5py\nfrom contextlib import contextmanager\nimport os\nfrom sat_lib.modismeta_read import get_core\n\n@contextmanager\ndef cd(newdir):\n prevdir = os.ge... | [
[
"numpy.searchsorted"
]
] |
Klimorg/template_segmentation | [
"f5a5066905acb06c66793d9a361eae8570652af2"
] | [
"src/pipelines/classic.py"
] | [
"from typing import List, Tuple\n\nimport albumentations as A\nimport numpy as np\nimport pandas as pd\nimport tensorflow as tf\n\nfrom src.pipelines.base_pipeline import BasePipeline\n\n# class Tensorize(object):\n# \"\"\"\n# Class used to create tensor datasets for TensorFlow.\n\n# Inheritance:\n# ... | [
[
"pandas.read_csv",
"tensorflow.data.Dataset.from_tensor_slices"
]
] |
jim22k/python-suitesparse-graphblas | [
"09eb560950dd848cadef6115c78ef4ed2e1ae80f"
] | [
"setup.py"
] | [
"from setuptools import setup, find_packages, Extension\nfrom glob import glob\n\ntry:\n from Cython.Build import cythonize\n from Cython.Compiler.Options import get_directive_defaults\n\n use_cython = True\nexcept ImportError:\n use_cython = False\nimport numpy as np\nimport os\nimport sys\nimport vers... | [
[
"numpy.get_include"
]
] |
satyami3/stock | [
"d3d3f65a25feb764e6f735f422251fd0ede520fc"
] | [
"scheduled_tasks/economy/get_upcoming_events_date.py"
] | [
"import json\nimport sqlite3\nimport tabula\nimport pandas as pd\nfrom datetime import datetime, timedelta\n\nconn = sqlite3.connect(r\"database/database.db\", check_same_thread=False)\ndb = conn.cursor()\n\ncurrent_date = datetime.utcnow()\n\n\ndef get_next_retail_sales_date():\n \"\"\"\n Get next retail sal... | [
[
"pandas.to_datetime",
"pandas.read_html"
]
] |
Shumpei-Kikuta/BentoML | [
"4fe508934ab431ea5c414ee9d8b84c2104688381"
] | [
"tests/conftest.py"
] | [
"import functools\nimport glob\nimport inspect\nimport os\n\nimport imageio\nimport numpy as np\nimport pytest\n\nfrom bentoml.yatai.client import YataiClient\nfrom tests.bento_service_examples.example_bento_service import ExampleBentoService\n\n\ndef pytest_configure():\n '''\n global constants for tests\n ... | [
[
"numpy.zeros"
]
] |
brucearctor/datacatalog-connectors-rdbms | [
"7ff5dc858ea7aa21486343304fc281692480cdb8"
] | [
"google-datacatalog-rdbms-connector/src/google/datacatalog_connectors/rdbms/prepare/sql_objects/sql_objects_datacatalog_entry_factory.py"
] | [
"#!/usr/bin/python\n#\n# Copyright 2020 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 app... | [
[
"pandas.notnull",
"pandas.isna",
"pandas.isnull"
]
] |
carseven/color-blind-test-hack | [
"debac7cc1c8176ff722e1e7fb5f5eae12a92d3a0"
] | [
"src/model.py"
] | [
"import numpy as np\r\nimport tensorflow as tf\r\nfrom tensorflow.python.keras import models, layers\r\nfrom tensorflow.python.keras.datasets import mnist\r\nfrom tensorflow.python.keras.preprocessing.image import ImageDataGenerator\r\nimport random\r\nimport json\r\n\r\n\r\n(train_images, train_labels), (test_imag... | [
[
"tensorflow.keras.utils.to_categorical",
"tensorflow.python.keras.layers.Dense",
"tensorflow.python.keras.models.Sequential",
"tensorflow.python.keras.layers.MaxPooling2D",
"numpy.clip",
"tensorflow.python.keras.datasets.mnist.load_data",
"tensorflow.python.keras.preprocessing.image.Im... |
SocratesNFR/evodynamic | [
"682b610096182bde2298cdca352e7b319a0e4c41"
] | [
"examples/reservoir/test_mnist_esn_with_memory.py"
] | [
"\"\"\"\nTesting features and method for\nEcho State Network - Reservoir for MNIST digit classification with memory\n\"\"\"\n\nimport tensorflow.compat.v1 as tf\ntf.disable_v2_behavior()\nimport numpy as np\nimport evodynamic.experiment as experiment\nimport evodynamic.connection.random as conn_random\nimport evody... | [
[
"numpy.transpose",
"numpy.ceil",
"numpy.random.permutation",
"numpy.argmax",
"numpy.arange",
"numpy.array",
"tensorflow.compat.v1.disable_v2_behavior",
"tensorflow.compat.v1.nn.softmax_cross_entropy_with_logits_v2"
]
] |
banboooo044/natural-language-sentiment-anaysis | [
"e18d7c0373d9f0a00d5a3cc14abf671081bc940b"
] | [
"classifier/code-analysis/nb_gridCV.py"
] | [
"# 詳しい説明は同様のプログラム logis_gradCV.py を参照\nimport sys\nsys.path.append('../')\nimport numpy as np\nimport pandas as pd\n\nfrom scipy import sparse\n\nfrom sklearn.metrics import f1_score\nfrom sklearn.model_selection import GridSearchCV\nfrom sklearn.metrics import make_scorer\n\nimport matplotlib.pyplot as plt\nimport... | [
[
"matplotlib.pyplot.savefig",
"sklearn.model_selection.GridSearchCV",
"pandas.DataFrame.from_dict"
]
] |
vkola-lab/multi-GPU | [
"d50cff0d587b640fb3af94329102d3eacdd70aa5"
] | [
"xfdlfw/metric/roc_auc.py"
] | [
"\"\"\"\nCreated on Thu Oct 14 14:47:38 2021\n\n@author: cxue2\n\"\"\"\n\nfrom ._metric import Metric\nfrom ._misc import _numpy\nimport sklearn.metrics as M\n\n\nclass RocAuc(Metric):\n\n @_numpy\n def __call__(self, output, y_true):\n\n return M.roc_auc_score(y_true, output[:, 1], **self.kwargs)\n"
] | [
[
"sklearn.metrics.roc_auc_score"
]
] |
maljovec/ann-benchmarks | [
"03f9b3db562794787c936f9ea661ad3b08d5f062"
] | [
"ann_benchmarks/datasets.py"
] | [
"import h5py\nimport numpy\nimport os\nimport random\nimport sys\n\nimport subprocess\n# import samplers\n# import pyDOE\n# import ghalton\n\ntry:\n from urllib import urlretrieve\nexcept ImportError:\n from urllib.request import urlretrieve # Python 3\n\n\ndef download(src, dst):\n if not os.path.exists(... | [
[
"numpy.random.uniform",
"numpy.zeros",
"sklearn.feature_extraction.text.TfidfTransformer",
"numpy.random.seed",
"numpy.random.normal",
"numpy.product",
"scipy.sparse.lil_matrix",
"numpy.array",
"sklearn.random_projection.GaussianRandomProjection"
]
] |
anikeshkamath/IITGn_SURF_2016 | [
"396ce97e4ed8980a8d650a9e486a97b427bfc731"
] | [
"Graph_Algorithms/indegree_CountMin.py"
] | [
"'''\nThis module is a streaming algorithm developed to compute the (in)degree centrality of vertices using CountMin sketch.\nCountMin provides approximate frequencies for each distinct element in the input stream. Accuracy of the approximation based on the dimensions of the 2D array used to store these frequencies... | [
[
"numpy.zeros"
]
] |
brain-link/cmne | [
"0d87e0bcd0041b250ee484f39341a0bf83f72949"
] | [
"archive/I_implementation/II_run_crossvalidation.py"
] | [
"#**\n# @file Option_4_bio_mne_comparison.py\n# @author Christoph Dinh <chdinh@nmr.mgh.harvard.edu>;\n# Matti Hamalainen <msh@nmr.mgh.harvard.edu>\n# @version 1.0\n# @date May, 2017\n#\n# @section LICENSE\n#\n# Copyright (C) 2017, Christoph Dinh. All rights reserved.\n#\n# @brief Model inve... | [
[
"numpy.hstack",
"numpy.expand_dims",
"matplotlib.use",
"numpy.std",
"numpy.array",
"numpy.mean"
]
] |
mo-vic/HanZiGan | [
"dd8dc4b1eeffb01f928d7a4e5931cf6af1d7c1a4"
] | [
"utils/utils.py"
] | [
"import math\n\nimport torch\nfrom torch._six import inf\nfrom torchvision.utils import make_grid\n\nimport numpy as np\nfrom tqdm import tqdm\n\n\ndef _grad_norm(parameters, norm_type=2):\n r\"\"\"Compute gradient norm of an iterable of parameters.\n\n The norm is computed over all gradients together, as if ... | [
[
"torch.zeros",
"torch.ge",
"torch.ones",
"numpy.mean"
]
] |
lacie-life/MasterStudy | [
"16bb79a41555693c7e8cbb3c248c4670e0097073"
] | [
"ComputerVision/Bag-of-Visual-Words/BoVW.py"
] | [
"import argparse\nimport cv2\nimport numpy as np\nimport os\nfrom sklearn.cluster import KMeans\nfrom sklearn.cluster import MiniBatchKMeans\nfrom sklearn.svm import SVC\nfrom sklearn.preprocessing import StandardScaler\nfrom matplotlib import pyplot as plt\nfrom sklearn import svm, datasets\nfrom sklearn.model_sel... | [
[
"numpy.sum",
"sklearn.cluster.KMeans",
"matplotlib.pyplot.ylabel",
"numpy.vstack",
"numpy.append",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.savefig",
"numpy.set_printoptions",
"matplotlib.pyplot.title",
"matplotlib.pyplot.bar",
"sklearn.svm.SVC",
"numpy.zeros"... |
RomanShen/radial-bnn | [
"7c8bc85397c1461a6fd5ea9adf0631f9ade27f6c"
] | [
"src/models/distributions.py"
] | [
"#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n\"\"\" \n@author: romanshen \n@file: distributions.py \n@time: 2021/05/07\n@contact: xiangqing.shen@njust.edu.cn\n\"\"\"\n\n\nimport torch\n\n# Priors\n\n\ndef gaussian_prior(name, log2pi, mu, sigma, device):\n \"\"\"\n Args:\n *args: {\"mu\": , \"sigma\"... | [
[
"torch.sum",
"torch.randn",
"torch.tensor",
"torch.cuda.is_available",
"torch.log"
]
] |
lkilcher/dolfyn-light | [
"416bf6aa8a3455cebf973f416c9e4ba89a801a71"
] | [
"dolfyn/adv/motion.py"
] | [
"import numpy as np\nimport scipy.signal as sig\nfrom scipy.integrate import cumtrapz\nfrom .rotate import inst2earth, _rotate_vel2body\nimport warnings\n\n\nclass CalcMotion(object):\n\n \"\"\"\n A 'calculator' for computing the velocity of points that are\n rigidly connected to an ADV-body with an IMU.\n... | [
[
"numpy.ones",
"scipy.signal.butter",
"numpy.einsum",
"scipy.integrate.cumtrapz",
"numpy.linalg.inv",
"numpy.cos",
"scipy.signal.filtfilt",
"numpy.tan",
"numpy.array",
"numpy.sin",
"numpy.dot"
]
] |
OSUPCVLab/PlantDiseaseCNN | [
"aeed18e9e30e53670d3e9a0bd7bd71cc73f01691"
] | [
"dcgan-generat images/model/Generator.py"
] | [
"import torch.nn as nn\n\nclass Generator(nn.Module):\n def __init__(self, nc, ngf, nz):\n super(Generator,self).__init__()\n self.layer1 = nn.Sequential(nn.ConvTranspose2d(nz,ngf*32,kernel_size=4),\n nn.BatchNorm2d(ngf*32),\n nn.ReLU(... | [
[
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.nn.Tanh",
"torch.nn.ConvTranspose2d"
]
] |
rcjackson/ACT | [
"c57fb55094b142bbbef63e7069d4024049996139"
] | [
"act/qc/qctests.py"
] | [
"\"\"\"\nact.qc.qctests\n------------------------------\n\nHere we define the methods for performing the tests and putting the\nresults in the ancillary quality control varible. If you add a test\nto this file you will need to add a method reference in the main\nqcfilter class definition to make it callable.\n\n\"\... | [
[
"numpy.diff",
"numpy.less",
"numpy.greater_equal",
"numpy.append",
"numpy.ma.masked_outside",
"pandas.merge_asof",
"numpy.absolute",
"numpy.isnan",
"numpy.ma.masked_inside",
"numpy.where",
"numpy.unique",
"numpy.equal",
"numpy.greater",
"pandas.Timedelta",
... |
aishraghavan/introtodeeplearning | [
"2cd42e4279cea670ee45b95e1ca92ae899eaf721"
] | [
"mitdeeplearning/lab3.py"
] | [
"import io\nimport base64\nfrom IPython.display import HTML\nimport gym\nimport numpy as np\n\ndef play_video(filename):\n encoded = base64.b64encode(io.open(filename, 'r+b').read())\n embedded = HTML(data='''\n <video controls>\n <source src=\"data:video/mp4;base64,{0}\" type=\"video/mp4\" ... | [
[
"numpy.expand_dims"
]
] |
zubairahmed-ai/keras-yolo3 | [
"5ba9ab3c99ee1b5e71b614a5464cb316d35cc9b3"
] | [
"yolo.py"
] | [
"#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nRun a YOLO_v3 style detection model on test images.\n\"\"\"\n\nimport colorsys\nimport os\nimport random\nimport time\nimport cv2\nimport numpy as np\nfrom keras import backend as K\nfrom keras.models import load_model\nfrom PIL import Image, ImageDraw, Imag... | [
[
"numpy.array",
"numpy.expand_dims",
"numpy.floor",
"numpy.asarray"
]
] |
DavidAdamczyk/tensorflow-cmake | [
"8d848fae993a791dd44bc9cdcf9ad91f5795bf52"
] | [
"custom_op/example.py"
] | [
"#!/usr/bin/env python\n# 2018, Patrick Wieschollek <mail@patwie.com>\n\nfrom __future__ import print_function\nimport numpy as np\nimport tensorflow as tf\nfrom user_ops import matrix_add\n\nnp.random.seed(42)\ntf.set_random_seed(42)\n\nmatA = np.random.randn(1, 2, 3, 4).astype(np.float32) * 10\nmatB = np.random.r... | [
[
"tensorflow.placeholder",
"numpy.random.randn",
"numpy.random.seed",
"tensorflow.set_random_seed",
"tensorflow.Session"
]
] |
62theories/tf-flask | [
"c6954f0f3c4082165c92c77bb06d2fec6e75a8c4"
] | [
"official/projects/edgetpu/nlp/utils/utils_test.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.test.main",
"tensorflow.io.gfile.GFile"
]
] |
kozodoi/BMS-Molecular-Translation | [
"881b252a3c30e5b0afce2ce2c5da73d02755394d"
] | [
"codes/decoder.py"
] | [
"####### RNN DECODER\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass Attention(nn.Module):\n '''\n Attention network for calculate attention value\n '''\n def __init__(self, encoder_dim, decoder_dim, attention_dim):\n '''\n :param encoder_dim: input size of... | [
[
"torch.ones",
"torch.nn.Linear",
"torch.argmax",
"torch.repeat_interleave",
"torch.LongTensor",
"torch.nn.Softmax",
"torch.nn.Embedding",
"torch.nn.Parameter",
"torch.nn.LSTMCell",
"torch.cat",
"torch.zeros",
"torch.nn.Sigmoid",
"torch.nn.ReLU",
"torch.nn.Dr... |
ijcai2022-5500/anego | [
"9a2e5f29f0ec0787ad8ce7822089345053442887"
] | [
"cocoa/analysis/analyzer.py"
] | [
"\"\"\"Functions that analyze dialogues and models.\n\"\"\"\nimport json\nfrom collections import defaultdict\nimport numpy as np\n\nfrom cocoa.core.entity import is_entity\nfrom cocoa.model.util import entropy, safe_div\nfrom cocoa.model.counter import build_vocabulary, count_ngrams\nfrom cocoa.model.ngram import ... | [
[
"numpy.power"
]
] |
qdmy/Adelaidet-Quantization | [
"e88cf41c62dc3944d2bd57ffc1d365535b0a1c4b"
] | [
"codebase/third_party/spos_ofa/ofa/imagenet_classification/networks/mobilenet_v3.py"
] | [
"# Once for All: Train One Network and Specialize it for Efficient Deployment\n# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han\n# International Conference on Learning Representations (ICLR), 2020.\n\nimport copy\nimport torch.nn as nn\n\nfrom codebase.third_party.spos_ofa.ofa.utils.layers import set_lay... | [
[
"torch.nn.ModuleList"
]
] |
Soum-Soum/Tensorflow_Face_Finder | [
"fec6c15d2df7012608511ad87f4b55731bf99478"
] | [
"venv1/Lib/site-packages/tensorflow/python/keras/_impl/keras/layers/advanced_activations.py"
] | [
"# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\n#\... | [
[
"tensorflow.python.keras._impl.keras.backend.greater",
"tensorflow.python.util.tf_export.tf_export",
"tensorflow.python.keras._impl.keras.backend.relu",
"tensorflow.python.keras._impl.keras.initializers.serialize",
"tensorflow.python.keras._impl.keras.backend.cast_to_floatx",
"tensorflow.p... |
WangY0906/mmdetection-for-study | [
"c89703006a2a5250f4d1c71e0aad958d72526885"
] | [
"mmdet/models/detectors/cascade_rcnn.py"
] | [
"from __future__ import division\n\nimport torch\nimport torch.nn as nn\n\nfrom .base import BaseDetector\nfrom .test_mixins import RPNTestMixin\nfrom .. import builder\nfrom ..registry import DETECTORS\nfrom mmdet.core import (build_assigner, bbox2roi, bbox2result, build_sampler,\n merge_aug... | [
[
"torch.ones",
"torch.no_grad",
"torch.nn.ModuleList",
"torch.zeros",
"torch.cat"
]
] |
KevinKronk/multiclass-classification | [
"8a938e5dd3418caad24118f75fa11f2aab856b2f"
] | [
"multiclass_classification/cost.py"
] | [
"import numpy as np\nfrom scipy.special import expit\n\n\ndef log_cost(theta, x, y_i, hyper_p):\n \"\"\"\n Logistic regression cost function with regularization.\n\n Parameters\n ----------\n theta : array_like\n Shape (n+1,). Parameter values for function.\n\n x : a... | [
[
"numpy.sum",
"numpy.log",
"scipy.special.expit",
"numpy.power"
]
] |
Swapnil8991/RLonASG | [
"d040fb5ac4431198b92544958d70924d5bec92ff"
] | [
"GameEnvs/ConnectFour/generateData.py"
] | [
"import numpy as np\n\nfrom C4Board import C4Board\nfrom random import seed, choice\nfrom os import urandom\nfrom time import time\nfrom itertools import cycle\nfrom sys import argv\n\n\ndef getTrainingData(noOfGames, dataGenFlag, inpTrainFile, outTrainFile):\n\t\n\tturnFlag = 0\n\tgameEndState = 0\n\t\n\ttempOutTr... | [
[
"numpy.array",
"numpy.savetxt"
]
] |
alcunha/iwildcam2021ufam | [
"243c3e4b91d5756d1e7fcdf8ae75344a373d3b84"
] | [
"classification/eval_main.py"
] | [
"# Copyright 2021 Fagner Cunha\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.io.gfile.GFile",
"numpy.random.seed",
"tensorflow.expand_dims",
"sklearn.metrics.accuracy_score",
"tensorflow.argmax",
"tensorflow.random.set_seed",
"tensorflow.compat.v1.logging.info"
]
] |
wsuchy/estimator | [
"b22a912de2693322622d6f50e3a19e98fecac441"
] | [
"tensorflow_estimator/python/estimator/hooks/basic_session_run_hooks_test.py"
] | [
"# pylint: disable=g-bad-file-header\n# 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/l... | [
[
"tensorflow.python.summary.summary.scalar",
"tensorflow.python.data.ops.dataset_ops.Dataset.range",
"tensorflow.python.data.ops.dataset_ops.make_one_shot_iterator",
"tensorflow.python.training.training_util.create_global_step",
"tensorflow.python.training.session_run_hook.SessionRunContext",
... |
clementpoiret/sparseml | [
"8442a6ef8ba11fb02f5e51472dd68b72438539b9"
] | [
"tests/sparseml/pytorch/models/classification/test_mobilenet.py"
] | [
"# Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Un... | [
[
"torch.randn"
]
] |
Totoketchup/Adaptive-MultiSpeaker-Separation | [
"8e7e869b8050643a777e315d1ddac577a8dc85ff"
] | [
"models/SC_V2.py"
] | [
"# -*- coding: utf-8 -*-\nimport tensorflow as tf\nfrom utils.ops import BLSTM, Conv1D, Reshape, Normalize, f_props, scope, log10\nfrom models.network import Separator\n\nclass L41ModelV2(Separator):\n\n\tdef __init__(self, graph=None, **kwargs):\n\t\tkwargs['mask_a'] = 1.0\n\t\tkwargs['mask_b'] = -1.0\n\n\t\tsuper... | [
[
"tensorflow.nn.sigmoid",
"tensorflow.summary.scalar",
"tensorflow.shape",
"tensorflow.gather_nd",
"tensorflow.expand_dims",
"tensorflow.reduce_mean",
"tensorflow.cast",
"tensorflow.name_scope",
"tensorflow.abs",
"tensorflow.square",
"tensorflow.identity",
"tensorflo... |
Cury30/Anomaly_detection | [
"fad172f6d9cc8dad73a79bc89290c578d67e2b35"
] | [
"create_bg.py"
] | [
"import cv2\nimport os\nimport numpy as np\nimport argparse\nimport uuid\nimport sys\nimport scipy.spatial\nimport matplotlib.pyplot as plt\n\n\nmodel_path = str(sys.argv[1])\nROADMASKDIR = model_path + \"/RoadMask/\"\nMINUTEMASKDIR = model_path + \"/MinuteMask/\"\n#INPUTVIDEOPATH = os.environ['AICITYVIDEOPATH'] + ... | [
[
"numpy.ones",
"numpy.zeros",
"numpy.copyto",
"numpy.log",
"numpy.absolute"
]
] |
spencerking/qiskit-experiments | [
"11a254b010afe35933aaabac70de12b5b5a244bf"
] | [
"qiskit_experiments/library/quantum_volume/qv_analysis.py"
] | [
"# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2021.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any modifications or ... | [
[
"numpy.cumsum",
"numpy.median",
"numpy.arange",
"numpy.real",
"numpy.mean"
]
] |
houcharlie/federated-legacy | [
"cb10a9cdcea33288f8113e7445782d21c8c65f81"
] | [
"tensorflow_federated/python/core/utils/encoding_utils_test.py"
] | [
"# Copyright 2019, The TensorFlow Federated 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 a... | [
[
"tensorflow.reduce_min",
"tensorflow.reduce_max",
"tensorflow.identity",
"numpy.random.rand",
"tensorflow.TensorSpec",
"numpy.array",
"tensorflow.constant",
"tensorflow.reduce_sum",
"tensorflow.dtypes.as_dtype"
]
] |
stefantaubert/waveglow | [
"5169ec751343a3e3008209a1a2f055e71a65908a"
] | [
"src/waveglow/core/inference.py"
] | [
"import datetime\nfrom dataclasses import dataclass\nfrom logging import Logger\nfrom pathlib import Path\nfrom typing import Callable, Dict, List, Optional, Tuple\n\nimport imageio\nimport numpy as np\nimport torch\nfrom audio_utils import get_duration_s, normalize_wav\nfrom audio_utils.audio import concatenate_au... | [
[
"torch.autograd.Variable",
"torch.FloatTensor",
"pandas.DataFrame"
]
] |
Noczio/VoorSpelling | [
"51e30ab3f3b2e346c6eb56578818020e142a3adb"
] | [
"AppVoor/resources/backend_scripts/parameter_search.py"
] | [
"from abc import ABC, abstractmethod\nfrom typing import Any\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.model_selection import GridSearchCV\nfrom skopt import BayesSearchCV\nfrom skopt.space import Real, Integer, Categorical\n\nfrom resources.backend_scripts.switcher import Switch\n\nNpArray = np.ndar... | [
[
"numpy.arange",
"sklearn.model_selection.GridSearchCV"
]
] |
svenaoki/zenml | [
"b94dff83f0e7c8ab29e99d6b42a0c906a3512b63"
] | [
"examples/not_so_quickstart/steps/torch_steps.py"
] | [
"# Copyright (c) ZenML GmbH 2021. 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless req... | [
[
"torch.utils.data.DataLoader",
"torch.nn.Linear",
"torch.nn.Flatten",
"torch.nn.functional.nll_loss",
"torch.no_grad",
"torch.cuda.is_available",
"torch.optim.lr_scheduler.StepLR",
"torch.utils.data.TensorDataset",
"torch.Tensor"
]
] |
gotgenes/CpGHMMExample | [
"d55e02ee930da040808e278bd1216ddc25116d0f"
] | [
"CpGHMMExample/gencpgdata.py"
] | [
"#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n\n# Copyright (c) 2012 Christopher D. Lasher\n#\n# This software is released under the MIT License. Please see\n# LICENSE.txt for details.\n\n\n\"\"\"Generates a random sequence with CpG islands.\n\nThis script produces three outfiles:\n\n* a FASTA format sequence fi... | [
[
"numpy.array",
"numpy.savetxt",
"numpy.concatenate"
]
] |
wangyusu/pymatgen | [
"a90af2fe71eff15134ca33c6e58f07caba425ae9"
] | [
"pymatgen/symmetry/tests/test_analyzer.py"
] | [
"# coding: utf-8\n# Copyright (c) Pymatgen Development Team.\n# Distributed under the terms of the MIT License.\n\n\nimport unittest\nfrom pathlib import Path\nimport os\nimport numpy as np\n\nfrom pymatgen.core.operations import SymmOp\nfrom pymatgen.core.sites import PeriodicSite\nfrom pymatgen.core.structure imp... | [
[
"numpy.random.uniform",
"numpy.eye",
"numpy.random.seed",
"numpy.array",
"numpy.dot",
"numpy.round"
]
] |
QPC-database/multimodal-affinities | [
"c3298e8db56a8b41110cc5681852f9f15d6deaa6"
] | [
"multimodal_affinities/visualization/image_utils.py"
] | [
"import cv2\nimport numpy as np\nfrom PIL import Image\nimport random\nimport string\nimport os\n\nclass ImageUtils(object):\n @staticmethod\n def read_image_for_bokeh(image_path, resize_height=None):\n # Open image, and make sure it's RGB*A*\n image = Image.open(image_path).convert('RGBA')\n ... | [
[
"numpy.asarray",
"numpy.empty"
]
] |
RegentLee/master_research | [
"ee8e45abc890c7103c1c9917954c5958b48782f6"
] | [
"util/my_util.py"
] | [
"import numpy as np\n\n#############################################\n# variable #\n#############################################\nval = False\nx = 0\ny = 0\n\n\n#############################################\n# function #\n###########################... | [
[
"numpy.sqrt",
"numpy.power",
"numpy.abs"
]
] |
GregDMeyer/dynamite | [
"440f0c3674bf12a835b8ad4b3c10c303c2d28265"
] | [
"dynamite/operators.py"
] | [
"\"\"\"\nThis module provides the building blocks for Hamiltonians, and\ndefines their built-in behavior and operations.\n\"\"\"\n\nimport numpy as np\n\nfrom . import config, validate, msc_tools\nfrom .computations import evolve, eigsolve\nfrom .subspaces import Full\nfrom .states import State\n\nclass Operator:\n... | [
[
"matplotlib.pyplot.figure",
"numpy.ndarray",
"matplotlib.pyplot.imshow",
"numpy.log",
"matplotlib.pyplot.show",
"numpy.array_equal",
"numpy.array",
"numpy.ascontiguousarray",
"numpy.unique"
]
] |
Virodroid/galaxy-cluster | [
"11c0b365ed94e1f141b55e905f93abcbf39b3657"
] | [
"clustering/aggOnFeatures.py"
] | [
"from sklearn.cluster import AgglomerativeClustering\nimport pandas as pd\nimport numpy as np\nfrom zoobot import label_metadata, schemas\nfrom sklearn.metrics import confusion_matrix, precision_recall_fscore_support\nfrom scipy.optimize import linear_sum_assignment as linear_assignment\nimport time\n\ndef findChoi... | [
[
"numpy.zeros_like",
"sklearn.metrics.precision_recall_fscore_support",
"pandas.read_csv",
"numpy.asarray",
"numpy.argmax",
"sklearn.metrics.confusion_matrix",
"numpy.max",
"numpy.array",
"pandas.DataFrame.from_dict"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.