repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
thewtex/scikit-image
[ "22bb6b94698b8889cbdf26b25d9e4fdb8b968d97", "22bb6b94698b8889cbdf26b25d9e4fdb8b968d97", "22bb6b94698b8889cbdf26b25d9e4fdb8b968d97", "22bb6b94698b8889cbdf26b25d9e4fdb8b968d97", "22bb6b94698b8889cbdf26b25d9e4fdb8b968d97", "22bb6b94698b8889cbdf26b25d9e4fdb8b968d97", "22bb6b94698b8889cbdf26b25d9e4fdb8b968d9...
[ "skimage/segmentation/tests/test_random_walker.py", "skimage/restoration/deconvolution.py", "skimage/feature/peak.py", "skimage/feature/tests/test_register_translation.py", "skimage/color/tests/test_delta_e.py", "skimage/segmentation/random_walker_segmentation.py", "skimage/restoration/tests/test_inpain...
[ "import numpy as np\nfrom skimage.segmentation import random_walker\nfrom skimage.transform import resize\nfrom skimage._shared._warnings import expected_warnings\nfrom skimage._shared import testing\n\n\n# older versions of scipy raise a warning with new NumPy because they use\n# numpy.rank() instead of arr.ndim o...
[ [ "numpy.random.random", "numpy.random.seed", "numpy.arange", "numpy.ones", "numpy.testing.assert_array_equal", "numpy.max", "numpy.copy", "numpy.concatenate", "numpy.zeros_like", "numpy.random.normal", "numpy.random.randn", "numpy.zeros" ], [ "numpy.log", ...
JHuang-CV/OD
[ "290bf90a5f210199b6a3750c88152f7dd2fbc276" ]
[ "mmdet/models/necks/mscatfpn.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom mmcv.cnn import xavier_init\n\nfrom mmdet.core import auto_fp16\nfrom ..registry import NECKS\nfrom ..utils import ConvModule\nfrom mmdet.ops.context_block import ContextBlock\n\nfrom mmdet.models.plugins.squeeze_excitation import ChannelSE...
[ [ "torch.ones", "torch.cat", "torch.nn.ModuleList", "torch.nn.functional.relu", "torch.nn.functional.interpolate", "torch.nn.ReLU", "torch.nn.functional.max_pool2d" ] ]
sjforeman/draco
[ "b0ab40b6984637642b28a5485af1c09c9cf183f2" ]
[ "draco/core/io.py" ]
[ "\"\"\"Tasks for reading and writing data.\n\nTasks\n=====\n\n.. autosummary::\n :toctree:\n\n LoadFiles\n LoadMaps\n LoadFilesFromParams\n Save\n Print\n LoadBeamTransfer\n\nFile Groups\n===========\n\nSeveral tasks accept groups of files as arguments. These are specified in the YAML file as a...
[ [ "numpy.ascontiguousarray", "numpy.ndarray.reshape", "numpy.concatenate", "numpy.iscomplexobj", "numpy.array", "numpy.zeros" ] ]
adam-blinzler/simple-lane-detection
[ "8814e0aaf7ac56b7e5be59634e363ca17839effb" ]
[ "original_author_notes/yolo_video.py" ]
[ "# USAGE\n# python yolo_video.py --input videos/airport.mp4 --output output/airport_output.avi --object_detection object_detection-coco\n\n# import the necessary packages\nimport numpy as np\nimport argparse\nimport imutils\nimport time\nimport cv2\nimport os\n\n# construct the argument parse and parse the argument...
[ [ "numpy.array", "numpy.argmax", "numpy.random.seed" ] ]
vikashplus/MPL
[ "4a784fd94dc7a5988a1eca85851ee546ca1992f9" ]
[ "MPL/MPL_envs/reach/reach_v0.py" ]
[ "import numpy as np\nfrom gym import utils\nfrom mjrl.envs import mujoco_env\nfrom mujoco_py import MjViewer\nfrom MPL.MPL_robot.robot import Robot\nimport os\n\n# TODO: Action normalization is missing\n\nclass sallyReachEnv(mujoco_env.MujocoEnv, utils.EzPickle):\n def __init__(self, noise_scale=0.0):\n\n ...
[ [ "numpy.concatenate", "numpy.array", "numpy.mean", "numpy.linalg.norm" ] ]
ivankreso/semseg
[ "fcd2889a1e9e03c3d1a71d19d68d15ce25a5dc79", "fcd2889a1e9e03c3d1a71d19d68d15ce25a5dc79" ]
[ "OLD/losses.py", "OLD/models/resnet/old/resnet_orig.py" ]
[ "import tensorflow as tf\nimport slim\n\nFLAGS = tf.app.flags.FLAGS\n\n\ndef add_loss_summaries(total_loss):\n \"\"\"Add summaries for losses in model.\n\n Generates moving average for all losses and associated summaries for\n visualizing the performance of the network.\n\n Args:\n total_loss: Total loss fro...
[ [ "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.concat", "tensorflow.nn.log_softmax", "tensorflow.reduce_sum", "tensorflow.minimum", "tensorflow.train.ExponentialMovingAverage", "tensorflow.where", "tensorflow.to_int32", "tensorflow.summary.scalar", "tensorfl...
banroku/analySS
[ "15ba9e9216f86a1bf74062eae479a3ce1c9c5a11" ]
[ "drawSS.py" ]
[ "# coding=utf-8\ndef thinningSS(file, max_strain=10, interval=0.1):\n '''a function to conduct data thinning of SS curve at range (0, MAX_STRAIN), with INTERVAL\n This returns np.series of stress with strain in the index. \n FILE should be passed as dictionary containing following: \n 'name': name o...
[ [ "pandas.merge", "pandas.read_csv", "pandas.Series", "numpy.linspace" ] ]
ExplosiveJam/fickettmodel-reproducibility
[ "e47af1d3e2513d35dad65c16d4fd68c23e505f87" ]
[ "bifurcation-diagram/run.py" ]
[ "#!/usr/bin/env python\nr\"\"\" Run many simulations with varying :math:`\\theta`.\n\nThe simulations are run.\nSeparate script should plot bifurcation diagram.\n\n\"\"\"\nimport argparse\nimport os\nimport sys\nimport shutil\n\nimport numpy as np\n\nfrom mpi4py import MPI\n\nfrom saf.fm.nonlinear import Config\nfr...
[ [ "numpy.linspace" ] ]
ec-better/ewf-ethz-03-01-01
[ "5ca616e5c25bbba29013a7de248af4b69757921b" ]
[ "src/main/app-resources/notebook/libexec/helpers.py" ]
[ "# -*- coding: utf-8 -*-\nimport os\nimport numpy as np\nimport cv2\nimport re\n\nfrom shapely import wkt\nfrom shapely.geometry import box, Polygon\nimport pandas as pd\nimport geopandas as gpd\n\nfrom osgeo import gdal, gdalnumeric, osr, ogr\n\ndef ensure_dir(file_path):\n directory = os.path.dirname(file_path...
[ [ "numpy.nanmax", "numpy.linspace", "numpy.min", "numpy.isnan", "numpy.uint8", "numpy.nanmin", "pandas.DataFrame", "numpy.ones", "numpy.max", "numpy.float32", "numpy.zeros" ] ]
eivindeb/gym-letMPC
[ "7041aa56a25aa9a1c749088f2b370c910d21fe75" ]
[ "gym_let_mpc/let_mpc.py" ]
[ "import gym\nfrom gym.utils import seeding\nimport numpy as np\nimport json\nfrom gym_let_mpc.simulator import ControlSystem\nfrom gym_let_mpc.controllers import ETMPC, AHMPC\nimport collections.abc\nimport matplotlib.pyplot as plt\nfrom gym_let_mpc.utils import str_replace_whole_words\nimport copy\n\n\nclass LetMP...
[ [ "numpy.clip", "numpy.isnan", "numpy.finfo", "numpy.round", "matplotlib.pyplot.close", "numpy.array", "numpy.sum" ] ]
vishalbelsare/estimagic
[ "afae1be3a1566056d11962c495b67e64bc4a0822", "afae1be3a1566056d11962c495b67e64bc4a0822", "afae1be3a1566056d11962c495b67e64bc4a0822", "afae1be3a1566056d11962c495b67e64bc4a0822" ]
[ "estimagic/tests/differentiation/test_derivatives.py", "estimagic/optimization/nlopt_optimizers.py", "estimagic/tests/test_utilities.py", "estimagic/visualization/derivative_plot.py" ]
[ "from functools import partial\nfrom pathlib import Path\n\nimport numpy as np\nimport pandas as pd\nimport pytest\nfrom numpy.testing import assert_array_almost_equal as aaae\nfrom pandas.testing import assert_frame_equal\nfrom scipy.optimize._numdiff import approx_derivative\n\nfrom estimagic.differentiation.deri...
[ [ "pandas.read_pickle", "numpy.isnan", "numpy.arange", "numpy.cos", "pandas.DataFrame", "numpy.ones", "numpy.full", "numpy.sin", "numpy.zeros_like", "pandas.testing.assert_frame_equal", "numpy.exp", "numpy.array", "numpy.testing.assert_array_almost_equal" ], [...
weiwei1115/PaddleNLP
[ "dd98f7f8b25b41d39228ba8a958b11a6212709a3" ]
[ "examples/language_model/bert/run_glue.py" ]
[ "# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re...
[ [ "numpy.array", "numpy.random.seed" ] ]
star10919/drf
[ "77c005794087484d72ffc0d76612a6ac9845821e", "77c005794087484d72ffc0d76612a6ac9845821e", "77c005794087484d72ffc0d76612a6ac9845821e", "77c005794087484d72ffc0d76612a6ac9845821e", "77c005794087484d72ffc0d76612a6ac9845821e" ]
[ "venv/Lib/site-packages/sklearn/linear_model/_base.py", "venv/Lib/site-packages/sklearn/inspection/tests/test_partial_dependence.py", "venv/Lib/site-packages/sklearn/ensemble/_weight_boosting.py", "venv/Lib/site-packages/sklearn/tree/_classes.py", "venv/Lib/site-packages/folium/features.py" ]
[ "\"\"\"\nGeneralized Linear Models.\n\"\"\"\n\n# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>\n# Fabian Pedregosa <fabian.pedregosa@inria.fr>\n# Olivier Grisel <olivier.grisel@ensta.org>\n# Vincent Michel <vincent.michel@inria.fr>\n# Peter Prettenhofer <peter.prettenhofer@gmail.com>\n# ...
[ [ "numpy.dot", "numpy.sqrt", "numpy.asarray", "numpy.iinfo", "scipy.sparse.dia_matrix", "scipy.sparse.issparse", "scipy.linalg.lstsq", "numpy.full", "numpy.ravel", "numpy.zeros", "numpy.ascontiguousarray", "scipy.sparse.csr_matrix", "scipy.sparse.linalg.LinearOper...
zysilence/tensorforce
[ "7539e5dde66f3a93b881006f9b7f38c926ced21b", "7539e5dde66f3a93b881006f9b7f38c926ced21b", "7539e5dde66f3a93b881006f9b7f38c926ced21b", "3c3b9c3ac153761016cf9883b76613c9d93952bf" ]
[ "tensorforce/core/memories/latest.py", "tensorforce/core/memories/queue.py", "tensorforce/contrib/deepmind_lab.py", "examples/threaded_ale.py" ]
[ "# Copyright 2017 reinforce.io. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap...
[ [ "tensorflow.range", "tensorflow.reshape", "tensorflow.minimum", "tensorflow.logging.warn", "tensorflow.gather", "tensorflow.where", "tensorflow.logical_not" ], [ "tensorflow.scatter_update", "tensorflow.boolean_mask", "tensorflow.assign_add", "tensorflow.control_dep...
jjhelmus/scikit-image
[ "b9b5fde0821fe8bcece2528b30d012c65c64ad6f", "b9b5fde0821fe8bcece2528b30d012c65c64ad6f", "b9b5fde0821fe8bcece2528b30d012c65c64ad6f", "b9b5fde0821fe8bcece2528b30d012c65c64ad6f", "b9b5fde0821fe8bcece2528b30d012c65c64ad6f" ]
[ "skimage/transform/radon_transform.py", "skimage/measure/tests/test_regionprops.py", "skimage/filters/tests/test_thresholding.py", "skimage/io/tests/test_pil.py", "skimage/transform/_geometric.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nradon.py - Radon and inverse radon transforms\n\nBased on code of Justin K. Romberg\n(http://www.clear.rice.edu/elec431/projects96/DSP/bpanalysis.html)\nJ. Gillam and Chris Griffin.\n\nReferences:\n -B.R. Ramesh, N. Srinivasa, K. Rajgopal, \"An Algorithm for Computing\n the D...
[ [ "numpy.sqrt", "numpy.linspace", "numpy.asarray", "scipy.fftpack.fft", "numpy.all", "numpy.searchsorted", "scipy.fftpack.fftfreq", "numpy.clip", "numpy.arange", "numpy.sin", "numpy.ceil", "scipy.interpolate.interp1d", "numpy.interp", "numpy.zeros", "scipy...
chrisjsewell/aiida-performance
[ "160606f07fe092a9e2bacdf62bfecec460fac642" ]
[ "tests/db_stats.py" ]
[ "\"\"\"Useful queries for profiling PostgreSQL databases\n\nThese queries are mainly adapted from\nhttps://gist.github.com/anvk/475c22cbca1edc5ce94546c871460fdd\n\"\"\"\nfrom functools import wraps\nfrom pathlib import Path\n\n\ndef execute_raw(raw):\n from aiida.manage.manager import get_manager\n\n backend ...
[ [ "pandas.DataFrame" ] ]
mnicstruwig/optbinning
[ "6ce991e1ca75b4d41835f3b3bf8e0f294f6ba780" ]
[ "optbinning/binning/piecewise/continuous_binning.py" ]
[ "\"\"\"\nOptimal piecewise binning for continuous target.\n\"\"\"\n\n# Guillermo Navas-Palencia <g.navas.palencia@gmail.com>\n# Copyright (C) 2020\n\nimport time\n\nimport numpy as np\n\nfrom .base import _check_parameters\nfrom .base import BasePWBinning\nfrom .binning_statistics import PWContinuousBinningTable\nf...
[ [ "numpy.min", "numpy.max", "numpy.std", "numpy.count_nonzero", "numpy.sum" ] ]
mmwebster/DeepRL-Grounding
[ "aa7fa63fbc26e8b0fa3fe289a5fe5a00ef3e6278" ]
[ "a3c_train.py" ]
[ "import torch.optim as optim\nimport env as grounding_env\n\nfrom models import *\nfrom torch.autograd import Variable\n\nimport logging\n\n\ndef ensure_shared_grads(model, shared_model):\n for param, shared_param in zip(model.parameters(),\n shared_model.parameters()):\n ...
[ [ "torch.autograd.Variable" ] ]
mwojcik96/dtw-utterance-recognition
[ "9371393dfe92abb5b85c40828d099ceca599aa89" ]
[ "main.py" ]
[ "import glob\nimport struct\nimport wave\nfrom collections import Counter\nfrom operator import itemgetter\n\nimport librosa\nimport numpy as np\nfrom tslearn.metrics import dtw\n\n\ndef compute_mfcc_from_file(file):\n time_characteristic = create_time_characteristics_of_a_file(file)\n mfcc = librosa.feature....
[ [ "numpy.array" ] ]
mas-dse-ringhilt/DSE-American-Gut-Project
[ "dadb3be8d40d6fb325d26920b145c04c837a6869" ]
[ "american_gut_project_pipeline/pipeline/metrics.py" ]
[ "import pandas as pd\nfrom sklearn.metrics import confusion_matrix, accuracy_score, precision_score, recall_score, f1_score\n\n\ndef evaluate(clf, x_train, x_test, y_train, y_test, name, training_data_name, embedding, params=None):\n predictions = clf.predict(x_train)\n # train_tn, train_fp, train_fn, train_t...
[ [ "sklearn.metrics.f1_score", "pandas.DataFrame", "sklearn.metrics.accuracy_score" ] ]
grandevelia/ProDy
[ "7c725640a94c16543423c0756388998cb86a97ae", "7c725640a94c16543423c0756388998cb86a97ae" ]
[ "prody/chromatin/hic.py", "prody/atomic/improper.py" ]
[ "from numbers import Integral\n\nfrom numpy import ma\nimport numpy as np\nfrom scipy.sparse import coo_matrix\nfrom scipy.stats import mode\nfrom prody.chromatin.norm import VCnorm, SQRTVCnorm, Filenorm\nfrom prody.chromatin.functions import div0, showDomains, _getEigvecs\n\nfrom prody import PY2K\nfrom prody.dyna...
[ [ "numpy.diag", "numpy.expand_dims", "numpy.asarray", "numpy.ma.array", "numpy.where", "numpy.double", "numpy.ma.compress_rowcols", "scipy.sparse.coo_matrix", "numpy.asscalar", "numpy.eye", "numpy.diff", "numpy.count_nonzero", "numpy.load", "numpy.outer", ...
minhhoang1023/GamestonkTerminal
[ "195dc19b491052df080178c0cc6a9d535a91a704", "195dc19b491052df080178c0cc6a9d535a91a704", "195dc19b491052df080178c0cc6a9d535a91a704", "195dc19b491052df080178c0cc6a9d535a91a704", "195dc19b491052df080178c0cc6a9d535a91a704", "195dc19b491052df080178c0cc6a9d535a91a704", "195dc19b491052df080178c0cc6a9d535a91a70...
[ "gamestonk_terminal/common/quantitative_analysis/rolling_model.py", "gamestonk_terminal/portfolio/portfolio_view.py", "gamestonk_terminal/cryptocurrency/nft/opensea_model.py", "gamestonk_terminal/common/behavioural_analysis/twitter_model.py", "gamestonk_terminal/cryptocurrency/overview/rekt_model.py", "ga...
[ "\"\"\"Rolling Statistics\"\"\"\n__docformat__ = \"numpy\"\n\nimport logging\nfrom typing import Tuple\n\nimport pandas as pd\nimport pandas_ta as ta\n\nfrom gamestonk_terminal.decorators import log_start_end\n\nlogger = logging.getLogger(__name__)\n\n\n@log_start_end(log=logger)\ndef get_rolling_avg(df: pd.DataFra...
[ [ "pandas.DataFrame" ], [ "numpy.asarray", "pandas.concat", "matplotlib.pyplot.subplots", "pandas.DataFrame" ], [ "pandas.DataFrame" ], [ "pandas.DataFrame" ], [ "pandas.to_datetime", "pandas.DataFrame" ], [ "pandas.to_datetime", "pandas.DataFrame" ]...
matthieucoquet/probability
[ "2426f4fc4743ceedc1a638a03d19ce6654ebff76", "2426f4fc4743ceedc1a638a03d19ce6654ebff76", "2426f4fc4743ceedc1a638a03d19ce6654ebff76", "2426f4fc4743ceedc1a638a03d19ce6654ebff76", "2426f4fc4743ceedc1a638a03d19ce6654ebff76", "2426f4fc4743ceedc1a638a03d19ce6654ebff76", "2426f4fc4743ceedc1a638a03d19ce6654ebff7...
[ "tensorflow_probability/python/experimental/auto_batching/numpy_backend_test.py", "tensorflow_probability/python/bijectors/sigmoid_test.py", "tensorflow_probability/python/internal/backend/numpy/_utils.py", "tensorflow_probability/python/mcmc/sample_halton_sequence.py", "tensorflow_probability/python/sts/sm...
[ "# Copyright 2018 The TensorFlow Probability Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a...
[ [ "numpy.random.randn", "tensorflow.test.main", "numpy.ones" ], [ "numpy.log", "tensorflow.compat.v2.test.main", "scipy.special.expit", "numpy.linspace", "numpy.log1p" ], [ "tensorflow.nest.flatten", "numpy.dtype", "tensorflow.as_dtype" ], [ "tensorflow.co...
mohakbhardwaj/mjmpc
[ "097e8d9bdaf0b3a15afa39030b2f53b00dfa25de", "097e8d9bdaf0b3a15afa39030b2f53b00dfa25de", "097e8d9bdaf0b3a15afa39030b2f53b00dfa25de", "097e8d9bdaf0b3a15afa39030b2f53b00dfa25de" ]
[ "mjmpc/control/olgaussian_mpc.py", "mjmpc/value_functions/quadratic_val_func.py", "mjmpc/utils/logger.py", "mjmpc/control/softqmpc/deprecated/test_sac.py" ]
[ "\"\"\"\nMPC with open-loop Gaussian policies\n\"\"\"\nfrom .controller import Controller\nfrom mjmpc.utils.control_utils import generate_noise, scale_ctrl\nimport copy\nimport numpy as np\nimport scipy.special\n\nclass OLGaussianMPC(Controller):\n def __init__(self, \n d_state,\n ...
[ [ "numpy.diag", "numpy.random.normal", "numpy.cumprod", "numpy.array", "numpy.zeros" ], [ "torch.ones", "torch.isnan", "torch.zeros", "torch.cat", "torch.sum", "torch.eye", "torch.nn.Linear", "torch.FloatTensor", "torch.nn.init.zeros_" ], [ "pandas...
kite8/quant_learning
[ "d823974cd2b5a6b8e2a20fe42d7334051fa46ea0", "d823974cd2b5a6b8e2a20fe42d7334051fa46ea0" ]
[ "STS_v2/compute_high_low_limit_v3.py", "STS_v3/daily_fixing.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Nov 2 15:19:45 2018\n\n@author: kite\n\"\"\"\n\nimport datetime, time\nfrom pymongo import UpdateOne, ASCENDING, UpdateMany\nfrom database import DB_CONN\nfrom stock_util import get_trading_dates, get_all_codes\nimport tushare as ts\nimport numpy as np\nimport panda...
[ [ "numpy.round", "pandas.read_excel" ], [ "numpy.round" ] ]
gshowalt/VirusPopModel
[ "8d41294fa06a44e8fa22ef390d6db14fba7818a1" ]
[ "Code/CarbonEquiv_Talmy.py" ]
[ "\n# importing all modules\nimport numpy as np\n\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport matplotlib.colors as colors\nfrom matplotlib import cm\nimport matplotlib.tri as tri\nfrom matplotlib.colors import LogNorm\nimport matplotlib.patches as mpatches\nfrom matplotlib.ticker import LogFor...
[ [ "matplotlib.pyplot.legend", "numpy.linspace", "matplotlib.pyplot.yscale", "scipy.integrate.odeint", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.subplot", "matplotlib.pyplot.subplots_adjust", "numpy.exp", "matplotlib.pyplot.xlabel", "matplotl...
norheim/pextant
[ "f4235719279c0e6f178ae1e0f8b1ea3346533915" ]
[ "pextant/solvers/SEXTANTsolver.py" ]
[ "from pextant.lib.geoshapely import GeoPolygon, LONG_LAT\nimport numpy as np\nimport csv\n\nclass SEXTANTSolver(object):\n def __init__(self, environmental_model, cost_function, viz):\n self.env_model = environmental_model\n self.cost_function = cost_function\n self.viz = viz\n self.s...
[ [ "numpy.array" ] ]
Willyoung2017/doc-qa
[ "7ee02218952b0b9db63bc82b3895f743cdbd8f22" ]
[ "docqa/elmo/ablate_elmo_sub_filter.py" ]
[ "import argparse\nfrom datetime import datetime\n\nfrom tensorflow.contrib.keras.python.keras.initializers import TruncatedNormal\n\nfrom docqa import trainer\nfrom docqa.data_processing.qa_training_data import ContextLenKey\nfrom docqa.dataset import ClusteredBatcher\nfrom docqa.encoder import DocumentAndQuestionE...
[ [ "tensorflow.contrib.keras.python.keras.initializers.TruncatedNormal" ] ]
Duy-Vu/stock-network
[ "3e84cfc581cd07001e86c20101c91c2f8910deb2" ]
[ "utils.py" ]
[ "import numpy as np\r\n\r\n\r\ndef clean_data(df, out_df_dir=\"\"):\r\n df.dropna(axis=1, inplace=True)\r\n\r\n if out_df_dir:\r\n df.to_csv(out_df_dir)\r\n\r\n return df\r\n\r\n\r\n# Calculate log change of daily price\r\ndef log_change(series):\r\n return np.log(series[1] / series[0])\r\n\r\n\r...
[ [ "numpy.log" ] ]
jet-universe/particle_transformer
[ "68a7fbcd7d39a64b753251064f120462400895a1" ]
[ "networks/example_ParticleTransformer.py" ]
[ "import os\nimport torch\nfrom weaver.utils.logger import _logger\nfrom weaver.utils.import_tools import import_module\n\nParticleTransformer = import_module(\n os.path.join(os.path.dirname(__file__), 'ParticleTransformer.py'), 'ParT').ParticleTransformer\n\n\nclass ParticleTransformerWrapper(torch.nn.Module):\n...
[ [ "torch.nn.CrossEntropyLoss" ] ]
jessijzhao/fairscale
[ "d6a8fc6dadc5d5ab4e3ee3f42f8cd570d70d30ec", "d6a8fc6dadc5d5ab4e3ee3f42f8cd570d70d30ec" ]
[ "benchmarks/pipe.py", "fairscale/optim/grad_scaler.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n\nimport argparse\nimport logging\nimport math\nimport os\nimport time\nimport warnings\n\nfrom benchmark_dataset import BenchmarkLMDataset, collate_sentences_lm\nimport torch\nfrom torch.distributed import rpc\nimport torch.multiprocessing a...
[ [ "torch.multiprocessing.spawn", "torch.zeros", "torch.sin", "torch.utils.data.DataLoader", "torch.no_grad", "torch.cuda.is_available", "torch.device", "torch.distributed.get_rank", "torch.nn.CrossEntropyLoss", "torch.nn.Dropout", "torch.ones", "torch.distributed.init...
konstmish/opt_methods
[ "ae73d9bd89ae5c463e70328d73cbd190175df98c" ]
[ "loss_functions/loss_oracle.py" ]
[ "import copy\nimport numpy as np\nimport warnings\n\nfrom .regularizer import Regularizer\n \n\nclass Oracle():\n \"\"\"\n Base class for all objectives. Can provide objective values,\n gradients and its Hessians as functions that take parameters as input.\n Takes as input the values of l1 and l2...
[ [ "numpy.random.default_rng" ] ]
zhongwen/jax
[ "76d2a87915863d3a32732837cc7bf61b7b2f9e5b" ]
[ "tests/lax_numpy_test.py" ]
[ "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.diag", "numpy.take_along_axis", "numpy.split", "numpy.expand_dims", "numpy.take", "numpy.issubdtype", "numpy.squeeze", "numpy.flipud", "numpy.dtype", "numpy.round", "numpy.concatenate", "numpy.mean", "numpy.iinfo", "numpy.tri", "numpy.cross", ...
DiogoRibeiro7/Machine-Learning
[ "d2c789851f8b4eaf74cdd0c18af072f60cd45cb3", "d2c789851f8b4eaf74cdd0c18af072f60cd45cb3", "d2c789851f8b4eaf74cdd0c18af072f60cd45cb3" ]
[ "Ensemble Learning/AdaBoost.py", "Supervised Learning/TreeRegression.py", "Supervised Learning/LinearRegression.py" ]
[ "\"\"\"\n@Filename: AdaptiveBoost.py\n@Author: Diogo Ribeiro\n@Create Date: 2019-05-03\n@Update Date: 2019-05-03\n@Description: Implement of Adaptive Boosting\n\"\"\"\n\nimport numpy as np\nimport preProcess\nimport pickle\nimport random\nimport SVM\nimport math\n\nclass Adaboost:\n def __...
[ [ "numpy.dot", "numpy.expand_dims", "numpy.multiply", "numpy.ones", "numpy.sign", "numpy.exp", "numpy.zeros" ], [ "numpy.hstack", "numpy.expand_dims", "numpy.unique", "numpy.shape", "numpy.mean", "numpy.var", "numpy.array", "numpy.zeros" ], [ "...
Sebastianvarv/rl-homework
[ "b7526ac3c86cbaae6b796856c31fc4c671a32663" ]
[ "hw1/run_expert.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"\nCode to load an expert policy and generate roll-out data for behavioral cloning.\nExample usage:\n python run_expert.py experts/Humanoid-v1.pkl Humanoid-v1 --render \\\n --num_rollouts 20\n\nAuthor of this script and included expert policies: Jonathan Ho (hoj@openai.c...
[ [ "numpy.std", "numpy.array", "numpy.mean", "tensorflow.Session" ] ]
mmiller-max/clearml
[ "fd2d6c6f5d46cad3e406e88eeb4d805455b5b3d8" ]
[ "clearml/storage/helper.py" ]
[ "from __future__ import with_statement\n\nimport errno\nimport getpass\nimport itertools\nimport json\nimport os\nimport shutil\nimport sys\nimport threading\nfrom abc import ABCMeta, abstractmethod\nfrom collections import namedtuple\nfrom concurrent.futures import ThreadPoolExecutor\nfrom copy import copy\nfrom d...
[ [ "numpy.frombuffer" ] ]
bwconrad/solo-learn
[ "ec510d803a4428d7d8803b90fa1484c42cb9cb52", "ec510d803a4428d7d8803b90fa1484c42cb9cb52", "ec510d803a4428d7d8803b90fa1484c42cb9cb52", "ec510d803a4428d7d8803b90fa1484c42cb9cb52", "ec510d803a4428d7d8803b90fa1484c42cb9cb52", "ec510d803a4428d7d8803b90fa1484c42cb9cb52", "ec510d803a4428d7d8803b90fa1484c42cb9cb5...
[ "downstream/tinypersons/mmdet/datasets/pipelines/formating.py", "downstream/tinypersons/mmdet/models/detectors/centernet.py", "downstream/tinypersons/mmdet/models/roi_heads/mask_heads/mask_point_head.py", "downstream/med-seg/pannuke_eval/run_breast.py", "solo/losses/vibcreg.py", "solo/methods/simclr.py", ...
[ "from collections.abc import Sequence\n\nimport mmcv\nimport numpy as np\nimport torch\nfrom mmcv.parallel import DataContainer as DC\n\nfrom ..builder import PIPELINES\n\n\ndef to_tensor(data):\n \"\"\"Convert objects of various python types to :obj:`torch.Tensor`.\n\n Supported types are: :class:`numpy.ndar...
[ [ "torch.LongTensor", "numpy.expand_dims", "torch.from_numpy", "torch.tensor", "numpy.ones", "torch.FloatTensor", "numpy.zeros" ], [ "torch.cat" ], [ "torch.abs", "torch.cat", "torch.nn.ModuleList", "torch.zeros_like", "torch.nn.Conv1d", "torch.rand", ...
shaandesai1/transfer_diffeq
[ "29ab4f3ff16a58bc7b1751428e540a3bb135778c" ]
[ "visualizer.py" ]
[ "\nimport numpy as np\nimport torch\nimport matplotlib.pyplot as plt\nfrom neurodiffeq import diff # the differentiation operation\nfrom neurodiffeq.conditions import IVP # the initial condition\nfrom neurodiffeq.networks import FCNN # fully-connect neural network\nfrom neurodiffeq.solvers import Solver1D\nfrom ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.plot", "numpy.load", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
talahajeer/scikit-learn
[ "d66b42708a5912039740cd08f747229433e579b5", "d66b42708a5912039740cd08f747229433e579b5", "d66b42708a5912039740cd08f747229433e579b5", "d66b42708a5912039740cd08f747229433e579b5", "d66b42708a5912039740cd08f747229433e579b5", "d66b42708a5912039740cd08f747229433e579b5", "d66b42708a5912039740cd08f747229433e579b...
[ "sklearn/preprocessing/tests/test_polynomial.py", "sklearn/impute/_base.py", "sklearn/model_selection/tests/test_successive_halving.py", "examples/model_selection/plot_grid_search_stats.py", "sklearn/neural_network/_stochastic_optimizers.py", "examples/ensemble/plot_forest_importances_faces.py", "sklear...
[ "import numpy as np\nimport pytest\nfrom scipy import sparse\nfrom scipy.sparse import random as sparse_random\nfrom sklearn.utils._testing import assert_array_almost_equal\n\nfrom numpy.testing import assert_allclose, assert_array_equal\nfrom scipy.interpolate import BSpline\nfrom sklearn.linear_model import Linea...
[ [ "numpy.linspace", "numpy.asarray", "sklearn.preprocessing.PolynomialFeatures", "scipy.sparse.random", "sklearn.preprocessing.PolynomialFeatures._combinations", "numpy.hstack", "numpy.ones_like", "numpy.arange", "numpy.sin", "sklearn.preprocessing.SplineTransformer", "nu...
tsoonjin/selam
[ "fbbb355490271bf09056e05b23245be1b75ae24d" ]
[ "selam/prepdata.py" ]
[ "#!/bin/bash\nimport os\nimport sys\nimport random\nimport cv2\nimport numpy as np\nimport xgboost as xgb\n\nfrom sklearn import preprocessing\nfrom sklearn.decomposition import PCA, NMF\nfrom sklearn.model_selection import train_test_split, GridSearchCV\nfrom sklearn.svm import SVC\nfrom sklearn.ensemble import Ra...
[ [ "sklearn.model_selection.GridSearchCV", "sklearn.decomposition.NMF", "sklearn.ensemble.RandomForestClassifier", "sklearn.model_selection.train_test_split", "numpy.mean", "sklearn.svm.SVC", "sklearn.gaussian_process.GaussianProcessClassifier", "sklearn.preprocessing.StandardScaler",...
michalnand/reinforcement_learning_agents
[ "45f02c23b1135c87311dce5a52f6e643e4313fc3", "45f02c23b1135c87311dce5a52f6e643e4313fc3", "45f02c23b1135c87311dce5a52f6e643e4313fc3", "45f02c23b1135c87311dce5a52f6e643e4313fc3" ]
[ "RLAgents/lib_common/WrapperSuperMario.py", "RLAgents/lib_agents/AgentPPORND.py", "RLAgents/lib_common/RLStatsCompute.py", "RLAgents/lib_agents/AgentDQNDuel.py" ]
[ "import gym\nimport numpy\nfrom PIL import Image\n\nfrom nes_py.wrappers import JoypadSpace\nfrom gym_super_mario_bros.actions import COMPLEX_MOVEMENT\n\nclass NopOpsEnv(gym.Wrapper):\n def __init__(self, env=None, max_count=30):\n super(NopOpsEnv, self).__init__(env)\n self.max_count = max_count\n...
[ [ "numpy.array", "numpy.zeros", "numpy.random.randint" ], [ "torch.nn.functional.softmax", "torch.nn.functional.log_softmax", "numpy.clip", "torch.min", "torch.from_numpy", "torch.tensor", "torch.exp", "torch.distributions.Categorical", "torch.rand", "torch.cl...
yuhaoooo/FaceAdv
[ "73e27b7ca01243a9a3d115f5fabd1008b2afb34a", "73e27b7ca01243a9a3d115f5fabd1008b2afb34a" ]
[ "Finetune/cosface_finetune.py", "Video/main.py" ]
[ "import os\nimport torch\nimport random\nimport numpy as np\nimport torch.optim as optim\nfrom torch.utils.data import DataLoader\nfrom torchvision import transforms, datasets\nfrom module.units.cosface_module import CosFace\n\n\ndef accuracy(logits, y):\n _, preds = torch.max(logits, 1)\n return (preds == y)...
[ [ "torch.nn.CrossEntropyLoss", "torch.max", "torch.cuda.manual_seed", "numpy.random.seed", "torch.manual_seed", "torch.utils.data.DataLoader", "torch.cuda.is_available", "torch.save" ], [ "numpy.asarray", "torch.nn.functional.softmax", "torch.cuda.is_available" ] ]
hybug/RL_Lab
[ "0748e143a0fb60b9912ca28fbebc25e8f97a2fe4", "0748e143a0fb60b9912ca28fbebc25e8f97a2fe4" ]
[ "examples/PPO_super_mario_bros/env.py", "examples/PPO_super_mario_bros/policy_graph.py" ]
[ "'''\nAuthor: hanyu\nDate: 2020-11-06 13:04:12\nLastEditTime: 2021-01-09 09:07:08\nLastEditors: hanyu\nDescription: environment\nFilePath: /test_ppo/examples/PPO_super_mario_bros/env.py\n'''\nimport logging\nimport numpy as np\n\nfrom collections import namedtuple\n\n\n# todo, to common\ndef padding(input, seqlen, ...
[ [ "numpy.tile", "numpy.concatenate", "numpy.zeros_like", "numpy.array", "numpy.zeros" ], [ "tensorflow.nn.relu", "tensorflow.layers.conv2d", "tensorflow.concat", "tensorflow.reduce_mean", "tensorflow.maximum", "tensorflow.reshape", "tensorflow.layers.dense", "...
monkeypants/CartridgeOCR
[ "a2cdaa72e3839a881118b85f5ff7b4515579004b" ]
[ "src/model/dataProcessing/coco_utils.py" ]
[ "import copy\nimport os\nimport torch\nimport torch.utils.data\nimport torchvision\nfrom pycocotools import mask as coco_mask\nfrom pycocotools.coco import COCO\nimport dataProcessing.transforms as T\nimport logging\n\n\nclass FilterAndRemapCocoCategories(object):\n def __init__(self, categories, remap=True):\n ...
[ [ "torch.zeros", "torch.tensor", "torch.as_tensor", "torch.utils.data.Subset", "torch.stack" ] ]
crisely09/pyscf
[ "cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6", "cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6", "cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6", "cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6", "cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6" ]
[ "pyscf/fci/selected_ci.py", "pyscf/pbc/dft/numint.py", "pyscf/dft/test/test_xcfun.py", "pyscf/prop/gtensor/uhf.py", "pyscf/mcscf/addons.py" ]
[ "#!/usr/bin/env python\n# Copyright 2014-2019 The PySCF Developers. 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/LIC...
[ [ "numpy.sqrt", "numpy.einsum", "numpy.tril_indices", "numpy.asarray", "numpy.ndarray.__array_wrap__", "numpy.ones", "numpy.append", "numpy.zeros_like", "numpy.argsort", "numpy.zeros", "numpy.where", "numpy.empty" ], [ "numpy.hstack", "numpy.sqrt", "nu...
MISStingting/NMTmodel
[ "970115d6f9fcd015d7daf3ad0e4844055e2af5d3", "970115d6f9fcd015d7daf3ad0e4844055e2af5d3" ]
[ "NMT/dataset.py", "tests/dataset_test.py" ]
[ "import tensorflow as tf\n\n\n# tf.enable_eager_execution()\n\n\nclass Dataset(object):\n\n def get_dataset(self, params, mode):\n if mode == tf.estimator.ModeKeys.TRAIN:\n features_path = params[\"train_features_file\"]\n labels_path = params[\"train_labels_file\"]\n elif mod...
[ [ "tensorflow.TensorShape", "tensorflow.constant", "tensorflow.concat", "tensorflow.string_split", "tensorflow.data.Dataset.zip", "tensorflow.data.TextLineDataset", "tensorflow.size" ], [ "tensorflow.gfile.GFile", "tensorflow.test.main" ] ]
EdisonLeeeee/GraphGallery
[ "4eec9c5136bda14809bd22584b26cc346cdb633b", "4eec9c5136bda14809bd22584b26cc346cdb633b", "4eec9c5136bda14809bd22584b26cc346cdb633b", "4eec9c5136bda14809bd22584b26cc346cdb633b", "4eec9c5136bda14809bd22584b26cc346cdb633b", "4eec9c5136bda14809bd22584b26cc346cdb633b" ]
[ "graphgallery/nn/layers/tensorflow/dropout/dropout.py", "examples/Graph_Adversarial_Learning/Untargeted/Evasion/PyTorch/Metattack.py", "graphgallery/attack/untargeted/tensorflow/metattack.py", "graphgallery/nn/models/pytorch/parinorm/sgc_pn.py", "graphgallery/attack/untargeted/pytorch/pgd.py", "graphgalle...
[ "import tensorflow as tf\r\nimport tensorflow.keras.backend as K\r\nfrom tensorflow.keras.layers import Layer, Dropout\r\n\r\n\r\nclass SparseDropout(Layer):\r\n def __init__(self, p=0.5):\r\n super().__init__()\r\n self.p = p\r\n\r\n def call(self, x, training=None):\r\n if training is N...
[ [ "tensorflow.keras.backend.learning_phase", "tensorflow.SparseTensor", "tensorflow.keras.layers.Dropout", "tensorflow.keras.backend.is_sparse", "tensorflow.nn.dropout" ], [ "numpy.hstack" ], [ "tensorflow.device", "tensorflow.reduce_sum", "tensorflow.equal", "tensorf...
ammaryasirnaich/mmdetection3d
[ "5e549546abbb2a7b43aab59e40e87599f61dcc4a", "5e549546abbb2a7b43aab59e40e87599f61dcc4a", "5e549546abbb2a7b43aab59e40e87599f61dcc4a", "5e549546abbb2a7b43aab59e40e87599f61dcc4a", "5e549546abbb2a7b43aab59e40e87599f61dcc4a", "5e549546abbb2a7b43aab59e40e87599f61dcc4a", "5e549546abbb2a7b43aab59e40e87599f61dcc4...
[ "tests/test_data/test_datasets/test_kitti_dataset.py", "tests/test_data/test_datasets/test_nuscene_dataset.py", "IntensityNet_testing/train.py", "mmdet3d/models/detectors/h3dnet.py", "mmdet3d/ops/sparse_block.py", "tools/data_converter/scannet_data_utils.py", "mmdet3d/datasets/nuscenes_dataset.py" ]
[ "# Copyright (c) OpenMMLab. All rights reserved.\nimport math\nimport os\nimport tempfile\n\nimport numpy as np\nimport pytest\nimport torch\n\nfrom mmdet3d.core.bbox import LiDARInstance3DBoxes, limit_period\nfrom mmdet3d.datasets import KittiDataset\n\n\ndef _generate_kitti_dataset_config():\n data_root = 'tes...
[ [ "torch.all", "numpy.allclose", "numpy.random.seed", "torch.tensor", "numpy.all", "torch.cuda.is_available", "torch.allclose", "numpy.array", "numpy.isclose" ], [ "numpy.random.seed", "torch.tensor" ], [ "torch.distributed.get_rank" ], [ "torch.stack"...
millingermarkus/pypsa-eur
[ "2e39a21299036c0cec86fe4707de06a42ec15d62" ]
[ "scripts/build_load_data.py" ]
[ "# SPDX-FileCopyrightText: : 2020 @JanFrederickUnnewehr, The PyPSA-Eur Authors\n#\n# SPDX-License-Identifier: MIT\n\n\"\"\"\n\nThis rule downloads the load data from `Open Power System Data Time series <https://data.open-power-system-data.org/time_series/>`_. For all countries in the network, the per country load t...
[ [ "pandas.concat", "pandas.read_csv", "pandas.Series", "pandas.Timedelta", "numpy.timedelta64", "pandas.date_range", "pandas.Timestamp" ] ]
daiki-kimura/commonsense-rl
[ "5513926957b6501ce9cfa46f77f8f2c1c4892fa5", "5513926957b6501ce9cfa46f77f8f2c1c4892fa5" ]
[ "utils_twc/kg.py", "train_agent.py" ]
[ "import sys\nimport networkx as nx\nimport logging\nimport json\nimport requests\nfrom pathlib import Path\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom collections import defaultdict\nfrom utils_twc.generic import escape_entities\n\n# Logging formatting\nFORMAT = '%(asctime)s %(message)s'\nlogging.bas...
[ [ "numpy.min", "matplotlib.pyplot.get_cmap", "matplotlib.pyplot.Normalize", "numpy.max", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.show" ], [ "numpy.random.seed", "torch.cuda.manual_seed", "torch.manual_seed", "numpy.apply_along_axis", "numpy.mean", "torch....
714627034/Paddle-Lite
[ "015ba88a4d639db0b73603e37f83e47be041a4eb", "015ba88a4d639db0b73603e37f83e47be041a4eb", "eea59b66f61bb2acad471010c9526eeec43a15ca", "015ba88a4d639db0b73603e37f83e47be041a4eb" ]
[ "lite/tests/unittest_py/op/common/test_unique_with_counts_op_base.py", "lite/tests/unittest_py/op/test_squeeze_op.py", "lite/tests/unittest_py/op/common/test_expand_as_op_base.py", "lite/tests/unittest_py/op/test_compare_less_op.py" ]
[ "# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re...
[ [ "numpy.random.randint" ], [ "numpy.random.normal" ], [ "numpy.random.random" ], [ "numpy.random.random", "numpy.random.randint" ] ]
lqkweb/learnMLflow
[ "13c5decaebba95b1b90f92021be35e343b4764af", "13c5decaebba95b1b90f92021be35e343b4764af", "13c5decaebba95b1b90f92021be35e343b4764af", "13c5decaebba95b1b90f92021be35e343b4764af", "13c5decaebba95b1b90f92021be35e343b4764af" ]
[ "scikit-learn-master/sklearn/linear_model/ridge.py", "scikit-learn-master/sklearn/utils/tests/test_utils.py", "scikit-learn-master/sklearn/linear_model/least_angle.py", "scikit-learn-master/sklearn/datasets/tests/test_base.py", "scikit-learn-master/sklearn/ensemble/base.py" ]
[ "\"\"\"\nRidge regression\n\"\"\"\n\n# Author: Mathieu Blondel <mathieu@mblondel.org>\n# Reuben Fletcher-Costin <reuben.fletchercostin@gmail.com>\n# Fabian Pedregosa <fabian@fseoane.net>\n# Michael Eickenberg <michael.eickenberg@nsup.org>\n# License: BSD 3 clause\n\n\nfrom abc import ABCMeta...
[ [ "numpy.dot", "scipy.linalg.svd", "numpy.sqrt", "numpy.asarray", "numpy.any", "numpy.var", "scipy.sparse.linalg.lsqr", "numpy.ones_like", "scipy.sparse.issparse", "scipy.sparse.linalg.cg", "scipy.linalg.lstsq", "numpy.atleast_1d", "scipy.linalg.eigh", "scipy....
Easonyesheng/StereoCameraToolk
[ "9319b7f4e5ce36833de722a15e1074e82b8b4f84", "9319b7f4e5ce36833de722a15e1074e82b8b4f84" ]
[ "models/ModelUtil/util.py", "Code_V1/RecStereo.py" ]
[ "\"\"\"Utility \"\"\"\n\nimport numpy as np\nimport cv2\nimport os\nimport logging\n\ndef check_string_is_empty(string):\n \"\"\"name\n check string empty or not\n Args: \n\n Returns:\n\n \"\"\"\n if string == '':\n return True\n\n return False\n\ndef check_numpy_array(array):\n \...
[ [ "numpy.max" ], [ "numpy.array" ] ]
DewMaple/opencv-learning
[ "51991a5b9badf24cda740c1377f6be30dea91e1d" ]
[ "lesson_4_transformation/lesson_4_affine_transformation.py" ]
[ "import cv2\nimport numpy as np\n\nfrom utils import find_image\n\nimage_path = find_image('girls_01.jpg')\nimg = cv2.imread(image_path)\nrows, cols, channel = img.shape\n\npts_src = np.float32([[50, 50], [200, 50], [50, 200]])\npts_dst = np.float32([[10, 100], [200, 80], [100, 650]])\n\nM = cv2.getAffineTransform(...
[ [ "numpy.float32" ] ]
wichtounet/frameworks
[ "e0cac9d4ffbbf0b1e9d2491eb70bf2c6154f313b" ]
[ "tf/experiment6.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport keras\nfrom keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img\n\nimport argparse\nimport gzip\nimport os\nimport sys\nimport time\n\nimport os\nimport mat...
[ [ "tensorflow.nn.bias_add", "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.matmul", "tensorflow.nn.max_pool", "tensorflow.reshape", "tensorflow.cast", "tensorflow.placeholder", "tensorflow.app.run", "tensorflow.global_variables_initializer", "tensorflow.train....
schrammlb2/policy-guided-sst
[ "8dce6619b9c771c39915c60fe9c54270ea1e621e" ]
[ "HER_mod/rl_modules/get_path_costs.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport pickle\nimport os\nfrom scipy import stats\nfrom HER_mod.rl_modules.tsp import generate_path\nfrom HER_mod.rl_modules.hyperparams import NUM_GOALS, NUM_AGENTS\n\ngd_step_list = [0,2,5, 10, 20, 40]\n# NUM_AGENTS = 3\nN=200\n\ndef get_path_costs(train_pos_a...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "scipy.stats.t.ppf", "matplotlib.pyplot.plot", "numpy.mean", "matplotlib.pyplot.fill_between", "matplotlib.pyplot.close", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.ylabel" ] ]
StanczakDominik/arviz
[ "ec33b4cc7d4a6d5ba95a87a43ef226a49c2cb287", "ec33b4cc7d4a6d5ba95a87a43ef226a49c2cb287", "ec33b4cc7d4a6d5ba95a87a43ef226a49c2cb287" ]
[ "arviz/plots/backends/matplotlib/distplot.py", "arviz/plots/backends/bokeh/elpdplot.py", "examples/matplotlib/mpl_styles.py" ]
[ "\"\"\"Matplotlib distplot.\"\"\"\nimport warnings\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom . import backend_show\nfrom ...kdeplot import plot_kde\nfrom ...plot_utils import matplotlib_kwarg_dealiaser\nfrom ....numeric_utils import get_bins\n\n\ndef plot_dist(\n values,\n values2,\n color...
[ [ "numpy.asarray", "matplotlib.pyplot.gca", "matplotlib.pyplot.show" ], [ "numpy.asarray", "numpy.arange", "numpy.array", "numpy.argwhere" ], [ "matplotlib.pyplot.tight_layout", "numpy.linspace", "scipy.stats.beta", "matplotlib.pyplot.show", "matplotlib.pyplot...
zhaocy14/SmartWalker
[ "b025a7b4a2b305838a22fe4e6116ddb951c4d7bf" ]
[ "Sensors/softskin.py" ]
[ "import serial\nimport serial.tools.list_ports\nimport numpy as np\nimport math\nimport threading\nimport re\nimport os\nimport sys\nimport time\nimport matplotlib.pyplot as plt\n\npwd = os.path.abspath(os.path.abspath(__file__))\nfather_path = os.path.abspath(os.path.dirname(pwd) + os.path.sep + \"..\")\nsys.path....
[ [ "matplotlib.pyplot.ylim", "numpy.ones", "matplotlib.pyplot.clf", "matplotlib.pyplot.xlabel", "numpy.array", "numpy.zeros", "matplotlib.pyplot.pause", "matplotlib.pyplot.ylabel" ] ]
dvamossy/EmTract
[ "68a00e3d63fbc2c401b0d2b297bf96ffb75940e8" ]
[ "emtract/model_inference.py" ]
[ "import os\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\nfrom emtract.model import Model, ModelType\nimport pandas as pd\n\n\nclass ModelInference:\n\n MODEL_BASE_PATH = 'build/models/'\n DATA_BASE_PATH = './emtract/data/'\n\n def __init__(self, model_type):\n if model_type == 'twitter':\n s...
[ [ "pandas.read_csv" ] ]
pleiades-s/PyTorch-tutorials-kr
[ "3d749ea2fe67363b5d46340b742308b744fa0419", "3d749ea2fe67363b5d46340b742308b744fa0419" ]
[ "docs/_downloads/d923ca53b1bfbeb3c222ae46d65d485e/transfer_learning_tutorial.py", "docs/_downloads/07d05907b3ff859aeed5f76f1acc5df4/Intro_to_TorchScript_tutorial.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n컴퓨터 비전(Vision)을 위한 전이학습(Transfer Learning)\n=======================================================\n**Author**: `Sasank Chilamkurthy <https://chsasank.github.io>`_\n **번역**: `박정환 <http://github.com/9bow>`_\n\n이 튜토리얼에서는 전이학습(Transfer Learning)을 이용하여 이미지 분류를 위한\n합성곱 신경망을 어떻게 학습시키는지...
[ [ "matplotlib.pyplot.imshow", "torch.max", "torch.utils.data.DataLoader", "torch.sum", "torch.set_grad_enabled", "torch.no_grad", "torch.cuda.is_available", "torch.nn.CrossEntropyLoss", "numpy.clip", "matplotlib.pyplot.subplot", "matplotlib.pyplot.figure", "torch.opti...
JDMusc/Online-Bullying-Image-Classifcation
[ "9196c60c554cf160d68cb9e9c41fda124abebf63", "9196c60c554cf160d68cb9e9c41fda124abebf63", "9196c60c554cf160d68cb9e9c41fda124abebf63", "9196c60c554cf160d68cb9e9c41fda124abebf63" ]
[ "modelEpochs.py", "scrapDataHelpers.py", "presentUtils.py", "test_original.py" ]
[ "import copy\nimport numpy as np\nfrom numpy import log10\nimport os\nfrom toolz import pipe as p\n\nfrom tensorboardX import SummaryWriter\n\nimport torch\nimport torch.nn as nn\n\nimport numpy as np\n\nimport preprocessing as pp\n\n\ndef findParam(model, name_filter):\n if callable(name_filter):\n fn = ...
[ [ "torch.max", "torch.sum", "numpy.log10", "torch.set_grad_enabled", "torch.no_grad" ], [ "numpy.random.choice" ], [ "pandas.read_csv", "pandas.DataFrame" ], [ "torch.device", "torch.load" ] ]
MrThiago/FaceForensics
[ "a815daa9ebb7c12240a4b7162c431af0e1b959fa" ]
[ "dataset/DeepFakes/faceswap-master/lib/training_data.py" ]
[ "import cv2\nimport numpy\nfrom random import shuffle\n\nfrom .utils import BackgroundGenerator\nfrom .umeyama import umeyama\n\nclass TrainingDataGenerator():\n def __init__(self, random_transform_args, coverage, scale=5, zoom=1): #TODO thos default should stay in the warp function\n self.random_transfor...
[ [ "numpy.random.random", "numpy.linspace", "numpy.concatenate", "numpy.random.normal", "numpy.broadcast_to", "numpy.prod", "numpy.random.uniform", "numpy.array" ] ]
pseudowasabi/computer-vision-exercises
[ "34b7c8402c32dbb00e484f90780ebb6546a3f8dc", "34b7c8402c32dbb00e484f90780ebb6546a3f8dc" ]
[ "CV_A4_/A4_compute_descriptors.py", "CV_A1_/A1_corner_detection.py" ]
[ "'''\nComputer vision assignment 4 by Yoseob Kim\nA4_compute_descriptors.py\nCompute similarity-reflected image descriptors with L1, L2 norm distances by using SIFT descriptors.\n\n* Status: (working on it)\n* GitHub Link: https://github.com/pseudowasabi/computer-vision-exercises/tree/master/CV_A4_\n'''\n\ni...
[ [ "numpy.reshape" ], [ "numpy.linalg.eig", "numpy.array", "numpy.zeros", "numpy.ones" ] ]
Advestis/adnmtf
[ "7b36da64669894506071a75d8bd341edb0e75b9f" ]
[ "adnmtf/nmtf_core.py" ]
[ "\"\"\"Non-negative matrix and tensor factorization core functions\n\n\"\"\"\n\n# Author: Paul Fogel\n\n# License: MIT\n# Jan 4, '20\nfrom typing import Tuple\n\nimport numpy as np\nfrom .nmtf_utils import EPSILON, sparse_opt\nimport logging\n\nlogger = logging.getLogger(__name__)\n\n# TODO (pcotte): typing\n# TODO...
[ [ "numpy.reshape", "numpy.arange", "numpy.linalg.norm", "numpy.max", "numpy.copy", "numpy.argmax", "numpy.mean", "numpy.argsort", "numpy.array", "numpy.zeros", "numpy.where" ] ]
wwt17/texar-pytorch
[ "9fb3ae8f7b541da5c808357033a93fba1817bfbd", "9fb3ae8f7b541da5c808357033a93fba1817bfbd", "9fb3ae8f7b541da5c808357033a93fba1817bfbd", "9fb3ae8f7b541da5c808357033a93fba1817bfbd" ]
[ "texar/torch/modules/decoders/rnn_decoders_test.py", "examples/gpt-2/gpt2_train_main.py", "texar/torch/modules/classifiers/bert_classifier_test.py", "texar/torch/modules/decoders/transformer_decoders.py" ]
[ "\"\"\"\nUnit tests for RNN decoders.\n\"\"\"\n\nimport unittest\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom texar.torch.hyperparams import HParams\nfrom texar.torch.modules.decoders.decoder_helpers import get_helper\nfrom texar.torch.modules.decoders.rnn_deco...
[ [ "torch.nn.functional.embedding", "torch.randint", "torch.nn.LSTM", "numpy.issubdtype", "torch.is_tensor", "torch.tensor", "numpy.testing.assert_array_equal", "numpy.random.randint", "torch.rand", "numpy.testing.assert_allclose", "torch.argmax" ], [ "torch.exp", ...
artemkurylev/Context-Aware_Crowd_Counting-pytorch
[ "d68ddd87b99f2afc512357cb8fcb0ca41ea22865" ]
[ "train.py" ]
[ "import numpy as np\nimport time\nimport torch\nimport torch.nn as nn\nimport os\nimport visdom\nimport random\nfrom tqdm import tqdm as tqdm\n\nfrom cannet import CANNet\nfrom my_dataset import CrowdDataset\n\nif __name__==\"__main__\":\n # configuration\n train_image_root='./data/Shanghai_part_A/train_data/...
[ [ "torch.device", "torch.utils.data.DataLoader", "torch.nn.MSELoss", "torch.cuda.manual_seed" ] ]
subhadip7879/neural-net
[ "04aacf7cdec89ea0f58f2c7397c72adefa8c2d4e" ]
[ "image-classifier/image-classifier.py" ]
[ "from IPython.display import Image\n\n\nImage('images/02_network_flowchart.png')\nImage('images/02_convolution.png')\n\nimport matplotlib.pyplot as plt\nimport tensorflow as tf\nimport numpy as np\nfrom sklearn.metrics import confusion_matrix\nimport time\nfrom datetime import timedelta\nimport math\nfrom tensorflo...
[ [ "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.nn.max_pool", "tensorflow.equal", "tensorflow.cast", "sklearn.metrics.confusion_matrix", "numpy.max", "tensorflow.train.AdamOptimizer", "matplotlib.pyplot.matshow", "tensorflow.nn.conv2d", "numpy.arange", "n...
tiancity-NJU/REID
[ "125a520a9c0b94440a7757e6f3c3c8bf976906ec", "125a520a9c0b94440a7757e6f3c3c8bf976906ec" ]
[ "script/bfe.py", "models/BFE.py" ]
[ "# encoding: utf-8\nimport os\nimport sys\nfrom os import path as osp\nfrom pprint import pprint\n\nimport numpy as np\nimport torch\nfrom tensorboardX import SummaryWriter\nfrom torch import nn\nfrom torch.backends import cudnn\nfrom torch.utils.data import DataLoader\n\nsys.path.insert(0,os.path.abspath(os.path.d...
[ [ "torch.optim.Adam", "torch.load", "torch.manual_seed", "torch.no_grad", "torch.cuda.is_available", "torch.optim.SGD", "torch.cuda.manual_seed_all", "torch.nn.DataParallel" ], [ "torch.nn.Sequential", "torch.nn.AdaptiveMaxPool2d", "torch.nn.BatchNorm1d", "torch.c...
mathildebadoual/pandapower
[ "9ba4bcb78e84b644d2ba6df0c08e285c54af8ddc", "de004efc1b7432a633792af4f551f7635a02db47" ]
[ "pandapower/build_gen.py", "pandapower/test/conftest.py" ]
[ "# -*- coding: utf-8 -*-\r\n\r\n# Copyright (c) 2016-2018 by University of Kassel and Fraunhofer Institute for Energy Economics\r\n# and Energy System Technology (IEE), Kassel. All rights reserved.\r\n\r\n\r\nimport numpy as np\r\nimport numpy.core.numeric as ncn\r\nfrom numpy import array, zeros, isnan\r\nfrom pa...
[ [ "numpy.array_equal", "numpy.unique", "numpy.isnan", "pandas.DataFrame", "numpy.array", "numpy.zeros", "numpy.sum" ], [ "numpy.array" ] ]
miquelmn/nn_interpretability
[ "2b5d2b4102016189743e09f1f3a56f2ecddfde98", "2b5d2b4102016189743e09f1f3a56f2ecddfde98" ]
[ "nn_interpretability/model/model_repository.py", "nn_interpretability/interpretation/lrp/lrp_eps.py" ]
[ "import os\nimport torch\nfrom pathlib import Path\n\nfrom nn_interpretability.model.definition.am_mnist_classifier import AMCNN\nfrom nn_interpretability.model.definition.mc_dropout_cnn import CNN_Dropout\nfrom nn_interpretability.model.definition.general_mnist_cnn import GeneralCNN\nfrom nn_interpretability.model...
[ [ "torch.cuda.is_available", "torch.load" ], [ "numpy.arange", "torch.nn.AvgPool2d", "torch.max" ] ]
tuahk/NiaPy
[ "c863d801fda8e1949a3ca716a4de7c7ca3d0ea16", "c863d801fda8e1949a3ca716a4de7c7ca3d0ea16", "c863d801fda8e1949a3ca716a4de7c7ca3d0ea16" ]
[ "NiaPy/algorithms/basic/gso.py", "NiaPy/algorithms/basic/ba.py", "NiaPy/algorithms/basic/gsa.py" ]
[ "# encoding=utf8\n# pylint: disable=mixed-indentation, trailing-whitespace, line-too-long, multiple-statements, attribute-defined-outside-init, logging-not-lazy, no-self-use, redefined-builtin, singleton-comparison, unused-argument, arguments-differ, no-else-return\nimport logging\nfrom scipy.spatial.distance impor...
[ [ "numpy.full", "scipy.spatial.distance.euclidean", "numpy.copy", "numpy.apply_along_axis", "numpy.fmax", "numpy.argmin", "numpy.where", "numpy.sum" ], [ "numpy.apply_along_axis", "numpy.argmin", "numpy.full" ], [ "numpy.full", "numpy.argmax", "numpy.a...
d-ks/gym_torcs_kai
[ "b9e1659a18ea8a788d0c6aeb7b1111c0284b23ac" ]
[ "gt_kai.py" ]
[ "# Gym-TORCS-Kai Environment for Reinforcement Learning in TORCS\n# original author : Naoto Yoshida\n# (https://github.com/ugo-nama-kun/gym_torcs)\n# modified version author : Daiko Kishikawa\n#\n# This environment is under modification. (2019.12)\n#\n\nimport gym\nfrom gym import spaces\nfrom gym.utils import seed...
[ [ "numpy.hstack", "numpy.abs", "numpy.min", "numpy.median", "numpy.cos", "numpy.max", "numpy.std", "numpy.mean", "numpy.array" ] ]
samgregoost/self_supervised_large
[ "9c0c33cf374a1d5112519939012a64bca98c5f8d" ]
[ "mnist128.py" ]
[ "from __future__ import print_function\nimport tensorflow as tf\nimport numpy as np\nimport random\nimport TensorflowUtils as utils\nimport read_MITSceneParsingDataParis as scene_parsing\nimport datetime\nimport BatchDatsetReader as dataset\nfrom six.moves import xrange\n\nFLAGS = tf.flags.FLAGS\ntf.flags.DEFINE_in...
[ [ "tensorflow.concat", "tensorflow.stack", "numpy.squeeze", "tensorflow.cast", "numpy.mean", "tensorflow.train.AdamOptimizer", "tensorflow.flags.DEFINE_float", "tensorflow.pad", "tensorflow.summary.scalar", "tensorflow.summary.image", "tensorflow.gradients", "tensorfl...
sizhky/carla-dataset-runner
[ "a670d981d29de78460cd90b1d4949ee4b71d0ade" ]
[ "HDF5Saver.py" ]
[ "import h5py\nimport numpy as np\n\n\nclass HDF5Saver:\n def __init__(self, sensor_width, sensor_height, file_path_to_save=\"data/carla_dataset.hdf5\"):\n self.sensor_width = sensor_width\n self.sensor_height = sensor_height\n\n self.file = h5py.File(file_path_to_save, \"w\")\n # Crea...
[ [ "numpy.array" ] ]
VinhLoiIT/ignite
[ "3b2b9655ea9f80ce49b8a9f1c2d72f80e2a95f56", "a22a0f5e909ac70d2a1f76a60b6e84b2134f196c" ]
[ "ignite/contrib/engines/common.py", "ignite/contrib/metrics/regression/median_absolute_error.py" ]
[ "from functools import partial\nimport warnings\nimport numbers\n\nfrom collections.abc import Sequence, Mapping\n\nimport torch\nimport torch.distributed as dist\n\nfrom ignite.engine import Engine, Events\nfrom ignite.metrics import RunningAverage\nfrom ignite.handlers import TerminateOnNan, ModelCheckpoint, Earl...
[ [ "torch.distributed.get_rank", "torch.distributed.is_available", "torch.distributed.is_initialized", "torch.cuda.empty_cache" ], [ "torch.median" ] ]
tarkantemizoz/Cost-Sensitive-Learning
[ "083f8dfd2950b7e3874df34bf61c2ca1e4a91fbb", "083f8dfd2950b7e3874df34bf61c2ca1e4a91fbb" ]
[ "Models/opt_torch.py", "data_formatters/base.py" ]
[ "# coding: utf-8\n# Copyright 2020 Tarkan Temizoz\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 applic...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "sklearn.utils.shuffle", "matplotlib.pyplot.plot", "torch.mul", "torch.no_grad" ], [ "sklearn.model_selection.StratifiedKFold" ] ]
nong-fu/grabcut
[ "19a43eed7597ffae456349e4f0568da2f8f1f25c" ]
[ "grabcut.py" ]
[ "# coding=utf-8\n\nimport sys\nfrom pathlib import Path\nimport webbrowser\n\nimport numpy as np\nimport cv2\nfrom PIL import Image\n\nfrom PyQt5.QtCore import QDir, Qt, pyqtSlot, pyqtSignal\nfrom PyQt5.QtGui import QImage, QPixmap, QColor\nfrom PyQt5.QtWidgets import (\n QApplication, QMainWindow, QWidget,\n ...
[ [ "numpy.fromfile", "numpy.array_equal", "numpy.any", "numpy.array", "numpy.zeros", "numpy.where" ] ]
dongkcs/mindspore
[ "cd7df6dbf463ff3128e9181e9d0c779cecb81320", "cd7df6dbf463ff3128e9181e9d0c779cecb81320", "cd7df6dbf463ff3128e9181e9d0c779cecb81320", "cd7df6dbf463ff3128e9181e9d0c779cecb81320", "cd7df6dbf463ff3128e9181e9d0c779cecb81320", "cd7df6dbf463ff3128e9181e9d0c779cecb81320", "cd7df6dbf463ff3128e9181e9d0c779cecb8132...
[ "model_zoo/official/cv/alexnet/export.py", "mindspore/dataset/text/utils.py", "tests/st/serving/client_example.py", "model_zoo/official/cv/psenet/src/dataset.py", "model_zoo/official/recommend/ncf/src/dataset.py", "model_zoo/official/cv/faster_rcnn/src/FasterRcnn/rpn.py", "mindspore/explainer/benchmark/...
[ "# Copyright 2020 Huawei Technologies Co., Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l...
[ [ "numpy.random.uniform" ], [ "numpy.char.encode", "numpy.char.decode" ], [ "numpy.random.seed", "numpy.frombuffer", "numpy.shape", "numpy.array", "numpy.zeros", "numpy.random.randint" ], [ "numpy.random.seed", "numpy.random.choice", "numpy.asarray", "...
Gretacyh/images-downloader-fliter
[ "ffe070026a45c741013a575a6a985d97e28d6fd7" ]
[ "img_filter/img_advanced_filter.py" ]
[ "import os\nimport re\nimport cv2\nimport umap\nimport torch\nimport torch.nn as nn\nfrom torchvision import models\nimport torch.nn.functional as F\nimport numpy as np\nfrom sklearn.manifold import TSNE\nimport matplotlib.pyplot as plt\n\n\ndef global_std_pool2d(x):\n \"\"\"2D global standard variation pooling\...
[ [ "numpy.array", "matplotlib.pyplot.yticks", "matplotlib.pyplot.title", "numpy.min", "torch.from_numpy", "torch.unsqueeze", "torch.nn.functional.adaptive_avg_pool2d", "numpy.concatenate", "sklearn.manifold.TSNE", "numpy.max", "matplotlib.pyplot.subplot", "numpy.zeros_...
ZZR0/ISSTA21-JIT-DP
[ "c2916f7c3b1d235ff2858220886d6a7da068bf8a", "c2916f7c3b1d235ff2858220886d6a7da068bf8a", "c2916f7c3b1d235ff2858220886d6a7da068bf8a" ]
[ "DeepJIT/train.py", "JIT_Baseline/baseline.py", "JIT_Baseline/LR.py" ]
[ "from model import DeepJIT\nimport torch \nfrom tqdm import tqdm\nfrom utils import mini_batches_train, save\nimport torch.nn as nn\nimport os, datetime\n\ndef train_model(data, params):\n data_pad_msg, data_pad_code, data_labels, dict_msg, dict_code = data\n \n # set up parameters\n params.cuda = (not ...
[ [ "torch.cuda.FloatTensor", "torch.tensor", "torch.cuda.is_available", "torch.nn.BCELoss" ], [ "numpy.hstack", "pandas.read_csv", "sklearn.linear_model.LogisticRegression", "numpy.random.seed", "sklearn.metrics.precision_score", "sklearn.metrics.roc_curve", "torch.nn....
uve/tensorflow
[ "e08079463bf43e5963acc41da1f57e95603f8080", "e08079463bf43e5963acc41da1f57e95603f8080", "e08079463bf43e5963acc41da1f57e95603f8080", "e08079463bf43e5963acc41da1f57e95603f8080", "e08079463bf43e5963acc41da1f57e95603f8080", "e08079463bf43e5963acc41da1f57e95603f8080", "e08079463bf43e5963acc41da1f57e95603f808...
[ "tensorflow/contrib/timeseries/python/timeseries/state_space_models/varma.py", "tensorflow/python/kernel_tests/signal/fft_ops_test.py", "tensorflow/python/data/experimental/kernel_tests/optimization/latency_all_edges_test.py", "tensorflow/python/ops/distributions/distributions.py", "tensorflow/contrib/distr...
[ "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\n#\...
[ [ "tensorflow.python.ops.array_ops.concat", "tensorflow.python.ops.linalg_ops.eye", "tensorflow.contrib.timeseries.python.timeseries.state_space_models.state_space_model.StateSpaceModelConfiguration", "tensorflow.python.ops.init_ops.zeros_initializer", "tensorflow.python.ops.math_ops.reduce_mean...
Adarsh2910/katib
[ "cd095d6a33401cfddee8188943b60cd12c950c33" ]
[ "pkg/suggestion/v1beta1/nas/enas/service.py" ]
[ "import logging\nfrom logging import getLogger, StreamHandler, INFO\nimport json\nimport os\nimport tensorflow as tf\nimport grpc\n\nfrom pkg.apis.manager.v1beta1.python import api_pb2\nfrom pkg.apis.manager.v1beta1.python import api_pb2_grpc\nfrom pkg.suggestion.v1beta1.nas.enas.Controller import Controller\nfrom ...
[ [ "tensorflow.compat.v1.Session", "tensorflow.Graph", "tensorflow.compat.v1.train.Saver", "tensorflow.compat.v1.global_variables_initializer" ] ]
raimonpv/NeuroKit
[ "cb37d83ee20d6a13a91c4848aa435f41e979e203", "cb37d83ee20d6a13a91c4848aa435f41e979e203" ]
[ "tests/tests_hrv.py", "tests/tests_eeg.py" ]
[ "import numpy as np\n\nimport neurokit2 as nk\n\n\ndef test_hrv_time():\n ecg_slow = nk.ecg_simulate(duration=60, sampling_rate=1000, heart_rate=70, random_state=42)\n ecg_fast = nk.ecg_simulate(duration=60, sampling_rate=1000, heart_rate=110, random_state=42)\n\n _, peaks_slow = nk.ecg_process(ecg_slow, s...
[ [ "numpy.all", "numpy.array", "numpy.isnan", "numpy.allclose" ], [ "numpy.isnan", "numpy.array" ] ]
gumpy-bci/gumpy
[ "c51ee75ddf1eaa58813b493282014da6f31f5591" ]
[ "gumpy/split.py" ]
[ "import sklearn.model_selection\nimport numpy as np\nfrom sklearn.model_selection import ShuffleSplit, StratifiedShuffleSplit, cross_val_score, StratifiedKFold\n\n\ndef normal(X, labels, test_size):\n \"\"\"Split a dataset into training and test parts.\n Args:\n X (numpy.ndarray): 2D features matrix \...
[ [ "sklearn.model_selection.StratifiedShuffleSplit", "sklearn.model_selection.ShuffleSplit", "sklearn.model_selection.StratifiedKFold" ] ]
segasai/desispec
[ "4786347a8ad44effa4985671423f7ba0129ba6c3", "4786347a8ad44effa4985671423f7ba0129ba6c3" ]
[ "py/desispec/scripts/stdstars.py", "py/desispec/fluxcalibration.py" ]
[ "\n\n\"\"\"\nGet the normalized best template to do flux calibration.\n\"\"\"\n\n#- TODO: refactor algorithmic code into a separate module/function\n\nimport argparse\nimport sys\n\nimport numpy as np\nfrom astropy.io import fits\nfrom astropy import units\nfrom astropy.table import Table\n\nfrom desispec import io...
[ [ "numpy.sum", "numpy.sqrt", "numpy.abs", "numpy.unique", "numpy.min", "numpy.inner", "numpy.median", "numpy.gradient", "numpy.max", "numpy.log10", "numpy.mean", "numpy.interp", "numpy.argsort", "numpy.array", "numpy.zeros", "numpy.where" ], [ ...
Duane321/pyprobml
[ "6d0ba29f22dc7fec9dfc73788bc5520e97663bdb", "6d0ba29f22dc7fec9dfc73788bc5520e97663bdb" ]
[ "examples/kmeansHeightWeight.py", "examples/lossFunctionFig.py" ]
[ "#!/usr/bin/env python\n\nimport matplotlib.pyplot as pl\nimport numpy as np\nfrom utils import util\nfrom sklearn.cluster import KMeans\nfrom utils.util import save_fig\n\ndata = util.load_mat('heightWeight/heightWeight')\ndata = data['heightWeightData']\nmarkers = 'Dox'\ncolors = 'rgb'\n\nfor i in range(3):\n ...
[ [ "matplotlib.pyplot.title", "sklearn.cluster.KMeans", "numpy.unique", "matplotlib.pyplot.scatter", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "numpy.absolute", "matplotlib.pyplot.title", "numpy.linspace", "matplotlib.pyplot.show", "matplotlib.pyplot.fi...
mhnnunes/nas_gnn
[ "91092acfee9fdbbef3e22252040b80aa96143311", "91092acfee9fdbbef3e22252040b80aa96143311" ]
[ "graphnas_variants/micro_graphnas/micro_search_space.py", "graphnas/evolution_trainer.py" ]
[ "import torch\nimport torch.nn.functional as F\nfrom torch.nn import Module\nfrom torch_geometric.nn.conv import *\n\ngnn_list = [\n \"gat_8\", # GAT with 8 heads\n \"gat_6\", # GAT with 6 heads\n \"gat_4\", # GAT with 4 heads\n \"gat_2\", # GAT with 2 heads\n \"gat_1\", # GAT with 1 heads\n ...
[ [ "torch.nn.Linear" ], [ "numpy.random.seed", "torch.manual_seed", "numpy.median", "numpy.max", "numpy.std", "numpy.mean", "torch.cuda.manual_seed_all" ] ]
NREL/PVwindow
[ "df7091c9d1ebd280aca53c50015e3b1ee7a3183e", "df7091c9d1ebd280aca53c50015e3b1ee7a3183e" ]
[ "tmmPCECalc.py", "FitAngular.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Mar 4 12:29:21 2021\n\n@author: aduell\n\"\"\"\n\n\n#import numpy as np\nfrom numpy import pi, linspace, array, exp\n#import tmm\nfrom tmm import inc_tmm, inc_absorp_in_each_layer, inf\n#import pandas as pd\n#import tmm_vw as tmm\n#import matplotlib.pyplot as plt\nf...
[ [ "matplotlib.pyplot.legend", "pandas.read_excel", "scipy.optimize.fsolve", "numpy.linspace", "matplotlib.pyplot.ylim", "matplotlib.pyplot.plot", "numpy.exp", "matplotlib.pyplot.ylabel", "scipy.interpolate.interp1d", "scipy.integrate.quad", "matplotlib.pyplot.xlabel", ...
zelhar/mg21
[ "f8392aba7deb63aa85f3d137ef81dea1bb742b41" ]
[ "demoNN.py" ]
[ "import torch\nfrom torch import nn\nfrom torch.utils.data import DataLoader, Dataset, TensorDataset\nfrom torchvision import datasets\nfrom torchvision.transforms import ToTensor, Lambda, Compose\nimport matplotlib.pyplot as plt\n\nimport torch.distributions as D\n\nimport torch.nn.functional as F\n\n# Download tr...
[ [ "torch.nn.CrossEntropyLoss", "torch.randint", "torch.empty", "torch.randn", "torch.utils.data.TensorDataset", "torch.utils.data.DataLoader", "torch.nn.Flatten", "torch.nn.BCELoss", "torch.tensor", "torch.nn.functional.sigmoid", "torch.nn.Linear", "torch.nn.functiona...
ajrcampbell/pyro
[ "37680e6d08f20cda95729427143f17875484b21d", "37680e6d08f20cda95729427143f17875484b21d" ]
[ "pyro/distributions/reflected.py", "tests/distributions/test_triangular.py" ]
[ "from torch.distributions import constraints\nfrom torch.distributions.transforms import AbsTransform\n\nfrom pyro.distributions.torch import TransformedDistribution\n\n\nclass ReflectedDistribution(TransformedDistribution):\n \"\"\"\n Equivalent to ``TransformedDistribution(base_dist, AbsTransform())``,\n ...
[ [ "torch.distributions.transforms.AbsTransform" ], [ "torch.abs", "torch.FloatTensor" ] ]
psemdel/py-trading-bot
[ "69da4164b3f6a3ed3e6dc81d5aefc0273b4cb019" ]
[ "bot/orders/models.py" ]
[ "from django.db import models\nfrom django.utils import timezone\nfrom django.db.models import Q\n\nimport asyncio\nfrom ib_insync import IB, Stock, MarketOrder, util\nfrom core.common import empty_append\nfrom core.indicators import rel_dif\n\nimport vectorbtpro as vbt\nimport sys\nimport math\n\nimport pandas as...
[ [ "numpy.shape", "pandas.DataFrame" ] ]
johnson7788/lit
[ "3eb824b01e0f72a5486124b16056bf912465debc" ]
[ "lit_nlp/examples/sst_pytorch_demo.py" ]
[ "# Lint as: python3\nr\"\"\"Code example for a custom model, using PyTorch.\n\nThis demo shows how to use a custom model with LIT, in just a few lines of code.\nWe'll use a transformers model, with a minimal amount of code to implement the\nLIT API. Compared to models/glue_models.py, this has fewer features, but th...
[ [ "torch.nn.functional.softmax", "torch.max", "torch.sum", "torch.set_grad_enabled", "torch.cuda.is_available", "torch.ones_like" ] ]
dataength/automating-your-data-pipeline-with-apache-airflow
[ "90a1351de6de78c0f0a6fb2e778e2ba3b7c78f5e" ]
[ "machine-learning-pipeline/airflow/dags/train_simple_model.py" ]
[ "import pickle\n\nfrom airflow import DAG\nfrom airflow.hooks.postgres_hook import PostgresHook\nfrom airflow.operators.dummy_operator import DummyOperator\nfrom airflow.operators.python_operator import PythonOperator\nfrom airflow.utils import timezone\n\nfrom sklearn.ensemble import RandomForestClassifier\n\n\nde...
[ [ "sklearn.ensemble.RandomForestClassifier" ] ]
toddlerya/AnalyzeNPC
[ "5d16f994ec34300a3050463aad08ad3a1ec1eaba" ]
[ "nighteen_cpc.py" ]
[ "#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n# author: toddler\n\nimport jieba\nimport re\nimport os\nfrom collections import Counter\nfrom wordcloud import WordCloud\nimport matplotlib.pyplot as plt\n\n\ndef cut_analyze(input_file):\n \"\"\"\n :param input_file: 输入带切词分析的文本路径\n :return: (list1, list2) l...
[ [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.show", "matplotlib.pyplot.axis", "matplotlib.pyplot.figure" ] ]
ThomasHoppe/concept_formation
[ "2468fea78ba46804bf44228519eb33ebc5780d31" ]
[ "concept_formation/tests/benchmark_cobweb.py" ]
[ "from random import randint\nfrom timeit import timeit\n\nfrom matplotlib import pyplot as plt\nimport matplotlib.patches as mpatches\n\n\ndef generate_dataset(n_inst, n_attr, n_val):\n instances = []\n for i in range(n_inst):\n i = {}\n for j in range(n_attr):\n i[str(j)] = randint(1...
[ [ "matplotlib.pyplot.legend", "matplotlib.patches.Patch", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
ljw23/ConvLab-2
[ "13d48ea0e441701bd66100689b6c25b561f15525", "13d48ea0e441701bd66100689b6c25b561f15525", "13d48ea0e441701bd66100689b6c25b561f15525" ]
[ "convlab2/policy/larl/multiwoz/latent_dialog/enc2dec/decoders.py", "convlab2/e2e/rnn_rollout/engines/selection_engine.py", "convlab2/policy/larl/multiwoz/latent_dialog/models_task.py" ]
[ "import torch as th\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nfrom torch.autograd import Variable\nimport numpy as np\nfrom convlab2.policy.larl.multiwoz.latent_dialog.enc2dec.base_modules import BaseRNN\nfrom convlab2.policy.larl.multiwoz.latent_dialog.utils import cast_...
[ [ "torch.nn.functional.softmax", "torch.LongTensor", "torch.nn.functional.log_softmax", "torch.cat", "torch.nn.Embedding", "torch.nn.Linear", "torch.no_grad", "torch.bmm", "torch.FloatTensor", "torch.nn.functional.tanh" ], [ "torch.no_grad", "torch.autograd.Variab...
Jramirezg/ThreatMapper
[ "af5fda3ff585f8728a7a0b48ae6818ed189e4dbf" ]
[ "deepfence_backend/tasks/task_scheduler.py" ]
[ "import arrow\nfrom config.app import celery_app, app\nfrom models.container_image_registry import RegistryCredential\nfrom models.scheduler import Scheduler\nfrom models.setting import Setting\nfrom croniter import croniter\nfrom utils import constants\nimport time\nfrom datetime import datetime\nfrom utils.helper...
[ [ "pandas.to_datetime", "pandas.DataFrame" ] ]
anonymous-cv/cvpr-sub
[ "6307520c73716de73ef63f5239bdac8dda20da41" ]
[ "test_pretrain.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\nimport os\nimport time\nimport argparse\nimport sys\nimport numpy as np\nimport torch\nimport torch.optim as optim\nfrom tqdm import tqdm\n\nfrom network.BEV_Unet import BEV_Unet\nfrom network.ptBEV import ptBEVnet\nfrom dataloader.dataset import collate_fn_BEV,coll...
[ [ "numpy.diag", "torch.cuda.synchronize", "numpy.expand_dims", "torch.load", "torch.utils.data.DataLoader", "torch.from_numpy", "numpy.max", "numpy.copy", "torch.no_grad", "numpy.nanmean", "numpy.mean", "torch.device", "torch.argmax" ] ]
zblumen/stellargraph
[ "10e62006907dd5968286f33648d1054e9c961c1b" ]
[ "stellargraph/mapper/mini_batch_node_generators.py" ]
[ "# -*- coding: utf-8 -*-\n#\n# Copyright 2018-2020 Data61, CSIRO\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.reshape", "numpy.asarray", "numpy.asanyarray", "numpy.array", "scipy.sparse.lil_matrix" ] ]
robbjr/datasets
[ "fbb2af9d0e88f8e2ae884e9764fbeff2ee487813" ]
[ "tensorflow_datasets/testing/mocking.py" ]
[ "# coding=utf-8\n# Copyright 2019 The TensorFlow Datasets 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 ...
[ [ "tensorflow.io.gfile.exists", "numpy.random.random_sample", "numpy.random.randint" ] ]