repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
zjjliujs/caffe
[ "9d17cb456274f8e579dfcb0b1e0097d604ae37c6" ]
[ "python/caffe_double/test/test_solver.py" ]
[ "import unittest\nimport tempfile\nimport os\nimport numpy as np\nimport six\n\nimport caffe_double\nfrom test_net import simple_net_file\n\n\nclass TestSolver(unittest.TestCase):\n def setUp(self):\n self.num_output = 13\n net_f = simple_net_file(self.num_output)\n f = tempfile.NamedTempora...
[ [ "numpy.ones", "numpy.random.randint" ] ]
stepinski/machinelearning
[ "1f84883a25616da4cd76bb4655267efd3421e561" ]
[ "mit-ml/mnist/part2-twodigit/mlp.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom train_utils import batchify_data, run_epoch, train_model, Flatten\nimport utils_multiMNIST as U\npath_to_data_dir = '../Datasets/'\nuse_mini_dataset = True\n\nbatch_size = 64\nnb_classes = 10\nnb_epoch = 30\nnum_classes ...
[ [ "torch.nn.Linear", "torch.manual_seed", "numpy.random.seed", "numpy.random.shuffle" ] ]
Meteodan/arpsEnKFtools
[ "848c4c0eb8921d17690bf35a24f6d0714c4bc37f", "848c4c0eb8921d17690bf35a24f6d0714c4bc37f" ]
[ "template/1km243x243_033116_newse/master_config.py", "template/3km153x153_051913_SSEF_idealized_radarda/master_config.py" ]
[ "\"\"\"\nmaster_config.py -- Contains parameters to configure an end-to-end ARPS-EnKF run\n\"\"\"\nimport os\nfrom datetime import datetime\nimport numpy as np\n\n# Define needed directories and experiment names/tags\n# Base project names and directories\nscratch_base_dir = '/scratch/rice/d/dawson29'\ndepot_base_di...
[ [ "numpy.arange" ], [ "numpy.arange" ] ]
githubcstahlhut/EDoHa
[ "56283eac605b2b50988cc2f7ee696242eec1f34e", "56283eac605b2b50988cc2f7ee696242eec1f34e" ]
[ "src/main/python/TFELTrainer.py", "src/main/python/TFELAttentionTrainer.py" ]
[ "\nimport argparse\nimport glob\n\nimport numpy as np\nimport pandas as pd\n\nimport tensorflow as tf\n\nfrom keras.preprocessing import sequence\nfrom tensorflow.contrib import rnn\n\nfrom sklearn.metrics import classification_report, precision_recall_fscore_support\n\nfrom vectorizer import TokenizingEmbeddingVec...
[ [ "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.concat", "sklearn.metrics.precision_recall_fscore_support", "tensorflow.train.AdamOptimizer", "tensorflow.get_default_graph", "sklearn.metrics.classification_report", "numpy.where", "pandas.read_csv", "tensorflow.Va...
TortoiseHam/fastestimator
[ "6061a4fbbeb62a2194ef82ba8017f651710d0c65", "6061a4fbbeb62a2194ef82ba8017f651710d0c65", "6061a4fbbeb62a2194ef82ba8017f651710d0c65", "6061a4fbbeb62a2194ef82ba8017f651710d0c65" ]
[ "fastestimator/trace/metric/recall.py", "fastestimator/trace/xai/grad_cam.py", "apphub/anomaly_detection/alocc/alocc_torch.py", "fastestimator/op/numpyop/univariate/rua.py" ]
[ "# Copyright 2019 The FastEstimator Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless r...
[ [ "numpy.round", "numpy.argmax", "sklearn.metrics.recall_score" ], [ "tensorflow.is_tensor", "numpy.maximum", "numpy.min", "numpy.uint8", "numpy.max", "numpy.mean", "numpy.float32", "numpy.moveaxis", "numpy.array" ], [ "numpy.concatenate", "sklearn.met...
als11044/trimesh
[ "a29735c47cf6a473ba77fdf8be0d3f6fd104c9fc", "a29735c47cf6a473ba77fdf8be0d3f6fd104c9fc", "a29735c47cf6a473ba77fdf8be0d3f6fd104c9fc" ]
[ "trimesh/geometry.py", "trimesh/path/simplify.py", "trimesh/comparison.py" ]
[ "import numpy as np\n\nfrom .transformations import rotation_matrix\nfrom .constants import tol, log\n\nfrom . import util\n\ntry:\n from scipy.sparse import coo_matrix\nexcept ImportError:\n log.warning('scipy.sparse.coo_matrix unavailable')\n\n\ndef plane_transform(origin, normal):\n '''\n Given the o...
[ [ "numpy.dot", "scipy.sparse.coo_matrix", "scipy.spatial.Voronoi", "numpy.clip", "numpy.arcsin", "numpy.eye", "numpy.linalg.norm", "numpy.arccos", "numpy.append", "numpy.asanyarray", "numpy.cross", "numpy.array", "numpy.zeros", "numpy.column_stack", "numpy...
Bondify/gtfs_functions
[ "4cd237fe5d326219428018ff0cd58152bceadf73" ]
[ "build/lib/gtfs_functions/gtfs_funtions.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Fri Jul 10 15:20:33 2020\r\n@author: santi\r\n\"\"\"\r\n\r\ndef save_gdf(data, file_name, geojson=False, shapefile=True):\r\n import warnings\r\n warnings.filterwarnings(\"ignore\")\r\n import zipfile\r\n import os\r\n \r\n geojson_path = file_name ...
[ [ "pandas.merge", "pandas.read_csv", "pandas.DataFrame", "pandas.cut", "pandas.DataFrame.from_dict" ] ]
merepbj/web-scraping-challenge
[ "cf4c401cad78b68af9fe508225ceb48bba99ba83" ]
[ "Missions_to-Mars/scrape_mars.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\nimport pandas as pd\nfrom splinter import Browser\nimport time\nbrowser = Browser('chrome','chromedriver')\n\ndef scrape(): \n title, paragraph = mars_news(browser)\n \n data = {\n \"news_title\": title, \n \"news_paragraph\": paragraph,...
[ [ "pandas.read_html" ] ]
xssstory/cogdl
[ "ae8de495c365993f19f04774f083960fd282c2a3", "ae8de495c365993f19f04774f083960fd282c2a3", "ae8de495c365993f19f04774f083960fd282c2a3", "ae8de495c365993f19f04774f083960fd282c2a3", "ae8de495c365993f19f04774f083960fd282c2a3" ]
[ "cogdl/tasks/node_classification.py", "examples/custom_dataset.py", "cogdl/tasks/pretrain.py", "cogdl/models/emb/gatne.py", "cogdl/models/nn/pyg_unsup_graphsage.py" ]
[ "import argparse\nimport copy\nfrom typing import Optional\nimport scipy.sparse as sp\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom tqdm import tqdm\n\nfrom cogdl.datasets import build_dataset\nfrom cogdl.models import build_model\nfrom cogdl.models.supervised_model import SupervisedHom...
[ [ "torch.Size", "torch.nn.functional.nll_loss", "numpy.random.choice", "scipy.sparse.eye", "numpy.power", "numpy.min", "scipy.sparse.diags", "torch.from_numpy", "numpy.ones", "numpy.max", "torch.arange", "torch.sparse.FloatTensor", "numpy.isinf", "numpy.vstack...
samuelsmal/drosophVAE
[ "4b1887e55a5eed1d26c07b6c43de59ffab5fc7c7", "4b1887e55a5eed1d26c07b6c43de59ffab5fc7c7" ]
[ "drosoph_vae/settings/data.py", "drosoph_vae/settings/skeleton.py" ]
[ "from enum import Enum\nfrom collections import namedtuple\nimport json\nimport pickle\nfrom datetime import datetime\nimport pathlib\nimport numpy as np\n\nclass Behavior(Enum):\n WALK_FORW = 0\n WALK_BACKW = 1\n PUSH_BALL = 2\n REST = 3\n GROOM_FLEG = 4\n GROOM_ANT = 5\n NONE = 6\n\nExperimen...
[ [ "numpy.int", "numpy.zeros", "numpy.linspace" ], [ "numpy.ones" ] ]
sebastian-lapuschkin/Quantus
[ "c3b8a9fb2018f34bd89ba38efa2b2b8c38128b3f" ]
[ "quantus/metrics/randomisation_metrics.py" ]
[ "\"\"\"This module contains the collection of randomisation metrics to evaluate attribution-based explanations of neural network models.\"\"\"\nimport random\nimport warnings\nfrom typing import Callable, Dict, List, Union\n\nimport numpy as np\nfrom tqdm import tqdm\n\nfrom .base import Metric\nfrom ..helpers impo...
[ [ "numpy.arange", "numpy.expand_dims", "numpy.abs" ] ]
ddddwee1/SULT
[ "0ff31b602d20dd8bc5cf4a6f4f5bc193d636e784", "0ff31b602d20dd8bc5cf4a6f4f5bc193d636e784", "0ff31b602d20dd8bc5cf4a6f4f5bc193d636e784", "0ff31b602d20dd8bc5cf4a6f4f5bc193d636e784", "0ff31b602d20dd8bc5cf4a6f4f5bc193d636e784", "0ff31b602d20dd8bc5cf4a6f4f5bc193d636e784", "0ff31b602d20dd8bc5cf4a6f4f5bc193d636e78...
[ "example/FaceResNet/evaluation.py", "SUL1/sample/feature_fusion/iterative/conv3d_model.py", "SUL1/sample/conditional_gan/condgan.py", "example/RepNet/train.py", "example/FaceVGG/datareader.py", "SUL_torch/example/HRNet/datareader.py", "SUL_torch/example/tf2torch/torch/eval.py", "example/RepNet/network...
[ "import tensorflow as tf \nimport model3 as M \nimport numpy as np \nimport resnet\nimport cv2\n\nclass FaceResNet(M.Model):\n\tdef initialize(self):\n\t\tself.resnet = resnet.ResNet([64,64,128,256,512], [3, 4, 14, 3], 512)\n\n\tdef forward(self, x):\n\t\tfeat = self.resnet(x)\n\t\treturn feat\n\ntf.keras.backend.s...
[ [ "tensorflow.keras.backend.set_learning_phase", "tensorflow.keras.optimizers.Adam", "numpy.linalg.norm", "numpy.float32" ], [ "tensorflow.nn.softmax_cross_entropy_with_logits_v2", "tensorflow.placeholder", "tensorflow.map_fn", "tensorflow.variable_scope", "numpy.float32", ...
seqsense/CenterNet
[ "5cd5f3c1f42d8cfb5fc3157f8c1945b6787f11eb" ]
[ "src/lib/datasets/sample/bbox_sample.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport torch.utils.data as data\nimport numpy as np\nimport torch\nimport json\nimport cv2\nimport os\nfrom centernet_utils.image import flip, color_aug\nfrom centernet_utils.image import get_affine_tr...
[ [ "numpy.random.random", "numpy.clip", "numpy.arange", "numpy.concatenate", "numpy.random.randn", "numpy.array", "numpy.zeros", "numpy.random.randint" ] ]
jozhang97/Side-tuning
[ "dea345691fb7ee0230150fe56ddd644efdffa6ac", "dea345691fb7ee0230150fe56ddd644efdffa6ac", "dea345691fb7ee0230150fe56ddd644efdffa6ac", "dea345691fb7ee0230150fe56ddd644efdffa6ac" ]
[ "evkit/models/forward_inverse.py", "evkit/utils/parallel.py", "evkit/models/srl_architectures.py", "tlkit/data/datasets/taskonomy_dataset.py" ]
[ "from gym import spaces\nimport multiprocessing.dummy as mp\nimport multiprocessing\nimport numpy as np\nimport os\nimport torch\nimport torch\nimport torch.nn as nn\nfrom torch.nn import Parameter, ModuleList\nimport torch.nn.functional as F\n\nfrom evkit.rl.utils import init, init_normc_\nfrom evkit.utils.misc ...
[ [ "torch.nn.init.constant_", "torch.nn.init.calculate_gain", "torch.nn.Linear", "torch.cat" ], [ "torch.cuda.device_count", "torch.nn.DataParallel", "torch.cuda.is_available" ], [ "torch.nn.init.calculate_gain", "torch.nn.ConvTranspose2d", "torch.cat", "torch.nn.i...
Bullldoger/NLA--project
[ "05e7a39ca43b6eea7e74ad62ea7de445414e1a2b" ]
[ "notebooks/models.py" ]
[ "import numpy as np\nimport scipy as scp\nfrom scipy.sparse import csr_matrix\nfrom scipy.sparse.linalg import svds\nfrom collections import Counter\nfrom nltk.corpus import stopwords\n\nclass Word2Vec(object):\n \n def __init__(self, sentences):\n \"\"\"\n sentences -- preprocessed sentences of...
[ [ "numpy.diag", "numpy.linalg.svd", "numpy.log2", "numpy.power", "numpy.linalg.norm", "scipy.sparse.csr_matrix", "scipy.sparse.linalg.svds", "numpy.random.rand", "numpy.linalg.qr", "numpy.exp", "numpy.zeros", "numpy.sum" ] ]
pazeshun/jsk_apc
[ "0ff42000ad5992f8a31e719a5360a39cf4fa1fde", "0ff42000ad5992f8a31e719a5360a39cf4fa1fde", "0ff42000ad5992f8a31e719a5360a39cf4fa1fde", "0ff42000ad5992f8a31e719a5360a39cf4fa1fde", "0ff42000ad5992f8a31e719a5360a39cf4fa1fde", "0ff42000ad5992f8a31e719a5360a39cf4fa1fde" ]
[ "demos/instance_occlsegm/instance_occlsegm_lib/datasets/apc/apc2016/mit.py", "demos/selective_dualarm_stowing/node_scripts/alex_proba_estimation.py", "demos/instance_occlsegm/examples/instance_occlsegm/instance_to_semantic/sample_roi_unpooling_2d.py", "demos/instance_occlsegm/instance_occlsegm_lib/aug.py", ...
[ "import itertools\nimport os\nimport os.path as osp\n\nimport chainer\nimport numpy as np\nimport skimage.io\ntry:\n from sklearn.model_selection import train_test_split\nexcept ImportError:\n from sklearn.cross_validation import train_test_split\n\nfrom .base import class_names_apc2016\nimport instance_occls...
[ [ "sklearn.cross_validation.train_test_split", "numpy.zeros_like" ], [ "numpy.array" ], [ "numpy.asarray", "numpy.hstack", "numpy.argmax", "numpy.zeros" ], [ "numpy.asarray", "numpy.random.RandomState", "numpy.zeros", "numpy.where" ], [ "numpy.ones" ...
uchikun2493/nn_modules
[ "ad3486b842fc543561d39227de5daaa475d3513a" ]
[ "samples/make_dataset.py" ]
[ "import numpy as np\n\n# irisデータセットの読み込み\n# num_train: 学習データ数(残りはテストデータ)\n# random: ランダムに抽出するか\ndef load_iris(num_train=100, random=True):\n\n from sklearn.datasets import load_iris\n iris = load_iris()\n data = iris.data.astype(np.float32)\n label = iris.target.astype(np.int64)\n\n if random:\n ...
[ [ "numpy.random.permutation", "sklearn.datasets.load_iris" ] ]
ishine/neurst
[ "2ba322393fcfed4261b33f4a657e12bbe321baaa", "2ba322393fcfed4261b33f4a657e12bbe321baaa", "2ba322393fcfed4261b33f4a657e12bbe321baaa", "2ba322393fcfed4261b33f4a657e12bbe321baaa", "2ba322393fcfed4261b33f4a657e12bbe321baaa" ]
[ "examples/prune_tune/src/partial_trainer.py", "tests/neurst/layers/decoders/transformer_decoder_test.py", "examples/prune_tune/src/mask_sequence_generator.py", "neurst/tasks/multilingual_translation.py", "neurst/exps/validation.py" ]
[ "# Copyright 2020 ByteDance 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 law or agre...
[ [ "tensorflow.io.gfile.GFile", "tensorflow.math.not_equal", "tensorflow.keras.Model" ], [ "tensorflow.convert_to_tensor", "numpy.array", "numpy.reshape" ], [ "tensorflow.io.gfile.GFile", "tensorflow.cast", "tensorflow.keras.backend.batch_set_value", "tensorflow.keras....
mrotke/pyStock
[ "76aad7c8bdd112d3a53ed013cbe9ff660a90d5bf" ]
[ "lib/moneyflowindex.py" ]
[ "# Add import from parent directory possible\nimport sys\nimport pandas as pd\nimport numpy\nimport matplotlib.pyplot as plt\nfrom lib.DataOperations import *\nfrom lib.ReportSignals import *\nfrom lib.Stock import *\nfrom lib.indicator import indicator\n\n# Creates MoneyFlowIndex object\n\n\ndef CreateMoneyFlowInd...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.ylim", "pandas.Series", "matplotlib.pyplot.bar" ] ]
busySZl/pyfiberamp
[ "e6ddb34413e145cd662f7f0f23290bd872871978" ]
[ "pyfiberamp/spectroscopies/spectroscopy.py" ]
[ "from pyfiberamp.helper_funcs import *\n\nfrom scipy.interpolate import UnivariateSpline\nimport matplotlib.pyplot as plt\n\n\nclass Spectroscopy:\n @classmethod\n def from_files(cls, absorption_cross_section_file, emission_cross_section_file, upper_state_lifetime):\n absorption_spectrum = load_spectru...
[ [ "scipy.interpolate.UnivariateSpline", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
aws-samples/amazon-sagemaker-local-mode
[ "f470d7b543f7895094816c3f58b9981e044764d8", "f470d7b543f7895094816c3f58b9981e044764d8", "f470d7b543f7895094816c3f58b9981e044764d8" ]
[ "scikit_learn_script_mode_local_serving_no_model_artifact/code/inference.py", "lightgbm_bring_your_own_container_local_training_and_serving/lightgbm_bring_your_own_container_local_training_and_serving.py", "tensorflow_script_mode_california_housing_local_training_and_batch_transform/tensorflow_script_mode_calif...
[ "import logging\nimport sys\nimport numpy as np\n\nlogger = logging.getLogger(__name__)\nlogger.setLevel(logging.DEBUG)\nlogger.addHandler(logging.StreamHandler(sys.stdout))\n\n\n# Perform prediction on the deserialized object, with the loaded model\ndef predict_fn(input_object, model):\n logger.info(\"predict_f...
[ [ "numpy.average" ], [ "sklearn.model_selection.train_test_split", "pandas.DataFrame", "sklearn.datasets.load_boston" ], [ "sklearn.preprocessing.StandardScaler", "pandas.DataFrame" ] ]
tomstark99/play-fair
[ "5b4ad20ebb96d1162f3bd696aba0a6b57006ab0a" ]
[ "src/models/components/consensus.py" ]
[ "import torch.nn\nfrom torch import nn\n\n\nclass SegmentConsensus(torch.nn.Module):\n def __init__(self, consensus_type, dim=1):\n super().__init__()\n self.consensus_type = consensus_type\n self.dim = dim\n\n def forward(self, input_tensor):\n if self.consensus_type == \"avg\":\n...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.ReLU" ] ]
sebamenabar/oc-fewshot-public
[ "eb12bd5b426518fd8353304f0760f5c24f1b3c12", "eb12bd5b426518fd8353304f0760f5c24f1b3c12", "eb12bd5b426518fd8353304f0760f5c24f1b3c12", "2dad8c9f24cb1bfe72d8b13b33d28f6788d86ca8", "2dad8c9f24cb1bfe72d8b13b33d28f6788d86ca8" ]
[ "fewshot/experiments/metrics.py", "fewshot/models/modules/online_imp_memory.py", "fewshot/data/iterators/semisupervised_episode_iterator_tests.py", "fewshot/models/modules/gru.py", "fewshot/models/nets/online_proto_sigmoid_net.py" ]
[ "\"\"\"Metrics.\n\nAuthor: Mengye Ren (mren@cs.toronto.edu)\n\"\"\"\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\n\nimport numpy as np\nimport sklearn.metrics\n\n\ndef label_equal(pred, label, axis=-1):\n return pred == label.astype(pred.dtype)\n\n\...
[ [ "numpy.logical_not", "numpy.expand_dims", "numpy.logical_and", "numpy.arange", "numpy.cumsum", "numpy.concatenate", "numpy.max", "numpy.argmax", "numpy.argsort", "numpy.array", "numpy.zeros" ], [ "tensorflow.concat", "tensorflow.zeros", "tensorflow.stack...
exmee/HSSD
[ "cf1d26c32b1a5a95c6c17460dda445c408d7b5dc", "cf1d26c32b1a5a95c6c17460dda445c408d7b5dc" ]
[ "resnet_v1.py", "Conv2DWN.py" ]
[ "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required...
[ [ "tensorflow.nn.relu", "tensorflow.depth_to_space", "tensorflow.concat", "tensorflow.shape", "tensorflow.reduce_mean", "tensorflow.variable_scope" ], [ "tensorflow.rsqrt", "tensorflow.zeros_initializer", "tensorflow.square" ] ]
collector-m/LiDAR-MOS
[ "7ccbb63b4ee7c40195b35dd0dddd71473fae25b1", "7ccbb63b4ee7c40195b35dd0dddd71473fae25b1" ]
[ "utils/auxiliary/filelist2files.py", "utils/gen_residual_images.py" ]
[ "#!/usr/bin/python3\n\nimport os\nimport sys\nimport shutil\nimport numpy as np\nimport scipy.io as sio\n\nfrom tqdm import tqdm\n\ndef pack(array):\n \"\"\" convert a boolean array into a bitwise array. \"\"\"\n array = array.reshape((-1))\n\n #compressing bit flags.\n # yapf: disable\n compressed = array[::8...
[ [ "numpy.array" ], [ "numpy.abs", "numpy.linalg.inv", "numpy.asarray", "matplotlib.pyplot.Axes", "matplotlib.pyplot.subplots", "numpy.save", "numpy.full", "matplotlib.pyplot.savefig", "matplotlib.pyplot.close", "numpy.array", "matplotlib.pyplot.show", "matplot...
artursbm/fuzzy-logic
[ "79a4879deb7b09b4738b0c82234506b8ab1b0392" ]
[ "fuzzy_c_means/main_fcm_validation.py" ]
[ "# Artur Mello\n# Fuzzy C Means - Algorithm validation and performance analysis\n# TP 1 - Sistemas Nebulosos\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom scipy import io\nfrom fuzzy_c_means import fuzzy_c_means\n\n\ndef main():\n k = 4\n samples = np.asarray(io.loadmat(\"fcm_dataset.mat\")[\"x\"...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.scatter", "scipy.io.loadmat", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
jancervenka/pandas
[ "b2ebd5ae14580dde793e40097c6a283d82c69ad9" ]
[ "pandas/conftest.py" ]
[ "from collections import abc\nfrom datetime import date, time, timedelta, timezone\nfrom decimal import Decimal\nimport operator\nimport os\n\nfrom dateutil.tz import tzlocal, tzutc\nimport hypothesis\nfrom hypothesis import strategies as st\nimport numpy as np\nimport pytest\nfrom pytz import FixedOffset, utc\n\ni...
[ [ "pandas.Series", "pandas._testing.makeBoolIndex", "pandas._testing.makeRangeIndex", "numpy.random.randn", "pandas._testing.makeDateIndex", "pandas._testing.makePeriodIndex", "pandas._testing.makeIntervalIndex", "pandas._testing.makeTimeSeries", "pandas._testing.makeFloatIndex",...
liragabriel/DS
[ "d75402d5c11dc9c6832260e49b591128fbc1b9ca" ]
[ "netstats/lista_dataframe.py" ]
[ "import pandas as pd\nfrom netstats.fsan import Fsan\n\n\nclass ListaDataframe:\n\n def __init__(self, operacao):\n self.operacao = operacao\n\n\n def dataframe(self):\n\n \"\"\"\n Retorna uma lista de dataframes por FSAN, cada dataframe contém as operações realizadas\n\n c...
[ [ "pandas.set_option", "pandas.DataFrame" ] ]
haddocking/disvis
[ "a922bd079b41ad5ef3ac33f4e68968f8978626d2" ]
[ "disvis/IO/mmcif.py" ]
[ "from __future__ import print_function\nimport sys\nfrom collections import OrderedDict\nimport numpy as np\n\ndef parse_cif(infile):\n if isinstance(infile, file):\n pass\n elif isinstance(infile, str):\n infile = open(infile)\n else:\n raise TypeError(\"Input should either be a file ...
[ [ "numpy.asarray", "numpy.zeros" ] ]
kgrozdanic/lumen-data-science-2022
[ "115e14d8502210c662a68913365dc9c1179c3998", "115e14d8502210c662a68913365dc9c1179c3998" ]
[ "src/data/outlier_detection.py", "src/models/coord_prediction_utils.py" ]
[ "import numpy as np\nimport pandas as pd\nimport cv2\nfrom imutils import paths\nimport argparse\nimport pickle\nimport vptree\nimport matplotlib.pyplot as plt\nimport time\nfrom tqdm import tqdm\nimport os\nfrom skimage.io import imread, imshow\nimport seaborn as sns\nfrom src.helpers import *\n\nMAIN_PATH = \"../...
[ [ "matplotlib.pyplot.tight_layout", "pandas.read_csv", "pandas.DataFrame" ], [ "numpy.median", "pandas.read_csv", "numpy.mean" ] ]
Keirua/blog.keiruaprod.fr
[ "76e6623ff3d625690e1dad02efa5e12073be5381" ]
[ "charts/cats.py" ]
[ "import cutecharts.charts as ctc\nimport pandas as pd\nimport numpy as np\n\n# https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html\ndf=pd.read_csv('catsshouldnt.csv', sep=',')\n\n# https://github.com/cutecharts/cutecharts.py#-usage\nchart = ctc.Bar('Follower count for @catsshouldnt',widt...
[ [ "pandas.read_csv" ] ]
holli/probability
[ "7a0ce5e5beff91051028258dfbc7bc6cf0c4998d", "3e84aa840b624f4184819f1e6ce9180c7997aad9", "7a0ce5e5beff91051028258dfbc7bc6cf0c4998d", "7a0ce5e5beff91051028258dfbc7bc6cf0c4998d" ]
[ "tensorflow_probability/python/bijectors/sinh_arcsinh_test.py", "tensorflow_probability/python/bijectors/invert.py", "discussion/nn/variational_base.py", "tensorflow_probability/python/bijectors/scale.py" ]
[ "# Copyright 2018 The TensorFlow Probability Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
[ [ "tensorflow.compat.v2.Variable", "numpy.swapaxes", "numpy.log", "tensorflow.compat.v2.test.main", "numpy.abs", "numpy.amax", "numpy.logspace", "numpy.amin", "numpy.sqrt", "numpy.sort", "numpy.float128", "numpy.finfo", "numpy.std", "numpy.mean", "numpy.ar...
bluetyson/discretize
[ "a4ead91d6a1f84658ab20946da5fa86dc9ccc831", "a4ead91d6a1f84658ab20946da5fa86dc9ccc831" ]
[ "tutorials/inner_products/2_physical_properties.py", "discretize/mixins/omfModule.py" ]
[ "\"\"\"\nConstitutive Relations\n======================\n\nWhen solving PDEs using the finite volume approach, inner products may\ncontain constitutive relations; examples include Ohm's law and Hooke's law.\nFor this class of inner products, you will learn how to:\n\n - Construct the inner-product matrix in the ...
[ [ "matplotlib.pyplot.figure", "numpy.array", "numpy.random.rand", "numpy.ones" ], [ "numpy.reshape", "numpy.array" ] ]
kalnun/pandas-ta
[ "60b6cc42f6c53bfdc18fe77e9d70a00712ce3149" ]
[ "pandas_ta/volatility/true_range.py" ]
[ "# -*- coding: utf-8 -*-\nfrom pandas import DataFrame\nfrom ..utils import get_drift, get_offset, non_zero_range, verify_series\n\ndef true_range(high, low, close, drift=None, offset=None, **kwargs):\n \"\"\"Indicator: True Range\"\"\"\n # Validate arguments\n high = verify_series(high)\n low = verify_...
[ [ "pandas.DataFrame" ] ]
CRingrose94/geomeTRIC
[ "5d8eada8c0fafc4aa354adae4a2d84b5b8d943b2" ]
[ "geometric/tests/test_batch_opt.py" ]
[ "\"\"\"\nA set of tests for using the QCEngine project\n\"\"\"\n\nimport copy\nimport numpy as np\nimport tempfile\nimport logging\nimport math\nfrom geometric.molecule import bohr2ang\n\nlogger = logging.getLogger(__name__)\n\nfrom . import addons\nimport geometric.optimize as gt \nfrom geometric.internal import C...
[ [ "numpy.array", "numpy.power" ] ]
kapteyn-astro/kapteyn
[ "f12332cfd567c7c0da40628dcfc7b297971ee636", "f12332cfd567c7c0da40628dcfc7b297971ee636", "f12332cfd567c7c0da40628dcfc7b297971ee636", "f12332cfd567c7c0da40628dcfc7b297971ee636" ]
[ "doc/source/EXAMPLES/mu_ticklabeldemo.py", "kapteyn/interpolation.py", "doc/source/EXAMPLES/mu_graticule.py", "kapteyn/celestial.py" ]
[ "from kapteyn import maputils\nfrom matplotlib import pylab as plt\n\nheader = {'NAXIS': 2 ,'NAXIS1':100 , 'NAXIS2': 100 ,\n'CDELT1': -7.165998823000E-03, 'CRPIX1': 5.100000000000E+01 ,\n'CRVAL1': -5.128208479590E+01, 'CTYPE1': 'RA---NCP', 'CUNIT1': 'DEGREE ',\n'CDELT2': 7.165998823000E-03, 'CRPIX2': 5.10000000000...
[ [ "matplotlib.pylab.show", "matplotlib.pylab.figure" ], [ "numpy.dot", "numpy.product", "numpy.asarray", "numpy.ascontiguousarray", "numpy.iscomplexobj", "numpy.array", "numpy.zeros" ], [ "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "numpy.mat...
forsubmissionanonymity/nips_2021_2271
[ "81a9eccb222738ccab1c540a87b701b0b9783ba3" ]
[ "utils/utils_squad_evaluate.py" ]
[ "\"\"\" Official evaluation script for SQuAD version 2.0.\r\n Modified by XLNet authors to update `find_best_threshold` scripts for SQuAD V2.0\r\nIn addition to basic functionality, we also compute additional statistics and\r\nplot precision-recall curves if an additional na_prob.json file is provided.\r\nThis f...
[ [ "numpy.ones_like", "matplotlib.pyplot.title", "matplotlib.pyplot.ylim", "matplotlib.use", "matplotlib.pyplot.step", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlim", "matplotlib.pyplot.clf", "matplotlib.pyplot.fill_between", "matplotlib.pyplot.xlabel", "matplotlib....
leyiweb/Deep-SAD-PyTorch
[ "305667c84b92167792816794f84b41273a7b41c0", "305667c84b92167792816794f84b41273a7b41c0" ]
[ "src/networks/layers/standard.py", "src/networks/vae.py" ]
[ "import torch\n\nfrom torch.nn import Module\nfrom torch.nn import init\nfrom torch.nn.parameter import Parameter\n\n\n# Acknowledgements: https://github.com/wohlert/semi-supervised-pytorch\nclass Standardize(Module):\n \"\"\"\n Applies (element-wise) standardization with trainable translation parameter μ and...
[ [ "torch.nn.init.constant_", "torch.div", "torch.Tensor" ], [ "torch.nn.Linear", "torch.nn.ModuleList", "torch.nn.init.xavier_normal_", "torch.nn.Sigmoid" ] ]
BlueAmulet/BasicSR
[ "7040913d8659a05af4c2428feb71c260efbf1e9c" ]
[ "codes/models/modules/loss.py" ]
[ "import torch\nimport torch.nn as nn\nimport math\nimport numbers\nfrom torch.nn import functional as F\nimport numpy as np\n\ndef LoG(imgHF): #Laplacian of Gaussian\n # The LoG operator calculates the second spatial derivative of an image. \n # This means that in areas where the image has a constant intensit...
[ [ "torch.sum", "torch.nn.BCEWithLogitsLoss", "torch.FloatTensor", "torch.device", "torch.nn.L1Loss", "torch.pow", "torch.sqrt", "torch.from_numpy", "torch.nn.CosineSimilarity", "torch.arange", "numpy.repeat", "numpy.zeros", "torch.autograd.grad", "torch.nn.fun...
zhafen/galaxy-dive
[ "e1127da25d10f699b3ada01b1b4635255f4f3917", "e1127da25d10f699b3ada01b1b4635255f4f3917" ]
[ "galaxy_dive/trends/data_products.py", "galaxy_dive/tests/test_read_data/test_metafile.py" ]
[ "#!/usr/bin/env python\n'''Compilation of functions for interfacing with miscellanious data products.\n\n@author: Zach Hafen\n@contact: zachary.h.hafen@gmail.com\n@status: Development\n'''\n\nimport copy\nimport numpy as np\nimport os\nimport pandas as pd\n\n#########################################################...
[ [ "numpy.load", "pandas.DataFrame" ], [ "numpy.testing.assert_allclose" ] ]
kthyng/octant
[ "65591d87797fa74e0c092d5f50fb0cd703eb412e", "65591d87797fa74e0c092d5f50fb0cd703eb412e" ]
[ "octant/python-gsw/gsw/gibbs/practical_salinity.py", "octant/python-gsw/gsw/gibbs/basic_thermodynamic_t.py" ]
[ "# -*- coding: utf-8 -*-\n\nfrom __future__ import division\n\nimport numpy as np\n\nfrom library import Hill_ratio_at_SP2\nfrom gsw.utilities import match_args_return\n\n__all__ = [\n 'SP_from_C',\n 'C_from_SP',\n 'SP_from_R',\n 'R_from_SP',\n 'SP_salinometer',\n ...
[ [ "numpy.maximum", "numpy.sqrt", "numpy.zeros_like", "numpy.broadcast_arrays", "numpy.ravel", "numpy.logical_and" ], [ "numpy.maximum", "numpy.sqrt", "numpy.ones_like", "numpy.isnan", "numpy.logical_or", "numpy.zeros_like", "numpy.ma.array" ] ]
coryell/TensorNetwork
[ "9225390dc75c4a5f1d3f963608249a0c3aca826c" ]
[ "tensornetwork/backends/shell/shell_backend.py" ]
[ "# Copyright 2019 The TensorNetwork Authors\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless requir...
[ [ "numpy.ones" ] ]
abhinavagarwalla/MAL-inference-deepsort
[ "3dc2010f76dc249e60d3e970247faa7e7c5ffca6" ]
[ "setup.py" ]
[ "from setuptools import setup\nfrom torch.utils.cpp_extension import BuildExtension, CUDAExtension\n\nsetup(\n name='retinanet',\n version='0.1',\n description='Fast and accurate single shot object detector',\n author = 'NVIDIA Corporation',\n author_email='fchabert@nvidia.com',\n packages=['retin...
[ [ "torch.utils.cpp_extension.CUDAExtension", "torch.utils.cpp_extension.BuildExtension.with_options" ] ]
doublejtoh/tensorflow-resnet-image-clustering
[ "b81ba44910c863f14e1a0b5b3422226c1241e8a1" ]
[ "src/main.py" ]
[ "import tensorflow as tf\nfrom os import path as ospath\nfrom model import Model\nfrom config import LABELS_PRED, TRAINING_IMG_DIR, TRAINING_DATA_DIR, TRAINING_JSON_PATH, TEST_IMG_DIR, TEST_DATA_DIR, CHECKPOINT_PATH, CHECKPOINT_SAVE_EPOCH, CHECKPOINT_MAX_TO_KEEP, _IMAGE_WIDTH, _IMAGE_HEIGHT, _IMAGE_CHANNELS, _NUM_C...
[ [ "tensorflow.app.flags.DEFINE_boolean", "tensorflow.app.flags.DEFINE_string", "tensorflow.app.flags.DEFINE_integer" ] ]
Mottl/pandas
[ "d7af297d6fd70be6b1b0c03771127b9aedcef84b", "6111f645c5adc5bdcd3810b4112392bda3583d59" ]
[ "pandas/core/groupby/groupby.py", "pandas/tests/arrays/categorical/test_constructors.py" ]
[ "\"\"\"\nProvide the groupby split-apply-combine paradigm. Define the GroupBy\nclass providing the base-class of operations.\n\nThe SeriesGroupBy and DataFrameGroupBy sub-class\n(defined in pandas.core.groupby.generic)\nexpose these user-facing objects to provide specific functionailty.\n\"\"\"\n\nimport collection...
[ [ "pandas.core.window.ExpandingGroupby", "pandas.core.dtypes.common.is_extension_array_dtype", "numpy.asarray", "numpy.minimum.accumulate", "pandas.core.groupby.grouper._get_grouper", "pandas.core.sorting.get_group_index_sorter", "pandas.core.dtypes.missing.notna", "numpy.concatenate...
vctrop/ant_colony_for_continuous_domains
[ "a109abfca35be4d0453c7e01f6f755c11ae09473" ]
[ "acor_plots.py" ]
[ "#!python3\n\n# Copyright (C) 2020 Victor O. Costa\n\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n\n# This ...
[ [ "numpy.abs", "numpy.linspace", "numpy.max", "numpy.append", "numpy.random.normal", "numpy.random.uniform", "numpy.array", "numpy.exp", "numpy.zeros" ] ]
rd11490/owl-map-score-added
[ "80ce7e6a08d015a8890253ef2f31fd67213a7868" ]
[ "map_score.py" ]
[ "import pandas as pd\nfrom utils.constants import Maps, total_escort_map_distance, total_map_time, calc_map_type, time_to_add\nfrom utils.utils import calc_match_date, calc_season\n\n# Some readability options for pandas print statements\npd.set_option('display.max_columns', 500)\npd.set_option('display.max_rows', ...
[ [ "pandas.set_option", "pandas.read_csv", "pandas.concat", "pandas.Series" ] ]
iaqos/ancona
[ "f9beefb966c2c98920bc7309d3b52df929082312" ]
[ "generator.py" ]
[ "#!/usr/bin/env python3\n# coding=utf-8\n# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this fil...
[ [ "numpy.random.seed", "torch.manual_seed", "torch.cuda.is_available", "torch.cuda.manual_seed_all", "torch.cuda.device_count" ] ]
Guoning-Chen/ssd.pytorch
[ "49c0e039bc3128ccc0176454059665a739d4e185" ]
[ "layers/modules/multibox_loss.py" ]
[ "# -*- coding: utf-8 -*-\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom data import coco as cfg\nfrom ..box_utils import match, log_sum_exp\n\n\nclass MultiBoxLoss(nn.Module):\n \"\"\"SSD Weighted Loss Function\n Compute Targets:\n 1) Pr...
[ [ "torch.LongTensor", "torch.Tensor", "torch.nn.functional.cross_entropy", "torch.nn.functional.smooth_l1_loss", "torch.autograd.Variable" ] ]
arita37/pyvtreat
[ "c32e7ce6db11a2ccdd63e545b25028cbec03a3ff" ]
[ "pkg/build/lib/vtreat/vtreat_api.py" ]
[ "import warnings\n\nimport pandas\nimport numpy\n\nimport vtreat.vtreat_impl as vtreat_impl\nimport vtreat.util\nimport vtreat.cross_plan\n\n\ndef vtreat_parameters(user_params=None):\n \"\"\"build a vtreat parameters dictionary, adding in user choices\"\"\"\n\n params = {\n \"use_hierarchical_estimate...
[ [ "pandas.concat", "numpy.unique", "numpy.asarray", "numpy.min", "numpy.all", "numpy.max", "numpy.mean" ] ]
dmadeka/ray
[ "4f8e100fe0417da4fe1098defbfa478088502244" ]
[ "python/ray/experimental/sgd/pytorch/utils.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom collections import namedtuple\nfrom contextlib import closing\nimport numpy as np\nimport socket\nimport time\nimport torch\nimport torch.nn as nn\n\n\ndef train(train_iterator, model, criterion, ...
[ [ "torch.nn.MSELoss", "numpy.median", "numpy.max", "numpy.mean", "torch.no_grad", "torch.cuda.is_available", "numpy.sum" ] ]
haydarai/dagster
[ "9b9c78e332f976f196d17a38c9840f53679d94cd" ]
[ "python_modules/libraries/dagster-dbt/dagster_dbt/rpc/solids.py" ]
[ "import json\nimport time\nfrom typing import Callable, Iterator, Optional\n\nimport pandas as pd\nfrom dagster_pandas import DataFrame\n\nfrom dagster import (\n Array,\n AssetMaterialization,\n Bool,\n DagsterInvalidDefinitionError,\n EventMetadataEntry,\n Failure,\n Field,\n InputDefiniti...
[ [ "pandas.DataFrame.from_records" ] ]
wangrui1996/simple_pose_tensorflow
[ "6b97bf1cff7836eec638fe54e86e1ec203c0b79f" ]
[ "utils/create_cpm_id_fulljoints.py" ]
[ "import cv2\nimport cpm_utils\nimport numpy as np\nimport math\nimport tensorflow as tf\nimport time\nimport json\nimport random\nimport os\n\n\ntfr_file = 'cpm_sample_dataset.tfrecords'\ndataset_dir = '/Users/wangrui/Downloads/id_dataset/data'\n\nSHOW_INFO = False\nbox_size = 32\ninput_size = 256\nnum_of_joints = ...
[ [ "numpy.amax", "numpy.reshape", "numpy.ones", "tensorflow.python_io.TFRecordWriter", "tensorflow.train.BytesList", "tensorflow.train.FloatList", "numpy.array", "numpy.zeros", "tensorflow.train.Int64List" ] ]
lexical-kenobi/Face-Vision-3D_Pose
[ "07eee33d09018c99251051a983d3842212177e5a", "07eee33d09018c99251051a983d3842212177e5a" ]
[ "utils/paf.py", "utils/inference.py" ]
[ "#!/usr/bin/env python3\n# coding: utf-8\n\nimport numpy as np\nfrom .ddfa import _parse_param\nfrom .params import u_filter, w_filter, w_exp_filter, std_size, param_mean, param_std\n\n\ndef reconstruct_paf_anchor(param, whitening=True):\n if whitening:\n param = param * param_std + param_mean\n p, off...
[ [ "numpy.round", "numpy.zeros" ], [ "matplotlib.pyplot.imshow", "numpy.maximum", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "numpy.round", "matplotlib.pyplot.subplots_adjust", "matplotlib.pyplot.axis", "scipy.io.savemat", "matplotlib.pyplot.show", "num...
binary-husky/hmp2g
[ "1a4f4093cd296f07348f4db4c7503aca6e1fb05c", "1a4f4093cd296f07348f4db4c7503aca6e1fb05c" ]
[ "ALGORITHM/conc_4hist_mathdb/net.py", "ALGORITHM/commom/dl_pool.py" ]
[ "import math\nimport torch,time,random\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.distributions.categorical import Categorical\nfrom torch.distributions.multivariate_normal import MultivariateNormal\nfrom torch.nn.modules.linear import Linear\nfrom ..commom.attention import MultiHeadAttenti...
[ [ "torch.distributions.categorical.Categorical", "torch.nn.functional.softmax", "torch.nan_to_num_", "torch.nn.functional.gumbel_softmax", "torch.nn.init.uniform_", "torch.Tensor", "torch.cat", "torch.nn.modules.linear.Linear", "torch.isnan", "torch.nn.ReLU", "torch.tanh_...
KanaCS/transformers
[ "d4ba8ec0d56a332fdc66d0339db4dfe1a9af7af0" ]
[ "src/transformers/models/gpt2/modeling_gpt2.py" ]
[ "# coding=utf-8\n# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.\n# Copyright (c) 2018, 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 o...
[ [ "torch.nn.Softmax", "torch.cat", "torch.nn.Embedding", "torch.nn.Dropout", "torch.nn.CrossEntropyLoss", "torch.ones", "torch.from_numpy", "torch.tensor", "torch.arange", "tensorflow.train.list_variables", "torch.cuda.empty_cache", "tensorflow.train.load_variable", ...
tttom/MacroMax
[ "e5f66252befb11e9fd906eb6e1a8a8c5eacf1451", "e5f66252befb11e9fd906eb6e1a8a8c5eacf1451" ]
[ "python/macromax/bound.py", "python/macromax/utils/array/grid.py" ]
[ "\"\"\"\nThe module provides the abstract :class:`Bound` to represent the boundary of the simulation, e.g. periodic, or\ngradually more absorbing. Specific boundaries are implemented as subclasses and can be used directly as the `bound`\nargument to :func:`macromax.solve` or :class:`macromax.Solution`. The preclude...
[ [ "numpy.logical_not", "numpy.asarray", "numpy.sign", "numpy.vectorize", "numpy.broadcast_to", "numpy.any", "numpy.zeros", "numpy.lib.scimath.sqrt" ], [ "numpy.logical_not", "numpy.abs", "numpy.asarray", "numpy.arange", "numpy.all", "numpy.round", "num...
Lyuyangdaisy/DS_package
[ "ca0f220598ee156028646fbefccde08b2ece62ea", "ca0f220598ee156028646fbefccde08b2ece62ea", "ca0f220598ee156028646fbefccde08b2ece62ea", "ca0f220598ee156028646fbefccde08b2ece62ea" ]
[ "english/clustering/Kmeans/kmeans.py", "english/calculator_for_rock/pyroxene/calculator.py", "chinese/clustering/AP/AP_class.py", "english/classifier/svm/svm_2/svm_llwr3_1f.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\nimport pandas as pd\nfrom sklearn.model_selection import ParameterGrid\nfrom sklearn.base import clone\nfrom sklearn.cluster import KMeans\nfrom sklearn import metrics\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndf = pd.read_excel('4.xlsx')\ndata = df.drop('O7'...
[ [ "pandas.read_excel", "matplotlib.pyplot.axvline", "sklearn.cluster.KMeans", "matplotlib.pyplot.title", "sklearn.metrics.silhouette_score", "sklearn.metrics.v_measure_score", "sklearn.metrics.homogeneity_score", "sklearn.metrics.completeness_score", "matplotlib.pyplot.plot", ...
dsergio/data-modeling
[ "eff6a05c63df4cf8192169abdad01ab2b3854958" ]
[ "python/kmeansDaysSinceStormNumObs.py" ]
[ "\"\"\"\nAuthor: David Sergio\n\nKMeans Clustering\n\"\"\"\n\nimport numpy as np\nimport pandas as pd\n# import matplotlib as plt\nimport matplotlib.pyplot as plt\nfrom numpy import nan\n\nfrom sklearn.cluster import KMeans\n\n\nweather_observation_data_file = \"..\\\\transform\\\\stage6\\\\all_weather_obs_dates.cs...
[ [ "pandas.read_csv", "matplotlib.pyplot.title", "matplotlib.pyplot.scatter", "sklearn.cluster.KMeans", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylabel" ] ]
rupakgoyal/panel-
[ "4e1e01e1766ebfc2fc1efb409734fd51efc60c01" ]
[ "panel/tests/pane/test_vega.py" ]
[ "from __future__ import absolute_import\n\nimport pytest\n\ntry:\n import altair as alt\nexcept:\n alt = None\naltair_available = pytest.mark.skipif(alt is None, reason=\"requires altair\")\n\nimport numpy as np\n\nfrom panel.models.vega import VegaPlot\nfrom panel.pane import Pane, PaneBase, Vega\n\nblank_sc...
[ [ "numpy.array" ] ]
Waziup/SoilMoistureML
[ "26c8ec9ff51889d51b8dbd76c26d7b168282b447" ]
[ "competition/trans.py" ]
[ "import pandas as pd\nimport matplotlib.pyplot as plt\nimport pylab\nfrom scipy.signal import argrelextrema\nimport numpy as np\nfrom scipy import signal\n\n\n# Get Sensor observations\ndef getObs(myfile, name):\n\n # read the CSV file, parsing dates and dropping one useless collumn\n obs = pd.read_csv(myfile,\...
[ [ "pandas.merge", "pandas.to_datetime", "pandas.read_csv", "matplotlib.pyplot.plot", "scipy.signal.argrelextrema", "matplotlib.pyplot.show" ] ]
sunqiang85/DASA
[ "c4fdc61db77f59f84c68abec3b985fbd7dc29323" ]
[ "r2r_src/preprocess_mini_dataset.py" ]
[ "import os\nimport sys\nimport re\nsys.path.append('build')\nimport MatterSim\nimport string\nimport json\nimport time\nimport math\nfrom collections import Counter, defaultdict\nimport numpy as np\nimport networkx as nx\nfrom param import args\nimport torch.nn.functional as F\nfrom param import args\nfrom tqdm imp...
[ [ "numpy.load", "numpy.array", "numpy.save" ] ]
RUBAIATH-E-ULFATH/Phishing-URL-Detector-Software-Desktop
[ "02fc1522a23421334e548df77df6048dc48ca6a8" ]
[ "machine learning model/src/inspect_model.py" ]
[ "from ruba_project_1.src.build_dataset import *\nfrom sklearn.externals import joblib\nimport pickle\nimport numpy as np\n\n\ndef main(url):\n #url = \"http://www.facebook.com/\"\n\n X_test = feature_extract(url)\n print(X_test)\n X_test = (np.array(X_test)).reshape(1, -1)\n\n # Load the model from t...
[ [ "numpy.array", "sklearn.externals.joblib.load" ] ]
cns-iu/HuBMAP---Hacking-the-Kidney
[ "1a41c887f8edb0b52f5afade384a17dc3d3efec4" ]
[ "models/1-Tom/train/src/02_train/run.py" ]
[ "import time\nimport pandas as pd\nimport numpy as np\nimport gc\nfrom os.path import join as opj\nimport matplotlib.pyplot as plt\nimport pickle\nfrom tqdm import tqdm\nimport torchvision\nimport torch\nfrom torch import nn, optim\nfrom torch.utils.data import DataLoader\nfrom dataset import HuBMAPDatasetTrain\nfr...
[ [ "matplotlib.pyplot.imshow", "pandas.concat", "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.sigmoid", "numpy.clip", "torch.utils.data.DataLoader", "torch.cuda.empty_cache", "pandas.DataFrame", "torch.cuda.amp.autocast", "numpy.concatenate", "torch.cuda.amp.GradSca...
BennyZhang-Codes/LDCT-denoising-with-DL-Methods-and-Dicom-Viewer-by-Benny
[ "7e1312e8b2846a9a54ca11500db2dd8e305d1a3c" ]
[ "LDCT_Denoising/Neural_Network/Loss_Func.py" ]
[ "# -*- coding: utf-8 -*-\r\n\r\nimport torch.nn as nn\r\nfrom torch.nn import functional as F\r\nimport pytorch_ssim\r\n\r\nclass MSE_Loss(nn.Module):\r\n def __init__(self):\r\n super(MSE_Loss, self).__init__()\r\n\r\n def forward(self, input, target):\r\n return F.mse_loss(input, target, reduc...
[ [ "torch.nn.functional.mse_loss" ] ]
vmware/iot-analytics-benchmark
[ "e7fd84af2298cffb85a78e0b3d3bbc342d42f556" ]
[ "DL/python/send_images_cifar.py" ]
[ "\"\"\"\nsend_images_cifar.py: sends labeled CIFAR10 images encoded as a string to an inferencing program\n\nUsage: python3 send_images_cifar.py [-h] [-s] [-i IMAGESPERSEC] [-t TOTALIMAGES] | nc <dest IP address> <dest port>\noptional arguments:\n -h, --help show this help message and exit\n -i IMAGES...
[ [ "numpy.mean" ] ]
chivalry/pmdarima
[ "83aaa8249fc93b8bc2311431af53d2d10d312eea" ]
[ "pmdarima/preprocessing/exog/fourier.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport numpy as np\n\nfrom sklearn.utils.validation import check_is_fitted\n\nfrom .base import BaseExogFeaturizer\nfrom ..base import UpdatableMixin\nfrom ._fourier import C_fourier_terms\n\n__all__ = ['FourierFeaturizer']\n\nsinpi = (lambda x: np.sin(np.pi * x))\ncospi = (lambda x: np....
[ [ "numpy.hstack", "sklearn.utils.validation.check_is_fitted", "numpy.asarray", "numpy.arange", "numpy.cos", "numpy.sin" ] ]
msieb1/LTCN
[ "c9432891327774edf8193e885cc4f10f53fcaa60", "c9432891327774edf8193e885cc4f10f53fcaa60" ]
[ "utils/rot_utils_old.py", "train_pose_euler_crop.py" ]
[ "\nimport torch\nimport numpy as np\nimport math\nfrom ipdb import set_trace\n\n\n # Checks if a matrix is a valid rotation matrix.\ndef isRotationMatrix(R) :\n Rt = np.transpose(R)\n shouldBeIdentity = np.dot(Rt, R)\n I = np.identity(3, dtype = R.dtype)\n n = np.linalg.norm(I - shouldBeIdentity)\n ...
[ [ "numpy.cross", "numpy.dot", "numpy.hstack", "torch.norm", "torch.cos", "torch.cat", "torch.sqrt", "torch.sin", "numpy.linalg.norm", "numpy.identity", "numpy.transpose", "torch.stack", "numpy.array", "torch.atan2" ], [ "torch.norm", "torch.optim.l...
yidinghe/machine-learning-100-days
[ "3050a5a5fd137316e22814c36ab122f0f7b5aec3" ]
[ "day-2/Day2_Simple_Linear_Regression.py" ]
[ "#Step 1: Data Preprocessing\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\ndataset = pd.read_csv('../datasets/studentscores.csv')\nX = dataset.iloc[:, : 1].values\nY = dataset.iloc[:, 1 ].values\n\nfrom sklearn.model_selection import train_test_split\nX_train, X_test, Y_train, Y_test ...
[ [ "pandas.read_csv", "matplotlib.pyplot.scatter", "sklearn.model_selection.train_test_split", "sklearn.linear_model.LinearRegression", "matplotlib.pyplot.show" ] ]
martinjzhang/scDRS
[ "69a9fb4e50dbfa6b1afe0dd222b0d349c5db00eb", "69a9fb4e50dbfa6b1afe0dd222b0d349c5db00eb" ]
[ "compute_downstream.py", "tests/test_CLI.py" ]
[ "import scanpy as sc\nfrom anndata import read_h5ad\nimport pandas as pd\nimport numpy as np\nimport scipy as sp\nimport os\nimport fnmatch\nimport time\nimport argparse\nfrom statsmodels.stats.multitest import multipletests\n\n# Inhouse tools\nimport scdrs.util as util\nimport scdrs.data_loader as dl\nimport scdrs...
[ [ "pandas.read_csv", "numpy.arange", "numpy.quantile", "pandas.DataFrame", "numpy.corrcoef", "numpy.array" ], [ "numpy.all", "pandas.read_csv", "numpy.allclose", "pandas.DataFrame" ] ]
nofarm3/pandas
[ "963cf2b5abf4e1ee99a7f6b9031ad485804c5dff", "c5b4272ed1e7d71266e06660ce9970527711fd55" ]
[ "pandas/core/apply.py", "pandas/core/frame.py" ]
[ "from __future__ import annotations\n\nimport abc\nimport inspect\nfrom typing import TYPE_CHECKING, Any, Dict, Iterator, List, Optional, Tuple, Type, cast\n\nimport numpy as np\n\nfrom pandas._config import option_context\n\nfrom pandas._libs import lib\nfrom pandas._typing import (\n AggFuncType,\n AggFuncT...
[ [ "pandas.core.dtypes.common.is_list_like", "pandas.core.construction.create_series_with_explicit_dtype", "pandas.Series", "pandas.core.dtypes.common.is_extension_array_dtype", "numpy.empty_like", "numpy.asarray", "pandas.core.construction.array", "pandas.core.dtypes.common.is_sequen...
totucuong/vae-seq
[ "0a1bace02c6bac6ab991ab8203a203d3061615ec" ]
[ "vaeseq/examples/text/dataset.py" ]
[ "# Copyright 2018 Google, 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 law or agre...
[ [ "tensorflow.contrib.lookup.index_to_string_table_from_tensor", "tensorflow.to_int64", "tensorflow.contrib.lookup.index_table_from_tensor", "tensorflow.gfile.Open", "numpy.asarray", "tensorflow.data.Dataset.from_tensor_slices", "tensorflow.compat.as_bytes", "tensorflow.data.TextLine...
siddharthab/tensorflow
[ "fbeca0b40aaec37c1ff7fbc3cf84215755faac51" ]
[ "tensorflow/python/keras/engine/data_adapter_test.py" ]
[ "# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.data.ops.dataset_ops.DatasetV2.from_tensor_slices", "tensorflow.python.keras.layers.Dense", "numpy.ones", "tensorflow.python.platform.test.main", "tensorflow.python.ops.array_ops.ones", "numpy.zeros", "tensorflow.python.framework.constant_op.constant" ] ]
sivasanarul/amfe_topopt
[ "ba7fa1ce756e7ea6e4fd7b2bdb609b83bbfac472" ]
[ "examples/nonlinear_beam_hyperreduction.py" ]
[ "# Beam example\n\n# Distributed under BSD-3-Clause License. See LICENSE-File for more information\n#\n\"\"\"\nExample showing a cantilever beam which is loaded on the tip with a force\nshowing nonlinear displacements.\n\nThe beam is reduced with ECSW and NSKTS\n\"\"\"\n\nimport os\nimport time\nimport numpy as np\...
[ [ "numpy.linalg.solve", "numpy.arange", "numpy.save", "numpy.sin", "numpy.load", "numpy.array", "numpy.zeros" ] ]
StephAO/gym-minigrid
[ "6ab2914c2731a68e41e5b4c97a6877b19d4964b5" ]
[ "gym_minigrid/minigrid.py" ]
[ "import math\nimport hashlib\nimport gym\nfrom enum import IntEnum\nimport numpy as np\nfrom gym import error, spaces, utils\nfrom gym.utils import seeding\nfrom .rendering import *\n\n# Size in pixels of a tile in the full-scale human view\nTILE_PIXELS = 32\n\n# Map of color names to RGB values\nCOLORS = {\n 'r...
[ [ "numpy.array", "numpy.zeros", "numpy.array_equal", "numpy.ones" ] ]
jamesxiu/Oystermaran2021
[ "f3703bb220dc5b415942f90bd5761a9985381067" ]
[ "bag_detection-master/scripts/util.py" ]
[ "#!/usr/bin/env python3\n\nimport numpy as np\nimport cv2\nimport tensorflow as tf\n\nimport sys\nsys.path.append(\"/home/oyster/Tensorflow/Monk_Object_Detection/13_tf_obj_2/lib/\")\nfrom infer_detector_nano import Infer\n\nfrom bag_detection.msg import FlipPos, PathPos\n\n\ndef get_rectangles(mask, threshold_area)...
[ [ "tensorflow.convert_to_tensor", "numpy.array", "tensorflow.saved_model.load" ] ]
chloeyutianyi/pytorch
[ "6a085648d81ce88ff59d6d1438fdb3707a0d6fb7", "6a085648d81ce88ff59d6d1438fdb3707a0d6fb7" ]
[ "test/quantization/core/test_workflow_ops.py", "torch/fx/experimental/graph_gradual_typechecker.py" ]
[ "import torch\nfrom torch.quantization import (\n FakeQuantize,\n MovingAverageMinMaxObserver,\n default_observer,\n default_affine_fixed_qparams_fake_quant,\n)\n\nfrom torch.quantization._learnable_fake_quantize import _LearnableFakeQuantize\nfrom torch.testing._internal.common_quantized import (\n ...
[ [ "torch.quantization.MinMaxObserver", "torch.jit.load", "torch._fake_quantize_learnable_per_tensor_affine", "torch.rand_like", "torch.load", "torch.zeros", "torch.iinfo", "torch.cuda.amp.autocast", "torch.quantization.default_affine_fixed_qparams_fake_quant", "torch.quantiza...
metabolize/entente
[ "c1b16bb7c7fb83b31db4e8ddaf65f1504374fe7a" ]
[ "entente/test_restore_correspondence.py" ]
[ "from entente.restore_correspondence import find_correspondence, restore_correspondence\nimport numpy as np\nimport pytest\nfrom .restore_correspondence import _maybe_tqdm\n\n\ndef create_truncated_test_mesh():\n from .testing import vitra_mesh\n\n # For performance.\n return vitra_mesh().picking_vertices(...
[ [ "numpy.testing.assert_array_equal", "numpy.arange", "numpy.array", "numpy.where" ] ]
VCG/gp
[ "a41d0c52fd09b5e34804b9c6082778a75dfc03c1" ]
[ "raveler/ray/ray/features/moments.py" ]
[ "import numpy as np\nfrom scipy.misc import comb as nchoosek\nfrom . import base\n\nclass Manager(base.Null):\n def __init__(self, nmoments=4, use_diff_features=True, oriented=False, \n normalize=False, *args, **kwargs):\n super(Manager, self).__init__()\n self.nmoments = nmoments\n ...
[ [ "numpy.arange", "numpy.sign", "numpy.zeros_like", "numpy.array", "scipy.misc.comb" ] ]
AndrewQuinn2020/EECS-332-MPs
[ "ee164e98bd6b1b05296e4abec69a8b5d5de2581b" ]
[ "MP3/mp3_testgen.py" ]
[ "#!/usr/bin/python3\n\n# Anything not directly related to processing here\nimport sys\nfrom math import floor\nfrom pathlib import Path\nfrom random import randint\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom mp3_helper import *\nfrom PIL import Image\n\nnp.set_printoptions(threshold=sys.maxsize)\nn...
[ [ "numpy.set_printoptions" ] ]
stanford-futuredata/Willump-Simple
[ "56d52074b671e07a364744e8195fcdc91926c3a8" ]
[ "tests/benchmark_scripts/product_eval.py" ]
[ "import argparse\nimport pickle\nimport time\n\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\n\nfrom product_utils import *\nfrom willump.evaluation.willump_executor import willump_execute\n\nparser = argparse.ArgumentParser()\nparser.add_argument(\"-c\", \"--cascades\", action=\"store_...
[ [ "pandas.read_csv", "sklearn.model_selection.train_test_split" ] ]
Sayar1106/OTTPlatformRecommender
[ "85b72dfe9f810e3b6e12f8c7702ef94db3a03190" ]
[ "sample_model/inference.py" ]
[ "import joblib\nimport pickle\nimport os\nimport config\nimport pandas as pd\nimport click\n\n\ndef load_model_helper(file_path):\n if os.path.split(\".\")[-1] == \"pickle\":\n return pickle.load(open(file_path, 'wb'))\n \n return joblib.load(file_path)\n\ndef fetch_artist_columns(df, artist_list):\...
[ [ "pandas.read_csv" ] ]
zhengcj1/ChID-Dataset
[ "f7d9b7b75cccd50455987a623c898b490e8450f6" ]
[ "Competition/RNN-based Baseline/Models/SAR.py" ]
[ "import tensorflow as tf\nfrom Models.BasicModel import BasicModel\n\nclass Model(BasicModel):\n def __init__(self,\n learning_rate,\n init_word_embed,\n init_idiom_embed,\n size_embed=200,\n num_units=100, # make sure that num_units...
[ [ "tensorflow.matmul", "tensorflow.nn.softmax", "tensorflow.get_variable", "tensorflow.concat", "tensorflow.transpose", "tensorflow.shape", "tensorflow.reduce_sum", "tensorflow.exp", "tensorflow.nn.bidirectional_dynamic_rnn", "tensorflow.einsum", "tensorflow.expand_dims",...
atulvpweb/Screeni-py
[ "2a0b995ce134fb55977fa2ab38274a72392921fc" ]
[ "src/classes/Screener.py" ]
[ "'''\n * Project : Screenipy\n * Author : Pranjal Joshi\n * Created : 28/04/2021\n * Description : Class for analyzing and validating stocks\n'''\n\nimport sys\nimport math\nimport numpy as np\nimport pandas as pd\nimport talib\nimport classes.ConfigManager a...
[ [ "numpy.polyfit", "numpy.array", "numpy.arctan" ] ]
ArneRustad/Master-thesis-cf
[ "23b993b2877ff1506896c4181c4151578091b602" ]
[ "run_hp_idun2.py" ]
[ "print(\"Starting hyperparameter tuning on Idun\")\r\nimport os\r\nimport helpers.hp_tuning.hp_gen\r\nfrom tabGAN import TabGAN\r\nfrom src import constants as const\r\nimport numpy as np\r\nimport pandas as pd\r\n\r\nn_epochs = 100\r\nn_critic = 10\r\nopt_lr = 0.0002\r\nadam_beta1 = 0.5\r\nnoise_discrete_unif_max ...
[ [ "pandas.read_csv" ] ]
REMeyer/astropy
[ "28c49fb618538a01812e586cd07bccdf0591a6c6", "28c49fb618538a01812e586cd07bccdf0591a6c6", "28c49fb618538a01812e586cd07bccdf0591a6c6", "28c49fb618538a01812e586cd07bccdf0591a6c6", "28c49fb618538a01812e586cd07bccdf0591a6c6", "28c49fb618538a01812e586cd07bccdf0591a6c6" ]
[ "astropy/table/pprint.py", "astropy/modeling/core.py", "astropy/table/tests/test_info.py", "astropy/io/ascii/tests/test_c_reader.py", "astropy/coordinates/transformations.py", "astropy/modeling/tests/test_core.py" ]
[ "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nfrom ..extern import six\nfrom ..extern.six import text_type\nfrom ..extern.six.moves import zip, range\n\nimport os\nimport sys\nimport re...
[ [ "numpy.arange", "numpy.prod" ], [ "numpy.rollaxis", "numpy.logical_not", "numpy.asarray", "numpy.ndim", "numpy.logical_or", "numpy.size", "numpy.asanyarray", "numpy.shape", "numpy.any", "numpy.mean", "numpy.ceil", "numpy.array", "numpy.zeros", "n...
wright/dymos
[ "9d253a16ffcc162a84ef1b4a7dddcebeda5522ac", "9d253a16ffcc162a84ef1b4a7dddcebeda5522ac", "9d253a16ffcc162a84ef1b4a7dddcebeda5522ac" ]
[ "dymos/transcriptions/runge_kutta/components/runge_kutta_k_comp.py", "dymos/transcriptions/pseudospectral/components/test/test_gauss_lobatto_interleave_comp.py", "dymos/transcriptions/common/continuity_comp.py" ]
[ "import numpy as np\n\nimport openmdao.api as om\nfrom ....utils.rk_methods import rk_methods\nfrom ....utils.misc import get_rate_units\nfrom ....options import options as dymos_options\n\n\nclass RungeKuttaKComp(om.ExplicitComponent):\n\n def __init__(self, **kwargs):\n super().__init__(**kwargs)\n ...
[ [ "numpy.arange", "numpy.repeat", "numpy.prod", "numpy.ones" ], [ "numpy.array", "numpy.random.random", "numpy.zeros" ], [ "numpy.arange", "numpy.eye", "numpy.ones", "numpy.prod", "numpy.zeros" ] ]
noveens/sampling_cf
[ "e135819b1e7310ee58edbbd138f303e5240a2619" ]
[ "pytorch_models/NeuMF.py" ]
[ "import torch\nimport torch.nn as nn\n\nfrom pytorch_models.MF import BaseMF\n\nclass GMF(BaseMF):\n def __init__(self, hyper_params):\n super(GMF, self).__init__(hyper_params)\n \n self.final = nn.Linear(hyper_params['latent_size'], 1)\n self.dropout = nn.Dropout(hyper_params['dropou...
[ [ "torch.nn.Dropout", "torch.cat", "torch.nn.Embedding", "torch.nn.Linear", "torch.no_grad", "torch.nn.ReLU" ] ]
ostodieck/sharpy
[ "aed86428ff88fd14d36cabd91cf7e04b5fc9a39a", "aed86428ff88fd14d36cabd91cf7e04b5fc9a39a" ]
[ "tests/coupled/static/smith_g_4deg/generate_smith_g_4deg.py", "sharpy/postproc/stallcheck.py" ]
[ "import h5py as h5\nimport numpy as np\nimport configparser\nimport os\n\nimport sharpy.utils.algebra as algebra\n\ncase_name = 'smith_g_4deg'\nroute = os.path.dirname(os.path.realpath(__file__)) + '/'\n\n# flight conditions\nu_inf = 25\nrho = 0.08891\nalpha = 4\nbeta = 0\nc_ref = 1\nb_ref = 16\nsweep = 0*np.pi/180...
[ [ "numpy.diag", "numpy.linspace", "numpy.cos", "numpy.sin", "numpy.ones", "numpy.column_stack", "numpy.array", "numpy.zeros" ], [ "numpy.zeros" ] ]
leeeeeeeee2/srgan
[ "608a5fa30f7039da11c18ad70f84f27755cfba6d" ]
[ "models.py" ]
[ "import torch.nn as nn\nimport torch.nn.functional as F\nimport torch\nfrom torchvision.models import vgg19\nimport math\n\n\nclass FeatureExtractor(nn.Module):\n def __init__(self):\n super(FeatureExtractor, self).__init__()\n vgg19_model = vgg19(pretrained=True)\n self.feature_extractor = ...
[ [ "torch.nn.Sequential", "torch.add", "torch.nn.PReLU", "torch.nn.Conv2d", "torch.nn.PixelShuffle", "torch.nn.Tanh", "torch.nn.LeakyReLU", "torch.nn.BatchNorm2d" ] ]
moshelooks/incubator-mxnet
[ "5245ef68191a6d47594bf331ec6e20ba6e93ad4c" ]
[ "example/onnx/super_resolution.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.array" ] ]
almarklein/stentseg
[ "48255fffdc2394d1dc4ce2208c9a91e1d4c35a46", "48255fffdc2394d1dc4ce2208c9a91e1d4c35a46", "48255fffdc2394d1dc4ce2208c9a91e1d4c35a46", "48255fffdc2394d1dc4ce2208c9a91e1d4c35a46" ]
[ "lspeas/phantom/stats_alg_vs_cam123mean_error_2scanners.py", "lspeas/phantom/plotting_result_error.py", "lspeas/utils/curvature_helix_validation.py", "stentseg/utils/fitting.py" ]
[ "\"\"\" Read position errors from excel for statistical analysis\r\n\r\n\"\"\"\r\nimport os\r\nfrom stentseg.utils.datahandling import select_dir\r\nimport openpyxl # http://openpyxl.readthedocs.org/\r\nimport numpy as np\r\nfrom lspeas.utils.normality_statistics import paired_samples_ttest\r\n\r\n\r\ndef read_erro...
[ [ "numpy.concatenate" ], [ "matplotlib.pyplot.ylim", "matplotlib.pyplot.xlim", "matplotlib.pyplot.figure" ], [ "numpy.ones_like", "numpy.min", "numpy.asarray", "numpy.max", "numpy.std", "numpy.mean" ], [ "numpy.dot", "numpy.hstack", "numpy.linalg.svd",...
ArmenFirman/Intelligent-Solar-Energy-Manager
[ "7a6a796b4e66442bd512eb7e1679c5ba29e145f1" ]
[ "Main Code/WeatherData.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n@author: Amin Asbai\n\"\"\"\nimport json\nimport pandas as pd\nimport requests\n\n\ndef update_Weather_data(df):\n url='http://api.openweathermap.org/data/2.5/weather?q=Andratx&units=metric&appid=1e47e582bff799e3514239429b76f2aa'\n response = requests.get(url)\n climate_da...
[ [ "pandas.to_datetime", "pandas.DataFrame" ] ]
arunkumarchacko/ML_SageMaker_Studies
[ "59660b2bc9b163a62fa271ded3dc328700db7e67" ]
[ "Project_Plagiarism_Detection/problem_unittests.py" ]
[ "from unittest.mock import MagicMock, patch\nimport sklearn.naive_bayes\nimport numpy as np\nimport pandas as pd\nimport re\n\n# test csv file\nTEST_CSV = 'data/test_info.csv'\n\nclass AssertTest(object):\n '''Defines general test behavior.'''\n def __init__(self, params):\n self.assert_param_message =...
[ [ "numpy.isclose" ] ]
SamvitJ/Deep-Feature-Flow
[ "56f982741aa4886878eca3d566419b353c62b698" ]
[ "dff_deeplab/config/config.py" ]
[ "# --------------------------------------------------------\n# Deep Feature Flow\n# Copyright (c) 2016 by Contributors\n# Copyright (c) 2017 Microsoft\n# Licensed under The Apache-2.0 License [see LICENSE for details]\n# Modified by Xizhou Zhu, Yuwen Xiong, Bin Xiao\n# ----------------------------------------------...
[ [ "numpy.array" ] ]
thehomebrewnerd/featuretools
[ "5a7e09edf02b463ad903c6d8c40daa86f208c0c0", "5a7e09edf02b463ad903c6d8c40daa86f208c0c0" ]
[ "featuretools/tests/primitive_tests/test_groupby_transform_primitives.py", "featuretools/tests/entityset_tests/test_last_time_index.py" ]
[ "import numpy as np\nimport pandas as pd\nimport pytest\n\nfrom ..testing_utils import make_ecommerce_entityset\n\nimport featuretools as ft\nfrom featuretools.computational_backends import PandasBackend\nfrom featuretools.primitives import (\n CumCount,\n CumMax,\n CumMean,\n CumMin,\n CumSum,\n ...
[ [ "pandas.Series", "pandas.isnull", "numpy.isnan", "numpy.timedelta64", "pandas.Timestamp" ], [ "pandas.RangeIndex", "pandas.Timestamp", "pandas.Index", "pandas.isnull" ] ]
ut-amrl/ContrastiveSceneContexts
[ "622b9cd32ea2dcf8307d25eb2e7ee1c09d220134", "622b9cd32ea2dcf8307d25eb2e7ee1c09d220134", "622b9cd32ea2dcf8307d25eb2e7ee1c09d220134", "622b9cd32ea2dcf8307d25eb2e7ee1c09d220134", "622b9cd32ea2dcf8307d25eb2e7ee1c09d220134" ]
[ "downstream/insseg/datasets/scannet.py", "downstream/votenet/lib/ddp_trainer.py", "downstream/semseg/datasets/synthia.py", "downstream/votenet/models/backbone/sparseconv/voxelizer.py", "pretrain/scannet_pair/point_cloud_extractor.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n# \n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n\nimport logging\nimport os\nimport sys\nfrom pathlib import Path\n\nimport torch\nimport numpy as np\nfrom scipy import spatial\n\...
[ [ "numpy.expand_dims", "numpy.ones_like", "torch.load", "numpy.linalg.inv", "numpy.ones", "numpy.array" ], [ "torch.utils.data.distributed.DistributedSampler", "numpy.random.seed", "torch.cuda.current_device", "torch.load", "numpy.min", "torch.utils.data.DataLoade...
blackredscarf/pytorch-SkipGram
[ "a9fa5a888a7b0c6170eb1fe146e59f54041b2613" ]
[ "eval/ranking.py" ]
[ "\"\"\"\nReference: https://github.com/mfaruqui/eval-word-vectors\n\"\"\"\n\nimport math\nimport numpy\nfrom operator import itemgetter\nfrom numpy.linalg import norm\n\nEPSILON = 1e-6\n\ndef euclidean(vec1, vec2):\n diff = vec1 - vec2\n return math.sqrt(diff.dot(diff))\n\ndef cosine_sim(vec1, vec2):\n vec1 += E...
[ [ "numpy.linalg.norm" ] ]
knorth55/chainer-light-head-rcnn
[ "4408311384d5abe550cd6ad004fa190aaced2c95", "4408311384d5abe550cd6ad004fa190aaced2c95", "4408311384d5abe550cd6ad004fa190aaced2c95" ]
[ "tests/functions_tests/test_psroi_max_align_2d.py", "tests/functions_tests/test_psroi_average_align_2d.py", "light_head_rcnn/links/model/light_head_rcnn_resnet101.py" ]
[ "import chainer\nfrom chainer.backends import cuda\nfrom chainer import gradient_check\nfrom chainer import testing\nfrom chainer.testing import attr\nfrom chainer.testing import condition\nimport numpy as np\nimport unittest\n\nfrom light_head_rcnn import functions\n\n\nclass TestPSROIMaxPolling2D(unittest.TestCas...
[ [ "numpy.arange", "numpy.random.uniform", "numpy.array", "numpy.random.shuffle" ], [ "numpy.arange", "numpy.random.uniform", "numpy.array", "numpy.random.shuffle" ], [ "numpy.array" ] ]
dingdian110/AutoDC
[ "f5ccca6bea993bcff3e804fb859e8b25ae020b5c", "f5ccca6bea993bcff3e804fb859e8b25ae020b5c", "f5ccca6bea993bcff3e804fb859e8b25ae020b5c", "f5ccca6bea993bcff3e804fb859e8b25ae020b5c", "f5ccca6bea993bcff3e804fb859e8b25ae020b5c" ]
[ "autodc/components/ensemble/unnamed_ensemble.py", "autodc/components/models/regression/adaboost.py", "autodc/components/feature_engineering/transformations/selector/variance_selector.py", "autodc/components/transfer_learning/tlbo/priors/default_priors.py", "autodc/components/metrics/metric.py" ]
[ "import numpy as np\nimport pandas as pd\nimport scipy.spatial\nfrom sklearn.metrics.scorer import _BaseScorer\nfrom autodc.components.utils.constants import CLS_TASKS\nfrom sklearn.cluster import AgglomerativeClustering\nfrom sklearn.metrics import accuracy_score\n\n\ndef choose_base_models_regression(predictions,...
[ [ "numpy.log", "numpy.log2", "numpy.asarray", "numpy.arange", "numpy.argmax", "pandas.cut", "numpy.count_nonzero", "numpy.average", "numpy.exp", "sklearn.cluster.AgglomerativeClustering", "numpy.array", "numpy.zeros", "numpy.sum", "sklearn.metrics.accuracy_sco...