repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list | possible_versions list |
|---|---|---|---|---|---|
moritzploss/tribology | [
"09bf75d670fb3d86575ca4bdced00d5dce2d4af7"
] | [
"tribology/p3can/BluPrintBallOnThreePlates.py"
] | [
"import math\nimport os\nimport re\n\nimport numpy as np\n\nfrom BluPrintTriboSys import TriboSys\nfrom Constants import PltOpts, SubDir, TexTempl, UnitTex, Unit, PrintOpts, \\\n PreSol\nfrom cartesian_plot_functions import plt_profile, \\\n plt_contact, plt_3d, plt_2d, plt_2d_scatt_line, plt_2d_2y_ax, \\\n ... | [
[
"numpy.amax",
"numpy.multiply",
"numpy.ones",
"numpy.sign",
"numpy.mean",
"numpy.divide"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
navikt/dataverk | [
"7dd803236433048686dd7a58358bc1c09565b14b"
] | [
"src/dataverk/connectors/databases/postgres.py"
] | [
"import time\nimport pandas as pd\nfrom dataverk.exceptions import dataverk_exceptions\n\nfrom sqlalchemy.exc import SQLAlchemyError, OperationalError\nfrom collections.abc import Mapping\nfrom dataverk.connectors.databases.base import DBBaseConnector\nfrom dataverk.connectors.databases.utils.error_strategies impor... | [
[
"pandas.read_sql_query"
]
] | [
{
"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": []
}
] |
vahndi/ux | [
"8acb3c07327e547ee948788536b6d6d1d7815bb2"
] | [
"ux/utils/factories/sequence_factory.py"
] | [
"from datetime import datetime, timedelta\nimport matplotlib.pyplot as plt\nfrom types import FunctionType\nfrom typing import Callable, List\n\nfrom ux.actions.user_action import UserAction\nfrom ux.sequences.action_sequence import ActionSequence\nfrom ux.plots.transitions import plot_sequence_diagram\nfrom ux.uti... | [
[
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
orestis-z/track-rcnn | [
"6b2405cb8308168106526b57027a1af3fe9df0f3",
"6b2405cb8308168106526b57027a1af3fe9df0f3"
] | [
"tools/visualize_tracking_detections.py",
"detectron/roi_data/minibatch.py"
] | [
"\"\"\"Script to visuallize tracking given a detection file\n\"\"\"\n\nimport logging\nimport argparse\nimport cv2\nimport os, sys\nimport numpy as np\n\nfrom caffe2.python import workspace\n\nfrom detectron.core.config import assert_and_infer_cfg\nfrom detectron.core.config import cfg\nfrom detectron.core.config i... | [
[
"numpy.unique"
],
[
"numpy.load"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jensgk/optbinning | [
"5ccd892fa4ee0a745ab539cee10a2069b35de6da"
] | [
"tests/test_multiclass_binning.py"
] | [
"\"\"\"\nMulticlassOptimalBinning testing.\n\"\"\"\n\n# Guillermo Navas-Palencia <g.navas.palencia@gmail.com>\n# Copyright (C) 2020\n\nimport pandas as pd\n\nfrom pytest import approx, raises\n\nfrom optbinning import MulticlassOptimalBinning\nfrom sklearn.datasets import load_wine\nfrom sklearn.exceptions import N... | [
[
"sklearn.datasets.load_wine",
"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": []
}
] |
derektan95/DAN | [
"eb29cddad6c93e591854b115ef524643b1cd471c"
] | [
"agentEncoder.py"
] | [
"import torch\nimport numpy as np\nimport torch.nn as nn\nimport math\nimport torchsummary\nfrom config import config\n\n\nclass SkipConnection(nn.Module):\n def __init__(self, module):\n super(SkipConnection, self).__init__()\n self.module = module\n\n def forward(self, inputs):\n return... | [
[
"torch.softmax",
"torch.Tensor",
"torch.nn.LayerNorm",
"torch.nn.Linear",
"torch.matmul",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Flamingwizard4/hand_dapg | [
"9222b171341942b4714341bf53f739953bfc6a17"
] | [
"dapg/utils/visualize_policy_rnn.py"
] | [
"import gym\nimport mjrl.envs\n#import trajopt.envs\nimport mj_envs\nimport click\nimport os\nimport gym\nimport numpy as np\nimport pickle\nimport torch\nfrom mjrl.utils.gym_env_rnn import GymEnv\nfrom mjrl.policies.gaussian_mlp import MLP\nimport torch\nfrom torch.autograd import Variable\n\nDESC = '''\nHelper sc... | [
[
"numpy.random.seed",
"torch.cat",
"torch.manual_seed",
"torch.from_numpy",
"torch.unsqueeze"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
pafoster/conformance_distance_experiments_cochrane_et_al_2020 | [
"fa2b3d79bc5a11f7766e3df272ad50152853381d"
] | [
"common/util.py"
] | [
"import requests\n\nimport numpy as np\nfrom tqdm.notebook import tqdm\n\ndef download(source_url, target_filename, chunk_size=1024):\n response = requests.get(source_url, stream=True)\n file_size = int(response.headers['Content-Length'])\n\n with open(target_filename, 'wb') as handle:\n for data in... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
SimonSelg/finetune_alexnet_with_tensorflow | [
"e903ec3c01fae01588ad59cc351d79da174f42fc"
] | [
"alexnet.py"
] | [
"\"\"\"This is an TensorFLow implementation of AlexNet by Alex Krizhevsky at all.\n\nPaper:\n(http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf)\n\nExplanation can be found in my blog post:\nhttps://kratzert.github.io/2017/02/24/finetuning-alexnet-with-tensorflow.h... | [
[
"tensorflow.nn.bias_add",
"tensorflow.nn.relu",
"tensorflow.get_variable",
"tensorflow.nn.xw_plus_b",
"tensorflow.concat",
"tensorflow.shape",
"tensorflow.nn.max_pool",
"tensorflow.reshape",
"tensorflow.variable_scope",
"numpy.load",
"tensorflow.split",
"tensorflow.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
nstarman/pal5-constrain-mwhalo-shape | [
"57e1523675332121cc538d1fa6e0ac6edecaeefe"
] | [
"scripts/0-create_MW_potential_2014/2019/fit_mwpot14_script.py"
] | [
"# -*- coding: utf-8 -*-\n\n# ----------------------------------------------------------------------------\n#\n# TITLE :\n# AUTHOR :\n# PROJECT :\n#\n# ----------------------------------------------------------------------------\n\n# Docstring\n\"\"\"MWPotential2014-varyc.\n\nThis notebook contains the fits of s... | [
[
"numpy.random.seed",
"matplotlib.use",
"numpy.arange",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Beomi/exbert-transformers | [
"80f944a1ae135709198bc0b4c848c4f26f382558"
] | [
"src/transformers/models/exbert/modeling_exbert.py"
] | [
"\"\"\" PyTorch exBERT model. \"\"\"\n\nimport math\nimport os\n\nimport torch\nimport torch.utils.checkpoint\nfrom torch import nn\nfrom torch.nn import CrossEntropyLoss, MSELoss\n\nfrom ...activations import ACT2FN\nfrom ...file_utils import (\n add_code_sample_docstrings,\n add_start_docstrings,\n add_s... | [
[
"torch.nn.Softmax",
"torch.cat",
"torch.zeros",
"torch.nn.Embedding",
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"torch.from_numpy",
"torch.tensor",
"torch.arange",
"tensorflow.train.list_variables",
"torch.nn.functional.softplus",
"torch.ful... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
isdevnull/asr_hw | [
"9650506b80d4e38574b63390f79a6f01786b7d18"
] | [
"test.py"
] | [
"import argparse\nimport json\nimport os\nfrom pathlib import Path\n\nimport torch\nfrom tqdm import tqdm\n\nimport hw_asr.model as module_model\nfrom hw_asr.datasets.utils import get_dataloaders\nfrom hw_asr.text_encoder.ctc_char_text_encoder import CTCCharTextEncoder\nfrom hw_asr.trainer import Trainer\nfrom hw_a... | [
[
"torch.load",
"torch.log_softmax",
"torch.no_grad",
"torch.cuda.is_available",
"torch.nn.DataParallel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
YaoPu2021/galileo | [
"e4d5021f0287dc879730dfa287b9a056f152f712",
"e4d5021f0287dc879730dfa287b9a056f152f712"
] | [
"galileo/framework/tf/python/utils.py",
"galileo/framework/pytorch/python/unsupervised.py"
] | [
"# Copyright 2020 JD.com, Inc. Galileo 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# Unles... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.is_tensor",
"tensorflow.unique",
"tensorflow.reshape",
"tensorflow.equal",
"tensorflow.gather",
"tensorflow.split"
],
[
"torch.sum",
"torch.is_tensor",
"torch.nn.Module.__init__",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.13",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensor... |
longland-m/wikigen | [
"459ba7bf9d3ca9584de65388cc9b9a15fa16a69f"
] | [
"gran/gran_sampler.py"
] | [
"# Adapted from GRAN repo, with major changes\n\nimport os\nimport time\nimport networkx as nx\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport json\nimport yaml\nfrom easydict import EasyDict as edict\n\nfrom gran.granmodel import *\nfrom gran.utils.train_helper import load_model\n\n\ndef get_confi... | [
[
"numpy.asmatrix",
"numpy.ceil",
"numpy.all",
"torch.no_grad",
"torch.nn.DataParallel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
SeanChenxy/GAN_RS | [
"a1786b946caf7bd24c83cea4c7a9bb74445cc381"
] | [
"libtorch_script.py"
] | [
"import time\nimport os\nfrom options.test_options import TestOptions\nfrom models import create_model\nimport torch\nimport cv2\nfrom util import util\n\nopt = TestOptions().parse()\nopt.nThreads = 1 # test code only supports nThreads = 1\nopt.batchSize = 1 # test code only supports batchSize = 1\nopt.serial_ba... | [
[
"torch.ones",
"torch.jit.trace",
"torch.from_numpy",
"torch.no_grad",
"torch.rand"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
VChristiaens/VIP2.7 | [
"92ce75f1004b4dd1480c3688124225ce8a98aca2"
] | [
"vip/stats/clip_sigma.py"
] | [
"#! /usr/bin/env python\n\n\"\"\"\nModule with sigma clipping functions.\n\"\"\"\n\nfrom __future__ import division, print_function\n\n__author__ = 'C. Gomez @ ULg', 'V. Christiaens'\n__all__ = ['clip_array',\n 'sigma_filter']\n\nimport numpy as np\nfrom scipy.ndimage.filters import generic_filter\nfrom a... | [
[
"scipy.ndimage.filters.generic_filter",
"numpy.median",
"numpy.floor",
"numpy.where",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"1.6",
"0.14",
"0.15",
"1.4",
"0.16",
"1.0",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"0.12",
"0.10",
"0.17",
"1.3"
],
"tensorflow": [... |
sreegandh804/ivy | [
"2045db570d7977830681a7498a3c1045fb5bcc79"
] | [
"ivy/functional/backends/tensorflow/device.py"
] | [
"\"\"\"Collection of TensorFlow general functions, wrapped to fit Ivy syntax and\nsignature.\n\"\"\"\n\n# global\n_round = round\nimport tensorflow as tf\nfrom typing import Union\nfrom tensorflow.python.types.core import Tensor\n\n# local\nimport ivy\nfrom ivy.functional.ivy.device import Profiler as BaseProfiler\... | [
[
"tensorflow.profiler.experimental.ProfilerOptions",
"tensorflow.profiler.experimental.start",
"tensorflow.profiler.experimental.stop",
"tensorflow.tpu.experimental.initialize_tpu_system",
"tensorflow.identity",
"tensorflow.config.list_logical_devices",
"tensorflow.distribute.cluster_re... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
stedn/petastorm | [
"76e41967ceef3a19239fc39bcdb6522381a4a24f",
"76e41967ceef3a19239fc39bcdb6522381a4a24f"
] | [
"petastorm/pyarrow_helpers/tests/test_batch_buffer.py",
"petastorm/tests/test_tf_utils.py"
] | [
"# Copyright (c) 2017-2018 Uber 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 app... | [
[
"numpy.random.randint"
],
[
"numpy.testing.assert_equal",
"tensorflow.local_variables_initializer",
"numpy.asarray",
"tensorflow.train.start_queue_runners",
"tensorflow.train.Coordinator",
"tensorflow.global_variables_initializer",
"tensorflow.Session"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
xiaxicheng1989/TradingAnalysis | [
"5485bcdac0f88bbd19eb8e86985248c8af18da09"
] | [
"mymodule.py"
] | [
"#import seaborn as sns\n#import matplotlib.pyplot as plt\n#import matplotlib.axes as ax\n#import sklearn\n#from sklearn.linear_model import LinearRegression\n#from sklearn import datasets, linear_model\n#from scipy.optimize import curve_fit\n#import os\n#import collections\n#from statsmodels.stats.outliers_influen... | [
[
"pandas.concat",
"pandas.to_datetime",
"pandas.DataFrame",
"sklearn.linear_model.Lasso",
"pandas.date_range",
"numpy.array",
"numpy.sum"
]
] | [
{
"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": []
}
] |
zmkwjx/GluonTS-Learning-in-Action | [
"967f2bc7294f5d1c5f006d1c08ac9600ea5dd2bf"
] | [
"chapter-2/train.py"
] | [
"# -*- coding: UTF-8 -*- \n\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport numpy as np\nfrom pathlib import Path\nfrom gluonts.model import deepar\nfrom gluonts.trainer import Trainer\nfrom gluonts.dataset import common\nfrom gluonts.dataset.util import to_pandas\nfrom gluonts.model.predictor imp... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.show",
"matplotlib.pyplot.grid"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
wbkdef/CodeSamples | [
"b7b020dee97230479a741e8d067b473957faa546"
] | [
"bk_py_torch_libs/pt_TEST_utils.py"
] | [
"import os\nimport os.path as osp\nimport re\nimport sys\nimport enum\nimport typing as tp\nimport itertools as it\nfrom typing import Union, List, Tuple, Dict, Sequence, Iterable, TypeVar, Any, Callable, Sized, NamedTuple, Optional\nfrom functools import partial\n\nimport numpy as np\nimport pandas as pd\nimport s... | [
[
"numpy.arange",
"torch.nn.Linear",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
LukeEcomod/SpaFHy_v1_Pallas | [
"bc8937a6aa72683a765506fc8f967916f81e0f12"
] | [
"misc/rasters/vihti_massage_rasterfiles.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Oct 10 12:29:37 2018\n\n@author: slauniai\n\nThis script creates georeferenced peruskarttarasteri clipped to shape of\nSpaFHy computation region at Vihti Meolo test site.\n\n\"\"\"\nimport numpy as np\nimport rasterio\nfrom rasterio.merge import merge\nfrom rasterio.... | [
[
"numpy.ones",
"matplotlib.colors.ListedColormap",
"numpy.shape",
"numpy.array",
"numpy.where"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sunpengfei1122/snn_toolbox | [
"3bdbe329eccd74952989cc704e65567b6bf8b168"
] | [
"snntoolbox/simulation/target_simulators/brian2_target_sim.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"Building and simulating spiking neural networks using Brian2.\r\n\r\n@author: rbodo\r\n\"\"\"\r\n\r\nfrom __future__ import division, absolute_import\r\nfrom __future__ import print_function, unicode_literals\r\n\r\nimport warnings\r\n\r\nimport numpy as np\r\nimport os\r\nfrom fut... | [
[
"numpy.savez",
"numpy.load",
"numpy.array",
"numpy.prod"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sharypovandrey/ml-agents | [
"2c2f9304a4e16430c07e9815d4ee8cc0d666c712"
] | [
"ml-agents/mlagents/trainers/sac/models.py"
] | [
"import logging\nimport numpy as np\nfrom typing import Dict, List, Optional\n\nfrom mlagents.tf_utils import tf\n\nfrom mlagents.trainers.models import LearningModel, LearningRateSchedule, EncoderType\n\nLOG_STD_MAX = 2\nLOG_STD_MIN = -20\nEPSILON = 1e-6 # Small value to avoid divide by zero\nDISCRETE_TARGET_ENTR... | [
[
"numpy.log",
"numpy.cumsum",
"numpy.prod"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
X-rayLaser/DeepNetLib | [
"abe64d2c0d87082aae1b2063a06a4b778ea285bd"
] | [
"tests/cost_functions/cross_entropy_cost_tests.py"
] | [
"import unittest\nfrom math import exp\nimport numpy as np\nimport cost_functions\nfrom neural_net import NetFactory\n\n\nclass CrossEntropyCostTests(unittest.TestCase):\n def cross_entropy_cost(self, a, y):\n net = NetFactory.create_neural_net(sizes=[1, 2, 3])\n cost_func = cost_functions.CrossEnt... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sweverett/CluStR | [
"d88d72a601b773f42a5d767fa25c5df31c892f02"
] | [
"plotlib.py"
] | [
"'''Plotting library for CluStR '''\n\nimport os\nimport clustr\nimport corner\nimport PyPDF2\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport scipy.stats as stats\nfrom matplotlib.ticker import LogFormatter, ScalarFormatter, FormatStrFormatter\n#import seaborn as ssb\n#plt.style.use(... | [
[
"matplotlib.pyplot.plot",
"numpy.max",
"numpy.mean",
"numpy.std",
"numpy.size",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.errorbar",
"matplotlib.ticker.LogFormatter",
"matplotlib.ticker.ScalarFormatter",
"matplotlib.pyplot.style.use",
"matplotlib.pyplot.figure",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Matthew-Boyd/MHKiT-Python | [
"016e9e67dbe1ac1ec24b3a6f8eb2771f73dfefa6"
] | [
"mhkit/power/characteristics.py"
] | [
"import pandas as pd\nimport numpy as np\nfrom scipy.signal import hilbert\nimport datetime\n\ndef instantaneous_frequency(um):\n\n \"\"\"\n Calculates instantaneous frequency of measured voltage\n \n \n Parameters\n -----------\n um: pandas Series or DataFrame\n Measured voltage (V) in... | [
[
"pandas.Series",
"numpy.abs",
"numpy.sqrt",
"pandas.DataFrame",
"numpy.diff",
"numpy.angle",
"scipy.signal.hilbert"
]
] | [
{
"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": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.1... |
Rubenkl/evalutils | [
"02cb93c4e44b96c7e45fcd505c1965c927379235"
] | [
"tests/test_roc.py"
] | [
"import numpy as np\nimport pytest\n\nfrom evalutils import roc\n\n\n@pytest.fixture(autouse=True)\ndef reset_seeds():\n np.random.seed(42)\n yield\n\n\ndef test_get_bootstrapped_roc_ci_curves():\n y_true = np.random.randint(0, 2, 500).astype(np.int)\n y_pred = np.random.random_sample(500)\n roc_95 =... | [
[
"numpy.random.random_sample",
"numpy.random.seed",
"numpy.random.randint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
GokulKarthik/east-pytorch | [
"999716670d38ab7b9083cfb541d7e40478b0a287"
] | [
"model.py"
] | [
"from config import Config\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision\nimport math\n\nconfig = {k:v for k,v in vars(Config).items() if not k.startswith(\"__\")}\n\nclass EAST(nn.Module):\n\n\n def __init__(self, geometry=\"QUAD\", label_method=\"single\"):\n ... | [
[
"torch.cat",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.nn.Sigmoid",
"torch.nn.MaxPool2d",
"torch.nn.init.xavier_uniform_",
"torch.nn.Upsample",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
savannahar68/Machine_Learning | [
"b8229f646bebd35be65f90520b1f7231fac84a15"
] | [
"Support Vector Machine/svm.py"
] | [
"from sklearn import preprocessing, model_selection, neighbors, svm\nimport pandas as pd\nimport numpy as np \n\ndf = pd.read_csv('breast-cancer-wisconsin.data.txt')\ndf.replace('?', -99999, inplace = True)\ndf.drop(['id'], 1, inplace = True) #no relation so remove it\n\nx = np.array(df.drop(['class'], 1))\ny = np.... | [
[
"numpy.array",
"pandas.read_csv",
"sklearn.model_selection.train_test_split",
"sklearn.svm.SVC"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
dlminvestments/coremltools | [
"cf6db67bab18346e132124783d46a32b8a7f52c6",
"cf6db67bab18346e132124783d46a32b8a7f52c6"
] | [
"coremltools/converters/mil/mil/passes/test_noop_elimination.py",
"coremltools/test/xgboost_tests/test_decision_tree_classifier_numeric.py"
] | [
"# Copyright (c) 2020, Apple Inc. All rights reserved.\n#\n# Use of this source code is governed by a BSD-3-clause license that can be\n# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause\n\nfrom coremltools.converters.mil.mil import Builder as mb\nfrom coremltools.converters.mil.t... | [
[
"numpy.prod"
],
[
"sklearn.tree.DecisionTreeClassifier",
"numpy.histogram",
"pandas.DataFrame",
"sklearn.datasets.load_boston"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"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",
"... |
PierreMrt/amazon_sentiment_analysis | [
"3afb269ac9683c092933f2baa7755143330e343b"
] | [
"data_cleaning/data_management.py"
] | [
"import pandas as pd\r\nfrom data_cleaning.data_cleaner import DataCleaner\r\n\r\nINPUT_PATH = 'review_scraping/data/{category}_raw_output.csv'\r\nOUTPUT_PATH = 'data_cleaning/data/{category}_cleaned_output.csv'\r\n\r\n\r\nclass DataManager:\r\n def __init__(self, category):\r\n self.category = category\r... | [
[
"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": []
}
] |
MarcGroef/deeplearning | [
"d1ef095fbe0f7e9b56017808d976efe7502e6b81"
] | [
"scripts/plot.py"
] | [
"import seaborn as sns\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom collections import OrderedDict\n\nsns.set()\nsns.set_context('talk')\npalette = sns.color_palette()\n\ndef finish(title, xlabel='epochs', ylabel='accuracy', xlim=None, ylim=None, **kwargs):\n plt.title(title)\n plt.xlabel(xlabel... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.axhline",
"matplotlib.pyplot.title",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.ylim",
"numpy.arange",
"numpy.average",
"numpy.stack",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.subplots_adj... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
user163/image-encryption | [
"3b1b2ab8060f534e8f62d826debe5bfa5ffbcff3"
] | [
"PyImgEnc.py"
] | [
"import sys\r\nimport cv2\r\nimport numpy as np\r\nfrom Crypto.Cipher import AES\r\nfrom Crypto.Util.Padding import pad, unpad\r\nfrom Crypto.Random import get_random_bytes\r\n\r\n# This program encrypts a jpg With AES-256. The encrypted image contains more data than the original image (e.g. because of \r\n# paddin... | [
[
"numpy.frombuffer"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Qin-Folks/ADL | [
"7cc7659693a2e84f4e4370e939604c77be712ca4"
] | [
"Pytorch/utils/util_acc.py"
] | [
"import torch\nimport shutil\nimport os, sys\n\n\nclass Logger(object):\n \"\"\"Log stdout messages\"\"\"\n def __init__(self, outfile):\n self.terminal = sys.stdout\n self.log = open(outfile, \"w\")\n sys.stdout = self\n\n def write(self, message):\n self.terminal.write(message... | [
[
"torch.no_grad"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
histocartography/athena | [
"8a1af389dc936bf5b8e62c56ae682a2fe4d2d71a"
] | [
"bench/scribble_plotting.py"
] | [
"import spatialHeterogeneity as sh\nimport pickle as pk\nimport os\nimport matplotlib.pyplot as plt\n\nhdf = '/Users/art/Documents/spatial-omics/spatialOmics.hdf5'\nf = '/Users/art/Documents/spatial-omics/spatialOmics.pkl'\n# so = SpatialOmics.form_h5py(f)\nwith open(f, 'rb') as f:\n so = pk.load(f)\n\n# with op... | [
[
"matplotlib.pyplot.subplots",
"numpy.stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
JackYangzg/pytorch-ddpg | [
"96838a40dd6992a0a18065a5edafbefc6bb0ac69"
] | [
"util.py"
] | [
"import torch\n\nUSE_CUDA = torch.cuda.is_available()\ndevice = torch.device(\"cuda\" if USE_CUDA else \"cpu\")\n\nFLOAT = torch.cuda.FloatTensor if USE_CUDA else torch.float64\n\n\ndef to_numpy(var):\n return var.cpu().data.numpy() if USE_CUDA else var.data.numpy()\n\ndef to_tensor(ndarray):\n return torch.f... | [
[
"torch.device",
"torch.from_numpy",
"torch.cuda.is_available"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dwolfschlaeger/guildai | [
"f82102ad950d7c89c8f2c2eafe596b2d7109dc57"
] | [
"examples/pipeline/prepare.py"
] | [
"# License: BSD\n# Author: Sasank Chilamkurthy\n# Ref: https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html\n\nfrom __future__ import print_function, division\n\nimport os\n\nimport matplotlib\n\nmatplotlib.use('Agg')\n\nimport matplotlib.pyplot as plt\n\nimport torch\n\nimport torchvision\nfrom t... | [
[
"matplotlib.use",
"torch.utils.data.DataLoader",
"matplotlib.pyplot.savefig",
"torch.save"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
basuparth/grav_wave_workshop3 | [
"eb9e2ff066bb1928e5a1dbc8cd8d24344515aae4"
] | [
"gw-odw_Day2_with_Solns/Tuto_2.4_Parameter_estimation_for_compact_object_mergers with solutions.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# <img style=\"float: left;padding: 1.3em\" src=\"https://indico.in2p3.fr/event/18313/logo-786578160.png\"> \n# \n# # Gravitational Wave Open Data Workshop #3\n# \n# \n# #### Tutorial 2.4: Parameter estimation on GW150914 using open data.\n# \n# This example estimates th... | [
[
"numpy.abs",
"numpy.median",
"numpy.quantile",
"matplotlib.pyplot.subplots",
"numpy.mean",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
vihank/donkeycar | [
"32548d3e8bafb2a8abc7e236304bf628dd5b1dd8"
] | [
"donkeycar/parts/advgan.py"
] | [
"#!/usr/bin/env python3\n'''\nCreated on Mon Dec 14 2020\n\n@author: vkarnala\n'''\n\nimport random\nimport numpy as np\nfrom donkeycar.parts.advmodels import build_disc\nfrom donkeycar.utils import get_model_by_type, load_model, extract_data_from_pickles, gather_records, \\\n collate_rec... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.plot",
"numpy.add",
"tensorflow.keras.optimizers.SGD",
"tensorflow.python.keras.backend.square",
"matplotlib.pyplot.text",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.title",
"matplotlib.pyplot.sa... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"2.7",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6"
]
}
] |
TomPiona/rip_ag | [
"d523c281820130c7a65cfee88805d4d2661d2a18"
] | [
"example/tests/test5.py"
] | [
"__out_of__ = 1\n\ntry:\n import numpy as np\n if np.isclose(YoverLstarinitial, 130000, atol=1000):\n __score__ += 1\nexcept: \n pass"
] | [
[
"numpy.isclose"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cloudygoose/ParlAI | [
"a73b683bf1c1a3b1fd2c4e2135a69b6048681f66"
] | [
"parlai/agents/tfidf_retriever/build_tfidf.py"
] | [
"#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\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\"\"\"A script to build the tf-idf document matrices for retrieval.\n\nAdapted from Adam Fisch's work at github... | [
[
"torch.FloatTensor",
"torch.LongTensor",
"numpy.log",
"scipy.sparse.diags"
]
] | [
{
"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"
... |
intelequia/GAB2019ScienceLab.Client | [
"982bcfacc31c25201755eb2353aef2204923261b"
] | [
"GABClient/GAB.Client/wwwroot/ml/pipeline1/fn.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom .mu import SavGol, Scatter\nfrom statsmodels.nonparametric.smoothers_lowess import lowess\nfrom scipy.interpolate import interp1d\nimport numpy as np\nimport os, sys, ast, re\nimport warnings\n\nwarnings.filterwarnings(action = \"ignore\", module = \"scipy\", ... | [
[
"numpy.nanmedian",
"numpy.isnan",
"numpy.put",
"numpy.ones",
"numpy.std",
"numpy.copy",
"scipy.interpolate.interp1d"
]
] | [
{
"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"
... |
TurconiAndrea/water-footprint-reducer-rs | [
"1f1b734bc2037bf4ac2dcef75db85438403d8a42"
] | [
"demo.py"
] | [
"import random\n\nimport pandas as pd\nimport streamlit as st\nfrom configuration import load_configuration\n\n\nclass Demo:\n def __init__(self):\n config = load_configuration()\n self.path_recipes = config[\"path_recipes\"]\n\n @st.cache\n def load_recipes(self):\n \"\"\"\n Lo... | [
[
"pandas.read_pickle",
"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": []
}
] |
authierj/EDSR-PyTorch | [
"cf67f0059276d72de7904c9605ca83f45a7a7002"
] | [
"src/data/__init__.py"
] | [
"from importlib import import_module\n#from dataloader import MSDataLoader\nfrom torch.utils.data import dataloader\nfrom torch.utils.data import ConcatDataset\n\n# This is a simple wrapper function for ConcatDataset\nclass MyConcatDataset(ConcatDataset):\n def __init__(self, datasets):\n super(MyConcatDa... | [
[
"torch.utils.data.dataloader.DataLoader"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
charan223/WorldModels | [
"506361120ae01e713689fd33ec1b2a33c15cb625"
] | [
"datasets/dataloader.py"
] | [
"import cv2\nimport numpy as np\n\n\ndef load_data(data_folder, ep_length, batch_rollout_size, batch_rollout):\n obs = np.zeros((ep_length * batch_rollout_size, 64, 64, 3))\n i, j = batch_rollout * batch_rollout_size, (batch_rollout + 1) * batch_rollout_size\n for k in range(i, j):\n ... | [
[
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
momozzing/kiosk_bot | [
"692f805fca4ae5f64de402102b5684ebc6a5d782"
] | [
"Data_preprocessing.py"
] | [
"import pandas as pd \nfrom IPython.display import display\nfrom tqdm import tqdm\n\ntrain_data = pd.read_csv(\"data/cafe_data.txt\", delimiter=\"\\t\", encoding= \"utf-8\")\n\ntmp = []\nfor idx in tqdm(range(len(train_data))):\n sentense, speakerid, sentenseid = train_data[\"SENTENCE\"][idx], train_data[\"SPEAK... | [
[
"pandas.read_csv",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
pawlyk/dsml-tools | [
"6717ff6b4e58c951140e2abfad20f8d306b01d97",
"6717ff6b4e58c951140e2abfad20f8d306b01d97"
] | [
"dsmlt/utils/missing.py",
"dsmlt/constants.py"
] | [
"\"\"\"\nHelper function for detect missing values\n\"\"\"\nimport numpy as np\nimport pandas as pd\n\n\n__all__ = (\n \"missing\",\n \"missing_count\",\n \"single_missing\",\n)\n\n\ndef single_missing(\n points, single_missing_value: (int, float, str, None.__class__)\n):\n \"\"\"Function that realiz... | [
[
"pandas.isnull"
],
[
"numpy.iinfo",
"numpy.finfo"
]
] | [
{
"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... |
lastone9182/laptop_rhythm | [
"23463fc7b9f93d79b4afc83a408f0d78753021c9"
] | [
"evt_proc.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport pandas as pd\nfrom datetime import datetime\nfrom datetime import timedelta\n\nESSENCE = ['EventID', 'TimeWritten']\n\nclass EventProc:\n def __init__(self):\n raw_data = pd.read_csv(r'static/logon_rhythm.csv', header=1, encoding='utf-8')\n self.df = pd.DataFrame(... | [
[
"pandas.read_csv",
"pandas.to_datetime",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
NOAA-OWP/inundation-mapping | [
"1820af99d91cede1de1b618fb5bca77bdd3e4b42"
] | [
"src/usgs_gage_unit_setup.py"
] | [
"#!/usr/bin/env python3\n\nimport os\nfrom posixpath import dirname\nimport re\nimport geopandas as gpd\nimport pandas as pd\nimport argparse\nimport warnings\nfrom utils.shared_functions import mem_profile\nwarnings.simplefilter(\"ignore\")\n\nclass Gage2Branch(object):\n\n def __init__(self, usgs_gage_filename... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
pcubillos/TEA | [
"0ec66410f274d9deea7764d53d6363f9aaad3355"
] | [
"tea/lambdacorr.py"
] | [
"############################# BEGIN FRONTMATTER ################################\n# #\n# TEA - calculates Thermochemical Equilibrium Abundances of chemical species #\n# ... | [
[
"numpy.log",
"numpy.linspace",
"numpy.isnan",
"numpy.arange",
"numpy.seterr",
"numpy.append",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
x-h-liu/paste | [
"27752e190e2f43c3f24c49fdbfce48daadb6add4",
"27752e190e2f43c3f24c49fdbfce48daadb6add4"
] | [
"experiments/preprocessing/data_preprocessing_washu.py",
"plot/plot_partial_uniform.py"
] | [
"from operator import index\nimport scanpy as sc\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib import colors\nimport seaborn as sns\n\n# gene_expression_file = \"/n/fs/ragr-data/datasets/DingLab/HT225/slice1/filtered_feature_bc_matrix.h5\"\n# adata = sc.read_10x_h5(gene_... | [
[
"pandas.read_csv",
"numpy.min",
"matplotlib.colors.Normalize",
"numpy.max",
"numpy.array",
"matplotlib.pyplot.show",
"numpy.sum",
"matplotlib.pyplot.figure"
],
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MDARIFULHASAN/neml | [
"ff169d95ee465903ba664ade4cc604e9b292a9ca"
] | [
"test/test_crystalmodels.py"
] | [
"#!/usr/bin/env python3\n\nfrom neml import models, interpolate, elasticity, history\nfrom neml.cp import crystallography, slipharden, sliprules, inelasticity, kinematics, singlecrystal, crystaldamage\nfrom neml.math import rotations, tensors\n\nimport unittest\nimport numpy as np\nimport numpy.linalg as la\n\nimpo... | [
[
"numpy.dot",
"numpy.allclose",
"numpy.eye",
"numpy.copy",
"numpy.array",
"numpy.zeros",
"numpy.isclose"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ferreirajoaouerj/gp-openai-gym | [
"b79fb0fb89c83d61809aacc331d9e39608173126"
] | [
"Carrinho_3.py"
] | [
"#-*- coding:utf-8 -*-\r\n\"\"\"\r\nDocumentation\r\n\"\"\"\r\n\r\n######################################################################################################\r\n\r\nimport os\r\nimport pickle\r\nimport time\r\nimport copy\r\nfrom collections import defaultdict\r\n\r\nimport random\r\nimport operator\r\n... | [
[
"matplotlib.colors.NoNorm",
"numpy.sqrt",
"numpy.asarray",
"numpy.nan_to_num",
"numpy.isneginf",
"numpy.max",
"numpy.add",
"numpy.histogram",
"numpy.clip",
"numpy.arange",
"numpy.sin",
"numpy.std",
"matplotlib.pyplot.figure",
"numpy.min",
"numpy.isnan",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
indralukmana/twitter-brexit | [
"9c02ec57b92e912d29946e4adc7ae158f7ca5a58"
] | [
"2nd_Assignment/iqbal/bom_crawler.py"
] | [
"#!/usr/bin/python\n\nimport sys\nimport tarfile\nimport json\nimport gzip\nimport pandas as pd\nimport botometer\nfrom pandas.io.json import json_normalize\n\n## VARIABLE INITIATION\ntar = tarfile.open(\"../input/2017-09-22.tar.gz\", \"r:gz\")\nmashape_key = \"QRraJnMT9KmshkpJ7iu74xKFN1jtp1IyBBijsnS5NGbEuwIX54\"\n... | [
[
"pandas.io.json.json_normalize",
"pandas.read_json",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"0.19",
"0.24",
"0.20",
"0.25"
],
"scipy": [],
"tensorflow": []
}
] |
yyht/electra_electric | [
"47edf6f54113b17b28bd48050ad0ae8c1f56f571"
] | [
"run_pretraining_tta_mh.py"
] | [
"# coding=utf-8\n# Copyright 2020 The Google Research Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless require... | [
[
"tensorflow.sign",
"tensorflow.concat",
"tensorflow.nn.log_softmax",
"tensorflow.control_dependencies",
"tensorflow.zeros",
"tensorflow.estimator.tpu.TPUConfig",
"tensorflow.reduce_sum",
"tensorflow.minimum",
"tensorflow.cast",
"tensorflow.equal",
"tensorflow.distribute... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
tsb4/dayTradingEnv | [
"16d1970a41c8933970152f1f41e504340d48cb08"
] | [
"gym_anytrading/envs/forex_env.py"
] | [
"import numpy as np\n\nfrom .trading_env import TradingEnv#, Actions, Positions\n\n\nclass ForexEnv(TradingEnv):\n\n def __init__(self, df, window_size, frame_bound, unit_side='left'):\n assert len(frame_bound) == 2\n assert unit_side.lower() in ['left', 'right']\n\n self.frame_bound = frame... | [
[
"numpy.diff",
"numpy.column_stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
chpolste/barotropic | [
"2c2afbd6fd97c2a50acba09b7643e73d2dca3537"
] | [
"barotropic/grid.py"
] | [
"import numpy as np\nimport spharm\nfrom .constants import EARTH_RADIUS, EARTH_OMEGA\n\n\nclass Grid:\n \"\"\"Regular lat-lon grid and operations for a spherical planet.\n\n Latitudes start at the north pole, as is convention in `spharm`. This\n results in horizontally flipped images when plotting fields i... | [
[
"numpy.ones_like",
"numpy.linspace",
"numpy.min",
"numpy.asarray",
"numpy.arcsin",
"numpy.cos",
"numpy.sin",
"numpy.full_like",
"numpy.max",
"numpy.deg2rad",
"numpy.vectorize",
"numpy.zeros_like",
"numpy.interp",
"numpy.meshgrid",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
bahia14/PIVEN-A-Deep-Neural-Network-for-Prediction-Intervals | [
"4d7722dd52f9bfa73e7b934321870f34f0f241a3"
] | [
"src/piven/scikit_learn/wrappers.py"
] | [
"import types\nimport copy\nfrom typing import Tuple, Union\nimport numpy as np\nfrom tensorflow.keras.wrappers.scikit_learn import KerasRegressor\nfrom tensorflow.python.keras.models import Sequential\n\n\nclass PivenKerasRegressor(KerasRegressor):\n def __init__(self, build_fn=None, **sk_params):\n supe... | [
[
"numpy.stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rilango/NeMo | [
"6f23ff725c596f25fab6043d95e7c0b4a5f56331"
] | [
"tests/core/test_exp_manager.py"
] | [
"# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"torch.ones",
"torch.enable_grad",
"torch.utils.data.DataLoader",
"torch.tensor",
"torch.no_grad",
"torch.stack",
"torch.nn.modules.Linear"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MorganR/gaussian-processes | [
"bf8e1c8453b5c07a525b1393bbe8013b4c10d9fb"
] | [
"galaxy_tester.py"
] | [
"import numpy as np\nfrom galaxies import Galaxies\nfrom galaxy_meta import GalaxyMeta\nimport matplotlib.pyplot as plt\n\nclass GalaxyTester():\n def __init__(self, data, model):\n self.data = data\n self.model = model\n self.galaxies = Galaxies()\n self.test_ids = self.galaxies.get_... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"numpy.unique",
"matplotlib.pyplot.gcf",
"numpy.std",
"numpy.argmax",
"numpy.average",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
petebunting/DEA_Mangroves_2018 | [
"791cb5d92c4382a0780c04a3b38c028b35224154"
] | [
"CreateCCRelationship/CreatePVCCBinnedRelationship.py"
] | [
"import pandas\nimport h5py\nimport numpy\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker\nimport random\n\nimport sklearn.pipeline\nimport sklearn.preprocessing\nimport sklearn.linear_model\n\n######## READ DATA ############\n\nh5File = './AllExtractedCoverPVStats_V5.0.h5'\n\nfH5 = h5py.File(h5File)\nda... | [
[
"sklearn.metrics.r2_score",
"numpy.min",
"numpy.isnan",
"numpy.arange",
"matplotlib.pyplot.savefig",
"pandas.DataFrame",
"numpy.max",
"numpy.std",
"matplotlib.pyplot.subplot",
"numpy.zeros_like",
"numpy.mean",
"numpy.array"
]
] | [
{
"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": []
}
] |
janvle/scipy | [
"56e6e7fdbea8bb34ecc9a1eb10ba088238d1237e"
] | [
"scipy/optimize/tests/test_optimize.py"
] | [
"\"\"\"\nUnit tests for optimization routines from optimize.py\n\nAuthors:\n Ed Schofield, Nov 2005\n Andrew Straw, April 2008\n\nTo run it in its simplest form::\n nosetests test_optimize.py\n\n\"\"\"\nimport itertools\nimport multiprocessing\nimport numpy as np\nfrom numpy.testing import (assert_allclose, as... | [
[
"numpy.diag",
"numpy.dot",
"numpy.sqrt",
"numpy.linspace",
"scipy.optimize.fmin_l_bfgs_b",
"scipy.optimize.brute",
"numpy.seterr",
"numpy.arctan2",
"scipy.optimize.fmin",
"numpy.all",
"scipy.optimize.golden",
"scipy.optimize.fmin_powell",
"numpy.exp",
"numpy... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
leander-dl-fang/UAVTracking | [
"6b7f737fd0cbe172d68875850b052d669485dd40",
"6b7f737fd0cbe172d68875850b052d669485dd40"
] | [
"cftracker/ReIDkcf.py",
"cftracker/samf.py"
] | [
"\nimport numpy as np\nimport cv2\nfrom lib.utils import cos_window,gaussian2d_rolled_labels\nfrom lib.fft_tools import fft2,ifft2\nfrom .base import BaseCF\nfrom .feature import extract_hog_feature,extract_cn_feature\nfrom mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import\nimport matplotlib.pyplot as ... | [
[
"numpy.sqrt",
"numpy.conj",
"numpy.min",
"numpy.clip",
"numpy.max",
"numpy.std",
"numpy.argmax",
"numpy.mean",
"numpy.size",
"numpy.floor",
"numpy.array"
],
[
"numpy.sqrt",
"numpy.linspace",
"numpy.conj",
"numpy.clip",
"numpy.concatenate",
"n... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
doras/HYU-CSE4020 | [
"30f75368c75b2bccba1f4d79d1d4e9db308a4a3d"
] | [
"LabAssignment6/1/viewing_and_projection.py"
] | [
"import numpy as np\nimport glfw\nfrom OpenGL.GL import *\nfrom OpenGL.GLU import *\n\ndef drawFrame():\n glBegin(GL_LINES)\n glColor3ub(255, 0, 0)\n glVertex3fv(np.array([0.,0.,0.]))\n glVertex3fv(np.array([1.,0.,0.]))\n glColor3ub(0, 255, 0)\n glVertex3fv(np.array([0.,0.,0.]))\n glVertex3fv(n... | [
[
"numpy.append",
"numpy.array",
"numpy.sqrt",
"numpy.cross"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
pabloqb2000/py-rubik_solver | [
"c1cf83fa62b6ff0dce9859fe59296c85a57f8d3f"
] | [
"src/saved_positions/position_saver.py"
] | [
"import cv2\nimport numpy as np\n\nmouse_clicks = []\n\n\ndef draw_circle(event, x, y, flags, param):\n global mouse_clicks\n if event == cv2.EVENT_LBUTTONDBLCLK:\n if len(mouse_clicks) < 9:\n mouse_clicks.append((x, y))\n else:\n mouse_clicks = mouse_clicks[1:] + [(x, y)]\... | [
[
"numpy.array",
"numpy.save"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Danilum/self-ensemble-visual-domain-adapt | [
"22d10d9585c5d1f93b5cb02a6cd1576a80d9ba63"
] | [
"prepare_gtsrb.py"
] | [
"import click\n\n\n@click.command()\n@click.option('--width', type=int, default=40)\n@click.option('--height', type=int, default=40)\n@click.option('--ignore_roi', is_flag=True, default=False)\ndef prepare(width, height, ignore_roi):\n import os\n import sys\n import numpy as np\n import tables\n imp... | [
[
"numpy.array",
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
hzfmer/post_processing | [
"9ea28997b484bdc5547a57879432b2e49f0bbcb4"
] | [
"src/post_processing/la_habra.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"A few subroutines to be used for post-processing\nTODO:\n 1. Adjust how to imshow maps\n 2. Correct the way incrementally pick psa/vel\n 3. use multiprocessing to accelerate?\n\nNote:\n site_idx: orig is left upper, x goes toward southeast, y points northeast\n source_... | [
[
"matplotlib.pyplot.imshow",
"numpy.radians",
"numpy.sqrt",
"numpy.linspace",
"numpy.squeeze",
"matplotlib.ticker.AutoMinorLocator",
"numpy.cumsum",
"numpy.max",
"numpy.mean",
"numpy.zeros_like",
"numpy.hanning",
"scipy.interpolate.griddata",
"numpy.argmin",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"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",
"1.7",
"0.12",
"1.0",
"0.17",
"0.16",
"1.8"
... |
geishm-ansto/python-streaming-data-types | [
"0018bec680b31130a559c3113d959f611d6dc6c3",
"0018bec680b31130a559c3113d959f611d6dc6c3"
] | [
"tests/test_tdct.py",
"streaming_data_types/eventdata_ev43.py"
] | [
"import pytest\nimport numpy as np\n\nfrom streaming_data_types.exceptions import WrongSchemaException\nfrom streaming_data_types.timestamps_tdct import serialise_tdct, deserialise_tdct\nfrom streaming_data_types import SERIALISERS, DESERIALISERS\n\n\nclass TestSerialisationTdct:\n original_entry = {\n \"... | [
[
"numpy.array",
"numpy.allclose"
],
[
"numpy.asarray"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
DanielLavinV/criptovidente | [
"202140a03f63404fad7107edc3f0127323b82966"
] | [
"bots/test-bot/test_bot/test_perceptron.py"
] | [
"import pandas as pd\nfrom sklearn.linear_model import SGDRegressor\nfrom sklearn.metrics import mean_squared_error, mean_absolute_error\nimport matplotlib.pyplot as plt\nimport os\n\ncount = 0\nreg = SGDRegressor()\npredict_for = \"NANOUSD.csv\"\nbatch_size = \"30T\"\nstop = pd.to_datetime(\"2020-08-01\", format=\... | [
[
"pandas.to_datetime",
"pandas.read_csv",
"sklearn.linear_model.SGDRegressor",
"sklearn.metrics.mean_absolute_error",
"pandas.DataFrame",
"sklearn.metrics.mean_squared_error",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
StuartIanNaylor/simple_audio-tensorflow | [
"c4e8b6e57d32c2e8a76f4e7c42771d3bc80d5dff",
"c4e8b6e57d32c2e8a76f4e7c42771d3bc80d5dff"
] | [
"simple_audio_mfcc_dscnn.py",
"simple_audio.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\nfrom tensorflow import keras\nimport tensorflow as tf\n\nDATASET_FILE = 'data/0-9up.32с.npz' \n\n\ndset = np.load(DATASET_FILE)\nprint(dset['x_train'].shape)\n\nx_train, x_test, x_valid = (\n dset[i].reshape(-1, 49, 13)[:,1:-1]\n for i in ['x_train', 'x_te... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.imshow",
"tensorflow.zeros",
"matplotlib.pyplot.rc",
"matplotlib.pyplot.plot",
"numpy.concatenate",
"tensorflow.lite.TFLiteConverter.from_keras_model",
"tensorflow.keras.Input",
"numpy.unique",
"tensorflow.keras.layers.Conv2D",... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"2.7",
"2.6",
"2.4",
"2.3",
"2.5",
"2.2"
]
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
... |
abirbhattacharya82/GAMBLE-IT | [
"235de213f758992fb37985e520a0088a123fcc74"
] | [
"gamble.py"
] | [
"import random\r\nimport matplotlib.pyplot as plt\r\n\r\naccount = 0\r\nx=[]\r\ny=[]\r\nfor i in range(365):\r\n x.append(i+1)\r\n bet= random.randint(1,10)\r\n lucky_draw=random.randint(1,10)\r\n #print(\"Bet:\",bet)\r\n #print(\"Lucky draw:\",lucky_draw)\r\n\r\n if bet == lucky_draw:\r\n ... | [
[
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
luisflores0330/ista131final | [
"168ac6afe666e945ae717387b50420804b33c4f3"
] | [
"src/COVIDZejunDatagraphs.py"
] | [
"'''\r\nFile: COVIDZejunDatagraphs.py\r\nAuthor: Zejun Li\r\nPurpose: This file contains 12 different functions to make 5 different graphs about the COVID 19 in Idaho\r\n'''\r\nimport pandas as pd, numpy as np, matplotlib.pyplot as plt\r\nimport matplotlib.dates as mdates\r\nimport datetime\r\nimport datetime as dt... | [
[
"matplotlib.pyplot.gca",
"numpy.polyfit",
"pandas.read_csv",
"matplotlib.dates.DateFormatter",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.bar",
"matplotlib.dates.DayLocator",
"matplotlib... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
Sam-limyr/End-to-end-ASR-Pytorch | [
"623a50792f48218228549ea17b8ea5e8bb1b342f"
] | [
"main.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\nimport yaml\nimport torch\nimport argparse\nimport numpy as np\n\n# For reproducibility, comment these may speed up training\ntorch.backends.cudnn.deterministic = True\ntorch.backends.cudnn.benchmark = False\n\n# Arguments\nparser = argparse.ArgumentParser(description='Train... | [
[
"torch.manual_seed",
"torch.cuda.is_available",
"numpy.random.seed",
"torch.cuda.manual_seed_all"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Batandwa-mgutsi/my-python-machine-learning | [
"e40d26487512ce7f339c0e6c92e3caf59fdff898"
] | [
"chapter-2/adalinesgd.py"
] | [
"import numpy as np\n\n\nclass AdalineSGD(object):\n \"\"\"ADAptive LInear NEuron classifier.\n\n Parameters\n ------------\n eta : float\n Learning rate (between 0.0 and 1.0)\n n_iter : int\n Passes over the training dataset.\n shuffle : bool (default: True)\n Shuffles training dat... | [
[
"numpy.dot",
"numpy.random.RandomState"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
krrrahul/tingo_vis_app | [
"b6d8d94b9b5abada957e64093edd3b153e726c65"
] | [
"tingo.py"
] | [
"from datetime import datetime, timedelta\nimport time\nfrom collections import namedtuple\nimport pandas as pd\nimport requests\nimport matplotlib.pyplot as plt\nimport pandas_datareader as pdr\nimport dash\nimport dash_core_components as dcc\nimport dash_html_components as html\nfrom dash.dependencies import Inpu... | [
[
"pandas.read_csv",
"pandas.to_datetime"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
stubs/iexfinance | [
"69ec139783e074783ee7ceec2887efed96f19c59"
] | [
"iexfinance/market.py"
] | [
"import pandas as pd\r\n\r\nfrom .base import _IEXBase\r\nfrom iexfinance.utils.exceptions import IEXQueryError\r\n\r\n# Data provided for free by IEX\r\n# Data is furnished in compliance with the guidelines promulgated in the IEX\r\n# API terms of service and manual\r\n# See https://iextrading.com/api-exhibit-a/ f... | [
[
"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": []
}
] |
cy5e/RPN | [
"a45a6eb132489d565d8c28dcd441fbd4a2aa9be8"
] | [
"rpn/env_utils.py"
] | [
"import init_path\nfrom collections import OrderedDict\nfrom builtins import int\nfrom future.utils import listitems\n\n\nfrom third_party.pybullet.utils.pybullet_tools.utils import WorldSaver, connect, dump_world, get_pose, set_pose, Pose, \\\n Point, set_camera, stable_z, create_box, create_cylinder, create_pl... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
aiaileen/unimelb_and_twitter | [
"ed0340765cfc816d94aa5ce1eb7058a1e3de484b"
] | [
"python/GenWordCloud.py"
] | [
"from PIL import Image\nimport numpy as np\nfrom wordcloud import WordCloud, STOPWORDS\nimport matplotlib.pyplot as plt\n\nimport couchdb\ndb_host = \"http://admin:admin@45.113.233.247:5984\"\ncouch = couchdb.Server(db_host)\n\n\ndef get_tweet_txt(school):\n for sch in school:\n file_name = sch[0]+'.txt'\... | [
[
"matplotlib.pyplot.figure",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.show",
"matplotlib.pyplot.axis"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ChenglongChen/Kaggle_Homedepot | [
"55c1033d0af3b6cf2f033fe4bcf3e1e0ffda3445"
] | [
"Code/Chenglong/data_preparer.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n@author: Chenglong Chen <c.chenglong@gmail.com>\n@brief: generate raw dataframe data\n\n\"\"\"\n\nimport gc\n\nimport numpy as np\nimport pandas as pd\n\nimport config\nfrom utils import pkl_utils\n\n\ndef main():\n # load provided data\n dfTrain = pd.read_csv(config.TRAIN_DA... | [
[
"pandas.concat",
"pandas.read_csv",
"pandas.merge",
"numpy.mean",
"numpy.var",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
TVect/NoiseFiltersPy | [
"fff1f3113cf9b3e7b8de65421ab9951fd3cb11e5"
] | [
"examples/aenn_example.py"
] | [
"from sklearn import datasets\nfrom NoiseFiltersPy.AENN import AENN\n\ndataset = datasets.load_iris()\ndata = dataset.data\nclasses = dataset.target\naenn = AENN()\nfilter = aenn(data, classes)\nprint(filter.clean_data)"
] | [
[
"sklearn.datasets.load_iris"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
EasyStock/Bull | [
"388537b389646c3c315ec51de9c3856012b1f644"
] | [
"src/fupanMain_3.py"
] | [
"\nimport string\nfrom mysql.connect2DB import ConnectToDB\nfrom DBOperating import GetTradingDateLastN,Get1LianBan,Get2LianBan,Get3LianBan,Get4AndMoreLianBan,GaoWeiFailed,\\\n Get10CMShouBanZhangTingData,Get20CMShouBanZhangTingData,Get10CMLianBanZhangTingData,\\\n Get2... | [
[
"pandas.DataFrame",
"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": []
}
] |
olivier-ea3/tune | [
"6512db5fac209ea83ed3418c1b42697f38cf1a71"
] | [
"src/backends/ort.py"
] | [
"# Copyright 2021 Hugging Face 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 applicable la... | [
[
"numpy.stack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Aor-Li/mpopt | [
"b418a3fa519146cc97fb8f29d454e27cca20ef4b"
] | [
"mpopt/population/fireworks.py"
] | [
"import numpy as np\n\nfrom .base import BaseFirework\nfrom .base import BaseEDAFirework\nfrom ..operator import operator as opt\nfrom ..tools.distribution import MultiVariateNormalDistribution as MVND\n\nEPS = 1e-8\n\nclass BasicFirework(BaseFirework):\n \"\"\" Basic firework population \"\"\"\n def __init__... | [
[
"numpy.dot",
"numpy.log",
"numpy.arange",
"numpy.eye",
"numpy.matmul",
"numpy.linalg.norm",
"numpy.ceil",
"numpy.mean",
"numpy.argsort",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.vstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
saeedarabi92/University-of-Iowa | [
"28167611b93fbf287f92af6fddccc2cc5a015bde"
] | [
"utils/helper.py"
] | [
"'''\n # @ Author: Saeed Arabi\n # @ Create Time: 2020-12-29 16:24:57\n # @ Email: arabi@iastate.edu\n '''\n\nimport pandas as pd\nimport datetime\nimport numpy as np\nimport pickle\nfrom scipy.stats import norm\nfrom scipy.interpolate import LSQUnivariateSpline\nimport matplotlib.pyplot as plt\nimport cv2\nimport ... | [
[
"matplotlib.pyplot.legend",
"pandas.merge",
"numpy.polyfit",
"numpy.poly1d",
"scipy.interpolate.LSQUnivariateSpline",
"numpy.asarray",
"pandas.DataFrame",
"pandas.read_csv",
"numpy.pad",
"numpy.clip",
"scipy.stats.norm.fit",
"numpy.arange",
"matplotlib.pyplot.su... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
jupyter-papers/GPim | [
"c9af47696ba613f9ce10c938a4e07b7f96e728ea"
] | [
"gpim/kernels/gpytorch_kernels.py"
] | [
"'''\ngpytorch_kernels.py\n======\nGpytorch kernels\n(some customized kernels TBA)\n'''\n\nimport gpytorch\nimport torch\n\n\ndef get_kernel(kernel_type, input_dim, on_gpu=True, **kwargs):\n \"\"\"\n Initializes one of the following gpytorch kernels: RBF, Matern\n\n Args:\n kernel_type (str):\n ... | [
[
"torch.set_default_tensor_type",
"torch.cuda.is_available",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ligongzzz/PRP_Dished_UNet | [
"0c71ce992636171e3e52e69e0b5e2a6edc54e1fd"
] | [
"labelme2voc.py"
] | [
"import argparse\r\nimport glob\r\nimport os\r\nimport os.path as osp\r\nimport sys\r\n\r\nimport imgviz\r\nimport numpy as np\r\n\r\nimport labelme\r\n\r\n\r\ndef main():\r\n parser = argparse.ArgumentParser(\r\n formatter_class=argparse.ArgumentDefaultsHelpFormatter\r\n )\r\n parser.add_argument('... | [
[
"numpy.save"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lucys0/RL_Implementation | [
"206255c21355ba6ff160bafcd2a189ba5d7073a1"
] | [
"sprites_datagen/utils/template_blender.py"
] | [
"########################################################################################\n# Adapted from (https://github.com/akosiorek/sqair/blob/master/sqair/data/template.py):\n# Sequential Attend, Infer, Repeat (SQAIR)\n# Copyright (C) 2018 Adam R. Kosiorek, Oxford Robotics Institute and\n# Department of S... | [
[
"numpy.asarray",
"numpy.round",
"numpy.maximum",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dahliau/3D-PointCloud | [
"62248f9d1e820ad0a8d23a53e96d21028b6080c3"
] | [
"3DMatch/trainset_d3feat.py"
] | [
"import os\nimport numpy as np\nimport open3d as o3d\nimport pickle\nimport random\n\n\ndef vis_npys(npys):\n pcds = []\n colors = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]\n for i, npy in enumerate(npys):\n pcd = o3d.geometry.PointCloud()\n pcd.points = o3d.utility.Vector3dVector(npy)\n if i ... | [
[
"numpy.mean"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
hartb/pycox | [
"72900692e3687d607740e975f15b57fa3675391b"
] | [
"pycox/utils.py"
] | [
"import pandas as pd\nimport numpy as np\nimport numba\n\ndef idx_at_times(index_surv, times, steps='pre', assert_sorted=True):\n \"\"\"Gives index of `index_surv` corresponding to `time`, i.e. \n `index_surv[idx_at_times(index_surv, times)]` give the values of `index_surv`\n closet to `times`.\n \n ... | [
[
"numpy.log",
"pandas.Series",
"numpy.unique",
"numpy.argmax",
"numpy.zeros_like",
"numpy.searchsorted",
"numpy.argsort"
]
] | [
{
"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": []
}
] |
atch841/pytorch-one-shot-texture-segmentation | [
"8b781b861d17eb1e1e7014f54f8fd39dc10dd2b8"
] | [
"generate_collages.py"
] | [
"# Most of the code here are taken from https://github.com/ivust/one-shot-texture-segmentation\n\nimport numpy as np\n\ndef generate_collages(\n textures,\n batch_size=1,\n segmentation_regions=10,\n anchor_points=None):\n # Returns a batch of mixed texture, reference mask, and refere... | [
[
"numpy.sqrt",
"numpy.arange",
"numpy.save",
"numpy.stack",
"numpy.argmin",
"numpy.load",
"numpy.zeros",
"numpy.random.randint"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Lalo-S-A/iris-api | [
"d0cf4db506433656adaf01162b118ed06c4528c8"
] | [
"iris.py"
] | [
"# -*- coding: utf-8 -*-\n\n# ===============================================================\n# Author: Rodolfo Ferro\n# Email: ferro@cimat.mx\n# Twitter: @FerroRodolfo\n#\n# ABOUT COPYING OR USING PARTIAL INFORMATION:\n# This script was originally created by Rodolfo Ferro, for\n# his workshop in HackSureste 2019 ... | [
[
"sklearn.tree.DecisionTreeClassifier",
"sklearn.datasets.load_iris",
"sklearn.tree.export_graphviz"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
BarrySunderland/HackZurich2021 | [
"860b3a9ad1c1ec59343429d9489edc3d4a2b09b0"
] | [
"modelling/train_model.py"
] | [
"from data_processing.src.feature_extractor import DataGenerator\nfrom data_processing.src.data_processor import DataProcessor\nfrom paths import PATHS\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nimport lightgbm as lgb\nimport os\n\n\ndef main():\n disruption_df = pd.read_csv(\n ... | [
[
"sklearn.model_selection.train_test_split"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
zcgraas/sentimental-trading | [
"5c7c280fcc2236c718b18f152537abe1075575f4"
] | [
"start.py"
] | [
"from dotenv import load_dotenv\r\nfrom numpy.lib.function_base import average\r\nimport pandas as pd\r\nimport requests\r\nimport os\r\nfrom vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer\r\n\r\nload_dotenv()\r\nbearerToken = os.getenv('TWITTER_BEARER_TOKEN')\r\ndf = pd.DataFrame()\r\ntweets = []\... | [
[
"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": []
}
] |
prasunroy/sign-language | [
"a69007b54df2bce7ce40838e8f37b3c31434c8bd"
] | [
"models.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nModels.\nCreated on Mon Apr 22 14:00:00 2019\nAuthor: Prasun Roy | CVPRU-ISICAL (http://www.isical.ac.in/~cvpr)\nGitHub: https://github.com/prasunroy/sign-language\n\n\"\"\"\n\n\nimport torch\n\n\nclass RNN(torch.nn.Module):\n \n def __init__(self, input_units, hidden_units, ... | [
[
"torch.nn.Linear",
"torch.nn.LogSoftmax",
"torch.randn",
"torch.cat"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
HQSquantumsimulations/pyquest | [
"b46c05ef53aeeaacdd8c595428e71ca4af0db5bd"
] | [
"pyquest_cffi/utils/test_utils.py"
] | [
"\"\"\"Testing utils (dataoperators and reporting) in PyQuest-cffi\"\"\"\n# Copyright 2019 HQS Quantum Simulations GmbH\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# htt... | [
[
"numpy.testing.assert_array_equal",
"numpy.testing.assert_equal"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
adegaray/simpletransformers | [
"e9e526f4229bf23c3b573a2bc4089d4484620ff2"
] | [
"simpletransformers/conv_ai/conv_ai_model.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n\nfrom __future__ import absolute_import, division, print_function\n\nimport os\nimport math\nimport json\nimport random\nimport warnings\nimport logging\nfrom collections import defaultdict\nfrom itertools import chain\nimport statistics\nfrom multiprocessing import cpu_c... | [
[
"torch.nn.functional.softmax",
"torch.utils.data.DataLoader",
"pandas.DataFrame",
"torch.multinomial",
"torch.no_grad",
"torch.cuda.is_available",
"torch.cuda.manual_seed_all",
"torch.topk",
"torch.device",
"torch.nn.CrossEntropyLoss",
"torch.utils.data.TensorDataset",
... | [
{
"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": []
}
] |
zuofeng1997/sokoban-rl | [
"c7c234f84b4c9a8883668ac4796e6d21500a2df2"
] | [
"main.py"
] | [
"# 8 blank state beyond the wall\n# 2 goal\n# 0 blank state\n# 1 wall\n# 3 box\n# 4 agent\n\nimport numpy as np\nfrom sokoban.util import save_policy, init_value_fn, pull_png\nfrom sokoban.model import step\nfrom sokoban.util import pic_to_matrix\n\nnum_box = 0\ngamma = 0.99\nactions = [0, 1, 2, 3] # up down right... | [
[
"numpy.max",
"numpy.argmax",
"numpy.abs"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
meinma/master-thesis | [
"0b1c3fa124eef97c4759064576bf6d25e8c60efd"
] | [
"exp_mnist_resnet/stop_time.py"
] | [
"from timeit import default_timer as timer\n\nimport fire\nimport h5py\nimport numpy as np\n\n\ndef startTimer():\n print(\"Timer is starting\")\n start = timer()\n hf = h5py.File('time.h5', 'w')\n hf.create_dataset('timing', data=start)\n hf.close()\n\n\ndef endTimer():\n print(\"Timer ends\")\n ... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jxzhangjhu/MatDesINNe | [
"b2e10cc40de27a37c3c4d9ba7101c841433d5820"
] | [
"cINN/config.py"
] | [
"'''Global configuration for the experiments'''\nimport torch\n######################\n# General settings #\n######################\n\nlambda_mse = 0.1\ngrad_clamp = 15\neval_test = 10 # crystal small data issue, we have to use smaller one\n\n# Compute device to perform the training on, 'cuda' or 'cpu'\ndevice ... | [
[
"torch.cuda.is_available"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.