repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list | possible_versions list |
|---|---|---|---|---|---|
almostExactMatch/daemr | [
"b54adc9e7de41a2ca447ddbee7b7c192022d690b"
] | [
"experiments/missingdata/original_data_no_miss.py"
] | [
"import numpy as np\nimport pandas as pd\nimport pickle\nimport time\nimport itertools\nfrom joblib import Parallel, delayed\nfrom random import randint\nimport matplotlib\nmatplotlib.rcParams.update({'font.size': 17.5})\n\nimport matplotlib.pyplot as plt\nfrom sklearn.metrics.pairwise import pairwise_distances\nfr... | [
[
"numpy.dot",
"pandas.concat",
"numpy.hstack",
"numpy.random.choice",
"numpy.random.normal",
"matplotlib.rcParams.update",
"numpy.random.binomial",
"numpy.array",
"numpy.sum",
"numpy.random.randint"
]
] | [
{
"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": []
}
] |
Mill6159/AndoLab_pySCA6.0 | [
"5982319d8bfae310f6a47bd4cec9b23681e43557"
] | [
"scaCore.py"
] | [
"#!/Users/RobbyMiller/opt/anaconda3/bin/python\n\"\"\"\nThe scaCore script runs the core calculations for SCA, and stores the output using the python tool pickle. These calculations can be divided into two parts:\n\n 1) Sequence correlations:\n a) Compute simMat = the global sequence similarity ma... | [
[
"scipy.io.savemat"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
benkim96/neural_network | [
"069dd75e64def6346f0907d53dd673c62000dbff"
] | [
"NeuralNetwork.py"
] | [
"#import libraries\nfrom numpy import exp, array, random, dot\nimport pygame\n\nSCREEN_WIDTH = 1500\nSCREEN_HEIGHT = 900\n\nBLACK, WHITE, RED, GREEN, BLUE = (0, 0, 0), (255, 255, 255), (255, 0, 0), (0, 255, 0), (0, 0, 255)\nrandom.seed(1)\n\nclass NeuralLayer():\n def __init__(self, num_nodes = 1):\n self... | [
[
"numpy.dot",
"numpy.random.random",
"numpy.random.seed",
"numpy.array",
"numpy.exp"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
benediktwagner/interpret | [
"a80e42fbaad7c25f4447b6f81137c53714eed710"
] | [
"src/python/interpret/glassbox/decisiontree.py"
] | [
"# Copyright (c) 2019 Microsoft Corporation\n# Distributed under the MIT software license\n\nfrom ..api.base import ExplainerMixin, ExplanationMixin\nfrom ..utils import unify_data\nfrom ..utils import gen_name_from_class, gen_local_selector, gen_global_selector\n\nfrom sklearn.base import ClassifierMixin, Regresso... | [
[
"sklearn.tree.DecisionTreeClassifier",
"sklearn.tree.DecisionTreeRegressor",
"sklearn.base.is_classifier",
"numpy.any"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
liguodongIOT/nlp-app-samples | [
"e0cc747e88c7b5c701b5099462d2dd6277c23381"
] | [
"tests/iter_version_dev/V1_0_0/dataset_ner.py"
] | [
"\n\nimport logging\nimport os\nfrom typing import List, Optional, Union, Dict\nfrom torch.utils.data.dataset import Dataset, IterableDataset\nfrom transformers import PreTrainedTokenizer\nfrom transformers.data.processors.glue import glue_convert_examples_to_features\nfrom torch import nn\n\nfrom tests.iter_versio... | [
[
"torch.nn.CrossEntropyLoss"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jcchin/Hyperloop_v2 | [
"73861d2207af8738425c1d484909ed0433b9653f"
] | [
"src/hyperloop/Python/tests/test_pod_geometry.py"
] | [
"import numpy as np\nfrom openmdao.api import Group, Problem\n\nfrom hyperloop.Python.pod import pod_geometry\n\ndef create_problem(component):\n root = Group()\n prob = Problem(root)\n prob.root.add('comp', component)\n return prob\n\nclass TestMissionDrag(object):\n\n\n def test_case1_vs_npss(self)... | [
[
"numpy.isclose"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
EileenWang90/Timm_intern | [
"57c2a317ceab58b56985227e743363c04984e67b"
] | [
"train.py"
] | [
"#!/usr/bin/env python3\n\"\"\" ImageNet Training Script\n\nThis is intended to be a lean and easily modifiable ImageNet training script that reproduces ImageNet\ntraining results with some of the latest networks and training techniques. It favours canonical PyTorch\nand standard Python style over trying to be able... | [
[
"torch.jit.script",
"torch.cuda.synchronize",
"torch.nn.CrossEntropyLoss",
"torch.distributed.init_process_group",
"torch.cuda.set_device",
"torch.nn.SyncBatchNorm.convert_sync_batchnorm",
"torch.no_grad",
"torch.distributed.get_rank",
"torch.distributed.get_world_size",
"t... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sidwan02/image_generation_GalSim | [
"f93f7e948b775b5486350e9ed3b5459d2914d9bd"
] | [
"scripts/cosmos_params.py"
] | [
"# Import packages\n\nimport numpy as np\nimport os\nimport galsim\nfrom scipy import integrate\nfrom scipy import stats\n\n############# SIZE OF STAMPS ################\n# The stamp size of NIR instrument is taken equal to the one of LSST to have a nb of pixels which is \n# an integer and in the same time the max_... | [
[
"scipy.integrate.quad",
"numpy.log",
"numpy.sqrt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
lilydedbb/OpenPCDet | [
"5356edb1d21de406e2901ac2ec20ab02be6a4b60"
] | [
"pcdet/datasets/augmentor/image_augmentor.py"
] | [
"from __future__ import division\n\ntry:\n import accimage\nexcept ImportError:\n accimage = None\n\nimport cv2\nimport numpy as np\nfrom functools import partial\nfrom PIL import Image, ImageOps, ImageEnhance\nimport scipy.ndimage.interpolation as itpl\n\nclass ImageAugmenter():\n\n def __init__(self, aug... | [
[
"numpy.uint8",
"numpy.random.shuffle",
"numpy.zeros_like",
"numpy.random.rand",
"numpy.errstate",
"numpy.random.uniform",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ABoLei/Captcha_Image_Recognition_through_CNN | [
"3133dd9c5ec7eaa9e903ccd3edc4a0e9a131089f"
] | [
"Predict.py"
] | [
"import tensorflow as tf\r\nimport Definitions\r\nimport numpy as np\r\nfrom Train_VerificationCode_CNN import GenerateNextBatch\r\nfrom Train_VerificationCode_CNN import Vector2Text\r\nfrom Train_VerificationCode_CNN import GetWrappedCaptchaTextAndImage\r\nfrom Train_VerificationCode_CNN import GenerateBatch\r\nfr... | [
[
"tensorflow.train.get_checkpoint_state",
"tensorflow.matmul",
"matplotlib.pyplot.imshow",
"tensorflow.nn.softmax",
"tensorflow.nn.max_pool",
"tensorflow.reshape",
"tensorflow.equal",
"tensorflow.cast",
"tensorflow.train.import_meta_graph",
"numpy.argmax",
"tensorflow.Se... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
nishantb21/yolov3 | [
"0305b01d805b7b2429e8304d5f27eff52bbd262e"
] | [
"core/models.py"
] | [
"import torch\nfrom core.common import Convolution, Flatten, Dense, residual_repeater\n\nclass Backbone(torch.nn.Module):\n def __init__(self):\n super(Backbone, self).__init__()\n self.s1_output = None\n self.s2_output = None\n self.s3_output = None\n\n def get_s1_output(self):\n ... | [
[
"torch.nn.Linear",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.Upsample",
"torch.cat"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
anonymoussss/YOLOX-SwinTransformer | [
"52b92161c41b8e235591ea0f6d97d247b2ae94f4"
] | [
"yolox/exp/yolox_base.py"
] | [
"#!/usr/bin/env python3\n# -*- coding:utf-8 -*-\n# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.\n\nimport os\nimport random\n\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\n\nfrom .base_exp import BaseExp\n\n\nclass Exp(BaseExp):\n def __init__(self):\n super().__init_... | [
[
"torch.distributed.broadcast",
"torch.LongTensor",
"torch.utils.data.distributed.DistributedSampler",
"torch.utils.data.SequentialSampler",
"torch.utils.data.DataLoader",
"torch.distributed.barrier",
"torch.optim.AdamW",
"torch.nn.functional.interpolate",
"torch.distributed.get... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
SoNiceElijah/NumMethodsProg | [
"acaff245b9267ff56bc9daa86feaecf565eb7888"
] | [
"progThree/test.py"
] | [
"import numpy as np\nimport argparse\n\nparser = argparse.ArgumentParser()\nparser.add_argument('-n', type=int, help='number of iterations')\nparser.add_argument('-x', type=float, help='X0')\nparser.add_argument('-s', type=float, help='step')\nparser.add_argument('-a', type=str, help='calculate automaticaly')\np... | [
[
"numpy.abs",
"numpy.multiply",
"numpy.power",
"numpy.linalg.inv",
"numpy.subtract",
"numpy.exp",
"numpy.add",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
abel-research/ampscan | [
"6a010b5be3f9dec1e7165f667ae47320ad758e97"
] | [
"ampscan/analyse/analyse.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nPackage for dealing with analysis methods of the ampObject and generating \nreports \nCopyright: Joshua Steer 2020, Joshua.Steer@soton.ac.uk\n\"\"\"\n\nimport numpy as np\nfrom ampscan.core import AmpObject\nimport matplotlib.pyplot as plt\nimport matplotlib.colors as clr\nimport m... | [
[
"numpy.logical_xor",
"numpy.linspace",
"numpy.asarray",
"matplotlib.pyplot.axes",
"numpy.mean",
"numpy.cross",
"numpy.where",
"numpy.roll",
"matplotlib.pyplot.tight_layout",
"numpy.arange",
"matplotlib.colorbar.ColorbarBase",
"matplotlib.pyplot.close",
"numpy.ze... | [
{
"matplotlib": [],
"numpy": [
"1.10",
"1.12",
"1.11",
"1.19",
"1.24",
"1.13",
"1.16",
"1.9",
"1.18",
"1.23",
"1.21",
"1.22",
"1.20",
"1.7",
"1.15",
"1.14",
"1.17",
"1.8"
],
"pandas": [],
... |
aolney/upsa-docker | [
"9f1f40a3336c9b360edaa9be846e99b54d26aa9e"
] | [
"upsa/source/data.py"
] | [
"import numpy as np \nimport pickle as pkl\nimport os, random\nimport copy\nfrom math import ceil\nfrom collections import Counter\nimport torch\n\nclass Dicts(object):\n def __init__(self, dict_path):\n f = open(dict_path,'rb')\n self.Dict1, self.Dict2=pkl.load(f)\n f.close()\n self.... | [
[
"numpy.array",
"numpy.zeros",
"numpy.random.shuffle",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
metr0jw/Tacotron2-Wavenet-Korean-TTS | [
"ef86069e0fa6cbff0740d2e34d2fb7088bc1c00a"
] | [
"train_vocoder.py"
] | [
"# coding: utf-8\r\n\"\"\"\r\n- train data를 speaker를 분리된 디렉토리로 받아서, speaker id를 디렉토리별로 부과.\r\n- file name에서 speaker id를 추론하는 방식이 아님.\r\n\r\n\"\"\"\r\n\r\nfrom __future__ import print_function\r\n\r\nimport argparse\r\nimport numpy as np\r\nimport os\r\nimport time\r\nimport traceback\r\nfrom glob import glob\r\nim... | [
[
"tensorflow.RunMetadata",
"tensorflow.global_variables",
"numpy.concatenate",
"numpy.seterr",
"numpy.exp",
"tensorflow.python.client.timeline.Timeline",
"numpy.random.randint",
"tensorflow.Variable",
"numpy.arange",
"tensorflow.ConfigProto",
"tensorflow.logging.set_verb... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
stefsmeets/pyvista | [
"06b1ac01214a4c636395f139b681acea2543960c"
] | [
"examples/01-filter/gradients.py"
] | [
"\"\"\"\n.. _gradients_example:\n\nCompute Gradients of a Field\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nEstimate the gradient of a scalar or vector field in a data set.\n\nThe ordering for the output gradient tuple will be\n{du/dx, du/dy, du/dz, dv/dx, dv/dy, dv/dz, dw/dx, dw/dy, dw/dz} for\nan input array {u, v, w}.\n\nS... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
claudious96/suzieq | [
"b6a1f0731793ed06a9e866c1a1948c22b0a7d051"
] | [
"suzieq/poller/services/routes.py"
] | [
"import re\nfrom dateparser import parse\nfrom datetime import datetime\n\nfrom suzieq.poller.services.service import Service\nfrom suzieq.utils import (expand_nxos_ifname, get_timestamp_from_cisco_time,\n get_timestamp_from_junos_time)\n\n\nimport numpy as np\n\n\nclass RoutesService(Servi... | [
[
"numpy.delete"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
zy1257/JioNLP | [
"c955f297ab62a4f5adeabc883fb86ac1417f177e"
] | [
"jionlp/algorithm/keyphrase/extract_keyphrase.py"
] | [
"# -*- coding=utf-8 -*-\n# library: jionlp\n# author: dongrixinyu\n# license: Apache License 2.0\n# Email: dongrixinyu.89@163.com\n# github: https://github.com/dongrixinyu/JioNLP\n# description: Preprocessing tool for Chinese NLP\n\n\"\"\"\nDESCRIPTION:\n 1、首先基于 pkuseg 工具做分词和词性标注,再使用 tfidf 计算文本的关键词权重,\n 2、关键词... | [
[
"numpy.dot",
"numpy.array",
"numpy.multiply"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
johnomotani/xarray | [
"851d85b9203b49039237b447b3707b270d613db5"
] | [
"xarray/core/utils.py"
] | [
"\"\"\"Internal utilties; not for external use\n\"\"\"\nimport contextlib\nimport functools\nimport io\nimport itertools\nimport re\nimport warnings\nfrom enum import Enum\nfrom typing import (\n Any,\n Callable,\n Collection,\n Container,\n Dict,\n Hashable,\n Iterable,\n Iterator,\n Map... | [
[
"numpy.meshgrid",
"pandas.MultiIndex",
"numpy.asarray",
"pandas.isnull",
"numpy.issubdtype",
"numpy.dtype",
"numpy.diff",
"numpy.isscalar",
"numpy.prod",
"numpy.array",
"numpy.empty"
]
] | [
{
"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": []
}
] |
nre/dask | [
"2d14075004fbca3ad7e5907f5f58ab8b05cdbdc2"
] | [
"dask/array/slicing.py"
] | [
"from itertools import product\nimport math\nfrom numbers import Integral, Number\nfrom operator import add, getitem, itemgetter\nimport warnings\nimport functools\nimport bisect\n\nimport numpy as np\nfrom tlz import memoize, merge, pluck, concat, accumulate\n\nfrom .. import core\nfrom ..highlevelgraph import Hig... | [
[
"numpy.allclose",
"numpy.nonzero",
"numpy.isnan",
"numpy.empty_like",
"numpy.issubdtype",
"numpy.cumsum",
"numpy.sort",
"numpy.flatnonzero",
"numpy.all",
"numpy.asanyarray",
"numpy.diff",
"numpy.searchsorted",
"numpy.argsort",
"numpy.where",
"numpy.isclo... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cpratim/Fantasy-Predictions | [
"6113604afb326c668f8b995a7061d866a881c122"
] | [
"modeling/fantasy/wrapper.py"
] | [
"from sklearn.pipeline import Pipeline\nimport torch\n\nfrom sklearn.preprocessing import (\n StandardScaler,\n MinMaxScaler,\n)\n\nsk_pipeline = Pipeline(\n [\n ('scaler', StandardScaler()),\n ]\n)\n\nclass ModelWrapper(object):\n\n def __init__(self, model, train_func, feature_pipeline = sk_... | [
[
"sklearn.preprocessing.StandardScaler",
"torch.cuda.is_available",
"torch.Tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
felixchenfy/ros_speech_commands_classification | [
"c84b709e1e14a3696192ba8aebab941bef470ea5"
] | [
"utils/lib_rnn.py"
] | [
"# -*- coding: future_fstrings -*-\n#!/usr/bin/env python2\nfrom __future__ import division\nfrom __future__ import print_function\n\nif 1: # Set path\n import sys, os\n ROOT = os.path.dirname(\n os.path.abspath(__file__)) + \"/../\" # root of the project\n sys.path.append(ROOT)\n\nimport numpy as... | [
[
"torch.nn.CrossEntropyLoss",
"numpy.random.random",
"torch.max",
"torch.nn.LSTM",
"torch.load",
"torch.zeros",
"matplotlib.pyplot.savefig",
"torch.tensor",
"torch.nn.Linear",
"torch.cuda.is_available",
"matplotlib.pyplot.ion",
"matplotlib.pyplot.pause",
"matplot... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Shuhei-YOSHIDA/tagslam | [
"1fa3bef064696b289fece0c98b92001b3fb84fae"
] | [
"src/visualize.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\n\n\"\"\"\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom visualize import visualize_transform\n%load_ext autoreload\n%autoreload 2\nplt.ion() # switch interactive mode on\n\"\"\"\n\ndef set_axes_equal(ax):\n ... | [
[
"matplotlib.pyplot.gca",
"numpy.sqrt",
"numpy.meshgrid",
"numpy.linspace",
"numpy.matmul",
"numpy.mean",
"matplotlib.pyplot.axis",
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Gptao/BasicSR | [
"cc78e3d843eed6d924bb3f924c0e54df0f00711b"
] | [
"basicsr/models/ops/fused_act/fused_act.py"
] | [
"# modify from https://github.com/rosinality/stylegan2-pytorch/blob/master/op/fused_act.py # noqa:E501\n\nimport torch\nfrom torch import nn\nfrom torch.autograd import Function\n\nfrom . import fused_act_ext\n\n\nclass FusedLeakyReLUFunctionBackward(Function):\n\n @staticmethod\n def forward(ctx, grad_output... | [
[
"torch.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
gdsfactory/gdslib | [
"1200dd0d66c8c8982f73d790efeaed7b65c4fac4"
] | [
"gdslib/simphony/components/coupler_ring.py"
] | [
"from SiPANN.scee import HalfRacetrack\nfrom SiPANN.scee_int import SimphonyWrapper\n\nfrom gdslib.autoname import autoname\n\n\n@autoname\ndef coupler_ring(\n radius: float = 5.0,\n width: float = 0.5,\n thickness: float = 0.22,\n gap: float = 0.22,\n length_x: float = 4.0,\n sw_angle: float = 90... | [
[
"matplotlib.pyplot.show",
"numpy.linspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
uzh-rpg/colmap_utils | [
"97603b0d352df4e0da87e3ce822a9704ac437933",
"97603b0d352df4e0da87e3ce822a9704ac437933"
] | [
"utils/torch_matchers.py",
"utils/colmap_read_model.py"
] | [
"#!/usr/bin/env python3\n\n# Adapted from\n# https://github.com/tsattler/visuallocalizationbenchmark/blob/master/local_feature_evaluation/matchers.py\n\nimport torch\n\n\n# Mutual nearest neighbors matcher for L2 normalized descriptors.\ndef mutual_nn_matcher(descriptors1, descriptors2):\n device = descriptors1.... | [
[
"torch.stack",
"torch.max",
"torch.arange"
],
[
"numpy.linalg.eigh",
"numpy.array",
"numpy.eye",
"numpy.argmax"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
RerRayne/stable-baselines | [
"b47fe4bd803b488050d10bcbbe3e4dea263cf7c2"
] | [
"stable_baselines/logger.py"
] | [
"import os\nimport sys\nimport shutil\nimport json\nimport time\nimport datetime\nimport tempfile\nimport warnings\nfrom collections import defaultdict\n\nDEBUG = 10\nINFO = 20\nWARN = 30\nERROR = 40\n\nDISABLED = 50\n\n\nclass KVWriter(object):\n \"\"\"\n Key Value writer\n \"\"\"\n def writekvs(self, ... | [
[
"tensorflow.python.util.compat.as_bytes",
"pandas.read_csv",
"tensorflow.train.summary_iterator",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
csala/SDMetrics | [
"fa4b9c823e7da1fd7d32b8ca03c7fe2a7e7c1dff"
] | [
"sdmetrics/datasets/__init__.py"
] | [
"\"\"\"\nThis module provides simulated datasets than can be used to experiment with\nthe SDMetrics library.\n\"\"\"\nimport os\nfrom glob import glob\n\nimport pandas as pd\nfrom sdv import Metadata\n\n_DIR_ = os.path.dirname(__file__)\n\n\ndef list_datasets():\n \"\"\"\n This function returns the list of da... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
Speech-Lab-IITM/speechbrain-1 | [
"a9b373a9fef3fdfc4e3b4a41478f7b283866186f"
] | [
"recipes/Aishell1Mix/separation/scripts/create_aishell1mix_metadata.py"
] | [
"import argparse\nimport os\nimport random\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nimport pyloudnorm as pyln\nimport soundfile as sf\nfrom tqdm import tqdm\n\n# Global parameters\n# eps secures log and division\nEPS = 1e-10\n# max amplitude in sources and mixtures\nMAX_AMP = 0.9\n# In aishell1 ... | [
[
"numpy.zeros_like",
"numpy.abs",
"pandas.DataFrame",
"numpy.power"
]
] | [
{
"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": []
}
] |
Nikhil-42/wind-simultion | [
"8c96ff364cbeeb075555ee7263af81bf465d8e75"
] | [
"__main__.py"
] | [
"from numpy.lib.index_tricks import MGridClass\nimport pygame\nfrom scipy.spatial import Delaunay\nfrom pygame.locals import *\nimport numpy as np\n\n# PyGame settings\nscreen = (350, 350)\nfps = 30\n\n# Simulation settings\nwind_speed = 1\nwind_direction = 0\n\nwind = np.array([wind_speed * np.cos(wind_direction),... | [
[
"numpy.dot",
"numpy.sqrt",
"scipy.spatial.Delaunay",
"numpy.cos",
"numpy.sin",
"numpy.mean",
"numpy.cross",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
luzk-emory/Udacity-Deep-Learning | [
"f3ffff8dad69edca87567f97ed7bcde4eb716a20"
] | [
"p1-bikesharing/my_answers.py"
] | [
"import numpy as np\n\n\nclass NeuralNetwork(object):\n def __init__(self, input_nodes, hidden_nodes, output_nodes, learning_rate):\n # Set number of nodes in input, hidden and output layers.\n self.input_nodes = input_nodes\n self.hidden_nodes = hidden_nodes\n self.output_nodes = out... | [
[
"numpy.dot",
"numpy.random.normal",
"numpy.exp",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
wjqkkky/Tacotron2-LPCNet | [
"de2ee5ef313ca109d8ccf4a13bf5adebd4ee42f6",
"de2ee5ef313ca109d8ccf4a13bf5adebd4ee42f6"
] | [
"tacotron/models/helpers.py",
"wavenet_vocoder/util.py"
] | [
"import numpy as np\nimport tensorflow as tf\nfrom tensorflow.contrib.seq2seq import Helper\n\n\nclass TacoTestHelper(Helper):\n def __init__(self, batch_size, hparams):\n with tf.name_scope('TacoTestHelper'):\n self._batch_size = batch_size\n self._output_dim = hparams.num_mels\n ... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.random_uniform",
"tensorflow.TensorShape",
"tensorflow.train.cosine_decay",
"tensorflow.shape",
"tensorflow.reduce_any",
"tensorflow.name_scope",
"tensorflow.round",
"tensorflow.reduce_all",
"tensorflow.tile"
],
[
"tensorf... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.5",
"1.7",
"0.12",
"1.0",
... |
git-jrwang/DeepCDR | [
"c6ccf0960bee4258a347cdc21d6eef502861b7dc"
] | [
"prog/run_DeepCDR.py"
] | [
"import argparse\nimport random,os,sys\nimport numpy as np\nimport csv\nfrom scipy import stats\nimport time\nfrom sklearn.model_selection import train_test_split\nfrom sklearn import metrics\nfrom sklearn.metrics import roc_auc_score\nfrom sklearn import preprocessing\nimport pandas as pd\nimport keras.backend as ... | [
[
"pandas.read_csv",
"numpy.allclose",
"numpy.isnan",
"numpy.eye",
"scipy.stats.pearsonr",
"numpy.random.rand",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"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... |
shawnrhoads/nltools | [
"c191b3442ef1b99fc7d80277674cc49e83498d9f"
] | [
"nltools/plotting.py"
] | [
"'''\nNeuroLearn Plotting Tools\n=========================\n\nNumerous functions to plot data\n\n'''\n\n__all__ = ['dist_from_hyperplane_plot',\n 'scatterplot',\n 'probability_plot',\n 'roc_plot',\n 'plot_stacked_adjacency',\n 'plot_mean_label_distance',\n ... | [
[
"matplotlib.pyplot.title",
"numpy.arange",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"matplotlib.pyplot.plot",
"numpy.max",
"matplotlib.pyplot.ylabel",
"numpy.mean",
"matplotlib.pyplot.xlabel",
"numpy.array",
"matplotlib.pyplot.figure"
]
] | [
{
"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": []
}
] |
burwinliu/cs175 | [
"8704b7f55638d7d2b4474cee144284219a7c9b82"
] | [
"MalmoPlatform/Malmo/samples/Python_examples/library/Benchmark.py"
] | [
"# Todo, create a benchmark with already present Librarian Methods copied over to see performance and compare\n# (todo point 3) NOT WORKING YET BUT WILL BE CONTINUE TO PROGRESS ON THIS\n\nDISPLAY = False\n\nimport copy\nimport json\nimport time\nfrom random import random\nimport os\n\n\nimport matplotlib.pyplot as... | [
[
"numpy.convolve",
"matplotlib.pyplot.title",
"matplotlib.pyplot.savefig",
"numpy.ones",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.hist",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mjlbach/3detr | [
"9be44a5bbb64ca30d01340f4500950c04774d53e"
] | [
"utils/eval_det.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n\n\"\"\" Generic Code for Object Detection Evaluation\n\n Input:\n For each class:\n For each image:\n Predictions: box, score\n Groundtruths: box\n \n Output:\n For each class:\n precision-recal and average prec... | [
[
"numpy.maximum",
"numpy.arange",
"numpy.cumsum",
"numpy.sort",
"numpy.finfo",
"numpy.concatenate",
"numpy.max",
"numpy.zeros_like",
"numpy.where",
"numpy.argsort",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
LucaMantani/covid19 | [
"dcea21867aa0536076b25f6a8a0db5140bee9984"
] | [
"utils/forecast.py"
] | [
"import pandas as pd\nimport numpy as np\nfrom scipy.optimize import curve_fit\n\n\ndef exp_predict(data, countries):\n\n def func(x, a, b, c):\n return a*np.exp(b*x) + c\n\n predictions = {}\n\n for country in countries:\n\n mask = data[\"Country/Region\"] == country\n\n data_country ... | [
[
"numpy.arange",
"numpy.exp",
"scipy.optimize.curve_fit"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
smit-hinsu/tensorboard | [
"b965ae3cee7496573a39b56a1e0116377413a33b"
] | [
"tensorboard/plugins/hparams/hparams_minimal_demo.py"
] | [
"# Copyright 2019 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.compat.v1.summary.merge_all",
"tensorflow.compat.v1.summary.FileWriter",
"tensorflow.compat.v1.control_dependencies",
"tensorflow.compat.v1.executing_eagerly",
"tensorflow.compat.v1.Session",
"tensorflow.compat.v1.global_variables_initializer",
"tensorflow.compat.v1.random.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
AiltonOliveir/reinforcement-learning-environment-for-communications | [
"26ee6f85bcfb9d1b6920eb7d480d62e487178bbf"
] | [
"communications/processChannelRandomGeo.py"
] | [
"#Script context use\t: This script is for CAVIAR purposes uses\n#Author \t\t: Ailton Oliveira\n#Email \t: ailton.pinto@itec.ufpa.br\n\nimport numpy as np\nfrom .mimo_channels import getNarrowBandULAMIMOChannel, getNarrowBandUPAMIMOChannel\nimport scipy.constants as sc\n\n############################... | [
[
"numpy.angle",
"numpy.log10",
"numpy.random.randn",
"numpy.sqrt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
aaronferrucci/Verilog-Generator-of-Neural-Net-Digit-Detector-for-FPGA | [
"162ae9594e8c6d674928077a94804d1149be7d73"
] | [
"a02_generate_random_non_number.py"
] | [
"# coding: utf-8\n__author__ = 'Roman Solovyev (ZFTurbo), IPPM RAS'\n\n\nfrom a00_common_functions import *\nfrom PIL import Image, ImageDraw\nimport numpy as np\nimport os\nimport cv2\nimport random\nimport math\nimport time\n\n\ngradient_image = np.zeros((256, 256), dtype=np.uint8)\nfor i in range(256):\n grad... | [
[
"numpy.rot90",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Luca-A-Magalhaes/himcd | [
"56c939bb077485adb8a75b37bf0655e1087bbfa4"
] | [
"app/compare.py"
] | [
"import re\n\nimport pandas as pd\n# import matplotlib\n# matplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nfrom matplotlib.figure import Figure\nimport matplotlib.ticker as ticker\nimport matplotlib.dates as mdates\nimport numpy as np\nimport seaborn as sns; sns.set()\nfrom scipy.spatial.distance import squa... | [
[
"numpy.log",
"pandas.read_csv",
"pandas.merge",
"matplotlib.dates.WeekdayLocator",
"matplotlib.dates.DateFormatter",
"matplotlib.figure.Figure",
"pandas.concat",
"matplotlib.pyplot.imread",
"pandas.Series",
"pandas.isnull",
"pandas.DataFrame",
"scipy.spatial.distanc... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [
"0.13",
"1.6",
"0.14",
"1.10",
"0.15",
"1.4",
"1.3",
"1.9",
"0.19",
"1.5",
"0.18",
"1.2"... |
purpl3F0x/NeuroKit | [
"bd41f2bf7692bc8ed4c85608daa535293a33a1d6"
] | [
"neurokit2/ecg/ecg_hrv.py"
] | [
"import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.patches\n\nfrom .ecg_rate import ecg_rate as nk_ecg_rate\nfrom ..signal.signal_formatpeaks import _signal_formatpeaks_sanitize\nfrom ..signal import signal_power\nfrom ..stats import mad\nfrom ..complexity import entropy_sa... | [
[
"matplotlib.pyplot.legend",
"numpy.log",
"numpy.abs",
"matplotlib.pyplot.title",
"numpy.min",
"numpy.sqrt",
"numpy.max",
"numpy.std",
"numpy.log10",
"numpy.diff",
"numpy.mean",
"matplotlib.pyplot.ylabel",
"pandas.DataFrame.from_dict",
"matplotlib.pyplot.xlab... | [
{
"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": []
}
] |
gijskoning/pytorch-a2c-ppo-acktr-gail | [
"c313ef49407768b5d044046e0e000d6c9f71869c"
] | [
"a2c_ppo_acktr/envs.py"
] | [
"import os\n\nimport gym\nimport numpy as np\nimport torch\nfrom gym.spaces.box import Box\nfrom gym.wrappers.clip_action import ClipAction\nfrom stable_baselines3.common.atari_wrappers import (ClipRewardEnv,\n EpisodicLifeEnv,\n ... | [
[
"numpy.sqrt",
"torch.zeros",
"torch.from_numpy",
"torch.device",
"numpy.repeat"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Flyzoor/NiaPy | [
"fec1faee0f215cc3a6c2c967ec77dcbe2cbffa42"
] | [
"NiaPy/__init__.py"
] | [
"# encoding=utf8\n# pylint: disable=mixed-indentation, line-too-long, multiple-statements\n\"\"\"Python micro framework for building nature-inspired algorithms.\"\"\"\n\nfrom __future__ import print_function # for backward compatibility purpose\n\nimport os\nimport logging\nimport json\nimport datetime\nimport xls... | [
[
"numpy.amax",
"numpy.amin",
"numpy.median",
"numpy.std",
"numpy.mean"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
aarushgupta/pytorch_connectomics | [
"2cd4e17b6fa83005a13c1347a01b8b6964e746c3"
] | [
"torch_connectomics/utils/seg/aff_util.py"
] | [
"import numpy as np\nfrom scipy.misc import comb\nimport scipy.sparse\n\ndef affinitize(img, dst=(1,1,1), dtype=np.float32):\n \"\"\"\n Transform segmentation to an affinity map.\n Args:\n img: 3D indexed image, with each index corresponding to each segment.\n Returns:\n aff: an affinity m... | [
[
"numpy.pad",
"numpy.tile",
"numpy.stack",
"numpy.full",
"numpy.diff",
"numpy.prod",
"numpy.zeros",
"numpy.where"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
physimals/avb | [
"16663a935de35e4042c77000ea47abd7e5cd16ad"
] | [
"vaby_avb/prior.py"
] | [
"\"\"\"\nVABY_AVB - Priors for model and noise parameters\n\"\"\"\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom vaby.utils import LogBase\nfrom vaby.dist import Normal\n\ndef get_prior(idx, param, data_model, post, **kwargs):\n \"\"\"\n Factory method to return a vertexwise prior\n \"\"\"\n pri... | [
[
"tensorflow.reduce_sum",
"tensorflow.stack",
"tensorflow.math.lgamma",
"tensorflow.linalg.inv",
"tensorflow.Variable",
"tensorflow.squeeze",
"numpy.full",
"tensorflow.square",
"numpy.log",
"tensorflow.fill",
"tensorflow.linalg.diag",
"tensorflow.exp",
"tensorflo... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
agartland/seqlogo | [
"e534333873defa6d0ed12dd77ed6b4eb2e92474e"
] | [
"palmotif/tests/test_compute.py"
] | [
"\"\"\"\npython -m unittest palmotif/tests/test_compute.py\n\"\"\"\nimport unittest\nimport numpy as np\nimport pandas as pd\nfrom os.path import join as opj\n\nfrom palmotif import *\n\nfrom palmotif.tests.sequences import seqs1, seqs2\n\n\nclass TestCompute(unittest.TestCase):\n\n def test_compute_motif(self):... | [
[
"numpy.log"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sungjae-cho/arithmetic-jordan-net | [
"3eeb9cfa0fdcae9d8655aaa5d6112a91e201ec5f"
] | [
"rnn_run.py"
] | [
"import tensorflow as tf\nfrom tensorflow.contrib.tensorboard.plugins import projector\nimport numpy as np\nimport utils\nimport data_utils\nfrom datetime import datetime\nimport os\nimport pickle\nimport sys\nimport config\nimport gc # garbage collector interface\nimport tracemalloc\n\ndef main():\n experiment_... | [
[
"tensorflow.concat",
"numpy.sqrt",
"tensorflow.zeros",
"tensorflow.stack",
"tensorflow.reduce_sum",
"numpy.concatenate",
"tensorflow.nn.sigmoid_cross_entropy_with_logits",
"tensorflow.train.AdamOptimizer",
"tensorflow.get_default_graph",
"tensorflow.summary.scalar",
"te... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
Coiner1909/ReCirq | [
"dc52158bf02697c0b0f3022829f0df78665cfcc6",
"dc52158bf02697c0b0f3022829f0df78665cfcc6"
] | [
"recirq/fermi_hubbard/parameters.py",
"recirq/qaoa/gates_and_compilation_test.py"
] | [
"# Copyright 2020 Google\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 to i... | [
[
"numpy.sqrt",
"numpy.allclose",
"numpy.linspace",
"numpy.linalg.norm",
"numpy.full",
"numpy.ndindex",
"numpy.array",
"numpy.exp",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.random.RandomState",
"numpy.random.random",
"numpy.random.rand",
"numpy.testing.asser... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
radiasoft/opal | [
"28fe320c0b9f9d65e78a95df59daa5126304b184"
] | [
"opal/fields/discrete_fourier_electrostatic.py"
] | [
"__author__ = 'swebb'\n\n\nimport numpy as np\nfrom numba import jit\n\nclass discrete_fourier_electrostatic:\n\n def __init__(self, params_dictionary):\n\n self.type = 'spectral'\n self.n_modes = params_dictionary['n_modes']\n self.dk = params_dictionary['delta k']\n dims = params_di... | [
[
"numpy.dot",
"numpy.conj",
"numpy.ones",
"numpy.shape",
"numpy.prod",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ForeverZyh/ASCC | [
"2d76d679889953501c469221a37d486e7ee42ded"
] | [
"models/Capsule.py"
] | [
"# -*- coding: utf-8 -*-\n# paper \n\n\n#\n\n\n\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\nimport numpy as np\n\nBATCH_SIZE = 100\n\nNUM_EPOCHS = 500\nNUM_ROUTING_ITERATIONS = 3\n\ncuda = torch.cuda.is_available()\n\ndef softmax(input, dim=1):\n transposed_input = input.transpose(dim, ... | [
[
"torch.nn.functional.softmax",
"torch.nn.Parameter",
"torch.cat",
"torch.sqrt",
"torch.randn",
"torch.nn.Embedding",
"torch.nn.Sigmoid",
"torch.matmul",
"torch.nn.Linear",
"torch.mul",
"torch.sparse.torch.eye",
"torch.cuda.is_available",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
gerlero/fronts | [
"9ff46318e9de30a606e21e4111e24c5479eecacd"
] | [
"tests/test_solve.py"
] | [
"import pytest\n\nimport numpy as np\nfrom numpy.testing import assert_allclose\n\nimport fronts\nimport fronts.D\n\ndef test_nogradient():\n theta = fronts.solve(D=\"theta\", i=1, b=1)\n\n o = np.linspace(0, 20, 100)\n\n assert_allclose(theta(o=o), theta.i)\n\n\ndef test_exact():\n # Reference: Philip ... | [
[
"numpy.exp",
"numpy.array",
"numpy.linspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
KAIST-AILab/VIFLE | [
"d76468b2f22cacf142c2e9749098e7a992cf29cb"
] | [
"data/create_datasets.py"
] | [
"\"\"\"Code for creating sequence datasets.\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport pickle\nfrom scipy.sparse import coo_matrix\nimport tensorflow as tf\n\n# The default number of threads used to process data in parallel.\nD... | [
[
"scipy.sparse.coo_matrix",
"tensorflow.constant",
"tensorflow.transpose",
"tensorflow.gfile.Open",
"tensorflow.data.Dataset.from_generator",
"tensorflow.pad",
"tensorflow.to_int32",
"tensorflow.sequence_mask"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
DeathkillerAnk/Image-Compression-K-Means | [
"64f2e14378ca57d3a289c92339e665f5452c62a1"
] | [
"image_compression.py"
] | [
"#!/usr/bin/env python\r\n# coding: utf-8\r\n\r\n# <h2 align=\"center\">Image Compression with K-means Clustering</h2>\r\n\r\n# \r\n\r\n# ### Task 1: Importing Libraries\r\n# ---\r\n\r\n# In[4]:\r\n\r\n\r\nfrom __future__ import print_function\r\nget_ipython().run_line_magic('matplotlib', 'inline')\r\nimport os\r\... | [
[
"numpy.reshape",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.axes",
"matplotlib.pyplot.subplots_adjust",
"sklearn.cluster.MiniBatchKMeans",
"matplotlib.pyplot.show",
"matplotlib.pyplot.style.use"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
xiongshanxi/AudioRecorderDemo | [
"889c353994c92b0c0d7ff04253e0495407b4f22c"
] | [
"app/src/main/python/callPyLib.py"
] | [
"from bs4 import BeautifulSoup\nimport requests\nimport numpy as np\n\n# 爬取网页并解析\ndef get_http():\n requests.packages.urllib3.disable_warnings()\n r = requests.get(\"https://www.baidu.com/\",verify=False)\n r.encoding ='utf-8'\n bsObj = BeautifulSoup(r.text,\"html.parser\")\n for node in bsObj.findAl... | [
[
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Joe-Kileel/manifold-learning-arbitrary-norms | [
"f12e1d6b89a3bb2ff8d5ce0ac884d9d142494070"
] | [
"wemd.py"
] | [
"\"\"\"\nWavelet-based approximate Earthmover's distance (EMD) for 2D/3D signals.\n\nThis code is based on the following paper:\n Sameer Shirdhonkar and David W. Jacobs. \"Approximate earth mover’s distance in linear time.\" 2008 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).\n\nMore details ... | [
[
"numpy.concatenate"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
grofit/traiNNer | [
"12d006fd44ed304e4178839c53b1f3d95ca25dcb"
] | [
"codes/models/VSR_model.py"
] | [
"from __future__ import absolute_import\n\nimport os\nimport logging\nfrom collections import OrderedDict\nimport torch\nimport torch.nn as nn\n\nimport models.networks as networks\nfrom .base_model import BaseModel\nfrom . import losses\nfrom dataops.colors import ycbcr_to_rgb\n\nimport torch.nn.functional as F\nf... | [
[
"torch.nn.functional.avg_pool2d",
"torch.no_grad"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
fresh-professor/DiverseCont | [
"4be198f5531a7efe2cb91b17066322a38d219127"
] | [
"components/network.py"
] | [
"from tensorboardX import SummaryWriter\nfrom abc import ABC, abstractmethod\nfrom components.component import SelfSup, FineTune\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom torchvision.models import resnet18\n\nclass ResNetSelfSup(SelfSup):\n def __init__(self, config):\n ... | [
[
"torch.nn.Linear",
"torch.nn.Identity",
"torch.nn.Flatten",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mashadab/dimensional-analysis | [
"979293b84bacf6295cbb406bde1459599954812b"
] | [
"solve_lin_sys.py"
] | [
"# Dimensional Analysis code\n# author: Mohammad Afzal Shadab\n# date: 02/18/2021\n# email: mashadab@utexas.edu\n\nimport sys\nimport numpy as np\n\ntry:\n import Tkinter as tk\nexcept ImportError:\n import tkinter as tk\n\ntry:\n import ttk\n py3 = False\nexcept ImportError:\n import tkinter.ttk as ... | [
[
"numpy.linalg.matrix_rank",
"numpy.empty_like",
"numpy.all",
"numpy.linalg.lstsq",
"numpy.shape"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
NaumO4/multiagent-particle-envs | [
"3abf895e97c9a1b003bf324fc4d36a4c8d89d8f6",
"3abf895e97c9a1b003bf324fc4d36a4c8d89d8f6"
] | [
"multiagent/scenarios/open_1_1_without_vel.py",
"multiagent/multi_discrete.py"
] | [
"from multiagent.scenarios.my_Scenario import MyScenario\nimport numpy as np\n\nfrom multiagent.simple_agents import StayAgent\n\n\nclass Scenario(MyScenario):\n\n def make_world(self):\n self.REWARD_FOR_COLISION = 500\n name = 'open_1_1_without_vel_REWARD_FOR_COLISION_' + str(self.REWARD_FOR_COLIS... | [
[
"numpy.square",
"numpy.concatenate",
"numpy.random.uniform",
"numpy.array",
"numpy.zeros"
],
[
"numpy.multiply",
"numpy.array_equal",
"numpy.array",
"numpy.random.RandomState"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
kensaku-okada/Greenhouse-with-OPV-film-Model | [
"887bbf22f5fb7003df8ec25a83e47087bba0b97c",
"887bbf22f5fb7003df8ec25a83e47087bba0b97c"
] | [
"CropElectricityYeildSimulator1.py",
"CropElectricityYeildSimulatorDetail.py"
] | [
"# -*- coding: utf-8 -*-\r\n\r\n#############command to print out all array data\r\n# np.set_printoptions(threshold=np.inf)\r\n# print (\"directSolarRadiationToOPVWestDirection:{}\".format(directSolarRadiationToOPVWestDirection))\r\n# np.set_printoptions(threshold=1000)\r\n#############\r\n\r\n# ###################... | [
[
"numpy.array",
"numpy.linspace"
],
[
"numpy.cos",
"numpy.sin",
"numpy.max",
"numpy.argmax",
"numpy.mean",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ysglh/magnet | [
"cd37f0ebe46a17e0948158795c6715a60c34b9db"
] | [
"magnet/data/dataloader.py"
] | [
"import torch, collections\n\nfrom torch.utils.data.dataloader import DataLoader as DataLoaderPyTorch\nfrom torch.utils.data.dataloader import default_collate\nfrom torch.utils.data import Dataset\n\nimport magnet as mag\nfrom magnet.utils.varseq import pack\n\nclass TransformedDataset(Dataset):\n def __init__(s... | [
[
"torch.is_tensor",
"torch.utils.data.dataloader.default_collate"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ToWeRT1An/group_fairseq | [
"ca323ad5d3e7eca457f2cb8976cb732fedc9757e"
] | [
"fairseq/criterions/group_transformer_entropy.py"
] | [
"# Copyright (c) 2017-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the LICENSE file in\n# the root directory of this source tree. An additional grant of patent rights\n# can be found in the PATENTS file in the same directory.\n\nimport math\n\nfrom fa... | [
[
"torch.topk",
"torch.eq"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
tensorlib/tensorlib | [
"bd1bf02cbdcb4ea666b557238a4b32effab2943a"
] | [
"tensorlib/mathutils.py"
] | [
"\"\"\"General math utilities for tensor decomposition.\"\"\"\n# Authors: Kyle Kastner <kastnerkyle@gmail.com>\n# Michael Eickenberg <michael.eickenberg@gmail.com>\n# License: BSD 3-Clause\nimport numpy as np\n\n\ndef kr(B, C):\n \"\"\"\n Calculate the Khatri-Rao product of 2D matrices. Assumes block... | [
[
"numpy.abs",
"numpy.einsum",
"numpy.arange",
"numpy.kron",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
VILMA-LMA/ros-bridge | [
"8d891600af3d851add27a10ae45cf3c2108bb87c"
] | [
"carla_ros_bridge/src/carla_ros_bridge/lidar.py"
] | [
"#!/usr/bin/env python\n\n#\n# Copyright (c) 2018-2019 Intel Corporation\n#\n# This work is licensed under the terms of the MIT license.\n# For a copy, see <https://opensource.org/licenses/MIT>.\n#\n\"\"\"\nClasses to handle Carla lidars\n\"\"\"\n\nimport numpy\n\nimport tf\n\nfrom sensor_msgs.point_cloud2 import c... | [
[
"numpy.frombuffer"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mlrepa/dvc-3-automate-experiments | [
"3183149ef222c3c5e2b23688002f015bb9443475"
] | [
"src/split_dataset.py"
] | [
"import argparse\nfrom sklearn.model_selection import train_test_split\nimport pandas as pd\nfrom typing import Text\nimport yaml\n\n\ndef split_train_test(config_path: Text) -> None:\n \"\"\"Split dataset into train and test\n Args:\n config_path {Text}: path to config\n \"\"\"\n\n config = yaml.... | [
[
"pandas.read_csv",
"sklearn.model_selection.train_test_split"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
chhavip/debaised-analysis | [
"3597d35ce74f8d20384d57f12f7eb65020f9370b"
] | [
"intents/test_slice_compare.py"
] | [
"\"\"\"\nCopyright 2020 Google LLC\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\nhttps://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
ddlddl58/improver | [
"37b5b12491a77feccb03e33813efe8ffdebfa25d",
"37b5b12491a77feccb03e33813efe8ffdebfa25d"
] | [
"improver_tests/wind_calculations/wind_downscaling/test_RoughnessCorrection.py",
"improver_tests/utilities/cube_manipulation/test_strip_var_names.py"
] | [
"# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n# (C) British Crown Copyright 2017-2019 Met Office.\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 c... | [
[
"numpy.rollaxis",
"numpy.linspace",
"numpy.arange",
"numpy.ones",
"numpy.array",
"numpy.zeros"
],
[
"numpy.ones"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
briandobbins/pynio | [
"1dd5fc0fc133f2b8d329ae68929bd3c6c1c5fa7c"
] | [
"old_test/var-sub-test.py"
] | [
"from __future__ import print_function, division\nimport unittest as ut\nfrom numpy.testing import assert_equal\n\nimport Nio\nimport numpy as N\nfrom numpy import ma\nimport os\nimport tempfile\n\nverbose = True\nf, filename = tempfile.mkstemp(prefix=\"test_\")\nfilename += '.nc'\nos.close(f)\n#print 'Creating tem... | [
[
"numpy.arange",
"numpy.cos",
"numpy.sin",
"numpy.ma.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
shshen-closer/MOOC_cube-Task2-TOP3 | [
"139127144a7f8f056fc8b519a9e4832eb88e5043"
] | [
"count_difficulty.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Tue Oct 27 12:47:29 2020\r\n\r\n@author: shshen\r\n\r\n统计题目难度值(题目平均得分), 平均分越高,难度越低\r\n\r\n\"\"\"\r\nfrom collections import Counter\r\nimport numpy as np\r\nimport json\r\nimport random\r\n\r\n\r\ntrain_item = []\r\nwith open('Task2_data_0804/problem_act_train.json',... | [
[
"numpy.mean",
"numpy.save"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dbankmann/python-mloc | [
"2a29f9ddd96abd77044d091cee6e76fee6773090"
] | [
"src/pymloc/solvers/dynamical_systems/dae_flow.py"
] | [
"#\n# Copyright (c) 2019-2020\n#\n# @author: Daniel Bankmann\n# @company: Technische Universität Berlin\n#\n# This file is part of the python package pymloc\n# (see https://gitlab.tubit.tu-berlin.de/bankmann91/python-mloc )\n#\n# License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause\n#\nimport log... | [
[
"scipy.integrate.ode",
"numpy.einsum",
"scipy.integrate.trapz",
"numpy.squeeze",
"numpy.atleast_2d",
"numpy.identity",
"numpy.zeros",
"numpy.empty"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.6",
"1.10",
"1.9",
"1.7",
"1.8"
],
"tensorflow": []
}
] |
ClashLuke/rembg-greenscreen-1 | [
"c4e86a44df51c558463fa51979f7154e0c5c88d9"
] | [
"src/rembg/multiprocessing.py"
] | [
"import math\nimport multiprocessing\nimport re\nimport subprocess as sp\nimport time\n\nimport ffmpeg\nimport numpy as np\nimport torch\n\nfrom .bg import DEVICE, Net, iter_frames, remove_many\n\n\ndef worker(worker_nodes,\n worker_index,\n result_dict,\n model_name,\n gpu_b... | [
[
"numpy.stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dranzerstar/3d-photo-inpainting-fork | [
"bbc3e6a95af59ccd8ad118129f0d5b766d534040"
] | [
"subtitleDetect2.py"
] | [
"import numpy as np\nimport argparse\nimport glob\nimport os\nfrom functools import partial\nimport vispy\nimport scipy.misc as misc\nfrom tqdm import tqdm\nimport yaml\nimport sys\nfrom mesh import write_ply, read_ply, output_3d_photo\nfrom utils import get_MiDaS_samples, read_MiDaS_depth, sparse_bilateral_filteri... | [
[
"numpy.hstack",
"numpy.invert",
"numpy.clip",
"numpy.ones",
"numpy.frombuffer",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Rahul1582/Emotion-Detector | [
"2ce3775031ca79d0c08043bc636514e497ee9e5c"
] | [
"src/emotions.py"
] | [
"import numpy as np\nimport cv2\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Conv2D,MaxPooling2D,Dense,Dropout,Flatten\nfrom tensorflow.keras.preprocessing.image import ImageDataGenerator\nfrom tensorflow.keras.optimizers import Adam\nimport argparse\n\n\nUSE_WEBCAM= True # ... | [
[
"tensorflow.keras.preprocessing.image.ImageDataGenerator",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.optimizers.Adam",
"numpy.argmax",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.models.Sequ... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"2.7",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6"
]
}
] |
DevarshiChoudhury/xpsi | [
"200b82b4ef4a4e7342fc30dd03c5821cff0031c2"
] | [
"examples/true_background/CustomPrior_trueback.py"
] | [
"from __future__ import print_function, division\n\nimport numpy as np\nimport math\nfrom scipy.stats import truncnorm\n\nimport xpsi\nfrom xpsi.global_imports import _G, _csq, _km, _M_s, _2pi, gravradius\n\nclass CustomPrior(xpsi.Prior):\n \"\"\" A custom (joint) prior distribution.\n\n Currently tailored to... | [
[
"scipy.stats.truncnorm.ppf"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
brettin/controlled-peptide-generation | [
"8360c36d4999ae4c1754bd4d8a1e60c51669f726"
] | [
"data_processing/dataset.py"
] | [
"import random\nimport csv\nfrom collections import defaultdict, OrderedDict\nimport copy\nimport os\nimport io\nimport pandas as pd\nimport torch\nimport torchtext as tt\nimport codecs\nfrom models.model import UNK_IDX, PAD_IDX, START_IDX, EOS_IDX\n\n\nclass AttributeField(tt.data.RawField):\n def __init__(self... | [
[
"torch.device",
"torch.LongTensor",
"torch.from_numpy",
"torch.multinomial"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
gargrohin/AMAT-for-GAN-Training | [
"9a396fb8170befb8b55d8f01e7918d12c117bacb",
"9a396fb8170befb8b55d8f01e7918d12c117bacb"
] | [
"GANCF/mnist/mnist_dcganns_2.py",
"GANCF/toy_dataset/optimalD_wgan.py"
] | [
"import comet_ml\ncomet_ml.config.save(api_key=\"CX4nLhknze90b8yiN2WMZs9Vw\")\n\n# prerequisites\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nfrom torchvision import datasets, transforms\nfrom torch.autograd import Variable\nfrom torchvision.utils import save_i... | [
[
"torch.ones",
"torch.nn.ConvTranspose2d",
"torch.zeros",
"torch.randn",
"torch.nn.Conv2d",
"torch.utils.data.DataLoader",
"torch.nn.LayerNorm",
"torch.nn.BCELoss",
"torch.nn.Tanh",
"torch.nn.Sigmoid",
"torch.no_grad",
"torch.nn.LeakyReLU",
"torch.cuda.is_availab... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
krivacic/homework1 | [
"44cc080a5924f7cb43c69907a068b85747533b55"
] | [
"test/test_algs.py"
] | [
"import numpy as np\nfrom example import algs\n\ndef test_pointless_sort():\n # generate random vector of length 10\n x = np.random.rand(10)\n\n # check that pointless_sort always returns [1,2,3]\n assert np.array_equal(algs.pointless_sort(x), np.array([1,2,3]))\n\n # generate a new random vector of ... | [
[
"numpy.array",
"numpy.random.rand"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
teppei696/covid19 | [
"9de68ca1c3829e18e744e6fd5f58bc6354a8cbf4"
] | [
"tool/request.py"
] | [
"import codecs\nimport copy\nimport os\nimport pandas as pd\nimport requests\nimport urllib.parse\nfrom json import dumps, load\nfrom typing import Dict\nfrom datetime import datetime, timezone, timedelta\n\n\nclass DataJson:\n def __init__(self):\n self.data_file = 'data.json'\n self.severe_bed_us... | [
[
"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": []
}
] |
y961996/spaCy | [
"56fe2263d813ec21c53bbbb99577b9e2fed2d9fb"
] | [
"spacy/tests/vocab_vectors/test_vectors.py"
] | [
"import numpy\nimport pytest\nfrom numpy.testing import assert_allclose, assert_almost_equal, assert_equal\nfrom thinc.api import NumpyOps, get_current_ops\n\nfrom spacy.lang.en import English\nfrom spacy.strings import hash_string # type: ignore\nfrom spacy.tokenizer import Tokenizer\nfrom spacy.tokens import Doc... | [
[
"numpy.testing.assert_equal",
"numpy.asarray",
"numpy.ndarray",
"numpy.ones",
"numpy.testing.assert_almost_equal",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
bnaul/cesium | [
"55b4bd1cba4c4b0d0b59f676fe56c538e4fcd8c5"
] | [
"cesium/data_management.py"
] | [
"import os\nimport numpy as np\nimport pandas as pd\nfrom . import util\nfrom . import time_series\nfrom .time_series import TimeSeries\n\n\n__all__ = ['parse_ts_data', 'parse_headerfile', 'parse_and_store_ts_data']\n\n\n# TODO more robust error handling\ndef parse_ts_data(filepath, sep=\",\"):\n \"\"\"Parses ra... | [
[
"pandas.read_csv",
"pandas.Series",
"numpy.loadtxt",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
alejomonbar/pennylane | [
"14ace88924969ca4cff00f00e59ccedd778ab844"
] | [
"pennylane/devices/default_qubit.py"
] | [
"# Copyright 2018-2021 Xanadu Quantum Technologies 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 ap... | [
[
"numpy.dot",
"numpy.sqrt",
"numpy.argmax",
"numpy.ravel_multi_index",
"numpy.argsort",
"numpy.array",
"numpy.exp",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
msarahan/scikit-image | [
"7a1213a4fd74786ebdef7e29d50ae623beece449"
] | [
"skimage/segmentation/random_walker_segmentation.py"
] | [
"\"\"\"\nRandom walker segmentation algorithm\n\nfrom *Random walks for image segmentation*, Leo Grady, IEEE Trans\nPattern Anal Mach Intell. 2006 Nov;28(11):1768-83.\n\nInstalling pyamg and using the 'cg_mg' mode of random_walker improves\nsignificantly the performance.\n\"\"\"\n\nimport warnings\n\nimport numpy a... | [
[
"numpy.sqrt",
"numpy.squeeze",
"numpy.any",
"numpy.exp",
"numpy.hstack",
"scipy.sparse.coo_matrix",
"numpy.unique",
"numpy.arange",
"scipy.ndimage.binary_propagation",
"numpy.copy",
"numpy.argmax",
"numpy.diff",
"numpy.ravel",
"numpy.logical_not",
"scipy... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"0.12"
],
"tensorflow": []
}
] |
BK-Modding/galois | [
"5da4db84d90083e337ebe2c1838df5c6db88fd3f"
] | [
"galois/meta_gf2.py"
] | [
"import numba\nimport numpy as np\n\nfrom .dtypes import DTYPES\nfrom .meta_gf import GFMeta\n\n# Field attribute globals\nCHARACTERISTIC = None # The prime characteristic `p` of the Galois field\n\n# Placeholder functions to be replaced by JIT-compiled function\nADD_JIT = lambda x, y: x + y\nMULTIPLY_JIT = lambda... | [
[
"numpy.iinfo"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
canghaiyunfan/Mask-RCNN-Pedestrian-Detection | [
"501727b7e99ac228d6f7389790327b0ae45a36d8"
] | [
"utils.py"
] | [
"\"\"\"\nMask R-CNN\nCommon utility functions and classes.\n\nCopyright (c) 2017 Matterport, Inc.\nLicensed under the MIT License (see LICENSE for details)\nWritten by Waleed Abdulla\n\"\"\"\n\nimport sys\nimport os\nimport math\nimport random\nimport numpy as np\nimport tensorflow as tf\nimport scipy.misc\nimport ... | [
[
"numpy.dot",
"numpy.minimum",
"numpy.sqrt",
"tensorflow.stack",
"numpy.around",
"tensorflow.cast",
"numpy.cumsum",
"numpy.concatenate",
"numpy.max",
"numpy.all",
"numpy.any",
"numpy.exp",
"numpy.where",
"numpy.pad",
"numpy.reshape",
"numpy.arange",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.13",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
}
] |
uw-loci/multiscale_imaging | [
"d1c616a300d2cbc9b09471e6ee3d8684606bc9b9"
] | [
"multiscale/polarimetry/task_scripts/data_cleaning.py"
] | [
"import multiscale.toolkits.curve_align as ca\nimport multiscale.polarimetry.task_scripts.dir_dictionary as dird\nimport multiscale.utility_functions as util\nimport multiscale.toolkits.cytospectre as cyto\n\nfrom functools import reduce\nimport pandas as pd\nfrom pathlib import Path\nimport datetime\n\ndate = str(... | [
[
"pandas.concat",
"pandas.read_excel",
"pandas.read_csv",
"pandas.merge",
"pandas.MultiIndex",
"pandas.pivot_table"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
liujuanLT/insightface | [
"b46598268381d823b74f992da678c869d7716380",
"b46598268381d823b74f992da678c869d7716380"
] | [
"body/human_pose/ambiguity_aware/lib/utils/utils.py",
"alignment/synthetics/datasets/augs.py"
] | [
"import os\nimport torch\nimport torch.optim as optim\nimport numpy as np\nfrom sklearn.metrics import auc\n \njoint_parents = [1, 2, 13, 13, 3, 4, 7, 8, 12, 12, 9, 10, 14, 13, 13, 12, 15]\n\ndef rigid_align(predicted, target):\n assert predicted.shape == target.shape\n\n muX = np.mean(target, axis=1, ... | [
[
"numpy.linalg.svd",
"torch.sin",
"torch.load",
"torch.randn",
"numpy.arange",
"torch.zeros",
"numpy.matmul",
"numpy.linalg.norm",
"torch.eye",
"torch.tensor",
"numpy.linalg.det",
"numpy.mean",
"numpy.random.randn",
"torch.FloatTensor",
"numpy.array",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cagdemir/equity-index-predictors | [
"2546e72328de848222cb6a1c744ababab2058477",
"2546e72328de848222cb6a1c744ababab2058477",
"2546e72328de848222cb6a1c744ababab2058477"
] | [
"factor calculation scripts/36.TradingVolume(delta).py",
"factor calculation scripts/6.inflation.py",
"factor calculation scripts/33.IndustrialProduction.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Tue Dec 3 16:35:07 2019\r\n\r\n@author: Administrator\r\n\"\"\"\r\n\r\n\r\nimport pdblp\r\nimport pandas as pd\r\nimport numpy as np\r\nfrom scipy import signal\r\n\r\n\r\nfrom datetime import date\r\n\r\n\r\nstart = '20040101'\r\ntoday = date.today().strftime('%Y%m... | [
[
"pandas.Grouper"
],
[
"pandas.Grouper",
"pandas.DataFrame",
"pandas.date_range"
],
[
"pandas.Grouper",
"pandas.DataFrame",
"pandas.date_range"
]
] | [
{
"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": []
},
{
"matplotlib": [],
"nump... |
PyRsw/PyRsw | [
"c50445665a5076b7d699aa1d5fff4b91c3c1643e"
] | [
"src/Plot_tools/update_anim_1D.py"
] | [
"# Update plot objects if animating\n# Assume that the field is 1-dimensional\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom smart_time import smart_time\n\ndef update_anim_1D(sim):\n\n sim.fig.suptitle(smart_time(sim.time))\n\n for var_cnt in range(len(sim.plot_vars)):\n\n var = sim.plot... | [
[
"numpy.abs",
"matplotlib.pyplot.pause",
"matplotlib.pyplot.draw"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
vedad/amelie | [
"0a8c736b5a9b7c6ef212d90868e966ec8c20a44c",
"0a8c736b5a9b7c6ef212d90868e966ec8c20a44c"
] | [
"amelie/parameters.py",
"amelie/components.py"
] | [
"#! /usr/bin/env python\n\nfrom __future__ import (division, print_function, absolute_import)\n\n__all__ = ['Parameter', 'OrbitalParameters', '_parameter_names']\n# '_allowed_set_parameters', '_allowed_lc_priors',\n# '_allowed_rv_priors']\n\nimport numpy as np\nfrom scipy.stats import mode as sc... | [
[
"numpy.log2",
"numpy.ones_like",
"numpy.nanmedian",
"numpy.sqrt",
"numpy.percentile",
"numpy.std",
"numpy.zeros_like",
"numpy.nanmean",
"scipy.stats.mode",
"numpy.vstack"
],
[
"numpy.ones_like",
"numpy.logical_or",
"numpy.deg2rad",
"numpy.zeros_like",
... | [
{
"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"
... |
Nexlson/tensorflow-yolov4-tflite | [
"c38e47f2a3a46316216e213347220fbd1747efa0"
] | [
"detectPlate_yolov4-tiny.py"
] | [
"# import os\n# os.environ[\"CUDA_VISIBLE_DEVICES\"]=\"-1\" \nimport tensorflow as tf\nphysical_devices = tf.config.experimental.list_physical_devices('GPU')\nif len(physical_devices) > 0:\n tf.config.experimental.set_memory_growth(physical_devices[0], True)\nfrom absl import app, flags, logging\nfrom absl.fla... | [
[
"tensorflow.compat.v1.ConfigProto",
"tensorflow.constant",
"tensorflow.saved_model.load",
"tensorflow.config.experimental.set_memory_growth",
"numpy.asarray",
"tensorflow.shape",
"tensorflow.config.experimental.list_physical_devices",
"tensorflow.compat.v1.InteractiveSession"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cfifty/tensorflow | [
"de61ade607325848d3864403d69ad327b391e752"
] | [
"tensorflow/python/ops/losses/losses_impl.py"
] | [
"# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.ops.math_ops.log",
"tensorflow.python.ops.math_ops.subtract",
"tensorflow.python.ops.losses.util.add_loss",
"tensorflow.python.ops.array_ops.shape",
"tensorflow.python.ops.array_ops.squeeze",
"tensorflow.python.eager.context.executing_eagerly",
"tensorflow.python.ops... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"2.8",
"1.10",
"1.12",
"2.7",
"2.6",
"1.13",
"2.3",
"2.4",
"2.9",
"1.5",
"1.7",
"2.5",
"2.2",
"2.10"
]
}
] |
arthurcgusmao/py-mcc-f1 | [
"d1b7cb856fbf03faad6a9eeeaea08da049c603c0"
] | [
"tests/test_plot_mcc_f1_curve.py"
] | [
"import pytest\nimport numpy as np\nfrom numpy.testing import assert_allclose\n\nfrom sklearn.tree import DecisionTreeClassifier\nfrom sklearn.metrics import roc_curve\nfrom sklearn.metrics import auc\nfrom sklearn.datasets import load_iris\nfrom sklearn.datasets import load_breast_cancer\nfrom sklearn.linear_model... | [
[
"sklearn.linear_model.LogisticRegression",
"sklearn.datasets.load_iris",
"sklearn.tree.DecisionTreeClassifier",
"numpy.testing.assert_allclose",
"sklearn.conftest.pyplot.close",
"sklearn.preprocessing.StandardScaler",
"numpy.array",
"numpy.random.RandomState"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mzwiessele/cellSLAM | [
"c94c52885ed5e78a7b5d659c9510033647633076"
] | [
"topslam/simulation/graph_extraction.py"
] | [
"\nimport numpy as np\nfrom scipy import sparse\nfrom scipy.sparse.csgraph import minimum_spanning_tree, dijkstra\nfrom scipy.sparse.extract import find\n\n# def nearest_neighbor_graph(D, k):\n# idxs = np.argsort(D)\n# r = range(D.shape[0])\n# idx = idxs[:, :k]\n# _distances = sparse.lil_matrix(D.sh... | [
[
"scipy.sparse.csc_matrix",
"scipy.sparse.csgraph.dijkstra",
"scipy.sparse.find",
"scipy.sparse.extract.find",
"scipy.sparse.csgraph.minimum_spanning_tree",
"numpy.argsort"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MarkBebawy/PCS | [
"0092636cce915c0e6b82aba6b0a4a80963d1e9a4"
] | [
"code/hh.py"
] | [
"## Class HodgkinHuxley implementing functions for setting all variables,\n## and for creating, solving and plotting the corresponding\n## differential equation (of the Hodgkin-Huxley model).\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport tools\n\nclass HodgkinHuxley:\n \"\"\"\n Class which st... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"numpy.linspace",
"numpy.isnan",
"matplotlib.pyplot.plot",
"numpy.ceil",
"numpy.exp",
"matplotlib.pyplot.xlabel",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
motiurce/FeView | [
"8897b37062be88dd5ead2c8524f6b3b73451e25d"
] | [
"FeView/quad_shell.py"
] | [
"import numpy as np\r\n\r\n\r\ndef quad_cell(elemList, nodeList):\r\n nodeiRow = []\r\n for i in range(len(elemList[:, 0])):\r\n nodeiRow.append((4, int(np.argwhere(nodeList[:, 1] == elemList[i, 3])),\r\n int(np.argwhere(nodeList[:, 1] == elemList[i, 4])),\r\n ... | [
[
"numpy.array",
"numpy.argwhere"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
tillahoffmann/net-summary-selection | [
"fce6cc231b3c306646fdd7978e6eee43527e4a14"
] | [
"cost_based_selection/old/cost_based_methods.py"
] | [
"# Keeping the old code around is slightly poor form, and I should've instead created regression\n# tests early on. But this should do the trick.\n\n# -*- coding: utf-8 -*-\n\"\"\" Implementation of cost-based feature selection/ranking algorithms.\n\nImplementation of the cost-based version of the filter feature se... | [
[
"pandas.concat",
"numpy.abs",
"sklearn.ensemble.RandomForestClassifier",
"numpy.unique",
"numpy.min",
"sklearn.feature_selection.mutual_info_regression",
"pandas.DataFrame",
"numpy.max",
"sklearn.feature_selection.mutual_info_classif",
"numpy.argmax",
"numpy.mean",
... | [
{
"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": []
}
] |
nikorose87/DJS-GA | [
"f7fadaeacc7acb4e491bcf56cb7ce0982071f490"
] | [
"Horst/Regression_pipeline_for_DP_in_stiffness.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom sklearn.ensemble import GradientBoostingRegressor\nfrom sklearn.feature_selection import SelectPercentile, f_regression\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.pipeline import make_pipeline, make_union\nfrom sklearn.svm import LinearSVR\nfro... | [
[
"pandas.read_csv",
"sklearn.tree.DecisionTreeRegressor",
"sklearn.model_selection.train_test_split",
"sklearn.ensemble.GradientBoostingRegressor",
"sklearn.feature_selection.SelectPercentile",
"sklearn.svm.LinearSVR"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
databricks-academy/ml-in-production | [
"1fd6713e18cfc36357f3a98d75fedc8ffbf9eedc"
] | [
"Machine-Learning-in-Production/02-Model-Management/01-Model-Management.py"
] | [
"# Databricks notebook source\n# MAGIC %md-sandbox\n# MAGIC \n# MAGIC <div style=\"text-align: center; line-height: 0; padding-top: 9px;\">\n# MAGIC <img src=\"https://databricks.com/wp-content/uploads/2018/03/db-academy-rgb-1200px.png\" alt=\"Databricks Learning\" style=\"width: 600px\">\n# MAGIC </div>\n\n# COM... | [
[
"sklearn.ensemble.RandomForestRegressor",
"pandas.read_parquet"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"0.24",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.