repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
AlexChrisF/udacity | [
"b7f85a74058fc63ccb7601c418450ab934ef5953",
"b7f85a74058fc63ccb7601c418450ab934ef5953",
"b7f85a74058fc63ccb7601c418450ab934ef5953",
"b7f85a74058fc63ccb7601c418450ab934ef5953",
"b7f85a74058fc63ccb7601c418450ab934ef5953",
"b7f85a74058fc63ccb7601c418450ab934ef5953",
"b7f85a74058fc63ccb7601c418450ab934ef595... | [
"tensorflow/contrib/layers/python/kernel_tests/sparse_feature_cross_op_test.py",
"tensorflow/python/platform/flags.py",
"tensorflow/python/kernel_tests/softplus_op_test.py",
"tensorflow/contrib/keras/python/keras/applications/vgg19.py",
"tensorflow/compiler/tests/xla_test.py",
"tensorflow/python/kernel_te... | [
"# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"numpy.equal",
"numpy.not_equal",
"tensorflow.python.ops.sparse_ops.sparse_tensor_to_dense",
"tensorflow.python.client.session.Session",
"tensorflow.python.framework.constant_op.constant",
"tensorflow.contrib.layers.python.ops.sparse_feature_cross_op.sparse_feature_cross",
"tensorflow.... |
vulpicastor/advent-of-code-2021 | [
"12aaf84091604caf88acf3b4f7a118d866c33f5f"
] | [
"src/11.py"
] | [
"#!/usr/bin/env python3\n\n# pylint: disable=unused-import\nimport collections\nimport functools\nimport io\nimport itertools\nimport operator as op\nimport re\nimport timeit\n\nimport numpy as np\nimport aocd\n\nYEAR = 2021\nDAY = 11\n\n\ndef step(grid):\n grid += 1\n flash = np.zeros_like(grid, dtype=bool)\... | [
[
"numpy.all",
"numpy.any",
"numpy.zeros_like"
]
] |
elyase/jack | [
"a4f43a4012a540d55d2e05d8a904e6f8cc3002f1"
] | [
"jack/train_reader.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport logging\nimport math\nimport os\nimport random\nimport shutil\n\nimport tensorflow as tf\n\nfrom jack import readers\nfrom jack.core.tensorflow import TFReader\nfrom jack.eval import evaluate_reader, pretty_print_results\nfrom jack.util.hooks import LossHook, ExamplesPerSecHook, E... | [
[
"tensorflow.set_random_seed",
"tensorflow.summary.FileWriter",
"torch.manual_seed",
"tensorflow.get_variable",
"tensorflow.maximum"
]
] |
limberc/hypercl | [
"ad098a3b18cf2a2ae6e3ecd28a2b7af698f7b807",
"ad098a3b18cf2a2ae6e3ecd28a2b7af698f7b807",
"ad098a3b18cf2a2ae6e3ecd28a2b7af698f7b807"
] | [
"utils/batchnorm_layer.py",
"utils/init_utils.py",
"mnets/mlp.py"
] | [
"#!/usr/bin/env python3\n# Copyright 2019 Christian Henning\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... | [
[
"torch.zeros",
"torch.nn.ParameterList",
"torch.nn.functional.batch_norm",
"torch.nn.init.ones_",
"torch.ones",
"torch.tensor",
"torch.nn.init.zeros_",
"torch.Tensor"
],
[
"torch.nn.init._calculate_fan_in_and_fan_out",
"numpy.prod",
"torch.nn.init._no_grad_uniform_"... |
calebchoo/modulabs | [
"10fbaf0581700641fc9b38b1bd722044bfb7c638",
"314d9cd9b607460f8bfea80fc828b1521ca18443",
"314d9cd9b607460f8bfea80fc828b1521ca18443"
] | [
"tensorflow/contrib/learn/python/learn/estimators/linear.py",
"tensorflow/python/ops/nn.py",
"tensorflow/contrib/learn/python/learn/datasets/mnist.py"
] | [
"# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.contrib.layers.weighted_sum_from_feature_columns",
"tensorflow.contrib.layers.infer_real_valued_columns",
"tensorflow.contrib.framework.python.ops.variables.get_global_step",
"tensorflow.python.platform.tf_logging.warn",
"tensorflow.python.ops.logging_ops.scalar_summary"
],
[
... |
peri044/TRTorch | [
"62c9830b24552651abbff611515114cbcaca8b7b"
] | [
"py/trtorch/_compile_spec.py"
] | [
"from typing import List, Dict, Any\nimport torch\nimport trtorch._C\nfrom trtorch import _types\n\n\ndef _supported_input_size_type(input_size: Any) -> bool:\n if isinstance(input_size, torch.Size):\n return True\n elif isinstance(input_size, tuple):\n return True\n elif isinstance(input_siz... | [
[
"torch.classes.tensorrt.InputRange",
"torch.classes.tensorrt.CompileSpec"
]
] |
brnor/dipl | [
"db516610aecffb10825e899fb5aa9f2902093b6e"
] | [
"gym_puyopuyo/test-feedforward-smallenv.py"
] | [
"from __future__ import print_function\n\nimport os\nimport pickle\nimport time\n\nfrom gym_puyopuyo import register\nimport gym\nimport numpy as np\n\nimport neat\nimport visualize\n\npiece_shape = (3, 2)\nDRAW_NETS = False\nNUM_COLORS = 3.0 # 3 colors in the small env mode\n# TODO: could probably read color numbe... | [
[
"numpy.zeros",
"numpy.hstack",
"numpy.multiply",
"numpy.argmax",
"numpy.ndarray.flatten"
]
] |
kumi123/pytorch-learning | [
"29f5b4d53f4e72b95b3fab979b1bc496ef23674c"
] | [
"chapter9_Computer-Vision/Deep-Dream/util.py"
] | [
"import PIL.Image\nfrom io import BytesIO\nfrom IPython.display import clear_output, Image, display\nimport numpy as np\n\n\ndef showarray(a, fmt='jpeg'):\n a = np.uint8(np.clip(a, 0, 255))\n f = BytesIO()\n PIL.Image.fromarray(a).save(f, fmt)\n display(Image(data=f.getvalue()))\n\n\ndef showtensor(a):\... | [
[
"numpy.array",
"numpy.clip"
]
] |
TopCoder2K/mdetr | [
"aedfd63f550ae36d1477484c489a2aa438d10aa3"
] | [
"datasets/vqa_v2.py"
] | [
"# Copyright (c) Aishwarya Kamath & Nicolas Carion. Licensed under the Apache License 2.0. All Rights Reserved\n\"\"\"\nCOCO dataset which returns image_id for evaluation.\n\nMostly copy-paste from https://github.com/ashkamath/mdetr/blob/main/datasets/gqa.py\n\"\"\"\nimport json\nfrom pathlib import Path\n\nimport ... | [
[
"torch.utils.data.ConcatDataset",
"torch.as_tensor"
]
] |
imanolperez/optimal-double-execution | [
"b380087765925043b01fe2f1066e5e2d1d850cf9"
] | [
"src/data/gbm.py"
] | [
"import numpy as np\nfrom .base import Price\n\nclass GBM(Price):\n \"\"\"Brownian motion.\"\"\"\n\n def __init__(self, T=1., sigma1=0.02, sigma2=0.01, s1=1., s2=1.,\n drift1=0., drift2=0., n=100):\n self.sigma1 = sigma1\n self.sigma2 = sigma2\n self.drift1 = drift1\n ... | [
[
"numpy.linspace",
"numpy.random.randn",
"numpy.exp",
"numpy.sqrt"
]
] |
zarppy/MUREIL_2014 | [
"25ba16554ce8f614b9337e0fffce75da3fa259a4"
] | [
"generator/txmultigeneratormultisite.py"
] | [
"#\r\n#\r\n# Copyright (C) University of Melbourne 2013\r\n#\r\n#\r\n#\r\n#Permission is hereby granted, free of charge, to any person obtaining a copy\r\n#of this software and associated documentation files (the \"Software\"), to deal\r\n#in the Software without restriction, including without limitation the rights... | [
[
"numpy.sum",
"numpy.array",
"numpy.ones",
"numpy.nonzero"
]
] |
CartoDB/cartoframes | [
"7c7392be5d15d0472ff428546c4791ed1a3842b0"
] | [
"cartoframes/data/observatory/catalog/variable.py"
] | [
"import pandas as pd\n\nfrom .entity import CatalogEntity\nfrom .repository.dataset_repo import get_dataset_repo\nfrom .repository.variable_repo import get_variable_repo\nfrom .repository.constants import VARIABLE_FILTER\nfrom .summary import variable_describe, head, tail, counts, quantiles, top_values, histogram\n... | [
[
"pandas.set_option"
]
] |
PepSalehi/algorithms | [
"1c20f57185e6324aa840ccff98e69764b4213131",
"1c20f57185e6324aa840ccff98e69764b4213131",
"1c20f57185e6324aa840ccff98e69764b4213131"
] | [
"ML/tf-cifar-10/cifar10_input.py",
"ML/50-mlps/29-keras-cnn-big-filters/main.py",
"language-word-detection/lstm_recognizer.py"
] | [
"# 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.summary.image",
"tensorflow.decode_raw",
"tensorflow.random_crop",
"tensorflow.image.random_flip_left_right",
"tensorflow.train.batch",
"tensorflow.gfile.Exists",
"tensorflow.image.random_brightness",
"tensorflow.transpose",
"tensorflow.train.string_input_producer",... |
hypergravity/bopy | [
"90cf5bf695c4ae4f53d9a9bec7cdc9ba16994267"
] | [
"bopy/spec/lamost.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n\nAuthor\n------\nBo Zhang\n\nEmail\n-----\nbozhang@nao.cas.cn\n\nCreated on\n----------\n- Fri Jul 3 13:13:06 2015 read_spectrum\n\nModifications\n-------------\n- Fri Nov 20 10:16:59 2015 reformatting code\n- Sun Feb 28 14:39:16 2016 migrated to bopy.spec.lamost\n- Fri ... | [
[
"numpy.isscalar"
]
] |
aleaf/flopy | [
"a5777a4d4a745e473110a167c69603ac4ad3106c",
"a5777a4d4a745e473110a167c69603ac4ad3106c"
] | [
"flopy/export/netcdf.py",
"flopy/utils/util_list.py"
] | [
"import os\nimport platform\nimport socket\nimport copy\nimport json\nimport numpy as np\nfrom datetime import datetime\nimport time\nfrom .metadata import acdd\nimport flopy\n\n# globals\nFILLVALUE = -99999.9\nITMUNI = {\n 0: \"undefined\",\n 1: \"seconds\",\n 2: \"minutes\",\n 3: \"hours\",\n 4: \"... | [
[
"numpy.max",
"numpy.array",
"numpy.zeros_like",
"numpy.nan_to_num",
"numpy.asarray",
"numpy.errstate",
"numpy.isnan",
"numpy.min",
"numpy.nanmin",
"numpy.where",
"numpy.arange",
"numpy.isscalar",
"numpy.cumsum",
"numpy.nanmax"
],
[
"numpy.lib.NumpyVe... |
Karol-G/nnUNet | [
"a30bdbd64254c94c515ee03617173eb217eea505",
"a30bdbd64254c94c515ee03617173eb217eea505"
] | [
"i3Deep/merge_labels.py",
"nnunet/training/loss_functions/dice_loss.py"
] | [
"import numpy as np\r\nfrom i3Deep import utils\r\nfrom tqdm import tqdm\r\nimport os\r\n\r\n\r\n# name = \"KGU-53317EB91645\"\r\n# load_mask = \"D:/Datasets/medical_data/ExportKGU/3D Slicer 2/\" + name + \"/mask.nii.gz\"\r\n# load_label_table = \"D:/Datasets/medical_data/ExportKGU/3D Slicer 2/\" + name + \"/label_... | [
[
"numpy.concatenate",
"numpy.rint",
"numpy.asarray"
],
[
"torch.zeros",
"torch.unbind",
"torch.no_grad",
"numpy.prod",
"torch.nn.BCEWithLogitsLoss",
"torch.log",
"torch.exp"
]
] |
pnkraemer/differentiable_likelihoods | [
"a07876dbf8fcd4aa14bf36bd3e98e06ea10d2a94",
"a07876dbf8fcd4aa14bf36bd3e98e06ea10d2a94"
] | [
"difflikelihoods/sampling.py",
"tests/test_covariance.py"
] | [
"\"\"\"\nsampling.py\n\nWe sample Metropolis-Hastings:\n * Random walk proposals\n * Langevin proposals\n * Langevin proposals with preconditioning\n * Hamiltonian MC\n * Hamiltonian MC with preconditioning\n\nNOTE:\n The functionality of this module is restricted to log-densities,\n i.e. densi... | [
[
"numpy.linalg.norm",
"numpy.dot",
"numpy.random.rand",
"numpy.zeros",
"numpy.linalg.det",
"numpy.sqrt",
"numpy.linalg.solve",
"numpy.linalg.inv"
],
[
"numpy.linalg.norm",
"numpy.random.rand",
"numpy.ones",
"numpy.finfo",
"numpy.linalg.solve",
"numpy.lins... |
ChristophReich1996/kornia | [
"35f955b46e8015da1cb9faa28c6943ec2b09cc2a",
"35f955b46e8015da1cb9faa28c6943ec2b09cc2a",
"35f955b46e8015da1cb9faa28c6943ec2b09cc2a"
] | [
"test/augmentation/test_random_generator.py",
"kornia/geometry/conversions.py",
"test/color/test_hls.py"
] | [
"import pytest\nimport torch\nfrom torch.testing import assert_allclose\n\nfrom kornia.augmentation.random_generator import (\n random_prob_generator,\n random_color_jitter_generator,\n random_perspective_generator,\n random_affine_generator,\n random_rotation_generator,\n random_crop_generator,\n... | [
[
"torch.manual_seed",
"torch.tensor",
"torch.testing.assert_allclose"
],
[
"torch.cat",
"torch.stack",
"torch.finfo",
"torch.squeeze",
"torch.jit.is_scripting",
"torch.eye",
"torch.nn.functional.pad",
"torch.where",
"torch.chunk",
"torch.sqrt",
"torch.is_... |
vermaakarsh/Code-Vulnerability | [
"38791e2f2bc970bed4c4e8af397ac1f4ac4d7363"
] | [
"tpot_output _pipeline.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.neighbors import KNeighborsClassifier\n\n# NOTE: Make sure that the outcome column is labeled 'target' in the data file\ntpot_data = pd.read_csv('PATH/TO/DATA/FILE', sep='COLUMN_SEPARATOR', dtype=np.float64)... | [
[
"sklearn.model_selection.train_test_split",
"pandas.read_csv",
"sklearn.neighbors.KNeighborsClassifier"
]
] |
DMIRLAB-Group/Dassl.pytorch | [
"79052448cc0b0622f14e9768dbd6e6c0598fe6d1"
] | [
"dassl/engine/dg/crossgrad.py"
] | [
"import torch\nfrom torch.nn import functional as F\n\nfrom dassl.optim import build_optimizer, build_lr_scheduler\nfrom dassl.utils import count_num_param\nfrom dassl.engine import TRAINER_REGISTRY, TrainerX\nfrom dassl.engine.trainer import SimpleNet\n\n\n@TRAINER_REGISTRY.register()\nclass CrossGrad(TrainerX):\n... | [
[
"torch.clamp"
]
] |
0HenryH/ai2021s | [
"1cadc3f963f7f2fba99441607e62c8da88183327"
] | [
"AI-lec8-rnn/classify.py"
] | [
"import time\r\nimport numpy as np\r\nimport pandas as pd\r\nimport torch\r\nimport torch.nn as nn\r\nimport itertools\r\nimport collections\r\nimport matplotlib.pyplot as plt\r\n\r\n# Read in data\r\ndf = pd.read_csv(\"Chinese_Names_Corpus_Gender(120W).txt\", header=2)\r\ndf = df[df.sex != \"未知\"]\r\nnames = df[\"... | [
[
"torch.nn.Linear",
"torch.zeros",
"torch.cat",
"numpy.random.choice",
"numpy.zeros",
"numpy.log",
"numpy.random.seed",
"torch.no_grad",
"matplotlib.pyplot.plot",
"numpy.random.shuffle",
"numpy.mean",
"torch.random.manual_seed",
"numpy.where",
"numpy.arange",... |
Jerry2001Qu/pennylane-qiskit | [
"7ba24ac6ab695d83508cd0f5064f7dfb1670a79b"
] | [
"tests/test_integration.py"
] | [
"import sys\n\nimport numpy as np\nimport pennylane as qml\nimport pytest\nimport qiskit\n\nfrom pennylane_qiskit import AerDevice, BasicAerDevice\n\nfrom conftest import state_backends\n\npldevices = [(\"qiskit.aer\", qiskit.Aer), (\"qiskit.basicaer\", qiskit.BasicAer)]\n\n\nclass TestDeviceIntegration:\n \"\"\... | [
[
"numpy.array",
"numpy.sin",
"numpy.zeros",
"numpy.eye",
"numpy.cos",
"numpy.abs",
"numpy.random.random"
]
] |
darkxaze/PINNs | [
"f344a907cf8b585e5f667465178c4442b907024d",
"f344a907cf8b585e5f667465178c4442b907024d"
] | [
"mycode/src/def_Net_u_B.py",
"mycode/run_NavierStokes.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Wed May 20 11:36:58 2020\r\n\r\n@author: nastavirs\r\n\"\"\"\r\nimport numpy as np\r\nimport tensorflow as tf\r\ndef net_u(self, x, t): \r\n u = self.neural_net(tf.concat([x,t],1), self.weights, self.biases)\r\n return u",
"\"\"\"\n@author: Maziar Ra... | [
[
"tensorflow.concat"
],
[
"tensorflow.set_random_seed",
"numpy.array",
"numpy.linalg.norm",
"numpy.random.choice",
"numpy.reshape",
"numpy.random.seed",
"numpy.tile",
"numpy.random.randn",
"numpy.std",
"numpy.asscalar",
"numpy.abs",
"numpy.linspace",
"num... |
jgasthaus/gluon-ts | [
"e14ad69058e58e1ce51c40551674318341781331"
] | [
"test/distribution/test_distribution_inference.py"
] | [
"# Copyright 2018 Amazon.com, Inc. or its affiliates. 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# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# or ... | [
[
"numpy.array",
"numpy.random.seed",
"numpy.ones",
"numpy.logspace",
"numpy.exp",
"numpy.eye",
"numpy.allclose",
"numpy.arange",
"numpy.abs",
"numpy.diag",
"numpy.tri"
]
] |
nicoperetti/metadata-sadosky-santander | [
"a0d686ba8dfa6c3929727248fc52d802d74f4c45"
] | [
"pre-process.py"
] | [
"import click\nimport pandas as pd\n# Due textacy problems\ntry:\n from textacy.preprocess import preprocess_text\nexcept Exception:\n from textacy.preprocess import preprocess_text\n\n\ndef preprocess_f(text, fix_unicode=True, lowercase=True,\n no_urls=True, no_emails=True,\n ... | [
[
"pandas.read_csv"
]
] |
GRAVITYLab/edda | [
"2acd00373db1003922db9f5959644e7506de5726"
] | [
"pyEdda/test_uni_gaussian.py"
] | [
"#make print in python 2, 3 compatible\nfrom __future__ import print_function \nimport numpy as np\nimport pyedda as edda\n\n\n#Univariate Gaussian\nprint(\"//////////Univariate Gaussian///////\")\ndummy_data = np.random.rand(100)\ngaussian = edda.Gaussian(100, 20)\nprint(\"gaussian.getMean():\", gaussian.getMean()... | [
[
"numpy.random.rand"
]
] |
1130310223/Static-Dynamic-Attention | [
"1da223b06ae41f14575960e247fb13506ed8a124",
"1da223b06ae41f14575960e247fb13506ed8a124"
] | [
"hybrid/opensubtitle/hyb/bid/type1/len2/hybrid_len2_t1_predict.py",
"hybrid/ubuntu/hyb/bid/type2/len6/hybrid_len6_t2_train.py"
] | [
" #-*- coding: utf-8 -*-\r\nimport sys\r\nimport os\r\nimport random\r\nimport re\r\nimport time\r\nimport torch \r\nfrom torch.autograd import Variable\r\nfrom torch import optim\r\nimport torch.nn as nn\r\n#sys.path.append('../')\r\nfrom hybrid_bid_t1_model import Seq2Seq\r\nfrom hybrid_data_utils import *\r\n\r\... | [
[
"torch.load"
],
[
"torch.nn.NLLLoss",
"torch.autograd.Variable",
"torch.load"
]
] |
aligapaul/automlbenchmark | [
"59e796fe6632637233a7104dfffe65f210f9eef5",
"97c1ef8f7529f9814c5228ae0ff91d4055223d50"
] | [
"frameworks/shared/callee.py",
"amlb/openml.py"
] | [
"import json\nimport logging\nimport os\nimport re\nimport sys\nimport time\n\n\ndef setup_logger():\n console = logging.StreamHandler(sys.stdout)\n handlers = [console]\n logging.basicConfig(handlers=handlers)\n root = logging.getLogger()\n root.setLevel(logging.INFO)\n\n\nsetup_logger()\n\nlog = lo... | [
[
"numpy.load",
"numpy.save"
],
[
"numpy.asarray"
]
] |
rokdd/yahoo_fin | [
"da55c89582bc8e858131581da1bd380d19d68bf2"
] | [
"yahoo_fin/stock_info.py"
] | [
"import requests\r\nimport pandas as pd\r\nimport ftplib\r\nimport io\r\nimport re\r\nimport json\r\nimport datetime\r\n\r\ntry:\r\n from requests_html import HTMLSession\r\nexcept Exception:\r\n print(\"\"\"Warning - Certain functionality \r\n requires requests_html, which is not installed.\r\n ... | [
[
"pandas.to_datetime",
"pandas.Timestamp.today",
"pandas.DataFrame.from_dict",
"pandas.DataFrame",
"pandas.DateOffset",
"pandas.Timestamp",
"pandas.read_csv",
"pandas.read_html"
]
] |
michaelosthege/aesara | [
"55c88832ba71f87c9612d573ede74a4c042ef570",
"55c88832ba71f87c9612d573ede74a4c042ef570",
"55c88832ba71f87c9612d573ede74a4c042ef570"
] | [
"theano/sparse/sandbox/sp2.py",
"theano/sparse/opt.py",
"theano/gpuarray/elemwise.py"
] | [
"import numpy as np\nimport scipy.sparse\n\nimport theano\nfrom theano import gof, tensor\nfrom theano.gof.op import Op\nfrom theano.sparse.basic import (\n Remove0,\n SparseType,\n _is_sparse,\n as_sparse_variable,\n remove0,\n)\n\n# Also for compatibility\nfrom theano.tensor import discrete_dtypes,... | [
[
"numpy.random.poisson",
"numpy.random.binomial",
"numpy.random.multinomial"
],
[
"numpy.all",
"scipy.sparse.csc_matrix"
],
[
"numpy.dtype"
]
] |
ZurMaD/DeepGrabCut-PyTorch | [
"13d9e81e6e438ad3394fb3a78aca26c2cc63c825"
] | [
"dataloaders/combine_dbs.py"
] | [
"import torch.utils.data as data\n\n\nclass CombineDBs(data.Dataset):\n def __init__(self, dataloaders, excluded=None):\n self.dataloaders = dataloaders\n self.excluded = excluded\n self.im_ids = []\n\n # Combine object lists\n for dl in dataloaders:\n for elem in dl... | [
[
"numpy.array",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"torch.utils.data.DataLoader",
"matplotlib.pyplot.show",
"matplotlib.pyplot.imshow"
]
] |
scrambler-crypto/pyecsca | [
"491abfb548455669abd470382a48dcd07b2eda87"
] | [
"test/sca/test_edit.py"
] | [
"from unittest import TestCase\n\nimport numpy as np\n\nfrom pyecsca.sca import Trace, trim, reverse, pad\n\n\nclass EditTests(TestCase):\n\n def setUp(self):\n self._trace = Trace(np.array([10, 20, 30, 40, 50], dtype=np.dtype(\"i1\")))\n\n def test_trim(self):\n result = trim(self._trace, 2)\n ... | [
[
"numpy.dtype"
]
] |
kappaIO-Dev/kappaIO-sdk-armhf-crosscompile | [
"66fc5fc21e6235f7a3be72a7ccac68e2224b7fb2",
"66fc5fc21e6235f7a3be72a7ccac68e2224b7fb2",
"66fc5fc21e6235f7a3be72a7ccac68e2224b7fb2"
] | [
"rootfs/usr/lib/python3/dist-packages/numpy/polynomial/tests/test_legendre.py",
"rootfs/usr/lib/python3/dist-packages/numpy/polynomial/tests/test_chebyshev.py",
"rootfs/usr/lib/python3/dist-packages/numpy/core/tests/test_dtype.py"
] | [
"\"\"\"Tests for legendre module.\n\n\"\"\"\n\n\nimport numpy as np\nimport numpy.polynomial.legendre as leg\nimport numpy.polynomial.polynomial as poly\nfrom numpy.testing import *\n\nP0 = np.array([ 1])\nP1 = np.array([ 0, 1])\nP2 = np.array([-1, 0, 3])/2\nP3 = np.array([ 0, -3, 0, 5])/2\nP4 = np.array... | [
[
"numpy.polynomial.legendre.legfit",
"numpy.polynomial.legendre.legsub",
"numpy.polynomial.legendre.legmulx",
"numpy.polynomial.legendre.poly2leg",
"numpy.polynomial.legendre.legline",
"numpy.polynomial.legendre.Legendre.fit",
"numpy.zeros_like",
"numpy.polynomial.polynomial.polyval... |
AceCoooool/segmentation | [
"2f4d5ac193cab580eb8ba789e79db6dadcfecfd0"
] | [
"model/seg_models/pspnet.py"
] | [
"\"\"\"Pyramid Scene Parsing Network\"\"\"\nimport os\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\n\nfrom model.seg_models.segbase import SegBaseModel\nfrom model.module.basic import _FCNHead\n\n__all__ = ['PSPNet', 'get_psp',\n 'get_psp_resnet101_voc',\n 'get_psp_resnet... | [
[
"torch.cat",
"torch.nn.Dropout",
"torch.nn.Sequential",
"torch.nn.BatchNorm2d",
"torch.nn.functional.interpolate",
"torch.nn.functional.adaptive_avg_pool2d",
"torch.nn.ReLU",
"torch.nn.Conv2d"
]
] |
joanvaquer/SDV | [
"83e4fdf0ff72e6c5b72cfc8c6ec9584dbd34de28"
] | [
"tests/test_modeler.py"
] | [
"from unittest import TestCase\nfrom unittest.mock import Mock, call\n\nimport pandas as pd\n\nfrom sdv.metadata import Metadata\nfrom sdv.modeler import Modeler\nfrom sdv.models.base import SDVModel\nfrom sdv.models.copulas import GaussianCopula\n\n\nclass TestModeler(TestCase):\n\n def test___init__default(sel... | [
[
"pandas.DataFrame",
"pandas.testing.assert_frame_equal"
]
] |
greerviau/HackUMass | [
"25ef2ea9fecbe4bbfa91f0a9f32bd9f2703a176a"
] | [
"cache.py"
] | [
"import numpy as np\nimport math\n\nclass Cache():\n def __init__(self, max_size=10):\n self.cache = []\n self.size = 0\n self.max_size=max_size\n \n def add(self, element):\n self.cache.append(element)\n self.size+=1\n if self.size > self.max_size:\n de... | [
[
"numpy.array"
]
] |
rohinkumar/CorrelCalc | [
"d7887448af8d3dc3170c00c0aae6ee2561b8a3d5"
] | [
"correlcalc/antpcf.py"
] | [
"__author__ = 'Rohin Kumar Y'\n\n\n# Calculate anisotropic 2pCF\nfrom tpcf import *\nimport scipy as sp\n# antpcf(dat,datR,bins,parmetric,permetric) returns numpy 2d array DD, RR, DR correl\n# poserr(xi,DD) returns (1.0+xi)/np.sqrt(DD)\n\n\ndef atpcf(datfile, binspar, binsper, **kwargs):\n \"\"\"Main function to... | [
[
"scipy.special.legendre"
]
] |
davidcrowland/layer_vb_tagging | [
"83865d67b7a931a9eff4ba6fd4d033b2219225f1"
] | [
"extra/tsfresh_examples/tsfresh/feature_selection/feature_selector.py"
] | [
"# -*- coding: utf-8 -*-\n# This file as well as the whole tsfresh package are licenced under the MIT licence (see the LICENCE.txt)\n# Maximilian Christ (maximilianchrist.com), Blue Yonder Gmbh, 2016\n\"\"\"\nContains a feature selection method that evaluates the importance of the different extracted features. To d... | [
[
"pandas.DataFrame",
"pandas.Series",
"pandas.unique",
"pandas.concat"
]
] |
prakass1/InteractiveSimilarityExplorer | [
"2fa5fb91c7df6424b9ed777ef4373ed7094c2348"
] | [
"machine_learning_model.py"
] | [
"import utility\nimport static_sim_functions as smf\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import *\nfrom time_series_grp import TimeSeriesGroupProcessing\nfrom RandomNeighbors import RandomNeighbors\nfrom sklearn.neighbors import NearestNeighbors\nfrom sklea... | [
[
"pandas.read_pickle",
"numpy.divide",
"numpy.array",
"numpy.asarray",
"numpy.zeros",
"sklearn.linear_model.LinearRegression",
"pandas.DataFrame",
"numpy.sum",
"numpy.multiply",
"numpy.subtract",
"sklearn.model_selection.train_test_split",
"sklearn.neighbors.NearestN... |
felmoltor/kismet-heatmap | [
"d145a865f80db16ad8c6d0bb1dd35e0238706f3b"
] | [
"gpsxml2png.py"
] | [
"#!/usr/bin/env python2\n\n\"\"\"\nCopyright (c) 2016, Bliksem Labs B.V.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, \nare permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright noti... | [
[
"matplotlib.pyplot.imsave",
"matplotlib.pyplot.show",
"numpy.array"
]
] |
keshabb/GamestonkTerminal | [
"419c3691db220c467d2979b19ca308b3b800c0bd"
] | [
"gamestonk_terminal/options/op_helpers.py"
] | [
"\"\"\"Option helper functions\"\"\"\n__docformat__ = \"numpy\"\n\nimport argparse\nfrom typing import List\n\nimport pandas as pd\nimport numpy as np\n\nfrom gamestonk_terminal.helper_funcs import (\n parse_known_args_and_warn,\n check_non_negative,\n)\n\n# pylint: disable=R1710\n\n\ndef load(other_args: Lis... | [
[
"numpy.array"
]
] |
skylian/flare | [
"c920abcae975cc49c052f5f2abb6bbee5c39a11e",
"33b71b4864812b89a28120b01fbc886e6e690376"
] | [
"flare/framework/agent.py",
"flare/examples/img_q_example.py"
] | [
"from abc import ABCMeta, abstractmethod\nfrom multiprocessing import Process, Value\nimport numpy as np\nfrom flare.common.log import GameLogEntry\nfrom flare.common.communicator import AgentCommunicator\nfrom flare.common.replay_buffer import NoReplacementQueue, ReplayBuffer, Experience\n\n\nclass AgentHelper(obj... | [
[
"numpy.zeros"
],
[
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.Linear"
]
] |
c-w-m/pyldpc | [
"c7eb471359086b7336d7b40f11cc912f0daf0476"
] | [
"pyldpc/decoder.py"
] | [
"\"\"\"Decoding module.\"\"\"\nimport numpy as np\nimport warnings\nfrom . import utils\n\nfrom numba import njit, int64, types, float64\n\n\ndef decode(H, y, snr, maxiter=1000):\n \"\"\"Decode a Gaussian noise corrupted n bits message using BP algorithm.\n\n Decoding is performed in parallel if multiple code... | [
[
"numpy.array",
"numpy.log",
"numpy.zeros",
"numpy.ones",
"numpy.tanh"
]
] |
code-lab-org/sys611 | [
"3b8c46788dee629a9f2d6b7f84373e041b918ff0",
"3b8c46788dee629a9f2d6b7f84373e041b918ff0"
] | [
"previous/week12/object-oriented/FactorySystemOO.py",
"previous/week7/discreteTimeModels.py"
] | [
"\"\"\"\nSYS-611: Example factory model in SimPy (object-oriented).\n\n@author: Paul T. Grogan, pgrogan@stevens.edu\n\"\"\"\n\n# import the python3 behavior for importing, division, and printing in python2\nfrom __future__ import absolute_import, division, print_function\n\n# import the simpy package \n# see https:... | [
[
"numpy.random.seed",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.step",
"matplotlib.pyplot.figure",
"numpy.random.uniform",
"matplotlib.pyplot.ylabel"
],
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.suptitle",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.figu... |
ozgurozkan123/deepchem | [
"7b6248db5f7172ff2a833a1c7c99f48565befe67",
"7b6248db5f7172ff2a833a1c7c99f48565befe67",
"7b6248db5f7172ff2a833a1c7c99f48565befe67"
] | [
"deepchem/dock/binding_pocket.py",
"examples/hiv/hiv_irv.py",
"deepchem/feat/nnscore_utils.py"
] | [
"\"\"\"\nComputes putative binding pockets on protein.\n\"\"\"\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\n__author__ = \"Bharath Ramsundar\"\n__copyright__ = \"Copyright 2017, Stanford University\"\n__license__ = \"MIT\"\n\nimport os\nimport t... | [
[
"numpy.array",
"numpy.linalg.norm",
"numpy.ceil",
"numpy.zeros",
"numpy.amax",
"scipy.spatial.ConvexHull",
"numpy.amin",
"numpy.floor"
],
[
"numpy.random.seed"
],
[
"numpy.array",
"numpy.linalg.norm",
"numpy.dot",
"numpy.copy"
]
] |
shanyi15/tensorflow | [
"ebb3429856441149e41388dfbea59496f8dbf17b"
] | [
"tensorflow/python/saved_model/load_test.py"
] | [
"# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.ops.variables.Variable",
"tensorflow.python.eager.backprop.GradientTape",
"tensorflow.python.saved_model.save.save",
"tensorflow.python.lib.io.file_io.delete_file",
"tensorflow.python.training.checkpointable.tracking.TrackableAsset",
"tensorflow.python.eager.def_function... |
joytianya/google_bert | [
"06f131241163a745747da33c5f563abe4413897b"
] | [
"zuo/bert/tokenization.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.gfile.GFile"
]
] |
imandr/RLpy | [
"f01cf7af47b6054e4e52d663ceafc463df6f6166",
"f01cf7af47b6054e4e52d663ceafc463df6f6166"
] | [
"rlpy/gradnet/samples/single_agent/single_agent_ttt_env.py",
"rlpy/gradnet/samples/single_agent/tank_target_env.py"
] | [
"#\n# Tic Tac Toe\n#\n\nimport numpy as np\nfrom gym import spaces\n\nWinMasks = [\n [\n [1,0,0],\n [1,0,0],\n [1,0,0],\n ],\n [\n [0,1,0],\n [0,1,0],\n [0,1,0],\n ],\n [\n [0,0,1],\n [0,0,1],\n [0,0,1],\n ],\n \n [\n [1,1... | [
[
"numpy.array",
"numpy.asarray",
"numpy.zeros",
"numpy.sum",
"numpy.ones",
"numpy.all"
],
[
"numpy.array",
"numpy.empty"
]
] |
CentraleNantesRobotics/ping360_sonar_python | [
"f461594aa0345a417f5bb711b8f4500fb4b4727d"
] | [
"ping360_sonar/ping360_sonar/sonar_interface.py"
] | [
"#!/usr/bin/env python\n\nfrom ping360_sonar.sensor import Ping360\nfrom numpy import pi, sqrt, tan, cos, sign\nfrom brping import definitions\n\nclass SonarInterface:\n \n samplePeriodTickDuration = 25e-9\n firmwareMinTransmitDuration = 5\n firmwareMaxTransmitDuration = 500\n firmwareMaxSamples = 12... | [
[
"numpy.sign",
"numpy.tan",
"numpy.sqrt",
"numpy.cos"
]
] |
aknckaan/scrl | [
"bff485e27d8785628e35d2cb73dce06f10065b1f"
] | [
"torchlars/wrapper.py"
] | [
"import torch\r\nfrom torch.optim import Optimizer\r\n\r\nclass OptimWrapper(Optimizer):\r\n\r\n # Mixin class that defines convenient functions for writing Optimizer Wrappers\r\n\r\n def __init__(self, optim):\r\n self.optim = optim\r\n\r\n def __getstate__(self):\r\n return self.optim.__get... | [
[
"torch.no_grad"
]
] |
schmitse/zfit | [
"d42588f1d43532a34a81f31e602d2471780690e2"
] | [
"zfit/models/basic.py"
] | [
"\"\"\"Basic PDFs are provided here.\n\nGauss, exponential... that can be used together with Functors to build larger models.\n\"\"\"\n\n# Copyright (c) 2021 zfit\nimport contextlib\n\nimport numpy as np\nimport tensorflow as tf\n\nimport zfit.z.numpy as znp\nfrom zfit import z\n\nfrom ..core.basepdf import BasePD... | [
[
"tensorflow.debugging.assert_all_finite"
]
] |
bobub/distil_labse | [
"ad587d7e4e49101a22fb1459b724b25733715caa"
] | [
"distil_labse_repo/distil_funcs.py"
] | [
"# Imports\nimport torch\nfrom labml_nn.transformers.switch import SwitchTransformer, SwitchTransformerLayer, SwitchFeedForward\nfrom labml_nn.transformers import MultiHeadAttention\nfrom labml_nn.transformers.feed_forward import FeedForward\nimport numpy as np\nfrom transformers import AutoConfig, AutoModel\nimpor... | [
[
"numpy.array",
"sklearn.metrics.mean_squared_error",
"torch.stack",
"torch.nn.init.zeros_",
"torch.nn.init.trunc_normal_",
"torch.no_grad",
"numpy.mean",
"torch.from_numpy",
"torch.full_like",
"torch.nn.init._calculate_fan_in_and_fan_out",
"torch.utils.data.DataLoader",... |
StanfordVL/bullet3_ik | [
"52da668d60b32bfe6eea96d3ef3b9d442b2b8926",
"52da668d60b32bfe6eea96d3ef3b9d442b2b8926"
] | [
"examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_logging.py",
"examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_derpy.py"
] | [
"\"\"\"A proto buffer based logging system for minitaur experiments.\n\nThe logging system records the time since reset, base position, orientation,\nangular velocity and motor information (joint angle, speed, and torque) into a\nproto buffer. See minitaur_logging.proto for more details. The episode_proto is\nupdat... | [
[
"tensorflow.gfile.MakeDirs",
"tensorflow.gfile.Exists",
"tensorflow.gfile.Open"
],
[
"numpy.zeros"
]
] |
zacjohnston/pyburst | [
"f7d5ae9a229704d1cbcf656afb9fb3e29fb71c0c",
"f7d5ae9a229704d1cbcf656afb9fb3e29fb71c0c"
] | [
"pyburst/mcmc/mcmc_plot.py",
"pyburst/misc/alpha.py"
] | [
"import numpy as np\nimport os\nimport sys\nimport matplotlib.pyplot as plt\nimport chainconsumer\nfrom math import ceil\n\n# pyburst\nfrom . import mcmc_versions\nfrom . import mcmc_tools\nfrom . import burstfit\nfrom . import mcmc_params\nfrom pyburst.observations import obs_tools\nfrom pyburst.plotting import pl... | [
[
"matplotlib.pyplot.rcParams.update",
"numpy.ceil",
"numpy.column_stack",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots",
"numpy.diff",
"numpy.arange",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.show",
"numpy.linspace",
"numpy.floor"
],
[
"nump... |
vishalbelsare/pyjanitor | [
"9c5ff2c4ad5969ee4bc683ba82010b55b55fd2bb"
] | [
"tests/functions/test_process_text.py"
] | [
"import numpy as np\nimport pandas as pd\nimport pytest\nfrom pandas.testing import assert_frame_equal\n\n\n@pytest.fixture\ndef process_test_df():\n \"Base DataFrame\"\n return pd.DataFrame(\n {\"text\": [\"a_b_c\", \"c_d_e\", np.nan, \"f_g_h\"], \"numbers\": range(1, 5)}\n )\n\n\n@pytest.fixture\n... | [
[
"pandas.DataFrame",
"pandas.testing.assert_frame_equal"
]
] |
docileninja/Calvin-and-Hobbes-Viewer | [
"74ff2e090e040517e2b445432a5ea6c0f87df49b"
] | [
"comic_classify/comic_detect.py"
] | [
"from sklearn import svm, cluster\nfrom PIL import Image, ImageDraw\nimport os\nimport sys\nimport random\n\n\n\ndef load_images(dirname):\n\timages = []\n\tfor image_name in os.listdir(dirname):\n\t\tif image_name.startswith('.'):\n\t\t\tcontinue\n\t\timage = Image.open(dirname + '/' + image_name).convert('1')\n\t... | [
[
"sklearn.cluster.KMeans",
"sklearn.cluster.DBSCAN",
"sklearn.svm.SVC"
]
] |
UKPLab/cdcr-beyond-corpus-tailored | [
"52bf98692c7464f25628baea24addd1a988f9a1f"
] | [
"python/handwritten_baseline/pipeline/data/loader/ecb_reader_utils.py"
] | [
"import logging\nimport os\nimport re\nimport xml.etree.ElementTree as ET\nfrom pathlib import Path\nfrom typing import Any, Tuple, Optional\n\nimport pandas as pd\n\nfrom python import TOPIC_ID, SUBTOPIC, DOCUMENT_NUMBER, DOCUMENT_ID, SENTENCE_IDX, TOKEN_IDX, TOKEN_IDX_TO, \\\n TOKEN_IDX_FROM, TOKEN, MENTION_ID... | [
[
"pandas.merge",
"pandas.DataFrame",
"pandas.MultiIndex.from_tuples",
"pandas.concat",
"pandas.read_csv",
"pandas.Series"
]
] |
nbro/probability | [
"07a6378155f0ed720b5aaccf5387e3f9a432bd10",
"07a6378155f0ed720b5aaccf5387e3f9a432bd10",
"07a6378155f0ed720b5aaccf5387e3f9a432bd10",
"07a6378155f0ed720b5aaccf5387e3f9a432bd10"
] | [
"tensorflow_probability/python/distributions/generalized_pareto_test.py",
"tensorflow_probability/python/internal/hypothesis_testlib.py",
"tensorflow_probability/python/layers/dense_variational.py",
"tensorflow_probability/python/sts/local_level.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... | [
[
"scipy.stats.genpareto.mean",
"numpy.array",
"numpy.log",
"tensorflow.compat.v2.TensorShape",
"scipy.stats.genpareto.var",
"numpy.exp",
"tensorflow.compat.v2.math.tanh",
"numpy.float32",
"scipy.stats.genpareto.entropy",
"tensorflow.compat.v2.Variable",
"numpy.abs",
... |
Aaronga19/MachineLearning-A-Z | [
"e8e27f0a31ac3e3c05d4029e6e5e14ac8a911153"
] | [
"Apuntes/Preprocess/Missing Data.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Aug 13 20:30:46 2020\n\n@author: Aaronga\n\"\"\"\n\n# Datos faltantes\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\ndataset = pd.read_csv(\"Data.csv\")\nX = dataset.iloc[:, :-1].values\ny = dataset.iloc[:, 3].values\n\n# Tratamiento de ... | [
[
"pandas.read_csv",
"sklearn.preprocessing.Imputer"
]
] |
anonyma2020/dagnn | [
"3191b2cc4f923d523ece3962c96a0e3dd54f1a0b"
] | [
"ogbg-code/model/asap.py"
] | [
"import torch\nimport torch.nn.functional as F\nfrom torch.nn import Linear\nfrom torch_geometric.nn import (ASAPooling,\n GraphConv, global_mean_pool,\n JumpingKnowledge)\n\n\nclass ASAP(torch.nn.Module):\n def __init__(self, num_vocab, max_seq_len, ... | [
[
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.nn.functional.dropout",
"torch.nn.ModuleList"
]
] |
xgmiao/AutoDL-Projects | [
"0dbbc286c9f56136291590136fffd513af881c36"
] | [
"exps/LFNA/basic-same.py"
] | [
"#####################################################\n# Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2021.04 #\n#####################################################\n# python exps/LFNA/basic-same.py --srange 1-999 --env_version v1 --hidden_dim 16\n# python exps/LFNA/basic-same.py --srange 1-999 --env_version v2 --h... | [
[
"torch.randint",
"torch.nn.MSELoss",
"torch.no_grad",
"torch.utils.data.DataLoader"
]
] |
brenov/ip-usp | [
"06f9f16229a4587e38a3ae89fbe3394d5f1572fd",
"06f9f16229a4587e38a3ae89fbe3394d5f1572fd"
] | [
"05-Image-Descriptors/solution.py",
"other-exercises/fourier/fft_manual.py"
] | [
"# Name: Breno Maurício de Freitas Viana\n# NUSP: 11920060\n# Course Code: SCC5830\n# Year/Semester: 2021/1\n# Assignment 5: Image Descriptors\n\n\nimport math\nimport numpy as np\nimport imageio\nfrom scipy import ndimage\n\n\nnp.seterr(divide='ignore', invalid='ignore')\n\nLEVELS = 256\n\n# ----- (1) Read Paramet... | [
[
"numpy.concatenate",
"scipy.ndimage.convolve",
"numpy.array",
"numpy.linalg.norm",
"numpy.empty",
"numpy.zeros",
"numpy.log",
"numpy.seterr",
"numpy.degrees",
"numpy.arctan",
"numpy.arange",
"numpy.fromfunction",
"numpy.power",
"numpy.iinfo"
],
[
"nu... |
CityU-AIM-Group/SFPolypDA | [
"3902577cf9549a65be7ba89e2c11a7115158b531"
] | [
"fcos_core/solver/build.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport torch\nimport logging\nfrom .lr_scheduler import WarmupMultiStepLR\n\n\ndef make_optimizer(cfg, model):\n logger = logging.getLogger(\"fcos_core.trainer\")\n params = []\n for key, value in model.named_parameters():\n i... | [
[
"torch.optim.Adam",
"torch.optim.SGD"
]
] |
stevezheng23/fewshot_nlp_pt | [
"aaca4658aaa48a5a45dfd7d5ee7282d7f7c74be2",
"aaca4658aaa48a5a45dfd7d5ee7282d7f7c74be2"
] | [
"src/transformersX/models/cutoffbert/modeling_cutoffbert.py",
"src/transformersX/models/promptbert/modeling_promptbert.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team 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 file except in compliance with the License.\n# You may... | [
[
"torch.nn.Linear",
"torch.zeros",
"torch.nn.Dropout",
"torch.stack",
"tensorflow.train.load_variable",
"torch.from_numpy",
"tensorflow.train.list_variables",
"torch.ones",
"torch.nn.functional.log_softmax",
"torch.full",
"numpy.transpose",
"torch.nn.KLDivLoss",
... |
grassofsky/modules | [
"fe51de837fed6887228f2d3f8a455d5f4602d786",
"fe51de837fed6887228f2d3f8a455d5f4602d786"
] | [
"misc/pythontools/processors/VolumeExtractChannel.py",
"misc/vasp/python/processors/chgcarsource.py"
] | [
"# Name: VolumeExtractChannel \n\nimport inviwopy as ivw\nimport numpy as np\n\nclass VolumeExtractChannel(ivw.Processor):\n def __init__(self, id, name):\n ivw.Processor.__init__(self, id, name)\n self.inport = ivw.data.VolumeInport(\"inport\")\n self.addInport(self.inport, owner=False)\n ... | [
[
"numpy.clip"
],
[
"numpy.array"
]
] |
dertilo/speech-recognition | [
"32dfd0a05480ecb3a4ea3eb9e28628da976e7065"
] | [
"data_related/data_augmentation/signal_augment.py"
] | [
"import os\nimport subprocess\n\nimport numpy as np\nfrom tqdm import tqdm\nfrom typing import Dict\n\nMAX_FREQ = 7999\n\n\ndef to_str(v):\n if isinstance(v, tuple):\n s = \" \".join(str(x) for x in v)\n elif isinstance(v, float) or isinstance(v, int):\n s = str(v)\n else:\n assert Fal... | [
[
"numpy.random.triangular",
"numpy.random.uniform",
"numpy.random.choice"
]
] |
marbre/mlir-npcomp | [
"30adf9e6b0c1e94db38050a9e143f20a5a461d17"
] | [
"frontends/pytorch/test/acap_regression/test_jit_add2.py"
] | [
"# -*- Python -*-\n# This file is licensed under a pytorch-style license\n# See frontends/pytorch/LICENSE for license information.\n\nimport torch\nimport npcomp.frontends.pytorch as torch_mlir\nimport npcomp.frontends.pytorch.test as test\n\n# RUN: %PYTHON %s | FileCheck %s\n\ndev = torch_mlir.mlir_device()\nt0 = ... | [
[
"torch.randn"
]
] |
GuoSuiming/mindspore | [
"665ec683d4af85c71b2a1f0d6829356f2bc0e1ff",
"48afc4cfa53d970c0b20eedfb46e039db2a133d5",
"59a277756eb4faad9ac9afcc7fd526e8277d4994",
"59a277756eb4faad9ac9afcc7fd526e8277d4994",
"48afc4cfa53d970c0b20eedfb46e039db2a133d5",
"59a277756eb4faad9ac9afcc7fd526e8277d4994",
"59a277756eb4faad9ac9afcc7fd526e8277d499... | [
"tests/st/ops/gpu/test_tanh_grad_grad_op.py",
"mindspore/ops/_grad/grad_nn_ops.py",
"tests/ut/python/parallel/test_dropout_do_mask.py",
"tests/st/ops/cpu/test_smooth_l1_loss_grad_op.py",
"tests/ut/python/dataset/test_random_vertical_flip_with_bbox.py",
"tests/ut/python/dataset/test_shuffle.py",
"tests/s... | [
"# Copyright 2020 Huawei Technologies Co., Ltd\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 l... | [
[
"numpy.random.seed",
"numpy.random.rand"
],
[
"numpy.sum",
"numpy.array",
"numpy.ones",
"numpy.reshape"
],
[
"numpy.ones"
],
[
"numpy.random.randn"
],
[
"numpy.array"
],
[
"numpy.testing.assert_equal"
],
[
"numpy.random.randn",
"numpy.power"
... |
abishekganesh72/koalas | [
"40c2e209384d078ee75d08c7681d2e6a276ab834"
] | [
"databricks/koalas/frame.py"
] | [
"#\n# Copyright (C) 2019 Databricks, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable la... | [
[
"pandas.Index",
"pandas.api.types.is_list_like",
"pandas.api.types.is_scalar",
"pandas.DataFrame",
"pandas.api.types.is_datetime64_dtype",
"pandas.api.types.is_datetime64tz_dtype",
"numpy.isscalar",
"pandas.Series",
"pandas.api.types.is_dict_like"
]
] |
paalge/scikit-image | [
"f3c4b88b0610242b033449fd38c1118475f96a73"
] | [
"doc/examples/transform/plot_pyramid.py"
] | [
"\"\"\"\n====================\nBuild image pyramids\n====================\n\nThe ``pyramid_gaussian`` function takes an image and yields successive images\nshrunk by a constant scale factor. Image pyramids are often used, e.g., to\nimplement algorithms for denoising, texture discrimination, and scale-\ninvariant de... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots",
"numpy.zeros"
]
] |
RajArPatra/Improvement-semantic-segmentation-using-clustring-and-class-voating | [
"1e4b5fa5ccc462d88a68f3c88c8af31fa3f14b8b"
] | [
"deeplabv3/datahandler.py"
] | [
"from torch.utils.data import Dataset, DataLoader\nimport glob\nimport os\nimport numpy as np\nimport cv2\nimport torch\nfrom torchvision import transforms, utils\nfrom skimage.transform import resize\n\n\nclass SegDataset(Dataset):\n \"\"\"Segmentation Dataset\"\"\"\n\n def __init__(self, root_dir, imageFold... | [
[
"numpy.random.seed",
"torch.utils.data.DataLoader",
"numpy.random.shuffle",
"torch.from_numpy"
]
] |
UCL/scikit-surgeryvtk | [
"75a2cb15f976348b844fea165bddf187efa722f0"
] | [
"tests/utils/test_polydata_utils.py"
] | [
"# -*- coding: utf-8 -*-\n\n# -*- coding: utf-8 -*-\n\nimport pytest\nimport vtk\nimport numpy as np\nimport sksurgeryvtk.utils.polydata_utils as pdu\nimport sksurgeryvtk.models.vtk_surface_model as vbs\n\ndef test_overlapping_bounds():\n radius_0=10.0\n radius_1=7.0\n centre_1=5.0\n radius_2=4.0\n c... | [
[
"numpy.testing.assert_approx_equal"
]
] |
YuHsin1998/EllSeg | [
"ff56b255f8e650856aec9af23792e105897eba5c",
"ff56b255f8e650856aec9af23792e105897eba5c"
] | [
"dataset_generation/ExtractSantini.py",
"extern/locating-objects-without-bboxes/object-locator/models/utils.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed May 29 16:16:57 2019\n\n@author: rakshit\n\"\"\"\nimport os\nimport cv2\nimport argparse\nimport matplotlib\nimport numpy as np\nimport deepdish as dd\nimport scipy.io as scio\n\nprint('Extracting Santini')\n\nparser = argparse.ArgumentParser(... | [
[
"matplotlib.use",
"matplotlib.pyplot.ion",
"numpy.array",
"matplotlib._pylab_helpers.Gcf.get_active",
"matplotlib.pyplot.subplots",
"numpy.stack",
"matplotlib.pyplot.pause",
"matplotlib.pyplot.show",
"matplotlib.get_backend"
],
[
"torch.save"
]
] |
anaheino/Ufo-sightings-map | [
"64af02093f97737cbbdfd8af9e1aeb4d8aa8fcdc",
"64af02093f97737cbbdfd8af9e1aeb4d8aa8fcdc",
"64af02093f97737cbbdfd8af9e1aeb4d8aa8fcdc",
"64af02093f97737cbbdfd8af9e1aeb4d8aa8fcdc",
"64af02093f97737cbbdfd8af9e1aeb4d8aa8fcdc",
"64af02093f97737cbbdfd8af9e1aeb4d8aa8fcdc"
] | [
"app/venv/lib/python2.7/site-packages/numpy/lib/arraypad.py",
"app/venv/lib/python2.7/site-packages/numpy/distutils/mingw32ccompiler.py",
"app/venv/lib/python2.7/site-packages/pandas/io/tests/test_parsers.py",
"app/venv/lib/python2.7/site-packages/pandas/tests/test_series.py",
"app/venv/lib/python2.7/site-p... | [
"\"\"\"\nThe arraypad module contains a group of functions to pad values onto the edges\nof an n-dimensional array.\n\n\"\"\"\nfrom __future__ import division, absolute_import, print_function\n\nimport numpy as np\n\n\n__all__ = ['pad']\n\n\n##########################################################################... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.asarray",
"numpy.zeros",
"numpy.median",
"numpy.round",
"numpy.sum",
"numpy.ones",
"numpy.apply_along_axis",
"numpy.arange",
"numpy.issubdtype"
],
[
"numpy.distutils.lib2def.getnm",
"numpy.distutils.lib2def.parse_nm... |
arcada-uas/doccano | [
"c29aece3dd4504eeaaa3466af0663bfe18b90dc1"
] | [
"backend/data_export/tests/test_dataset.py"
] | [
"import unittest\nfrom unittest.mock import MagicMock\n\nimport pandas as pd\nfrom pandas.testing import assert_frame_equal\n\nfrom data_export.pipeline.dataset import Dataset\n\n\nclass TestDataset(unittest.TestCase):\n def setUp(self):\n example = MagicMock()\n example.to_dict.return_value = {\"d... | [
[
"pandas.DataFrame",
"pandas.testing.assert_frame_equal"
]
] |
kiritigowda/Anakin | [
"4ba2329153163590e11875dc6b4150031066915d"
] | [
"tools/external_converter_v2/parser/kill_fluid/fluid_helper.py"
] | [
"from ..proto import *\nfrom ..graph_io import *\nimport paddle.fluid as fluid\nimport numpy as np\nfrom paddle.fluid.core import VarDesc, AttrType\n\n\ndef union(list_a, list_b):\n\treturn list(set(list_a).union(set(list_b)))\n\ndef difference(list_a, list_b):\n\treturn list(set(list_a).difference(set(list_b)))\n\... | [
[
"numpy.add",
"numpy.zeros",
"numpy.set_printoptions",
"numpy.shape",
"numpy.transpose",
"numpy.hstack"
]
] |
Fengdalu/LEARN-AN-EFFECTIVE-LIP-READING-MODEL-WITHOUT-PAINS | [
"8d5eef415c19b4c5e161259b1222fbfec6a5edb0"
] | [
"model/video_cnn.py"
] | [
"# coding: utf-8\nimport math\nimport numpy as np\n\n\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nimport torch.nn.functional as F\n\n\ndef conv3x3(in_planes, out_planes, stride=1):\n return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,\n padding... | [
[
"torch.nn.Dropout",
"torch.nn.Sequential",
"torch.nn.BatchNorm2d",
"torch.nn.MaxPool3d",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.BatchNorm1d",
"torch.nn.Conv3d",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.BatchNorm3d"
]
] |
DavidIbarr/nmma | [
"109fdd57add52cfea3553df8346981d6a117a7e7"
] | [
"nmma/em/create_injection_slurm.py"
] | [
"import os\nimport argparse\nimport json\nimport pandas as pd\n\nimport bilby\nfrom bilby_pipe.create_injections import InjectionCreator\n\n\ndef main():\n\n parser = argparse.ArgumentParser(description=\"Slurm files from nmma injection file\")\n parser.add_argument(\n \"--prior-file\",\n type=s... | [
[
"pandas.DataFrame.from_dict",
"pandas.DataFrame.merge"
]
] |
dkswxd/unetpp_pytorch_qiu | [
"7f139d0c71110052399f0a93b55a39ba85897561"
] | [
"tool/metric.py"
] | [
"import numpy as np\nfrom sklearn import metrics\nfrom PIL import Image\n\ndef get_metrics(pred, logits, gt):\n if isinstance(logits, list):\n logits = logits[-1]\n result = {'confusion_matrix': metrics.confusion_matrix(gt.flatten(), pred.flatten(), labels=[1, 0]),\n 'auc': roc(gt, logits)... | [
[
"numpy.max",
"numpy.concatenate",
"numpy.array",
"numpy.zeros_like",
"numpy.zeros",
"numpy.argmin",
"numpy.sum",
"numpy.min",
"numpy.where",
"numpy.stack",
"numpy.transpose",
"sklearn.metrics.auc",
"sklearn.metrics.roc_curve"
]
] |
cnheider/pyro | [
"60bcab73ada30c2b3f05d525690c9664ff6fc22e",
"60bcab73ada30c2b3f05d525690c9664ff6fc22e"
] | [
"pyro/infer/trace_elbo.py",
"tests/distributions/test_sparse_multivariate_normal.py"
] | [
"from __future__ import absolute_import, division, print_function\n\nimport numbers\nimport warnings\n\nimport torch\nfrom torch.autograd import Variable\n\nimport pyro\nimport pyro.poutine as poutine\nfrom pyro.distributions.util import is_identically_zero\nfrom pyro.infer.elbo import ELBO\nfrom pyro.infer.enum im... | [
[
"torch.zeros_like"
],
[
"torch.Tensor"
]
] |
Sriram-Ravula/ncsnv2 | [
"f610b59441a34063fae1c02aa06837b7eec95c03"
] | [
"models/__init__.py"
] | [
"import torch\nimport numpy as np\n\ndef get_sigmas(config):\n if config.model.sigma_dist == 'geometric':\n sigmas = torch.tensor(\n np.exp(np.linspace(np.log(config.model.sigma_begin), np.log(config.model.sigma_end),\n config.model.num_classes))).float().to(config... | [
[
"torch.cos",
"torch.nn.MSELoss",
"torch.sin",
"numpy.log",
"torch.no_grad",
"torch.linspace",
"torch.sign",
"torch.ones",
"torch.randn_like",
"numpy.sqrt",
"torch.zeros_like",
"torch.transpose",
"numpy.linspace",
"torch.randn"
]
] |
WBobby/pytorch | [
"655960460ccca936fa5c06df6bbafd25b5582115"
] | [
"torch/ao/quantization/fuse_modules.py"
] | [
"\nimport copy\n\nimport torch.nn as nn\n\nfrom torch.quantization.fuser_method_mappings import get_fuser_method\n# for backward compatiblity\nfrom torch.quantization.fuser_method_mappings import fuse_conv_bn # noqa: F401\nfrom torch.quantization.fuser_method_mappings import fuse_conv_bn_relu # noqa: F401\n\nfrom... | [
[
"torch.nn.Identity",
"torch.quantization.fuser_method_mappings.get_fuser_method"
]
] |
SmolakK/HuMobi | [
"67b40f839a843123093582935e89f91e16bc4374"
] | [
"tools/processing.py"
] | [
"import pandas as pd\nimport numpy as np\n\n\ndef top_time(ind=None, gs=None):\n\t\"\"\"\n\tSelects the location (by coordinates) which was visited for the longest period during given time interval\n\t:param ind: user id\n\t:param gs: GeoDataFrame from groupby execution containing all the data in the given time int... | [
[
"pandas.concat"
]
] |
temper8/MatBench | [
"1ea24d18af35b57ef2d61148709eb6d49835fe97"
] | [
"show_config.py"
] | [
"import numpy as np \nnp.show_config()"
] | [
[
"numpy.show_config"
]
] |
clsteel/DeepPostures | [
"8a7bed8f1e47e4a502080bf6edd513b822ea0bdf"
] | [
"MSSE-2021/train_model.py"
] | [
"# Copyright 2021 Supun Nakandala. 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 by... | [
[
"tensorflow.train.AdamOptimizer",
"numpy.random.seed",
"tensorflow.random.set_random_seed",
"tensorflow.argmax",
"tensorflow.Session",
"tensorflow.train.Saver",
"tensorflow.reshape",
"tensorflow.get_collection",
"tensorflow.constant",
"tensorflow.data.Iterator.from_structur... |
fchouteau/imgaug | [
"b282b97c13a27a32f91c2e2666db1e128e00cfde",
"b282b97c13a27a32f91c2e2666db1e128e00cfde"
] | [
"imgaug/augmenters/size.py",
"imgaug/imgaug.py"
] | [
"\"\"\"\nAugmenters that somehow change the size of the images.\n\nList of augmenters:\n\n * :class:`Resize`\n * :class:`CropAndPad`\n * :class:`Crop`\n * :class:`Pad`\n * :class:`PadToFixedSize`\n * :class:`CenterPadToFixedSize`\n * :class:`CropToFixedSize`\n * :class:`CenterCropToFixedSize... | [
[
"numpy.concatenate",
"numpy.full",
"numpy.ceil",
"numpy.array",
"numpy.pad",
"numpy.log",
"numpy.round",
"numpy.copy",
"numpy.atleast_3d",
"numpy.stack",
"numpy.arange",
"numpy.float128",
"numpy.clip",
"numpy.floor"
],
[
"numpy.concatenate",
"num... |
cuicaihao/Data_Science_Python | [
"ca4cb64bf9afc1011c192586362d0dd036e9441e"
] | [
"10.Algorithms_Data_Structure/Searching_n_Sorting/QuickSort.py"
] | [
"import numpy as np\n\n\ndef partition(arr, low, high):\n i = (low-1) # index of smaller element\n pivot = arr[high] # pivot\n\n for j in range(low, high):\n\n # If current element is smaller than the pivot\n if arr[j] < pivot:\n\n # increment index of smaller element\n... | [
[
"numpy.random.randint"
]
] |
mvdoc/himalaya | [
"7e3866287b835e2cc0a5c9848331e19c14896309"
] | [
"himalaya/kernel_ridge/tests/test_random_search_kernel.py"
] | [
"import pytest\n\nimport numpy as np\nimport sklearn.linear_model\nimport sklearn.model_selection\nimport scipy.linalg\n\nfrom himalaya.backend import set_backend\nfrom himalaya.backend import ALL_BACKENDS\nfrom himalaya.utils import assert_array_almost_equal\nfrom himalaya.scoring import r2_score\n\nfrom himalaya.... | [
[
"numpy.allclose",
"numpy.eye",
"numpy.cumsum"
]
] |
andriyor/moviepy | [
"8eaf3f02c5cf812e89f03e925cb2fa5e05b8d29a"
] | [
"moviepy/video/tools/drawing.py"
] | [
"\"\"\"Deals with making images (np arrays). It provides drawing\nmethods that are difficult to do with the existing Python libraries.\n\"\"\"\n\nimport numpy as np\n\n\ndef blit(im1, im2, pos=None, mask=None):\n \"\"\"Blit an image over another.\n\n Blits ``im1`` on ``im2`` as position ``pos=(x,y)``, using t... | [
[
"numpy.array",
"numpy.linalg.norm",
"numpy.zeros",
"numpy.ones",
"numpy.isscalar",
"numpy.dstack",
"numpy.maximum"
]
] |
hsfzxjy/svdnet-pytorch | [
"8f485d0b162c23b20449f7ee80c955e0b20950ae"
] | [
"train_svdnet_xent.py"
] | [
"from __future__ import print_function\nfrom __future__ import division\n\nimport os\nimport sys\nimport time\nimport datetime\nimport os.path as osp\nimport numpy as np\nimport warnings\n\nimport torch\nimport torch.nn as nn\nimport torch.backends.cudnn as cudnn\n\nfrom args import argument_parser, image_dataset_k... | [
[
"torch.cat",
"torch.trace",
"numpy.asarray",
"torch.max",
"torch.norm",
"torch.no_grad",
"torch.optim.Adam",
"torch.optim.SGD",
"torch.sign",
"torch.pow",
"torch.cuda.is_available",
"torch.zeros_like",
"torch.nn.DataParallel",
"torch.svd"
]
] |
kerel-fs/poliastro | [
"1ad2074aebb7cf18f507ac44931d1e18fec53dad"
] | [
"src/poliastro/core/perturbations.py"
] | [
"import numpy as np\nfrom numpy.linalg import norm\n\nfrom ._jit import jit\n\n\n@jit\ndef J2_perturbation(t0, state, k, J2, R):\n r\"\"\"Calculates J2_perturbation acceleration (km/s2)\n\n .. math::\n\n \\vec{p} = \\frac{3}{2}\\frac{J_{2}\\mu R^{2}}{r^{4}}\\left [\\frac{x}{r}\\left ( 5\\frac{z^{2}}{r^... | [
[
"numpy.array",
"numpy.arccos",
"numpy.linalg.norm",
"numpy.dot",
"numpy.sum",
"numpy.exp"
]
] |
tgquintela/pySpatialTools | [
"e028008f9750521bf7d311f7cd3323c88d621ea4",
"e028008f9750521bf7d311f7cd3323c88d621ea4"
] | [
"pySpatialTools/utils/artificial_data/artificial_measure.py",
"pySpatialTools/tests/test_perturbation.py"
] | [
"\n\"\"\"\nartificial measure\n------------------\nCreation of artificial measure\n\"\"\"\n\nimport numpy as np\n\n\n############################### Create measure ################################\n###############################################################################\ndef create_artificial_measure_array(n... | [
[
"numpy.random.random",
"numpy.arange",
"numpy.random.randint",
"numpy.zeros"
],
[
"numpy.random.random",
"numpy.hstack",
"numpy.random.randint",
"numpy.random.permutation"
]
] |
reddigari/Eelbrain | [
"6c02b99955d4b5dc7e3054042c182e1a4629b13c"
] | [
"eelbrain/_stats/tests/test_spm.py"
] | [
"# Author: Christian Brodbeck <christianbrodbeck@nyu.edu>\nimport pickle\nfrom nose.tools import eq_\nimport numpy as np\nfrom numpy.testing import assert_array_equal\n\nfrom eelbrain import datasets\nfrom eelbrain._stats.spm import LM, LMGroup\n\n\ndef test_lm():\n ds = datasets.get_uts()\n model = ds.eval(\... | [
[
"numpy.random.normal"
]
] |
manas96/RelationPrediction | [
"06be62a55554971d1b523dc555f4c8616c21c664"
] | [
"code-tf2/encoders/message_gcns/gcn_basis.py"
] | [
"import numpy as np\nimport tensorflow as tf\nfrom common.shared_functions import dot_or_lookup, glorot_variance, make_tf_variable, make_tf_bias\n\nfrom encoders.message_gcns.message_gcn import MessageGcn\n\n\nclass BasisGcn(MessageGcn):\n\n def parse_settings(self):\n self.dropout_keep_probability = floa... | [
[
"tensorflow.shape",
"tensorflow.nn.relu",
"tensorflow.expand_dims",
"tensorflow.reshape",
"tensorflow.sparse.sparse_dense_matmul",
"tensorflow.nn.embedding_lookup",
"tensorflow.square"
]
] |
Leo-xxx/Deep-Flow-Guided-Video-Inpainting | [
"6310007009d2bfe150f1e4b29c7588f720c4bba2"
] | [
"utils/flow.py"
] | [
"import numpy as np\nimport cv2\n\n\ndef make_colorwheel():\n '''\n Generates a color wheel for optical flow visualization as presented in:\n Baker et al. \"A Database and Evaluation Methodology for Optical Flow\" (ICCV, 2007)\n URL: http://vision.middlebury.edu/flow/flowEval-iccv07.pdf\n\n A... | [
[
"numpy.max",
"numpy.square",
"numpy.zeros_like",
"numpy.ones_like",
"numpy.zeros",
"numpy.arange",
"numpy.arctan2",
"numpy.fromfile",
"numpy.clip",
"numpy.dstack",
"numpy.abs",
"numpy.indices",
"numpy.floor"
]
] |
project-pantheon/pantheon_glob_planner | [
"c0d50a53b36c4678192ec75ad7a4cd68c570daef"
] | [
"env/lib/python3.5/site-packages/cartopy/tests/crs/test_utm.py"
] | [
"# (C) British Crown Copyright 2018, Met Office\n#\n# This file is part of cartopy.\n#\n# cartopy is free software: you can redistribute it and/or modify it under\n# the terms of the GNU Lesser General Public License as published by the\n# Free Software Foundation, either version 3 of the License, or\n# (at your op... | [
[
"numpy.testing.assert_almost_equal",
"numpy.array"
]
] |
IcyCC/vnpy | [
"04f6ec013daddde2df36590625e0533e260b4bc1"
] | [
"vnpy/app/cta_backtester/ui/widget.py"
] | [
"import numpy as np\nimport pyqtgraph as pg\nfrom datetime import datetime, timedelta\n\nfrom vnpy.trader.constant import Interval, Direction, Offset\nfrom vnpy.trader.engine import MainEngine\nfrom vnpy.trader.ui import QtCore, QtWidgets, QtGui\nfrom vnpy.trader.ui.widget import BaseMonitor, BaseCell, DirectionCel... | [
[
"numpy.histogram"
]
] |
mvaldenegro/paper-subensembles-image-classification | [
"cc3a6567b1de82b9bfb1612ad8d0e73cdd7ae09b"
] | [
"svhn/evaluate_calibration.py"
] | [
"import numpy as np\nimport h5py\nimport pandas as pd\n\nfrom svhn_io import load_svhn\nfrom keras_uncertainty.utils import classifier_calibration_curve, classifier_calibration_error\n\nEPSILON = 1e-10\n\ndef load_hdf5_data(filename):\n inp = h5py.File(filename, \"r\")\n preds = inp[\"preds\"][...]\n\n inp... | [
[
"numpy.max",
"pandas.DataFrame",
"numpy.argmax"
]
] |
tolysz/numba | [
"d7953a18dbf5ea231dc16e967ce8e9b754578ea6",
"d7953a18dbf5ea231dc16e967ce8e9b754578ea6"
] | [
"numba/targets/npyimpl.py",
"numba/tests/test_cfunc.py"
] | [
"\"\"\"\nImplementation of functions in the Numpy package.\n\"\"\"\n\n\nimport math\nimport sys\nimport itertools\nfrom collections import namedtuple\n\nfrom llvmlite.llvmpy import core as lc\n\nimport numpy as np\nimport operator\n\nfrom . import builtins, callconv, ufunc_db, arrayobj\nfrom .imputils import Regist... | [
[
"numpy.dtype"
],
[
"numpy.ndindex",
"numpy.arange",
"numpy.empty"
]
] |
NicoleEic/projects | [
"028a4bb4b49539fc98b442f0a2f9434e95c94561",
"028a4bb4b49539fc98b442f0a2f9434e95c94561"
] | [
"neuro_scripts/manual_rigid_body/manual_rigid_body.py",
"data_visualization/plot_in_tkinter.py"
] | [
"import numpy as np\nimport nibabel as nib\nimport os\nimport sys\nsys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../../')\nfrom my_functions.matrix_stuff import *\n\ndef manual_rigid_body(fname = 'example_brain.nii.gz',\n outmat = 'transformation.mat',\n outi... | [
[
"numpy.radians"
],
[
"numpy.max",
"pandas.DataFrame",
"numpy.min",
"matplotlib.pyplot.subplots",
"matplotlib.backends.backend_tkagg.FigureCanvasTkAgg",
"numpy.random.randint"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.