repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
Randal1936/FinancialSupervision
[ "3d78b1cc662a2c0675ace880a772cc38eaf7672f" ]
[ "tools/PolicyAnalysis/Businesses.py" ]
[ "import pandas as pd\nimport numpy as np\nimport xlwings as xw\nfrom PolicyAnalysis import cptj as cj\n\n\"\"\"\n————————————————————\n以下是使用 re 检索+ DFC 映射的数据处理写法\n————————————————————\n\"\"\"\n\nclass businesses_re:\n\n def __init__(self, Data, userdict):\n self.Data = Data\n self.userdict = userdi...
[ [ "pandas.concat", "pandas.DataFrame" ] ]
simbilod/gdsfactory
[ "4d76db32674c3edb4d16260e3177ee29ef9ce11d", "4d76db32674c3edb4d16260e3177ee29ef9ce11d" ]
[ "gdsfactory/simulation/simphony/components/ring_double_siepic.py", "gdsfactory/simulation/modes/tests/test_find_modes_dispersion.py" ]
[ "from simphony.library import siepic\nfrom simphony.netlist import Subcircuit\n\n\ndef ring_double_siepic(\n wg_width=0.5,\n gap=0.2,\n length_x=4,\n bend_radius=5,\n length_y=2,\n coupler=siepic.ebeam_dc_halfring_straight,\n straight=siepic.ebeam_wg_integral_1550,\n terminator=siepic.ebeam_...
[ [ "matplotlib.pyplot.show" ], [ "numpy.isclose" ] ]
layumi/dgcnn
[ "a7b58796ffe549f2d8bdb06a84f62aba03e1d3a1" ]
[ "pytorch/data.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\n@Author: Yue Wang\n@Contact: yuewangx@mit.edu\n@File: data.py\n@Time: 2018/10/13 6:21 PM\n\nModified by \n@Author: An Tao\n@Contact: ta19@mails.tsinghua.edu.cn\n@Time: 2020/2/27 9:32 PM\n\"\"\"\n\n\nimport os\nimport sys\nimport glob\nimport h5py\nimport nump...
[ [ "torch.LongTensor", "numpy.multiply", "numpy.cos", "numpy.random.shuffle", "numpy.sin", "numpy.concatenate", "numpy.random.randn", "numpy.random.uniform" ] ]
wip-abramson/PySyft
[ "2940bfebb3e0f37a1b7451cf9581c41917534ed6" ]
[ "packages/syft/tests/syft/lib/sklearn/model_serialize_test.py" ]
[ "# third party\nimport numpy as np\nimport pytest\nfrom sklearn.linear_model import LogisticRegression\n\n# syft absolute\nimport syft as sy\nfrom syft.experimental_flags import flags\n\nsy.load(\"sklearn\")\nsy.load(\"numpy\")\n\n\n@pytest.mark.vendor(lib=\"sklearn\")\n@pytest.mark.parametrize(\"arrow_backend\", [...
[ [ "numpy.array", "sklearn.linear_model.LogisticRegression" ] ]
3D-semantic-Sgmentation/pointnet
[ "029c0217143e6b69e685ab57cf243e322d47860f", "029c0217143e6b69e685ab57cf243e322d47860f" ]
[ "models/pointnet_seg.py", "newtrain.py" ]
[ "# import tensorflow as tf\nimport numpy as np\nimport math\nimport sys\nimport os\nimport tensorflow.compat.v1 as tf\nimport tensorflow as tf2\n\nBASE_DIR = os.path.dirname(os.path.abspath(__file__))\nsys.path.append(BASE_DIR)\nsys.path.append(os.path.join(BASE_DIR, '../utils'))\nimport tf_util\nfrom transform_net...
[ [ "tensorflow.summary.scalar", "tensorflow.compat.v1.expand_dims", "tensorflow.compat.v1.concat", "tensorflow.compat.v1.reduce_mean", "numpy.eye", "tensorflow.compat.v1.zeros", "tensorflow.compat.v1.matmul", "tensorflow.compat.v1.placeholder", "tensorflow.compat.v1.tile", "te...
vedashree29296/BentoML
[ "79f94d543a0684e04551207d102a2d254b770ad3" ]
[ "tests/adapters/test_dataframe_input.py" ]
[ "# pylint: disable=redefined-outer-name\n\nimport itertools\nimport json\nimport math\nimport time\n\nimport flask\nimport numpy as np\nimport pandas as pd\nimport psutil # noqa # pylint: disable=unused-import\nimport pytest\n\nfrom bentoml.adapters import DataframeInput\nfrom bentoml.adapters.dataframe_input impo...
[ [ "pandas.concat", "pandas.DataFrame", "numpy.testing.assert_array_equal", "numpy.random.rand", "pandas.read_json", "numpy.testing.assert_array_almost_equal" ] ]
SsisyphusTao/TensorRT
[ "69f5a5093a39184e137a55c908d5c4d1340b009a" ]
[ "tools/Polygraphy/tests/comparator/test_comparator.py" ]
[ "#\n# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ...
[ [ "numpy.all", "numpy.array", "numpy.any", "numpy.ones" ] ]
larssl780/thin_wrappers
[ "c0791d76a734303708892a25cce2e237caf9920a" ]
[ "tests/test_db_utils.py" ]
[ "import pytest\nimport pathlib\nimport sys\n\nimport requests\nimport io\nimport zipfile\nimport tempfile\nimport pandas as pd\nimport os\nHERE = pathlib.Path(__file__).resolve().parent\n\n\n\n# insert at 1, 0 is the script path (or '' in REPL)\n# temporary hack until package is published and we can inherit from th...
[ [ "pandas.read_csv" ] ]
rdenise/virome_pipeline
[ "3c629aef75b184bf39f2d14043f94e8787e3ea14" ]
[ "workflow/scripts/combine_virsorter_virfinder.py" ]
[ "from Bio import SeqIO\nimport pandas as pd\nimport sys\nimport os\n\n# Put error and out into the log file\nsys.stderr = sys.stdout = open(snakemake.log[0], \"w\")\n\n###########################################################\n###########################################################\n\n# List that will contain...
[ [ "pandas.DataFrame" ] ]
CipiOrhei/eecvf
[ "759fb2127c8d65a570ba2df536ff8429ccf5bdf2" ]
[ "Benchmarking/CM_Benchmark/basic_benchmark/rde.py" ]
[ "import math\r\nimport os\r\nfrom math import log10\r\n# noinspection PyPackageRequirements\r\nimport cv2\r\nimport numpy as np\r\nfrom scipy.ndimage import distance_transform_edt\r\n\r\nimport config_main\r\nfrom Utils.log_handler import log_setup_info_to_console, log_error_to_console, log_benchmark_info_to_consol...
[ [ "numpy.invert", "numpy.count_nonzero" ] ]
zhousanfu/paddle-demo
[ "56860c5241874fe6111def46ea2f3f91e3ba80de" ]
[ "PaddleCV/tracking/ltr/data/loader.py" ]
[ "import os\nimport sys\n\nimport dataflow as df\nimport numpy as np\n\n\nclass LTRLoader(df.DataFlow):\n \"\"\"\n Data loader. Combines a dataset and a sampler, and provides\n single- or multi-process iterators over the dataset.\n\n Note: an additional option stack_dim is available to\n selec...
[ [ "numpy.swapaxes" ] ]
ximingxing/Learning-To-Learn
[ "0135cb41521a61d1f3248cf3fe409e51f824fe25" ]
[ "learningTolearn/backbone/common.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n Description : Common routines for models in PyTorch.\n Author : xxm\n\"\"\"\n\n__all__ = ['round_channels', 'Identity', 'Swish', 'HSigmoid', 'HSwish', 'get_activation_layer', 'conv1x1', 'conv3x3',\n 'depthwise_conv3x3', 'ConvBlock', 'conv1x1_block', 'conv3x...
[ [ "torch.sigmoid", "torch.transpose", "torch.nn.ReLU6", "torch.cat", "torch.split", "torch.nn.functional.relu6", "torch.nn.Conv2d", "torch.nn.Sigmoid", "torch.nn.AdaptiveAvgPool2d", "torch.nn.InstanceNorm2d", "torch.nn.functional.interpolate", "torch.nn.BatchNorm2d", ...
invertedv/utilities
[ "42c331893b1beee73b2d21df6cb2bad73b872bb7" ]
[ "muti/glmu.py" ]
[ "from muti import genu\nimport clickhouse_driver\nimport pandas as pd\nfrom modeling.glm import glm\nimport numpy as np\nimport math\n\n\ndef build_model_formula(features_dict: dict, target: str):\n \"\"\"\n Builds the model formula for glm from modeling based on the features_dict specification.\n Does not...
[ [ "numpy.square", "numpy.array", "numpy.full" ] ]
nelhage/data
[ "50a1ab91b786c9f89a8ff6ff10ea57ea5335490d" ]
[ "src/pipelines/epidemiology/nl_authority.py" ]
[ "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "pandas.concat" ] ]
BensonRen/idlm_Ben
[ "0d83780232d6341575daf88792959542aef82132", "5ba93da0d9b5d9313a9ce968e3593fefd0a05fc9", "0d83780232d6341575daf88792959542aef82132" ]
[ "Pytorch/class_wrapper.py", "Backprop/Backprop_network_maker.py", "VAE/evaluate.py" ]
[ "\"\"\"\nThe class wrapper for the networks\n\"\"\"\n# Built-in\nimport os\nimport time\n\n# Torch\nimport torch\nfrom torch import nn\nfrom torch.utils.tensorboard import SummaryWriter\nfrom torchsummary import summary\n\n# Libs\nimport numpy as np\n\n# Own module\n\n\nclass Network(object):\n def __init__(self...
[ [ "torch.nn.functional.mse_loss", "torch.utils.tensorboard.SummaryWriter", "torch.cuda.is_available" ], [ "numpy.square", "tensorflow.losses.mean_squared_error", "pandas.read_csv", "tensorflow.train.latest_checkpoint", "tensorflow.local_variables_initializer", "tensorflow.Var...
magic428/subjects_notes
[ "6930adbb3f445c11ca9d024abb12a53d6aca19e7", "6930adbb3f445c11ca9d024abb12a53d6aca19e7" ]
[ "computer_vision/learning-opencv-practical/image-process-100ask/Question_31_40/answers/answer_40.py", "computer_vision/learning-opencv-practical/image-process-100ask/Question_41_50/answers/answer_48.py" ]
[ "import cv2\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\n# Read image\r\nimg = cv2.imread(\"imori.jpg\").astype(np.float32)\r\nH, W, C = img.shape\r\n\r\n# RGB > YCbCr\r\nY = 0.2990 * img[..., 2] + 0.5870 * img[..., 1] + 0.1140 * img[..., 0]\r\nCb = -0.1687 * img[..., 2] - 0.3313 * img[..., 1] + ...
[ [ "numpy.sqrt", "numpy.cos", "numpy.round", "numpy.log10", "numpy.zeros_like", "numpy.array", "numpy.zeros" ], [ "numpy.pad", "numpy.mean", "numpy.array", "numpy.where", "numpy.sum" ] ]
BatsiBoy/PyFrac
[ "a898f6111295fa9196c382613639fc84e73d6035" ]
[ "examples/visexp.py" ]
[ "# -*- coding: utf-8 -*-\n#Name: Fractal Example - Exponential Curves\n#Author: Sean Pope\n\n#Example use of the fractal engine and coefficient block.\n#Creates random coefficient blocks and draws frames to create a simple animation.\n#This one is optimized for the exponential variation.\n\nimport matplotlib.pyplot...
[ [ "matplotlib.pyplot.pause", "matplotlib.pyplot.scatter", "matplotlib.pyplot.ylim", "matplotlib.pyplot.gcf", "matplotlib.pyplot.xlim", "matplotlib.pyplot.subplot", "matplotlib.pyplot.get_current_fig_manager", "matplotlib.pyplot.close", "matplotlib.pyplot.style.use" ] ]
dengniewei/Face-Recognition-Class-Attendance-System
[ "58aa85ff3b378991da3ccebd69e6ace5ec2af93f" ]
[ "02 Main/mainRUN.py" ]
[ "# 导入必要的模块\r\nfrom PyQt5 import QtCore, QtGui\r\nfrom PyQt5.QtWidgets import QApplication, QWidget, QMessageBox, QInputDialog\r\nfrom PyQt5.QtGui import QImage, QIcon, QPixmap\r\nfrom PyQt5.QtCore import QTimer, QDateTime, QCoreApplication, QThread\r\nimport sys, os\r\nimport cv2, imutils\r\n# 导入UI主界面\r\nimport mai...
[ [ "numpy.arange", "numpy.array", "numpy.argmax", "scipy.spatial.distance.euclidean" ] ]
AVsolutionsai/YOLOv3_custom
[ "d974e8305310cef31621b20128ba29c3b09ce2af" ]
[ "yolov3_tf2/models.py" ]
[ "from absl import flags\nfrom absl.flags import FLAGS\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras import Model\nfrom tensorflow.keras.layers import (\n Add,\n Concatenate,\n Conv2D,\n Input,\n Lambda,\n LeakyReLU,\n MaxPool2D,\n UpSampling2D,\n ZeroPadding2D,\n)\nf...
[ [ "tensorflow.concat", "tensorflow.stack", "tensorflow.reduce_sum", "tensorflow.cast", "tensorflow.keras.layers.ZeroPadding2D", "tensorflow.keras.layers.Concatenate", "tensorflow.keras.layers.LeakyReLU", "tensorflow.config.experimental.set_memory_growth", "tensorflow.keras.regula...
israel-cj/GAMA-GEISHA
[ "210101df0e280d5c2eb5d325fc26d551bba74ed6", "210101df0e280d5c2eb5d325fc26d551bba74ed6" ]
[ "secret/gama/genetic_programming/compilers/scikitlearn.py", "secret/gama/search_methods/pygmo_search.py" ]
[ "from datetime import datetime\nimport logging\nimport os\nimport time\nfrom typing import Callable, Tuple, Optional, Sequence\n\nimport stopit\nfrom sklearn.base import TransformerMixin, is_classifier\nfrom sklearn.model_selection import ShuffleSplit, cross_validate, check_cv\nfrom sklearn.pipeline import Pipeline...
[ [ "sklearn.model_selection.cross_validate", "numpy.mean", "sklearn.model_selection.ShuffleSplit", "sklearn.base.is_classifier" ], [ "numpy.array" ] ]
rhong3/GBM
[ "088b1e99f4fe02395b62d324ec4f9e8402417651" ]
[ "Scripts/Slicer.py" ]
[ "\"\"\"\nTile real scn/svs files; used by Cutter.py\n\nCreated on 11/19/2018\n\n*** Removed imlist storage to minimize memory usage 01/24/2019 ***\n\n@author: RH\n\"\"\"\nfrom openslide import OpenSlide\nimport numpy as np\nimport pandas as pd\nimport multiprocessing as mp\nimport staintools\nfrom PIL import Image\...
[ [ "numpy.ptp", "numpy.nan_to_num", "pandas.DataFrame", "numpy.array", "numpy.sum" ] ]
MarkWuNLP/StreamingTransformer
[ "df9bfe348608b7e55ef1ff70464070c0055ea799" ]
[ "espnet/asr/pytorch_backend/asr_recog.py" ]
[ "#!/usr/bin/env python3\n# encoding: utf-8\n\n# Copyright 2017 Johns Hopkins University (Shinji Watanabe)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\n\"\"\"Training/decoding definition for the speech recognition task.\"\"\"\n\nimport json\nimport logging\nimport os\n\nimport numpy as np\nimport ...
[ [ "torch.no_grad", "torch.is_tensor", "torch.load" ] ]
jiyauppal/face-mask-detector.github.io
[ "210ce81fa37c441a076fbb8db28376268e634412" ]
[ "draw_tracking_line.py" ]
[ "import cv2\r\nimport datetime\r\nimport imutils\r\nimport numpy as np\r\nfrom centroidtracker import CentroidTracker\r\nfrom collections import defaultdict\r\n\r\nprotopath = \"MobileNetSSD_deploy.prototxt\"\r\nmodelpath = \"MobileNetSSD_deploy.caffemodel\"\r\ndetector = cv2.dnn.readNetFromCaffe(prototxt=protopath...
[ [ "numpy.maximum", "numpy.minimum", "numpy.arange", "numpy.argsort", "numpy.array", "numpy.where" ] ]
Elenadisa/PhenCo
[ "f320fc286b90ec566afb5edfe3d6d1e3dcc28497" ]
[ "scripts/py_scripts/calculate_cluster_average.py" ]
[ "#! /usr/bin/env python\n##############################################################################################################################################\n#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMETHODS\n###########################################################################################################...
[ [ "numpy.mean" ] ]
sntgl/scipy
[ "6660830eb7d7590d56f1377d27bf7ee97bb3adec", "6660830eb7d7590d56f1377d27bf7ee97bb3adec" ]
[ "scipy/stats/_distn_infrastructure.py", "scipy/signal/_fir_filter_design.py" ]
[ "#\n# Author: Travis Oliphant 2002-2011 with contributions from\n# SciPy Developers 2004-2011\n#\nfrom scipy._lib._util import getfullargspec_no_self as _getfullargspec\n\nimport sys\nimport keyword\nimport re\nimport types\nimport warnings\nimport inspect\nfrom itertools import zip_longest\nfrom collect...
[ [ "numpy.sqrt", "scipy.special.ive", "numpy.asarray", "numpy.cumsum", "numpy.all", "numpy.max", "scipy._lib.doccer.docformat", "numpy.any", "numpy.exp", "numpy.place", "scipy.misc.derivative", "numpy.nextafter", "scipy.special.entr", "scipy.special.chndtr", ...
sperlingxx/cudf
[ "c681211df6253e1ceee9203658108980e7e93e3c", "c681211df6253e1ceee9203658108980e7e93e3c", "c681211df6253e1ceee9203658108980e7e93e3c", "c681211df6253e1ceee9203658108980e7e93e3c", "c681211df6253e1ceee9203658108980e7e93e3c", "c681211df6253e1ceee9203658108980e7e93e3c", "c681211df6253e1ceee9203658108980e7e93e3...
[ "python/cudf/cudf/tests/test_duplicates.py", "python/cudf_kafka/setup.py", "python/cudf/cudf/tests/test_onehot.py", "python/cudf/cudf/tests/test_scan.py", "python/dask_cudf/dask_cudf/tests/test_reductions.py", "python/cudf/cudf/tests/test_array_function.py", "python/dask_cudf/dask_cudf/core.py" ]
[ "# Copyright (c) 2020-2021, NVIDIA CORPORATION.\n\nimport itertools as it\nimport random\n\nimport numpy as np\nimport pytest\nfrom pandas import DataFrame, MultiIndex, Series, date_range\n\nimport cudf\nfrom cudf import concat\nfrom cudf.tests.utils import assert_eq, assert_exceptions_equal\n\n# TODO: PANDAS 1.0 s...
[ [ "pandas.Series", "pandas.DataFrame", "numpy.iinfo", "pandas.date_range", "numpy.array", "numpy.random.randint" ], [ "numpy.get_include" ], [ "numpy.testing.assert_equal", "pandas.Series", "numpy.random.seed", "numpy.arange", "pandas.DataFrame", "numpy.id...
stasbel/Meme-Machinery-VKHack2018
[ "5e15198d6bc8d350f2dc0158a34467f3415da0bc" ]
[ "experiments/download.py" ]
[ "\"\"\"Downloads prescribed data from the Internet, embed and store it.\"\"\"\n\nimport logging\n\nimport numpy as np\nimport torch\n\nfrom experiments.scrap import META_PATH\nfrom mem.gen.stages import Extractor\n\nlogger = logging.getLogger(__name__)\n\nMATRIX_PATH = 'matrix.npy'\nNEW_META_PATH = 'processed_reddi...
[ [ "torch.save", "numpy.save", "torch.load" ] ]
jiangyangby/DRDSC
[ "4b53e18626b9839578bea6c84bba47d15bc8d3d6" ]
[ "models.py" ]
[ "from __future__ import print_function, absolute_import, division\n\nimport tensorflow as tf\nfrom tensorflow.contrib import layers\n\nmu = 1.0e-6\n\n\n@tf.custom_gradient\ndef f_norm(x):\n f2 = tf.square(tf.norm(x, ord='fro', axis=[-2, -1]))\n f = tf.sqrt(f2 + mu ** 2) - mu\n def grad(dy):\n return...
[ [ "tensorflow.zeros", "tensorflow.reduce_sum", "tensorflow.train.AdamOptimizer", "tensorflow.get_default_graph", "tensorflow.summary.scalar", "tensorflow.nn.conv2d", "tensorflow.diag_part", "tensorflow.squeeze", "tensorflow.square", "tensorflow.trainable_variables", "tens...
raijin0704/models
[ "6906bfbdbf2ad628bb6aeca9989dc04f605b6a60" ]
[ "research/object_detection/metrics/coco_evaluation.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...
[ [ "numpy.logical_not", "tensorflow.compat.v1.ones_like", "numpy.take", "tensorflow.compat.v1.expand_dims", "tensorflow.compat.v1.control_dependencies", "tensorflow.compat.v1.py_func", "tensorflow.compat.v1.logging.warning", "tensorflow.compat.v1.shape", "tensorflow.compat.v1.logg...
yutiansut/menpo
[ "62af28606bc55985ab764f8ad38d239d1572bf1e" ]
[ "menpo/math/linalg.py" ]
[ "from itertools import islice\nimport numpy as np\nfrom menpo.visualize import print_progress, bytes_str, print_dynamic\n\n\ndef dot_inplace_left(a, b, block_size=1000):\n r\"\"\"\n Inplace dot product for memory efficiency. It computes ``a * b = c``, where\n ``a`` will be replaced inplace with ``c``.\n\n ...
[ [ "numpy.zeros" ] ]
jdebacker/taxdata
[ "c32d401a10a6c8f6e889d87c6cc72fd4338017b2" ]
[ "taxdata/puf/preppuf.py" ]
[ "\"\"\"\nScripts to clean up the raw PUF before matching\n\"\"\"\nimport numpy as np\n\n# RECIDs for aggregate variables by PUF year\nAGG_VARS = {\n 2009: [999999],\n 2010: [999998, 999999],\n 2011: [999996, 999997, 999998, 999999],\n}\n\n\ndef preppuf(puf, year):\n \"\"\"Prepares the PUF for mathcing\n...
[ [ "numpy.where" ] ]
nbonacchi/ibllib
[ "9066c00a8e9a65a1d209144a2ac54d0b87bec0b3", "9066c00a8e9a65a1d209144a2ac54d0b87bec0b3", "9066c00a8e9a65a1d209144a2ac54d0b87bec0b3", "9066c00a8e9a65a1d209144a2ac54d0b87bec0b3" ]
[ "ibllib/tests/extractors/test_ephys_passive.py", "brainbox/examples/docs_scatter_raster_plot.py", "brainbox/tests/test_processing.py", "examples/archive/ibllib/qc_behaviour_bpod.py" ]
[ "#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n# @Author: Niccolò Bonacchi\n# @Date: Friday, October 30th 2020, 10:42:49 am\nimport unittest\n\nimport ibllib.io.extractors.ephys_passive as passive\nimport numpy as np\n\n\nclass TestsPassiveExtractor(unittest.TestCase):\n def setUp(self):\n pass\n\n de...
[ [ "numpy.arange", "numpy.array", "numpy.array_equal" ], [ "numpy.min", "numpy.isnan", "numpy.max", "numpy.where", "numpy.isin" ], [ "numpy.ones_like", "numpy.abs", "numpy.random.seed", "numpy.arange", "numpy.random.shuffle", "numpy.ones", "numpy.al...
lilyminium/openff-evaluator
[ "21da54363009d83110b54d57e4416ae31df3868b", "21da54363009d83110b54d57e4416ae31df3868b", "21da54363009d83110b54d57e4416ae31df3868b" ]
[ "openff/evaluator/datasets/curation/components/filtering.py", "openff/evaluator/tests/test_utils/test_serialization.py", "openff/evaluator/tests/test_protocols/test_gradient_protocols.py" ]
[ "import functools\nimport itertools\nimport logging\nfrom collections import defaultdict\nfrom typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Union\n\nimport numpy\nimport pandas\nfrom pydantic import Field, root_validator, validator\nfrom scipy.optimize import linear_sum_assignment\nfrom typing_extensio...
[ [ "numpy.all", "pandas.concat", "numpy.zeros", "scipy.optimize.linear_sum_assignment" ], [ "numpy.array", "numpy.allclose" ], [ "numpy.allclose" ] ]
s2812135/Data_Challenges_WiSe2122
[ "a55372f444e7344af4e2e1f04e4244fb8cefeefe", "a55372f444e7344af4e2e1f04e4244fb8cefeefe" ]
[ "otherCodeTaskSnippets/14.01.2022.py", "examples/vizualizationComponentGesichtert.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Jan 14 16:03:32 2022\n\n@author: dariu\n\"\"\"\n\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Dec 7 12:43:25 2021\n\n@author: dariu\n\"\"\"\n\nimport numpy as np\nimport pandas as pd\nimport os\nfrom tqdm import tqdm\nimport pacmap\nimport matplotlib.pyplot as p...
[ [ "pandas.concat", "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.svm.SVC" ], [ "numpy.isnan", "numpy.array", "pandas.read_csv" ] ]
arroqc/pandacancer_kaggle
[ "a6945dcac041dac744570d61ee630ee6f32e7117" ]
[ "archive/maketiles_old.py" ]
[ "import skimage.io\nimport numpy as np\nimport pandas as pd\nimport sys\nfrom pathlib import Path\nimport pickle\nimport argparse\nimport cv2\n\n\nparser = argparse.ArgumentParser()\nparser.add_argument(\"--base_dir\", default='G:/Datasets/panda', required=False)\nparser.add_argument(\"--out_dir\", default='D:/Data...
[ [ "pandas.merge", "pandas.read_csv", "numpy.sum", "numpy.pad", "pandas.DataFrame", "numpy.concatenate", "numpy.zeros_like", "numpy.array", "numpy.zeros", "numpy.where" ] ]
grantseiter/Biden-Tax-Proposals
[ "c215ff845264f3fce9281c7fbb343ed10758a4b6", "c215ff845264f3fce9281c7fbb343ed10758a4b6", "c215ff845264f3fce9281c7fbb343ed10758a4b6" ]
[ "Tax-Calculator-3.0.0/taxcalc/calcfunctions.py", "OG-USA-0.6.2/ogusa/tests/test_get_micro_data.py", "Tax-Calculator-2.9.0/taxcalc/tests/test_consumption.py" ]
[ "\"\"\"\nTax-Calculator functions that calculate payroll and individual income taxes.\n\nThese functions are imported into the Calculator class.\n\nNote: the parameter_indexing_CPI_offset policy parameter is the only\npolicy parameter that does not appear here; it is used in the policy.py\nfile to possibly adjust t...
[ [ "numpy.maximum", "numpy.zeros", "numpy.where" ], [ "pandas.util.testing.assert_frame_equal", "numpy.allclose" ], [ "numpy.allclose", "numpy.less", "numpy.around", "numpy.ones", "numpy.full", "numpy.zeros" ] ]
mpwiesner/sims_GCRCatSimInterface
[ "831e78ec8eb610983768d4657fbff9744cb17249" ]
[ "bin.src/generate_lensed_hosts_agn.py" ]
[ "import numpy as np\r\nimport os\r\nimport argparse\r\nimport pylab as pl\r\nimport subprocess as sp\r\nimport astropy.io.fits as pyfits\r\nimport pandas as pd\r\nimport scipy.special as ss\r\nimport om10_lensing_equations as ole\r\n\r\ndata_dir = os.path.join(os.environ['SIMS_GCRCATSIMINTERFACE_DIR'], 'data')\r\nt...
[ [ "numpy.sum", "numpy.sqrt" ] ]
thomasgibson/tabula-rasa
[ "85abf26d6604b5a9a4d356f07aeb90d5b6453f33", "85abf26d6604b5a9a4d356f07aeb90d5b6453f33" ]
[ "verification/HMM/rtcf-h-table.py", "gravity_waves/profile_problem.py" ]
[ "import os\nimport sys\nimport pandas as pd\n\n\ndata_set = [\"results/H-RTCF-degree-0.csv\",\n \"results/H-RTCF-degree-1.csv\",\n \"results/H-RTCF-degree-2.csv\",\n \"results/H-RTCF-degree-3.csv\"]\n\nfor data in data_set:\n if not os.path.exists(data):\n print(\"Cannot f...
[ [ "pandas.read_csv" ], [ "numpy.random.randn", "numpy.finfo" ] ]
morteham/thermopack
[ "67deaf74a2ae974e880be25026738cc32e3a6c1e" ]
[ "addon/pycThermopack/pyctp/thermo.py" ]
[ "# Support for python2\nfrom __future__ import print_function\n\nimport sys\nfrom ctypes import *\nfrom os import path\nimport numpy as np\nfrom . import plotutils, utils, platform_specifics\n\nif utils.gcc_major_version_greater_than(7):\n c_len_type = c_size_t # c_size_t on GCC > 7\nelse:\n c_len_type = c_in...
[ [ "numpy.amax", "numpy.array", "numpy.zeros", "numpy.zeros_like" ] ]
shubham-goel/pytorch3d
[ "e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21", "e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21", "e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21", "e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21", "e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21", "e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df21", "e5e6e90af6f81b3eccb35bbdfdc7e64ec6a4df2...
[ "tests/bm_interpolate_face_attributes.py", "projects/nerf/train_nerf.py", "pytorch3d/io/mtl_io.py", "docs/examples/pulsar_cam.py", "tests/test_points_alignment.py", "tests/test_render_implicit.py", "docs/examples/pulsar_basic.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n\nfrom itertools import product\n\nimport torch\nfrom fvcore.common.benchmark import benchmark\nfrom pytorch3d.ops.interp_face_attrs import (\n interpolate_face_attributes,\n interpolate_face_attributes_python,\n)\n\n\ndef _generate_dat...
[ [ "torch.cuda.synchronize", "torch.randint", "torch.randn", "torch.manual_seed", "torch.cuda.is_available", "torch.device" ], [ "torch.optim.lr_scheduler.LambdaLR", "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.utils.data.DataLoader", "torch.utils...
minminfly68/Song-recommendation-Project-CAPP-30122-
[ "9f97d6accdfd33c5bac267980b6c10d6d5b93bc7" ]
[ "ui/sentiment.py" ]
[ "'''\nConduct Sentiment Analysis\nChun Hu, Yimin Li, Tianyue Niu\n'''\n\nimport os\nimport json\nimport re\nimport pandas as pd\nimport nltk\nnltk.download('punkt')\nnltk.download('wordnet')\nnltk.download('stopwords')\nfrom nltk import word_tokenize, sent_tokenize\nfrom nltk.corpus import stopwords\nfrom nltk.stem...
[ [ "pandas.set_option", "pandas.read_csv" ] ]
OleguerCanal/transplanter
[ "854fa727747a484dedde9092eeee6884d7d1b44b" ]
[ "test_models/data.py" ]
[ "from typing import Optional\nimport pytorch_lightning as pl\nimport torchvision\nimport torchvision.transforms as transforms\nfrom torchvision.datasets import CIFAR10\nfrom torch.utils.data import DataLoader, random_split\n\n\nclass CIFARDataModule(pl.LightningDataModule):\n def __init__(self, data_dir: str = \...
[ [ "torch.utils.data.random_split", "torch.utils.data.DataLoader" ] ]
mlline00/pandas
[ "4071dde86e33434e1bee8304fa62074949f813cc", "4071dde86e33434e1bee8304fa62074949f813cc", "4071dde86e33434e1bee8304fa62074949f813cc", "fd7db9819b8c7dba86b2887bee33f670b2715afc" ]
[ "pandas/tests/series/test_cumulative.py", "pandas/core/indexers.py", "pandas/tests/series/methods/test_cov_corr.py", "pandas/core/generic.py" ]
[ "\"\"\"\nTests for Series cumulative operations.\n\nSee also\n--------\ntests.frame.test_cumulative\n\"\"\"\nfrom itertools import product\n\nimport numpy as np\nimport pytest\n\nimport pandas as pd\nimport pandas.util.testing as tm\n\n\ndef _check_accum_op(name, series, check_dtype=True):\n func = getattr(np, n...
[ [ "pandas.util.testing.assert_numpy_array_equal", "pandas.to_datetime", "pandas.Series", "pandas.util.testing.assert_series_equal", "pandas.to_timedelta", "numpy.array" ], [ "pandas.core.dtypes.common.is_list_like", "numpy.array", "numpy.empty" ], [ "pandas.util.testi...
Shivanisen16/vtulabs
[ "2bc41d856612840cf035b570e6256ffc5bcbab5d" ]
[ "15CSL76_Machine_Learning/lab/8-em-kmeans.py" ]
[ "import copy\r\nimport numpy as np\r\nimport pandas as pd\r\nfrom matplotlib import pyplot as plt\r\nfrom sklearn.mixture import GaussianMixture\r\nfrom sklearn.cluster import KMeans\r\n\r\n# Importing the dataset\r\ndata = pd.read_csv(\"ex.csv\")\r\nprint(\"Input Data and Shape:\")\r\nprint(data.head(3))\r\nprint(...
[ [ "pandas.read_csv", "sklearn.cluster.KMeans", "matplotlib.pyplot.scatter", "sklearn.mixture.GaussianMixture", "matplotlib.pyplot.show" ] ]
moha31x/SESAME
[ "0956cbf081d1a033855173e989da6e21f0a13215" ]
[ "sesame/train_model.py" ]
[ "'''\nThis is a script to train a model with a variety of estimators\n'''\nimport pickle\nimport pandas as pd\nfrom sklearn.neural_network import MLPRegressor\nfrom config import Config\n\n# Creating a path to save our model\nConfig.models_path.mkdir(parents=True, exist_ok=True)\n\n# Loading the training and testin...
[ [ "sklearn.neural_network.MLPRegressor" ] ]
darynarr/CV_UKMA
[ "2d0e5fe42c539b441e45c4281f7dc5d42939dd89", "2d0e5fe42c539b441e45c4281f7dc5d42939dd89" ]
[ "ComputerVision_HW/3B-L3/match_two_strips.py", "ComputerVision_HW/2A-L4/find_template_2D.py" ]
[ "import cv2\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\n# We will use the function implemented in the last quiz\n# Find best match\ndef find_best_match(patch, strip):\n # TODO: Find patch in strip and return column index (x value) of topleft corner\n best_id = None\n min_diff = np.inf\n st...
[ [ "numpy.array", "matplotlib.pyplot.show", "matplotlib.pyplot.close", "numpy.power" ], [ "scipy.signal.correlate2d", "numpy.argmax", "numpy.mean" ] ]
ryought/3d-dna
[ "caa187a272c2c3d5720727d846489d628092b680" ]
[ "scaffold/infer-distribution.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport dask.dataframe as ddf\nimport pandas as pd\nimport time\nfrom sklearn.neighbors.kde import KernelDensity\nfrom scipy.optimize import curve_fit\nimport numpy as np\n\ndef infer_distribution_from_contig(contacts, K, K0):\n \"\"\"\n \"\"\"\n longest_cont...
[ [ "numpy.log", "numpy.log10", "numpy.abs", "sklearn.neighbors.kde.KernelDensity" ] ]
abhikbhattacharjee/Motifizer
[ "ee816690f71325e3e17a554d43a7711f08a8c3a9" ]
[ "Peak_calling_length_python_code.py" ]
[ "import pandas as pd\nimport sys\n\npeak_calling=pd.read_excel(str(sys.argv[1]), str(sys.argv[4]))\npeak_calling['Length'] = peak_calling['End'] - peak_calling['Start'] \n\npeak_calling1=pd.read_excel(str(sys.argv[1]), str(sys.argv[3]))\npeak_calling1['Length'] = peak_calling1['End'] - peak_calling1['Start'] \n\npe...
[ [ "pandas.ExcelWriter" ] ]
kilinmao/sarl_star
[ "3b9b2521436ef7f364a250da71a01e915d840296", "3b9b2521436ef7f364a250da71a01e915d840296" ]
[ "navigation/arena_local_planner/model_based/crowdnav_ros/scripts/crowd_nav/utils/explorer.py", "navigation/arena_local_planner/learning_based/arena_ros/scripts/gru_dynamic.py" ]
[ "import logging\nimport copy\nimport torch\nfrom crowd_sim.envs.utils.info import *\n\n\nclass Explorer(object):\n def __init__(self, env, robot, device, memory=None, gamma=None, target_policy=None):\n self.env = env\n self.robot = robot\n self.device = device\n self.memory = memory\n...
[ [ "torch.Tensor" ], [ "torch.nn.Linear", "torch.nn.utils.rnn.PackedSequence", "torch.nn.GRU", "torch.nn.LeakyReLU" ] ]
shreyaspotnis/rampage
[ "e2565aef7ee16ee06523de975e8aa41aca14e3b2" ]
[ "rampage/daq/gpib.py" ]
[ "import visa\nimport numpy as np\nimport logging\nfrom datetime import datetime\n\nresource_manager = visa.ResourceManager()\n\n\nclass Aglient33250A(object):\n\n def __init__(self):\n self.instr = self.open_instrument()\n\n def open_instrument(self):\n resource_list = resource_manager.list_reso...
[ [ "numpy.around", "numpy.array", "numpy.fromstring" ] ]
heydude1337/pyshield
[ "8f103ccc160e6208c8a6754264168416f62373cb", "8f103ccc160e6208c8a6754264168416f62373cb" ]
[ "pyshield/io.py", "pyshield/calculations/dose_rates.py" ]
[ "\"\"\" Functions to read resource files (.yml, .xls/.xlsx and images) \"\"\"\n\n# -*- coding: utf-8 -*-\n\n\nfrom os import path\nimport pandas as pd\nimport matplotlib.image as mpimg\nimport numpy as np\nimport yaml\n\n\n\nimport pyshield as ps\n\n\ndef load_item(item):\n \"\"\" Load yaml, image or excel or re...
[ [ "matplotlib.image.imread", "pandas.read_excel" ], [ "numpy.log", "numpy.arctan", "numpy.interp", "numpy.array", "numpy.sum" ] ]
EricElmoznino/OrthogonalLowrankEmbedding
[ "cce12ca5cb34f7cb888b04739724bdbbd18b1e2d" ]
[ "stl10/utee/misc.py" ]
[ "from __future__ import print_function\nimport cv2\nimport os\nimport shutil\nimport pickle as pkl\nimport time\nimport numpy as np\nimport hashlib\n\nfrom IPython import embed\n\nclass Logger(object):\n def __init__(self):\n self._logger = None\n\n def init(self, logdir, name='log'):\n if self....
[ [ "torch.LongTensor", "numpy.fromstring", "torch.FloatTensor", "numpy.mean", "torch.utils.model_zoo.load_url" ] ]
TraceOnBrainOff/pytorch-dc-tts
[ "993a0fbace561729b04df2179b41a0a7ea502e93" ]
[ "train-text2mel.py" ]
[ "#!/usr/bin/env python\n\"\"\"Train the Text2Mel network. See: https://arxiv.org/abs/1710.08969\"\"\"\n__author__ = 'Erdene-Ochir Tuguldur'\n\nimport sys\nimport time\nimport argparse\nfrom tqdm import *\n\nimport numpy as np\n\nimport torch\nimport torch.nn.functional as F\n\n# project imports\nfrom models import ...
[ [ "torch.nn.functional.l1_loss", "torch.zeros", "torch.from_numpy", "torch.set_grad_enabled", "numpy.fromfunction", "torch.cuda.is_available" ] ]
Koen-AI/world-model-as-a-graph
[ "cafde59ef7159d1b62ca508568c85c6498c1342c", "cafde59ef7159d1b62ca508568c85c6498c1342c", "cafde59ef7159d1b62ca508568c85c6498c1342c", "cafde59ef7159d1b62ca508568c85c6498c1342c" ]
[ "rl/replay/planner.py", "rl/logger.py", "rl/launcher_latent_robot.py", "rl/search/latent_planner.py" ]
[ "import threading\nimport numpy as np\nimport torch\nimport os.path as osp\n\nfrom rl.utils import mpi_utils\n\n#Replay buffer!!!\n\ndef sample_her_transitions(buffer, reward_func, batch_size, future_step, future_p=1.0):\n assert all(k in buffer for k in ['ob', 'ag', 'bg', 'a'])\n buffer['o2'] = buffer['ob'][...
[ [ "numpy.minimum", "torch.load", "numpy.arange", "numpy.concatenate", "numpy.random.randint", "torch.device", "numpy.random.uniform", "numpy.zeros", "torch.save" ], [ "tensorflow.python.util.compat.as_bytes", "pandas.read_csv", "tensorflow.train.summary_iterator",...
pnsafari/speechbrain
[ "3a6956a838f3796ff6d041ee6a20bcdea55794cb" ]
[ "recipes/VoxCeleb/SpeakerRec/speaker_verification_plda.py" ]
[ "#!/usr/bin/python3\n\"\"\"Recipe for training a speaker verification system based on PLDA using the voxceleb dataset.\nThe system employs a pre-trained model followed by a PLDA transformation.\nThe pre-trained model is automatically downloaded from the web if not specified.\n\nTo run this recipe, run the following...
[ [ "torch.ones", "torch.tensor", "numpy.concatenate", "torch.no_grad", "numpy.array", "numpy.where", "numpy.empty" ] ]
aforren1/ratcave
[ "e3862cdaba100ac2c6c78c08c4b09638e0c88fd4", "e3862cdaba100ac2c6c78c08c4b09638e0c88fd4", "e3862cdaba100ac2c6c78c08c4b09638e0c88fd4" ]
[ "ratcave/utils/vertices.py", "ratcave/coordinates.py", "ratcave/mesh.py" ]
[ "import itertools\nimport numpy as np\n\ndef pairwise(iterable):\n \"s -> (s0,s1), (s1,s2), (s2, s3), ...\"\n a, b = itertools.tee(iterable)\n next(b, None)\n return zip(a, b)\n\n\ndef struct_to_ndarray(array):\n \"\"\"Turns returns a view of a structured array as a regular ndarray.\"\"\"\n return...
[ [ "numpy.hstack", "numpy.unique", "numpy.arange", "numpy.linalg.norm", "numpy.cumsum", "numpy.zeros_like", "numpy.searchsorted", "numpy.cross", "numpy.array", "numpy.vstack" ], [ "numpy.diag", "numpy.dot", "numpy.radians", "numpy.degrees", "numpy.ident...
sungcheolkim78/py_kbible
[ "3a576c20e5e49f5e85be6ddede20accb6df14663" ]
[ "py_kbible/kbible.py" ]
[ "\"\"\"\nkbible.py - base bible object and commands\n\"\"\"\n\nimport pandas as pd\nimport yaml\nimport os\nimport subprocess\n\n__author__ = \"Sungcheol Kim <sungcheol.kim78@gmail.com>\"\n__docformat__ = \"restructuredtext en\"\n\nclass KBible(object):\n \"\"\" Bible text object \"\"\"\n\n def __init__(self,...
[ [ "pandas.merge", "pandas.read_csv", "pandas.concat", "pandas.DataFrame" ] ]
imaroger/sot-talos-balance
[ "5e56700b4e105273ecf6feb3474789beac469a77" ]
[ "src/sot_talos_balance/test/test_zmpEstimator.py" ]
[ "from time import sleep\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nfrom sot_talos_balance.utils.run_test_utils import evalCommandClient, run_ft_calibration, run_test, runCommandClient\n\ntry:\n # Python 2\n input = raw_input # noqa\nexcept NameError:\n pass\n\nrun_test('appli_zmpEstimator.p...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.ion", "matplotlib.pyplot.figure" ] ]
jonathan-sung/Hexapod-GA-Gait
[ "5e82c2f141f6bd88d8b6c0a7b658c8ce0c5be8f4" ]
[ "hexapodengine2.py" ]
[ "import pybullet as p\nimport math\nimport pybullet_data\nimport time\nimport random\nimport numpy as np\nimport serial\n\n\ndef radToPwm(angle):\n return ((2000 * angle) / math.pi) + 1500\n\n\n# t in ms; the closer t is to 0, more accuracy but less smooth motion\ndef updateRealServos(ser, t):\n # right legs\...
[ [ "numpy.dot", "numpy.array", "numpy.linalg.norm", "numpy.arccos" ] ]
didriknielsen/pixelcnn_flow
[ "9030f6a66d5ff83d7d299541ed55b20b20bb9a15", "9030f6a66d5ff83d7d299541ed55b20b20bb9a15", "9030f6a66d5ff83d7d299541ed55b20b20bb9a15" ]
[ "pixelflow/distributions/normal.py", "experiments/train/exact_pixelcnn_quad.py", "pixelflow/flows/inverse_flow.py" ]
[ "import math\nimport torch\nfrom pixelflow.distributions import Distribution\nfrom pixelflow.utils import sum_except_batch\nfrom torch.distributions import Normal\n\n\nclass StandardNormal(Distribution):\n \"\"\"A multivariate Normal with zero mean and unit covariance.\"\"\"\n\n def __init__(self, shape):\n ...
[ [ "torch.randn", "torch.Size", "torch.tensor" ], [ "torch.optim.lr_scheduler.MultiStepLR" ], [ "torch.nn.ModuleList", "torch.no_grad" ] ]
srimanthtenneti/Deep-Learning-NanoDegree
[ "d99b09530a96f4aeca7adf3b9188e1d5fc4104d4" ]
[ "AWS_Deployment/serve/predict.py" ]
[ "import argparse\nimport json\nimport os\nimport pickle\nimport sys\nimport sagemaker_containers\nimport pandas as pd\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.utils.data\n\nfrom model import LSTMClassifier\n\nfrom utils import review_to_words, convert_and_p...
[ [ "numpy.hstack", "torch.load", "torch.from_numpy", "torch.no_grad", "torch.cuda.is_available" ] ]
jandremarais/TabularLearner
[ "7905b06a31fc6e0b0adf6a13a0fb445bdfe00c96" ]
[ "code/fastai_ext/fastai_ext/hyperparameter.py" ]
[ "import pandas as pd\nimport itertools\nfrom functools import partial\nfrom fastai.callbacks import CSVLogger\n\ndef get_config_df(config):\n df = pd.DataFrame(list(itertools.product(*config.values())), columns=config.keys())\n df.index = [f'model_{i+1}' for i in range(len(df))]\n return df\n\n\ndef create...
[ [ "pandas.concat", "pandas.read_csv" ] ]
ParthivNaresh/Facilyst
[ "786932b0afcf07cd300b2e6ce55ccf7f9e4c49d9" ]
[ "facilyst/mocks/mock_types/features.py" ]
[ "\"\"\"A mock type that returns features data.\"\"\"\nimport pandas as pd\nimport woodwork as ww\n\nfrom facilyst.mocks import MockBase\nfrom facilyst.mocks.mock_types.utils import mock_features_dtypes\n\n\nclass Features(MockBase):\n \"\"\"Class to manage mock data creation of features.\n\n :param num_rows: ...
[ [ "pandas.DataFrame.from_dict" ] ]
simassakenis/CausalMediationAnalysis
[ "ad46c02cdda88e13e2e891e9968c365e093ecc99" ]
[ "attention_intervention_winobias.py" ]
[ "\"\"\"Performs attention intervention on Winobias samples and saves results to JSON file.\"\"\"\n\nimport json\n\nimport fire\nfrom pandas import DataFrame\nfrom transformers import (\n GPT2Tokenizer, TransfoXLTokenizer, XLNetTokenizer,\n BertTokenizer, DistilBertTokenizer, RobertaTokenizer\n)\n\nimport wino...
[ [ "pandas.DataFrame" ] ]
justinshenk/simba
[ "a58ccd0ceeda201c1452d186033ce6b25fbab564", "a58ccd0ceeda201c1452d186033ce6b25fbab564", "a58ccd0ceeda201c1452d186033ce6b25fbab564" ]
[ "simba/features_scripts/extract_features_16bp.py", "simba/process_data_log_old.py", "simba/dpk_script/detect_merge_outliers.py" ]
[ "from __future__ import division\r\nimport os, glob\r\nimport pandas as pd\r\nimport math\r\nimport numpy as np\r\nfrom scipy.spatial import ConvexHull\r\nimport scipy\r\nfrom configparser import ConfigParser, NoOptionError, NoSectionError\r\nfrom numba import jit\r\nfrom simba.rw_dfs import *\r\nimport re\r\n\r\n\...
[ [ "pandas.concat", "pandas.read_csv", "pandas.eval", "numpy.sqrt", "numpy.amax", "numpy.min", "scipy.spatial.distance.cdist", "numpy.mean", "numpy.array", "numpy.sum" ], [ "pandas.concat", "pandas.read_csv", "pandas.DataFrame" ], [ "numpy.split", "...
johannbrehmer/rl-6-nimmt
[ "8bc504e0372bb4bc99a3d69e77418991092ffdac" ]
[ "rl_6_nimmt/play.py" ]
[ "import torch\nimport numpy as np\nimport logging\nfrom .env import SechsNimmtEnv\n\nlogger = logging.getLogger(__name__)\n\n\nclass GameSession:\n def __init__(self, *agents, device=torch.device(\"cpu\"), dtype=torch.float):\n \"\"\" Initializes a game session, which consists of an arbitrary number of ga...
[ [ "torch.device", "numpy.array", "numpy.zeros", "torch.tensor" ] ]
mrbermell/seed_rl
[ "9562e178fb8c16d2551d9e5d59594a7f908655dd" ]
[ "agents/policy_gradient/modules/generalized_onpolicy_loss.py" ]
[ "# coding=utf-8\n# Copyright 2019 The SEED Authors\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 applica...
[ [ "tensorflow.clip_by_value", "tensorflow.reduce_mean", "tensorflow.keras.losses.MeanSquaredError", "tensorflow.maximum", "tensorflow.keras.losses.Huber", "tensorflow.zeros_like", "tensorflow.abs", "tensorflow.nest.map_structure", "tensorflow.logical_and" ] ]
jorgemarpa/lightkurve
[ "86320a67eabb3a93f60e9faff0447e4b235bccf2", "86320a67eabb3a93f60e9faff0447e4b235bccf2", "86320a67eabb3a93f60e9faff0447e4b235bccf2" ]
[ "tests/io/test_k2sff.py", "tests/test_targetpixelfile.py", "tests/io/test_tasoc.py" ]
[ "import pytest\n\nfrom astropy.io import fits\nimport numpy as np\nfrom numpy.testing import assert_array_equal\n\nfrom lightkurve.io.k2sff import read_k2sff_lightcurve\nfrom lightkurve import search_lightcurve\n\n\n@pytest.mark.remote_data\ndef test_read_k2sff():\n \"\"\"Can we read K2SFF files?\"\"\"\n url ...
[ [ "numpy.testing.assert_array_equal", "numpy.array_equal" ], [ "numpy.nanmedian", "numpy.product", "numpy.abs", "numpy.isfinite", "numpy.isnan", "numpy.arange", "numpy.asarray", "numpy.ones", "numpy.all", "numpy.testing.assert_array_equal", "numpy.round", ...
vpisarev/onnxruntime
[ "bab9b80f1f2330d3a115e0abbb4d8278c2be3f44" ]
[ "onnxruntime/python/tools/transformers/quantize_helper.py" ]
[ "# -------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See License.txt in the project root for\n# license information.\n# --------------------------------------------------------------------------...
[ [ "torch.nn.Linear", "torch.quantization.quantize_dynamic" ] ]
CryptoTheSuperDog/fds
[ "12795290f5784eb5d218a648aee4edbcfa890078", "12795290f5784eb5d218a648aee4edbcfa890078" ]
[ "assignments/assignment2/my_NB_hint.py", "assignments/assignment1/A1.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom collections import Counter\n\nclass my_NB:\n\n def __init__(self, alpha=1):\n # alpha: smoothing factor\n # P(xi = t | y = c) = (N(t,c) + alpha) / (N(c) + n(i)*alpha)\n # where n(i) is the number of available categories (values) of feature i\n ...
[ [ "pandas.DataFrame" ], [ "pandas.read_csv", "sklearn.naive_bayes.GaussianNB" ] ]
laurentmackay/3d-vertex
[ "6d6e124ecfaca018d979c5ef17d0b83d1cc0f96c", "6d6e124ecfaca018d979c5ef17d0b83d1cc0f96c", "6d6e124ecfaca018d979c5ef17d0b83d1cc0f96c" ]
[ "Validation/Viscoelastic/PeriodicTimeseriesAnalysis.py", "VertexTissue/validate.py", "main_orig.py" ]
[ "import string\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom VertexTissue import globals as const\nfrom VertexTissue.Analysis import *\n\nfrom VertexTissue.funcs import euclidean_distance\n\nfrom periodic_2D import forces, omegas\n\n\nif __name__ == '__main__':\n\n square_length = lambda G, t ...
[ [ "matplotlib.pyplot.tight_layout", "numpy.sqrt", "numpy.arctan", "numpy.abs", "numpy.sin", "numpy.exp", "numpy.array", "matplotlib.pyplot.show" ], [ "numpy.abs" ], [ "matplotlib.use", "numpy.linalg.norm", "numpy.save", "scipy.spatial.distance.euclidean", ...
harunpehlivan/tensorflow
[ "d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f", "d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f", "d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f", "d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f", "d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67f", "376e2cfdab31f4da251ea2e50992a9bf97fd171b", "d87a9fbbc5f49ec5ae8eb52c62628f0b1a0bf67...
[ "tensorflow/contrib/factorization/python/ops/gmm.py", "tensorflow/contrib/py2tf/__init__.py", "tensorflow/python/keras/_impl/keras/datasets/cifar10.py", "tensorflow/contrib/tpu/profiler/pip_package/cloud_tpu_profiler/main.py", "tensorflow/python/kernel_tests/constant_op_test.py", "tensorflow/python/ops/nn...
[ "# 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.python.ops.math_ops.reduce_sum", "tensorflow.contrib.learn.python.learn.estimators.model_fn.ModelFnOps", "tensorflow.python.ops.control_flow_ops.with_dependencies", "tensorflow.python.training.training_util.get_global_step", "numpy.squeeze", "tensorflow.python.framework.ops.get...
meewa1/BrukerGUI
[ "f71211557f3a61322a8a8bc9bdb1f70f3cc82969" ]
[ "MRIAssimilator/MRIAThreads.py" ]
[ "from PyQt5 import QtCore\n\nimport os, tempfile\nfrom scipy.misc import toimage\nimport brukerWriter as bw\n\nimport utils\n\nfrom FilesTreeWidget import *\n\n__all__ = [\"FilesTreeThread\", \"SaveThread\"]\n\n\nclass FilesTreeThread(QtCore.QThread):\n def __init__(self, parent = None, mode = \"create\", dirnam...
[ [ "scipy.misc.toimage" ] ]
BrunoKM/station-b-libraries
[ "ea3591837e4a33f0bef789d905467754c27913b3", "ea3591837e4a33f0bef789d905467754c27913b3", "ea3591837e4a33f0bef789d905467754c27913b3" ]
[ "PyStationB/libraries/StaticCharacterization/tests/notebooks/test_introduction.py", "PyStationB/libraries/StaticCharacterization/tests/test_integrals.py", "PyStationB/libraries/ABEX/abex/simulations/plot_convergence_multiple_runs.py" ]
[ "# # Introduction\n# In this notebook, we will load an example time series, fit a growth model\n# and plot the signals.\n#\n# ## Load example time series\n#\n# Let's start by loading example time series data.\n# -------------------------------------------------------------------------------------------\n# Copyright...
[ [ "matplotlib.pyplot.subplot", "matplotlib.pyplot.clf", "matplotlib.pyplot.subplots", "matplotlib.pyplot.figure" ], [ "pandas.DataFrame" ], [ "pandas.concat", "pandas.read_csv", "matplotlib.pyplot.close" ] ]
mir-group/nequip
[ "4e6a0914a289cf000da57a6b6e79678efdf3347f" ]
[ "nequip/nn/embedding/_one_hot.py" ]
[ "import torch\nimport torch.nn.functional\n\nfrom e3nn.o3 import Irreps\nfrom e3nn.util.jit import compile_mode\n\nfrom nequip.data import AtomicDataDict\nfrom .._graph_mixin import GraphModuleMixin\n\n\n@compile_mode(\"script\")\nclass OneHotAtomEncoding(GraphModuleMixin, torch.nn.Module):\n num_types: int\n ...
[ [ "torch.nn.functional.one_hot" ] ]
swami1995/SimuRLacra
[ "795e6ea45fbb722242ddb0c0ea5c62432826411e", "795e6ea45fbb722242ddb0c0ea5c62432826411e", "795e6ea45fbb722242ddb0c0ea5c62432826411e" ]
[ "Pyrado/pyrado/environments/mujoco/openai_half_cheetah.py", "Pyrado/pyrado/policies/feed_back/fnn.py", "Pyrado/pyrado/algorithms/step_based/dql.py" ]
[ "# Copyright (c) 2020, Fabio Muratore, Honda Research Institute Europe GmbH, and\n# Technical University of Darmstadt.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# 1. Redistributions...
[ [ "numpy.concatenate", "numpy.full_like" ], [ "torch.atleast_2d", "torch.nn.Dropout", "torch.sin", "torch.nn.ModuleList", "torch.from_numpy", "torch.nn.Linear", "torch.cuda.is_available", "torch.get_default_dtype", "torch.cos", "torch.argmax" ], [ "torch.m...
guidj/attx
[ "6a17ed393ab1f1723e7a9d8890da6313bb96c75f" ]
[ "py/tests/test_tensor_ops.py" ]
[ "import pytest\nimport tensorflow as tf\nimport numpy as np\n\nfrom attx import tensor_ops\n\n\ndef test_single_example_batch_single_step_sequence_with_high_dimension():\n # (?, k, dk) = (1, 1, 4)\n query_1 = [[1, 2, 3, 4]]\n key_1 = [[1, 1, 1, 1]]\n value_1 = [[10, 10, 10, 10]]\n\n query = tf.cast([...
[ [ "numpy.array", "tensorflow.cast", "numpy.testing.assert_array_almost_equal" ] ]
PolarNick239/Triangulum3D
[ "85c6a44f5c8f620bdc58164bd50ff89e1897f59d" ]
[ "tests/triangulum_test/test_support.py" ]
[ "#\n# Copyright (c) 2015, Nikolay Polyarnyi\n# All rights reserved.\n#\n\nimport yaml\nimport asyncio\nimport logging\nimport numpy as np\nimport pkg_resources\nfrom pathlib import Path\nfrom unittest import TestCase\n\nfrom triangulum.utils import support\nfrom triangulum.utils.support import str_dict, deep_merge\...
[ [ "numpy.uint8" ] ]
itsliupeng/automl
[ "a02038aa60bdf54e689758e5860e19c574d3638f" ]
[ "efficientdet/horovod_estimator/hooks.py" ]
[ "import io\nimport itertools\nimport os\nimport time\n\nimport cv2\n\ntry:\n import horovod.tensorflow as hvd\nexcept ImportError:\n hvd = None\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport tensorflow.compat.v1 as tf\nfrom PIL import Image\nfrom PIL import ImageDraw, I...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.imshow", "numpy.get_printoptions", "numpy.asarray", "tensorflow.core.framework.summary_pb2.Summary.Value", "matplotlib.pyplot.plot", "numpy.seterr", "numpy.max", "numpy.concatenate", "numpy.zeros_like", "tensorflow.python.t...
belakaria/USeMO
[ "063fbd8b8c39c3cc54f9abd8c79ff01eda9dc803" ]
[ "benchmarks.py" ]
[ "import math\nimport numpy as np\nfrom scipy.interpolate import interp1d\nfrom copy import deepcopy\n\ndef Rosen(x1, d):\n x=list(4*np.asarray(x1)-2)\n sum_i = 0\n for i in range(d-1):\n sum_i =sum_i + (100 * ((x[i]**2) - x[i+1])**2 + (x[i] - 1)**2)\n return sum_i\n\n\ndef Sphere(x1,d):\n x=li...
[ [ "numpy.asarray", "numpy.square", "numpy.cos" ] ]
ryota2425/zed-yolo
[ "a5672d30e7d11b7542b8cdb0ac1cd882741fb150", "a5672d30e7d11b7542b8cdb0ac1cd882741fb150" ]
[ "zed_python_sample/darknet_zed.py", "zed_python_sample/nagasa2.py" ]
[ "#!python3\n\"\"\"\nPython 3 wrapper for identifying objects in images\n\nRequires DLL compilation\n\nOriginal *nix 2.7: https://github.com/pjreddie/darknet/blob/0f110834f4e18b30d5f101bf8f1724c34b7b83db/python/darknet.py\nWindows Python 2.7 version: https://github.com/AlexeyAB/darknet/blob/fc496d52bf22a0bb257300d3c...
[ [ "numpy.ascontiguousarray", "numpy.rint", "numpy.isnan", "numpy.isinf" ], [ "numpy.ascontiguousarray", "numpy.rint", "numpy.isnan", "numpy.isinf" ] ]
ljbuaa/HLDAGN
[ "787462a43d6c0f47dc1ebfd6ef9bfbd1eb5246a7" ]
[ "torchFunc.py" ]
[ "from torch.autograd import Variable\nimport torch.nn.functional as F\nfrom torch import nn\nfrom torch import Tensor\nfrom torch.nn import Parameter\n\ndef l2normalize(v, eps=1e-12):\n return v / (v.norm() + eps)\n\n\nclass SpectralNorm(nn.Module):\n def __init__(self, module, name='weight', power_iterations...
[ [ "torch.nn.Parameter" ] ]
yuzhd/Text2Scene
[ "a357b7d869f559f7d09a5ac6002757ec705b2a76", "a357b7d869f559f7d09a5ac6002757ec705b2a76" ]
[ "lib/modules/composites_simulator.py", "tools/test_layout_dataset.py" ]
[ "#!/usr/bin/env python\n\nimport numpy as np\nfrom copy import deepcopy\nimport matplotlib.pyplot as plt\nfrom nntable import AllCategoriesTables\n\nfrom composites_utils import *\n\n\nclass simulator(object):\n def __init__(self, db, batch_size=None, nn_table=None):\n self.db = db\n self.cfg = db....
[ [ "numpy.maximum", "numpy.array", "numpy.zeros", "numpy.stack" ], [ "matplotlib.pyplot.imshow", "numpy.amax", "numpy.random.seed", "numpy.amin", "matplotlib.pyplot.switch_backend", "torch.manual_seed", "numpy.median", "torch.utils.data.DataLoader", "numpy.perc...
PratyushaMaiti/gtsfm
[ "0d03dca0b6fb9293c9a3fb619a2141903168269a", "0d03dca0b6fb9293c9a3fb619a2141903168269a" ]
[ "gtsfm/utils/viz.py", "gtsfm/scene_optimizer.py" ]
[ "\"\"\"Functions to visualize outputs at different stages of GTSFM.\n\nAuthors: Ayush Baid\n\"\"\"\nimport os\nfrom typing import List, Optional, Tuple\n\nimport cv2 as cv\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom gtsam import Pose3\nfrom matplotlib.axes._axes import Axes\n\nimport gtsfm.utils.geom...
[ [ "numpy.abs", "numpy.random.choice", "numpy.mean", "numpy.random.randint", "matplotlib.pyplot.close", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "matplotlib.use" ] ]
aidiary/freesound-audio-tagging
[ "71093fdc838214f4ec2dc5b29b00e7de72ad36d0" ]
[ "dataset.py" ]
[ "import os\nimport librosa\nimport numpy as np\nimport torch.utils.data\n\n\ndef random_crop(y, max_length=176400):\n \"\"\"音声波形を固定長にそろえる\n\n max_lengthより長かったらランダムに切り取る\n max_lengthより短かったらランダムにパディングする\n \"\"\"\n if len(y) > max_length:\n max_offset = len(y) - max_length\n offset = np.ra...
[ [ "numpy.random.randint" ] ]
Hardcode84/dpbench
[ "e6bc1fc6493cb80a1b5a2ffcca4cc1348dd3ad99" ]
[ "numba/knn/GPU/base_knn.py" ]
[ "# *****************************************************************************\n# Copyright (c) 2020, Intel Corporation All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# Redistribut...
[ [ "numpy.random.rand", "numpy.random.randint" ] ]
OminiaVincit/scale-variant-topo
[ "6945bc42aacd0d71a6fb472c87e09da223821e1e" ]
[ "graph-kernels2/calculate_kernels.py" ]
[ "import numpy as np\nimport os\n\nimport time\n\nfrom sklearn import svm\nfrom sklearn.model_selection import GridSearchCV\nfrom sklearn.model_selection import cross_val_predict\nfrom sklearn.pipeline import make_pipeline\nfrom sklearn.metrics import accuracy_score\n\nfrom grakel import datasets\nfrom grakel import...
[ [ "numpy.savetxt", "numpy.zeros" ] ]
sdpython/mlprodic
[ "9367dacc91d35ec670c8a8a76708300a75bbc993", "9367dacc91d35ec670c8a8a76708300a75bbc993", "9367dacc91d35ec670c8a8a76708300a75bbc993", "9367dacc91d35ec670c8a8a76708300a75bbc993", "9367dacc91d35ec670c8a8a76708300a75bbc993", "9367dacc91d35ec670c8a8a76708300a75bbc993", "9367dacc91d35ec670c8a8a76708300a75bbc99...
[ "_unittests/ut_onnxrt/test_rt_valid_model_gaussian_mixture.py", "_unittests/ut_onnx_conv/test_onnx_conv_knn.py", "_unittests/ut_onnx_conv/test_onnx_conv_graph_optimisation.py", "_unittests/ut_onnxrt/test_rt_valid_model_naive.py", "mlprodict/onnxrt/ops_cpu/op_argmin.py", "_unittests/ut_onnxrt/test_onnxrt_s...
[ "\"\"\"\n@brief test log(time=16s)\n\"\"\"\nimport unittest\nfrom logging import getLogger\nfrom pandas import DataFrame\nfrom pyquickhelper.loghelper import fLOG\nfrom pyquickhelper.pycode import ExtTestCase\nfrom pyquickhelper.pandashelper import df2rst\nfrom sklearn.exceptions import ConvergenceWarning\ntry...
[ [ "sklearn.utils.testing.ignore_warnings", "pandas.DataFrame" ], [ "numpy.take", "numpy.squeeze", "pandas.DataFrame", "numpy.random.randn", "numpy.arange", "numpy.full", "sklearn.neighbors.KNeighborsClassifier", "sklearn.neighbors.NearestNeighbors", "sklearn.datasets....
biolins/frivolous_dnns
[ "23d9a057ac517770cdfe9d8ac71543c328fcf76d" ]
[ "resnet/official/utils/misc/distribution_utils_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.test.main" ] ]
manueltonneau/simpletransformers
[ "7374b786857008e023604789e89c1690ad8bde97" ]
[ "simpletransformers/conv_ai/conv_ai_utils.py" ]
[ "# Copyright (c) 2019-present, HuggingFace Inc.\n# All rights reserved. This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree.\nimport json\nimport logging\nimport os\nimport socket\nimport tarfile\nimport tempfile\nfrom datetime import datet...
[ [ "torch.save", "torch.load" ] ]
laurentletg/pyradiomics
[ "b30a7fe086417999481bc6792dced4bf3dc3de32" ]
[ "radiomics/imageoperations.py" ]
[ "from __future__ import print_function\n\nimport logging\n\nimport numpy\nimport pywt\nimport SimpleITK as sitk\nimport six\nfrom six.moves import range\n\nlogger = logging.getLogger(__name__)\n\n\ndef getMask(mask, **kwargs):\n \"\"\"\n Function to get the correct mask. Includes enforcing a correct pixel data ty...
[ [ "numpy.true_divide", "numpy.sqrt", "numpy.asarray", "numpy.ndarray", "scipy.ndimage.interpolation.map_coordinates", "numpy.arctan2", "numpy.max", "numpy.mean", "numpy.digitize", "numpy.exp", "numpy.where", "numpy.histogram", "numpy.allclose", "numpy.pad", ...
ccj5351/hmr_rgbd
[ "d1dcf81d72c11e1f502f2c494cd86425f384d9cc", "d1dcf81d72c11e1f502f2c494cd86425f384d9cc", "d1dcf81d72c11e1f502f2c494cd86425f384d9cc", "d1dcf81d72c11e1f502f2c494cd86425f384d9cc" ]
[ "debug/test_tf_funcs.py", "pytorch_src/ResnetV2.py", "src/util/surreal_in_extrinc.py", "src/datasets/common.py" ]
[ "# !/usr/bin/env python3\n# -*-coding:utf-8-*-\n# @file: test_tf_funcs.py\n# @brief:\n# @author: Changjiang Cai, ccai1@stevens.edu, caicj5351@gmail.com\n# @version: 0.0.1\n# @creation date: 13-08-2019\n# @last modified: Tue 13 Aug 2019 05:38:05 PM EDT\n\nimport tensorflow as tf\nimport numpy as np\n\nif __name__ ==...
[ [ "numpy.arange", "tensorflow.constant", "tensorflow.gather_nd", "tensorflow.Session" ], [ "torch.nn.Sequential", "torch.mean", "torch.load", "torch.nn.init.constant_", "torch.nn.Conv2d", "torch.from_numpy", "numpy.transpose", "torch.flatten", "torch.nn.MaxPoo...
agarwalrounak/optuna
[ "9331374a2460da067a6922e4ea09dd4706f3d950", "b5fd0439dc33c94c06251974b8cb023a3f9bccc7" ]
[ "tests/storages_tests/rdb_tests/test_with_server.py", "optuna/visualization/matplotlib/_contour.py" ]
[ "from multiprocessing import Pool\nimport os\nfrom typing import Sequence\nfrom typing import Tuple\n\nimport numpy as np\nimport pytest\n\nimport optuna\n\n\n_STUDY_NAME = \"_test_multiprocess\"\n\n\ndef f(x: float, y: float) -> float:\n return (x - 3) ** 2 + y\n\n\ndef objective(trial: optuna.Trial) -> float:\...
[ [ "numpy.asarray", "numpy.isclose" ], [ "numpy.log10", "numpy.array", "numpy.linspace", "numpy.column_stack" ] ]
chunzhang-hub/PaddleHub
[ "9a3b23295947e22149cc85c17cb4cf23c03f9e06", "9a3b23295947e22149cc85c17cb4cf23c03f9e06", "9a3b23295947e22149cc85c17cb4cf23c03f9e06", "9a3b23295947e22149cc85c17cb4cf23c03f9e06", "9a3b23295947e22149cc85c17cb4cf23c03f9e06", "9a3b23295947e22149cc85c17cb4cf23c03f9e06" ]
[ "modules/text/language_model/lda_webpage/vose_alias.py", "modules/image/semantic_segmentation/humanseg_mobile/module.py", "modules/text/language_model/lda_webpage/semantic_matching.py", "modules/image/semantic_segmentation/humanseg_mobile/data_feed.py", "modules/image/object_detection/ssd_vgg16_512_coco2017...
[ "import os\n\nimport numpy as np\nfrom paddlehub.common.logger import logger\n\nfrom lda_webpage.util import rand, rand_k\n\n\nclass VoseAlias(object):\n \"\"\"Vose's Alias Method.\n \"\"\"\n\n def __init__(self):\n self.__alias = None\n self.__prob = None # np.array\n\n def initialize(se...
[ [ "numpy.zeros", "numpy.sum" ], [ "numpy.expand_dims", "numpy.ones_like", "numpy.squeeze", "numpy.ceil", "numpy.transpose", "numpy.repeat", "numpy.array", "numpy.zeros" ], [ "numpy.sqrt", "numpy.sum", "numpy.log" ], [ "numpy.array" ], [ "nu...
franktoffel/dapper
[ "373a27273ea109f349e5edcdcef0cfe0b83b925e", "373a27273ea109f349e5edcdcef0cfe0b83b925e" ]
[ "mods/Lorenz95/core.py", "tools/viz.py" ]
[ "# \"Lorenz-95\" (or 96) model. For a deeper introduction, see\n# \"DAPPER/tutorials/T4 - Dynamical systems, chaos, Lorenz.ipynb\"\n#\n# Note: implementation is ndim-agnostic.\n\nimport numpy as np\nfrom tools.math import rk4, integrate_TLM, is1d\n\nForce = 8.0\n\n# Note: the model is unstable (blows up) if there a...
[ [ "numpy.mod", "numpy.zeros", "numpy.roll", "numpy.ones" ], [ "matplotlib.transforms.Bbox.unit", "matplotlib.patches.Ellipse", "matplotlib.widgets.CheckButtons", "matplotlib.ticker.MaxNLocator", "matplotlib.gridspec.GridSpec" ] ]
pyl1b/decay
[ "7200516455fc03351ad658af66b5cc39b2b2d50a", "7200516455fc03351ad658af66b5cc39b2b2d50a" ]
[ "decay/decays/sample/half_sudden.py", "decay/decays/sample/sudden.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nContains the definition of the SuddenDecay class.\n\"\"\"\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\n\nimport logging\nimport numpy as np\n\nfrom . import SampleBasedDecay\n\nlogger = logging.getLogger('decay.half_sudden')\n\n\nclass HalfSudden...
[ [ "numpy.array" ], [ "numpy.array" ] ]
glauberrleite/system-identifier
[ "982e04b7df84211d5797d259e9cb431d83b00529", "982e04b7df84211d5797d259e9cb431d83b00529" ]
[ "test.py", "LeastSquares.py" ]
[ "from Util import Util\nimport numpy\nimport matplotlib.pyplot as pyplot\n\ninputArray = numpy.ones(100)\ntheta = [ 2.705, -2.448, 0.7408, 0.0523, -0.0855, 0.035 ]\norderOutput = 3\norderInput = 3\nsampleRate = 0.1\n\n\ny = Util.computeOutput(inputArray, theta, orderOutput, orderInput)\nt = numpy.arange(0, len(y)*s...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.show", "numpy.ones" ], [ "numpy.dot", "numpy.mean", "numpy.linalg.pinv" ] ]
Imperial-lord/IITG
[ "df4233905d2954511d5b16666f0d44cc38b9df90", "df4233905d2954511d5b16666f0d44cc38b9df90" ]
[ "Semester 6/MA 374 (Financial Engg. Lab)/Lab 1/180123062_ABSatyaprakash_q1 1.py", "Semester 6/MA 322 (Scientific Computing Theory)/Labs/Lab 4/Code/q5.py" ]
[ "# Q.1 Run your program for M = 1, 5, 10, 20, 50, 100, 200, 400 \n# to get the initial option prices and tabulate them\n\n# Pandas : pip install pandas \n# Matplotlib: pip install matplotlib \n# Numpy: pip install numpy \n# Ipython: pip install ipython\n\n\nimport math\nimport pandas as pd\nfrom IPython.display imp...
[ [ "pandas.DataFrame" ], [ "numpy.arange" ] ]
Pathology-Consistent-Stain-Transfer/Unpaired-Stain-Transfer-using-Pathology-Consistent-Constrained-Generative-Adversarial-Networks
[ "b57c56b314e65a0f31d9e44f57174108599c8b14" ]
[ "Stain_seperation/stain_Norm_Vahadane.py" ]
[ "\"\"\"\nStain normalization inspired by method of:\n\nA. Vahadane et al., ‘Structure-Preserving Color Normalization and Sparse Stain Separation for Histological Images’, IEEE Transactions on Medical Imaging, vol. 35, no. 8, pp. 1962–1971, Aug. 2016.\n\nUses the spams package:\n\nhttp://spams-devel.gforge.inria.fr/...
[ [ "numpy.dot", "numpy.asarray", "numpy.median", "numpy.array", "numpy.exp" ] ]
Meghanath-Data/ml-on-gcp
[ "bfd96dce610e26236c4448ba0d4eb430ca2817ff" ]
[ "example_zoo/tensorflow/models/mnist/official/mnist/mnist.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 r...
[ [ "tensorflow.nn.softmax", "tensorflow.estimator.Estimator", "tensorflow.losses.sparse_softmax_cross_entropy", "tensorflow.estimator.export.PredictOutput", "tensorflow.estimator.export.build_raw_serving_input_receiver_fn", "tensorflow.test.is_built_with_cuda", "tensorflow.identity", ...