repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
benkeesey/pandera
[ "5a1e30eca11b7d966871d0ebfa3813c93c88e70f" ]
[ "tests/io/test_io.py" ]
[ "\"\"\"Unit tests for io module\"\"\"\n\nimport platform\nimport tempfile\nfrom pathlib import Path\nfrom unittest import mock\n\nimport pandas as pd\nimport pytest\nfrom packaging import version\n\nimport pandera\nimport pandera.extensions as pa_ext\nimport pandera.typing as pat\nfrom pandera.engines import pandas...
[ [ "pandas.DataFrame", "pandas.Timestamp", "pandas.Timedelta", "pandas.CategoricalDtype" ] ]
boyuhou/security-data
[ "31bd1f0e9577d46124512102c4c4bf995cf36f95" ]
[ "security_data/__init__.py" ]
[ "import datetime\nimport dateutil.relativedelta\nimport logging\nimport pandas as pd\nfrom dateutil.relativedelta import relativedelta\nfrom security_data.iqfeed import iqfeed\nfrom security_data.db import DataService\nfrom security_data.indicators import Indicators\n\nlogger = logging.getLogger(__name__)\n\n\nclas...
[ [ "pandas.DataFrame.from_records", "pandas.concat" ] ]
folkien/pyCsvExtractor
[ "4f4112fff30c9e44b49553a65397996661e37323" ]
[ "pyCsvExtractor.py" ]
[ "#!/usr/bin/python3\nimport numpy as np\nimport pandas as pd\nimport argparse\nimport datetime as dt\nimport matplotlib.pyplot as plt\nimport locale\nfrom preview import View\nfrom scipy.interpolate import interp1d\n\n\n# defaults\nseparator = None\nlocale.setlocale(locale.LC_ALL, '')\ndecimalpoint = (locale.locale...
[ [ "numpy.searchsorted", "pandas.read_csv", "pandas.date_range" ] ]
walsvid/Faster-RCNN-TensorFlow
[ "17919237f590a8739261151ea253c34ab2cbf650" ]
[ "lib/networks/VGG16.py" ]
[ "import tensorflow as tf\nfrom networks.network import Network\n\n\nclass VGG16(Network):\n def __init__(self, is_train):\n super().__init__(is_train)\n self.inputs = []\n self.is_train = is_train\n\n self.n_classes = 21\n self.feat_stride = [16, ]\n self.anchor_scales =...
[ [ "tensorflow.placeholder" ] ]
Ascend/mindxsdk-referenceapps
[ "62039513b140534ec7bb0bdae83bfc4653dc4abf" ]
[ "mxVision/MultiThread/python/main_sendprotobuf.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCopyright 2020 Huawei Technologies Co., Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICE...
[ [ "numpy.where", "numpy.array", "numpy.frombuffer" ] ]
sduncker/pandas
[ "f9e0b7df8ca8a92133d3cea0a26181140f991e2d", "f9e0b7df8ca8a92133d3cea0a26181140f991e2d" ]
[ "pandas/tseries/tools.py", "pandas/io/tests/test_packers.py" ]
[ "from datetime import datetime, timedelta\nimport re\nimport sys\n\nimport numpy as np\n\nimport pandas.lib as lib\nimport pandas.tslib as tslib\nimport pandas.core.common as com\nfrom pandas.compat import StringIO, callable\nimport pandas.compat as compat\n\ntry:\n import dateutil\n from dateutil.parser impo...
[ [ "pandas.tslib.get_timezone", "pandas.tslib.datetime_to_datetime64", "pandas.core.common._ensure_object", "pandas.compat.callable", "numpy.empty", "pandas.tseries.frequencies._get_rule_month", "pandas.lib.try_parse_year_month_day", "pandas.core.common.is_list_like", "pandas.tsli...
mberkanbicer/software
[ "d27375257b0260cad901837612fbca0174134229" ]
[ "pyradar/Libs/antenna/array/planar_uniform.py" ]
[ "\"\"\"\nProject: RadarBook\nFile: planar_uniform.py\nCreated by: Lee A. Harrison\nOn: 1/22/2018\nCreated with: PyCharm\n\nCopyright (C) 2019 Artech House (artech@artechhouse.com)\nThis file is part of Introduction to Radar Using Python and MATLAB\nand can not be copied and/or distributed without the express permis...
[ [ "numpy.sin", "numpy.ones_like", "numpy.cos" ] ]
Nishant-Pall/trax
[ "f714a271111578d4e6b3ac445eef86ca03dc7fa6" ]
[ "trax/tf_numpy/numpy_impl/utils.py" ]
[ "# coding=utf-8\n# Copyright 2020 The Trax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app...
[ [ "numpy.promote_types", "tensorflow.compat.v2.cond", "numpy.asarray", "tensorflow.compat.v2.get_static_value", "tensorflow.compat.v2.shape", "tensorflow.compat.v2.reduce_any", "tensorflow.compat.v2.broadcast_to", "numpy.isscalar", "tensorflow.compat.v2.as_dtype", "tensorflow...
coder6464/PYBOR
[ "6351155cd0bca7da114323e3b1af120d6639d8d7" ]
[ "yc_curvebuilder.py" ]
[ "# Copyright © 2017 Ondrej Martinsky, All rights reserved\r\n# http://github.com/omartinsky/pybor\r\n\r\nfrom instruments.deposit import *\r\nfrom instruments.zerorate import *\r\nfrom instruments.future import *\r\nfrom instruments.basisswap import *\r\nfrom instruments.crosscurrencyswap import *\r\nfrom instrumen...
[ [ "numpy.isnan" ] ]
yzxamos/BRAINS
[ "b81cec02a1902df1e544542a970b66d9916a7496" ]
[ "analysis/libbackend.py" ]
[ "# -*- coding: utf-8 -*-\n\n#\n# BRAINS\n# (B)LR (R)everberation-mapping (A)nalysis (I)n AGNs with (N)ested (S)ampling\n# Yan-Rong Li, liyanrong@ihep.ac.cn\n# Thu, Aug 4, 2016\n#\n\nimport os\nimport sys\nimport corner\nimport numpy as np \nimport configparser as cp\nimport matplotlib.pyplot as plt\n\n__all__ = ['p...
[ [ "numpy.loadtxt", "numpy.min", "matplotlib.pyplot.subplots", "matplotlib.pyplot.plot" ] ]
onlyrico/mling_sdgms
[ "ef6015d1a815a317f16fa1e42cbb048e4fe443f7" ]
[ "nn_model/bva.py" ]
[ "# -*- coding: UTF-8 -*-\n#!/usr/bin/python3\n\"\"\"\nBilingual variational autoencoder\n\"\"\"\n\n#************************************************************\n# Imported Libraries\n#************************************************************\nimport numpy as np\n\nimport torch\nimport torch.nn as nn\nimport tor...
[ [ "torch.save", "torch.LongTensor" ] ]
vinitX/mpnum
[ "92549446687da6366246f64952c65789be3031bf" ]
[ "tests/utils_physics_test.py" ]
[ "# encoding: utf-8\n\nfrom __future__ import division, print_function\n\nimport pytest as pt\nimport sys\nfrom scipy.sparse.linalg import eigsh\n\nfrom mpnum.utils import physics\n\n\n@pt.mark.parametrize('nr_sites', [2, 6, pt.mark.long(10)])\n@pt.mark.parametrize('gamma', [-0.5, pt.mark.long(0.1), pt.mark.long(1.0...
[ [ "scipy.sparse.linalg.eigsh" ] ]
cespenar/sdBGridViewer
[ "38327bae2cca794172049f368c27493957095799" ]
[ "sdb_grid_viewer.py" ]
[ "import dash\nimport dash_bootstrap_components as dbc\nimport numpy as np\nimport pandas as pd\nimport plotly.express as px\nfrom dash import dcc, html, Input, Output, State\nfrom sqlalchemy import create_engine\n\nSIDEBAR_STYLE = {\n 'overflow': 'scroll'\n}\n\napp = dash.Dash(__name__, external_stylesheets=[dbc...
[ [ "numpy.log10", "pandas.read_sql" ] ]
kleelab-bch/MARS-Net
[ "d65b4a3aa6fffeb2b694e75f76e00a4a72a2bb4c" ]
[ "evaluation/draw_learning_curve.py" ]
[ "'''\r\nAuthor: Junbong Jang\r\nModified Date: 9/20/2020\r\n\r\n'''\r\n\r\nimport matplotlib\r\nmatplotlib.use('agg')\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport os\r\nimport sys\r\nsys.path.append('..')\r\nfrom UserParams import UserParams\r\n\r\nfrom matplotlib import rcParams\r\nrcParams['...
[ [ "matplotlib.use", "numpy.load", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots", "matplotlib.rc", "matplotlib.pyplot.yticks", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.xticks" ] ]
Talgin/facerec
[ "6ec6d9fbb1c2cf4cc344decfa1ef012f43f7bbce" ]
[ "src/eval/ytf.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport cv2\nimport argparse\nimport sys\nimport numpy as np\nfrom scipy import misc\nfrom sklearn.model_selection import KFold\nfrom scipy import interpolate\nimport sklearn\nfrom sklearn.me...
[ [ "numpy.square", "numpy.array", "numpy.asarray", "numpy.zeros", "numpy.mean", "numpy.std", "numpy.amin", "numpy.subtract", "sklearn.preprocessing.normalize", "numpy.arange", "numpy.transpose", "numpy.argmax", "sklearn.model_selection.KFold", "numpy.amax", ...
SPRACE/track-ml
[ "3af95fd014e98a5b11261dc5d618f34f82fdf84d" ]
[ "old/lstm-map-Evaluate.py" ]
[ "from math import sqrt\nimport sys\nimport scipy.stats\nimport seaborn as sns\nimport pandas as pd\nfrom matplotlib import pyplot as plt\n\noriginal_tracks = sys.argv[1]\nreconstructed_tracks = sys.argv[2]\noutputfig = sys.argv[3]\neval_file = sys.argv[4]\n\ndfOriginal = pd.read_csv(...
[ [ "matplotlib.pyplot.savefig", "pandas.read_csv", "matplotlib.pyplot.figure" ] ]
tkerwin/pydre
[ "a100779801ffdc9855f09328bd28bf79ab6e679b" ]
[ "preprocessing_tools/ecocar_special.py" ]
[ "import csv\nimport argparse\nimport os\nimport sys\nimport glob\nimport re\nimport pandas\n\nsys.path.append(os.path.join(os.path.dirname(__file__)))\n\nimport pydre\n\ndef ecoCar(d: pandas.DataFrame):\n event = 0\n reactionTimeList = list()\n df = pandas.DataFrame(d, columns=(\"SimTime\", \"WarningToggle...
[ [ "pandas.DataFrame", "pandas.read_csv" ] ]
TOT0RoKR/tensorflow
[ "3457a2b122e50b4d44ceaaed5a663d635e5c22df" ]
[ "tensorflow/python/kernel_tests/reduction_ops_test.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.ops.variables.Variable", "numpy.random.rand", "tensorflow.python.ops.math_ops.reduce_sum", "tensorflow.python.ops.math_ops.reduce_prod", "numpy.issubdtype", "tensorflow.python.platform.test.main", "tensorflow.python.ops.math_ops.reduce_all", "tensorflow.python.op...
abhishekdasz/Hacktoberfest2021-1
[ "2191624630d30a5e10592a7b44251a87212c35b4" ]
[ "Python/strassen's matrix multiplication.py" ]
[ "# Version 3.6\n\nimport numpy as np\n\ndef split(matrix):\n\t\"\"\"\n\tSplits a given matrix into quarters.\n\tInput: nxn matrix\n\tOutput: tuple containing 4 n/2 x n/2 matrices corresponding to a, b, c, d\n\t\"\"\"\n\trow, col = matrix.shape\n\trow2, col2 = row//2, col//2\n\treturn matrix[:row2, :col2], matrix[:r...
[ [ "numpy.hstack" ] ]
franciscovargas/TeviotDataScienceGame
[ "77bdffb87b2a25490ca175b3a2f96459067e4ccb" ]
[ "train_scripts/rbm413val.py" ]
[ "# in this script we use rotation of +/- 20 degrees, instead of +/- 5 degrees\n# also change the l2 regularization of the last layer\n# same as 410 with zca, epsilon=10e-3\n\nfrom keras.layers.convolutional import Convolution2D, MaxPooling2D, UpSampling2D\nfrom keras.layers import Input, Dense, Dropout, Flatten\nfr...
[ [ "numpy.random.normal", "pandas.read_csv", "numpy.load" ] ]
sas2py/datarobot-user-models
[ "ab493be2db21f43d4d9a2e6e588bfe6d1f18db12" ]
[ "tests/fixtures/custom_pred_consistency/custom.py" ]
[ "import pandas as pd\nimport numpy as np\nimport joblib\nfrom sklearn.linear_model import LogisticRegression\n\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.compose import ColumnTransformer\nfrom sklearn.preprocessing import StandardScaler, OneHotEncoder\nfrom sklearn.impute import SimpleImputer\n\nimport os...
[ [ "sklearn.impute.SimpleImputer", "pandas.DataFrame.sparse.from_spmatrix", "sklearn.preprocessing.StandardScaler", "sklearn.compose.ColumnTransformer", "sklearn.linear_model.LogisticRegression", "sklearn.pipeline.Pipeline", "sklearn.preprocessing.OneHotEncoder" ] ]
qiangz520/Deep3DFaceReconstruction
[ "71554f93acdd7532530e977f78fa02337160d4c1" ]
[ "load_data.py" ]
[ "import numpy as np \nfrom PIL import Image\nfrom scipy.io import loadmat,savemat\nfrom array import array\n\n# load expression basis\ndef LoadExpBasis():\n\tn_vertex = 53215\n\tExpbin = open('BFM/Exp_Pca.bin','rb')\n\texp_dim = array('i')\n\texp_dim.fromfile(Expbin,1)\n\texpMU = array('f')\n\texpPC = array('f')\n\...
[ [ "numpy.array", "numpy.reshape", "scipy.io.loadmat", "numpy.mean", "scipy.io.savemat", "numpy.loadtxt", "numpy.transpose" ] ]
jerpint/jag
[ "0f0d7b634abf958a57ec77afecbf9d9117ecf81e" ]
[ "jag/utils/data_fetcher.py" ]
[ "import tensorflow as tf\nimport os\nfrom typing import Dict\n\n\ndef get_file(data_src: str, cache_dir: str) -> Dict[str, str]:\n \"\"\" Return the local path of the datasets specified in data_src in cache_dir.\n If a dataset does not exists in cache_dir or its MD5 does not agree, it is downloaded.\n Args...
[ [ "tensorflow.keras.utils.get_file" ] ]
big-o/pandas
[ "a2178065fd5eecc2562f8c3725ac09573b687022" ]
[ "pandas/tests/arrays/test_integer.py" ]
[ "import numpy as np\nimport pytest\n\nimport pandas.util._test_decorators as td\n\nfrom pandas.core.dtypes.generic import ABCIndexClass\n\nimport pandas as pd\nfrom pandas.api.types import is_float, is_float_dtype, is_integer, is_scalar\nfrom pandas.core.arrays import IntegerArray, integer_array\nfrom pandas.core.a...
[ [ "pandas.core.arrays.integer.Int64Dtype", "numpy.where", "pandas.Timestamp", "pandas.core.arrays.integer.UInt8Dtype", "pandas.core.arrays.integer.Int16Dtype", "pandas.core.arrays.integer_array", "pandas.api.types.is_float", "numpy.dtype", "pandas.core.arrays.integer.UInt64Dtype"...
gvalenzuelarg/coronavirus
[ "ca0c4d02dbd53d63fd0c433354e4e3689872bb23" ]
[ "modules/model.py" ]
[ "\"\"\"Tools to initialize, train, and tune models for COVID-19 forecasts.\n\"\"\"\n\nimport numpy as np\nimport pandas as pd\nimport itertools\nfrom babel.dates import format_date\nfrom babel.numbers import format_decimal\nimport matplotlib.pyplot as plt\n\nfrom sklearn.metrics import mean_squared_error, explained...
[ [ "pandas.to_datetime", "sklearn.metrics.mean_squared_error", "scipy.optimize.curve_fit", "pandas.Timedelta", "numpy.argmin", "numpy.round", "pandas.DataFrame", "numpy.exp", "sklearn.metrics.explained_variance_score", "numpy.argmax", "pandas.concat", "matplotlib.pyplo...
HarryPetr1969/statsmodels
[ "fb448540aa0fa354d4cd2fe7b161cb949ce91888" ]
[ "statsmodels/distributions/tests/test_discrete.py" ]
[ "\n\nimport numpy as np\nimport statsmodels.api as sm\nfrom scipy import stats\nfrom scipy.stats import poisson, nbinom\nfrom numpy.testing import assert_allclose, assert_equal\n\nfrom statsmodels.distributions.discrete import (\n DiscretizedCount, DiscretizedModel)\n\nfrom statsmodels.tools.tools import Bunch\n...
[ [ "numpy.testing.assert_allclose", "scipy.stats.nbinom.ppf", "scipy.stats.poisson.var", "scipy.stats.nbinom.cdf", "scipy.stats.nbinom.mean", "scipy.stats.nbinom.var", "scipy.stats.geom", "scipy.stats.poisson.mean", "scipy.stats.poisson.cdf", "numpy.bincount", "numpy.log",...
AlrauneZ/TransportAbility
[ "68ca3fd341dce4367477f7834f885920dde60483" ]
[ "src/TA_Simulation.py" ]
[ "#!/usr/bin/env python3\n\nimport numpy as np\nimport os.path\nimport copy\n\nfrom Distributions import Porosity_Distribution,TA_POR_Distribution\n#### Load values of transport resistant from data file\n\n\nDEF_DATA = dict(\n res0 = 2,\n pstd_r0=0.15,\n por_con_min = 0.07,\n nmin = 20,\n dp = 0....
[ [ "numpy.compress", "numpy.dot", "numpy.exp", "numpy.mean", "numpy.where", "numpy.log", "numpy.random.randint", "numpy.arange", "numpy.sqrt", "numpy.vstack", "numpy.diagflat", "numpy.reshape", "numpy.zeros", "numpy.all", "numpy.power", "numpy.floor", ...
phiwei/tensor_bot
[ "0cfe81d4b31a50e520dbacc650950dc6e370d075" ]
[ "example_telegram.py" ]
[ "\"\"\"\nExample from https://keras.io/examples/mnist_cnn/\n\"\"\"\n\nfrom __future__ import print_function\nimport tensorflow.keras\nfrom tensorflow.keras.datasets import mnist\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Dense, Dropout, Flatten\nfrom tensorflow.keras.layers...
[ [ "tensorflow.keras.datasets.mnist.load_data", "tensorflow.keras.layers.Flatten", "tensorflow.keras.backend.image_data_format", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.MaxPooling2D", "tensorflow.ke...
Saruccio/Flatland
[ "3013640872249adb02c518f78119b1ad04fb2a0b" ]
[ "examples/desk_bench.py" ]
[ "# File: desk_bench.py\n# Date: 05-10-2019\n# Author: Saruccio Culmone\n#\n# Description\n# Confronto in ambiente simulato tra misure reali e misure simulate\n#\n\"\"\"\nThis script creates a virtual environemt from a real one in order to allow\nthe comparison among virtual and real measures.\n\"\"\"\n\n\nimport os...
[ [ "numpy.deg2rad" ] ]
minhncedutw/100DaysOfTechLearning
[ "8e7602c17d844cbf643b381dd4e3d90d1e832453" ]
[ "old2/day11/pointnet_loss.py" ]
[ "import tensorflow as tf\nfrom keras.losses import categorical_crossentropy\ndef pointnet_loss(xtran, reg_weight=0.001):\n \"\"\"\n Description:\n :param NAME: TYPE, MEAN\n :return: TYPE, MEAN\n Implemented from: https://github.com/charlesq34/pointnet/blob/master/part_seg/pointnet_part_seg.py\n ...
[ [ "tensorflow.reduce_mean", "tensorflow.transpose", "tensorflow.nn.l2_loss" ] ]
biswajitcsecu/ngraph
[ "d6bff37d7968922ef81f3bed63379e849fcf3b45" ]
[ "python/test/ngraph/test_ops_fused.py" ]
[ "# ******************************************************************************\n# Copyright 2017-2019 Intel Corporation\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# ...
[ [ "numpy.array", "numpy.dot", "numpy.add", "numpy.mean", "numpy.multiply", "numpy.allclose", "numpy.float32", "numpy.subtract", "numpy.arange", "numpy.power", "numpy.sqrt", "numpy.clip" ] ]
mesnardo/automan-example
[ "06daa5bfd84b184eda7476e89ce9b3190b680fbc" ]
[ "automan_example.py" ]
[ "\"\"\"\nExample using the automation framework `automan`.\n\"\"\"\n\nimport os\nimport pandas\nimport matplotlib\nmatplotlib.use('Agg')\nfrom matplotlib import pyplot\nfrom automan.api import Problem, Simulation, Automator\n\n\nclass CpVsFoils(Problem):\n def get_name(self):\n return 'cp_vs_foils'\n\n def set...
[ [ "matplotlib.use", "pandas.read_csv", "matplotlib.pyplot.subplots" ] ]
ptanh2k/int3404
[ "ad39ce61b768ef7b55936561c13bfa1c3adf0e92" ]
[ "week05/week05_q1.py" ]
[ "\"\"\"\nName: Pham Tuan Anh\nClass: K63K2\nMSSV: 18020116\n\nYou should understand the code you write.\n\"\"\"\n\nimport cv2\nimport numpy as np\nimport argparse\nimport time\n\ndef conv_sum(a, b):\n s = 0\n for i in range(len(a)):\n for j in range(len(a[0])):\n s += a[i][j]*b[i][j]\n re...
[ [ "numpy.array", "numpy.empty", "numpy.sort", "numpy.zeros" ] ]
kmisiunas/QuipuNet
[ "8e7f1cb15ebc4a3cc65bd1139bd11c4d49be8130" ]
[ "Quipu/augment.py" ]
[ "# Project Quipu - data augmentation methods \n\nimport scipy.signal as signal\nimport numpy as np\nimport Quipu.tools\n\n\ndef addNoise(xs, std = 0.05):\n \"Add gaussian noise\"\n return xs + np.random.normal(0, std, xs.shape)\n\n\ndef stretchDuration(xs, std = 0.1, probability = 0.5):\n \"\"\"\n Augme...
[ [ "numpy.random.normal", "numpy.copy", "numpy.random.rand" ] ]
Sufi737/ga-learner-dsmp-repo
[ "a71c9bf138d5d9ba1ff4f37238d5e152cbf4380c" ]
[ "Exploration-of-Google-Playstore-Apps-datacode.py" ]
[ "# --------------\n#Importing header files\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n\n\n\n\n#Code starts here\ndata = pd.read_csv(path)\ndata['Rating'].plot(kind='hist')\n\ndata = data[data['Rating'] <= 5]\ndata['Rating'].plot(kind='hist')\n#Code ends here\n\n\n# -------------...
[ [ "pandas.to_datetime", "sklearn.preprocessing.LabelEncoder", "pandas.read_csv", "pandas.concat" ] ]
jiangfeng1124/ChemRxnExtractor
[ "124ea09d944abb4375be38294a74f0de4b1087fa" ]
[ "chemrxnextractor/train/role_labeling.py" ]
[ "import logging\nimport os\nimport sys\nfrom dataclasses import dataclass, field\nfrom typing import Dict, List, Optional, Tuple\nfrom tqdm.auto import tqdm, trange\n\nfrom seqeval.metrics import f1_score, precision_score, recall_score\nimport numpy as np\nimport torch\nfrom torch import nn\nfrom torch.utils.data.d...
[ [ "torch.utils.data.sampler.SequentialSampler", "torch.no_grad", "torch.cuda.is_available", "torch.utils.data.DataLoader" ] ]
dtamayo/forecaster
[ "30fca13e84ccf5e7e6162d3493acfc0eb32ca713" ]
[ "func.py" ]
[ "from __future__ import (print_function, absolute_import,\n division, unicode_literals)\nimport numpy as np\nfrom scipy.stats import norm\n\n### fix the number of different populations\nn_pop = 4\n\n\ndef indicate(M, trans, i):\n '''\n indicate which M belongs to population i given tran...
[ [ "scipy.stats.norm.pdf", "numpy.zeros_like", "scipy.stats.norm.ppf", "numpy.zeros", "numpy.sum", "numpy.insert" ] ]
weimingwill/federated
[ "59633d68e04f46c4881a05af5cda75bddc532afb", "59633d68e04f46c4881a05af5cda75bddc532afb" ]
[ "tensorflow_federated/python/core/backends/mapreduce/form_utils_test.py", "tensorflow_federated/python/core/backends/test/federated_strategy.py" ]
[ "# Copyright 2019, The TensorFlow Federated Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
[ [ "numpy.array", "tensorflow.compat.v1.ConfigProto", "tensorflow.is_tensor" ], [ "tensorflow.constant", "tensorflow.is_tensor", "tensorflow.nest.map_structure" ] ]
catherinebouchard22/AutocGAN
[ "5fbb8464cf44c770912b2b0f1afffe5d158617f2" ]
[ "search_cgan.py" ]
[ "# -*- coding: utf-8 -*-\n# @Date : 2019-09-25\n# @Author : Xinyu Gong (xy_gong@tamu.edu)\n# @Link : None\n# @Version : 0.0\n\nfrom __future__ import absolute_import, division, print_function\n\nimport os\n\nimport torch\nimport torch.nn as nn\nfrom tensorboardX import SummaryWriter\nfrom tqdm import tqdm\n\...
[ [ "torch.cuda.manual_seed", "torch.nn.init.constant_", "torch.nn.init.xavier_uniform", "torch.nn.init.normal_", "torch.load", "torch.nn.init.orthogonal_" ] ]
zhangjunliang555/convlab2-kbert
[ "b4544bc338904e518285e214ee48d46bfe79662e" ]
[ "convlab2/nlu/jointBERT/crosswoz/postprocess.py" ]
[ "import re\nimport torch\n\n\ndef is_slot_da(da):\n tag_da = {'Inform', 'Recommend'}\n not_tag_slot = '酒店设施'\n if da[0] in tag_da and not_tag_slot not in da[2]:\n return True\n return False\n\n\ndef calculateF1(predict_golden):\n TP, FP, FN = 0, 0, 0\n for item in predict_golden:\n p...
[ [ "torch.max" ] ]
faridrashidi/scphylo-tools
[ "4574e2c015da58e59caa38e3b3e49b398c1379c1" ]
[ "scphylo/external/gpps/_utils_hc.py" ]
[ "from subprocess import PIPE, Popen\n\nimport numpy as np\n\nimport scphylo as scp\nfrom scphylo.external.gpps._nh2lgf import newick_to_edgelist\n\n__author__ = \"Simone Ciccolella\"\n__date__ = \"11/30/21\"\n\n\nclass Node:\n def __init__(\n self,\n name,\n parent,\n id_node,\n ...
[ [ "numpy.savetxt" ] ]
Kerlex/ConvE
[ "5cb49efee85c6d98e460f193b0be19204da264ef" ]
[ "main.py" ]
[ "import json\nimport torch\nimport pickle\nimport numpy as np\nimport argparse\nimport sys\nimport os\nimport math\n\nfrom os.path import join\nimport torch.backends.cudnn as cudnn\n\nfrom evaluation import ranking_and_hits\nfrom model import ConvE, DistMult, Complex\n\nfrom spodernet.preprocessing.pipeline import ...
[ [ "numpy.array", "numpy.set_printoptions", "torch.no_grad", "numpy.sum", "torch.manual_seed", "torch.load" ] ]
prasunroy/cnn-on-degraded-images
[ "85bb4c62a024e3766da3c4d2556e01c6e12e416a" ]
[ "test.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nPerformance test of cnn architectures on various degradation models.\nCreated on Thu May 24 11:00:00 2018\nAuthor: Prasun Roy | CVPRU-ISICAL (http://www.isical.ac.in/~cvpr)\nGitHub: https://github.com/prasunroy/cnn-on-degraded-images\n\n\"\"\"\n\n\n# imports\nfrom __future__ import...
[ [ "numpy.asarray", "numpy.zeros", "pandas.DataFrame", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "numpy.sum", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show", "matplotlib.pyplot.gca" ] ]
ankitaggarwal011/MOOCs
[ "bc994c7c15708c00368f116d9f636dada06d7059" ]
[ "edX/AUTONAVx/PID.py" ]
[ "import numpy as np\n\nclass State:\n def __init__(self):\n self.position = np.zeros((3,1))\n self.velocity = np.zeros((3,1))\n\nclass UserCode:\n def __init__(self):\n \n # xy control gains\n Kp_xy = 2.0 # xy proportional\n Kd_xy = 1.0 # xy differential\n \n ...
[ [ "numpy.array", "numpy.zeros" ] ]
TiKeil/pymor
[ "5c6b3b6e1714b5ede11ce7cf03399780ab29d252", "e8b18d2d4c4b5998f0bd84f6728e365e0693b753" ]
[ "src/pymor/discretizers/builtin/fv.py", "src/pymordemos/parametric_heat.py" ]
[ "# This file is part of the pyMOR project (http://www.pymor.org).\n# Copyright 2013-2020 pyMOR developers and contributors. All rights reserved.\n# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)\n\n\"\"\" This module provides some operators for finite volume discretizations.\"\"\"\nfrom...
[ [ "numpy.concatenate", "scipy.sparse.coo_matrix", "numpy.array", "numpy.linalg.norm", "numpy.ones_like", "numpy.zeros_like", "numpy.minimum", "numpy.sum", "scipy.sparse.csc_matrix", "numpy.tile", "numpy.greater_equal", "numpy.less_equal", "numpy.einsum", "nump...
shivamsp133/pytorch
[ "457a3fb6d1441721cb72dca90b8f20b32d553856" ]
[ "test/ao/sparsity/test_pruner.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport logging\n\nimport torch\nfrom torch import nn\nfrom torch.ao.sparsity import BasePruner, PruningParametrization\nfrom torch.nn.utils import parametrize\n\nfrom torch.testing._internal.common_utils import TestCase\n\nlogging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)...
[ [ "torch.nn.Linear", "torch.ones", "torch.nn.ReLU", "torch.nn.utils.parametrize.is_parametrized", "torch.nn.Conv2d" ] ]
liud16/capstone18
[ "f40092ec6513621910fcfd4665bc349301bae9b0", "f40092ec6513621910fcfd4665bc349301bae9b0", "f40092ec6513621910fcfd4665bc349301bae9b0", "f40092ec6513621910fcfd4665bc349301bae9b0", "f40092ec6513621910fcfd4665bc349301bae9b0" ]
[ "code_dev/Peak-Fitting/curve_fit/gaussian_fit/TAdeconv_multgauss_matx.py", "code_dev/Peak-Evaluation/syntheticdata_threegaussian_noshift_broadpeak.py", "code_dev/Peak-Analysis/syntheticdata_2gauss_shiftpast_20180426.py", "peakaboo/data_smoothing.py", "peakaboo/smoothing_visualize.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Jun 7 09:08:14 2017\n\n@author: lyundemi\n\"\"\"\n\nimport numpy as np\nfrom scipy.optimize import differential_evolution, fmin_tnc\nimport itertools\nimport multiprocessing as mp\nimport random\nimport matplotlib.pyplot as plt\n\ndef find_nearest(array,value):\n ...
[ [ "scipy.optimize.differential_evolution", "numpy.sum", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "numpy.genfromtxt", "matplotlib.pyplot.figure", "numpy.exp", "numpy.abs" ], [ "matplotlib.pyplot.colorbar", "matplotlib.pyplot.pcol...
iirishikaii/cleverhans
[ "dda1aa598131c56a64103f478c153e84bc951f7c" ]
[ "cleverhans/model_zoo/basic_cls.py" ]
[ "\"\"\"\nA pure TensorFlow implementation of a convolutional neural network.\n\"\"\"\n# pylint: disable=missing-docstring\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\nimport numpy as np\nimport functools\n\n...
[ [ "tensorflow.variable_scope", "tensorflow.shape", "tensorflow.placeholder", "tensorflow.reshape" ] ]
bochuxt/LibRecommender
[ "3758c906ba6483019e31fbd4748020be75e6b43c" ]
[ "examples/pure_example.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom libreco.data import random_split, DatasetPure\nfrom libreco.algorithms import SVDpp # pure data, algorithm SVD++\n\n# remove unnecessary tensorflow logging\nimport os\nimport tensorflow as tf\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\nos.environ[\"KMP_WARNINGS\"] = \"...
[ [ "tensorflow.compat.v1.logging.set_verbosity", "pandas.read_csv" ] ]
DanMosier/openpilot
[ "f0b3593682c1e83c11c38a463063077e53cac5ad" ]
[ "selfdrive/test/test_onroad.py" ]
[ "#!/usr/bin/env python3\nimport json\nimport os\nimport subprocess\nimport time\nimport numpy as np\nimport unittest\nfrom collections import Counter\nfrom pathlib import Path\n\nfrom cereal import car\nimport cereal.messaging as messaging\nfrom cereal.services import service_list\nfrom common.basedir import BASEDI...
[ [ "numpy.max", "numpy.min", "numpy.mean", "numpy.diff", "numpy.std" ] ]
tony23545/yolact
[ "01bc1b0165035c74a4d28a5dff774d987b6a7ff3" ]
[ "eval_original.py" ]
[ "from data import COCODetection, MEANS, COLORS, COCO_CLASSES\nfrom yolact import Yolact\nfrom utils.augmentations import BaseTransform, FastBaseTransform, Resize\nfrom utils.functions import MovingAverage, ProgressBar\nfrom layers.box_utils import jaccard, center_size\nfrom utils import timer\nfrom utils.functions ...
[ [ "numpy.array", "torch.stack", "torch.cuda.synchronize", "torch.no_grad", "matplotlib.pyplot.title", "torch.set_default_tensor_type", "numpy.save", "torch.sum", "matplotlib.pyplot.show", "torch.onnx.export", "numpy.searchsorted", "torch.Tensor", "matplotlib.pyplo...
seba-1511/qrl
[ "7e02128610734311fd07ff78e9bd63530fe1002d" ]
[ "qsac.py" ]
[ "#!/usr/bin/env python\n\nfrom copy import deepcopy\nimport itertools\nimport numpy as np\nimport torch\nfrom torch.optim import Adam\nimport gym\nimport time\nimport sac_core as core\nimport tqdm\nimport wandb\nimport os\n\n\nclass ReplayBuffer:\n \"\"\"\n A simple FIFO experience replay buffer for SAC agent...
[ [ "torch.min", "numpy.zeros", "numpy.random.seed", "torch.no_grad", "torch.optim.Adam", "torch.manual_seed", "numpy.random.randint", "torch.as_tensor", "torch.set_num_threads" ] ]
mtmaru/prml_practice
[ "773b14d5a83381fc5b8a7cc00dcf4f14f87b0792" ]
[ "gaussian_mixture_em.py" ]
[ "import random\nimport numpy as np\nfrom scipy.stats import multivariate_normal\n\nclass GaussianMixtureEM():\n def __init__(self, n_class, max_iter=100, tol=1e-4):\n self.n_class = n_class\n self.max_iter = max_iter\n self.tol = tol\n\n def fit(self, X, y):\n n = len(X)\n n...
[ [ "numpy.array", "numpy.dot", "numpy.cov", "numpy.log", "numpy.zeros", "numpy.sum", "scipy.stats.multivariate_normal" ] ]
vision-and-sensing/Adaptive-LiDAR-Sampling
[ "fa49901cd9662393ffc2d267633ebe0b65be0a30", "fa49901cd9662393ffc2d267633ebe0b65be0a30" ]
[ "dataloaders/transforms.py", "dataloaders/kitti_loader.py" ]
[ "from __future__ import division\nimport torch\nimport math\nimport random\n\nfrom PIL import Image, ImageOps, ImageEnhance\ntry:\n import accimage\nexcept ImportError:\n accimage = None\n\nimport numpy as np\nimport numbers\nimport types\nimport collections\nimport warnings\n\nimport scipy.ndimage.interpolat...
[ [ "numpy.array", "numpy.uint8", "numpy.errstate", "torch.is_tensor", "numpy.random.shuffle", "numpy.clip", "numpy.fliplr" ], [ "numpy.max", "numpy.array", "numpy.random.binomial", "numpy.linalg.norm", "numpy.zeros", "numpy.eye", "numpy.random.uniform", ...
vivym/OpenKS
[ "ea380782162de2e4c1a413f37ad12b85ccb7048a", "ea380782162de2e4c1a413f37ad12b85ccb7048a" ]
[ "openks/models/pytorch/mmd_modules/STVGBert/src/stvglib/detectors/exdet.py", "openks/models/pytorch/mmd_modules/HOI/models/criterion.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\n# import _init_paths\n\nimport os\n\nimport cv2\nimport numpy as np\nfrom progress.bar import Bar\nimport time\nimport torch\n\nfrom models.decode import exct_decode, agnex_ct_decode\nfrom models.utils...
[ [ "numpy.concatenate", "torch.cuda.synchronize", "numpy.zeros", "torch.no_grad", "numpy.partition", "numpy.maximum" ], [ "torch.nn.functional.binary_cross_entropy_with_logits", "torch.cat", "torch.nn.functional.l1_loss", "torch.no_grad", "torch.ones", "torch.full_...
Nesting-Tech/zc-bnlp
[ "47fcf44b5cb6f4810a8bf612bb5f1bd2de94551d", "47fcf44b5cb6f4810a8bf612bb5f1bd2de94551d" ]
[ "demo/demo_zh.py", "bnlp/data/word2vec.py" ]
[ "# -*- coding: utf-8 -*-\n\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport sys\n\nsys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))\nimport tensorflow as tf\n# import coref_model as cm\n# import util...
[ [ "tensorflow.Session", "numpy.array", "numpy.stack" ], [ "numpy.fromstring", "numpy.linalg.norm", "numpy.zeros" ] ]
smart-cuhk/ruckig
[ "ebdf0c534b0c9ee9a82ffd7746939a79bea6a39a" ]
[ "test/benchmark_plot.py" ]
[ "from pathlib import Path\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n\nticks = ('1 DoF', '3 DoF', '6 DoF', '7 DoF')\nruckig_average_mean = [1.034, 5.768, 13.29, 15.67]\nruckig_average_err = [0.113595, 0.2788, 0.386, 0.351]\nruckig_worst_mean = [40.8002, 73.2714, 106.79, 116.333]\nruckig_worst_err = [...
[ [ "matplotlib.pyplot.subplot", "matplotlib.pyplot.gca", "matplotlib.pyplot.suptitle", "matplotlib.pyplot.figure" ] ]
SuperXiang/GMN
[ "b74364e5b9f424b63a5ce63a207a6e4a067d7d3b" ]
[ "spatial_graph/n_body_system/dataset_nbody.py" ]
[ "import numpy as np\nimport torch\nimport random\nimport pickle as pkl\n\n\nclass NBodyMStickDataset():\n \"\"\"\n NBodyDataset\n\n \"\"\"\n def __init__(self, partition='train', max_samples=1e8, data_dir='',\n n_isolated=5, n_stick=0, n_hinge=0):\n self.partition = partition\n ...
[ [ "torch.cat", "numpy.array", "torch.arange", "numpy.load", "torch.LongTensor", "torch.zeros_like", "torch.Tensor" ] ]
Rodrigo-Flo/Kratos
[ "f718cae5d1618e9c0e7ed1da9e95b7a853e62b1b" ]
[ "applications/MultilevelMonteCarloApplication/external_libraries/XMC/xmc/methodDefs_momentEstimator/powerSums.py" ]
[ "import warnings\nimport numpy as np\nfrom xmc.distributedEnvironmentFramework import (\n ExaquteTask,\n Type,\n Depth,\n COLLECTION_IN,\n INOUT,\n)\nfrom xmc.momentEstimator import (\n PowerSumsDict,\n SampleArray,\n PowerSumsDictUL,\n CombinedSampleArray,\n)\nfrom xmc.tools import flatt...
[ [ "numpy.sum", "numpy.array", "numpy.prod", "numpy.tensordot" ] ]
hkchengrex/TCN
[ "cca4c0995bc9d7bf4639adf68a75b540ca0fbc0c" ]
[ "TCN/adding_problem/add_test_lstm.py" ]
[ "import torch\nimport argparse\nimport torch.optim as optim\nimport torch.nn.functional as F\nimport sys\nsys.path.append(\"../../\")\nfrom TCN.adding_problem.model import LSTMNet\nfrom TCN.adding_problem.utils import data_generator\n\nparser = argparse.ArgumentParser(description='Sequence Modeling - The Adding Pro...
[ [ "torch.manual_seed", "torch.no_grad", "torch.cuda.is_available", "torch.nn.functional.mse_loss" ] ]
rickyHong/1Qbit-QEMIST-repl
[ "863fafdbc5bcd2c267b6a57dfa06b050aa053a6d" ]
[ "openqemist/tests/problem_decomposition/dmet/test_dmet_oneshot_loop.py" ]
[ "# Copyright 2019 1QBit\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 o...
[ [ "numpy.ndenumerate" ] ]
decisionforce/MAIRL
[ "f8ab1552ad4e96235e70192d13bb050b8c1b68e8" ]
[ "mgail.py" ]
[ "import numpy as np\nimport tensorflow as tf\n\nimport os\nimport common\nfrom ER import ER\nfrom forward_model import ForwardModel\nfrom discriminator import Discriminator\nfrom policy import Policy\nimport ops\n\nclass MGAIL(object):\n def __init__(self, environment):\n\n self.env = environment\n\n ...
[ [ "tensorflow.exp", "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.ones_like", "tensorflow.logical_not", "tensorflow.zeros_like", "tensorflow.stop_gradient", "tensorflow.cast", "tensorflow.shape", "tensorflow.concat", "numpy.log", "tensorflow.argmax", ...
Uornca/mirheo
[ "2ad5e9dd9f118e3998b291cbfc35ee91205bbef8" ]
[ "tests/rod/forces.py" ]
[ "#!/usr/bin/env python\n\nimport numpy as np\nimport mirheo as mir\nimport argparse\n\nparser = argparse.ArgumentParser()\nparser.add_argument('--kbounds', type=float, default=0.0)\nparser.add_argument('--ktwist', type=float, default=0.0)\nparser.add_argument('--kbending', type=float, nargs=3, default=(0.0, 0.0, 0....
[ [ "numpy.sin", "numpy.sqrt", "numpy.cos" ] ]
parkertomf/WrightTools
[ "09642b868fb51dab032470e8a6bc9c9fd5a541d4" ]
[ "examples/wmels_trive_off_diagonal.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nWMELs: TRIVE off diagonal\n=========================\n\nDraw WMELs for TRIVE off diagonal.\n\"\"\"\n\nimport matplotlib.pyplot as plt\n\nimport WrightTools.diagrams.WMEL as WMEL\n\nartist = WMEL.Artist(\n size=[6, 2], energies=[0., 0.43, 0.57, 1.], state_names=[\"g\", \"a\", \"b...
[ [ "matplotlib.pyplot.show" ] ]
ChaoyueSong/3d-corenet
[ "cada072a2491de4e24ec49334debee4adc484281" ]
[ "models/networks/base_network.py" ]
[ "import torch.nn as nn\nfrom torch.nn import init\n\n\nclass BaseNetwork(nn.Module):\n def __init__(self):\n super(BaseNetwork, self).__init__()\n\n def print_network(self):\n if isinstance(self, list):\n self = self[0]\n num_params = 0\n for param in self.parameters():\...
[ [ "torch.nn.init.constant_", "torch.nn.init.kaiming_normal_", "torch.nn.init.xavier_uniform_", "torch.nn.init.normal_", "torch.nn.init.orthogonal_", "torch.nn.init.xavier_normal_" ] ]
janEbert/pytorch3d
[ "accdac80fb29e82f72d4e8e73135ba8fd790b6c0" ]
[ "tests/test_common_workaround.py" ]
[ "# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree.\n\n\nimport unittest\n\nimport numpy as np\nimport torch\nfrom common_testing import TestCaseMixin\nfro...
[ [ "torch.rand", "torch.device", "numpy.random.seed", "torch.manual_seed", "numpy.random.randint", "torch.Tensor" ] ]
knei-knurow/AnyNet
[ "0f726822eded48956eea6a7c9c76ae1490e8725a" ]
[ "o3d.py" ]
[ "from __future__ import (absolute_import, division, print_function, unicode_literals)\nfrom builtins import *\nimport o3d3xx\nimport numpy as np\n\n\nimageWidth = 352 \nimageHeight = 264\n\nclass GrabO3D300():\n def __init__(self, addr=\"192.168.1.240\", port=50010):\n self.format = o3d3xx.PCICFormat.blo...
[ [ "numpy.frombuffer", "numpy.amax", "numpy.zeros", "numpy.double" ] ]
jhonatantirado/CheXNet-Keras
[ "264fd4ba889fe8d9f5dee48b4ba3f7c0018aa393" ]
[ "predict.py" ]
[ "from keras.models import load_model\nfrom keras.preprocessing import image\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport os\nfrom configparser import ConfigParser\nfrom models.keras import ModelFactory\nimport tensorflow as tf\n\n\ndef load_image(img_path, show=False):\n\n img = image.load_img(im...
[ [ "tensorflow.argmax", "tensorflow.keras.backend.eval", "numpy.expand_dims", "matplotlib.pyplot.show", "matplotlib.pyplot.axis", "matplotlib.pyplot.imshow" ] ]
devlibx/mlflowx
[ "291c51161ec26450b1e79c8e4a32af960da79591" ]
[ "mlflow/tracking/fluent.py" ]
[ "\"\"\"\nInternal module implementing the fluent API, allowing management of an active\nMLflow run. This module is exposed to users at the top-level :py:mod:`mlflow` module.\n\"\"\"\nimport os\n\nimport atexit\nimport time\nimport logging\nimport inspect\nfrom packaging.version import Version\nfrom typing import An...
[ [ "pandas.to_datetime", "pandas.DataFrame" ] ]
peterdhansen/shapash
[ "d2a5e466450e8bef1e2eac055d78773747244489" ]
[ "shapash/decomposition/contributions.py" ]
[ "\"\"\"\nContributions\n\"\"\"\n\nimport pandas as pd\nimport numpy as np\nfrom shapash.utils.transform import preprocessing_tolist\nfrom shapash.utils.transform import check_transformers\nfrom shapash.utils.category_encoder_backend import calc_inv_contrib_ce\nfrom shapash.utils.columntransformer_backend import cal...
[ [ "pandas.DataFrame", "numpy.take_along_axis", "numpy.abs" ] ]
KamilDeja/PyTorch-VAE
[ "7782de94bb3f0f11957932bdf2aacc307e8a12ff" ]
[ "evaluation_models/inception.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision\nimport os\n\ntry:\n from torchvision.models.utils import load_state_dict_from_url\nexcept ImportError:\n from torch.utils.model_zoo import load_url as load_state_dict_from_url\n\n# Inception weights ported to Pytorch fr...
[ [ "torch.cat", "torch.nn.functional.avg_pool2d", "torch.nn.ModuleList", "torch.nn.MaxPool2d", "torch.nn.Sequential", "torch.save", "torch.nn.functional.interpolate", "torch.utils.model_zoo.load_url", "torch.load", "torch.nn.AdaptiveAvgPool2d", "torch.nn.functional.max_poo...
vinicius-pirees/phaino
[ "4aa720505fef55b416149df664c4a8787e1491e5" ]
[ "phaino/models/gaussian.py" ]
[ "import os\nimport numpy as np\nimport scipy\nfrom numpy import inf\nfrom phaino.utils.spatio_temporal_gradient_features import process_frames\nfrom phaino.utils.commons import frame_to_gray, reduce_frame\nimport pickle\nfrom datetime import datetime\nfrom phaino.config.config import PhainoConfiguration\n\nconfig =...
[ [ "numpy.array", "numpy.nan_to_num", "numpy.log", "numpy.sum", "numpy.exp", "numpy.mean", "numpy.sqrt" ] ]
EthanVn/MotifX
[ "4258ac72823bdc335f4f3d01fd03c8dc495e14ec" ]
[ "motifx/motifx.py" ]
[ "from scipy.sparse import csr_matrix, csc_matrix, lil_matrix\nfrom .cache import Cache\nimport numpy as np\n\n\nclass MotifX(object):\n def __init__(self, matrix, reformat=True, dtype=np.int32):\n self.cache = Cache(matrix, reformat, dtype)\n\n def M1(self) -> (csr_matrix, dict):\n UT_csr: csr_m...
[ [ "scipy.sparse.lil_matrix", "numpy.array", "numpy.intersect1d" ] ]
DanShai/kivy-graph
[ "6537901d521247a13e186aaa8ecbaffdffdaf7ea" ]
[ "graph_plots/Data/data.py" ]
[ "'''\n\n@author: dan\n'''\nfrom __future__ import division\n\nimport numpy as np\n\nfrom random import randint\n\nfrom copy import deepcopy\nfrom sklearn.datasets import make_moons, make_circles, make_classification\nfrom sklearn.preprocessing import MinMaxScaler\n\n\nclass Adata(object):\n\n def make2DDatas(sel...
[ [ "numpy.array", "numpy.random.randint", "numpy.sort", "sklearn.preprocessing.MinMaxScaler", "sklearn.datasets.make_circles", "numpy.cos", "numpy.linspace", "sklearn.datasets.make_moons", "sklearn.datasets.make_classification" ] ]
wuguikel/DCFANet
[ "3d6a7d767f89b7c95692d89bfb2951aeca2740f6" ]
[ "mmdet/models/dense_heads/gfl_head_fixlastscale.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom mmcv.cnn import ConvModule, Scale, bias_init_with_prob, normal_init\nfrom mmcv.runner import force_fp32\n\nfrom mmdet.core import (anchor_inside_flags, bbox2distance, bbox_overlaps,\n build_assigner, build_sampler, di...
[ [ "torch.cat", "torch.stack", "torch.nn.ModuleList", "torch.split", "torch.linspace", "torch.nn.Conv2d", "torch.tensor", "torch.zeros_like" ] ]
raghuslash/3D-BoundingBox
[ "8969f18ab585af1e2da0e6deae0f1cc72ce289e1" ]
[ "Run.py" ]
[ "\"\"\"\nImages must be in ./Kitti/testing/image_2/ and camera matricies in ./Kitti/testing/calib/\n\nUses YOLO to obtain 2D box, PyTorch to get 3D box, plots both\n\nSPACE bar for next image, any other key to exit\n\"\"\"\n\n\nfrom torch_lib.Dataset import *\nfrom library.Math import *\nfrom library.Plotting impor...
[ [ "numpy.concatenate", "torch.zeros", "numpy.copy", "numpy.argmax", "numpy.arctan2", "torch.load" ] ]
ShahRutav/dmcontrol-generalization-benchmark
[ "99365bd1d71581a67a9e7626c5ac676450c158a9" ]
[ "src/train.py" ]
[ "import torch\nimport os\nimport numpy as np\nimport gym\nimport utils\nimport time\nfrom arguments import parse_args\nfrom env.wrappers import make_env\nfrom algorithms.factory import make_agent\nfrom logger import Logger\nfrom video import VideoRecorder\n\n\ndef evaluate(env, agent, video, num_episodes, L, step, ...
[ [ "torch.cuda.is_available", "numpy.mean" ] ]
kuchaale/grl_2020
[ "ddeca6955e6435c38d18be6ebca874fa037142b3" ]
[ "code/ssw_composite_cmam_optimized2-wss_hotspots.py" ]
[ "import xarray as xr\nimport sys\nimport pandas as pd\nimport glob\nfrom scipy import stats\nimport xarray.ufuncs as xrf\nfrom itertools import product\nfrom cftime import DatetimeNoLeap\n#from dask.distributed import Client\n\n#client = Client(set_as_default = True)\n\ndef open_date_file(file_path):\n df = pd.r...
[ [ "pandas.to_datetime", "pandas.read_csv" ] ]
rishabh-bhargava/great_expectations
[ "e3ce2d094536a2bc738f92e5686005390d694105" ]
[ "great_expectations/expectations/expectation.py" ]
[ "import logging\nimport re\nimport traceback\nfrom abc import ABC, ABCMeta, abstractmethod\nfrom collections import Counter\nfrom copy import deepcopy\nfrom inspect import isabstract\nfrom typing import Dict, List, Optional, Tuple\n\nimport pandas as pd\n\nfrom great_expectations import __version__ as ge_version\nf...
[ [ "pandas.DataFrame" ] ]
Gustoaxel/Statistical-autoencoder
[ "f3328f9c2a45ef0f7fe4adf98af4a64d02d34afc" ]
[ "Script_PLSDA_RF_SVM.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCopyright I3S CNRS UCA \n\nThis code is an implementation of the other methods used for comparison in the article :\n An efficient diagnostic that uses the latent space of a Non-Parametric Supervised Autoencoder \nfor metabolomic datasets of clinical studies.\n\nParameters : \n ...
[ [ "sklearn.cross_decomposition.PLSRegression", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.title", "numpy.mean", "matplotlib.pyplot.figure", "sklearn.preprocessing.scale", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", "pandas.concat", "matplotlib.pyplot.scatter", ...
jakobmoss/tsa
[ "ce67c67b03c19d0e5ceec568e95d0f16860b4efe" ]
[ "utils/makeweights.py" ]
[ "# -*- coding: utf-8 -*-\n\n# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n# Time Series Analysis -- Generate statistical weigts from scatter\n#\n# Author: Jakob Rørsted Mosumgaard\n# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n#################...
[ [ "numpy.square", "numpy.loadtxt", "numpy.transpose", "numpy.divide" ] ]
zwj2017-NK/NKAMG
[ "9a90a62ab86954b566b3703e3c2aa4587dc42ee4" ]
[ "ipPanel/app/views.py" ]
[ "from flask import render_template\nfrom flask.ext.appbuilder.models.sqla.interface import SQLAInterface\nfrom flask.ext.appbuilder import ModelView, BaseView, expose, has_access\nfrom app import appbuilder, db\n\nimport pandas as pd\nimport json\n\n\"\"\"\n Create your Views::\n\n\n class MyModelView(ModelVi...
[ [ "pandas.read_csv" ] ]
Akira794/PreviewController-python
[ "7b822870680988a2ab28a2177963a14c9b27f291" ]
[ "curve_fitting.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport numpy as np # Numerical library\nfrom scipy import * # Load the scipy functions\nfrom control.matlab import * # Load the controls systems library\nfrom matplotlib import pyplot as plt\n\nclass CurveFitting():\n\n def __init__(...
[ [ "numpy.linalg.solve", "numpy.power", "numpy.zeros" ] ]
mnicely/cupy
[ "9ed1d0db1404e9baa3c139032515d6028078bc91", "9ed1d0db1404e9baa3c139032515d6028078bc91" ]
[ "cupy/__init__.py", "tests/cupyx_tests/test_time.py" ]
[ "import functools\nimport sys\nimport warnings\n\nimport numpy\n\nfrom cupy import _environment\nfrom cupy import _version\n\n\nif sys.platform.startswith('win32') and (3, 8) <= sys.version_info: # NOQA\n _environment._setup_win32_dll_directory() # NOQA\n\n\ntry:\n with warnings.catch_warnings():\n w...
[ [ "numpy.result_type", "numpy.asarray", "numpy.binary_repr", "numpy.can_cast", "numpy.isscalar", "numpy.base_repr", "numpy.dtype" ], [ "numpy.array" ] ]
hhuuggoo/neurips2021_multimodal_viash
[ "f17af09a34ecac6309bcd7b5f8f5122e09318e0c", "f17af09a34ecac6309bcd7b5f8f5122e09318e0c" ]
[ "src/joint_embedding/metrics/ari/test.py", "src/match_modality/methods/dummy_constant/script.py" ]
[ "from os import path\nimport subprocess\nimport anndata as ad\n# import pandas as pd\nimport numpy as np\n\nnp.random.seed(42)\n\nmetric = 'ari'\n# metric_file = metric + '.tsv'\nmetric_file = metric + '.h5ad'\n\nprint(\">> Running script\")\nout = subprocess.check_output([\n \"./\" + metric,\n \"--input_pred...
[ [ "numpy.random.seed" ], [ "numpy.ones" ] ]
robot-ronny/rr-raspbian
[ "08d08797cab752dcf8a0130ca0ba1abe864c1d70" ]
[ "camera/cam_test.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\nimport time\nimport cv2\nimport numpy as np\nimport click\nimport click_log\nimport logging\nfrom imutils.video import VideoStream\n\nlogging.basicConfig(format='%(asctime)s %(message)s')\n\ndef nothing(x):\n pass\n\n\n@click.command()\n@click.option('--video', r...
[ [ "numpy.uint8", "numpy.array" ] ]
Nono17/AIOPS-Anomaly-Detection
[ "1bfc49ccf1c1c852a45a8e4606a9a73550184005", "1bfc49ccf1c1c852a45a8e4606a9a73550184005" ]
[ "KPIAnomaly/model_bagel/testing.py", "LogAnomaly/logdeep/tools/train.py" ]
[ "import model_bagel\nimport numpy as np\n\nfrom sklearn.metrics import precision_recall_curve\nfrom typing import Sequence, Tuple, Dict, Optional\n\n\ndef _adjust_scores(labels: np.ndarray,\n scores: np.ndarray,\n delay: Optional[int] = None,\n inplace: bool = F...
[ [ "numpy.max", "sklearn.metrics.precision_recall_curve", "numpy.copy", "numpy.shape", "numpy.where", "numpy.argmax", "numpy.clip", "numpy.maximum" ], [ "pandas.DataFrame", "torch.save", "torch.no_grad", "torch.utils.data.DataLoader", "torch.load", "torch.n...
wwarriner/unsupervised_onh_histo
[ "48ec23781af203a14ff590f3074a2d3559957560" ]
[ "inc/python_image_utilities/test/image_util_test.py" ]
[ "import unittest\nfrom pathlib import PurePath, Path\nfrom math import ceil\n\nimport numpy as np\n\nfrom image_util import *\n\n\nclass Test(unittest.TestCase):\n def setUp(self):\n self.side_len = np.iinfo(np.uint8).max\n self.base_shape = (self.side_len, self.side_len)\n\n self.rgb = np.m...
[ [ "numpy.concatenate", "numpy.array", "numpy.zeros", "numpy.round", "numpy.stack", "numpy.indices", "numpy.iinfo" ] ]
yeongjoon/NER
[ "d2c93597726ed9507bfddea9197007d30aeaad8b" ]
[ "SKTBert/data_loader.py" ]
[ "# coding=utf-8\r\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\r\n# Copyright (c) 2018, NVIDIA CORPORATION. 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.\...
[ [ "torch.save", "torch.tensor", "torch.load", "torch.distributed.barrier", "torch.utils.data.TensorDataset" ] ]
ChenYizhu97/BRITS
[ "79dda68d3d76b6a0e49caa1a3a6f2bb837b8c959" ]
[ "input_process.py" ]
[ "# coding: utf-8\n\nimport os\nimport re\nimport numpy as np\nimport pandas as pd\nimport pandas.io.json as json\n\npatient_ids = []\n\nfor filename in os.listdir('./raw'):\n # the patient data in PhysioNet contains 6-digits\n match = re.search('\\d{6}', filename)\n if match:\n id_ = match.group()\n...
[ [ "numpy.array", "numpy.isnan", "numpy.nan_to_num", "pandas.DataFrame", "numpy.ones", "pandas.io.json.dumps", "pandas.read_csv" ] ]
allen860614/NTU_ML
[ "15373e39ea3fe02d48abffd7dbd2ac2f1dacea55", "15373e39ea3fe02d48abffd7dbd2ac2f1dacea55" ]
[ "hw1/hw1_18.py", "hw3/hw3_14.py" ]
[ "import numpy as np\nimport random\n\n# load data set\ndata = np.loadtxt(\"hw1_train.dat.txt\")\n\n# set sign()\ndef sign(x):\n if x > 0:\n return 1\n else:\n return -1\n\n\nresult = []\n\ndef PLA(): # PLA algorithm\n num = 11 # the vector length\n end = 0 # check whether finish ...
[ [ "numpy.median", "numpy.loadtxt", "numpy.dot", "numpy.multiply" ], [ "numpy.dot", "numpy.hsplit", "numpy.loadtxt", "numpy.hstack", "numpy.mat" ] ]
Acemyzoe/gesture-classifier
[ "3f83ff86e61c6f99ef762c2e146ab326c2f86e2d" ]
[ "demo:v1/gesture_model.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport tensorflow as tf\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Dense, Dropout, Activation, Flatten\nfrom tensorflow.keras.layers import Conv2D, MaxPooling2D\nfrom keras.utils import np_utils\nimport numpy as np\nimport os...
[ [ "tensorflow.keras.layers.Activation", "tensorflow.keras.layers.Dense", "tensorflow.keras.models.Sequential", "matplotlib.pyplot.bar", "matplotlib.pyplot.xticks", "sklearn.utils.shuffle", "tensorflow.keras.layers.Conv2D", "numpy.expand_dims", "numpy.array", "matplotlib.pyplo...
AlfredNeverKog/BrainCarya
[ "2ee065a1fbface0c993c3ddfd0ca2cea236bbad5" ]
[ "src/my/kadenze/lesson1/GaussianTF.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport tensorflow as tf\nsess = tf.InteractiveSession() #open eval\n\n\nsigma = 3.0\nmean = 0\n\ndef gaus(x):\n y = (1 / (sigma * tf.sqrt(2.0 * 3.14))) * tf.exp(tf.neg((tf.pow(x - mean, 2.0)) / (2 * tf.pow(sigma, 2.0))))\n return y\ndef geus2d():\n x = ...
[ [ "tensorflow.linspace", "tensorflow.reshape", "matplotlib.pyplot.figure", "tensorflow.sqrt", "matplotlib.pyplot.show", "tensorflow.pow", "matplotlib.pyplot.axes", "tensorflow.InteractiveSession" ] ]
oplatek/nltk
[ "7216fb5aac79153c14015a5a234d34c2327c3188" ]
[ "nltk/parse/transitionparser.py" ]
[ "# Natural Language Toolkit: Arc-Standard and Arc-eager Transition Based Parsers\n#\n# Author: Long Duong <longdt219@gmail.com>\n#\n# Copyright (C) 2001-2015 NLTK Project\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\nimport tempfile\nimport pickle\n\nfrom os import remove\nfrom copy impo...
[ [ "numpy.array", "sklearn.datasets.load_svmlight_file", "sklearn.svm.SVC" ] ]
ratschlab/circEWS
[ "1e52880c268f8f763bbc16763131634ffc217153", "1e52880c268f8f763bbc16763131634ffc217153" ]
[ "circews/classes/label_gen.py", "shapelet_features/shapelets/train_test_split.py" ]
[ "''' \nClass wrapper for label generation, transforming an input data-frame with endpoints and\nan input data-frame with imputed data to a Pandas data-frame\nwith labels\n'''\n\nimport os\nimport sys\nimport os.path\nimport ipdb\n\nimport numpy as np\nimport scipy as sp\nimport pandas as pd\n\nimport circews.functi...
[ [ "pandas.DataFrame", "numpy.array", "numpy.unique" ], [ "pandas.to_datetime", "pandas.read_csv", "pandas.to_numeric" ] ]
quanghm/pandas
[ "4441b3361998168a9f3621aae067a9d5b050516d" ]
[ "pandas/tests/io/excel/test_writers.py" ]
[ "from datetime import date, datetime, timedelta\nfrom functools import partial\nfrom io import BytesIO\nimport os\n\nimport numpy as np\nimport pytest\n\nfrom pandas.compat import PY36\nimport pandas.util._test_decorators as td\n\nimport pandas as pd\nfrom pandas import DataFrame, Index, MultiIndex, get_option, set...
[ [ "pandas.util.testing.makeCustomDataframe", "pandas.io.excel.ExcelFile", "pandas.read_excel", "pandas.Timestamp", "pandas.util.testing.ensure_clean", "pandas.util._test_decorators.safe_import", "pandas.set_option", "pandas.io.excel.register_writer", "pandas.DataFrame", "nump...
KathaRies/MeshCNN
[ "be73736890c49d175cde80830a28352946e23611", "be73736890c49d175cde80830a28352946e23611" ]
[ "models/layers/mesh_pool.py", "models/layers/mesh_unpool.py" ]
[ "import torch\nimport torch.nn as nn\nfrom threading import Thread\nfrom MeshCNN.models.layers.mesh_union import MeshUnion\nimport numpy as np\nfrom heapq import heappop, heapify\n\n\nclass MeshPool(nn.Module):\n\n def __init__(self, target, multi_thread=False):\n super(MeshPool, self).__init__()\n ...
[ [ "torch.cat", "numpy.ones", "torch.arange", "torch.sum" ], [ "torch.nn.ConstantPad2d", "torch.nn.ConstantPad1d", "torch.cat", "torch.matmul" ] ]
mbeacom/aws-data-wrangler
[ "2e018ec3d0d2eaf073f759be65cfd75ee2bdce10" ]
[ "awswrangler/_utils.py" ]
[ "\"\"\"Internal (private) Utilities Module.\"\"\"\n\nimport logging\nimport math\nimport os\nfrom typing import Any, Dict, Generator, List, Optional, Tuple\n\nimport boto3 # type: ignore\nimport botocore.config # type: ignore\nimport numpy as np # type: ignore\nimport psycopg2 # type: ignore\nimport s3fs # typ...
[ [ "numpy.array_split" ] ]
junxnone/aerial_wildlife_detection
[ "0eebed2aaf926ceb212b6a2b7a75bb0a82b28a88", "0eebed2aaf926ceb212b6a2b7a75bb0a82b28a88" ]
[ "ai/models/pytorch/boundingBoxes/retinanet.py", "ai/models/pytorch/functional/_wsodPoints/collation.py" ]
[ "'''\n RetinaNet trainer for PyTorch.\n\n 2019-20 Benjamin Kellenberger\n'''\n\nimport io\nimport json\nfrom tqdm import tqdm\nimport torch\nfrom torch.utils.data import DataLoader\n\nfrom ..genericPyTorchModel import GenericPyTorchModel\nfrom .. import parse_transforms\n\nfrom ..functional._retinanet import ...
[ [ "torch.cuda.manual_seed", "torch.isnan", "torch.max", "torch.no_grad", "torch.clamp", "torch.manual_seed", "torch.cuda.empty_cache", "torch.utils.data.DataLoader", "torch.isinf" ], [ "torch.stack", "torch.tensor" ] ]
ATayls/DnaFeaturesViewer
[ "6ace5cdff96bf995aa26167868b0dbb47f5f5952" ]
[ "dna_features_viewer/GraphicRecord/BokehPlottableMixin.py" ]
[ "try:\n from bokeh.plotting import figure, ColumnDataSource\n from bokeh.models import Range1d, HoverTool\n\n BOKEH_AVAILABLE = True\nexcept ImportError:\n BOKEH_AVAILABLE = False\n\ntry:\n import pandas as pd\n\n PANDAS_AVAILABLE = True\nexcept ImportError:\n PANDAS_AVAILABLE = False\n\nimport...
[ [ "matplotlib.pyplot.close" ] ]