repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
hin1115/building_extraction_in_satellite_image | [
"d4ed2c0f95bbee435abc97389df1357393b7e570"
] | [
"nets/zoo/enru_BE.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom collections import OrderedDict\nimport math\nimport numpy as np\ndef conv3x3(in_planes, out_planes, stride=1):\n \"3x3 convolution with padding\"\n return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,\n ... | [
[
"torch.nn.functional.softmax",
"torch.nn.Dropout2d",
"torch.cat",
"torch.nn.Sigmoid",
"torch.nn.functional.sigmoid",
"torch.nn.Sequential",
"numpy.nonzero",
"torch.nn.init.constant_",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.unsqueeze",
"torch.nn.functional.adapti... |
fraudies/tensorflow | [
"a42423e302b71893bbd24aa896869941013c07fb",
"3e21fe5faedab3a8258d344c8ad1cec2612a8aa8",
"a42423e302b71893bbd24aa896869941013c07fb",
"a42423e302b71893bbd24aa896869941013c07fb",
"a42423e302b71893bbd24aa896869941013c07fb",
"6aa83398ab03bfae822f36772757097bcb98b6ed",
"a42423e302b71893bbd24aa896869941013c07f... | [
"tensorflow/python/kernel_tests/gather_op_test.py",
"tensorflow/python/ops/init_ops_v2.py",
"tensorflow/python/kernel_tests/relu_op_test.py",
"tensorflow/python/ops/quantized_conv_ops_test.py",
"tensorflow/python/data/experimental/kernel_tests/directed_interleave_dataset_test.py",
"tensorflow/python/data/... | [
"# Copyright 2015 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.eager.context.executing_eagerly",
"numpy.take",
"tensorflow.python.ops.gradients_impl.gradients",
"numpy.arange",
"tensorflow.python.platform.test.is_gpu_available",
"tensorflow.python.ops.array_ops.placeholder",
"tensorflow.python.ops.array_ops.gather",
"tensorf... |
gabrielliberato/game-of-life | [
"92d2c4b2760ef747a31a15b9c2740e51f6523c84"
] | [
"vida.py"
] | [
"#!/usr/bin/env python3\n\nfrom random import randint\nimport cv2\nimport numpy as np\nfrom time import sleep\n\n\ndef novoGrid(geracaoAtual):\n aux = []\n novaGeracao = []\n\n # Gera uma matriz vazia que sera atualizada depois de contar os vizinhos\n for k in range(0, quant_arrays):\n for j in r... | [
[
"numpy.zeros"
]
] |
gcassella/pyqmc | [
"f7a6e1f656c8eab7ebd72132ee980f77275e3876",
"f7a6e1f656c8eab7ebd72132ee980f77275e3876",
"f7a6e1f656c8eab7ebd72132ee980f77275e3876"
] | [
"tests/integration/test_periodic.py",
"pyqmc/reblock.py",
"tests/unit/test_line_minimization.py"
] | [
"import numpy as np\nimport pyqmc\nimport pandas as pd\nfrom pyscf.pbc import gto, scf\nfrom pyqmc.reblock import reblock\nfrom pyqmc.supercell import get_supercell\nfrom pyscf.pbc.dft.multigrid import multigrid\nfrom pyscf.scf.addons import remove_linear_dep_\nimport time\nimport uuid\n\n\ndef cubic_with_ecp(kind=... | [
[
"numpy.diag",
"numpy.abs",
"numpy.einsum",
"numpy.eye",
"pandas.DataFrame",
"numpy.ones",
"numpy.array",
"numpy.sum"
],
[
"numpy.amax",
"numpy.sqrt",
"pandas.DataFrame",
"numpy.ones",
"numpy.random.randn",
"numpy.mean",
"numpy.array_split",
"nump... |
tap222/tensorflow2.0-3dGAN | [
"cddb994d91e9dd126d5c66f9d382c67ce12385e3"
] | [
"gan.py"
] | [
"import tensorflow as tf\r\nimport numpy as np\r\n\r\ndef generator(project_shape, filters_list, name=\"generator\"):\r\n model = tf.keras.Sequential(name=name)\r\n model.add(tf.keras.layers.Dense(\r\n units=np.prod(project_shape),\r\n input_shape=[100],\r\n use_bias=False, \r\n k... | [
[
"tensorflow.keras.layers.ReLU",
"tensorflow.keras.Input",
"tensorflow.keras.layers.LeakyReLU",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.Sequential",
"tensorflow.keras.layers.Conv3D",
"tensorflow.ones_like",
"tensorflow.keras.layers.Conv3DTranspose",
"tensorflow.zeros_... |
jiaqi-xi/slot_attention | [
"8420414eb261501e5b056e4d409c338d909397ef",
"8420414eb261501e5b056e4d409c338d909397ef"
] | [
"clevr_video/novel_view_train.py",
"clevr_video/model.py"
] | [
"import os\nimport importlib\nimport argparse\nimport numpy as np\nfrom typing import Optional\n\nfrom torchvision import transforms\nimport pytorch_lightning.loggers as pl_loggers\nfrom pytorch_lightning import Trainer\nfrom pytorch_lightning.callbacks import LearningRateMonitor, ModelCheckpoint\n\nfrom novel_view... | [
[
"numpy.argmax"
],
[
"torch.nn.functional.softmax",
"torch.zeros",
"torch.sum",
"torch.cuda.manual_seed_all",
"torch.flatten",
"torch.nn.init.calculate_gain",
"torch.randn",
"torch.nn.GRUCell",
"torch.nn.Sequential",
"torch.nn.ConvTranspose2d",
"torch.nn.Conv2d",... |
PINTO0309/Fast_Seg | [
"82932e1c6cde11c7be720f689ae27a7476637a75"
] | [
"libs/models/MSFNet.py"
] | [
"# Author: Xiangtai Li\n# Email: lxtpku@pku.edu.cn\n# Pytorch Implementation Of MSFNet: Real-Time Semantic Segmentation via Multiply Spatial Fusion Network(face++)\n# I didn't include the boundaries information\n\nimport torch\nimport torch.nn as nn\n\n\n\nclass MSFNet(nn.Module):\n def __init__(self):\n ... | [
[
"torch.Tensor"
]
] |
jingyi7777/adapt-seq-design | [
"51a067752c889f7a0e930a5508a7417dae2cdacc"
] | [
"data/scripts/compute_regression_statistics_without_resampling.py"
] | [
"\"\"\"Compute regression statistics without measurement error.\n\nThe regression outputs include measurement error, which will pull\ndown correlation statistics.\n\"\"\"\n\nimport argparse\nfrom collections import defaultdict\nimport gzip\n\nimport numpy as np\nimport scipy.stats\n\n\ndef parse_args():\n \"\"\"... | [
[
"numpy.mean"
]
] |
cm107/tianshou | [
"0febf4bc1dc1366d837bab4574664f8116b66819",
"0febf4bc1dc1366d837bab4574664f8116b66819",
"0febf4bc1dc1366d837bab4574664f8116b66819"
] | [
"tianshou/policy/modelfree/td3.py",
"examples/atari/runnable/pong_a2c.py",
"examples/atari/atari_qrdqn.py"
] | [
"import torch\nimport numpy as np\nfrom copy import deepcopy\nfrom typing import Any, Dict, Tuple, Optional\n\nfrom tianshou.policy import DDPGPolicy\nfrom tianshou.data import Batch, ReplayBuffer\nfrom tianshou.exploration import BaseNoise, GaussianNoise\n\n\nclass TD3Policy(DDPGPolicy):\n \"\"\"Implementation ... | [
[
"torch.randn"
],
[
"torch.manual_seed",
"torch.cuda.is_available",
"numpy.random.seed"
],
[
"numpy.random.seed",
"torch.load",
"torch.manual_seed",
"torch.utils.tensorboard.SummaryWriter",
"torch.cuda.is_available"
]
] |
lacava/sklearn-benchmarks | [
"a917336f6fd3ffb89efd94b1c7f60b3a05ba780f"
] | [
"model_code/random_search_preprocessing/GaussianNB.py"
] | [
"import sys\nimport pandas as pd\nimport numpy as np\n\nfrom sklearn.preprocessing import Binarizer, MaxAbsScaler, MinMaxScaler\nfrom sklearn.preprocessing import Normalizer, PolynomialFeatures, RobustScaler, StandardScaler\nfrom sklearn.decomposition import FastICA, PCA\nfrom sklearn.kernel_approximation import RB... | [
[
"sklearn.ensemble.ExtraTreesClassifier",
"numpy.random.seed"
]
] |
rachelyou/CL-SGCN | [
"4430d32018c7da3eeb94ac29137ae23d14d90d8d"
] | [
"pGRACE/functional.py"
] | [
"import torch\nfrom torch_geometric.utils import degree, to_undirected\n\nfrom pGRACE.utils import compute_pr, eigenvector_centrality\n\n\ndef drop_feature(x, drop_prob):\n drop_mask = torch.empty((x.size(1),), dtype=torch.float32, device=x.device).uniform_(0, 1) < drop_prob\n x = x.clone()\n x[:, drop_mas... | [
[
"torch.zeros_like",
"torch.log",
"torch.ones_like",
"torch.bernoulli"
]
] |
adamshephard/tiatoolbox | [
"28c32648bc1f3e842c7b241637fd25af290386e6",
"28c32648bc1f3e842c7b241637fd25af290386e6"
] | [
"tests/test_stainnorm.py",
"tiatoolbox/tools/tissuemask.py"
] | [
"# skipcq: PTC-W6004\n\"\"\"Tests for stain normalization code.\"\"\"\n\nimport pathlib\n\nimport numpy as np\nimport pytest\nfrom click.testing import CliRunner\n\nfrom tiatoolbox import cli\nfrom tiatoolbox.data import _local_sample_path, stain_norm_target\nfrom tiatoolbox.tools import stainextract\nfrom tiatoolb... | [
[
"numpy.absolute",
"numpy.ones",
"numpy.all",
"numpy.shape",
"numpy.array",
"numpy.zeros"
],
[
"numpy.round",
"numpy.max",
"numpy.shape",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] |
martindurant/tiled | [
"79eef6fb60964a726c0b43a280c6343b94097640",
"79eef6fb60964a726c0b43a280c6343b94097640",
"79eef6fb60964a726c0b43a280c6343b94097640"
] | [
"tiled/server/router.py",
"tiled/server/core.py",
"tiled/structures/structured_array.py"
] | [
"import dataclasses\nimport inspect\nfrom datetime import datetime, timedelta\nfrom functools import lru_cache\nfrom hashlib import md5\nfrom typing import Any, List, Optional\n\nfrom fastapi import APIRouter, Depends, HTTPException, Query, Request, Response\nfrom pydantic import BaseSettings\n\nfrom .. import __ve... | [
[
"numpy.asarray"
],
[
"numpy.isscalar"
],
[
"numpy.ascontiguousarray",
"numpy.dtype"
]
] |
DarkEnergySurvey/ugali | [
"82abffcc92bddf830d89f85cb3966870f7d9f720",
"82abffcc92bddf830d89f85cb3966870f7d9f720"
] | [
"ugali/observation/roi.py",
"ugali/scratch/simulation/validate_sim_population.py"
] | [
"\"\"\"\nDefine a region of interest (ROI) in color, magnitude, and direction space.\n\nThe ROI is divided into 3 regions:\n1) The 'target' region: The region occuping the likelihood-scale healpix\n pixel over which the likelihood is evaluated. (Size controlled by\n 'nside_likelihood')\n2) The 'interior' region... | [
[
"numpy.linspace",
"numpy.unique",
"numpy.asarray",
"numpy.in1d",
"numpy.setdiff1d"
],
[
"numpy.nonzero",
"numpy.unique",
"numpy.arange",
"numpy.in1d",
"numpy.tile",
"numpy.concatenate"
]
] |
statphysandml/MCMCEvaluationLib | [
"f722b2c7df88b1b33cd29335a22eef53bdad9665",
"f722b2c7df88b1b33cd29335a22eef53bdad9665"
] | [
"mcmctools/loading/loading.py",
"mcmctools/modes/correlation_time.py"
] | [
"import pandas as pd\nimport numpy as np\nimport os\nimport glob\nimport math\n\n\nfrom pystatplottools.utils.multiple_inheritance_base_class import MHBC\n\n\nclass ConfigurationLoader(MHBC):\n def __init__(self, **kwargs):\n # For child classes with more than one parent class\n super().__init__(**... | [
[
"pandas.concat",
"pandas.read_csv",
"pandas.MultiIndex.from_tuples",
"numpy.stack"
],
[
"pandas.RangeIndex",
"numpy.exp",
"pandas.DataFrame"
]
] |
ktjack2009/MachineLearing | [
"fcb6e491f3f74ef1046d19e38af99b0973709b16"
] | [
"KerasLearning/__init__.py"
] | [
"import os\nimport cv2 as cv\nimport numpy as np\n\nDIR = os.path.dirname(os.path.abspath(__file__))\nDATA_PATH = os.path.join(os.path.dirname(DIR), 'Data', 'cats_and_dogs_small')\nmodel_path = os.path.join(DIR, 'models')\ntest_dir = os.path.join(DATA_PATH, 'test')\ni = 1500\nimage_1 = os.path.join(test_dir, 'cats'... | [
[
"numpy.reshape",
"tensorflow.keras.applications.VGG16"
]
] |
ashishpatel26/urban-sound-classification | [
"9f86ade6596a75a5d3f83e33ebe7209cb454ea63"
] | [
"src/utils_2d.py"
] | [
"# basic library imports\nimport glob\nimport os\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom numpy import random\nfrom tqdm import tqdm\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.utils import shuffle\nfrom PIL import Image\nfrom multiprocessing import Poo... | [
[
"numpy.array",
"numpy.log",
"pandas.read_csv",
"numpy.min",
"sklearn.utils.shuffle",
"pandas.DataFrame",
"numpy.max",
"numpy.random.uniform",
"pandas.set_option",
"sklearn.preprocessing.LabelEncoder",
"numpy.random.RandomState",
"numpy.random.randint"
]
] |
sparshpriyadarshi/demucs | [
"7c7f65401db654d750df2b6f4d5b82a0101500b1"
] | [
"demucs/repo.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the\n# LICENSE file in the root directory of this source tree.\n\"\"\"Represents a model repository, including pre-trained models and bags of models.\nA repo can either be the ma... | [
[
"torch.hub.load_state_dict_from_url"
]
] |
philtsmith570/Machine_Learning_A-Z | [
"72fa2795a9d45802aa339347129d168c14aabb8a"
] | [
"Machine Learning A-Z Folder/Part 4 - Clustering/Section 24 - K-Means Clustering/K_Means/data_preprocessing_template.py"
] | [
"# Data Preprocessing Template\n\n# Importing the libraries\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\n# Importing the dataset\ndataset = pd.read_csv('Mall_Customers.csv')\nX = dataset.iloc[:, [3, 4]].values\n#y = dataset.iloc[:, 3].values\n\n# K-Means Clustering using sk-learn\nfr... | [
[
"matplotlib.pyplot.legend",
"pandas.read_csv",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.title",
"sklearn.cluster.KMeans",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
StarGazer1995/FCN-CD-PyTorch | [
"17f33470000a9bab6c5ea98bd3eba38f87868b2f"
] | [
"src/data/common.py"
] | [
"import torch\nimport numpy as np\n\nfrom scipy.io import loadmat\nfrom skimage.io import imread\n\ndef default_loader(path_):\n return imread(path_)\n\ndef mat_loader(path_):\n return loadmat(path_)\n\ndef make_onehot(index_map, n):\n # Only deals with tensors with no batch dim\n old_size = index_map.s... | [
[
"scipy.io.loadmat",
"torch.from_numpy",
"numpy.transpose",
"torch.zeros"
]
] |
Jian137/mmediting-1 | [
"e1ac6c93441ec96696d0b530f040b91b809015b6",
"e1ac6c93441ec96696d0b530f040b91b809015b6",
"e1ac6c93441ec96696d0b530f040b91b809015b6",
"e1ac6c93441ec96696d0b530f040b91b809015b6"
] | [
"tests/test_models/test_restorers/test_glean.py",
"mmedit/models/backbones/sr_backbones/glean_styleganv2.py",
"tests/test_models/test_components/test_discriminators/test_deepfill_disc.py",
"tests/test_models/test_transformer/test_search_transformer.py"
] | [
"# Copyright (c) OpenMMLab. All rights reserved.\nimport mmcv\nimport pytest\nimport torch\n\nfrom mmedit.models import build_model\n\n\ndef test_glean():\n\n model_cfg = dict(\n type='GLEAN',\n generator=dict(\n type='GLEANStyleGANv2',\n in_size=16,\n out_size=64,\... | [
[
"torch.no_grad",
"torch.rand",
"torch.cuda.is_available"
],
[
"numpy.log2",
"torch.cat",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.nn.Flatten",
"torch.nn.Linear",
"torch.nn.LeakyReLU"
],
[
"torch.rand",
"torch.cuda.is_available"
],
[
"torch.ra... |
MochiYoshi/fix_attempt_mplleaflet | [
"a6ffc379d1427bbd9e6905a47bb868afa2850043"
] | [
"mplleaflet/leaflet_renderer.py"
] | [
"from __future__ import absolute_import\n\nfrom functools import partial\n\nfrom jinja2 import Template\nfrom .mplexporter.renderers.base import Renderer\nimport numpy as np\n\nfrom .utils import iter_rings\n\n\nsvg_template = Template(\"\"\"<svg width=\"{{ width|int }}px\" height=\"{{ height|int }}px\" viewBox=\"{... | [
[
"numpy.max",
"numpy.ceil",
"numpy.min"
]
] |
roy860328/VSGM | [
"3ec19f9cf1401cecf45527687936b8fe4167f672",
"3ec19f9cf1401cecf45527687936b8fe4167f672",
"3ec19f9cf1401cecf45527687936b8fe4167f672",
"3ec19f9cf1401cecf45527687936b8fe4167f672"
] | [
"alfworld/agents/semantic_graph/gcn.py",
"alfred/models/eval_moca/eval_semantic.py",
"alfred/models/model/gcn_depth_im.py",
"alfred/models/model/seq2seq_semantic.py"
] | [
"import torch\nimport torch.nn.functional as F\nfrom torch import nn\nfrom torch_geometric.nn import GCNConv\nfrom . import graph_embed\n\n\nclass Net(torch.nn.Module):\n \"\"\"docstring for Net\"\"\"\n def __init__(self, cfg, config=None, PRINT_DEBUG=False):\n super(Net, self).__init__()\n inpu... | [
[
"torch.zeros",
"torch.cat",
"torch.nn.functional.dropout"
],
[
"matplotlib.use",
"torch.multiprocessing.Manager",
"torch.multiprocessing.set_start_method"
],
[
"torch.nn.Dropout",
"numpy.expand_dims",
"torch.nn.LSTM",
"torch.cat",
"torch.nn.functional.cross_entr... |
AutonomousFieldRoboticsLab/jetyak_uav_utils | [
"7926df2cf34b0be2647b62896c98af82ca6f1e53"
] | [
"scripts/nodes/GPS_utils.py"
] | [
"'''\nMIT License\nCopyright (c) 2019 Michail Kalaitzakis\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify... | [
[
"numpy.sqrt",
"numpy.eye",
"numpy.cos",
"numpy.sin",
"numpy.deg2rad",
"numpy.array"
]
] |
IDEBench/IDEBench-public | [
"67339d9b81d0bcbb7b41ce6dc2e55918cf1c498f"
] | [
"workflowgen.py"
] | [
"import random\nimport numpy as np\nimport pprint\nimport json\nfrom workflowgen.vizaction import VizAction\nfrom workflowgen.linkaction import LinkAction\nfrom optparse import OptionParser\nimport pandas as pd\nfrom common.schema import Schema\nfrom common.vizgraph import VizGraph\n#from common.storage import Stor... | [
[
"pandas.read_csv",
"numpy.random.seed"
]
] |
zkdlfrlwl2/Classification-For-Everyone | [
"a99428080ef470a3270d3f4a6048df197216a050",
"a99428080ef470a3270d3f4a6048df197216a050",
"a99428080ef470a3270d3f4a6048df197216a050"
] | [
"models/AlexNet/lightning_model.py",
"models/MNASNet/blocks.py",
"models/WideResNet/models.py"
] | [
"from typing import *\n\nimport torch.nn as nn\nimport torch.optim as optim\n\nfrom models.LitBase import LitBase\n\nfrom .models import AlexNet\n\n\nclass LitAlexNet(LitBase):\n def __init__(self, args: Dict[str, Any]):\n super().__init__()\n self.save_hyperparameters(args)\n self.model = A... | [
[
"torch.nn.CrossEntropyLoss",
"torch.optim.lr_scheduler.ReduceLROnPlateau"
],
[
"torch.nn.Sequential",
"torch.nn.Dropout",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.SiLU",
"torch.nn.Hardsigm... |
ganik/DeepSpeedExamples | [
"174ae3bc8dbb688cfaccb4afa15d6e2cdbe19ce5",
"174ae3bc8dbb688cfaccb4afa15d6e2cdbe19ce5",
"174ae3bc8dbb688cfaccb4afa15d6e2cdbe19ce5"
] | [
"Megatron-LM-v1.1.5-ZeRO3/megatron/initialize.py",
"pipeline_parallelism/alexnet.py",
"MoQ/huggingface-transformers/src/transformers/models/mobilebert/modeling_tf_mobilebert.py"
] | [
"# coding=utf-8\n# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0... | [
[
"torch.distributed.init_process_group",
"numpy.random.seed",
"torch.cuda.set_device",
"torch.manual_seed",
"torch.distributed.is_initialized",
"torch.distributed.barrier",
"torch.cuda.is_available",
"torch.distributed.get_rank",
"torch.cuda.device_count",
"torch.distributed... |
kai-wen-yang/CD-VAE | [
"a33b5070d5d936396d51c8c2e7dedd62351ee5b2",
"a33b5070d5d936396d51c8c2e7dedd62351ee5b2"
] | [
"detection/lib/quilting_fast.py",
"detection/data_loader.py"
] | [
"#!/usr/bin/env python2\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport ctypes\nimport torch\nimport random\nimport numpy\nimport os\n\nimport pkgutil\nif pkgutil.find_loader(\"adversarial\") is not ... | [
[
"torch.LongTensor",
"torch.FloatTensor",
"torch.is_tensor",
"numpy.zeros"
],
[
"torch.utils.data.DataLoader"
]
] |
ycl010203/PARL | [
"5fb7a5d2b5d0f0dac57fdf4acb9e79485c7efa96"
] | [
"examples/tutorials/parl2_dygraph/lesson4/policy_gradient/train.py"
] | [
"# Copyright (c) 2021 PaddlePaddle 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 ... | [
[
"numpy.array",
"numpy.mean"
]
] |
akkefa/bertserini | [
"bc3c8b20c256814dbe87ed7310dd4f2d10f304a0"
] | [
"bertserini/experiments/evaluate.py"
] | [
"import json\nimport argparse\nimport numpy as np\n\nfrom bertserini.utils.utils import choose_best_answer, weighted_score\n\nfrom bertserini.experiments.eval.evaluate_v1 import squad_v1_eval as squad_evaluation\nfrom bertserini.experiments.eval.evaluate_v1_drcd import evaluation as drcd_evaluation\nfrom bertserini... | [
[
"numpy.arange"
]
] |
barentsen/lightkurve | [
"5b1693832bc509e42742d1b6f20224d131e62d8c"
] | [
"lightkurve/collections.py"
] | [
"\"\"\"Defines collections of data products.\"\"\"\nimport logging\nimport warnings\n\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nfrom astropy.table import vstack\n\nfrom . import MPLSTYLE\nfrom .targetpixelfile import TargetPixelFile\n\nlog = logging.getLogger(__name__)\n\n__all__ = ... | [
[
"numpy.unique",
"numpy.asarray",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.style.context",
"numpy.atleast_1d",
"numpy.where"
]
] |
Hao-Kailong/Numerical-Information-Extraction | [
"b67487aabd64ed3852e564a1d14b7a244dcbbc0a"
] | [
"code/Bert/run_squad.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team 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# Unl... | [
[
"tensorflow.contrib.cluster_resolver.TPUClusterResolver",
"tensorflow.logging.warning",
"tensorflow.FixedLenFeature",
"tensorflow.nn.log_softmax",
"tensorflow.gfile.GFile",
"tensorflow.reduce_sum",
"tensorflow.train.init_from_checkpoint",
"tensorflow.gfile.MakeDirs",
"tensorflo... |
Michaelfonzolo/prednet | [
"ae09ebf77ab3b6f0d80faf490bb246972de2ddc2"
] | [
"kitti_extrap_finetune.py"
] | [
"'''\r\nFine-tune PredNet model trained for t+1 prediction for up to t+5 prediction.\r\n'''\r\n\r\nimport os\r\nimport numpy as np\r\nnp.random.seed(123)\r\n\r\nfrom keras import backend as K\r\nfrom keras.models import Model, model_from_json\r\nfrom keras.layers import Input\r\nfrom keras.callbacks import Learning... | [
[
"numpy.random.seed"
]
] |
ankurwasnik/LearnML | [
"6f45ef9c2f04734ee8f6e0e206356a7ee55983d2",
"6f45ef9c2f04734ee8f6e0e206356a7ee55983d2"
] | [
"4. Dimensionality Reduction/pca.py",
"2 Training Simple ML Algorithms for Classification/Adaline.py"
] | [
"import numpy as np\nimport pandas as pd\nimport os\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.decomposition import PCA\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import accuracy_score as accuracy\n#all required libraries are imported\n\n'''Author: Ankur W [L... | [
[
"pandas.read_csv",
"sklearn.linear_model.LogisticRegression",
"sklearn.model_selection.train_test_split",
"sklearn.decomposition.PCA",
"sklearn.metrics.accuracy_score"
],
[
"numpy.dot",
"pandas.read_csv",
"numpy.random.RandomState",
"numpy.where",
"numpy.sum"
]
] |
PierreRochard/pacioli | [
"4a66ed80b1e3408e19d81e0ce7cfa46e477f489e"
] | [
"pacioli/functions/investment_functions.py"
] | [
"import csv\nfrom datetime import datetime, timedelta\n\nfrom matplotlib.finance import fetch_historical_yahoo\nfrom sqlalchemy import inspect\nfrom sqlalchemy.exc import IntegrityError\n\nfrom pacioli import db\nfrom pacioli.views.ofx_views import Securities\nfrom pacioli.models import SecurityPrices\n\n\ndef upda... | [
[
"matplotlib.finance.fetch_historical_yahoo"
]
] |
basiralab/FSSelect | [
"fc1a5706ac681bf6471ad07c67dff16b8647870f",
"fc1a5706ac681bf6471ad07c67dff16b8647870f"
] | [
"helpers/storage.py",
"helpers/simulateData.py"
] | [
"import pandas as pd\nfrom helpers.fs_methods import *\nfrom helpers.training import *\nimport os\n\ndef name_dataframe(X,cv_method):\n n,m=X.shape\n\n name1='df_accuracy_'\n name2='df_ranking_'\n name3='df_weights_'\n added_str='fold.pkl'\n num_splits =cv_method.get_n_splits(X)\n if num_splits... | [
[
"pandas.DataFrame"
],
[
"numpy.diag",
"numpy.triu_indices",
"numpy.set_printoptions",
"numpy.ones",
"numpy.random.normal",
"numpy.append",
"numpy.triu",
"numpy.array",
"numpy.empty"
]
] |
GGarcia93/pycryptobot | [
"74b7d2dcbafd47419d02f179cbdc2d8086399b0f"
] | [
"models/PyCryptoBot.py"
] | [
"import json\nimport math\nimport random\nimport re\nfrom datetime import datetime, timedelta\nfrom typing import Union\n\nimport pandas as pd\nimport urllib3\nfrom urllib3.exceptions import ReadTimeoutError\n\nfrom models.BotConfig import BotConfig\nfrom models.Trading import TechnicalAnalysis\nfrom models.config ... | [
[
"pandas.concat",
"pandas.to_datetime",
"pandas.Series",
"pandas.DataFrame",
"pandas.set_option"
]
] |
ramchandracheke/self-supervised-3d-tasks | [
"dc184d5d29012fafb887402c5bc2ce74e4b0acdf"
] | [
"self_supervised_3d_tasks/data/numpy_3d_loader.py"
] | [
"import os\n\nimport numpy as np\nfrom self_supervised_3d_tasks.data.generator_base import DataGeneratorBase\n\n\nclass DataGeneratorUnlabeled3D(DataGeneratorBase):\n\n def __init__(self, data_path, file_list, batch_size=32, shuffle=True, pre_proc_func=None):\n self.path_to_data = data_path\n\n sup... | [
[
"numpy.load",
"numpy.stack",
"numpy.random.randint"
]
] |
phunc20/rlcomp2020 | [
"c37f8f05cc86d55fca2648bf5491d6a2218c2cad",
"c37f8f05cc86d55fca2648bf5491d6a2218c2cad",
"c37f8f05cc86d55fca2648bf5491d6a2218c2cad",
"c37f8f05cc86d55fca2648bf5491d6a2218c2cad"
] | [
"round01/30_11_dDQN_light_tweak73.py",
"hint/01-theo-BTC/02_DQN-5-cations/02_closest-gold/Miner-Training-Local-CodeSample-Approach1/viz_utils.py",
"round02/02_dQN_6act_debug/22_5channel.py",
"round01/30_11_dDQN_light_tweak22.py"
] | [
"########################################\n# Changes compared to 30_11_dDQN_light_tweak71.py\n# 01. \n# lr_optimizer = 7.3e-4\n########################################\n\n\nimport sys\nimport numpy as np\n#import pandas as pd\nimport datetime\nimport json\nfrom array import *\nimport os\nimport math\nfrom random ... | [
[
"tensorflow.keras.models.clone_model",
"tensorflow.reduce_sum",
"numpy.zeros_like",
"numpy.mean",
"tensorflow.random.set_seed",
"numpy.random.randint",
"tensorflow.keras.layers.Conv2D",
"numpy.stack",
"numpy.argmax",
"tensorflow.keras.layers.Flatten",
"numpy.zeros",
... |
rkj26/mgplvm-pytorch | [
"7d082d92be4d82ae8ab978e774ce83429444c14b",
"7d082d92be4d82ae8ab978e774ce83429444c14b"
] | [
"mgplvm/crossval.py",
"examples/mouse/run_mouse.py"
] | [
"import os\nimport numpy as np\nimport mgplvm\nimport torch\nfrom mgplvm import kernels, rdist\nfrom mgplvm.manifolds import Torus, Euclid, So3\nfrom mgplvm.models import Core\nfrom mgplvm.training import train\nimport matplotlib.pyplot as plt\nimport pickle\nfrom scipy.stats import ttest_1samp\ntorch.set_default_d... | [
[
"torch.nn.Parameter",
"torch.load",
"torch.set_default_dtype",
"numpy.arange",
"torch.cuda.empty_cache",
"numpy.ones",
"numpy.std",
"numpy.var",
"torch.get_default_dtype",
"numpy.zeros"
],
[
"numpy.sqrt",
"numpy.random.seed",
"torch.set_default_dtype",
"... |
JanAlexanderZak/ml_cheatsheet | [
"92eef8c5a5c475fce956154a9169c60da61e5199"
] | [
"src/deep_learning/matrix_geometric_interpretation.py"
] | [
"import matplotlib.pyplot as plt\n\na = (0, 0, 0.5, 1)\nb = (0, 0, 1, 0.25)\narrow_a = plt.arrow(a[0], a[1], a[2], a[3])\narrow_b = plt.arrow(b[0], b[1], b[2], b[3])\nresult = plt.arrow(\n a[0] + b[0],\n a[1] + b[1],\n a[2] + b[2],\n a[3] + b[3],\n ec='green',\n head_width=0.02, )\nplt.legend([res... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.show",
"matplotlib.pyplot.arrow"
]
] |
LaudateCorpus1/benchmark | [
"2a8528f91dfbbd880e514b4deefa692a48c32af8",
"2a8528f91dfbbd880e514b4deefa692a48c32af8",
"2a8528f91dfbbd880e514b4deefa692a48c32af8"
] | [
"torchbenchmark/models/dcgan/__init__.py",
"torchbenchmark/util/framework/timm/timm_config.py",
"torchbenchmark/models/pyhpc_isoneutral_mixing/__init__.py"
] | [
"# Ported from pytorch example:\n# https://github.com/pytorch/examples/blob/master/dcgan/main.py\n\n\nfrom __future__ import print_function\nimport argparse\nimport os\nimport random\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.optim as optim\n... | [
[
"torch.jit.trace",
"torch.nn.ConvTranspose2d",
"torch.full",
"torch.nn.init.constant_",
"torch.randn",
"torch.nn.Conv2d",
"torch.nn.BCELoss",
"torch.nn.Tanh",
"torch.nn.Sigmoid",
"torch.nn.init.normal_",
"torch.nn.LeakyReLU",
"torch.nn.BatchNorm2d",
"torch.nn.Re... |
ZaneZh/IsaacGymEnvs | [
"adc20a5fbd70d77a716fefe86eb947f83d3efbd2",
"adc20a5fbd70d77a716fefe86eb947f83d3efbd2",
"adc20a5fbd70d77a716fefe86eb947f83d3efbd2",
"adc20a5fbd70d77a716fefe86eb947f83d3efbd2"
] | [
"isaacgymenvs/rl_games/algos_torch/models.py",
"isaacgymenvs/rl_games/algos_torch/moving_mean_std.py",
"isaacgymenvs/learning/amp_players.py",
"isaacgymenvs/rl_games/algos_torch/sac_helper.py"
] | [
"import rl_games.algos_torch.layers\nimport numpy as np\nimport torch.nn as nn\nimport torch\nimport torch.nn.functional as F\nimport rl_games.common.divergence as divergence\nfrom rl_games.algos_torch.torch_ext import CategoricalMasked\nfrom torch.distributions import Categorical\nfrom rl_games.algos_torch.sac_hel... | [
[
"numpy.log",
"torch.nn.Module.__init__",
"torch.squeeze",
"torch.exp",
"torch.distributions.Categorical",
"torch.split",
"torch.stack",
"torch.distributions.Normal"
],
[
"torch.clamp",
"torch.ones",
"torch.zeros"
],
[
"torch.exp",
"torch.no_grad",
"t... |
danielefdf/nene | [
"889f2fe88f5fea738a3a6ffa89a33c8d5dec8f97"
] | [
"src/datasetxy.py"
] | [
"# -*- coding: utf-8 -*-\r\n\r\nfrom enum import Enum\r\n\r\nimport numpy as np\r\n\r\n\r\nclass DatasetXY:\r\n\r\n class XType(Enum):\r\n ALL = 1 # all points of the plane\r\n RANDOM = 2 # random (gaussian distribution) selected points\r\n\r\n def __init__(self, t, x_lims, groups, traing_d... | [
[
"numpy.array",
"numpy.random.randint"
]
] |
mintzer/pupillometry-rf-back | [
"cfa86fa984a49dce0123798f8de5b838c02e10d5",
"cfa86fa984a49dce0123798f8de5b838c02e10d5",
"cfa86fa984a49dce0123798f8de5b838c02e10d5",
"3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9",
"cfa86fa984a49dce0123798f8de5b838c02e10d5",
"cfa86fa984a49dce0123798f8de5b838c02e10d5",
"cfa86fa984a49dce0123798f8de5b838c02e10d... | [
"venv/Lib/site-packages/psychopy/demos/coder/stimuli/clockface.py",
"venv/Lib/site-packages/psychopy/sound/audioclip.py",
"venv/Lib/site-packages/psychopy/visual/noise.py",
"venv/Lib/site-packages/moviepy/video/compositing/CompositeVideoClip.py",
"venv/Lib/site-packages/psychopy/tests/test_all_visual/test_c... | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nDemo of using ShapeStim to make a functioning visual clock.\n\"\"\"\n\nfrom __future__ import division\n\nfrom psychopy import visual, core, event\nimport numpy, time\nwin = visual.Window([800, 800], monitor='testMonitor')\n\n# vertices (using numpy means w... | [
[
"numpy.array",
"numpy.floor"
],
[
"numpy.square",
"numpy.asarray",
"numpy.tile",
"numpy.atleast_2d",
"numpy.float32",
"numpy.sum",
"numpy.vstack"
],
[
"numpy.fft.fft2",
"numpy.array",
"numpy.log",
"numpy.fft.ifft2",
"numpy.multiply",
"numpy.clip"... |
lidija-jovanovska/HAMR-2020 | [
"795bb3c467fbcd7a26ca3a26ac26791e7cccb1ae"
] | [
"generate_progressions.py"
] | [
"import networkx as nx\r\nimport numpy as np\r\nfrom cdlib import algorithms\r\n\r\n\r\ndef random_walk(chord_graph, start_chord=None, progression_length=4):\r\n chord_path = []\r\n current_chord = start_chord\r\n\r\n if current_chord == None:\r\n pagerank = list(nx.get_node_attributes(chord_graph, ... | [
[
"numpy.random.uniform",
"numpy.array",
"numpy.random.choice"
]
] |
sfiligoi/scikit-bio | [
"e5f18fa33c8e834283de85faac30836793ebefd7"
] | [
"skbio/stats/distance/_base.py"
] | [
"# ----------------------------------------------------------------------------\n# Copyright (c) 2013--, scikit-bio development team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed with this software.\n# ---------------------------------... | [
[
"numpy.hstack",
"pandas.concat",
"pandas.Series",
"numpy.array_equal",
"numpy.triu_indices",
"numpy.unique",
"numpy.arange",
"numpy.asarray",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"pandas.Index",
"numpy.random.permutation",
"matplotlib.pyplot.close",... |
sujitpal/sherpa | [
"95cda5a3d150e19b6038c445352454e1ebbdc45e"
] | [
"scripts/submissions_over_time.py"
] | [
"# Run from Django shell (python manage.py shell) using following call.\n# >>> exec(open(\"scripts/submissions_over_time.py\").read())\n\nimport datetime\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nfrom apps.models import Paper\n\nCFP_OPEN_DATE = datetime.date(2021, 4, 1)\nCFP_CLOSE_DATE = datetime.date... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.ylabel"
]
] |
LEOCUIZHIHAO/kpmask | [
"73fe907b2359b7ddc2927cd325bbbb686eb62ffd"
] | [
"mmdet/models/detectors/base.py"
] | [
"from abc import ABCMeta, abstractmethod\nfrom collections import OrderedDict\n\nimport mmcv\nimport numpy as np\nimport torch\nimport torch.distributed as dist\nimport torch.nn as nn\nfrom mmcv.utils import print_log\n\nfrom mmdet.core import auto_fp16\nfrom mmdet.utils import get_root_logger\n\n\nclass BaseDetect... | [
[
"numpy.random.seed",
"torch.distributed.is_initialized",
"numpy.full",
"numpy.concatenate",
"torch.distributed.is_available",
"torch.distributed.get_world_size",
"numpy.where",
"numpy.vstack",
"numpy.random.randint"
]
] |
KAUST-NetLab/AirDL | [
"f63285117a081681b4aa0e2ac6cf16c0bb270f48"
] | [
"demos/model/traffic.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nimport numpy as np\nimport pandas as pd\n\nimport torch.optim as optim\n\nimport torchvision\nfrom torchvision import transforms\nfrom torch.optim.lr_scheduler import StepLR\n\nimport random\n\n\nimport ns.distributedml as dml\nimport time\n\n... | [
[
"pandas.concat",
"pandas.read_csv",
"torch.nn.LSTM",
"torch.cat",
"torch.zeros",
"torch.utils.data.DataLoader",
"torch.from_numpy",
"torch.sum",
"torch.nn.Linear",
"torch.no_grad",
"torch.nn.MSELoss",
"torch.optim.lr_scheduler.StepLR"
]
] |
slavesocieties/ssda-nlp | [
"8764d2f928ca0fe4e5737fbea4dcd518b8b804f6"
] | [
"ssda_nlp/model_performance_utils.py"
] | [
"# AUTOGENERATED! DO NOT EDIT! File to edit: 42-initial-model.ipynb (unless otherwise specified).\n\n__all__ = ['model_meta_training', 'get_ner_df', 'get_corrects_df', 'get_fns_df', 'get_fps_df']\n\n# Cell\n#export\n#data structure imports\nimport pandas as pd\nimport numpy as np\n\n#python imports\nimport random\n... | [
[
"pandas.merge",
"pandas.concat",
"pandas.DataFrame"
]
] |
B-C-WANG/ReinforcementLearningInAutoPilot | [
"8d3c0b81e3db2fb4be0e52e25b700c54f5e569dc"
] | [
"src/ReinforcementLearning/train/archive_bad/ddpg_train_waypoints_GAL_v1.py"
] | [
"# coding:utf-8\n# Type: Private Author: BaoChuan Wang\n\n\n\n'''\nFIXME ddpg 需要全为负的reward,waypoints环境暂时没有提供!\n\n描述:\n和local模型相同,训练得不到较好的结果\n\n'''\n\nimport numpy as np\nfrom ReinforcementLearning.Modules.Agents.DDPG_Agent import DDPG_Agent_GAL_v1\nfrom ReinforcementLearning.Modules.Environments.Environments_waypoi... | [
[
"numpy.random.seed",
"tensorflow.random.set_random_seed",
"numpy.random.randint"
]
] |
mokochin/detectron2 | [
"64b3f71df890fc4f9da8be1dbfb636bd90f59873"
] | [
"detectron2/modeling/backbone/shufflenet_oringin2.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom collections import OrderedDict\nfrom torch.nn import init\nimport math\n\n\ndef conv_bn(inp, oup, stride):\n return nn.Sequential(\n nn.Conv2d(inp, oup, 3, stride, 1, bias=False),\n nn.B... | [
[
"torch.nn.Sequential",
"torch.transpose",
"torch.cat",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.Linear",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
DinghaiZ/fastai2 | [
"7b5dd5e4e12a6f31c69bbeec0235103915beec2a"
] | [
"fastai2/vision/augment.py"
] | [
"# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/09_vision.augment.ipynb (unless otherwise specified).\n\n__all__ = ['RandTransform', 'TensorTypes', 'FlipItem', 'DihedralItem', 'PadMode', 'CropPad', 'RandomCrop',\n 'OldRandomCrop', 'ResizeMethod', 'Resize', 'RandomResizedCrop', 'AffineCoordTfm', 'RandomRe... | [
[
"torch.stack",
"torch.zeros_like",
"torch.ones_like"
]
] |
telesto-ai/telesto-base | [
"6ce673d30212f060a6778d1bf3b3d3fadc8ef738"
] | [
"telesto/utils.py"
] | [
"from dataclasses import dataclass\nfrom typing import Dict, List, Tuple\nimport base64\nimport io\n\nimport PIL.Image\nimport numpy as np\n\n\n@dataclass\nclass BBox:\n \"\"\"Bounding box dataclass.\n\n (x1, y1) - top left corner, (x2, y2) - bottom right one\n \"\"\"\n\n x1: int\n y1: int\n x2: i... | [
[
"numpy.asarray"
]
] |
nholtz/structural-analysis | [
"246d6358355bd9768e30075d1f6af282ceb995be"
] | [
"matrix-methods/frame2d/Frame2D/NodeLoads.py"
] | [
"## Compiled from NodeLoads.ipynb on Sun Dec 10 12:51:11 2017\n## DO NOT EDIT THIS FILE. YOUR CHANGES WILL BE LOST!!\n\n## In [1]:\nimport numpy as np\nfrom salib import extend\n\n## In [9]:\nclass NodeLoad(object):\n \n def __init__(self,fx=0.,fy=0.,mz=0.):\n if np.isscalar(fx):\n self.forc... | [
[
"numpy.matrix",
"numpy.array",
"numpy.isscalar"
]
] |
akhilesh1311/Graph_Peeling | [
"cf4bcf74d894b91c4ce3402d593cbb683d5b46b4"
] | [
"degree.py"
] | [
"#!/usr/bin/python2.7\n\nimport os\n# from graph_tool.all import *\nimport bisect\nimport matplotlib.pyplot as plt\n\n# edge = 28280084\nnode = 1559667\n# node = 13\n\nsize, md, d = 0, 0, 0\ngraph = [[] for x in xrange(node)]\nvertices = [0]*node\ndeg = [0]*node\nwith open(\"/home/akhil/Documents/hadoop_project/gra... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.axis"
]
] |
wephy/project-euler | [
"cc4824478282d3e1514a1bf7a1821b938db5bfcb"
] | [
"python/p066.py"
] | [
"# Diophantine equation\n\nimport numpy as np\nfrom fractions import Fraction\n\nLIMIT = 1000\n\n\ndef solve():\n def minimal_solution(D):\n if np.sqrt(D) % 1 == 0:\n return 0\n\n a0 = int(np.floor(np.sqrt(D)))\n a = a0\n m = 0\n d = 1\n\n n = Fraction(0, 1)\n... | [
[
"numpy.sqrt",
"numpy.floor"
]
] |
jdkent/pybids | [
"1431df11a7748848f6c4170f19211321ab0c4b9f"
] | [
"bids/variables/io.py"
] | [
"from os.path import join\nimport warnings\nimport json\n\nimport numpy as np\nimport pandas as pd\n\nfrom bids.utils import listify\nfrom .entities import NodeIndex\nfrom .variables import SparseRunVariable, DenseRunVariable, SimpleVariable\n\n\nBASE_ENTITIES = ['subject', 'session', 'task', 'run']\nALL_ENTITIES =... | [
[
"pandas.concat",
"pandas.read_csv",
"pandas.DataFrame",
"numpy.floor",
"pandas.DataFrame.from_records",
"numpy.zeros"
]
] |
xiangsheng1325/GraphGenerator | [
"0164c7c1ba14fface015425a619053585f471ef3"
] | [
"GraphGenerator/models/bigg_ops/tensor_ops.py"
] | [
"# coding=utf-8\n# Copyright 2020 The Google Research Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"torch.sin",
"torch.randn",
"torch.sum",
"torch.tensor",
"torch.no_grad"
]
] |
mihdalal/raps | [
"4818769adc7496f60f819c875a9995950bd5ed19",
"4818769adc7496f60f819c875a9995950bd5ed19"
] | [
"rlkit/rlkit/data_management/obs_dict_replay_buffer.py",
"d4rl/d4rl/pointmaze/maze_model.py"
] | [
"import numpy as np\nfrom gym.spaces import Dict, Discrete\n\nfrom rlkit.data_management.replay_buffer import ReplayBuffer\n\n\nclass ObsDictRelabelingBuffer(ReplayBuffer):\n \"\"\"\n Replay buffer for environments whose observations are dictionaries, such as\n - OpenAI Gym GoalEnv environments.\n ... | [
[
"numpy.random.random",
"numpy.asarray",
"numpy.uint8",
"numpy.eye",
"numpy.arange",
"numpy.ones",
"numpy.float64",
"numpy.array",
"numpy.zeros",
"numpy.random.randint"
],
[
"numpy.clip",
"numpy.linalg.norm",
"numpy.concatenate",
"numpy.array",
"numpy... |
gear/lab | [
"ad1c5838acbcc98abb5d5d93d5c7a6c2b74bdfa2"
] | [
"lab/logger/indicators.py"
] | [
"from collections import deque\nfrom typing import Dict, Optional\n\nimport numpy as np\n\ntry:\n import torch\nexcept ImportError:\n torch = None\n\n\ndef _to_numpy(value):\n type_ = type(value)\n\n if type_ == float or type_ == int:\n return value\n\n if type_ == np.ndarray:\n return ... | [
[
"numpy.mean"
]
] |
ascendancy09/CoSpar | [
"791b320e4f7722d7fc3a61c5ff7d45f23db7af91",
"791b320e4f7722d7fc3a61c5ff7d45f23db7af91"
] | [
"cospar/tmap/map_reconstruction.py",
"cospar/help_functions/_help_functions_CoSpar.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport numpy as np\nimport os\nimport pandas as pd\nimport time\nimport scanpy as sc\nimport scipy.sparse as ssp \n\nfrom .. import help_functions as hf\nfrom .. import plotting as CSpl\nfrom .optimal_transport import *\nfrom .. import settings\nfrom .. import logging as logg\n\n\n######... | [
[
"numpy.in1d",
"scipy.sparse.load_npz",
"numpy.cumsum",
"numpy.max",
"numpy.mean",
"scipy.sparse.issparse",
"numpy.save",
"numpy.diff",
"numpy.load",
"numpy.zeros",
"numpy.nonzero",
"pandas.Categorical",
"scipy.sparse.csr_matrix",
"numpy.argsort",
"scipy.... |
sudarshan85/task_utils | [
"d79467293ca43ba93c95415d3d4ef25199bd5bea"
] | [
"metrics.py"
] | [
"#!/usr/bin/env python\n\nimport numpy as np\nimport pandas as pd\npd.set_option('display.max_colwidth', -1)\n\nfrom functools import partial\nfrom typing import List\nfrom sklearn.metrics import confusion_matrix, roc_auc_score, precision_score, f1_score, recall_score\nfrom scipy import stats\n\ndef _mean_confidenc... | [
[
"numpy.diag",
"sklearn.metrics.roc_auc_score",
"sklearn.metrics.recall_score",
"sklearn.metrics.precision_score",
"sklearn.metrics.confusion_matrix",
"scipy.stats.t.ppf",
"numpy.round",
"numpy.mean",
"sklearn.metrics.f1_score",
"pandas.set_option",
"scipy.stats.sem",
... |
joshcarty/dgl | [
"4464b9734c1061bd84325a54883c5046031def37",
"4464b9734c1061bd84325a54883c5046031def37",
"4464b9734c1061bd84325a54883c5046031def37"
] | [
"benchmarks/benchmarks/model_speed/bench_gat.py",
"tests/compute/test_heterograph.py",
"examples/pytorch/GATNE-T/src/utils.py"
] | [
"import time\nimport dgl\nfrom dgl.nn.pytorch import GATConv\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom .. import utils\n\nclass GAT(nn.Module):\n def __init__(self,\n num_layers,\n in_dim,\n num_hidden,\n num_clas... | [
[
"torch.nn.CrossEntropyLoss",
"torch.nn.ModuleList"
],
[
"scipy.sparse.coo_matrix",
"numpy.arange",
"scipy.sparse.rand",
"numpy.ones",
"numpy.array",
"numpy.zeros"
],
[
"sklearn.metrics.roc_auc_score",
"numpy.dot",
"torch.multiprocessing.Queue",
"numpy.linalg... |
m-wessler/nbm-pqpf-deploy | [
"ccc7a95d1e1cf7b264fafdc0da2bc1a2bc86f839"
] | [
"scraps/scripts_all/nbm_archive_updater.py"
] | [
"import shutil\nimport shlex\nimport subprocess\nimport sys, os, gc\nimport numpy as np\nimport xarray as xr\nimport pandas as pd\nimport multiprocessing as mp\n\nfrom glob import glob\nfrom io import StringIO\nfrom datetime import datetime, timedelta\n\ncore_limit = 8\n\nnbm_dir = '/scratch/general/lustre/u1070830... | [
[
"pandas.to_datetime",
"numpy.arange",
"numpy.datetime64",
"pandas.date_range",
"numpy.array",
"numpy.where"
]
] |
zhoufengfan/MMT-plus | [
"e95db1452d3480518a851dd7ffa07208522f2614"
] | [
"visda/sda/models/networks.py"
] | [
"import torch\nimport torch.nn as nn\nfrom torch.nn import init\nfrom torch.nn import utils\nimport torch.nn.functional as F\nimport functools\nfrom torch.optim import lr_scheduler\n\n\n###############################################################################\n# Helper Functions\n#############################... | [
[
"torch.mean",
"torch.optim.lr_scheduler.LambdaLR",
"torch.optim.lr_scheduler.CosineAnnealingLR",
"torch.cat",
"torch.sum",
"torch.nn.Embedding",
"torch.cuda.is_available",
"torch.nn.ReplicationPad2d",
"torch.nn.Dropout",
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"to... |
kimdonggyun/OCEANpy | [
"afab9867eaad1ae56e70beaca4463493f4ee2efb",
"afab9867eaad1ae56e70beaca4463493f4ee2efb"
] | [
"scripts/graphcre.py",
"scripts/data_export_func.py"
] | [
"# any functions for plots\n\nfrom matplotlib import pyplot as plt\nfrom mpl_toolkits.axes_grid1.inset_locator import inset_axes\nfrom matplotlib import dates as mdates\nfrom matplotlib.ticker import FormatStrFormatter\nimport numpy as np\nimport pandas as pd\nfrom pathlib import Path\nimport glob, os\nimport datet... | [
[
"matplotlib.pyplot.gca",
"matplotlib.dates.DateFormatter",
"matplotlib.dates.MinuteLocator",
"matplotlib.pyplot.title",
"numpy.asarray",
"numpy.arange",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.close",
"matplotlib.ticker.FormatStrFormatt... |
mahnooranjum/Programming_DataScience | [
"f7a4215d4615b3f8460c3a1944a585628cf6930d",
"f7a4215d4615b3f8460c3a1944a585628cf6930d",
"f7a4215d4615b3f8460c3a1944a585628cf6930d"
] | [
"DataGeneration_DataScience/G6_XXC_circle.py",
"MachineLearningPyFiles_DataScience/demo33_adaboostclassificationspamdetection.py",
"FeatureEngineeringPy_DataScience/demo153_rarecategories.py"
] | [
"from sklearn.datasets.samples_generator import make_moons\nfrom sklearn.datasets.samples_generator import make_circles\nfrom sklearn.datasets.samples_generator import make_blobs\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport numpy as np\n\n\n###### CIRCLES #########\n# generate 2d classification dat... | [
[
"sklearn.datasets.samples_generator.make_circles",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots",
"pandas.DataFrame"
],
[
"pandas.read_csv",
"sklearn.metrics.recall_score",
"sklearn.metrics.precision_score",
"sklearn.metrics.confusion_matrix",
"sklearn.model_select... |
thatch/mlflow-extend | [
"08cf76db3ba787f396b922d27877db43c2881a91"
] | [
"mlflow_extend/logging.py"
] | [
"import json\nimport os\nimport pickle\nimport tempfile\nfrom contextlib import contextmanager\nfrom typing import Any, Generator, Optional, Union\n\nimport mlflow\nimport numpy as np\nimport pandas as pd\nimport plotly\nimport yaml\nfrom matplotlib import pyplot as plt\nfrom plotly import graph_objects as go\n\nfr... | [
[
"matplotlib.pyplot.close",
"numpy.save"
]
] |
evil-panda-team/photohack_v2 | [
"be47765f61772a68b646f3b7ecb4db1483b9907a"
] | [
"icface/run.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Jun 22 16:54:36 2019\n\n@author: kenny\n\"\"\"\nimport sys\nsys.path.insert(0, './icface')\n\n#from imutils.face_utils import FaceAligner\nfrom imutils.face_utils import rect_to_bb\nimport imutils\nimport dlib\nimport cv2\nimport numpy as np\n... | [
[
"numpy.asarray",
"numpy.int"
]
] |
Shigangli/tf-models | [
"9817cf0c087e4d7a3c7439789c5ff05388493347"
] | [
"official/resnet/cifar10_main.py"
] | [
"# Copyright 2017 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.image.resize_image_with_crop_or_pad",
"tensorflow.transpose",
"tensorflow.image.random_flip_left_right",
"tensorflow.decode_raw",
"tensorflow.reshape",
"tensorflow.cast",
"tensorflow.expand_dims",
"tensorflow.data.FixedLengthRecordDataset",
"tensorflow.random_crop",... |
songlinhou/pytools | [
"b990672fd9287da4fe57350bed28958ac261df81"
] | [
"statslib.py"
] | [
"import scipy.stats as st\nimport numpy as np\nimport pandas as pd\n\nclass CI:\n def one_proportion(self, n, phat, conf):\n z_val = st.norm.ppf(1 - (1 - conf) / 2) # this is two-side\n # z_val = st.norm.ppf(1 - (1 - conf)) # this is one-side\n se = np.sqrt(phat*(1-phat)/n)\n print('z... | [
[
"scipy.stats.norm.ppf",
"numpy.sqrt",
"scipy.stats.norm.cdf",
"numpy.min",
"numpy.multiply",
"scipy.stats.t.ppf",
"scipy.stats.t.cdf",
"scipy.stats.chi2.cdf",
"numpy.sum"
]
] |
jainsee24/Automatic-Number-Plate-Recognition | [
"2fd2a4545fc310cc22b9df9fb51135953fb86cfb"
] | [
"tensorflow_yolov4_tflite/detect_video.py"
] | [
"import time\r\nimport tensorflow as tf\r\nphysical_devices = tf.config.experimental.list_physical_devices('GPU')\r\nif len(physical_devices) > 0:\r\n tf.config.experimental.set_memory_growth(physical_devices[0], True)\r\nfrom absl import app, flags, logging\r\nfrom absl.flags import FLAGS\r\nimport core.utils a... | [
[
"tensorflow.compat.v1.ConfigProto",
"tensorflow.constant",
"tensorflow.saved_model.load",
"tensorflow.config.experimental.set_memory_growth",
"numpy.asarray",
"tensorflow.lite.Interpreter",
"tensorflow.config.experimental.list_physical_devices",
"tensorflow.shape",
"tensorflow.... |
dingmyu/mmdetection | [
"705dc91ca43ea62f4f69355a81271d5bd81268ca"
] | [
"old_version/mmdet_apis_env_7ef08d32c0e2f8585b07423c9e027338ca16486f.py"
] | [
"import logging\nimport os\nimport random\nimport subprocess\n\nimport numpy as np\nimport torch\nimport torch.distributed as dist\nimport torch.multiprocessing as mp\nfrom mmcv.runner import get_dist_info\n\n\ndef init_dist(launcher, backend='nccl', **kwargs):\n if mp.get_start_method(allow_none=True) is None:\... | [
[
"torch.multiprocessing.set_start_method",
"torch.distributed.init_process_group",
"numpy.random.seed",
"torch.cuda.set_device",
"torch.manual_seed",
"torch.multiprocessing.get_start_method",
"torch.cuda.manual_seed_all",
"torch.cuda.device_count"
]
] |
jhnnsrs/xarray-multiscale | [
"cb4e08bc21db9cfaae5aa096683c91d40acd79c0"
] | [
"src/xarray_multiscale/reducers.py"
] | [
"from typing import Any, Sequence, Tuple, cast, TypeVar, Dict\nfrom scipy.stats import mode\nfrom numpy.typing import NDArray\n\n\ndef windowed_mean(\n array: NDArray[Any], window_size: Tuple[int, ...], **kwargs: Dict[Any, Any]\n) -> NDArray[Any]:\n \"\"\"\n Compute the windowed mean of an array.\n \"\"... | [
[
"scipy.stats.mode"
]
] |
ENOT-AutoDL/onnx2torch | [
"2391987b3349bed1670ac3c1bc9062a37323abe3"
] | [
"onnx2torch/node_converters/cumsum.py"
] | [
"from copy import deepcopy\n\nimport torch\nfrom torch import nn\n\nfrom onnx2torch.node_converters.registry import add_converter\nfrom onnx2torch.onnx_graph import OnnxGraph\nfrom onnx2torch.onnx_node import OnnxNode\nfrom onnx2torch.utils.common import OnnxToTorchModule\nfrom onnx2torch.utils.common import Operat... | [
[
"torch.reshape",
"torch.zeros_like",
"torch.scatter",
"torch.arange",
"torch.flip",
"torch.cumsum"
]
] |
JuanDavidPiscoJaimes/DeepLearningClassifier | [
"7ba3b022498e5d2ce0a3cfc3987f11415763312f"
] | [
"train.py"
] | [
"import numpy as np\nimport torch\nfrom torch import nn, optim\nfrom torchvision import datasets, transforms, models\nimport argparse\n\nresnet50 = models.resnet50(pretrained=True)\nalexnet = models.alexnet(pretrained=True)\nvgg16 = models.vgg16(pretrained=True)\n\nmodels = {'resnet': resnet50, 'alexnet': alexnet, ... | [
[
"torch.nn.NLLLoss",
"torch.nn.Dropout",
"torch.nn.LogSoftmax",
"torch.utils.data.DataLoader",
"torch.exp",
"torch.nn.Linear",
"torch.no_grad",
"torch.nn.ReLU",
"torch.save"
]
] |
seanjunheng2/PlasmaPy | [
"6df9583cc47375687a07300c0aa11ba31634d770",
"7b4e4aaf8b03d88b654456bca881329ade09e377",
"7b4e4aaf8b03d88b654456bca881329ade09e377"
] | [
"plasmapy/formulary/tests/test_magnetostatics.py",
"plasmapy/formulary/radiation.py",
"plasmapy/formulary/quantum.py"
] | [
"import numpy as np\nimport pytest\n\nfrom astropy import constants\nfrom astropy import units as u\n\nfrom plasmapy.formulary.magnetostatics import (\n CircularWire,\n FiniteStraightWire,\n GeneralWire,\n InfiniteStraightWire,\n MagneticDipole,\n)\n\nmu0_4pi = constants.mu0 / 4 / np.pi\n\n\nclass Te... | [
[
"numpy.array",
"numpy.sqrt",
"numpy.isclose"
],
[
"numpy.max",
"numpy.sqrt",
"scipy.special.exp1",
"numpy.min"
],
[
"numpy.log",
"numpy.sqrt",
"numpy.abs",
"numpy.ones",
"numpy.any",
"numpy.array"
]
] |
qpython-android/QPypi-numpy | [
"4e5fa5c2e01bb6250537fe44f426f878a240bcc7"
] | [
"numpy/core/tests/test_umath.py"
] | [
"from numpy.testing import *\nimport numpy.core.umath as ncu\nimport numpy as np\n\nclass TestDivision(TestCase):\n def test_division_int(self):\n # int division should return the floor of the result, a la Python\n x = np.array([5, 10, 90, 100, -5, -10, -90, -100, -120])\n assert_equal(x / 1... | [
[
"numpy.exp2",
"numpy.minimum",
"numpy.arctanh",
"numpy.arctan",
"numpy.core.umath.minimum",
"numpy.core.umath.log",
"numpy.asarray",
"numpy.ndarray.__new__",
"numpy.fmin.reduce",
"numpy.all",
"numpy.fmax.reduce",
"numpy.csingle",
"numpy.core.umath.expm1",
"n... |
jjhenkel/dockerizeme | [
"eaa4fe5366f6b9adf74399eab01c712cacaeb279",
"eaa4fe5366f6b9adf74399eab01c712cacaeb279",
"eaa4fe5366f6b9adf74399eab01c712cacaeb279",
"eaa4fe5366f6b9adf74399eab01c712cacaeb279",
"eaa4fe5366f6b9adf74399eab01c712cacaeb279"
] | [
"hard-gists/2f1b9a255993bf9b2629/snippet.py",
"hard-gists/3fdd80a08808bd275142d46863e92d68/snippet.py",
"hard-gists/d97eb37da84ce7329de6/snippet.py",
"hard-gists/8663d3bbfd586bffecf6a0094cd116f2/snippet.py",
"hard-gists/e37a85fb0258b045c005ca3db9cbc7f6/snippet.py"
] | [
"import PIL.Image\nfrom cStringIO import StringIO\nimport IPython.display\nimport numpy as np\ndef showarray(a, fmt='png'):\n a = np.uint8(a)\n f = StringIO()\n PIL.Image.fromarray(a).save(f, fmt)\n IPython.display.display(IPython.display.Image(data=f.getvalue()))",
"#!/usr/bin/env python\nfrom __futu... | [
[
"numpy.uint8"
],
[
"numpy.random.multinomial",
"numpy.log",
"numpy.exp"
],
[
"numpy.zeros"
],
[
"tensorflow.train.RMSPropOptimizer",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.placeholder",
"tensorflow.contrib.slim.fully_connected",
"tensorflow.... |
wangyuyue/oneflow | [
"0a71c22fe8355392acc8dc0e301589faee4c4832",
"0a71c22fe8355392acc8dc0e301589faee4c4832",
"0a71c22fe8355392acc8dc0e301589faee4c4832",
"0a71c22fe8355392acc8dc0e301589faee4c4832",
"0a71c22fe8355392acc8dc0e301589faee4c4832",
"0a71c22fe8355392acc8dc0e301589faee4c4832",
"0a71c22fe8355392acc8dc0e301589faee4c483... | [
"python/oneflow/compatible/single_client/test/ops/test_mseloss.py",
"python/oneflow/compatible/single_client/test/ops/test_hardsigmoid.py",
"python/oneflow/compatible/single_client/test/xrt/test_reshape_like.py",
"python/oneflow/compatible/single_client/test/xrt/test_layer_norm_param_grad.py",
"python/onefl... | [
"\"\"\"\nCopyright 2020 The OneFlow Authors. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by ap... | [
[
"numpy.square",
"numpy.random.random",
"numpy.allclose",
"numpy.mean",
"numpy.sum"
],
[
"numpy.allclose",
"numpy.reshape",
"numpy.zeros_like",
"numpy.random.randn",
"numpy.random.uniform",
"numpy.array",
"numpy.zeros"
],
[
"numpy.random.random",
"num... |
cclauss/loss-landscape | [
"35a4c9bcabdefdcaf1e3d7266da878205bfca2a0"
] | [
"dataloader.py"
] | [
"import torch\nimport torchvision\nfrom torchvision import transforms\nimport os\nimport numpy as np\nimport argparse\n\ndef get_relative_path(file):\n script_dir = os.path.dirname(__file__) # <-- absolute dir the script is in\n return os.path.join(script_dir, file)\n\n\ndef load_dataset(dataset='cifar10', d... | [
[
"torch.utils.data.sampler.SubsetRandomSampler",
"torch.utils.data.DataLoader",
"torch.load"
]
] |
tarasowski/machine-learning-plagiarism-detector | [
"d499883af3a8968e1f96d730dfd3b4dfe1d1d50f"
] | [
"get_predictions.py"
] | [
"import boto3\nimport pandas as pd\nimport numpy as np\nimport os\nimport pickle\nfrom sklearn.metrics import accuracy_score\nimport json\n\nclient = boto3.client('sagemaker-runtime')\n\nENDPOINT_NAME = os.environ.get('ENDPOINT_NAME') \nCONTENT_TYPE = 'application/python-pickle'\n\ntest_data = pd.read_csv('./models... | [
[
"pandas.read_csv",
"sklearn.metrics.accuracy_score"
]
] |
nathanbraun/BAP | [
"0aa549dd1da4c4cb545d8929197684aaad77739e"
] | [
"code/Chp2/problem5.py"
] | [
"\"\"\"\nModify the tips example to make it robust to outliers. Try with one shared for\nall groups and also with one per group. Run posterior predictive checks to\nassess these three models.\n\"\"\"\nimport pandas as pd\nimport random\nfrom pandas import DataFrame, Series\nimport matplotlib.pyplot as plt\nimport a... | [
[
"pandas.read_csv",
"numpy.unique",
"pandas.Categorical",
"pandas.DataFrame",
"matplotlib.pyplot.xlim"
]
] |
Diyago/ML-DL-scripts | [
"eeb5c3c7c5841eb4cdb272690e14d6718f3685b2",
"eeb5c3c7c5841eb4cdb272690e14d6718f3685b2",
"eeb5c3c7c5841eb4cdb272690e14d6718f3685b2",
"eeb5c3c7c5841eb4cdb272690e14d6718f3685b2"
] | [
"DEEP LEARNING/segmentation/Kaggle TGS Salt Identification Challenge/v2/common_blocks/loaders.py",
"DEEP LEARNING/segmentation/Kaggle TGS Salt Identification Challenge/v1/utils.py",
"time series regression/autocorelation, mov avg etc/simpleExponentialSmoothing.py",
"DEEP LEARNING/segmentation/Severstal-Steel-... | [
"import numpy as np\nimport torch\nimport torchvision.transforms as transforms\nfrom PIL import Image\nfrom attrdict import AttrDict\nfrom sklearn.externals import joblib\nfrom torch.utils.data import Dataset, DataLoader\nfrom imgaug import augmenters as iaa\nfrom functools import partial\nfrom itertools import pro... | [
[
"sklearn.externals.joblib.dump",
"numpy.expand_dims",
"sklearn.externals.joblib.load",
"torch.cat",
"torch.utils.data.DataLoader",
"torch.from_numpy",
"numpy.stack",
"numpy.array"
],
[
"pandas.read_csv",
"numpy.random.seed",
"numpy.asarray",
"matplotlib.pyplot.y... |
Sayam753/Theano-PyMC | [
"02378861f1a77135f2556018630092a09262ea76",
"f9a85474509ea02647771ad6540b11f02fab59a8"
] | [
"tests/tensor/random/test_type.py",
"tests/tensor/test_extra_ops.py"
] | [
"import pickle\nimport sys\n\nimport numpy as np\nimport pytest\n\nfrom aesara import shared\nfrom aesara.compile.ops import ViewOp\nfrom aesara.tensor.random.type import RandomStateType, random_state_type\n\n\n# @pytest.mark.skipif(\n# not config.cxx, reason=\"G++ not available, so we need to skip this test.\"... | [
[
"numpy.random.RandomState",
"numpy.random.PCG64",
"numpy.random.Philox"
],
[
"numpy.diag",
"numpy.product",
"numpy.asarray",
"numpy.squeeze",
"numpy.cumsum",
"numpy.broadcast",
"numpy.searchsorted",
"numpy.ravel_multi_index",
"numpy.random.randint",
"numpy.a... |
happyCoderJDFJJ/pyrfuniverse | [
"8ddb6e0d8f113015ba820a327388a528a8b215c7"
] | [
"pyrfuniverse/actions/single_transport.py"
] | [
"from pyrfuniverse.actions import BaseAction\nfrom pyrfuniverse.envs import ToborRobotiq85ManipulationEnv\nimport numpy as np\n\n\nclass SingleTransport(BaseAction):\n \"\"\"\n To transfer or convey an object from one place to another.\n \"\"\"\n def __init__(\n self,\n env: ToborR... | [
[
"numpy.array"
]
] |
pilillo/nilmtk | [
"00bb1f948b6de1cc5c891102728c19b9bfc7c739"
] | [
"nilmtk/electric.py"
] | [
"import pandas as pd\nfrom .timeframe import TimeFrame\n\nclass Electric(object):\n \"\"\"Common implementations of methods shared by ElecMeter and MeterGroup.\n \"\"\"\n \n def when_on(self, **load_kwargs):\n \"\"\"Are the connected appliances appliance is on (True) or off (False)?\n\n Us... | [
[
"pandas.concat",
"pandas.DataFrame"
]
] |
Jean1995/Bachelorarbeit | [
"42f7abd089a1cba29136a19445d90c5e49964998"
] | [
"pycode_ARCHIV/params.py"
] | [
"import numpy as np\nimport scipy.constants as const\nfrom table import (\n make_SI,\n write,\n)\nfrom uncertainties import ufloat\n\n#\nN1 = 3 #Parameter f+\nN2 = 3 #Parameter f0\n\nplot_difwq = 1 # entscheide, ob der differentielle WQ geplottet werden soll (zeitlicher Aufwand von ca. einer Minute)\n### Kons... | [
[
"numpy.array"
]
] |
fhamborg/NewsMTSC | [
"5a8f88d7fbb921090e984cc378b02d75524c1025"
] | [
"NewsSentiment/models/singletarget/lcf2.py"
] | [
"# adapted from https://github.com/yangheng95/LC-ABSA/blob/c945a94e0f86116c5578245aa9ad36c46c7b9c4a/models/lc_apc/lcf_bert.py\n# according to\nimport copy\nfrom argparse import Namespace\nfrom typing import Dict\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom transformers.modeling_bert import BertP... | [
[
"torch.nn.Dropout",
"torch.cat",
"torch.from_numpy",
"torch.nn.Tanh",
"numpy.argwhere",
"torch.nn.Linear",
"torch.mul",
"numpy.count_nonzero",
"numpy.zeros"
]
] |
hoburg/pyxfoil | [
"aa089c3bbd0c0911400b1d525d544b796dc1253d"
] | [
"woodys_old_python_code/genpolars.py"
] | [
"#! /usr/bin/env python\n\nimport pyxfoil as px\nimport numpy as np\n\nxf = px.session(logfile='sweeptest')\nRes = np.logspace(5,7,21)\n#Res = np.logspace(4.5,5,5)\nnacacodes = range(8,17,1)\nadders = [0, 2400]\nxf.naca('0010')\nxf.set_panels(200)\nfor a in adders:\n for nacacode in nacacodes:\n xf.naca('... | [
[
"numpy.logspace"
]
] |
courtois-neuromod/movie_decoding_sa | [
"ca937cb676bf5828841ed332556257df3f91702a",
"ca937cb676bf5828841ed332556257df3f91702a"
] | [
"Temporarily/Data_PCA/Bootstrap_Ridge.py",
"Temporarily/Subject3/Important/Sub3_T2.py"
] | [
"import numpy as np\nfrom sklearn.model_selection import train_test_split\nimport matplotlib.pyplot as plt\n\ny= np.load('fMRI_PCA.npy', allow_pickle=True)\nX= np.load('Movie_PCA_1200.npy', allow_pickle=True)\n\nx_train,x_test, y_train, y_test = train_test_split(X, y, test_size=0.1)\n\nprint(x_train.shape, x_test.s... | [
[
"numpy.logspace",
"sklearn.model_selection.train_test_split",
"matplotlib.pyplot.savefig",
"numpy.save",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.xlabel",
"numpy.load",
"matplotlib.pyplot.hist",
"matplotlib.pyplot.ylabel"
],
[
"numpy.hstack",
"numpy.logspace",
... |
kwyoke/cogdl | [
"df919b4fc7db40f8b035665edbcc7ed59f9d448e",
"df919b4fc7db40f8b035665edbcc7ed59f9d448e"
] | [
"cogdl/tasks/link_prediction.py",
"cogdl/datasets/pyg_strategies_data.py"
] | [
"import random\n\nimport os\nimport logging\nimport json\nimport copy\nimport networkx as nx\nimport numpy as np\nimport torch\nfrom torch import mode\nfrom torch.optim import Adam, Adagrad, SGD\nfrom torch.optim.lr_scheduler import StepLR\nfrom torch.utils.data import DataLoader, Dataset\nimport torch.nn as nn\nim... | [
[
"numpy.dot",
"sklearn.metrics.roc_auc_score",
"numpy.linalg.norm",
"sklearn.metrics.precision_recall_curve",
"torch.cuda.empty_cache",
"torch.unique",
"torch.cuda.is_available",
"torch.device",
"sklearn.metrics.auc",
"sklearn.metrics.f1_score",
"numpy.array"
],
[
... |
cbworden/shakemap | [
"f0a49317ce3e98d8cce5ba148797ace47dd1d898",
"f0a49317ce3e98d8cce5ba148797ace47dd1d898",
"a0130bf03645cc635d48606560309bf65310506a",
"f0a49317ce3e98d8cce5ba148797ace47dd1d898",
"f0a49317ce3e98d8cce5ba148797ace47dd1d898",
"f0a49317ce3e98d8cce5ba148797ace47dd1d898",
"f0a49317ce3e98d8cce5ba148797ace47dd1d89... | [
"tests/shakelib/gmpe/nga_east_test.py",
"utils/get_sm_stations.py",
"shakemap/coremods/model.py",
"shakemap/coremods/info.py",
"utils/json2dict.py",
"shakelib/gmice/ak07.py",
"tests/shakelib/correlation/dummy_test.py"
] | [
"#!/usr/bin/env python\n\nimport os\nimport pickle\n\nimport numpy as np\n\nfrom openquake.hazardlib.gsim import base\nimport openquake.hazardlib.imt as imt\nfrom openquake.hazardlib.const import StdDev\n\nfrom shakelib.gmpe.nga_east import NGAEast\nfrom shakelib.multigmpe import stuff_context\n\nhome_dir = os.path... | [
[
"numpy.full_like",
"numpy.log10",
"numpy.testing.assert_allclose"
],
[
"pandas.DataFrame"
],
[
"numpy.diag",
"numpy.dot",
"numpy.ma.masked_less",
"numpy.radians",
"numpy.sqrt",
"numpy.all",
"numpy.seterr",
"numpy.max",
"numpy.concatenate",
"numpy.zer... |
paavalipopov/introspection | [
"ee486a9e8c8b6ddb7ab257eae9e14aac5d637527"
] | [
"src/scripts/tune_ts_mlp_oasis_cv.py"
] | [
"# pylint: disable-all\nimport argparse\n\nfrom animus import EarlyStoppingCallback, IExperiment\nfrom animus.torch.callbacks import TorchCheckpointerCallback\nfrom apto.utils.report import get_classification_report\nfrom catalyst import utils\nimport numpy as np\nimport optuna\nfrom sklearn.model_selection import ... | [
[
"torch.nn.Sequential",
"torch.nn.CrossEntropyLoss",
"numpy.swapaxes",
"numpy.hstack",
"torch.nn.Dropout",
"torch.softmax",
"torch.utils.data.DataLoader",
"sklearn.model_selection.StratifiedKFold",
"torch.nn.LayerNorm",
"torch.tensor",
"torch.nn.Linear",
"torch.set_g... |
Unknown-Data/QGCN | [
"e074ada31c13b6de6eabba2b2ebce90e88fdfdbf",
"e074ada31c13b6de6eabba2b2ebce90e88fdfdbf"
] | [
"graph-measures/measure_tests/test_graph.py",
"graph-measures/features_algorithms/accelerated_graph_features/bfs_moments.py"
] | [
"import os\r\n\r\nimport functools\r\nimport pandas as pd\r\nimport networkx as nx\r\n\r\nfrom loggers import EmptyLogger\r\n\r\n\r\nclass TestData:\r\n def __init__(self, logger=None):\r\n if logger is None:\r\n logger = EmptyLogger()\r\n self._logger = logger\r\n self._data_dir ... | [
[
"pandas.read_csv"
],
[
"numpy.array"
]
] |
chaitanya2334/lsm | [
"504c732238b419cd77e7e0a97af040778ee9c7dd",
"504c732238b419cd77e7e0a97af040778ee9c7dd"
] | [
"src/evaluator/re.py",
"src/pytorch_models/pos_ffn.py"
] | [
"import itertools as it\nfrom collections import defaultdict\nfrom typing import Dict, List\n\nimport numpy as np\nimport pandas as pd\nimport torch\nfrom pytorch_lightning.metrics import Metric\nfrom sklearn.metrics import accuracy_score, precision_recall_fscore_support\nfrom src import utils as sutils\nfrom src.p... | [
[
"torch.nn.functional.softmax",
"numpy.array_equal",
"sklearn.metrics.accuracy_score",
"pandas.DataFrame",
"numpy.concatenate",
"sklearn.metrics.precision_recall_fscore_support",
"numpy.array",
"torch.argmax"
],
[
"torch.nn.Dropout",
"torch.nn.Conv2d",
"torch.nn.Laye... |
hidecharo/Blueqat | [
"8094f45e53da8317193ed3845dbd02e3a82fc06c"
] | [
"blueqat/backends/numpy_backend.py"
] | [
"# Copyright 2019 The Blueqat Developers\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.sqrt",
"numpy.arange",
"numpy.cos",
"numpy.linalg.norm",
"numpy.sin",
"numpy.copyto",
"numpy.zeros"
]
] |
transcendentsky/ssd_pytorch | [
"f1e20318d37b11f99c207d5e19f49ec662bf80f9",
"f1e20318d37b11f99c207d5e19f49ec662bf80f9"
] | [
"lib/utils/data_augment.py",
"lib/dataset/voc.py"
] | [
"\"\"\"Data augmentation functionality. Passed as callable transformations to\r\nDataset classes.\r\n\r\nThe data augmentation procedures were interpreted from @weiliu89's SSD paper\r\nhttp://arxiv.org/abs/1512.02325\r\n\r\nEllis Brown, Max deGroot\r\n\"\"\"\r\n\r\nimport torch\r\nimport cv2\r\nimport numpy as np\r... | [
[
"numpy.hstack",
"numpy.expand_dims",
"numpy.maximum",
"numpy.minimum",
"numpy.logical_and",
"numpy.clip",
"numpy.arange",
"torch.from_numpy",
"numpy.array",
"numpy.random.RandomState",
"numpy.zeros",
"numpy.empty"
],
[
"numpy.hstack",
"numpy.expand_dims"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.