repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
vkso/FER
[ "b7207341139ff451753a4c4640530e915673fc7c" ]
[ "train.py" ]
[ "import myMethod as myMethod\nfrom datetime import datetime\nfrom customParameters import *\nfrom tensorflow import keras\nimport matplotlib.pyplot as plt\nimport tensorflow as tf\nimport os\nimport argparse\n\n# python train.py --gpus 1 --model myModel --train_name fc1024\nparser = argparse.ArgumentParser(descript...
[ [ "tensorflow.keras.callbacks.ModelCheckpoint", "matplotlib.pyplot.imshow", "matplotlib.pyplot.title", "tensorflow.distribute.MirroredStrategy", "matplotlib.pyplot.subplot", "tensorflow.keras.callbacks.TensorBoard", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.2", "2.3", "2.4", "2.5", "2.6" ] } ]
flavorfan/deep-learning-coursera
[ "6aa1274a450fcb7a57c04072fe3bcf416501bdc6" ]
[ "Sequence Models/Trigger word detection/rnn_model.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.mlab as mlab\n\nimport pyaudio\n\nfrom keras.callbacks import ModelCheckpoint\nfrom keras.callbacks import TensorBoard\nfrom keras.models import Model, load_model, Sequential\nfrom keras.layers import Dense, Activation, Dropout, Input, Masking,...
[ [ "numpy.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kortemaki/OpenNMT-py
[ "fa793257966c23280e5a72bd43e56a1e998e47f7" ]
[ "onmt/modules/GlobalAttention.py" ]
[ "import torch\nimport torch.nn as nn\n\nfrom onmt.Utils import aeq, sequence_mask\n\nclass GlobalAttention(nn.Module):\n \"\"\"\n Global attention takes a matrix and a query vector. It\n then computes a parameterized convex combination of the matrix\n based on the input query.\n\n Constructs a unit m...
[ [ "torch.nn.Softmax", "torch.cat", "torch.nn.Tanh", "torch.nn.Linear", "torch.bmm" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rkarp/polars
[ "106bf5802126702cee8bc5bc21f2392bd5eebe98" ]
[ "py-polars/tests/test_series.py" ]
[ "from polars import Series\nfrom polars.datatypes import *\nimport polars as pl\nimport numpy as np\nimport pytest\nimport pyarrow as pa\n\n\ndef create_series() -> \"Series\":\n return Series(\"a\", [1, 2])\n\n\ndef test_to_frame():\n assert create_series().to_frame().shape == (2, 1)\n\n\ndef test_bitwise_op...
[ [ "numpy.array", "numpy.exp", "numpy.multiply" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
BrancoLab/LocomotionControl
[ "6dc16c29c13b31f6ad70af954a237e379ee10846" ]
[ "draw/tracking.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nfrom typing import Union\n\nfrom myterial import grey_dark\n\n\nclass Tracking:\n \"\"\"\n Renders tracking as a 2D trace\n \"\"\"\n\n def __init__(\n self,\n x: Union[pd.Series, np.ndarray],\n y: Union[p...
[ [ "matplotlib.pyplot.gca" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
fujitaushizu/ArknightsAutoHelper
[ "d0bb47b4a141c791369f89093cef27fa25d2cad2" ]
[ "imgreco/stage_ocr.py" ]
[ "from functools import lru_cache\nimport cv2\nimport numpy as np\nfrom . import resources\nimport zipfile\nfrom . import common\nfrom util.richlog import get_logger\nimport config\n\n\nidx2id = ['-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',\n 'K', ...
[ [ "numpy.asarray", "numpy.where", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
chqiwang/sa-nmt
[ "0793130c916483f2a93c85d73c6ed4831da05146" ]
[ "train_wkd.py" ]
[ "import os\nimport time\nimport logging\nfrom argparse import ArgumentParser\nimport tensorflow as tf\nimport yaml\n\nfrom evaluate import Evaluator\nfrom models import *\nfrom utils import DataReader, AttrDict, available_variables, expand_feed_dict\n\n\nclass BreakLoopException(Exception):\n pass\n\n\ndef wrap_...
[ [ "tensorflow.Graph", "tensorflow.get_variable", "tensorflow.summary.FileWriter", "tensorflow.train.latest_checkpoint", "tensorflow.contrib.framework.load_checkpoint", "tensorflow.global_variables", "tensorflow.ConfigProto", "tensorflow.global_variables_initializer", "tensorflow....
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
skiran252/FARM
[ "8460d78910a20d19a5da12de6e9bff11f68332a7" ]
[ "farm/file_utils.py" ]
[ "\"\"\"\nUtilities for working with the local dataset cache.\nThis file is adapted from the AllenNLP library at https://github.com/allenai/allennlp\nCopyright by the AllenNLP authors.\n\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport json\nimport logging\nimport o...
[ [ "torch.hub._get_torch_home", "numpy.meshgrid" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
NrctcV/BigQuery-Antifraud-reporting
[ "6167a44159f939c5993423b1196992d6c6ecc34f" ]
[ "main.py" ]
[ "\nimport datetime\nimport numpy as np\nimport pandas as pd\nimport google.oauth2.credentials\nimport pandas_gbq\n\n\n# Setup gcloud SDK\n# login to gcloud\n# gcloud auth application-default login\n# print token\n# fill oauth2 creds and project name\n# install tqdm\n# install xlxswriter\n\n\ndef create_date():\n ...
[ [ "pandas.ExcelWriter", "pandas.pivot_table" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
EleutherAGI/summarisation
[ "d432873e1ba171f47371b8b0df7235478b52ca99" ]
[ "preprocess_tldr_dataset.py" ]
[ "import json\nfrom collections import OrderedDict, Counter\nfrom transformers import GPT2TokenizerFast\nfrom tqdm import tqdm\nfrom sklearn.model_selection import train_test_split\n\ndata = []\nwith open('./data/tldr-training-data.jsonl') as f:\n for line in f:\n data.append(json.loads(line))\n\ndef view_...
[ [ "sklearn.model_selection.train_test_split" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
KantiCodes/flatland-rl
[ "fcc10e83d2548470ebaa5540b967db0940eb30dd" ]
[ "baselines/reinforcement_learning/multi_agent_training.py" ]
[ "from datetime import datetime\nimport os\nimport random\nimport sys\nfrom argparse import ArgumentParser, Namespace\nfrom pathlib import Path\nfrom pprint import pprint\n\nimport psutil\nfrom flatland.utils.rendertools import RenderTool\nfrom torch.utils.tensorboard import SummaryWriter\nimport numpy as np\nimport...
[ [ "numpy.random.seed", "numpy.power", "numpy.min", "numpy.round", "numpy.max", "numpy.std", "numpy.mean", "torch.utils.tensorboard.SummaryWriter", "numpy.array", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lumbric/pyam
[ "a73fc6a78871988cd842e52111c00879cf90882b" ]
[ "pyam/plotting.py" ]
[ "import itertools\nimport warnings\n\ntry:\n import cartopy\n cartopy_message = 'all good!'\nexcept ImportError as e:\n cartopy = None\n cartopy_message = str(e)\n\nimport matplotlib.pyplot as plt\nimport matplotlib.colors as colors\nimport matplotlib.cm as cmx\nimport matplotlib.patches as mpatches\nim...
[ [ "pandas.concat", "numpy.unique", "matplotlib.pyplot.ylim", "matplotlib.patches.Rectangle", "matplotlib.pyplot.get_cmap", "matplotlib.colors.Normalize", "pandas.DataFrame", "matplotlib.pyplot.subplots", "matplotlib.pyplot.colorbar", "numpy.argwhere", "matplotlib.pyplot.x...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Shriyam-Avasthi/Virtual-Whiteboard
[ "9c0fa39319d360094a380f3d5faf3a6f26531256" ]
[ "GUI.py" ]
[ "from ui_GUI import *\r\n# from PySide2 import *\r\nimport sys \r\nimport cv2\r\nfrom PySide2.QtGui import QPixmap\r\nfrom PySide2 import QtGui\r\nfrom functools import partial\r\nimport numpy as np\r\nimport mouse\r\nfrom MultiThreading import MainThread\r\nfrom Whiteboard import WhiteBoard\r\nfrom Tools import To...
[ [ "numpy.interp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
e2crawfo/dps
[ "968a87ed8580f58b46e75463d13a5966f4e772eb" ]
[ "dps/train.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nimport time\nfrom contextlib import ExitStack\nimport numpy as np\nfrom pprint import pformat\nimport datetime\nimport os\nimport pandas as pd\nimport dill\nfrom collections import defaultdict\nimport traceback\nimport json\nimport subprocess...
[ [ "pandas.DataFrame.from_records", "pandas.concat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
wilsonify/sktime
[ "68395d44bd3f46b0801c506e23e889dd54999d29" ]
[ "examples/scripts/dictionary_based_classification.py" ]
[ "# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n# jupytext:\n# text_representation:\n# extension: .py\n# format_name: light\n# format_version: '1.5'\n# jupytext_version: 1.11.1\n# kernelspec:\n# display_name: Python 3\n# language: python\n# name: python3\n# ---\n\n# # Dictio...
[ [ "sklearn.metrics.accuracy_score" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
violet-zct/fairseq
[ "5fd9b555428f004f72d4fe89e2a9d2c863c07581", "5fd9b555428f004f72d4fe89e2a9d2c863c07581" ]
[ "fairseq/modules/typed_transformer_layer.py", "fairseq/data/monolingual_dataset.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom fairseq import utils\nfrom fairseq.modules import LayerNo...
[ [ "torch.nn.functional.dropout", "torch.nn.init.constant_", "torch.cat", "torch.nn.Linear", "torch.nn.init.xavier_uniform_" ], [ "torch.LongTensor", "numpy.array", "numpy.lexsort" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
XiangqianMa/AI-Competition-HuaWei
[ "d479b772f446033d32a124b80a1f9cd835988020" ]
[ "losses/CE_label_smooth.py" ]
[ "import torch\nimport torch.nn as nn\n\n\nclass CrossEntropyLabelSmooth(nn.Module):\n \"\"\"Cross entropy loss with label smoothing regularizer.\n\n Reference:\n Szegedy et al. Rethinking the Inception Architecture for Computer Vision. CVPR 2016.\n Equation: q_i = (1 - epsilon) * a_i + epsilon / N.\n\n ...
[ [ "torch.nn.LogSoftmax", "torch.ones", "torch.sort", "torch.Tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
FeliMe/autoseg
[ "627a6b2bda3f6da8ea7c65742b9e9d3b7d6cc845" ]
[ "uas_mood/utils/data_utils.py" ]
[ "from PIL import Image\nimport matplotlib.pyplot as plt\nimport nibabel as nib\nimport numpy as np\nfrom skimage.exposure import equalize_hist\nfrom skimage.transform import resize\nimport torch\nfrom torchvision import transforms\n\n\ndef plot(image, f=None):\n plt.axis(\"off\")\n plt.imshow(image, cmap=\"gr...
[ [ "matplotlib.pyplot.imshow", "numpy.pad", "numpy.eye", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "numpy.transpose", "numpy.dtype", "torch.tensor", "numpy.zeros_like", "matplotlib.pyplot.axis", "numpy.moveaxis", "matplotlib.pyplot.show", "numpy.fl...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wj1tr0y/openpose
[ "b0971af64080e36992b588becdd920823fac179d" ]
[ "1_extract_pose.py" ]
[ "'''\n@Author: Jilong Wang\n@Date: 2019-01-10 14:12:01\n@LastEditors: Jilong Wang\n@Email: jilong.wang@watrix.ai\n@LastEditTime: 2019-01-15 11:16:42\n@Description: file content\n'''\n# From Python\n# It requires OpenCV installed for Python\nimport sys\nimport cv2\nimport os\nfrom sys import platform\nimport numpy a...
[ [ "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
yangpuhai/Granularity-in-DST
[ "1d9a42966ebda675d71b4b54412133cef63ec931" ]
[ "MGL_BERTDST/BERTDST_utils/MultiWOZ_data_utils.py" ]
[ "import numpy as np\nimport json\nfrom torch.utils.data import Dataset\nimport torch\nimport random\nimport re\nfrom copy import deepcopy\nfrom collections import OrderedDict\nfrom .fix_label import fix_general_label_error\nfrom .fix_value import fix_value_dict\nfrom .fix_value import fix_time\n\nEXPERIMENT_DOMAINS...
[ [ "numpy.array", "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
typicasoft/transformers
[ "a1a8ffa5126ced93c12dfb677cbe3a069f48dcf3" ]
[ "tests/test_modeling_tf_common.py" ]
[ "# coding=utf-8\n# Copyright 2019 HuggingFace Inc.\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 appl...
[ [ "tensorflow.convert_to_tensor", "tensorflow.keras.models.load_model", "tensorflow.zeros", "tensorflow.equal", "tensorflow.debugging.assert_near", "tensorflow.config.list_physical_devices", "torch.no_grad", "numpy.random.randint", "tensorflow.keras.Input", "tensorflow.saved_...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "1.12", "2.6", "2.2", "1.13", "2.3", "2.4", "1.4", "2.9", "1.5", "1.7", "2.5", "0.12", "1.0", "2.8", "1...
sgarofoli/tf-quant-finance
[ "0dafa7379100b343e22ef2d4185e442f8520f8a6" ]
[ "tf_quant_finance/math/random_ops/stateless.py" ]
[ "# Copyright 2019 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.convert_to_tensor", "tensorflow.argsort", "tensorflow.shape", "tensorflow.compat.v1.name_scope" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PranithChowdary/DataQ
[ "1070038b14714156c4a9a7c06f606e155d6272b1" ]
[ "downloader.py" ]
[ "import pandas as pd\nfrom io import BytesIO\nimport base64\n\n\ndef to_excel(df):\n output = BytesIO()\n writer = pd.ExcelWriter(output, engine='xlsxwriter')\n df.to_excel(writer, index = False)\n writer.save()\n processed_data = output.getvalue()\n return processed_data\n\n\ndef get_table_downlo...
[ [ "pandas.ExcelWriter" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
NKrvavica/fqs
[ "d95d684d867dcb89d0a3853569d12f1f955f1d5d" ]
[ "test_quadratic_roots.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Jan 3 11:14:52 2019\n\n@author: NKrvavica\n\"\"\"\n\nimport timeit\nimport numpy as np\nimport fqs\n\n\ndef eig_roots(p):\n '''Finds cubic roots via numerical eigenvalue solver\n `npumpy.linalg.eigvals` from a 3x3 companion matrix'''\n a, b = (p[:, 1]/p[:, ...
[ [ "numpy.linalg.eigvals", "numpy.sort", "numpy.roots", "numpy.random.rand", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tamasorosz/artap
[ "e8df160bfc9c378c3fc96b0b86e92d75d89cf26b" ]
[ "examples/mechanical_design/gear_design.py" ]
[ "from artap.problem import Problem\nfrom artap.algorithm_genetic import NSGAII\nfrom artap.results import Results\n\nimport matplotlib.pyplot as plt\n\n\nclass GearDesignProblem(Problem):\n \"\"\"\n Example from K.DEb Multi-objective evolutionary optimization problems, Wiley, 2001.\n pp 434.\n\n The obj...
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.scatter", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jordanopensource/arabic-ocr-studygroup
[ "3a39593ec28976c4209c813c87d0f37db72dcc03" ]
[ "starting-code.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\n\ndef to_categorical (y, num_classes=None):\n y = np.array(y, dtype='int').ravel()\n if not num_classes: num_classes = np.max(y) + 1\n n = y.shape[0]\n categorical = np.zeros((n, num_classes))\n categorical[np.arange(n), y] = 1\n return categ...
[ [ "numpy.logical_and", "numpy.arange", "matplotlib.pyplot.subplots", "numpy.max", "numpy.mean", "numpy.array", "matplotlib.pyplot.show", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jesperiksson/SoccermaticsForPython
[ "aeb6cdfd4dfd0acfc15e0d47024693c01ec241d8" ]
[ "classes.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Oct 24 15:00:30 2020\n\n@author: jesper\n\"\"\"\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.colors as colors\nimport seaborn as sn\n\nclass Table():\n # Makes a table at the end of a season\n...
[ [ "matplotlib.pyplot.legend", "matplotlib.colors.PowerNorm", "numpy.min", "numpy.arange", "pandas.DataFrame", "numpy.random.poisson", "matplotlib.pyplot.ylabel", "numpy.max", "matplotlib.pyplot.xlabel", "numpy.array", "numpy.sum", "matplotlib.pyplot.show", "matplo...
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
easai/stat
[ "b0485454889531af15073d6b654c5a8ac70e6a98" ]
[ "src/stat/variation.py" ]
[ "\"\"\"\n変動係数\nCV = Var[X]/E[X]\nscipy.stats.variation(array)\n\"\"\"\n\nfrom scipy import stats\n\nBiden=[28.2,28.3,25.6]\nSanders=[17.5,17.6,15.7]\nWarren=[21.3,20.6,22.7]\n\nprint(stats.variation(Biden))\nprint(stats.variation(Sanders))\nprint(stats.variation(Warren))\n\n\"\"\"\n0.04567194460232075\n0.0515582710...
[ [ "scipy.stats.variation" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "0.16", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "1.0", "0.17", "1.3", "1.8" ...
rbehal/CMED-Image-Analysis
[ "6fed72a381357fd964e5f8aab05c9810c419e681" ]
[ "ImageViewer.py" ]
[ "from PyQt5.QtGui import QImage, QPixmap, QPainter\nfrom PyQt5.QtWidgets import QApplication, QWidget\nfrom PyQt5.QtCore import QTimer\nfrom PyQt5 import QtCore, QtGui, QtWidgets\n\nimport matplotlib.pyplot as plt\nfrom matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg\nfrom matplotlib.figure import Figur...
[ [ "matplotlib.figure.Figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
weimegan/fireroad053
[ "45b82ee29798cf51cbea3ad5fc1d4a8fbdd08507" ]
[ "combos.py" ]
[ "import json\nimport csv\nimport pandas as pd\nimport numpy as np\nimport itertools\n\nf = open('finaldata/parsedsp21_dummy.json')\ndata = json.load(f)\n\nclassescsv = pd.read_csv('finaldata/parsedsp21_actual_classes.csv')\n\n#print(classescsv['id'])\nindToId = dict()\nfor i in range(len(classescsv)):\n indToId[...
[ [ "pandas.read_csv", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
smartmzl/Quanlse
[ "7d5d00d5401d801aeb7cbcee381ccdd07331e8a7" ]
[ "Quanlse/QOperation/RotationGate.py" ]
[ "#!/usr/bin/python3\n# -*- coding: utf8 -*-\n\n# Copyright (c) 2021 Baidu, 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/...
[ [ "numpy.sqrt", "numpy.eye", "numpy.cos", "numpy.sin", "numpy.exp", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cmougan/Novartis2021
[ "72a6f088929a5a4546760f4a453ec4a77faf5856" ]
[ "NN_files/nnet.py" ]
[ "import pandas as pd\n\nimport torch\nimport torch.nn as nn\nfrom torch.utils.data import Dataset\nimport numpy as np\nfrom gauss_rank_scaler import GaussRankScaler\nfrom sklearn.model_selection import train_test_split\n\nimport random\nimport os\n\n\nrandom.seed(0)\n\n\nclass ReadDataset(Dataset):\n \"\"\"Read ...
[ [ "torch.nn.BatchNorm1d", "torch.nn.Dropout", "pandas.read_csv", "torch.cat", "sklearn.model_selection.train_test_split", "torch.nn.Linear", "torch.nn.SELU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
michaeljohnclancy/spikeforest2
[ "93bdde2c570aef9426b3d7bceb69f3605c9f005a" ]
[ "working/tests/kilosort2_crash_tests/thisoneworks_ks2_boyden_singularity.py" ]
[ "#!/usr/bin/env python\n\nimport numpy as np\nfrom spikeforest2 import sorters\nfrom spikeforest2 import processing\nimport hither_sf as hither\nimport kachery as ka\nimport os\n\nos.environ['HITHER_USE_SINGULARITY'] = 'TRUE'\n\nrecording_path = 'sha1dir://49b1fe491cbb4e0f90bde9cfc31b64f985870528.paired_boyden32c/9...
[ [ "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ChZPan/CT-image-DeepLearningRegression
[ "38c4e2ca5427affa0cc628b34c14b85e01dbb33c" ]
[ "src/resnet50.py" ]
[ "import numpy as np\nimport tensorflow as tf\nfrom keras import backend as K\nfrom keras.layers import Dense, Dropout, Flatten, Conv2D, Input, Add, \\\n Activation, ZeroPadding2D, BatchNormalization, \\\n AveragePooling2D, MaxPooling2D, GlobalMaxPooling2D\nfrom keras....
[ [ "tensorflow.norm" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "1.0", "1.2" ] } ]
samuelbroscheit/kge
[ "208f310d199aa3c2059467ee24c28cae86bbc10b" ]
[ "kge/util/dump.py" ]
[ "import time\nimport os\nfrom collections import OrderedDict\nimport sys\nimport torch\nimport csv\nimport yaml\nimport re\nimport socket\nimport copy\n\nfrom kge.job import Trace\nfrom kge import Config\n\n\n## EXPORTED METHODS #####################################################################\n\n\ndef add_dump...
[ [ "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
JanS97/PlaNet
[ "c03c1d5b51fd20d1ec907f6591856d283092767e" ]
[ "main.py" ]
[ "import argparse\nfrom math import inf\nimport os\nimport numpy as np\nimport torch\nfrom torch import nn, optim\nfrom torch.distributions import Normal\nfrom torch.distributions.kl import kl_divergence\nfrom torch.nn import functional as F\nfrom torchvision.utils import make_grid, save_image\nfrom tqdm import tqdm...
[ [ "torch.randn_like", "torch.load", "torch.zeros", "torch.cat", "numpy.asarray", "torch.no_grad", "torch.cuda.is_available", "torch.device", "torch.ones", "numpy.zeros", "torch.nn.functional.pad", "torch.optim.Adam", "torch.full", "torch.distributions.Normal",...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hthieu166/selab-aic20-track-2
[ "5a87a075e64711388e06fc22171ee314cca1ae10" ]
[ "src/losses/triplet_loss_online_utils.py" ]
[ "from itertools import combinations\n\nimport numpy as np\nimport torch\n\n\ndef pdist(vectors):\n distance_matrix = -2 * vectors.mm(torch.t(vectors)) + vectors.pow(2).sum(dim=1).view(1, -1) + vectors.pow(2).sum(\n dim=1).view(-1, 1)\n return distance_matrix\n\n\nclass PairSelector:\n \"\"\"\n Im...
[ [ "torch.t", "numpy.logical_not", "torch.LongTensor", "numpy.logical_and", "numpy.random.choice", "numpy.argmax", "numpy.array", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
liyidi/MPT
[ "76c1376d73ade2ecb5bb1bdd171e6f4d266951e5" ]
[ "MPAtt/model/mobileNet.py" ]
[ "'''MobileNetV3 in PyTorch.\nSee the paper \"Inverted Residuals and Linear Bottlenecks:\nMobile Networks for Classification, Detection and Segmentation\" for more details.\n'''\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn import init\n\n\n\nclass hswish(nn.Module):\n def f...
[ [ "torch.nn.Sequential", "torch.nn.BatchNorm1d", "torch.nn.init.constant_", "torch.randn", "torch.nn.functional.avg_pool2d", "torch.nn.Conv2d", "torch.nn.functional.relu6", "torch.nn.Linear", "torch.nn.AdaptiveAvgPool2d", "torch.nn.init.normal_", "torch.nn.BatchNorm2d", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
awesome-archive/mixmatch
[ "77bf67ddf15fa51b6784d5aad1a4793b43352f7f" ]
[ "scripts/check_split.py" ]
[ "#!/usr/bin/env python\n\n# Copyright 2019 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 ...
[ [ "tensorflow.round" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "1.12", "2.6", "2.2", "1.13", "2.3", "2.4", "1.4", "2.9", "1.5", "1.7", "2.5", "0.12", "1.0", "2.8", "1...
AngelLiang/hacking-influxdb-python
[ "d5d12499f3755199d5eedd8b363450f1cf4073bd" ]
[ "influxdb/_dataframe_client.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"DataFrame client for InfluxDB.\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport math\nfrom collections import defaultdict\n\nimport pandas as pd\nimport numpy as ...
[ [ "pandas.concat", "pandas.to_datetime", "pandas.Series", "pandas.DataFrame", "numpy.int64", "pandas.Timestamp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zaxtax/arviz
[ "c78deefeeb355d3cee11a93fc148f9198dde8b35" ]
[ "arviz/tests/external_tests/test_data_cmdstan.py" ]
[ "# pylint: disable=no-member, invalid-name, redefined-outer-name\n# pylint: disable=too-many-lines\nimport os\n\nimport numpy as np\nimport pytest\n\nfrom ... import from_cmdstan\n\nfrom ..helpers import check_multiple_attrs\n\n\nclass TestDataCmdStan:\n @pytest.fixture(scope=\"session\")\n def data_directory...
[ [ "numpy.arange", "numpy.array", "numpy.isclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wecacuee/habitat-sim
[ "973ab45c08e8b6d7e578db87b25700fbfdd10a02" ]
[ "tests/test_simulator.py" ]
[ "import multiprocessing\nimport os.path as osp\nimport random\n\nimport magnum as mn\nimport numpy as np\nimport pytest\n\nimport examples.settings\nimport habitat_sim\n\n\ndef test_no_navmesh_smoke(sim):\n sim_cfg = habitat_sim.SimulatorConfiguration()\n agent_config = habitat_sim.AgentConfiguration()\n #...
[ [ "numpy.array", "numpy.isclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
geosharma/PyNite
[ "efffccdbff6727d3b271ba2937e35892d9df8c00" ]
[ "Examples/large_grid_frame/create_frame_data.py" ]
[ "## -*- coding: utf-8 -*-\n\"\"\"\nMIT License\n\nCopyright (c) 2020 tamalone1\n\"\"\"\nimport numpy as np\nimport itertools, csv, os\n\n# Nodes coordinates in a 3D rectangle\nx_values = np.linspace(0, 10, 5)\ny_values = np.linspace(0, 50, 11)\nz_values = np.linspace(0, 10, 5)\n\n# Create a 3D grid of nodes (list o...
[ [ "numpy.linspace" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
MrSyee/rl_algorithms
[ "5b5276982032f8a8a614b9466849b7b3ef245b3e" ]
[ "rl_algorithms/common/abstract/agent.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Abstract Agent used for all agents.\n\n- Author: Curt Park\n- Contact: curt.park@medipixel.io\n\"\"\"\n\nfrom abc import ABC, abstractmethod\nimport argparse\nimport os\nimport shutil\nimport subprocess\nfrom typing import Tuple, Union\n\nimport gym\nfrom gym.spaces import Discrete\n...
[ [ "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
William-An/WaveMusician
[ "d1829e51f8a6d7fee2ff5571375b7488681796bb" ]
[ "WaveForms/main.py" ]
[ "import dwf\nimport time\nimport sys\nimport random\nfrom mido import MidiFile\nfrom musicConstants import NOTES_FREQ\nfrom midi2Cmd import MidiFileParser\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n##\n# \n# @description MusicWave for Analog Discovery Device 2, using WaveForm SDK\n#\n# @author William\...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lbasek/named-entity-recognition
[ "d21e41442b67161285efe02a6cb032ce63b8ecf2" ]
[ "evaluation.py" ]
[ "import itertools\nimport sys\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom sklearn.metrics import confusion_matrix, precision_recall_fscore_support\n\nfrom utils.classification_report import classification_report\nfrom utils.plot_confusion_matrix_util import plot_confusion_matrix\n\n\ndef evaluate(m...
[ [ "numpy.set_printoptions", "sklearn.metrics.confusion_matrix", "matplotlib.pyplot.savefig", "sklearn.metrics.precision_recall_fscore_support", "numpy.argmax", "matplotlib.pyplot.close", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mzzhong2/isce2
[ "7e9c86910afcbe3e39815ebf5ecc744e0c9caee8" ]
[ "contrib/geo_autoRIFT/geogrid/GeogridOptical.py" ]
[ "#!/usr/bin/env python3\n\n#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n# Copyright 2019 California Institute of Technology. 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 Li...
[ [ "numpy.dot", "numpy.abs", "numpy.min", "numpy.linalg.norm", "numpy.round", "numpy.max", "numpy.ceil", "numpy.floor", "numpy.cross", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jlezama/disentangling-jacobian
[ "c570945055c735a15b9adba093b7c688c7310aad" ]
[ "unsupervised_disentangling/utils.py" ]
[ "import torch\nimport torch.nn as nn\n\nfrom PIL import Image\nimport matplotlib\nmatplotlib.use('agg')\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport argparse\n\n\ndef to_img(x):\n x = 1-x.clamp(0, 1)\n x = x.view(x.size(0), 1, 28, 28)\n return x\n\ndef show(img, outfname=None):\n npimg =...
[ [ "torch.mean", "matplotlib.pyplot.imshow", "torch.cat", "matplotlib.use", "torch.t", "torch.nn.MSELoss" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
LEOCUIZHIHAO/segcarpoint
[ "42d78cde1f28b0c705f7755356610cf3039c3caf" ]
[ "bcl_caffe/layers/bcl_layers.py" ]
[ "\nfrom pathlib import Path\nimport pickle\nimport shutil\nimport time, timeit\nimport numpy as np\nimport torch\nimport torchplus\n\nfrom google.protobuf import text_format\nimport second.data.kitti_common as kitti\nfrom second.builder import target_assigner_builder, voxel_builder\nfrom second.pytorch.core import ...
[ [ "numpy.expand_dims", "numpy.minimum", "numpy.squeeze", "torch.utils.data.DataLoader", "numpy.concatenate", "numpy.mean", "numpy.exp", "numpy.where", "numpy.square", "numpy.clip", "numpy.unique", "numpy.arange", "numpy.eye", "numpy.stack", "numpy.sin", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
carpedkm/vedatad
[ "55f8dced57f698ee9fc0da9bcf471d171e718d0c" ]
[ "vedacore/image/photometric.py" ]
[ "import cv2\nimport numpy as np\n\n\ndef imnormalize(img, mean, std, to_rgb=True):\n \"\"\"Normalize an image with mean and std.\n\n Args:\n img (ndarray): Image to be normalized.\n mean (ndarray): The mean to be used for normalize.\n std (ndarray): The std to be used for normalize.\n ...
[ [ "numpy.full_like", "numpy.right_shift", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PranavBharadwaj-1328/Image_Filtering_methods
[ "a608c81a47f85adb38604f8f8d9503f5bf6555f7" ]
[ "tophat.py" ]
[ "import cv2\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndef openimg():\n F = input()\n img = cv2.imread(F,0)\n kernel = np.ones((5,5),np.uint8)\n opening = cv2.morphologyEx(img,cv2.MORPH_TOPHAT,kernel)\n plt.subplot(121),plt.imshow(img)\n plt.title('Original'),plt.xticks([]),plt.yticks...
[ [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.yticks", "matplotlib.pyplot.title", "numpy.ones", "matplotlib.pyplot.subplot", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
imanpalsingh/projection-pursuit
[ "307ad765d447e81dce909dfa9778db1610704315" ]
[ "skpp/tests/test_skpp.py" ]
[ "# run with python(3) -m pytest\n\nimport numpy\nimport pytest\nimport time\n\nfrom sklearn.utils import estimator_checks\nfrom sklearn.utils.testing import assert_equal\nfrom sklearn.utils.testing import assert_less\nfrom sklearn.utils.testing import assert_almost_equal\nfrom sklearn.utils.testing import assert_ar...
[ [ "numpy.dot", "numpy.arange", "numpy.eye", "sklearn.utils.testing.assert_raises", "numpy.random.shuffle", "sklearn.utils.testing.assert_less", "numpy.random.randn", "sklearn.utils.estimator_checks.check_estimator", "numpy.random.rand", "sklearn.utils.testing.assert_array_equ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
c-d-leonard/N5K
[ "99d844621f2436aaf56fc98484e309043d4b7bd1" ]
[ "timer.py" ]
[ "import sys\nsys.path.append(\"fftlogx/\")\nimport numpy as np\nimport time\nimport n5k\n\n\ndef time_run(cls, config, niter):\n c = cls(config)\n c.setup()\n ts = np.zeros(niter+1)\n for i in range(niter+1):\n t0 = time.time()\n c.run()\n tf = time.time()\n ts[i] = tf-t0\n ...
[ [ "numpy.savez", "numpy.sqrt", "numpy.std", "numpy.mean", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AGrigis/pynet
[ "d0e6a3e6e954ae0e59fddfe85fe12ce0ef1e6fe4" ]
[ "pynet/plotting/image.py" ]
[ "# -*- coding: utf-8 -*-\n##########################################################################\n# NSAp - Copyright (C) CEA, 2019\n# Distributed under the terms of the CeCILL-B license, as published by\n# the CEA-CNRS-INRIA. Refer to the LICENSE file or to\n# http://www.cecill.info/licences/Licence_CeCILL-B_V1...
[ [ "numpy.concatenate", "numpy.transpose", "numpy.clip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
TUDelft-CITG/OpenTNSim
[ "7d3566c9027fe6874b9196e03aafd70e4f5919f5" ]
[ "opentnsim/corelock2.py" ]
[ "\"\"\"Main module.\"\"\"\n\n# package(s) related to time, space and id\nimport json\nimport logging\nimport uuid\n\n# you need these dependencies (you can get these from anaconda)\n# package(s) related to the simulation\nimport simpy\nimport random\nimport networkx as nx\nimport numpy as np\n\n# spatial libraries\...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
radroid/project-one-sentiment-analysis
[ "cff3ebfe7a2d3ab6bc4fa6b93669aee995d5b43b" ]
[ "train/train.py" ]
[ "import argparse\nimport json\nimport os\nimport pickle\nimport sys\nimport sagemaker_containers\nimport pandas as pd\nimport torch\nimport torch.optim as optim\nimport torch.utils.data\n\nfrom model import LSTMClassifier\n\ndef model_fn(model_dir):\n \"\"\"Load the PyTorch model from the `model_dir` directory.\...
[ [ "torch.load", "torch.manual_seed", "torch.utils.data.TensorDataset", "torch.utils.data.DataLoader", "torch.from_numpy", "torch.nn.BCELoss", "torch.cuda.is_available", "torch.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zhanwenchen/Scene-Graph-Benchmark.pytorch
[ "c86475bcbdaefcc1656a2890194355c2b32aa694" ]
[ "maskrcnn_benchmark/modeling/roi_heads/relation_head/model_transformer.py" ]
[ "\"\"\"\nBased on the implementation of https://github.com/jadore801120/attention-is-all-you-need-pytorch\n\"\"\"\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\nfrom maskrcnn_benchmark.modeling.utils import cat\nfrom .utils_motifs import obj_edge_vectors, to_onehot, nms_o...
[ [ "torch.nn.Softmax", "torch.nn.Dropout", "torch.nn.functional.softmax", "torch.LongTensor", "numpy.sqrt", "torch.cat", "numpy.power", "torch.nn.utils.rnn.pad_sequence", "torch.nn.init.xavier_normal_", "torch.arange", "torch.nn.Embedding", "torch.nn.LayerNorm", "t...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lcwong0928/pyna
[ "44210812268cb3dbbaaee8caa58e48e4c47372e9" ]
[ "python/vcf/optimizer.py" ]
[ "import pandas as pd\nimport re\nimport json\nfrom pandas import ExcelWriter\n\nstandard = {'PIK3R1', 'PTEN', 'PIK3CG', 'TP53',\n 'PTPN11', 'PIK3CA', 'RB1', 'PDGFRA', 'MET',\n 'ATRX', 'CDK4', 'EGFR', 'IDH1', 'NF1',\n 'CDKN2A', 'MDM4', 'MDM4', 'MDM2', 'CDK6', 'LTBP4'}\n\n\ndef score(...
[ [ "pandas.isnull", "pandas.ExcelWriter" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
lawrenceyan/mango-explorer
[ "ea16f2a27c51e9e5e0f79d491828ad250f970452" ]
[ "mango/account.py" ]
[ "# # ⚠ Warning\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT\n# LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES O...
[ [ "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
vasslitvinov/arkouda
[ "7751a512bd93211c4739d859462a7f1ae9ff8b4a" ]
[ "benchmarks/setops.py" ]
[ "#!/usr/bin/env python3 \n\nimport time, argparse\nimport numpy as np\nimport arkouda as ak\n\nOPS = ('intersect1d', 'union1d', 'setxor1d', 'setdiff1d')\nTYPES = ('int64',)\n\ndef time_ak_setops(N_per_locale, trials, dtype):\n print(\">>> arkouda setops\")\...
[ [ "numpy.isclose", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lucaslingle/memn2n
[ "50007bc79d0bdaaf25723d78e86a1ee57bcf2237" ]
[ "babi_dataset_utils.py" ]
[ "import os\nimport re\nimport numpy as np\nimport pickle\nimport math\nimport errno\nimport collections\n\nclass Sentence:\n def __init__(self, string):\n self.string = string\n\n def get_tokens(self, drop_punctuation=True):\n if drop_punctuation:\n tokens = re.findall(r\"[\\w]+\", se...
[ [ "numpy.random.shuffle", "numpy.ones", "numpy.concatenate", "numpy.random.permutation", "numpy.array", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PiotrGrzybowski/ProbabilisticMachineLearning
[ "c835a1bdf7ab1b2e58bcf90ae02b7405c9c72977" ]
[ "Lab2/task3.py" ]
[ "import numpy as np\nimport itertools\n\n\ndef student_application(tries, successes, probabilities):\n faculties = set(np.arange(tries))\n combinations = set(itertools.combinations(faculties, successes))\n\n return np.sum([np.prod([probabilities[i] for i in combination]) *\n np.prod([1 - ...
[ [ "numpy.arange", "numpy.prod" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
e-koch/regions
[ "d1a6dd34def9442133065041974b2e33cafaf1cf" ]
[ "regions/_utils/wcs_helpers.py" ]
[ "# Licensed under a 3-clause BSD style license - see LICENSE.rst\n# (taken from photutils: should probably migrate into astropy.wcs)\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nimport numpy as np\nfrom astropy import units as u\nfrom astropy.coordinates import UnitSphericalR...
[ [ "numpy.arctan2", "numpy.hypot" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
brian220/sketch2pointcloud
[ "55f9011dff89963af57d1bb842f763d2fa3603d2" ]
[ "layers/gcn.py" ]
[ "# -*- coding: utf-8 -*-\n#\n# Developed by Chao Yu Huang <b608390.cs08g@nctu.edu.tw>\n# Lot's of codes are borrowed from treeGCN: \n# https://github.com/seowok/TreeGAN\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.init as init\nimport math\n\nclass TreeGCN(nn.Module):\n def __init__(self, batch, depth...
[ [ "torch.nn.Linear", "torch.FloatTensor", "torch.nn.LeakyReLU", "torch.nn.init.calculate_gain" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SouppuoS/segan
[ "90d174e1e2277cb6a1711fe0fe94646cf0c116da" ]
[ "segan_module.py" ]
[ "import torch\nimport torch.nn as nn\n\nclass wavnetlike(nn.Module):\n def __init__(self, stride=2, kernal_size=31, channel_size=[], rev=False):\n super(wavnetlike, self).__init__()\n\n self.num_layer = len(channel_size) - 1\n self.cnn = nn.ModuleList([])\n self.skipTns = nn.M...
[ [ "torch.nn.BatchNorm1d", "torch.cat", "torch.nn.PReLU", "torch.nn.ModuleList", "torch.randn", "torch.nn.Sigmoid", "torch.nn.Linear", "torch.nn.LeakyReLU", "torch.nn.Conv1d", "torch.nn.ConvTranspose1d" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
peerschuett/lattice_net
[ "bedee4c7e4adf5ae191a408597c058f2638c96cc" ]
[ "latticenet_py/misc/compute_class_frequency.py" ]
[ "#!/usr/bin/env python3.6\n\nimport torch\nfrom torch.autograd import Function\nfrom torch import Tensor\n\nimport sys\nimport os\nimport numpy as np\n# http://wiki.ros.org/Packages#Client_Library_Support\nimport rospkg\nrospack = rospkg.RosPack()\nsf_src_path=rospack.get_path('surfel_renderer')\nsf_build_path=os.p...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Pandinosaurus/clana
[ "270da7fff0c09f690c8b9595bc29405eb9fdd244" ]
[ "clana/clustering.py" ]
[ "\"\"\"Everything about clustering classes of a confusion matrix.\"\"\"\n\n# Core Library\nimport logging\nimport random\nfrom typing import Any, List, TypeVar, Union\n\n# Third party\nimport numpy as np\n\n# First party\nimport clana.utils\n\ncfg = clana.utils.load_cfg()\nlogger = logging.getLogger(__name__)\n\n\n...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dnnspark/dsynth
[ "4dd0d502e143f0aece5739084ee5a45346608554" ]
[ "dsynth/util/object_loader.py" ]
[ "\"\"\"\n(ext) Carbon copy of:\n https://vhub.vicarious/vicarious/dataset/blob/master/dataset/util/object_loader.py\n\nWavefront .obj file loader.\n\nSupports basic material and texture properties.\nVertex colors are not supported.\n\"\"\"\n\nimport re\nimport os\nimport numpy as np\nimport logging\nimport math\...
[ [ "numpy.min", "numpy.asarray", "numpy.arccos", "numpy.max", "numpy.iinfo", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
WilsonYangLiu/TCGADownload
[ "d3af7e3fecacd0703c4c82ebd889593a5ffb2e41" ]
[ "script/TPM.py" ]
[ "from __future__ import print_function, division\r\n\r\n#!/usr/bin/env python\r\n# -*- coding: utf-8 -*-\r\n\r\n'''\r\nCopyright (c) 2016 Wei-Xin Liu\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal...
[ [ "pandas.Series", "pandas.read_csv", "numpy.sum", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
dylansnow/vimba_pose_detection
[ "2aeac00cb678f8a7f490f52be3fe5f87573703db" ]
[ "Vimba_5.0/VimbaPython/Source/vimba/frame.py" ]
[ "\"\"\"BSD 2-Clause License\n\nCopyright (c) 2019, Allied Vision Technologies GmbH\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyr...
[ [ "numpy.ndarray" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
congvmit/mipkit
[ "d65a5083852dcfc5db766175aa402a5e3a506f21" ]
[ "examples/test_debugger.py" ]
[ "\"\"\"\n The MIT License (MIT)\n Copyright (c) 2021 Cong Vo\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 without restriction, including without limitation the rights\n to use, co...
[ [ "torch.ones", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sizhky/detr
[ "54f18a0b3a3be69be4c451567ea730c731c7ad48" ]
[ "main.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport argparse\nimport datetime\nimport json\nimport random\nimport time\nfrom pathlib import Path\n\nimport numpy as np\nimport torch\nfrom torch.utils.data import DataLoader, DistributedSampler\n\nimport datasets\nimport util.misc as utils\...
[ [ "torch.utils.data.DistributedSampler", "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.utils.data.SequentialSampler", "torch.utils.data.DataLoader", "torch.utils.data.RandomSampler", "torch.optim.AdamW", "torch.save", "torch.nn.parallel.DistributedDataParalle...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
elopezphy/basic_dash
[ "deda0997d5b7e5378a0b3124791f9bfee4cee4cd" ]
[ "app.py" ]
[ "import dash\nimport dash_core_components as dcc\nimport dash_html_components as html\nimport pandas as pd\n\ndata = pd.read_csv('data/avocado.csv')\n\ndata = data.query(\"type == 'conventional' and region == 'Albany'\")\ndata[\"Date\"] = pd.to_datetime(data[\"Date\"], format=\"%Y-%m-%d\")\ndata.sort_values(\"Date\...
[ [ "pandas.read_csv", "pandas.to_datetime" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
NithinKumaraNT/DNN_Quantizer
[ "3a6885f77aabb9b539e554a34a1c7ad358a39336" ]
[ "examples/Optimize_Quant.py" ]
[ "\"\"\"\nAn example that learns the optimal approximate uniform symmetric mid-even quantizer for a given data distribution. \nWe use Stochastic gradient descent for optimization of the range. The #steps used for quantization is a fixed design\nparameter. We test it with:\n\n I) Normal distributed data\n II)...
[ [ "numpy.sqrt", "numpy.linspace", "matplotlib.pyplot.plot", "numpy.random.randn", "numpy.random.laplace", "tensorflow.reset_default_graph", "scipy.stats.laplace.pdf", "matplotlib.pyplot.figure", "matplotlib.pyplot.title", "tensorflow.pow", "tensorflow.global_variables_ini...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
meokz/psd-tools
[ "64197a1c0f75b8d1b3bcfaaae7fa2b97e34ffb1e" ]
[ "src/psd_tools/composer/blend.py" ]
[ "\"\"\"\nBlending module.\n\nCheck Blending_ section of W3C recommendation for blending mode definitions.\n\n.. _Blending: https://www.w3.org/TR/compositing/#blending\n\"\"\"\nfrom __future__ import absolute_import, unicode_literals\nimport logging\n\nfrom psd_tools.utils import new_registry\nfrom psd_tools.constan...
[ [ "numpy.expand_dims", "numpy.maximum", "numpy.minimum", "numpy.sqrt", "numpy.abs", "numpy.min", "numpy.stack", "numpy.max", "numpy.copy", "numpy.zeros_like" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jkhu29/SoCo
[ "1cef465ce5bdc975a72d3d869147ebeb6031781d" ]
[ "main_linear.py" ]
[ "# --------------------------------------------------------\n# SoCo\n# Copyright (c) 2021 Microsoft\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Yue Gao\n# --------------------------------------------------------\n\n\nimport json\nimport os\nimport time\n\nimport torch\nimport torch.bac...
[ [ "torch.distributed.init_process_group", "torch.cuda.set_device", "torch.load", "torch.nn.functional.cross_entropy", "torch.no_grad", "torch.utils.tensorboard.SummaryWriter", "torch.distributed.get_rank", "torch.distributed.get_world_size", "torch.nn.parallel.DistributedDataPara...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Hossam86/Statistics-Using-Python
[ "25fa7fb574c0cc8af48ea780da033a34b14affe8" ]
[ "confidence_interval_2.py" ]
[ "import numpy as np\nimport pandas as pd\n\nimport matplotlib\nimport matplotlib.pyplot as plt\n\nimport scipy.stats\nimport scipy.optimize\nimport scipy.spatial\n\npoll=pd.read_csv(\"Statistics-Using-Python\\data\\poll.csv\")\npoll.info()\nprint (poll.vote.value_counts(normalize=True))\n\n#sampling func\n# =======...
[ [ "pandas.read_csv", "numpy.random.rand", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
sbitters/enrichTSS
[ "c1b8d18c8e6f08926725290c233a04a22e41dfaf" ]
[ "modGFF.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# 2017-07-30\n# STB\n\nimport sys\nimport regex as re\nimport pandas as pd\nfrom argparse import ArgumentParser\nfrom file_read_backwards import FileReadBackwards\n\n\nMIT_license = \"\"\"Copyright 2017 Sven T. Bitters (sven.bitters@gmail.com)\n\nPermission is he...
[ [ "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
desh2608/css
[ "a595f40085f2a8de9a62f9d4e34950ab55a7d27e" ]
[ "css/models/conv_tasnet.py" ]
[ "#!/usr/bin/env python3\n# This module is taken from: https://github.com/JusperLee/Conv-TasNet/blob/master/Conv_TasNet_Pytorch/Conv_TasNet.py\n\nimport torch\n\nDEFAULT_CONV_TASNET_CONF = {\n \"num_filters\": 512,\n \"filter_length\": 16,\n \"bottleneck_channels\": 128,\n \"conv_channels\": 512,\n \"...
[ [ "torch.nn.Sequential", "torch.mean", "torch.transpose", "torch.nn.Softmax", "torch.nn.BatchNorm1d", "torch.ones", "torch.zeros", "torch.sqrt", "torch.nn.PReLU", "torch.unsqueeze", "torch.nn.Sigmoid", "torch.nn.Conv1d", "torch.chunk", "torch.nn.ReLU", "to...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
scivision/apexpy
[ "a2e919fd9ea9a65d49c4c22c9eb030c8ccf48386" ]
[ "tests/test_Apex.py" ]
[ "# -*- coding: utf-8 -*-\n\nfrom __future__ import division, absolute_import, unicode_literals\n\nimport datetime as dt\nimport warnings\n\nimport numpy as np\nimport pytest\nfrom numpy.testing import assert_allclose\n\nfrom apexpy import fortranapex as fa\nfrom apexpy import Apex, ApexHeightError, helpers\n\n\n###...
[ [ "numpy.allclose", "numpy.append", "numpy.testing.assert_allclose", "numpy.array", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
markvilar/Trajectory
[ "1879bec9c0383576464d92772f2b802cd2cbd725" ]
[ "Python/georeference.py" ]
[ "import copy\n\nfrom typing import Dict, List, Tuple\n\nimport matplotlib\nmatplotlib.use(\"TkAgg\")\nimport matplotlib.pyplot as plt\nplt.style.use(\"./Styles/Scientific.mplstyle\")\nimport matplotlib.patches as patches\nimport msgpack\nimport numpy as np\nimport quaternion as quat\n\nimport optimization\n\nfrom c...
[ [ "numpy.min", "matplotlib.use", "matplotlib.pyplot.subplots", "numpy.stack", "numpy.max", "numpy.array", "matplotlib.pyplot.style.use", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
WagnerLabPapers/Waskom_PNAS_2017
[ "ef7ec8513c61ef031e09f9e67a3d061b038f8db0" ]
[ "sup_figure_4.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\nfrom plotutils import set_style, savefig, get_colormap, get_subject_order\n\nfrom figure_2 import plot_brains, plot_hists\n\n\ndef setup_figure():\n\n f = plt.figure(figsize=(7, 2.8))\n\n brain_gs = plt.GridSpec(3, 4, .13, .13, .87, .99, .05, .05)\n b...
[ [ "numpy.arange", "matplotlib.pyplot.GridSpec", "numpy.array_split", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hanaecarrie/pisap
[ "958f53dbc28afc6fb84c7f3d678c8549307ef9f5" ]
[ "pisap/base/image.py" ]
[ "##########################################################################\n# XXX - Copyright (C) XXX, 2017\n# Distributed under the terms of the CeCILL-B license, as published by\n# the CEA-CNRS-INRIA. Refer to the LICENSE file or to\n# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html\n# for details.\n...
[ [ "numpy.abs", "numpy.asarray", "numpy.ndarray", "numpy.ones", "numpy.iscomplex" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
maryamghr/whatshap
[ "61f64612751af3c0882582e6e879c6e6a90a3556" ]
[ "whatshap/cli/compare.py" ]
[ "\"\"\"\nCompare two or more phasings\n\"\"\"\nimport logging\nimport math\nfrom collections import defaultdict\nfrom contextlib import ExitStack\nimport dataclasses\nfrom itertools import chain, permutations\nfrom typing import Set, List, Optional, DefaultDict, Dict\n\nfrom whatshap.vcf import VcfReader, VcfVarian...
[ [ "matplotlib.backends.backend_pdf.PdfPages", "matplotlib.pyplot.legend", "matplotlib.pyplot.gca", "matplotlib.use", "matplotlib.pyplot.figure", "matplotlib.pyplot.grid", "matplotlib.pyplot.close", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.hist", "matplotlib.pyplot.ylabe...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
snoop2head/Open_stock_liquidity
[ "a5450774c50f14433915c37d057fa20a8196cdb9" ]
[ "app_pandas_to_dataframe_or_to_excel.py" ]
[ "import pandas as pd\nfrom pandas import ExcelWriter\n\n\ncode_df = pd.read_html('http://kind.krx.co.kr/corpgeneral/corpList.do?method=download&searchType=13', header=0)[0]\n\n# 종목코드가 6자리이기 때문에 6자리를 맞춰주기 위해 설정해줌\ncode_df.종목코드 = code_df.종목코드.map('{:06d}'.format)\n\n# 우리가 필요한 것은 회사명과 종목코드이기 때문에 필요없는 column들은 제외해준다.\n...
[ [ "pandas.ExcelWriter", "pandas.read_html", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
subhayuroy/vedo
[ "4c4686fe14f42b2d79d4e138afed362813ede4d3" ]
[ "vedo/mesh.py" ]
[ "import numpy as np\nimport os\nimport vtk\nimport vedo\nfrom vedo.colors import printc, getColor, colorMap\nfrom vedo.utils import isSequence, flatten, mag, buildPolyData, numpy2vtk, vtk2numpy\nfrom vedo.pointcloud import Points\nfrom deprecated import deprecated\n\n__doc__ = (\"\"\"Submodule to manage polygonal m...
[ [ "numpy.dot", "numpy.split", "numpy.log", "numpy.ascontiguousarray", "numpy.asarray", "numpy.linalg.norm", "numpy.arccos", "numpy.argmin", "numpy.cross", "numpy.array", "numpy.zeros", "numpy.isin" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cuishuhao/HDA
[ "1733ca74eee7839b455e9ffd7a169bc54b272745" ]
[ "scripts/train_ssda.py" ]
[ "import argparse\nimport os\nimport os.path as osp\nimport sys\nsys.path.append(\".\")\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.utils.data import DataLoader\nfrom torch.autograd import Variable\nimport random\nimport pdb\nimport math\nfrom distutils.version...
[ [ "torch.abs", "torch.mean", "torch.nn.Sequential", "torch.nn.Softmax", "torch.max", "torch.nn.CrossEntropyLoss", "torch.cat", "torch.utils.data.DataLoader", "torch.sum", "torch.std", "torch.no_grad", "torch.pow", "torch.squeeze" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
chrinide/pyscf
[ "8ea26f650566faac6621af0101441becaf7fe399" ]
[ "pyscf/hessian/rks.py" ]
[ "#!/usr/bin/env python\n# Copyright 2014-2019 The PySCF Developers. 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/LIC...
[ [ "numpy.dot", "numpy.allclose", "numpy.einsum", "numpy.asarray", "numpy.linalg.norm", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ShanghuoLi/Adam-Ginsburg-pyspeckit
[ "841e8f1d742f2ee6ff0fac5dc097e598ba62d74a" ]
[ "pyspeckit/spectrum/plotters.py" ]
[ "\"\"\"\n=======\nPlotter\n=======\n\n.. moduleauthor:: Adam Ginsburg <adam.g.ginsburg@gmail.com>\n\"\"\"\nfrom __future__ import print_function\nimport matplotlib\nimport matplotlib.figure\nimport numpy as np\nimport astropy.units as u\nimport copy\nimport inspect\nfrom astropy import log\n\ntry:\n from matplot...
[ [ "numpy.nanmax", "matplotlib.cbook._BoundMethodProxy", "numpy.abs", "numpy.nanmin", "numpy.concatenate", "numpy.argsort" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
abdelq/pybaselines
[ "043aa7875efe1ca01c3e8e9ae7c57a67274aff06" ]
[ "tests/test_optimizers.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Tests for pybaselines.optimizers.\n\n@author: Donald Erb\nCreated on March 20, 2021\n\n\"\"\"\n\nimport numpy as np\nfrom numpy.testing import assert_array_almost_equal\nimport pytest\n\nfrom pybaselines import optimizers\n\nfrom .conftest import get_data, AlgorithmTester\n\n\n@pytes...
[ [ "numpy.vstack", "numpy.testing.assert_array_almost_equal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kipolovnikov/cooltools
[ "986fe95f96978f669204226d99e3c0a6fd5be208" ]
[ "cooltools/lib/common.py" ]
[ "import numpy as np\nimport pandas as pd\n\n\ndef assign_supports(features, supports, labels=False, suffix=\"\"):\n \"\"\"\n Assign support regions to a table of genomic intervals.\n\n Parameters\n ----------\n features : DataFrame\n Dataframe with columns `chrom`, `start`, `end`\n or `...
[ [ "pandas.Series" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
msakai/chainer-compiler
[ "77190561408911b33904a20c47f734f38790cfdf" ]
[ "scripts/gen_extra_test.py" ]
[ "\"\"\"Yet another ONNX test generator for custom ops and new ops.\"\"\"\n\n\nimport chainer\nimport chainer.functions as F\nimport chainer.links as L\nimport numpy as np\nimport onnx\n\nimport onnx_script\nimport test_case\n\nimport gen_chainercv_op_tests\nimport sentiment\n\n\n_extract_value_info = onnx_script._e...
[ [ "numpy.split", "numpy.expand_dims", "numpy.random.random", "numpy.pad", "numpy.sqrt", "numpy.abs", "numpy.arange", "numpy.squeeze", "numpy.stack", "numpy.ones", "numpy.concatenate", "numpy.prod", "numpy.transpose", "numpy.array", "numpy.sum", "numpy....
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Tyuzu/opencv_snippets
[ "f6690baa72a3119b9545f5c031c523dccddf1281" ]
[ "corners.py" ]
[ "import numpy as np\nimport cv2\n\nimg = cv2.imread('k.jpg')\ngray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)\ngray = np.float32(gray)\n\ncorners = cv2.goodFeaturesToTrack(gray, 100, 0.01, 10)\ncorners = np.int0(corners)\n\nfor corner in corners:\n x,y = corner.ravel()\n cv2.circle(img,(x,y),3,255,-1)\n \ncv2....
[ [ "numpy.int0", "numpy.float32" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
adamnovak/biopython
[ "92772dd6add33e0b87ab593841f924f0f6f16090" ]
[ "Bio/Affy/CelFile.py" ]
[ "# Copyright 2004 by Harry Zuzan. All rights reserved.\n# This code is part of the Biopython distribution and governed by its\n# license. Please see the LICENSE file that should have been included\n# as part of this package.\n\n\"\"\"\nClasses for accessing the information in Affymetrix cel files.\n\nFunctions:\n...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hamdi-haddad/pyEIT
[ "30c47839c537dbdfb65f2b70daa68f4cc8e13d9a" ]
[ "examples/eit_dynamic_greit.py" ]
[ "# coding: utf-8\n\"\"\" demo using GREIT \"\"\"\n# Copyright (c) Benyuan Liu. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\nfrom __future__ import division, absolute_import, print_function\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nimport pyeit.mesh...
[ [ "numpy.real", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
krrish94/learn_tensorflow
[ "b5725bfbd09911e7c7342ab76eea07e294d5573c" ]
[ "lstm_repetition_detection_classifier.py" ]
[ "# Tutorial from: https://jasdeep06.github.io/posts/Understanding-LSTM-in-Tensorflow-MNIST/\n\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.contrib import rnn\n\n\n\n# Seed RNG\nrng_seed = 12345\nnp.random.seed(rng_seed)\ntf.set_random_seed(rng_seed)\n\n# Declare constants\n\n# Dataset generation pa...
[ [ "tensorflow.nn.softmax_cross_entropy_with_logits", "numpy.expand_dims", "tensorflow.contrib.rnn.GRUCell", "numpy.squeeze", "tensorflow.cast", "tensorflow.nn.l2_loss", "numpy.random.randint", "tensorflow.train.MomentumOptimizer", "numpy.argmax", "tensorflow.Session", "te...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
chellabeatrixkiddo/keras-frcnn
[ "0b09f279f32143e084e2b884076ee51d9daac55d" ]
[ "test_frcnn.py" ]
[ "from __future__ import division\nimport os\nimport cv2\nimport numpy as np\nimport sys\nimport pickle\nfrom optparse import OptionParser\nimport time\nfrom keras_frcnn import config\nfrom keras import backend as K\nfrom keras.layers import Input\nfrom keras.models import Model\nfrom keras_frcnn import roi_helpers\...
[ [ "numpy.expand_dims", "pandas.Series", "pandas.DataFrame", "numpy.max", "numpy.argmax", "numpy.transpose", "numpy.array", "numpy.zeros", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
SensorUp/LDAR_Sim
[ "e341998257eb3c74497c950935c02bb81c01eb32" ]
[ "LDAR_Sim/src/initialization/campaigns.py" ]
[ "\nfrom math import floor\nfrom numpy import zeros\n# --- initialize Campaigns ---\n\n\ndef _add_method_campaign(campaign_s_t, d_per_campaign, timesteps, n_sites, m_name):\n n_campaigns = floor(timesteps/d_per_campaign)\n return campaign_s_t.update(\n {\n m_name: {\n 'current_...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
TAU-MLwell/Marginal-Contribution-Feature-Importance
[ "956f401d3af0b9da7a607cc30304669f6b723d7c" ]
[ "mci/mci_values.py" ]
[ "import matplotlib.pyplot as plt\nfrom typing import Sequence, Tuple, Optional\nfrom mci.estimators.contribution_tracker import ContributionTracker\n\n\nclass MciValues:\n\n \"\"\"contain MCI values and project relevant plots from them\"\"\"\n\n def __init__(self,\n mci_values: Sequence[float]...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.barh", "matplotlib.pyplot.savefig", "matplotlib.pyplot.close", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sujaynagaraj/probML_project
[ "4b1fe9d18b949b01bc1948599ee2494875c7ab92" ]
[ "plotting_helpers.py" ]
[ "import matplotlib.pyplot as plt\n\ndef to_numpy(x):\n\t\treturn x.detach().cpu().numpy()\n\ndef make_quick_plot(batch_dict, example, extra_str=\"\"):\n\n plot_dict = {x: to_numpy(batch_dict[x]) for x in ('observed_data', 'observed_tp', 'data_to_predict', 'tp_to_predict', 'observed_mask')}\n\n plt.figure()\n ...
[ [ "matplotlib.pyplot.savefig", "matplotlib.pyplot.title", "matplotlib.pyplot.scatter", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]