repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
greenelab/mpmp
[ "0520a4264f974a3694c1268c78f4e6fd3b5642b5" ]
[ "06_predict_survival/nbconverted/plot_survival_results.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# ## Plot survival prediction results\n\n# In this notebook, we'll compare the results of survival prediction using [elastic net Cox regression](https://scikit-survival.readthedocs.io/en/stable/api/generated/sksurv.linear_model.CoxnetSurvivalAnalysis.html) for expression a...
[ [ "matplotlib.pyplot.legend", "pandas.concat", "matplotlib.pyplot.gca", "matplotlib.pyplot.title", "matplotlib.pyplot.ylim", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "numpy.mean", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylabel" ] ]
[ { "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": [] } ]
Akatsuki96/adabkb
[ "50eeb50dc5af2347bebddc12c61d755d16361796" ]
[ "adabkb/kernels/gaussian_kernel.py" ]
[ "import numpy as np\nfrom sklearn.gaussian_process.kernels import RBF\n\nclass GaussianKernel(RBF):\n def __init__(self, length_scale=1, length_scale_bounds=...):\n super().__init__(length_scale=length_scale, length_scale_bounds=length_scale_bounds)\n\n def confidence_function(self, x):\n return...
[ [ "numpy.sqrt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
matsavage/pandas-ml
[ "794cddc8dc5d0a49fbc9734d826d9465078f376e", "794cddc8dc5d0a49fbc9734d826d9465078f376e" ]
[ "pandas_ml/util/testing.py", "pandas_ml/smaccessors/test/test_datasets.py" ]
[ "#!/usr/bin/env python\r\n\r\nimport unittest\r\n\r\nimport numpy as np\r\nimport pandas.util.testing as tm\r\n\r\ntry:\r\n from pandas.util.testing import assert_raises_regex as assertRaisesRegexp # noqa\r\nexcept ImportError:\r\n from pandas.util.testing import assertRaisesRegexp ...
[ [ "pandas.util.testing.close", "numpy.array", "numpy.random.RandomState", "numpy.testing.assert_array_almost_equal" ], [ "pandas.Index" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "...
QuillMcGee/CharacterAutoencoder
[ "e550164b7527f93b5a4d2813caeb26871a3a44e8", "e550164b7527f93b5a4d2813caeb26871a3a44e8" ]
[ "OmniglotAutoencoderComparison.py", "OmniglotAutoencoderGUI.py" ]
[ "import time\n\nimport numpy as np\nimport pygame\nfrom keras.layers import Input, Dense, Conv2D, MaxPooling2D, Reshape, Flatten, UpSampling2D\nfrom keras.models import Model\n\nfrom helperfunctions import process, genvec, Beziercurve\n\nbatch_size = 32\nsidelen = 96\noriginal_shape = (None, 1, sidelen, sidelen)\nl...
[ [ "numpy.load", "numpy.random.randint" ], [ "matplotlib.widgets.Button", "numpy.load", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
UtahEFD/UtahLSM
[ "6203a117faef444dee73f2877c97d603d2e7b2fa" ]
[ "cases/materhorn/makeInput.py" ]
[ "#!/usr/bin/env python\nimport sys, json\nimport netCDF4 as nc\nimport numpy as np\nimport pylab as pl\nimport datetime as dt\n\n#############\n# Constants #\n#############\nLv = 2.5E6\nRd = 287\nRv = 461\nT0 = 273.15\nE0 = 6.11\n\n######################################\n# Data from Materhorn Field Campaign #\n####...
[ [ "numpy.full", "numpy.interp", "numpy.array", "numpy.exp", "numpy.float" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Shubham-253/Amazon-Reviews-Sentiment-Analysis
[ "abdd1c7c60b6468dc5bb3b5012c0378eb79c373a" ]
[ "Helper_code.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom selenium import webdriver\nfrom selenium.webdriver.chrome.options import Options\nfrom selenium.common.exceptions import NoSuchElementException\nimport time\nfrom selenium.webdriver.support import expected_conditions as EC\nfrom selenium.webdriver.support.ui import Web...
[ [ "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": [] } ]
takat0m0/DeepKernel
[ "6cb3cee341b0c0906a86c5410dbb76a0d99c7ee5" ]
[ "without_gp.py" ]
[ "# -*- coding:utf-8 -*-\n\nimport os\nimport sys\n\nimport numpy as np\nimport torch\nimport torch.autograd as autograd\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\n\nfrom mnist import get_data\nfrom network import Network\n\ndef eval_model(model, test_figs, test_labels):\n ...
[ [ "torch.nn.CrossEntropyLoss", "torch.tensor", "numpy.random.permutation", "torch.no_grad", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
12rambau/sepal_geospatial_toolkit
[ "8dd8ef3550f69179fe1d8f99ef6531ca943f7677" ]
[ "sgt/sgt_clump.py" ]
[ "import sys\nimport pathlib\nimport argparse\n\nimport rasterio as rio\nfrom scipy import ndimage as ndi\nimport numpy as np\n\nfrom sgt.utils import custom_print\n\ndef clump(src_rst, out_rst, band=1, mask_rst=None, verbose=False):\n \"\"\" Add spatial coherency to existing classes by combining\nadjacent simila...
[ [ "numpy.amax", "scipy.ndimage.generate_binary_structure", "scipy.ndimage.label", "numpy.zeros", "numpy.where" ] ]
[ { "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"...
jay90099/transform
[ "63f94ad8e5681c783730d688d5574c413eb40c17" ]
[ "tensorflow_transform/beam/cached_impl_test.py" ]
[ "# coding=utf-8\n#\n# Copyright 2018 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle...
[ [ "tensorflow.compat.v1.get_default_graph", "tensorflow.io.gfile.GFile", "tensorflow.identity", "tensorflow.expand_dims", "tensorflow.io.FixedLenFeature", "tensorflow.zeros_like", "tensorflow.math.reduce_sum", "tensorflow.compat.v1.Graph", "tensorflow.square", "tensorflow.sqr...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Lioscro/TissueEnrichmentAnalysis
[ "33ef872902818e2ca9b75dda1ea110cdee2f0703" ]
[ "tea_paper_docs/src/dictionary_maker_2.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Mar 2 14:39:03 2016\n\n@author: dangeles\n\"\"\"\n\nfrom urllib.request import urlopen\nimport simplejson\nimport json\nimport numpy as np\nimport pandas as pd\nimport contextlib\n\nclass solr_query(object):\n \"\"\"\n A solr_query class that stores URLs\n ...
[ [ "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": [] } ]
biyoml/PyTorch-SSD
[ "47bdc768e0dbc390ffd4dc96a2d6a859042676bc", "47bdc768e0dbc390ffd4dc96a2d6a859042676bc" ]
[ "check_data.py", "utils/data/dataloader.py" ]
[ "import argparse\nimport random\nimport matplotlib.pyplot as plt\nfrom utils.data.dataloader import create_dataloader\nfrom utils.misc import load_config, draw_boxes, unnormalize\n\n\ndef main():\n parser = argparse.ArgumentParser(\n formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n parser.add_...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.subplot", "matplotlib.pyplot.close", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "torch.Generator", "torch.LongTensor", "torch.utils.data.DataLoader", "torch.FloatTensor", "torch.stack" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nSircombe/Tool-Solutions
[ "1c92ed58ed0adc6da59a72bfce7b07cedd4ef098" ]
[ "docker/tensorflow-aarch64/examples/py-api/answer_questions.py" ]
[ "# *******************************************************************************\n# Copyright 2021 Arm Limited and affiliates.\n# SPDX-License-Identifier: Apache-2.0\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 m...
[ [ "numpy.array", "numpy.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
malpunek/shakespeare-captioning
[ "87b35ff57333b07f30e50cae4ffc2ddab2cd9392" ]
[ "captioning/model.py" ]
[ "import torch\nimport torch.nn.functional as F\nfrom torch import nn\nfrom torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence\nfrom torchvision.models import resnet101\n\n\nclass FeatureExtractor(nn.Module):\n def __init__(self):\n super().__init__()\n self.resnet = resnet101(pretr...
[ [ "torch.nn.Softmax", "torch.zeros", "torch.cat", "torch.nn.GRU", "torch.nn.Embedding", "torch.nn.utils.rnn.pad_packed_sequence", "torch.nn.Dropout", "torch.nn.utils.rnn.pack_padded_sequence", "torch.tensor", "torch.nn.functional.relu", "torch.bmm", "torch.nn.Sequenti...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Bharat123rox/fast-bert
[ "4043fd3c91966807a5474a6afccc18538cea0fd5" ]
[ "fast_bert/metrics.py" ]
[ "import numpy as np\nfrom torch import Tensor\nfrom sklearn.metrics import roc_curve, auc, hamming_loss, accuracy_score\nimport pdb\n\n# def accuracy(out, labels):\n# outputs = np.argmax(out, axis=1)\n# return np.sum(outputs == labels)\n\ndef accuracy(y_pred:Tensor, y_true:Tensor):\n\n outputs = np.argma...
[ [ "sklearn.metrics.auc", "numpy.argmax", "sklearn.metrics.hamming_loss", "sklearn.metrics.accuracy_score" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
holamlui/auto-derby
[ "3dd55738c3935d6ec885375d80f65f9e5120d54f" ]
[ "auto_derby/single_mode/context.py" ]
[ "# -*- coding=UTF-8 -*-\n# pyright: strict\nfrom __future__ import annotations\n\nimport functools\nimport os\nfrom typing import Callable, List, Set, Text, Tuple, Type\n\nimport cast_unknown as cast\nimport cv2\nimport numpy as np\nfrom PIL.Image import Image\nfrom PIL.Image import fromarray as image_from_array\n\...
[ [ "numpy.asarray", "numpy.percentile", "numpy.apply_along_axis", "numpy.average", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Saaaber/urban-segmentation
[ "fc893feb9208d3206d7c5329b1ccf4cfab97ed31" ]
[ "finetune.py" ]
[ "# Copyright (c) Ville de Montreal. All rights reserved.\n# Licensed under the MIT license.\n# See LICENSE file in the project root for full license information.\n\nimport os\nimport json\nimport torch\nimport pickle\nimport argparse\nimport datetime\nfrom hyperopt import tpe, hp, fmin, Trials\nfrom utils.factories...
[ [ "torch.device", "torch.cuda.is_available", "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
vladap2013/pytorch
[ "30367773056de95e006107d82ddaa3db5eeaa05a" ]
[ "torch/_utils.py" ]
[ "import torch\nfrom typing import Optional, List, DefaultDict\nimport warnings\nfrom collections import defaultdict\nimport sys\nimport traceback\n\n\n\ndef _type(self, dtype=None, non_blocking=False, **kwargs):\n \"\"\"Returns the type if `dtype` is not provided, else casts this object to\n the specified typ...
[ [ "torch._empty_affine_quantized", "torch.view_as_real", "torch.nn.Parameter", "torch.cuda.current_device", "torch._empty_per_channel_affine_quantized", "torch.from_numpy", "torch.Tensor._indices", "torch.tensor", "torch.Tensor._values", "torch.cuda.is_available", "torch....
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
NREL/rlmolecule
[ "7e98dca49ea82bf9d14164955d82adfa8bbc2d64" ]
[ "examples/old/hallway/hallway_problem.py" ]
[ "import itertools\nimport logging\nimport os\nimport time\nfrom functools import partial\nfrom pathlib import Path\nfrom typing import Dict, Optional\n\nimport sqlalchemy\nimport tensorflow as tf\nfrom model import build_policy_trainer\nfrom numpy import array\nfrom tensorflow.python.keras.preprocessing.sequence im...
[ [ "tensorflow.nn.softmax", "tensorflow.train.latest_checkpoint", "tensorflow.nn.sigmoid", "tensorflow.constant", "tensorflow.keras.losses.BinaryCrossentropy", "tensorflow.python.keras.preprocessing.sequence.pad_sequences", "tensorflow.function", "tensorflow.keras.optimizers.Adam", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
manzar96/emp_chat
[ "2ac08ba9c45d3959816f899a2638dc0953798e10", "2ac08ba9c45d3959816f899a2638dc0953798e10" ]
[ "experiments/baselines/test_t5.py", "experiments/baselines/train_bart.py" ]
[ "import torch\nimport math\nimport os\nimport numpy as np\nfrom tqdm import tqdm\nfrom torch.nn.functional import cosine_similarity\nfrom torch.utils.data import DataLoader\nfrom transformers import T5Tokenizer, T5ForConditionalGeneration\nfrom sentence_transformers import SentenceTransformer\n\n\nfrom core.utils.p...
[ [ "torch.utils.data.DataLoader", "torch.tensor", "torch.no_grad", "numpy.mean", "torch.cuda.is_available", "torch.nn.functional.cosine_similarity" ], [ "torch.utils.data.DataLoader", "torch.cuda.is_available", "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lukas9557/dw_matrix
[ "be9a51234a5982074709358c5eab068911890e01" ]
[ "DW_Matrix02_MachineLearning.py" ]
[ "#DW Matrix, data visualisation\r\n\r\nimport matplotlib.pyplot as plt\r\nimport pandas as pd\r\nimport numpy as np\r\n\r\ndf = pd.read_hdf(\"train.car_price.h5\")\r\nplt.hist(df.price_value, bins=100) #prices histogram\r\nplt.show()\r\n\r\nprint(df.columns.values)\r\nprint(df.price_value.describe()) #the most impo...
[ [ "pandas.read_hdf", "matplotlib.pyplot.show", "matplotlib.pyplot.hist" ] ]
[ { "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": [] } ]
MikeHart85/lsdc
[ "f11c61803aace9c267d8a45fae1b21389224a917" ]
[ "lsdcGui.py" ]
[ "\"\"\"\nThe GUI for the LSDC system\n\"\"\"\nimport sys\nimport os\nimport string\nimport math\nimport urllib\nimport urllib.request\nfrom io import BytesIO\nfrom epics import PV\nfrom qtpy import QtWidgets\nfrom qtpy import QtCore\nfrom qtpy import QtGui\nfrom qtpy.QtCore import * \nfrom qtpy.QtGui import * \nQSt...
[ [ "numpy.amin", "numpy.amax", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AuthEceSoftEng/ma-made-core
[ "466c09fca4d8a77bff93926a0b44285f76565221" ]
[ "scripts/data-restification-kit/datasetsHandler.py" ]
[ "import os\nimport json\nimport numpy as np\nimport pandas as pd\nfrom builtins import str\n\nclass datasetsHandler:\n \"\"\"\n This class implements a data handler responsible for manipulating the datasets which are to be imported.\n \"\"\"\n def __init__(self, datasets_folder):\n \"\"\"\n ...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
HDI-Project/fhub_core
[ "9667a47fbd8b4caf2e92118dc5357f34aae2098b" ]
[ "tests/validation/test_feature_api_checks.py" ]
[ "import numpy as np\n\nfrom ballet.compat import SimpleImputer\nfrom ballet.eng.base import BaseTransformer\nfrom ballet.eng.misc import IdentityTransformer\nfrom ballet.feature import Feature\nfrom ballet.util import has_nans\nfrom ballet.validation.common import check_from_class\nfrom ballet.validation.feature_ap...
[ [ "numpy.prod" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mwoss/pandas
[ "9ad1e00c5c70b4446f2af5bea9089ca3312a3eb5" ]
[ "pandas/tests/dtypes/test_inference.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"\nThese the test the public routines exposed in types/common.py\nrelated to inference and not otherwise tested in types/test_common.py\n\n\"\"\"\nfrom warnings import catch_warnings, simplefilter\nimport collections\nimport re\nfrom datetime import datetime, date, timedelta, time\n...
[ [ "numpy.matrix", "numpy.complex128", "pandas.core.dtypes.common.is_datetime64_ns_dtype", "numpy.object_", "pandas.Series", "pandas.PeriodIndex", "numpy.bool", "pandas.core.dtypes.common.ensure_categorical", "pandas._libs.lib.maybe_convert_numeric", "pandas.core.dtypes.infere...
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.24", "0.23", "0.21", "0.20" ], "scipy": [], "tensorflow": [] } ]
Miiicah/pymapdl
[ "ce85393ca82db7556a5d05883ca3fd9296444cba" ]
[ "tests/test_parameters.py" ]
[ "import numpy as np\nimport pytest\n\n\n@pytest.mark.parametrize(\n \"number\",\n [\n 1e11,\n 1e21,\n 1e31,\n 1e41,\n 1e51,\n pytest.param(1e61, marks=pytest.mark.xfail),\n ],\n)\ndef test__get_parameter_array(mapdl, number):\n name = \"param_array\"\n\n # Te...
[ [ "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ralphc1212/Probabilistic-Unet-Pytorch
[ "3508416bca92a1401b62f4c08bfbd18c8efe7cdd" ]
[ "generate_indices.py" ]
[ "from load_LIDC_data import LIDC_IDRI\ndataset = LIDC_IDRI(dataset_location = '/home/nandcui/data/plidc-punet/')\ndataset_size = len(dataset)\nindices = list(range(dataset_size))\n\n# generate 10-fold cross validation set\nimport numpy as np\nimport csv\n\nnsplits = 10\n\nsplit = int(np.floor(0.1 * dataset_size))\n...
[ [ "numpy.random.shuffle", "numpy.floor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mrajancsr/QuantEquityManagement
[ "026aa038268295a7d5e32c3d24c491e3c559e22e", "026aa038268295a7d5e32c3d24c491e3c559e22e" ]
[ "artificial_intelligence/hw4/starter/lr.py", "marketlearn/causality_network/vector_ar/bivar.py" ]
[ "from __future__ import annotations\n\nimport os\nfrom dataclasses import dataclass, field\nfrom typing import List, Optional, Union\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.preprocessing import StandardScaler\n\nfrom base import LinearBase\n\nINPUT_PATH_TO_FILE = os.path.join(\n os.getcwd(), \"a...
[ [ "sklearn.preprocessing.StandardScaler", "pandas.DataFrame.from_dict", "numpy.zeros", "numpy.genfromtxt" ], [ "numpy.log", "numpy.empty_like", "numpy.random.multivariate_normal", "scipy.stats.f.cdf", "numpy.concatenate", "numpy.ones", "numpy.linalg.det", "numpy.c...
[ { "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...
dhalnon/deep_sort_realtime
[ "d6e1e72933d559dffab3075e9119ec1cdeab9526", "d6e1e72933d559dffab3075e9119ec1cdeab9526" ]
[ "deep_sort_realtime/deep_sort/linear_assignment.py", "test/test_embedder.py" ]
[ "# vim: expandtab:ts=4:sw=4\nfrom __future__ import absolute_import\nimport numpy as np\n# from sklearn.utils.linear_assignment_ import linear_assignment\nfrom scipy.optimize import linear_sum_assignment\nfrom . import kalman_filter\n\n\nINFTY_COST = 1e+5\n\n\ndef min_cost_matching(\n distance_metric, max_di...
[ [ "scipy.optimize.linear_sum_assignment" ], [ "numpy.array", "numpy.linalg.norm" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.6", "1.4", "0.19", "1.5", "0.18", "1.2", "1.7", "1.0", "0.17", "1.3", "1.8" ], "tensorflow": [] }, { "matplotlib": [], "numpy": [ "1.10", "1....
GOEgor/python_basic_programming
[ "b418de75df75cab075573c00d5e8c5fdaf20f773" ]
[ "assignment_3/homework/colorization.py" ]
[ "import numpy as np\nimport cv2\n\n\ndef colorize(filename):\n # Read the input image\n frame = cv2.imread(filename)\n\n # Specify the paths for the 2 model files\n proto_file = \"./models/colorization_deploy_v2.prototxt\"\n weights_file = \"./models/colorization_release_v2.caffemodel\"\n\n # Load...
[ [ "numpy.concatenate", "numpy.load", "numpy.full" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
francois-rd/phonemic-confusion
[ "a21755db821697bae8d72be39af9b2fba30f488a" ]
[ "src/data_description.py" ]
[ "from src.align_phonemes import load_data, load_phonemes, text2phonemes\nfrom src.align_phonemes import DEL, INS_SAME, INS_DIFF, HYP_CODES\nfrom src.data_loader import DataLoader\nimport matplotlib.pyplot as plt\nfrom matplotlib import rcParams\nfrom collections import Counter\nimport numpy as np\n\nFIGURES_DIR = \...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylim", "matplotlib.pyplot.savefig", "numpy.mean", "matplotlib.pyplot.bar", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jeffyangchen/src
[ "cc41189d9a3e7f1b308fe04660c8c276d579805d" ]
[ "deepnetwork_layer.py" ]
[ "import numpy as np\nimport math\nimport copy\n\nclass Layer(object):\n \"\"\"Abstract Class for Layer\"\"\"\n def set_input_shape(self,input_shape):\n \"\"\"\n Sets dimension of the inputs to this layer. Argument is a tuple (dim,)\n :param dim:\n :return:\n \"\"\"\n ...
[ [ "numpy.dot", "numpy.prod", "numpy.random.uniform", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
leonjovanovic/drl-ppo-bipedal-walker
[ "5005bb396b409079fbb2065a2ecd5c956ba86630" ]
[ "main.py" ]
[ "import gym\r\nimport numpy as np\r\nimport torch\r\nfrom tensorboardX import SummaryWriter\r\nimport Config\r\nimport Agent\r\nfrom test_process import TestProcess\r\nimport itertools\r\n\r\n# --------------------------------------------------- Initialization ---------------------------------------------------\r\n...
[ [ "numpy.arange", "numpy.random.shuffle", "numpy.clip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
haozheng95/keras-yolo3-master
[ "ac2b796aeb6e168f27744063d569ac1f6ff4cf73" ]
[ "yolo_video.py" ]
[ "import sys\nimport argparse\n\nimport numpy\nfrom pandas._libs import json\n\nfrom yolo import YOLO, detect_video\nfrom PIL import Image\n\nimport glob\nimport os\n\nbase_path = os.path.dirname(os.path.abspath(__file__))\nimage_path = os.path.join(base_path, \"image\")\nimage_not_path = os.path.join(image_path, \"...
[ [ "pandas._libs.json.dumps" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
goodmami/pywsd
[ "4c12394c8adbcfed71dd912bdbef2e36370821bf" ]
[ "merlin/linear_classifier.py" ]
[ "#!/usr/bin/python -*- coding: utf-8 -*-\n#\n# Merlin - Almost Native Python Machine Learning Library: Linear Classifier\n#\n# Copyright (C) 2014-2015 alvations\n# URL:\n# For license information, see LICENSE.md\nimport numpy as np\n\nclass LinearClassifier:\n \"\"\"\n Abstract class for Linear Classifiers\n ...
[ [ "numpy.dot", "numpy.hstack", "numpy.argmax", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
VICTORVICKIE/Virtual-lab
[ "749742e618b90d73dfca2b6110382a7d2593654b" ]
[ "CourseBased/Joukowski_Airfoil.py" ]
[ "import numpy as np\r\nimport numpy.ma as ma\r\nimport matplotlib.pyplot as plt\r\n\r\n\r\n\r\ndef Joukowski_transformation(z, lam, alpha):\t\t\t\t\t\t\t\t\t\t#Joukowski transformation\r\n return z+(np.exp(-1j*2*alpha)*lam**2)/z\r\n\r\n\r\ndef circle(C, R):\r\n t = np.linspace(0,2*np.pi, 200)\r\n return C+...
[ [ "numpy.absolute", "numpy.linspace", "numpy.arange", "numpy.sin", "numpy.exp", "numpy.errstate", "numpy.meshgrid", "numpy.zeros", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
linwhitehat/ET-BERT
[ "f6cddb27bd4c926faa64092579c117155055fa76" ]
[ "pre-training/pretrain.py" ]
[ "import argparse\nimport torch\nimport uer.trainer as trainer\nfrom uer.utils.config import load_hyperparam\nfrom uer.opts import *\n\n\ndef main():\n parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n\n # Path options.\n parser.add_argument(\"--dataset_path\", type=...
[ [ "torch.cuda.device_count", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zoepiran/ott
[ "05f53501d0bee031c86bb2d29db2eacfe84dceeb" ]
[ "tests/tools/gaussian_mixture/gaussian_mixture_test.py" ]
[ "# coding=utf-8\n# Copyright 2022 Google LLC.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
[ [ "numpy.testing.assert_array_equal", "numpy.testing.assert_allclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
LianyuanMa/Color_Search
[ "dba30b4c2e9046249d75dd0e7c1c88331dda72a2" ]
[ "api/app/Routers/server.py" ]
[ "from fastapi import APIRouter\nfrom fastapi import Header\nfrom typing import Optional\nimport requests\nfrom io import BytesIO\nimport numpy as np\nimport cv2\nfrom sklearn.cluster import KMeans\nfrom PIL import Image\nfrom sklearn import metrics\nimport math\nimport collections\n\nrouter = APIRouter()\n\ndef ex...
[ [ "sklearn.cluster.KMeans", "numpy.reshape", "numpy.array", "numpy.histogram", "numpy.sum", "sklearn.metrics.calinski_harabasz_score" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
QuranPalace/QuranSurah
[ "d27c0942db95130f76ce7a04b59547722a252cd3" ]
[ "quranSurah.py" ]
[ "#! /usr/bin/python\nimport sys\nimport timeit\nimport numpy as np\nfrom sklearn.feature_extraction.text import TfidfVectorizer\n'''\nAuthor: Ehsaneddin Asgari\nEmail: asgari@berkeley.edu\n'''\n\nclass QuranSurah:\n\t\n\t_letters_map={\"_hamzah_\": 'ء', \"_HHHH_\": \"ح\", \"_DDDD_\": \"ض\", \"_ayn_\":\"ع\", \"w\":...
[ [ "numpy.argsort", "sklearn.feature_extraction.text.TfidfVectorizer" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SoaringChicken/tensorflow-privacy
[ "70ab071e2332694efaa7ad88240832f5b778d55c" ]
[ "tutorials/mnist_lr_tutorial.py" ]
[ "# Copyright 2019, The TensorFlow Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable ...
[ [ "tensorflow.estimator.Estimator", "numpy.linspace", "tensorflow.reduce_mean", "tensorflow.losses.get_regularization_loss", "tensorflow.keras.regularizers.L2", "numpy.linalg.norm", "tensorflow.get_logger", "tensorflow.keras.datasets.mnist.load_data", "tensorflow.nn.sparse_softma...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
erinliao/dss_oust
[ "2c80a58fe0ca97e7e4f3069a578e5d3e43299d93" ]
[ "rasa/nlu/featurizers/ngram_featurizer.py" ]
[ "import time\nfrom collections import Counter\n\nimport logging\nimport numpy as np\nimport os\nimport typing\nimport warnings\nfrom string import punctuation\nfrom typing import Any, Dict, List, Optional, Text\n\nfrom rasa.nlu import utils\nfrom rasa.nlu.config import RasaNLUModelConfig\nfrom rasa.nlu.featurizers ...
[ [ "numpy.hstack", "sklearn.model_selection.cross_val_score", "sklearn.linear_model.LogisticRegression", "numpy.linspace", "numpy.unique", "sklearn.linear_model.RandomizedLogisticRegression", "numpy.stack", "numpy.max", "numpy.argmax", "numpy.bincount", "numpy.floor", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kevinsung/pudl
[ "fe2086a12282b84523883a474bad9905a4b662e5" ]
[ "src/pudl/analysis/allocate_net_gen.py" ]
[ "\"\"\"\nAllocate data from generation_fuel_eia923 table to generator level.\n\nNet electricity generation and fuel consumption are reported in mutiple ways\nin the EIA 923. The generation_fuel_eia923 table reports both generation and\nfuel consumption, and breaks them down by plant, prime mover, and fuel. In\npara...
[ [ "pandas.concat", "pandas.merge", "numpy.where", "numpy.isclose" ] ]
[ { "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": [] } ]
xxcctxx/https-github.com-PlanTL-SANIDAD-lm-spanish
[ "e431f1353ce27c6914c078f121b11f14e3a87e4d" ]
[ "evaluation/evaluate/run_ner.py" ]
[ "#!/usr/bin/env python\n# coding=utf-8\n# Copyright 2020 The HuggingFace Team 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/li...
[ [ "numpy.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
yukoba/autograd
[ "4a693a2daac6435cb6bddf6b18bd918a46591a82" ]
[ "examples/negative_binomial_maxlike.py" ]
[ "from __future__ import division, print_function\nimport autograd.numpy as np\nimport autograd.numpy.random as npr\nfrom autograd.scipy.special import gammaln\nfrom autograd import grad, multigrad\n\nimport scipy.optimize\n\n\n# The code in this example implements a method for finding a stationary point of\n# the n...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "matplotlib.pyplot.xlim", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
harishved/fluffy-happiness
[ "51906efd28a20193a287086366de46a7b93f1e4d" ]
[ "get_fluffy.py" ]
[ "# Fluffy Happiness: Test code to grab pictures of cute animals from the Internet\n# Usage: >> python get_fluffy.py [options]\n# V.A. Moss (vmoss.astro@gmail.com)\n__author__ = \"V.A. Moss\"\n__date__ = \"$22-oct-2018 22:00:00$\"\n__version__ = \"0.2\"\n\n# Imports\nimport os\nimport sys\nimport urllib.request, url...
[ [ "matplotlib.image.imread", "matplotlib.pyplot.imshow", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
USDA-ARS-GBRU/web
[ "0208dce628314342dc3a0b901dbc5a2fac4dbfd1" ]
[ "data/2018_Delmont_et_al_SAR11_SAAVs/files/curate_SAAV_table.py" ]
[ "import pandas as pd\n\nsaav_table_fname = \"S-LLPA_SAAVs_20x_10percent_departure.txt\"\nnonoutlier_gene_cov_fname = \"ALL_SPLITS-gene_non_outlier_coverages.txt\"\n\n# load table\nsaav_table = pd.read_csv(saav_table_fname, sep='\\t', header=0, index_col=False)\n\n# neglect inter-gene stop codons, which have invalid...
[ [ "pandas.read_csv", "pandas.melt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
crhea93/LUCI
[ "9be461a348892ac8e22168dcd6ee1b6960f7421d" ]
[ "LUCI/LuciFunctions.py" ]
[ "import numpy as np\nfrom scipy import special as sps\n\n\nclass Gaussian:\n \"\"\"\n Class encoding all functionality of the gaussian function. This includes\n a function call, an evaluation of the function for all lines to be fit,\n and a plot call.\n \"\"\"\n\n def __init__(self):\n pass...
[ [ "numpy.sinc", "numpy.abs", "numpy.sqrt", "scipy.special.dawsn", "numpy.real", "numpy.exp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lanqing30/SensorFusionCourse
[ "834060da7ee0125cefd310d6215821551bac16c3" ]
[ "IMU/05-imu-navigation/src/gnss_ins_sim/src/recorder_node_deterministic_error.py" ]
[ "#!/usr/bin/python\n\nimport os\n\nimport rospkg\nimport rospy\nimport rosbag\n\nimport math\nimport numpy as np\nimport pandas as pd\n\nfrom gnss_ins_sim.sim import imu_model\nfrom gnss_ins_sim.sim import ins_sim\n\nfrom std_msgs.msg import String\nfrom sensor_msgs.msg import Imu\nfrom nav_msgs.msg import Odometry...
[ [ "numpy.eye", "numpy.array", "numpy.random.randn" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nildude/QuantEquityManagement
[ "2713ffe8c8c0e814a4e5f657182ff692d7745012" ]
[ "python/lib/learning/clustering/mst.py" ]
[ "\"\"\"Module replicates the paper \"A review of two decates of correlation, \nhierarchies, networks and clustering in financial markets using minimum spanning trees\nAuthor: Rajan Subramanian\nDate: 07/16/2020\n\"\"\"\n\nimport numpy as np \nimport yfinance as yf\nimport heapq\nfrom itertools import combinations\n...
[ [ "numpy.sqrt", "matplotlib.pyplot.draw" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AntonioWR/sharpy
[ "c922be8d5a1831c4624b22f39264e2f417a03deb" ]
[ "sharpy/solvers/steplinearuvlm.py" ]
[ "\"\"\"\nTime domain solver to integrate the linear UVLM aerodynamic system developed by S. Maraniello\nN Goizueta\nNov 18\n\"\"\"\nfrom sharpy.utils.solver_interface import BaseSolver, solver\nimport numpy as np\nimport sharpy.utils.settings as settings\nimport sharpy.utils.generator_interface as gen_interface\nim...
[ [ "numpy.concatenate", "numpy.dot", "numpy.zeros", "numpy.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
iancze/TWA-3-orbit
[ "e852f69b298d315aacc5801dacb42346e3a281c1" ]
[ "analysis/close/rv_astro_more/plot.py" ]
[ "import arviz as az\nimport corner\nimport exoplanet as xo\nimport matplotlib.pyplot as plt\nimport pymc3 as pm\nimport os \n\n\nimport src.close.rv_astro_more.model as m\nimport src.data as d\nfrom src.constants import *\n\nplotdir = \"figures/close/rv_astro_more/\"\n\nif not os.path.isdir(plotdir):\n os.makedi...
[ [ "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
qqhann/ShinRL
[ "5f95f01d8061d1dc3ffdc84f4049ab88daa00758" ]
[ "shinrl/envs/base/env.py" ]
[ "from abc import ABC, abstractmethod\nfrom typing import Any, Callable, Dict, Optional, Tuple\n\nimport gym\nimport jax\nimport jax.numpy as jnp\nimport numpy as np\n\n\"\"\"\nAuthor: Toshinori Kitamura\nAffiliation: NAIST & OSX\n\"\"\"\nfrom chex import Array, PRNGKey\nfrom cpprb import ReplayBuffer\n\nimport shin...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
groke-technologies/pytorch-lightning
[ "839019a3a7a8478dcea47240ae85c60e3c86d350" ]
[ "tests/helpers/boring_model.py" ]
[ "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law...
[ [ "torch.randn", "torch.utils.data.DataLoader", "torch.nn.Linear", "torch.stack", "torch.ones_like", "torch.optim.lr_scheduler.StepLR" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
eduardodisanti/deep_reinforcement_learning_solutions
[ "7b5916ede58147050178bde3471f86f2bc7a4cd6" ]
[ "models/PPO.py" ]
[ "import torch\nimport torch.nn as nn\n\nfrom models.ddpg_agent import ActorCriticAgent\n\n\ndevice = torch.device(\"cuda:0\" if torch.cuda.is_available() else \"cpu\")\nclass PPO:\n def __init__(self, state_dim, action_dim, n_latent_var, lr, betas, gamma, K_epochs, eps_clip):\n self.lr = lr\n self....
[ [ "torch.min", "torch.tensor", "torch.cuda.is_available", "torch.stack", "torch.clamp", "torch.nn.MSELoss" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
YashGunjal/Capsule-net
[ "b5ac42e55ff2b1a755e55ce27c628f4daa5b32bd" ]
[ "capsule_net.py" ]
[ "import tensorflow as tf\nfrom utils import *\n\ndef primary_caps_layer(in_tensor, caps_size, n_maps, n_dims, conv_params):\n conv1 = in_tensor\n for conv_paramsi in conv_params:\n conv1 = tf.layers.conv2d(conv1, **conv_paramsi)\n\n caps_raw = tf.reshape(conv1, [-1, n_maps * caps_size * caps_size, n...
[ [ "tensorflow.zeros", "tensorflow.reduce_sum", "tensorflow.train.AdamOptimizer", "tensorflow.summary.scalar", "tensorflow.while_loop", "tensorflow.summary.image", "tensorflow.squeeze", "tensorflow.train.get_global_step", "tensorflow.add", "tensorflow.argmax", "tensorflow....
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
seblemaguer/wavelet_prosody_toolk
[ "1893f371fede42d69bddd0e8da98226f3f130594" ]
[ "wavelet_prosody_toolkit/prosody_tools/lab.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\"\"\"\nAUTHOR\n - Antti Suni <antti.suni@helsinki.fi>\n - Sébastien Le Maguer <lemagues@tcd.ie>\n\nDESCRIPTION\n This module provide routines to deal with annotation in TextGrid or HTK label formats\n\nLICENSE\n See https://github.com/asuni/wavelet_pr...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
yngtodd/scene
[ "99355c05b1668586fa09ac70b39c258b39e73c72", "99355c05b1668586fa09ac70b39c258b39e73c72", "99355c05b1668586fa09ac70b39c258b39e73c72" ]
[ "examples/lstm/elmo_embeddings/torchtext/lstm.py", "examples/yoonkim_conv/adagrad/main.py", "examples/lstm/elmo_embeddings/allennlp/baseline/main.py" ]
[ "import tqdm\nfrom parser import parse_args\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\n\nfrom scene.data import DataSet\nfrom torchtext.data import Iterator\nfrom scene.data.loaders import BatchWrapper, BucketLoader\n\nfrom scene.ml.models import BiLSTM\nfrom scene.ml.save import save_chec...
[ [ "torch.nn.CrossEntropyLoss", "torch.max", "torch.manual_seed", "torch.cuda.is_available", "torch.device" ], [ "torch.device", "torch.manual_seed", "torch.cuda.is_available" ], [ "torch.device", "torch.manual_seed", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
JohnBurant/COVID19-Model-Power-Ratings
[ "a24ab1995574fd054dd69a19ee7cf2734a3532e1" ]
[ "power_ratings_v0.3.py" ]
[ "# power_ratings_v0.3.py\n# Last updated: 29 August 2020\n# https://github.com/JohnBurant/COVID19-Model-Power-Ratings\n\n# Timeframe choices\nfirst_week = 17\nlast_week = 35\nnweeks = 3 # Input as 0-indexed, i.e., how many we actually want - 1\nNroll = 4 # Number of weeks to use for rolling average overall power ra...
[ [ "pandas.concat", "pandas.read_csv", "numpy.maximum", "pandas.Series", "pandas.MultiIndex.from_tuples", "pandas.DataFrame", "pandas.ExcelWriter", "pandas.isna" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
jernejvivod/skrelief
[ "aab43e62c28b291ffea75a025a21c5af8b3a3b11" ]
[ "skrelief/reliefmss.py" ]
[ "import numpy as np\nfrom scipy.stats import rankdata\nfrom sklearn.base import BaseEstimator, TransformerMixin\nimport warnings\n\nfrom julia import Julia\nJulia(compiled_modules=False)\nfrom julia import Relief as Relief_jl\n\n\nclass ReliefMSS(BaseEstimator, TransformerMixin):\n \"\"\"sklearn compatible imple...
[ [ "numpy.min", "scipy.stats.rankdata", "numpy.unique" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.6", "1.10", "1.4", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "1.0", "0.17", "1.3", "1.8" ], "tensorflow": [] } ]
zhengbigbig/python_demo
[ "29b62bea9e5abaa02e51744a926f722d1b99ec8d", "29b62bea9e5abaa02e51744a926f722d1b99ec8d" ]
[ "automated_office2/base.py", "practice/data_prehandle.py" ]
[ "import pandas as pd\nimport os\nimport yagmail\nfrom email.parser import Parser\nimport poplib\nfrom email.header import decode_header\n\nexcel_path = '/Users/zhengzhiheng/PycharmProjects/untitled3/渠道数据分析总表.xlsx'\n\ndata = pd.read_excel(excel_path)\n\nnames = {\n\t'陈文': 'email'\n}\n\ndirname = 'exceldir'\n\nif not...
[ [ "pandas.read_excel", "pandas.ExcelWriter" ], [ "pandas.read_csv", "matplotlib.pyplot.show" ] ]
[ { "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": [] }, { "matplotlib": [], "nump...
CrtomirJuren/python-delavnica
[ "db96470d2cb1870390545cfbe511552a9ef08720" ]
[ "arduino-daq-gui/daq_gui_v2_real.py" ]
[ "\"\"\" \nREQUIREMENTS:\n- pyserial: conda install -c anaconda pyserial\n- tqdm\n- numpy_ringbuffer: pip install numpy_ringbuffer\n- pyqtgraph: conda install -c anaconda pyqtgraph\n\"\"\"\nimport sys, os\nimport logging\nfrom pathlib import Path\nimport pyqtgraph as pg #conda install -c anaconda pyqtgraph\nimport n...
[ [ "numpy.arange", "numpy.array", "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": [] } ]
theRoughCode/pennylane
[ "317f82ef00c752beeef7d2412b88119a753467b4" ]
[ "qchem/tests/test_convert_observable.py" ]
[ "import os\n\nimport numpy as np\nimport pennylane as qml\nimport pytest\nfrom openfermion.ops._qubit_operator import QubitOperator\n\nfrom pennylane import qchem\n\n\n@pytest.mark.parametrize(\n (\"mol_name\", \"terms_ref\"),\n [\n (\"empty\", None),\n (\n \"lih [jordan_WIGNER]\",\n ...
[ [ "numpy.abs", "numpy.array", "numpy.allclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
pazacharis/GridRep
[ "17da181d3d49a03de345e21fbe9a064fb29911f3" ]
[ "gridrep/cluster.py" ]
[ "from sklearn.cluster import DBSCAN\nfrom sklearn.base import BaseEstimator, ClusterMixin\nfrom typing import Optional\nfrom gridrep.preprocess import FeaturesTransformer\n\n\nclass ClippedDBSCAN(BaseEstimator, ClusterMixin):\n \"\"\"Perform DBSCAN clustering with 'just-enough' representative\n feature transf...
[ [ "sklearn.cluster.DBSCAN" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
HakaiInstitute/deglint-mask-rgb
[ "1786a4cb255a4a0be3e6e5cfd7c77b5e4489994d" ]
[ "core/image_loaders.py" ]
[ "\"\"\"\nCreated by: Taylor Denouden\nOrganization: Hakai Institute\nDate: 2020-09-18\nDescription: \n\"\"\"\nimport os\nimport re\nfrom abc import ABC, ABCMeta, abstractmethod\nfrom functools import singledispatchmethod\nfrom pathlib import Path\nfrom typing import Iterable, List, Union\n\nimport numpy as np\nfrom...
[ [ "matplotlib.pyplot.imshow", "numpy.stack", "numpy.array", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
CaduceusInc/greykite
[ "7d49c7a13d28f743e0a4b4c27696547f5e2c10c9", "7d49c7a13d28f743e0a4b4c27696547f5e2c10c9" ]
[ "greykite/algo/common/ml_models.py", "greykite/framework/utils/framework_testing_utils.py" ]
[ "# BSD 2-CLAUSE LICENSE\n\n# Redistribution and use in source and binary forms, with or without modification,\n# are permitted provided that the following conditions are met:\n\n# Redistributions of source code must retain the above copyright notice, this\n# list of conditions and the following disclaimer.\n# Redis...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "numpy.clip", "matplotlib.pyplot.scatter", "matplotlib.use", "numpy.logspace", "numpy.sort", "pandas.DataFrame", "matplotlib.pyplot.plot", "pandas.plotting.register_matplotlib_converters", "matplotlib.pyplot.xlabel"...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dbonattoj/Real-Time-Voice-Cloning
[ "7808d6f80aa9bbaffe367fde07b1c6f96cd3697e" ]
[ "encoder/audio.py" ]
[ "from scipy.ndimage.morphology import binary_dilation\nimport matplotlib.pyplot as plt\nimport librosa.display\nimport librosa\nimport numpy as np\nimport webrtcvad\nimport struct\nfrom encoder.params_data import *\n\n\nint16_max = (2 ** 15) - 1\n\ndef load(fpath):\n return librosa.load(fpath, sr=sampling_rate)[...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "numpy.cumsum", "numpy.ones", "matplotlib.pyplot.plot", "matplotlib.pyplot.colorbar", "numpy.round", "numpy.log10", "numpy.mean", "numpy.repeat", "numpy.array", "numpy.zeros", "matplotlib.pyplot.show" ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kawausomando/DeepLearningMugenKnock
[ "b6592c26793aaa45a94753f4324ec183ef078297" ]
[ "tf/pix2pix_tf2.1_keras.py" ]
[ "import tensorflow as tf\n\nprint(tf.__version__)\n\nimport argparse\nimport cv2\nimport numpy as np\nfrom glob import glob\nimport matplotlib.pyplot as plt\nfrom copy import copy\nfrom collections import OrderedDict\nfrom tqdm import tqdm\n\n# class config\nclass_label = OrderedDict({'background' : [0, 0, 0], 'aka...
[ [ "matplotlib.pyplot.imshow", "numpy.expand_dims", "tensorflow.keras.layers.Conv2DTranspose", "numpy.hstack", "tensorflow.keras.layers.LeakyReLU", "numpy.arange", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.losses.BinaryCrossentropy", "matplotlib.pyplot.subplot", "num...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
RashedDoha/Meta-DRN-PyTorch
[ "5176dc594cb46ca8263c6006c2c0d32473075cd2" ]
[ "train.py" ]
[ "import torch.nn.functional as F\nfrom torch import optim\nfrom torch.optim.lr_scheduler import ReduceLROnPlateau\nfrom tqdm import tqdm\n\nfrom config import cfg\nfrom dataset import get_dataloader\nfrom model import MetaDRN\n\nfrom pytorch_lightning.metrics.functional.classification import iou\n\nn_epochs = cfg['...
[ [ "torch.optim.lr_scheduler.ReduceLROnPlateau" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
j4real2208/YoloCar-LPR
[ "b21619e6d6a5a5e2f3c91f37cff065e2196650af" ]
[ "object_detection_yolo.py" ]
[ "# This code is written at BigVision LLC. It is based on the OpenCV project. It is subject to the license terms in the LICENSE file found in this distribution and at http://opencv.org/license.html\n\nimport cv2 as cv\nimport argparse\nimport sys\nimport numpy as np\nimport os.path\nimport imutils\nimport pytessera...
[ [ "numpy.argmax", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
T3hlo/enviroplus-python
[ "31d3bc8c9a1deaf289555d5f08fda137829a5b29" ]
[ "examples/all-in-one-modified.py" ]
[ "#!/usr/bin/env python3\nimport colorsys\nimport sys\nimport ST7735\nimport csv\nimport numpy as np\nfrom datetime import datetime\nimport requests\nimport time\nimport os\nfrom telegram import send_message\n\ntry:\n # Transitional fix for breaking change in LTR559\n from ltr559 import LTR559\n ltr559 = LT...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
0xADE1A1DE/tracetools
[ "5eaa3aa84a5781bf7997e0539da1b1f1b3666821" ]
[ "utils/BinTraces.py" ]
[ "# Copyright 2021 University of Adelaide\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law ...
[ [ "numpy.asarray", "numpy.size" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
thrsam005/alicetrd-python
[ "c1929a9450c5975ef8862187f0f7c39f72b2363c" ]
[ "src/rawdata/o32reader.py" ]
[ "\nimport numpy\nimport re\nimport subprocess\nfrom datetime import datetime\nfrom typing import NamedTuple\n\nclass event_t(NamedTuple):\n timestamp: datetime\n subevents: tuple\n\nclass subevent_t(NamedTuple):\n # timestamp: datetime\n equipment_type: int\n equipment_id: int\n payload: numpy.nda...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
leanguardia/msc-project-pipelines
[ "87d3af747ce390df0448f9fb1db4115f36df67ce" ]
[ "test/test_validators.py" ]
[ "import pytest\nimport pandas as pd\nfrom unittest import TestCase\n\nfrom pipelines.validators import ValidationsRunner, RangeValidator, CategoryValidator\n\nrange_validator = RangeValidator('rank', 0, 10)\ncategory_validator = CategoryValidator('cat', ['bad', 'regular', 'good'])\n\ndf = pd.DataFrame({'rank': [1,2...
[ [ "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": [] } ]
sdll/federated-triplet-loss
[ "c6b52fd805bb5a59da335235347c5249975b8343" ]
[ "federated_triplet_loss/one_dim_gan.py" ]
[ "# Copyright (c) 2020 Sasha Illarionov\n#\n# This software is released under the MIT License.\n# https://opensource.org/licenses/MIT\n\n# Copyright 2018, The TensorFlow Federated Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with t...
[ [ "tensorflow.data.Dataset.from_tensors", "tensorflow.constant", "tensorflow.random.categorical", "tensorflow.reshape", "tensorflow.random.normal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
MasakazuOhmura/TokyoTechLab
[ "3112117b464eba49dcb5a0043d7be5404220fdc9" ]
[ "metaphor_eval/main.py" ]
[ "import collections\nimport csv\n\nimport pandas as pd\n\nSUBJECTS = 8\n\n\ndef print_stat():\n \"\"\" 各フレーズの一番一致率の高い形容詞の一致率を集計 \"\"\"\n df = pd.read_csv('intagrated_interpretations_eight.csv')\n\n top_prob_li = []\n for col in df.columns:\n \"\"\" phrase1 <= col <= phrase358 \"\"\"\n prin...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
alcantarar/literature_update
[ "265a0efa7aec8094678db73b99c165ec59354095" ]
[ "Construct_Models/keras_eval.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nRuns the CNN created in keras_1.py on a data set.\nCurrently it's set to run on the 'text' variable, which is a list of strings.\n\nNeeds to load the model: model.json\n label encoder: LabelEncoder.npy\n and vectorizer: Vectorizer.pkl\n\n@author: Gary\n\"\"\"\n##==...
[ [ "numpy.argmax", "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": [] } ]
sarvesh96/Human-Tracker
[ "84c1cf9331b71415bfd22f20dd1f1049726ce8f8" ]
[ "code/features.py" ]
[ "# -*- coding: utf-8 -*-\r\n\r\nimport cv2\r\nimport numpy as np\r\nimport math\r\n\r\ndim = 32\r\nwindow = 4\r\nbins = 8\r\ninp = 400\r\n#inp = ((dim/window)**2)*bins\r\n\r\n\r\ndef get_HoG(img):\r\n \r\n #img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\r\n \r\n \"\"\"\r\n Temporarily not using HoG to r...
[ [ "numpy.argmax", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
clvcooke/learnable-triangulation-pytorch
[ "e750c6f21b4b72e8170524a9d043d2061921d9c4" ]
[ "mvn/models/tri_test.py" ]
[ "from copy import deepcopy\nimport numpy as np\nimport pickle\nimport random\n\nfrom scipy.optimize import least_squares\n\nimport torch\nfrom torch import nn\n\nfrom mvn.utils import op, multiview, img, misc, volumetric\n\nfrom mvn.models import pose_resnet\nfrom mvn.models.v2v import V2VModel\n\n\nclass RANSACTri...
[ [ "torch.ones", "torch.zeros", "scipy.optimize.least_squares", "torch.nn.Conv2d", "torch.zeros_like", "torch.from_numpy", "numpy.mean", "torch.arange", "torch.stack", "numpy.random.uniform", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.6", "1.10", "1.4", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "1.0", "0.17", "1.3", "1.8" ], "tensorflow": [] } ]
kshithijiyer/qkeras
[ "78ac608c6dcd84151792a986d03fe7afb17929cf" ]
[ "experimental/lo/random_forest/gen_random_tree.py" ]
[ "# Copyright 2020 Google LLC\n#\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agree...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
misads/torch_image_template
[ "db55be6fcebdb6b0c5c739e505b8a7a2eb81c3c1" ]
[ "dataloader/dual_residual_dataset.py" ]
[ "import pdb\nimport numpy as np\nimport torch\nimport random\nimport torch.utils.data as data\nfrom torchvision.transforms import transforms\nfrom PIL import Image\nfrom options import opt\nimport cv2\n\nfrom utils.misc_utils import try_make_dir\nfrom utils.torch_utils import create_summary_writer, write_image\n\n\...
[ [ "numpy.concatenate", "numpy.arange", "numpy.expand_dims", "torch.FloatTensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
EranSch/ht-titles
[ "404790e2785de039098807332081c54cae6322e0" ]
[ "api/app.py" ]
[ "from starlette.applications import Starlette\nfrom starlette.responses import UJSONResponse\nimport gpt_2_simple as gpt2\nimport tensorflow as tf\nimport uvicorn\nimport os\nimport gc\n\napp = Starlette(debug=False)\n\nsess = gpt2.start_tf_sess(threads=1)\ngpt2.load_gpt2(sess)\n\n# Needed to avoid cross-domain iss...
[ [ "tensorflow.reset_default_graph" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
mgarzon/BOERGER-CSI4900-VPN-Detection
[ "767e16f584cbfb777e33f624721798192ee24f7c" ]
[ "src/features/netflow_featurs_optimal_ft_subset.py" ]
[ "\"\"\"\nTitle: Feature Engineering Module\n\nProject: CSI4900 Honours Project\n\nCreated: Feb 2020\nLast modified: 06 May 2020\n\nAuthor: Jonathan Boerger\nStatus: In Progress\n\nDescription: This module take the pre-processed data and uses it to extract expanded (engineered features) to be used\nin the classifier...
[ [ "pandas.read_csv", "pandas.Timestamp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
timhuang1/transformers
[ "bb54544aaff79739ab4ec696424aa5c6af95c23a" ]
[ "examples/pytorch/speech-recognition/run_speech_recognition_ctc.py" ]
[ "#!/usr/bin/env python\n# coding=utf-8\n# Copyright 2021 The HuggingFace Inc. team. 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....
[ [ "numpy.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
pjulma/A62_TS
[ "a1d31a901486befb938dca09f37a7dc0f8b1c75c" ]
[ "pyCode/model_linear.py" ]
[ "#%matplotlib inline\n\nimport pandas as pd\nimport numpy as np\n\nfrom pandas_datareader.data import DataReader\nfrom datetime import datetime\nimport matplotlib.pyplot as plt\n\nfrom getparameters import parametres\n\nvariables = parametres()\nstart = variables.getStartDate()\nend = variables.getEndDate()\nstock ...
[ [ "matplotlib.pyplot.legend", "numpy.abs", "matplotlib.pyplot.title", "sklearn.metrics.mean_absolute_error", "matplotlib.pyplot.show", "matplotlib.pyplot.savefig", "sklearn.metrics.mean_squared_error", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "numpy.mean", "s...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
prafael18/graphics
[ "d5c26cf05125e5c096f5b2cde6c85f88c7df2d59", "d5c26cf05125e5c096f5b2cde6c85f88c7df2d59" ]
[ "tensorflow_graphics/nn/layer/graph_convolution.py", "tensorflow_graphics/geometry/convolution/utils.py" ]
[ "# Copyright 2020 The TensorFlow 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law...
[ [ "tensorflow.convert_to_tensor", "tensorflow.TensorShape", "tensorflow.compat.v1.truncated_normal_initializer", "tensorflow.concat", "tensorflow.keras.layers.Conv1D", "tensorflow.compat.v1.get_variable", "tensorflow.expand_dims", "tensorflow.squeeze", "tensorflow.compat.v1.dimen...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Kilidsch/ezc3d
[ "79c890e9d9211b9d5dcfa377ba9b878708b29df6" ]
[ "test/python3/test_binder_python.py" ]
[ "\"\"\"\nTest for file IO\n\"\"\"\nfrom pathlib import Path\n\nimport numpy as np\nimport pytest\n\nimport ezc3d\n\n\ndef test_create_c3d():\n c3d = ezc3d.c3d()\n\n # Test the header\n assert c3d[\"header\"][\"points\"][\"size\"] == 0\n assert c3d[\"header\"][\"points\"][\"frame_rate\"] == 0.0\n asse...
[ [ "numpy.testing.assert_equal", "numpy.nanmedian", "numpy.isnan", "numpy.testing.assert_string_equal", "numpy.all", "numpy.testing.assert_almost_equal", "numpy.testing.assert_array_equal", "numpy.nansum", "numpy.nanmean", "numpy.zeros", "numpy.testing.assert_array_almost_...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mehdihosseinimoghadam/DisCERN-XAI
[ "bc7a8d4af7d00548491e1e67ce6a2ffb92f4465a" ]
[ "tests/test_cancer_risk.py" ]
[ "from discern.discern_tabular import DisCERNTabular\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import MinMaxScaler\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.metrics import accuracy_score\n\ndef test_cancer_risk():\n data_df = pd...
[ [ "pandas.read_csv", "sklearn.ensemble.RandomForestClassifier", "sklearn.model_selection.train_test_split", "sklearn.preprocessing.MinMaxScaler" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
saurabhwjha/astroplots
[ "c0bfcf9e976124bd525dbb63190091bf56e13481" ]
[ "astroplots.py" ]
[ "import matplotlib.pyplot as plt\n\nclass Astroplots():\n def __init__(self):\n self.orig_params = plt.rcParams.copy()\n \n def default_all(self):\n for i in plt.rcParams.keys():\n plt.rcParams[i] = self.orig_params[i]\n \n def squarefig(self,fold_on='x'):\n sizes =...
[ [ "matplotlib.pyplot.rcParams.find_all", "matplotlib.pyplot.rcParams.copy", "matplotlib.pyplot.rcParams.keys" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wenqisun/RecBole
[ "542857e8675d27c039f7ca2820c7f08e5d50e0c4" ]
[ "recbole/trainer/trainer.py" ]
[ "# @Time : 2020/6/26\n# @Author : Shanlei Mu\n# @Email : slmu@ruc.edu.cn\n\n# UPDATE:\n# @Time : 2020/8/7, 2020/9/26, 2020/9/26, 2020/10/01, 2020/9/16\n# @Author : Zihan Lin, Yupeng Hou, Yushuo Chen, Shanlei Mu, Xingyu Pan\n# @Email : linzihan.super@foxmail.com, houyupeng@ruc.edu.cn, chenyushuo@ruc.edu.cn, sl...
[ [ "numpy.resize", "torch.cat", "torch.load", "matplotlib.pyplot.plot", "torch.no_grad", "torch.save", "numpy.hstack", "torch.optim.SparseAdam", "scipy.sparse.dok_matrix", "torch.optim.SGD", "torch.optim.Adam", "scipy.sparse.csc_matrix", "matplotlib.pyplot.savefig"...
[ { "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"...
sahitpj/MachineLearning
[ "2ce5a337ec432daff64a216df6847ef834bcb8d7" ]
[ "utils/data.py" ]
[ "import pandas as pd\nimport numpy as np \n\ndef import_data(filepath):\n data = pd.read_csv(filepath)\n return data\n\n\ndef convertToOneHot(vector, num_classes=None):\n \"\"\"\n Converts an input 1-D vector of integers into an output\n 2-D array of one-hot vectors, where an i'th input value\n of...
[ [ "numpy.max", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
Robswc/strategy-sandbox
[ "f56aaf494897981793394f8d9df813216f2a300a" ]
[ "sandbox/sandbox.py" ]
[ "import random\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport time\n\n# Default parameters\n\nsample_size = 10000 # number of trades\nwinrate = 0.5 # strategy win rate\n\n# Risk:Reward Ratio, one or the other must be 1 for best practice. its relative ;)\nrisk = 1\nreward = 1\n\n\ndef run_sim(winrate...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PWhiddy/jax
[ "ab544cb26dfea3147c336754d3e3eb457a405e38" ]
[ "tests/api_test.py" ]
[ "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.__version__.split", "numpy.asarray", "numpy.dtype", "numpy.all", "numpy.random.randn", "numpy.iinfo", "numpy.exp", "numpy.arange", "numpy.eye", "numpy.float16", "numpy.sin", "numpy.float32", "numpy.zeros", "numpy.random.rand", "numpy.testing.asser...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
a-y-khan/pandas
[ "52a1725965cb469de618ad56af467dc0aba53a87" ]
[ "pandas/tests/indexes/interval/test_interval.py" ]
[ "from itertools import permutations\nimport re\n\nimport numpy as np\nimport pytest\n\nfrom pandas.errors import InvalidIndexError\n\nimport pandas as pd\nfrom pandas import (\n Index,\n Interval,\n IntervalIndex,\n Timedelta,\n Timestamp,\n date_range,\n interval_range,\n isna,\n notna,\...
[ [ "pandas.to_datetime", "numpy.asarray", "pandas.isna", "pandas.IntervalIndex.from_arrays", "pandas.IntervalIndex", "pandas.notna", "pandas._testing.assert_numpy_array_equal", "numpy.arange", "pandas.core.common.asarray_tuplesafe", "pandas.Index", "pandas._testing.assert_...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
maxpark/alibi-detect
[ "84384297a85764c18537aa1c8699c4ad040cf7cd" ]
[ "alibi_detect/cd/tensorflow/context_aware.py" ]
[ "import logging\nimport numpy as np\nimport tensorflow as tf\nimport tensorflow_probability as tfp\nfrom typing import Callable, Dict, Optional, Tuple, Union, List\nfrom alibi_detect.cd.base import BaseContextMMDDrift\nfrom alibi_detect.utils.tensorflow.kernels import GaussianRBF\nfrom alibi_detect.cd._domain_clf i...
[ [ "tensorflow.reduce_max", "tensorflow.concat", "numpy.random.choice", "tensorflow.zeros", "numpy.arange", "tensorflow.reduce_sum", "tensorflow.cast", "tensorflow.ones_like", "tensorflow.ones", "numpy.sort", "tensorflow.einsum", "tensorflow.reshape", "tensorflow.z...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
rz4/DeepProteinScoring
[ "059791a54133c2d03eb14cf98fba1c6ef27c8f49" ]
[ "src/data_processing/torsion_generation/combine_hdf5.py" ]
[ "'''\ncombine_hdf5.py\nUpdated: 3/27/18\n\nThe script will read the pairwise_data.hdf5 file from each listed data_folder\nand combine them into a singular HDF5 file. This script assumes that the\npairwise_data.hdf5 file has already been generated for each data folder in the\ndata_folders list. The final combined HD...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
DerekYJC/bmi_python
[ "7b9cf3f294a33688db24b0863c1035e9cc6999ea" ]
[ "tests/ppf/test_ppfdecoder_param_learning_ol.py" ]
[ "#!/usr/bin/python\n'''\nTest trying to learn the beta parameters using SB and the continuous relearning\nmethods\n'''\nimport numpy as np\nfrom scipy.io import loadmat, savemat\nfrom riglib.bmi import sim_neurons\nimport matplotlib.pyplot as plt\nfrom riglib.bmi import ppfdecoder, train, clda, bmi\n#import plot\ni...
[ [ "numpy.log", "numpy.eye", "scipy.io.loadmat", "numpy.tile", "numpy.dstack", "matplotlib.pyplot.close", "numpy.array", "matplotlib.pyplot.show", "numpy.zeros", "numpy.vstack", "matplotlib.pyplot.figure" ] ]
[ { "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"...
hundlab/AFAT
[ "114f5ab274433803a9deece06d542c2b7b83a1c6" ]
[ "src/AFAT/imageJ_shapiro.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Aug 6 17:03:58 2019\n\n@author: grat05\n\"\"\"\nfrom PIL import Image\nfrom glob import glob\nimport numpy as np\n\nbasedir = input('Please enter the directory with .tiff files to process:\\n')#'R:/Hund/DanielGratz/Fibrosis/validation/dan gra...
[ [ "numpy.array", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
veralily/comet-commonsense
[ "5bac40299344df6c0e804887fb931ad095379368" ]
[ "scripts/generate/generate_conceptnet_beam_search.py" ]
[ "import os\nimport sys\nimport argparse\nsys.path.append(os.getcwd())\nimport torch\n\nimport src.models.models as models\nimport src.data.data as data\nimport utils.utils as utils\nimport src.data.config as cfg\n\nfrom src.data.utils import TextEncoder\n\nimport src.models.utils as model_utils\nfrom tqdm import tq...
[ [ "numpy.expand_dims", "torch.ones", "torch.cuda.set_device", "numpy.random.seed", "torch.cat", "torch.manual_seed", "numpy.arange", "numpy.stack", "torch.tensor", "torch.no_grad", "torch.cuda.manual_seed_all", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
m-stone/DPLOTPY
[ "eb918a4c9c8810c543e00a217b2149006052f4a1" ]
[ "dplotpy/drafts/dplotpy.py" ]
[ "import csv \r\nimport numpy as np\r\nimport win32ui\r\nimport dde\r\n\r\nclass curve(object):\r\n def __init__(self, xdata, ydata, zdata='', title=\"\", label=\"\", line=1, symbol=0):\r\n self.xdata = xdata\r\n self.ydata = ydata\r\n self.zdata = zdata\r\n\r\n self.data = [self.xdata...
[ [ "numpy.cos", "numpy.linspace", "numpy.sin" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
selo1412/incubator-tvm
[ "970c012488e63b989f19130522f7ec8d13b53b3f" ]
[ "tests/python/relay/test_op_level3.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.take", "numpy.linspace", "numpy.squeeze", "numpy.random.random_sample", "numpy.random.randn", "numpy.where", "numpy.clip", "numpy.reshape", "numpy.arange", "numpy.stack", "numpy.full", "numpy.repeat", "numpy.unravel_index", "numpy.full_like", "num...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]