repo_name
stringlengths
8
130
hexsha
list
file_path
list
code
list
apis
list
wlawt/synbiolic
[ "cbe9efc6d2992a9445dcd241a20321db9373e32e" ]
[ "score_test_joey.py" ]
[ "import csv\nimport time\nimport math\nimport numpy as np\nimport warnings\n\nfrom rdkit import Chem, DataStructs\nfrom rdkit.Chem import QED\nfrom sklearn.model_selection import KFold, StratifiedKFold\n\nimport torch\nimport torch.nn as nn\nfrom torch.optim.lr_scheduler import ExponentialLR, StepLR\nimport torch.n...
[ [ "numpy.save", "torch.nn.functional.softmax", "numpy.random.seed", "numpy.asarray", "torch.nn.GRU", "torch.cuda.is_available", "torch.cat", "torch.softmax", "numpy.isfinite", "torch.autograd.Variable", "sklearn.metrics.f1_score", "torch.tanh", "sklearn.model_sele...
tom-kuchler/vhive
[ "ae1f2f5920e7607e9902ed1060bda62b56e332ac" ]
[ "function-images/rnn_serving/rnn.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\n\n\nclass RNN(nn.Module):\n def __init__(self, input_size, hidden_size, output_size, all_categories, n_categories, all_letters, n_letters):\n super(RNN, self).__init__()\n self.hidden_size = hidden_size\n\n self.all_c...
[ [ "torch.nn.Linear", "torch.nn.LogSoftmax", "torch.zeros", "torch.cat", "torch.nn.Dropout" ] ]
gaurav272333/fastestimator
[ "d49e48d7375e19416ef337b3517dcfe42bb56589" ]
[ "fastestimator/op/numpyop/univariate/expand_dims.py" ]
[ "# Copyright 2019 The FastEstimator Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless r...
[ [ "numpy.expand_dims" ] ]
mikofski/FlyingCircus
[ "77641afd6683db4ef1ba351b78fb80604a655609" ]
[ "carousel/tests/test_calcs.py" ]
[ "\"\"\"\ntest calculations\n\"\"\"\n\nfrom nose.tools import ok_, eq_\nfrom carousel.core.calculations import Calc, CalcParameter\nfrom carousel.core.calculators import Calculator\nfrom carousel.tests import PROJ_PATH, sandia_performance_model\nimport os\nimport uncertainties\nfrom pvlib.solarposition import get_so...
[ [ "numpy.sqrt", "numpy.isclose", "numpy.abs" ] ]
CasualDan/ose-course-scientific-computing
[ "28c9595aabf47d98406c05dd9519245aa58fac05" ]
[ "lectures/integration/integration_algorithms.py" ]
[ "\"\"\"Algorithms for integration lecture.\"\"\"\nimport chaospy as cp\nimport numpy as np\n\n\ndef quadrature_newton_trapezoid_one(f, a, b, n):\n \"\"\"Return quadrature newton trapezoid example.\"\"\"\n xvals = np.linspace(a, b, n + 1)\n fvals = np.tile(np.nan, n + 1)\n h = xvals[1] - xvals[0]\n\n ...
[ [ "numpy.random.uniform", "numpy.tile", "numpy.sum", "numpy.array", "numpy.random.seed", "numpy.polynomial.legendre.leggauss", "numpy.sqrt", "numpy.linspace" ] ]
msakai/blueoil
[ "0c9160b524b17482d59ae48a0c11384f1d26dccc" ]
[ "blueoil/cmd/export.py" ]
[ "# -*- coding: utf-8 -*-\n# Copyright 2018 The Blueoil 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...
[ [ "tensorflow.compat.v1.train.Saver", "tensorflow.compat.v1.Session", "numpy.transpose", "tensorflow.compat.v1.ConfigProto", "tensorflow.config.experimental.list_physical_devices", "tensorflow.Graph", "numpy.expand_dims", "tensorflow.compat.v1.global_variables_initializer", "tens...
SwapneelM/pyprob
[ "4d93441ea838c3491a49050ae05d218a34708e6d" ]
[ "pyprob/model.py" ]
[ "import torch\nimport time\nimport sys\nimport os\nimport math\nimport random\nfrom termcolor import colored\n\nfrom .distributions import Empirical\nfrom . import util, state, TraceMode, PriorInflation, InferenceEngine, InferenceNetwork, ImportanceWeighting, Optimizer, LearningRateScheduler, AddressDictionary\nfro...
[ [ "torch.sum", "torch.no_grad" ] ]
moodyRahman/basenji
[ "0fb66324549bbd52c10ce714a1ad988e54ce2773" ]
[ "bin/basenji_test.py" ]
[ "#!/usr/bin/env python\n# Copyright 2017 Calico LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap...
[ [ "numpy.log2", "pandas.read_csv", "matplotlib.pyplot.figure", "matplotlib.pyplot.savefig", "pandas.DataFrame", "tensorflow.compat.v1.enable_eager_execution", "sklearn.metrics.roc_curve", "matplotlib.pyplot.gca", "sklearn.metrics.precision_recall_curve", "numpy.arange", "...
kconnour/planetary_disort
[ "ccdb0694d4146ef52003fdcec4deb5f65ec72306" ]
[ "pyrt/untested_utils/utilities/sporadic_particle_size_grid.py" ]
[ "# 3rd-party imports\nimport numpy as np\n\n\nclass SporadicParticleSizes:\n \"\"\" A SporadicParticleSizes object holds altitude info of particle sizes and can interpolate them onto a model\n grid\"\"\"\n\n def __init__(self, altitude_grid, particle_size_grid, model_grid):\n \"\"\"\n Paramet...
[ [ "numpy.flip" ] ]
danzhewuju/candock
[ "ab78aec64086b68ab65c53438332772efd5df260" ]
[ "models/multi_scale_resnet.py" ]
[ "import torch\r\nfrom torch import nn\r\nimport torch.nn.functional as F\r\nclass ResidualBlock(nn.Module):\r\n def __init__(self, inchannel, outchannel,kernel_size,stride=2):\r\n super(ResidualBlock, self).__init__()\r\n self.stride = stride\r\n self.conv = nn.Sequential(\r\n nn....
[ [ "torch.nn.BatchNorm2d", "torch.nn.MaxPool2d", "torch.nn.Linear", "torch.nn.AdaptiveAvgPool2d", "torch.nn.functional.relu", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.cat" ] ]
jefkine/zeta-learn
[ "04388f90093b52f5df2f334c898f3a1224f5a13f" ]
[ "ztlearn/toolkit/optviz.py" ]
[ "import numpy as np\n\nfrom ztlearn.utils import plot_opt_viz\nfrom ztlearn.initializers import InitializeWeights as init\nfrom ztlearn.optimizers import OptimizationFunction as optimize\n\nclass GbOptimization(object):\n\n def __init__(self, optimizer, init_method = 'ones'):\n self.optimizer = optimize...
[ [ "numpy.zeros_like", "numpy.zeros", "numpy.array2string", "numpy.arange", "numpy.meshgrid" ] ]
guenteru/pandas
[ "172ab7aee433fed7780bf96f0c723af284755324" ]
[ "pandas/core/indexes/base.py" ]
[ "from datetime import datetime, timedelta\nimport warnings\nimport operator\nfrom textwrap import dedent\n\nimport numpy as np\nfrom pandas._libs import (lib, index as libindex, tslib as libts,\n algos as libalgos, join as libjoin,\n Timedelta)\nfrom pandas._libs.li...
[ [ "pandas.core.indexes.frozen.FrozenList", "pandas.io.formats.format._get_adjustment", "numpy.asarray", "pandas.core.ops.make_invalid_op", "pandas.io.formats.format.format_array", "pandas.util._decorators.deprecate_kwarg", "pandas.core.dtypes.common.is_unsigned_integer_dtype", "panda...
tkhan11/TextClassification
[ "4a2121c8c396b8c1e453d0d49f5a92194dac53ba" ]
[ "drugReviewLSTM.py" ]
[ "import string\nimport numpy as np\nimport pandas as pd\nfrom numpy import argmax\nfrom numpy import array\nimport re\n\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\nimport seaborn as sns\n\nfrom keras.preprocessing.text import Tokenizer\nfrom keras.preprocessing.sequence import pad_sequences\...
[ [ "sklearn.metrics.classification_report", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.imshow", "matplotlib.pyplot.ylabel", "sklearn.preprocessing.LabelEncoder", "matplotlib.pyplot.xticks", "matplotlib.pyplot.title", "matplotlib.pyplot.text", "sklearn.preprocessing.OneHo...
stevehamwu/EmotionCauseExtraction
[ "b5a160f35f7b03bf3730b6885096dbc5f958df8b" ]
[ "metrics/ec/ec.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# @Time : 2019/2/22 17:21\n# @Author : Steve Wu\n# @Site : \n# @File : ec.py\n# @Software: PyCharm\n# @Github : https://github.com/stevehamwu\nimport itertools\nimport numpy as np\nfrom metrics.metrics import Metrics\nfrom utils.app.log import Logger\nfrom...
[ [ "sklearn.metrics.roc_auc_score" ] ]
stefanoteso/pystruct
[ "3bafeab13eea82fa6f3077686b951bf76d810a8d" ]
[ "examples/plot_latent_crf.py" ]
[ "\"\"\"\n===================\nLatent Dynamics CRF\n===================\n\nSolving a 2d grid problem by introducing latent variable interactions.\nThe input data is the same as in plot_grid_crf, a cross pattern.\nBut now, the center is not given an extra state. That makes the problem\nmuch harder to solve for a pair...
[ [ "numpy.argmax", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots", "sklearn.cross_validation.train_test_split" ] ]
lambertaurelle/dfcx-scrapi
[ "bff29c498f0d54701d651c2f99bcd51d4da5613c" ]
[ "src/dfcx_scrapi/tools/validation_util.py" ]
[ "\"\"\"Working with built in CX Validation featrure.\"\"\"\n\n# Copyright 2022 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/L...
[ [ "pandas.DataFrame", "pandas.merge" ] ]
lblogan14/rbcodes
[ "36c5c9e608c539ff1c0ae22468ab4a05d4fc29bd" ]
[ "GUIs/gui_dev/Spec_Inspect.py" ]
[ "import matplotlib\nmatplotlib.use('Qt5Agg')\nfrom astropy.io import fits\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom copy import deepcopy\nfrom astropy.convolution import convolve, Box1DKernel\nimport pdb\nimport sys\nimport os\n\n\nclass Spec_Inspect(object):\n\n def __init__(self,two_d_spec):\n...
[ [ "numpy.sum", "numpy.cumsum", "matplotlib.pyplot.draw", "numpy.append", "numpy.interp", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show", "matplotlib.use", "numpy.array", "numpy.int" ] ]
FiorenSt/AutoSourceID-Light
[ "6d1f4bf0a735c3de80bdba60d597c7d6dcfba4e3" ]
[ "LaplacianOfGaussian.py" ]
[ "import numpy as np\nfrom skimage.feature import blob_log\nfrom joblib import Parallel, delayed\n\n\n\n###############################\n# Loop for parallelization #\n###############################\n\ndef task(image, i, n_patches_x, n_patches_y):\n\n ###LoG step\n blobs_log = blob_log(image, min_sigma=1.43...
[ [ "numpy.column_stack" ] ]
SatoshiShimada/intermittent_crawl_gait
[ "c7f0582c72f36df2f5d1753bdc789226c6d91056" ]
[ "test.py" ]
[ "import numpy as np\n\nfrom geometry import *\nimport plot\n\ndef in_circle(circle, p):\n x = p.x - circle.center.x\n y = p.y - circle.center.y\n if np.sqrt(x ** 2 + y ** 2) <= circle.r:\n return True\n else:\n return False\n\ndef in_ellipse(ellipse, p):\n f1 = Point(np.sqrt(ellipse.a *...
[ [ "numpy.arange", "numpy.sqrt" ] ]
pyGSTi-Developers/pyGSTi
[ "bfedc1de4d604f14b0f958615776fb80ddb59e33" ]
[ "test/unit/tools/test_optools.py" ]
[ "import functools\nfrom unittest import mock\n\nimport sys\nimport numpy as np\nimport scipy\nfrom pygsti.baseobjs.basis import Basis\nfrom pygsti.baseobjs.errorgenlabel import LocalElementaryErrorgenLabel as LEEL\n\nimport pygsti.tools.basistools as bt\nimport pygsti.tools.lindbladtools as lt\nimport pygsti.tools....
[ [ "numpy.zeros_like", "scipy.linalg.expm", "numpy.zeros", "numpy.angle", "numpy.array", "numpy.identity" ] ]
saishan27/Green_nmt
[ "e82e625056a7f1134729d4b8f18293e3f017c2cf" ]
[ "seqtoseq/nmt/nmt/utils/misc_utils.py" ]
[ "# Copyright 2017 Google Inc. All Rights Reserved.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless ...
[ [ "tensorflow.shape", "tensorflow.Summary.Value", "tensorflow.gfile.GFile", "tensorflow.contrib.training.HParams", "tensorflow.gfile.Exists", "tensorflow.ConfigProto" ] ]
zhuang-group/SAQ
[ "594e9c74944999766e119e7137f50583aeedf52b" ]
[ "utils/asam.py" ]
[ "from collections import defaultdict\n\nimport torch\n\n\nclass ASAM:\n def __init__(self, optimizer, model, rho=0.5, eta=0.01):\n self.optimizer = optimizer\n self.model = model\n self.rho = rho\n self.eta = eta\n self.state = defaultdict(dict)\n\n @torch.no_grad()\n def...
[ [ "torch.stack", "torch.no_grad", "torch.norm", "torch.abs", "torch.clone", "torch.pow" ] ]
amjadalfawal/sineor-project-aiu
[ "a8e8456c18feddeab067d43862c6829c50d1555d" ]
[ "helper.py" ]
[ "import torch\nimport torch.utils.data\nimport h5py\nfrom datetime import datetime\nfrom helper import *\nimport PeptideBuilder\nimport Bio.PDB\nfrom Bio.PDB.vectors import Vector\nimport math\n\nAA_ID_DICT = {'A': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'I': 8, 'K': 9,\n 'L': 10, 'M': 11, '...
[ [ "torch.save" ] ]
GT-RIPL/robo-vln
[ "286870a7d1095fe2607b524572587a48854bc970" ]
[ "robo_vln_baselines/hierarchical_trainer.py" ]
[ "import copy\nimport gc\nimport json\nimport os\nimport random\nimport warnings\nfrom collections import defaultdict\nfrom typing import Dict\nimport matplotlib.pyplot as plt\nimport scipy.misc\nimport habitat_sim\nimport gc\nimport magnum as mn \nimport quaternion\nfrom habitat_sim.utils.common import quat_to_magn...
[ [ "torch.utils.data.DataLoader", "torch.stack", "torch.no_grad", "numpy.asarray", "torch.cuda.is_available", "torch.utils.data.get_worker_info", "torch.cat", "torch.cuda.empty_cache", "torch.from_numpy", "numpy.expand_dims", "numpy.isnan", "torch.sigmoid", "torch....
BingyangWu/Antman
[ "e9323cc8ccda637d3962b0de29ce154317f17e7a" ]
[ "TensorFlow-with-dynamic-scaling/tensorflow/python/training/monitored_session_test.py" ]
[ "# pylint: disable=g-bad-file-header\n# 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/l...
[ [ "tensorflow.python.training.monitored_session.MonitoredSession", "tensorflow.python.summary.summary.scalar", "tensorflow.python.training.monitored_session._WrappedSession.__init__", "tensorflow.python.training.monitored_session._RecoverableSession", "tensorflow.python.training.saver.Saver", ...
mdbernard/manim
[ "213cdede00fc1f90d1b22473112c3c4808b98349" ]
[ "manimlib/constants.py" ]
[ "import numpy as np\nimport os\n\n# Initialize directories\nenv_MEDIA_DIR = os.getenv(\"MEDIA_DIR\")\nif env_MEDIA_DIR:\n MEDIA_DIR = env_MEDIA_DIR\nelif os.path.isfile(\"media_dir.txt\"):\n with open(\"media_dir.txt\", 'rU') as media_file:\n MEDIA_DIR = media_file.readline().strip()\nelse:\n MEDIA_...
[ [ "numpy.array" ] ]
swords123/SSC-6D
[ "4e8ac58036e380fdc26a865747e1343e0ecee42b" ]
[ "eval/utils.py" ]
[ "import logging\nimport math\nimport os\n\nimport _pickle as cPickle\nimport cv2\nimport numpy as np\nimport torch\nfrom tqdm import tqdm\n\n\ndef align_rotation(sRT):\n \"\"\" Align rotations for symmetric objects.\n Args:\n sRT: 4 x 4\n \"\"\"\n s = np.cbrt(np.linalg.det(sRT[:3, :3])) # det求行列...
[ [ "numpy.sum", "numpy.ones", "matplotlib.pyplot.tight_layout", "numpy.cross", "numpy.asarray", "numpy.argsort", "numpy.ones_like", "numpy.trace", "numpy.amax", "numpy.cos", "torch.norm", "numpy.where", "numpy.identity", "numpy.mean", "numpy.minimum", "...
mmfink/raster-functions
[ "55a33bdd2ac4f3333eca6ccd49de6f3d5d21f7ba" ]
[ "functions/Landsat_Image_Synthesis.py" ]
[ "import numpy as np\nimport datetime\nfrom datetime import timedelta\nimport sys\n\n\nimport os\nimport pickle\n\n#debug_logs_directory = r'C:\\PROJECTS\\TEMP'\n\n# Based on QA Band - https://landsat.usgs.gov/collectionqualityband\nQA_BAND_NUM = 7\nlandsat_5_clear_pix_vals = [672, 676, 680, 684]\n#landsat_8_clear_p...
[ [ "numpy.mean", "numpy.ones", "numpy.asarray", "numpy.zeros" ] ]
18jeffreyma/tensorflow
[ "421453ee0c7471af40bbaf254ecf91d6a3a320cf" ]
[ "tensorflow/python/kernel_tests/list_ops_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.framework.test_util.run_v1_only", "tensorflow.python.eager.context.executing_eagerly", "tensorflow.python.framework.tensor_shape.unknown_shape", "tensorflow.python.ops.state_ops.scatter_update", "tensorflow.python.ops.list_ops.tensor_list_element_shape", "tensorflow.pyth...
frogbam/sasa_img
[ "031768c02ce40149f9cd82c3301404d8890dd03f" ]
[ "pcdet/models/dense_heads/point_head_vote.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\n\nfrom ...ops.iou3d_nms import iou3d_nms_utils\nfrom ...ops.roiaware_pool3d import roiaware_pool3d_utils\nfrom ...ops.pointnet2.pointnet2_batch import pointnet2_modules\nfrom ...utils import box_coder_utils, box_utils, common...
[ [ "torch.min", "torch.split", "torch.nn.BatchNorm1d", "torch.nn.init.constant_", "torch.no_grad", "torch.nn.Conv1d", "torch.nn.ReLU", "torch.from_numpy", "torch.nn.Sequential", "torch.max", "numpy.array", "torch.sigmoid", "torch.cat", "torch.clamp" ] ]
vlimant/NADE
[ "e2446c73250a99979c8710a8acbb14823a54bce0" ]
[ "deepnade/buml/NADE/NADE.py" ]
[ "from __future__ import division\nimport numpy as np\nimport theano\nimport theano.tensor as T\nfrom theano.tensor.shared_randomstreams import RandomStreams\nfrom Model import *\nfrom Utils.Estimation import Estimation\nimport Utils\n\n\nclass NADE(Model):\n \"\"\"A NADE abstract class\"\"\"\n def __init__(se...
[ [ "numpy.random.randint" ] ]
thesouther/MachineLearningAndMatrixAnalysis
[ "d756ffc56319e11076afa4bf185ea5825938a79d" ]
[ "language_model/model.py" ]
[ "# -*- coding: UTF-8 -*-\n\nimport torch\nimport torch.nn as nn\nimport numpy as np\nfrom torch.nn.utils import clip_grad_norm_\n \n# RNN语言模型\nclass RNN(nn.Module): #RNNLM类继承nn.Module类\n def __init__(self, vocab_size, embed_size, hidden_size, num_layers):\n super(RNN, self).__init__()\n #嵌入层 one-ho...
[ [ "torch.nn.LSTM", "torch.nn.Linear", "torch.nn.Embedding", "torch.nn.CrossEntropyLoss", "torch.cuda.is_available", "torch.zeros" ] ]
Jason-Khan/ubdvss
[ "76cabfa642af1f659920de32827ea6c3fe008588" ]
[ "semantic_segmentation/keras_callbacks.py" ]
[ "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# Copyright (С) ABBYY (BIT Software), 1993 - 2019. All rights reserved.\n\"\"\"\nВсе что связано с callbacks для обучения и валидации\n\"\"\"\nimport os\n\nimport keras.backend as K\nimport tensorflow as tf\nfrom keras import callbacks\nfrom keras.callbacks import ModelC...
[ [ "tensorflow.summary.image", "tensorflow.summary.merge_all" ] ]
pyspextool/pyspextool
[ "7a56584d85f1f20449c65c118ce65cb9f3865124" ]
[ "pyspextool/readuspexfits.py" ]
[ "from numpy import empty as npempty\nfrom numpy import int8 as npint8\nfrom numpy import stack as npstack\nfrom numpy import squeeze as npsqueeze\nfrom numpy import where as npwhere\nfrom numpy import absolute as npabsolute\nfrom numpy import shape as npshape\nfrom astropy.io import fits\nimport re\nimport sys\nfro...
[ [ "numpy.empty", "numpy.squeeze", "numpy.absolute", "numpy.stack", "numpy.where" ] ]
adamjanovsky/AndroidMalwareCrypto
[ "bacd30c2fa0dd00879604f713f6eedb9fa22e3cb" ]
[ "androidcrypto/analysis/training/logistic_regression.py" ]
[ "\"\"\"\nFile contains functions used to traing Logistic Regression.\n\nAuthor: Dominik Macko\n\"\"\"\n\nfrom typing import Dict, Any, Union, Callable, Tuple, Optional\n\nimport numpy as np\nimport pandas as pd\n#from sklearn.linear_model import LogisticRegression\n# this should be then easier to interpret - just a...
[ [ "pandas.Series" ] ]
Laurentww/smt
[ "4a4df255b9259965439120091007f9852f41523e" ]
[ "smt/surrogate_models/kpls.py" ]
[ "\"\"\"\nAuthor: Dr. Mohamed A. Bouhlel <mbouhlel@umich.edu>\n\nThis package is distributed under New BSD license.\n\"\"\"\n\nimport numpy as np\n\nfrom packaging import version\nfrom sklearn.cross_decomposition import PLSRegression as pls\n\nfrom smt.surrogate_models.krg_based import KrgBased\nfrom smt.utils.krigi...
[ [ "sklearn.cross_decomposition.PLSRegression", "numpy.zeros", "numpy.copy", "numpy.arange", "numpy.delete" ] ]
samie-hash/data-science-repo
[ "574ebad704e3f2ebce18f573af87cd95571b4cc9" ]
[ "credit-card-fraud/src/data/make_dataset.py" ]
[ "# -*- coding: utf-8 -*-\nimport sys\nsys.path.append('..')\n\nimport click\nimport logging\nfrom pathlib import Path\nfrom dotenv import find_dotenv, load_dotenv\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.pipeline import Pipeline\n\nimport features.build_features as buif\n\n@click.command()\n@click.a...
[ [ "pandas.read_csv" ] ]
yhpark-knu/deeplearning.ai-Assignments
[ "1db8b4faf71e6ae2714420aec8b6b0f7516363e7" ]
[ "Improving Deep Neural Networks/Week2/testCases.py" ]
[ "import numpy as np\r\n\r\ndef compute_cost_with_regularization_test_case():\r\n np.random.seed(1)\r\n Y_assess = np.array([[1, 1, 0, 1, 0]])\r\n W1 = np.random.randn(2, 3)\r\n b1 = np.random.randn(2, 1)\r\n W2 = np.random.randn(3, 2)\r\n b2 = np.random.randn(3, 1)\r\n W3 = np.random.randn(1, 3...
[ [ "numpy.array", "numpy.random.seed", "numpy.random.randn" ] ]
harrisonized/sf-rent-petitions
[ "6199534366a18cb38c8ff254b8a961fcdcc6ba38" ]
[ "functions/plotting/mpl.py" ]
[ "import matplotlib.pyplot as plt\n\n\n# Objects included in this file:\n\n# Functions included in this file:\n# # plot_empty (mpl)\n\n\ndef plot_empty(xlabel=None, ylabel=None,\n title=None,\n figsize=(8, 5)):\n \"\"\"Initialize fig object for seaborns objects that do not include fig ...
[ [ "matplotlib.pyplot.figure" ] ]
Romit-Maulik/Tutorials-Demos-Practice
[ "77eecdc2a202e6b333123cfd92e7db6dc0eea021" ]
[ "Other_Python/MAE_Tensorflow_Tutorial/MAE_TF_Tutorial.py" ]
[ "import numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib import cm\r\nfrom mpl_toolkits.mplot3d import Axes3D\r\nimport tensorflow as tf\r\nimport os\r\nimport time\r\n\r\n\r\ndef make_training_data():\r\n n_samples = 500 #Number of training data samples\r\n n_inputs = 2 #Number of ...
[ [ "matplotlib.pyplot.semilogx", "numpy.random.seed", "tensorflow.matmul", "matplotlib.pyplot.ylabel", "tensorflow.global_variables_initializer", "matplotlib.pyplot.figure", "numpy.cos", "matplotlib.pyplot.title", "matplotlib.pyplot.hist", "numpy.random.uniform", "numpy.ze...
Infaehig/ThesisPython
[ "0365cda2d006fdc3e762535ec6d0491007a81928" ]
[ "old/FEniCS/homogenization/netgen_meshes/oht_8layers_3patches.py" ]
[ "import os, sys\nsys.path.insert(0,os.path.dirname(os.path.dirname(os.path.realpath(__file__))))\n\nimport sa_utils\nimport netgen_csg\nimport numpy as np\n\nif __name__ == '__main__':\n prefix = 'oht_8layers_3patches'\n logger = sa_utils.LogWrapper(prefix+'/'+prefix)\n\n netgen_csg.create_patches(box = np...
[ [ "numpy.array" ] ]
LiqunChen0606/OT-Seq2Seq
[ "bde86f3e6291751aa79c03cd1c353fc65032b76a" ]
[ "texar/baseline_seq2seq_attn_ot.py" ]
[ "# Copyright 2018 The Texar Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required...
[ [ "tensorflow.global_variables_initializer", "tensorflow.ones_like", "tensorflow.local_variables_initializer", "tensorflow.Session", "tensorflow.concat", "tensorflow.transpose", "tensorflow.ConfigProto", "tensorflow.nn.l2_normalize", "tensorflow.tables_initializer" ] ]
ailabteam/clone_test_botnet-detection
[ "95f02d4967186440f60d83db04f139c197e178b7" ]
[ "botdet/models_pyg/graph_attention.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torch.nn import Parameter\nfrom torch_geometric.nn.inits import glorot, zeros\nfrom torch_geometric.utils import scatter_\n\nfrom .gcn_base_models import NodeModelBase\nfrom .common import activation, softmax\n\n\nclass NodeModelAttention(NodeModelBase):\n \"\"\"\n M...
[ [ "torch.mm", "torch.index_select", "torch.cat", "torch.nn.Dropout", "torch.Tensor" ] ]
egvincent/rgbd-sem-seg
[ "054890ace318a883aac0ad1bfa3d2383939a6892" ]
[ "preprocessing/preprocess-dataset.py" ]
[ "#!/usr/bin/env python\n#######################################################################################\n# The MIT License\n\n# Copyright (c) 2014 Hannes Schulz, University of Bonn <schulz@ais.uni-bonn.de>\n# Copyright (c) 2013 Benedikt Waldvogel, University of Bonn <mail@bwaldvogel.de>\n# Copy...
[ [ "numpy.ones", "numpy.nanmax", "numpy.nanmin", "numpy.ndarray", "numpy.dstack", "numpy.isnan" ] ]
paulinelemenkova/Python-script-029-SM-Quantile-Regression
[ "fde0e7455822fa532a5f23e1c5811d21e8b8606b" ]
[ "Script-029c-SM-Quantile regression (plate_maria-sedim_thick).py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\nfrom __future__ import print_function\n#get_ipython().run_line_magic('matplotlib', 'inline')\nimport os\nimport patsy\nimport numpy as np\nimport pandas as pd\nimport statsmodels.api as sm\nimport statsmodels.formula.api as smf\nfrom statsmodels.regression.quantile_regressio...
[ [ "pandas.read_csv", "matplotlib.pyplot.tight_layout", "pandas.DataFrame", "matplotlib.pyplot.annotate", "matplotlib.pyplot.subplots", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.subplots_adjust", "matplotlib.pyplot.show" ] ]
TeoZosa/deep-learning-v2-pytorch
[ "8e73c26f2ebf49769b798e9ff26bd90d7de69f7d" ]
[ "deep_learning_v2_pytorch/project-tv-script-generation/problem_unittests.py" ]
[ "from unittest.mock import MagicMock, patch\n\nimport numpy as np\nimport torch\n\n\nclass _TestNN(torch.nn.Module):\n def __init__(self, input_size, output_size):\n super().__init__()\n self.decoder = torch.nn.Linear(input_size, output_size)\n self.forward_called = False\n\n def forward(...
[ [ "torch.nn.Linear", "torch.nn.CrossEntropyLoss", "torch.from_numpy", "numpy.random.rand", "numpy.random.randint" ] ]
ToJestKrzysio/ProcessVisualization
[ "9a359a31816bf1be65e3684a571509e3a2c2c0ac" ]
[ "src/bpmn_python/bpmn_process_csv_import.py" ]
[ "# coding=utf-8\n\"\"\"\nImplementation of exporting process to CSV functionality, as proposed in article \"Spreadsheet-Based Business\nProcess Modeling\" by Kluza k. and Wisniewski P.\n\"\"\"\nfrom __future__ import print_function\n\nimport copy\n\nimport pandas as pd\nimport re\nimport six\n\nfrom . import bpmn_p...
[ [ "pandas.read_csv" ] ]
nicolenair/poke-env
[ "47f645093441c13448278290c872102da9339025" ]
[ "src/CEMAgent/rl_with_open_ai_gym_wrapper-cem.py" ]
[ "# -*- coding: utf-8 -*-\nimport numpy as np\nimport tensorflow as tf\nimport pandas as pd\nimport json\nimport random\n\nfrom poke_env.player_configuration import PlayerConfiguration\nfrom poke_env.player.env_player import Gen7EnvSinglePlayer\nfrom poke_env.player.random_player import RandomPlayer\nfrom poke_env.p...
[ [ "tensorflow.keras.models.Sequential", "numpy.ones", "tensorflow.keras.layers.Flatten", "tensorflow.keras.models.load_model", "pandas.DataFrame", "numpy.random.seed", "tensorflow.keras.layers.Activation", "tensorflow.keras.layers.Dense", "numpy.concatenate", "tensorflow.rand...
leehsiu/pyopenpose
[ "c4feef04a9e563fb91e18f745bc187c6f2aeb72c" ]
[ "openpose/model/rpn/loss.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n\"\"\"\nThis file contains specific functions for computing losses on the RPN\nfile\n\"\"\"\n\nimport torch\nfrom torch.nn import functional as F\n\nfrom .utils import concat_box_prediction_layers\n\nfrom ..balanced_positive_negative_sampler ...
[ [ "torch.cat", "torch.nn.functional.binary_cross_entropy_with_logits" ] ]
unendin/allennlp
[ "0dcbaea6dbc6cc43e24a3564d6d37f8a1421484c" ]
[ "tests/models/constituency_parser_test.py" ]
[ "# pylint: disable=no-self-use,invalid-name,no-value-for-parameter\nimport os\n\nfrom nltk import Tree\nimport torch\nfrom torch.autograd import Variable\n\n\nfrom allennlp.common.testing.model_test_case import ModelTestCase\nfrom allennlp.models.constituency_parser import SpanInformation\n\nclass SpanConstituencyP...
[ [ "torch.LongTensor" ] ]
helene-todd/M2_thesis_code
[ "f844d6652229c6abe09bd40aa43f5002faa9e5ba" ]
[ "with_chemical_syn/simulation.py" ]
[ "from matplotlib import cm, rcParams\nimport matplotlib.pyplot as plt\nimport matplotlib.colors as colors\nimport matplotlib as matplotlib\nfrom matplotlib import patheffects\nimport numpy as np\nimport math as math\nimport random as rand\nimport os, sys, csv\nimport pandas as pd\n\n# matplotlib.pyplot.xkcd(scale=....
[ [ "numpy.sum", "matplotlib.pyplot.legend", "numpy.append", "matplotlib.pyplot.figure", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.savefig", "numpy.exp", "matplotlib.pyplot.xlim", "matplotlib.pyplot.title", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", ...
Brian-ZhenLiu/CNN_models
[ "7cc646b181d86facf19b4129762504ea7b8f1409" ]
[ "Model_Code/train_dnn_002.py" ]
[ "import tensorflow as tf\r\nimport os\r\n#from PIL import Image\r\nimport random\r\nimport numpy as np\r\nfrom datetime import datetime\r\nfrom sklearn.metrics import confusion_matrix\r\nfrom sklearn.metrics import classification_report\r\n\r\nslim = tf.contrib.slim\r\n\r\nglobal first\r\nfirst = True\r\n\r\nclassn...
[ [ "tensorflow.initialize_all_variables", "tensorflow.reshape", "sklearn.metrics.classification_report", "tensorflow.decode_raw", "tensorflow.variable_scope", "tensorflow.matmul", "tensorflow.contrib.layers.xavier_initializer_conv2d", "tensorflow.one_hot", "tensorflow.train.batch"...
Haichao-Zhang/alf_randperm_reproduce
[ "d5223b7534ab20ca725aac940ad274ef806d1d3e" ]
[ "alf/networks/mdq_critic_networks.py" ]
[ "# Copyright (c) 2020 Horizon Robotics and ALF Contributors. 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...
[ [ "torch.empty", "torch.logsumexp", "torch.distributions.categorical.Categorical", "torch.no_grad", "numpy.log", "torch.max", "torch.zeros", "torch.cat" ] ]
simonlet/MissRateSimulator
[ "89f481a3408d243a61a6907f332e36ca9a2fb45d" ]
[ "printers/simulator_printer.py" ]
[ "import matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.patches as mpatches\nimport random\nimport math\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport itertools\nfrom matplotlib import rcParams\nfrom matplotlib.backends.backend_pdf import PdfPages\n\nN = 20\nwidth = 0.15 # the width of the bars\n...
[ [ "matplotlib.pyplot.grid", "matplotlib.pyplot.gcf", "matplotlib.backends.backend_pdf.PdfPages", "matplotlib.pyplot.clf", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.subplot", "matplotlib.pyplot.ylabel", "matplotlib.use" ] ]
oz90210/Pyto
[ "901ac307b68486d8289105c159ca702318bea5b0" ]
[ "site-packages/skimage/filters/rank/tests/test_rank.py" ]
[ "import os\nimport numpy as np\nfrom skimage._shared.testing import (assert_equal, assert_array_equal,\n assert_allclose)\nfrom skimage._shared import testing\n\nimport skimage\nfrom skimage.util import img_as_ubyte, img_as_float\nfrom skimage import data, util, morphology\nfrom ...
[ [ "numpy.ones", "numpy.zeros_like", "numpy.tile", "numpy.empty", "numpy.zeros", "numpy.random.seed", "numpy.asarray", "numpy.ones_like", "numpy.empty_like", "numpy.arange", "numpy.random.rand", "numpy.full", "numpy.array", "numpy.random.randint" ] ]
must-11/ap_experiment
[ "50af0e239bfbd4e3b02c8a23fe1b110601715952" ]
[ "src/dm/func.py" ]
[ "from collections import deque\n\nimport numpy as np\n\n\ndef make_Gm(G, match):\n n = G.shape[0]\n Gm = np.zeros((2*n, 2*n), dtype=np.int8)\n\n Gm[: n, n: ] = G.copy()\n for i, j in enumerate(match):\n if j != -999:\n Gm[j, i] = 1\n return Gm\n\n\ndef trans_match(match):\n n = l...
[ [ "numpy.array", "numpy.where", "numpy.argsort", "numpy.zeros" ] ]
xincao79/tensorflow
[ "7fa0cf39f854d5fdaaa19ad6425dfed02f5fea64" ]
[ "tensorflow/contrib/learn/python/learn/estimators/head_test.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...
[ [ "numpy.sum", "tensorflow.python.ops.variables.initialize_local_variables", "numpy.multiply", "numpy.ones", "numpy.log", "tensorflow.core.framework.summary_pb2.Summary", "tensorflow.contrib.learn.python.learn.estimators.head.poisson_regression_head", "numpy.ma.masked_array", "te...
slf12/PaddleDetection
[ "de1adc8be683d21b59fdd6ecada9d3d2eff39eb9" ]
[ "ppdet/data/source/coco.py" ]
[ "# Copyright (c) 2019 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 re...
[ [ "numpy.array", "numpy.ones", "numpy.zeros" ] ]
mvpossum/deep-learning
[ "cba1206a0b54ffbf59af4fc43435252bbee5a23e" ]
[ "tp4/entrega/train_lstm.py" ]
[ "from __future__ import print_function\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Activation, Dropout\nfrom keras.layers import LSTM\nfrom keras.optimizers import RMSprop\nfrom keras.utils.data_utils import get_file\nimport numpy as np\nimport random\nimport sys\nimport h5py\nfrom utils i...
[ [ "numpy.sum", "numpy.asarray", "numpy.argmax", "numpy.exp", "numpy.log", "numpy.random.multinomial" ] ]
Rambatino/Kruskals
[ "24d68822ce207633f878c3fc2c28679a1e746003" ]
[ "tests/test_kruskals.py" ]
[ "\"\"\"\nTesting module for Kruskals\n\"\"\"\n\nfrom setup_tests import Kruskals\nimport numpy as np\nimport pandas as pd\nimport pytest\n\ndef test_driver_score():\n \"\"\" Test driver_score is calculated correctly \"\"\"\n ndarr = np.array([\n [1, 2, 3, 4, 5, 6],\n [6, 5, 4, 3, 8, 1],\n [1, 1...
[ [ "numpy.array", "pandas.DataFrame", "numpy.round", "numpy.array_equal" ] ]
rokrokss/xgboost_ray
[ "15396fd96daf866512d5f4e4337cbfc4cf3f6061" ]
[ "xgboost_ray/data_sources/ml_dataset.py" ]
[ "from typing import Any, Optional, Sequence, List, Tuple, Dict\n\nfrom ray.actor import ActorHandle\n\nimport pandas as pd\nfrom xgboost_ray.data_sources.data_source import DataSource, RayFileType\n\ntry:\n import pyarrow # noqa: F401\n PYARROW_INSTALLED = True\nexcept (ImportError, AttributeError):\n PYA...
[ [ "pandas.concat" ] ]
MolecularAI/route-distances
[ "7dac87578072f363c8857c85de6502b45e2c7ede" ]
[ "route_distances/ted/reactiontree.py" ]
[ "\"\"\"\nModule containing helper classes to compute the distance between to reaction trees using the APTED method\nSince APTED is based on ordered trees and the reaction trees are unordered, plenty of\nheuristics are implemented to deal with this.\n\"\"\"\nfrom __future__ import annotations\nimport itertools\nimpo...
[ [ "numpy.zeros", "numpy.prod" ] ]
jkroenke/pyunicorn
[ "0d0de845587879e303d738b62e7831058e28e596" ]
[ "pyunicorn/funcnet/coupling_analysis_pure_python.py" ]
[ "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n#\n# This file is part of pyunicorn.\n# Copyright (C) 2008--2019 Jonathan F. Donges and pyunicorn authors\n# URL: <http://www.pik-potsdam.de/members/donges/software>\n# License: BSD (3-clause)\n#\n# Please acknowledge and cite the use of this software and its authors\n# ...
[ [ "numpy.random.uniform", "numpy.fft.fft", "numpy.sort", "numpy.random.shuffle", "numpy.empty", "numpy.zeros", "numpy.abs", "numpy.repeat", "numpy.copy", "numpy.exp", "numpy.fft.ifft", "numpy.log", "numpy.ndim", "numpy.isnan", "numpy.array", "numpy.ran...
robotanica/moveo_ros
[ "12d9e81dd393f3b540e6b9f771ce332a73c86472" ]
[ "object_detector_app/object_detection/utils/ops.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.reshape", "tensorflow.unstack", "tensorflow.ones", "tensorflow.squeeze", "tensorflow.convert_to_tensor", "tensorflow.concat", "tensorflow.slice", "tensorflow.split", "tensorflow.reduce_sum", "tensorflow.math.is_nan", "tensorflow.greater", "tensorflow.com...
gjheij/linescanning
[ "967a2ac81a162e50639b4e211f1317f6203abcf6" ]
[ "linescanning/dataset.py" ]
[ "import hedfpy\nfrom . import glm, plotting, preproc, utils\nimport matplotlib.pyplot as plt\nimport nibabel as nb\nfrom nilearn.signal import clean\nimport numpy as np\nimport os\nimport pandas as pd\nfrom scipy import io, stats\nimport warnings\n\nopj = os.path.join\npd.options.mode.chained_assignment = None # di...
[ [ "numpy.var", "numpy.savetxt", "numpy.vstack", "numpy.full_like", "matplotlib.pyplot.figure", "numpy.abs", "pandas.HDFStore", "numpy.where", "numpy.unique", "scipy.io.loadmat", "numpy.load", "pandas.read_csv", "numpy.arange", "numpy.hstack", "pandas.conca...
NickVeld/scikit-learn-proj
[ "9694a5641a7abbec96c93817aed88ce827dbacd3" ]
[ "sklearn/linear_model/bayes.py" ]
[ "\"\"\"\nVarious bayesian regression\n\"\"\"\nfrom __future__ import print_function\n\n# Authors: V. Michel, F. Pedregosa, A. Gramfort\n# License: BSD 3 clause\n\nfrom math import log\nimport numpy as np\nfrom scipy import linalg\n\nfrom .base import LinearModel\nfrom ..base import RegressorMixin\nfrom ..utils.extm...
[ [ "numpy.ones", "numpy.sum", "numpy.eye", "numpy.zeros", "numpy.diag", "numpy.var", "numpy.reshape", "numpy.abs", "numpy.copy", "numpy.log", "numpy.sqrt", "numpy.dot", "scipy.linalg.svd" ] ]
danielgordon10/tensorflow
[ "395cfc42ee3c5842f5383f4049674c012998b133" ]
[ "tensorflow/python/ops/sparse_ops.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.python.util.deprecation.deprecated_argument_lookup", "tensorflow.python.framework.ops.colocate_with", "tensorflow.python.ops.gen_sparse_ops._deserialize_many_sparse", "tensorflow.python.ops.array_ops.expand_dims", "tensorflow.python.ops.gen_sparse_ops._sparse_split", "tensorflo...
HassamSheikh/jaxrl
[ "f3d924d793bd7e0ba46b24b2092cc2817c7f962f" ]
[ "jaxrl/agents/ddpg/ddpg_learner.py" ]
[ "\"\"\"Implementations of algorithms for continuous control.\"\"\"\n\nimport functools\nfrom typing import Sequence, Tuple\n\nimport jax\nimport jax.numpy as jnp\nimport numpy as np\nimport optax\n\nfrom jaxrl.agents.ddpg.actor import update as update_actor\nfrom jaxrl.agents.ddpg.critic import update as update_cri...
[ [ "numpy.random.normal", "numpy.clip", "numpy.asarray" ] ]
vvandriichuk/etl_spark_airflow_emr
[ "0c793ca67389a789c8eb1f487fe3a384e714ff3b" ]
[ "src/data/helper_functions.py" ]
[ "from time import strftime, sleep\nimport sys \nimport os\nimport pandas as pd\nfrom glob import glob \nimport numpy as np\n\n\n\ndef inspect_core_specifications(data, descriptives=False):\n\t\"\"\"Inspect data types, shape and descriptives\n\t\n\t:param data: pandas dataframe \n\t:param descriptives: boolean, prin...
[ [ "pandas.DataFrame", "pandas.concat", "numpy.zeros" ] ]
aoyandong/horovod
[ "e94d8ea0dff8c2b45698cfe4fabb2e6553d0b9a8" ]
[ "horovod/spark/torch/estimator.py" ]
[ "# Copyright 2019 Uber Technologies, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "torch.load", "torch.no_grad", "torch.tensor", "numpy.prod", "torch.device" ] ]
sweersr/visions
[ "1af04235cb77bec52e4923627dfbf968ed1a584d" ]
[ "tests/series.py" ]
[ "import datetime\nimport uuid\nfrom ipaddress import IPv4Address\nfrom pathlib import PureWindowsPath, PurePosixPath\nfrom urllib.parse import urlparse\nimport pandas as pd\nimport numpy as np\nfrom shapely import wkt\n\nfrom visions.core.implementations.types import *\n\n\ndef get_series():\n return [\n ...
[ [ "pandas.Series", "pandas.date_range", "numpy.complex", "pandas.datetime", "pandas.Categorical", "pandas.Timedelta", "numpy.array" ] ]
zichuan-scott-xu/automl-workflow
[ "d108e55da943775953b9f1801311a86ac07e58a0" ]
[ "examples/DeepWisdom/Auto_Tabular/model_lib/xgb.py" ]
[ "import xgboost as xgb\nfrom sklearn.metrics import roc_auc_score\nimport hyperopt\nfrom hyperopt import STATUS_OK, Trials, hp, space_eval, tpe\nimport lightgbm as lgb\nimport pandas as pd\nimport numpy as np\nfrom sklearn.model_selection import train_test_split, RandomizedSearchCV\n\nfrom Auto_Tabular.utils.log_ut...
[ [ "sklearn.metrics.roc_auc_score", "numpy.random.RandomState", "numpy.log", "numpy.stack", "numpy.random.randint", "numpy.linspace", "sklearn.model_selection.StratifiedShuffleSplit" ] ]
timvink/tune-sklearn
[ "97ff39a2a9d4a6e1a87183408ebaa4d879102737" ]
[ "tune_sklearn/tune_basesearch.py" ]
[ "\"\"\"Parent class for a cross-validation interface\nbuilt with a Ray Tune back-end.\n\nImplementation derived from referencing the equivalent\nGridSearchCV interfaces from Dask and Optuna.\n\nhttps://ray.readthedocs.io/en/latest/tune.html\nhttps://dask.org\nhttps://optuna.org\n -- Anthony Yu and Michael Chau\n...
[ [ "sklearn.utils.validation.check_is_fitted", "sklearn.base.clone", "sklearn.exceptions.NotFittedError", "numpy.ceil", "sklearn.base.is_classifier", "numpy.array", "scipy.stats.rankdata", "numpy.empty", "pandas.DataFrame", "sklearn.model_selection.check_cv", "numpy.averag...
DNNTesting/fse20
[ "cf261c322f4d588b15125aa2b2f289c6a89a6928" ]
[ "submissions/reusable/CovTesting/Coverage VS. # Adv Examples/tknp_testing.py" ]
[ "import argparse\nimport os\nimport random\nimport shutil\nimport warnings\nimport sys\n\nwarnings.filterwarnings(\"ignore\")\n\nfrom keras import backend as K\nimport numpy as np\nfrom PIL import Image, ImageFilter\nfrom skimage.measure import compare_ssim as SSIM\nimport keras\n\nimport tensorflow as tf\nimport o...
[ [ "numpy.save", "numpy.sum", "numpy.argsort", "numpy.append", "numpy.argpartition", "numpy.reshape", "numpy.unique", "numpy.minimum", "numpy.load", "numpy.zeros", "numpy.max", "numpy.min", "tensorflow.Session", "numpy.prod", "numpy.sort", "numpy.maximu...
LouisFaure/scFates
[ "e925b5316c77d923514ac14572eeb738d9f5dd2c" ]
[ "scFates/plot/utils.py" ]
[ "# Extracted from scanpy, thanks!\nfrom functools import lru_cache\nfrom typing import Union, Sequence\nfrom typing_extensions import Literal\n\nimport numpy as np\nfrom matplotlib import pyplot as pl\nfrom matplotlib import rcParams\nfrom matplotlib.axes import Axes\nfrom matplotlib.figure import SubplotParams as ...
[ [ "pandas.api.types.is_categorical_dtype", "pandas.api.types.is_string_dtype", "numpy.argwhere", "numpy.any", "pandas.api.types.is_integer_dtype", "pandas.Categorical", "matplotlib.colors.LinearSegmentedColormap.from_list", "pandas.api.types.is_bool_dtype", "matplotlib.pyplot.axe...
NightKirie/NCKU_NLP_2108_industry3
[ "23ac13644b140587e23cfeffb114c7c6f46f17a2" ]
[ "Packages/matplotlib-2.2.2/lib/mpl_examples/user_interfaces/embedding_in_tk_sgskip.py" ]
[ "\"\"\"\n===============\nEmbedding In Tk\n===============\n\n\"\"\"\n\nfrom six.moves import tkinter as Tk\n\nfrom matplotlib.backends.backend_tkagg import (\n FigureCanvasTkAgg, NavigationToolbar2TkAgg)\n# Implement the default Matplotlib key bindings.\nfrom matplotlib.backend_bases import key_press_handler\nf...
[ [ "numpy.sin", "matplotlib.figure.Figure", "matplotlib.backends.backend_tkagg.FigureCanvasTkAgg", "matplotlib.backend_bases.key_press_handler", "numpy.arange", "matplotlib.backends.backend_tkagg.NavigationToolbar2TkAgg" ] ]
rudyn2/wine_market_temporal_prediction
[ "ab51dbdaa75dfd532eaef3f712ca21f3117c6d74" ]
[ "src/TimeSeries/TimeSeries.py" ]
[ "from collections import defaultdict\nfrom copy import deepcopy\nfrom typing import List, Tuple\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nfrom sklearn.preprocessing import MinMaxScaler\n\n\nclass DiffOperation:\n\n def __init__(self):\n self._data_copy: pd.Series = pd.Se...
[ [ "pandas.Series", "pandas.read_csv", "sklearn.preprocessing.MinMaxScaler", "pandas.to_numeric", "pandas.DataFrame", "matplotlib.pyplot.subplots", "pandas.to_datetime", "matplotlib.pyplot.show", "numpy.array", "numpy.float64" ] ]
chyan26/ginga
[ "e00c887d8660e0a4178f9681ca7ea7784b7ca129" ]
[ "ginga/qtw/CanvasRenderQt.py" ]
[ "#\n# CanvasRenderQt.py -- for rendering into a ImageViewQt widget\n#\n# This is open-source software licensed under a BSD license.\n# Please see the file LICENSE.txt for details.\n#\nimport numpy as np\n\nfrom ginga.qtw.QtHelp import (QtCore, QPainter, QPen, QPolygon, QColor,\n QPainte...
[ [ "numpy.array" ] ]
Capri2014/pyro
[ "546f9010aeb2308ae566726b1cec67a7b4fda9c2" ]
[ "pyro/distributions/mixture.py" ]
[ "import torch\nfrom torch.distributions import constraints\nfrom torch.distributions.utils import lazy_property\n\nfrom pyro.distributions.torch_distribution import TorchDistribution\nfrom pyro.distributions.util import broadcast_shape\n\n\nclass MaskedConstraint(constraints.Constraint):\n \"\"\"\n Combines t...
[ [ "torch.is_tensor", "torch.Size" ] ]
PaulMarcelo/Python
[ "66a9fa21d2d803f5b06d285c705812251dc6d234" ]
[ "Rest Django Framework/api_image_manager/blur_image_app/blur_image.py" ]
[ "import imutils\nimport numpy as np\nimport cv2\nimport base64\n\n\ndef byte_to_image(string_byte):\n jpg_original = base64.b64decode(string_byte)\n jpg_as_np = np.frombuffer(jpg_original, dtype=np.uint8)\n img = cv2.imdecode(jpg_as_np, flags=1)\n return img\n\n\ndef file_to_image(file):\n img = np.a...
[ [ "numpy.fft.fftshift", "numpy.fft.fft2", "numpy.fft.ifft2", "numpy.abs", "numpy.fft.ifftshift", "numpy.mean", "numpy.frombuffer" ] ]
BrandonSLockey/HFPN-Stochastic-Version
[ "ed333a2557d4b70d34cd3e4c0c2eb4133d8a85a3" ]
[ "HFPN-Stochastic-Version/sHFPN Plotting.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\nimport os\nimport sys\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom scipy.signal import find_peaks_cwt\nfrom datetime import datetime\n\n#from scipy.signal import convolve\n#get_ipython().run_line_magic('matplotlib', 'qt')\n# Only run this cell o...
[ [ "numpy.zeros_like", "numpy.sum", "matplotlib.pyplot.legend", "numpy.ones", "numpy.concatenate", "matplotlib.pyplot.subplots", "numpy.arange", "matplotlib.pyplot.show", "matplotlib.pyplot.hist", "numpy.round", "numpy.std", "numpy.convolve", "numpy.array", "nu...
jielyugt/calibration
[ "1b9be673fb7ff8cf481e875153b1a7649e3b6e67" ]
[ "scripts/lenet/train_cifar100.py" ]
[ "# Training procedure for LeNet-5 CIFAR-100.\n#Code base from https://github.com/BIGBALLON/cifar-10-cnn/blob/master/1_Lecun_Network/LeNet_dp_da_wd_keras.py \n\nimport keras\nimport numpy as np\nfrom keras import optimizers\nfrom keras.datasets import cifar100\nfrom keras.models import Sequential\nfrom keras.layers ...
[ [ "numpy.std", "sklearn.model_selection.train_test_split", "numpy.mean" ] ]
uaca/deepy
[ "090fbad22a08a809b12951cd0d4984f5bd432698" ]
[ "deepy/networks/network.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport cPickle as pickle\nimport gzip\nimport logging as loggers\nimport os\nfrom threading import Thread\n\nimport filelock\nimport numpy as np\nimport theano\nimport theano.tensor as T\n\nimport deepy\nfrom deepy.utils.map_dict import MapDict\nfrom deepy.layers.b...
[ [ "numpy.load", "numpy.savez", "numpy.savez_compressed" ] ]
mknz/dsr-road-roughness-prediction
[ "5f56b6ba5da70a09f2c967b7f32c740072e20ed1" ]
[ "eval_seg.py" ]
[ "'''Evaluation script'''\nimport argparse\nfrom pathlib import Path\n\nimport numpy as np\n\nfrom tqdm import tqdm\n\nimport torch\n\nfrom torch.utils.data import DataLoader\n\nfrom PIL import Image\n\nfrom albumentations import Compose\nfrom albumentations import CenterCrop\n\nfrom torchvision.transforms.functiona...
[ [ "torch.utils.data.DataLoader", "torch.load", "torch.no_grad", "numpy.array", "numpy.mean" ] ]
joaquimlyrio/feat-visualization
[ "47ead5044d1239dba1133b7ea812b2ed7f2564dc" ]
[ "lib/ConvDeconvDataSet2.py" ]
[ "\n# Imports\nimport numpy as np\nimport tensorflow as tf\nimport matplotlib.pyplot as plt\nimport random\nimport math\nfrom scipy.misc import imsave\n\n###\n### Convolutional Neural Network (CNN) for MNIST\n###\nclass CnnData2: ##### OBS: only works if stride size = filter size of pooling layer\n \n def __in...
[ [ "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.reshape", "numpy.argsort", "matplotlib.pyplot.imshow", "tensorflow.convert_to_tensor", "tensorflow.concat", "tensorflow.Variable", "matplotlib.pyplot.figure", "numpy.reshape", "numpy.zeros", "tensorflow.nn.c...
happy-jihye/Cartoon-StyleGAN
[ "d1c0304f633e272135b1a07eb36fa26f387dddf9" ]
[ "projector.py" ]
[ "import argparse\nimport math\nimport os\n\nimport torch\nfrom torch import optim\nfrom torch.nn import functional as F\nfrom torchvision import transforms\nfrom PIL import Image\nfrom utils import tensor2image, save_image\nfrom tqdm import tqdm\n\nimport lpips\nfrom model import Generator, Encoder\n\n\ndef noise_r...
[ [ "torch.nn.functional.mse_loss", "torch.stack", "torch.randn_like", "torch.load", "torch.randn", "torch.roll", "torch.save", "torch.no_grad", "torch.optim.Adam", "torch.cat", "torch.mean" ] ]
brando90/pytorch-meta
[ "389e35ef9aa812f07ce50a3f3bd253c4efb9765c" ]
[ "torchmeta/datasets/tieredimagenet.py" ]
[ "import numpy as np\nfrom PIL import Image\nimport h5py\nimport json\nimport os\nimport io\nimport pickle\n\nfrom torchmeta.utils.data import Dataset, ClassDataset, CombinationMetaDataset\n# QKFIX: See torchmeta.datasets.utils for more informations\nfrom torchmeta.datasets.utils import download_file_from_google_dri...
[ [ "numpy.where", "numpy.squeeze" ] ]
waelterm/Udacity_Project9-SystemIntegration
[ "e652b7d72415cd33706bcd398f2fbe7d17e1fdb4" ]
[ "ros/src/tl_detector/light_classification/tl_classifier.py" ]
[ "from styx_msgs.msg import TrafficLight\nimport tensorflow as tf\nimport numpy as np\nimport datetime\n\nclass TLClassifier(object):\n def __init__(self):\n TrainedModelPath = r'light_classification/model/faster_rcnn_frozen_inference_graph.pb'\n self.graph = tf.Graph()\n self.threshold = .5\...
[ [ "numpy.squeeze", "tensorflow.gfile.GFile", "tensorflow.Graph", "numpy.expand_dims", "tensorflow.Session", "tensorflow.import_graph_def", "tensorflow.GraphDef" ] ]
brownbaerchen/pySDC
[ "31293859d731646aa09cef4345669eac65501550" ]
[ "pySDC/playgrounds/PETSc/playground_data.py" ]
[ "\nimport numpy as np\n\nfrom petsc4py import PETSc\n\n\ndef main():\n # import petsc4py\n\n\n n = 4\n dx = 1.0/(n - 1)\n dy = dx\n comm= PETSc.COMM_WORLD\n da = PETSc.DMDA().create([n, n], dof=1, stencil_width=1, comm=comm)\n dar = da.refine()\n print(dar.getSizes())\n exit()\n\n rank...
[ [ "numpy.sin" ] ]
jefflai108/espnet
[ "a51f21cb94a4dead2300a8a13adb92ffdfbafbe8" ]
[ "test/espnet2/tts/test_fastspeech2.py" ]
[ "import pytest\nimport torch\n\nfrom espnet2.tts.fastspeech2 import FastSpeech2\n\n\n@pytest.mark.parametrize(\"postnet_layers\", [0, 1])\n@pytest.mark.parametrize(\"reduction_factor\", [1, 2, 3])\n@pytest.mark.parametrize(\n \"spk_embed_dim, spk_embed_integration_type\",\n [(None, \"add\"), (2, \"add\"), (2,...
[ [ "torch.randn", "torch.no_grad", "torch.tensor", "torch.randint" ] ]
dailai/quick-nlp
[ "d27ae90c0788d0899af7f45b323ca64ed0c33868" ]
[ "src/quicknlp/modules/attention_decoder.py" ]
[ "import warnings\nfrom typing import Optional\n\nimport torch\n\nfrom quicknlp.utils import assert_dims\nfrom .basic_decoder import EmbeddingRNNDecoder\n\n\nclass RNNAttentionDecoder(EmbeddingRNNDecoder):\n\n def __init__(self, ntoken: int, emb_sz: int, nhid: int, nlayers: int, pad_token: int, eos_token: int,\n ...
[ [ "torch.cat" ] ]
alvarovm/cclib
[ "18a87de7fcb15c4133e1fd21939401672438ebb7" ]
[ "src/cclib/method/opa.py" ]
[ "# -*- coding: utf-8 -*-\r\n#\r\n# Copyright (c) 2016, the cclib development team\r\n#\r\n# This file is part of cclib (http://cclib.github.io) and is distributed under\r\n# the terms of the BSD 3-Clause License.\r\n\r\n\"\"\"Calculation of overlap population analysis based on cclib data.\"\"\"\r\n\r\nimport random...
[ [ "numpy.swapaxes", "numpy.add", "numpy.zeros" ] ]
simphide/Kaggle-2020-Alaska2
[ "3c1f5e8e564c9f04423beef69244fc74168f88ca" ]
[ "blends/blend6/blend6.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom scipy.stats import spearmanr\nfrom sklearn.metrics import matthews_corrcoef, ConfusionMatrixDisplay\nfrom alaska2.submissions import blend_predictions_ranked, blend_predictions_mean\nimport matplotlib.pyplot as plt\nfrom sklearn.metrics import plot_confusion_matrix\n\n...
[ [ "sklearn.metrics.ConfusionMatrixDisplay", "pandas.read_csv", "matplotlib.pyplot.figure", "matplotlib.pyplot.gca", "matplotlib.pyplot.show", "scipy.stats.spearmanr" ] ]
ejbkdb/HackAuto
[ "5724ed5aa7e9e5fba4427dd95328f10e4a18710e" ]
[ "agents/blue_simple_agent.py" ]
[ "import numpy as np\nimport rospy\nfrom std_msgs.msg import Bool\nfrom geometry_msgs.msg import Point, Twist, Vector3\n\n# Global variables\nblue_center = Point()\nblue_flag = False\nblue_base = Point()\nred_base = Point()\nblue_twist = Twist()\ngame_over = False\naccumulated_error = 0.\nneutral_zone = False\n\n# H...
[ [ "numpy.sqrt", "numpy.arctan2", "numpy.cos", "numpy.sin" ] ]
entelecheia/eKorpKit
[ "9521ae4c4749419fa2b088d1b9e518e5927b7cb8" ]
[ "ekorpkit/io/fetch/loader/esgreport.py" ]
[ "import os\nimport codecs\nimport pandas as pd\nfrom pathlib import Path\nfrom glob import glob\nfrom ekorpkit.utils.func import ordinal\n\n\nclass ESGReport:\n def __init__(self, name, output_dir, output_file, input_path, txt_info, **kwargs):\n\n self.name = name\n self.input_path = input_path\n ...
[ [ "pandas.DataFrame" ] ]
RenatoTorres/Exode
[ "fd7f6f51a04a88d404dcbed34acd5b8c2f54e54a" ]
[ "Exode/UI/gardenGraph.py" ]
[ "'''\nGraph\n======\nThe :class:`Graph` widget is a widget for displaying plots. It supports\ndrawing multiple plot with different colors on the Graph. It also supports\naxes titles, ticks, labeled ticks, grids and a log or linear representation on\nboth the x and y axis, independently.\nTo display a plot. First cr...
[ [ "numpy.ones", "numpy.multiply", "numpy.subtract", "numpy.reshape", "numpy.asarray", "numpy.expand_dims", "numpy.array", "numpy.concatenate" ] ]
lishuangshuang0616/DNBelab_C4_scRNA_snakemake
[ "a705f537c7f2981b42ff6ebeb26a867ba41ea985" ]
[ "scripts/generate_cellline.py" ]
[ "import pandas as pd\nimport os\nimport argparse\nimport re\n\ndef is_number(s):\n try:\n float(s)\n return True\n except ValueError:\n pass\n\n try:\n import unicodedata\n unicodedata.numeric(s)\n return True\n except (TypeError, ValueError):\n pass\n\n ...
[ [ "pandas.DataFrame" ] ]
JihoChoi/dynamic-gcn-deprecated-TBU
[ "ff315206811b757f2f61f0776917e6a7d43c9379" ]
[ "baselines/bigcn/model/Twitter/BiGCN_Twitter-Attn-0325.py" ]
[ "import sys,os\nsys.path.append(os.getcwd())\n# from Process.process import *\nfrom Process.process import *\nimport torch as th\nfrom torch_scatter import scatter_mean\nimport torch.nn.functional as F\nimport numpy as np\nfrom tools.earlystopping import EarlyStopping\nfrom torch_geometric.data import DataLoader\nf...
[ [ "torch.nn.functional.log_softmax", "torch.nn.Linear", "torch.nn.functional.dropout", "torch.nn.functional.softmax", "torch.nn.functional.nll_loss", "torch.eq", "torch.nn.functional.relu", "torch.cuda.is_available", "torch.cat", "numpy.mean", "torch.nn.LeakyReLU" ] ]
clifduhn/magellanmapper
[ "2d9230b7374719d6cba9b626145f9e81f09c42bf" ]
[ "magmap/plot/colormaps.py" ]
[ "# Colormaps for MagellanMapper\n# Author: David Young, 2018, 2020\n\"\"\"Custom colormaps for MagellanMapper.\n\"\"\"\n\nfrom enum import Enum, auto\n\nimport numpy as np\nfrom matplotlib import cm\nfrom matplotlib import colors\n\nfrom magmap.settings import config\nfrom magmap.io import libmag\n\n#: Dict[:class:...
[ [ "numpy.sum", "numpy.multiply", "matplotlib.colors.BoundaryNorm", "numpy.less", "numpy.random.seed", "numpy.copy", "matplotlib.colors.LinearSegmentedColormap.from_list", "matplotlib.cm.get_cmap", "numpy.add", "numpy.amax", "matplotlib.colors.to_rgba_array", "numpy.ap...
bionicles/neuromax
[ "a53a17a1c033c11ac607a9e28f43b1f906e58aad" ]
[ "nature/bricks/experiments/conv_set/conv_set_class.py" ]
[ "# conv-kernel.py\n# why?: build a resnet with kernel and attention set convolutions\nimport tensorflow as tf\n\nfrom .kernel import get_kernel\n\nfrom tools import concat_1D_coords, log, make_uuid\n\nB, L, K = tf.keras.backend, tf.keras.layers, tf.keras\n\n# todo ... fix one_for_all and all_for_one inside graph_mo...
[ [ "tensorflow.math.reduce_sum", "tensorflow.expand_dims", "tensorflow.squeeze", "tensorflow.slice", "tensorflow.concat", "tensorflow.reduce_sum" ] ]