repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
bibofeng/DeepRL-1 | [
"7b14d9720a8ea1e08b05a2889d699a70174caf8f",
"7b14d9720a8ea1e08b05a2889d699a70174caf8f",
"7b14d9720a8ea1e08b05a2889d699a70174caf8f"
] | [
"utils/normalizer.py",
"component/replay.py",
"network/network.py"
] | [
"#######################################################################\n# Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #\n# Permission given to modify the code as long as you keep this #\n# declaration at the top #\n#######################... | [
[
"numpy.asscalar",
"torch.FloatTensor",
"numpy.isscalar",
"torch.zeros"
],
[
"numpy.empty",
"numpy.random.randint"
],
[
"torch.nn.functional.softmax",
"torch.nn.functional.log_softmax",
"numpy.asarray",
"torch.cuda.is_available",
"torch.autograd.Variable"
]
] |
DagonDD/google-research | [
"ccd5d36e7a8ee1d672c93a801634bfd8f2e0c3eb"
] | [
"t5_closed_book_qa/t5_cbqa/preprocessors.py"
] | [
"# coding=utf-8\n# Copyright 2020 The Google Research 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 requ... | [
[
"tensorflow.compat.v1.random.shuffle",
"tensorflow.compat.v1.ones_like",
"tensorflow.compat.v1.concat",
"tensorflow.compat.v1.strings.reduce_join",
"tensorflow.compat.v1.equal",
"tensorflow.compat.v1.strings.length",
"tensorflow.compat.v1.boolean_mask",
"tensorflow.compat.v1.cast",... |
vrooje/Data-digging | [
"ae4ee1de0df0d2686115510ac35f5960d5cfaf08",
"ae4ee1de0df0d2686115510ac35f5960d5cfaf08",
"ae4ee1de0df0d2686115510ac35f5960d5cfaf08"
] | [
"example_scripts/basic_project_stats.py",
"example_scripts/seabirdwatch/sites_over_time_bins.py",
"example_scripts/planetary_response_network/caribbean_irma_2017/extract_markings_to1file.py"
] | [
"#Python 2.7.9 (default, Apr 5 2015, 22:21:35)\n# the full environment I used to test this is in basic_project_stats.yml\nimport sys\n\n# file with raw classifications (csv)\n# put this way up here so if there are no inputs we exit quickly before even trying to load everything else\ntry:\n classfile_in = sys.ar... | [
[
"pandas.read_csv",
"pandas.to_datetime",
"numpy.min",
"numpy.median",
"pandas.DataFrame",
"numpy.timedelta64",
"numpy.max",
"numpy.mean",
"numpy.array",
"numpy.sum"
],
[
"matplotlib.pyplot.tight_layout",
"pandas.read_csv",
"pandas.to_datetime",
"matplotl... |
welly87/zipline | [
"dbdfa8ed86417f954e95bd7468e144589f2cd482",
"dbdfa8ed86417f954e95bd7468e144589f2cd482"
] | [
"zipline/pipeline/term.py",
"zipline/utils/tradingcalendar.py"
] | [
"\"\"\"\nBase class for Filters, Factors and Classifiers\n\"\"\"\nfrom abc import ABCMeta, abstractproperty\nfrom bisect import insort\nfrom collections import Mapping\nfrom weakref import WeakValueDictionary\n\nfrom numpy import (\n array,\n dtype as dtype_class,\n ndarray,\n searchsorted,\n)\nfrom six... | [
[
"numpy.array",
"numpy.dtype",
"numpy.searchsorted"
],
[
"pandas.DatetimeIndex",
"pandas.Timedelta",
"pandas.tseries.offsets.CDay",
"pandas.DataFrame",
"pandas.Timestamp"
]
] |
PhylomatX/PhiFlow | [
"2b7a73c1f595e288d26945cd53cc482952bb1db9",
"2b7a73c1f595e288d26945cd53cc482952bb1db9"
] | [
"phi/tf/tf_backend.py",
"phi/tf/session.py"
] | [
"import numbers\nimport uuid\nimport warnings\nfrom packaging import version\nimport six\n\nimport numpy as np\nimport six\nimport tensorflow as tf\nfrom packaging import version\n\nfrom phi.backend.backend_helper import split_multi_mode_pad, PadSettings, general_grid_sample_nd, equalize_shapes, circular_pad, repli... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.sign",
"tensorflow.concat",
"tensorflow.is_finite",
"tensorflow.zeros",
"tensorflow.stack",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.minimum",
"tensorflow.equal",
"tensorflow.fft3d",
"tensorflow.get_default_... |
Nitinram23/text-to-image | [
"f819bed3dffbccd8e20b03741e3f67178729812b"
] | [
"Python 3 Codes/bert_embed.py"
] | [
"from bert_embedding import BertEmbedding\nimport numpy as np\nimport pickle\nimport argparse\nimport json\nimport os\nfrom os.path import join, isfile\nimport re\nimport h5py\n\ndef save_caption_vectors_flowers(data_dir):\n\timport time\n\t\n\timg_dir = join(data_dir, 'flowers/jpg')\n\timage_files = [f for f in os... | [
[
"numpy.asarray",
"numpy.zeros"
]
] |
developing-coder/pandas | [
"9feb3ad92cc0397a04b665803a49299ee7aa1037",
"9feb3ad92cc0397a04b665803a49299ee7aa1037",
"9feb3ad92cc0397a04b665803a49299ee7aa1037",
"9feb3ad92cc0397a04b665803a49299ee7aa1037",
"9feb3ad92cc0397a04b665803a49299ee7aa1037",
"9feb3ad92cc0397a04b665803a49299ee7aa1037",
"9feb3ad92cc0397a04b665803a49299ee7aa103... | [
"pandas/tests/reshape/test_cut.py",
"pandas/tests/internals/test_internals.py",
"pandas/core/strings.py",
"asv_bench/benchmarks/categoricals.py",
"pandas/tests/arrays/categorical/test_warnings.py",
"pandas/_config/display.py",
"pandas/tests/util/test_assert_produces_warning.py",
"asv_bench/benchmarks/... | [
"import numpy as np\nimport pytest\n\nimport pandas as pd\nfrom pandas import (\n Categorical, DataFrame, DatetimeIndex, Index, Interval, IntervalIndex,\n Series, TimedeltaIndex, Timestamp, cut, date_range, isna, qcut,\n timedelta_range, to_datetime)\nfrom pandas.api.types import CategoricalDtype as CDT\ni... | [
[
"pandas.to_datetime",
"pandas.Series",
"numpy.linspace",
"numpy.asarray",
"pandas.util.testing.assert_index_equal",
"numpy.random.randn",
"numpy.iinfo",
"pandas.isna",
"pandas.util.testing.assert_numpy_array_equal",
"pandas.util.testing.assert_categorical_equal",
"numpy... |
rlaplaza/Deep-Reinforcement-Learning-for-Automated-Stock-Trading-Ensemble-Strategy-ICAIF-2020 | [
"5fe6b8554587320bc6044164270635166c93616d"
] | [
"env/EnvMultipleStock_train.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom gym.utils import seeding\nimport gym\nfrom gym import spaces\nimport matplotlib\n\nmatplotlib.use(\"Agg\")\nimport matplotlib.pyplot as plt\n\n# shares normalization factor\n# 100 shares per trade\nHMAX_NORMALIZE = 100\n# initial amount of money we have in our account\... | [
[
"matplotlib.use",
"matplotlib.pyplot.savefig",
"pandas.DataFrame",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.close",
"numpy.argsort",
"numpy.array",
"numpy.where"
]
] |
Ravnit202/PYJAC | [
"65987f8afd2e54e1b308b09f45f291e374e79bd2"
] | [
"Game/finger.py"
] | [
"import cv2\nimport mediapipe\nimport numpy\nimport pydirectinput\nclass FingerDetector:\n\n\n wScr, hScr = pydirectinput.size() #Get the current screen resolution\n pX, pY = 0, 0 \n cX, cY = 0, 0 \n\n def __init__(self):\n \"\"\"\n Initialize all objects\n \"\"\"\n #Load the... | [
[
"numpy.interp"
]
] |
LiPengze97/oneflow | [
"1c1d2d3faa1c02d20e009046a290cf1095ee12e0",
"1c1d2d3faa1c02d20e009046a290cf1095ee12e0"
] | [
"python/oneflow/test/modules/test_ne.py",
"python/oneflow/test/modules/test_sub.py"
] | [
"\"\"\"\nCopyright 2020 The OneFlow Authors. All rights reserved.\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\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by ap... | [
[
"numpy.not_equal",
"numpy.random.randn"
],
[
"numpy.array",
"numpy.random.randn",
"numpy.ones"
]
] |
Ray0089/PSGMN | [
"0363d558add24034e035d26121e2e1b61d97c198"
] | [
"utils/utils.py"
] | [
"# import PIL\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport math\nimport cv2\nimport torch\nfrom torch_geometric.data import Data\n\n\ndef load_ply(path):\n \"\"\"\n Loads a 3D mesh model from a PLY file.\n\n :param path: Path to a PLY file.\n :return: The loaded model given by a dictiona... | [
[
"numpy.dot",
"numpy.abs",
"numpy.sqrt",
"numpy.nonzero",
"matplotlib.pyplot.imread",
"torch.tensor",
"numpy.concatenate",
"numpy.std",
"numpy.argmax",
"numpy.mean",
"numpy.exp",
"numpy.array",
"numpy.zeros",
"numpy.where",
"torch.argmax"
]
] |
vumichien/hummingbird | [
"8981e11ce2536167c329a5d9d20e81125a792fe4",
"8981e11ce2536167c329a5d9d20e81125a792fe4",
"8981e11ce2536167c329a5d9d20e81125a792fe4",
"8981e11ce2536167c329a5d9d20e81125a792fe4"
] | [
"tests/test_sklearn_pipeline.py",
"tests/test_onnxml_lightgbm_converter.py",
"hummingbird/ml/operator_converters/sklearn/gbdt.py",
"tests/test_onnxml_imputer_converter.py"
] | [
"import unittest\nimport numpy as np\nfrom sklearn import datasets\n\nfrom sklearn.compose import ColumnTransformer\nfrom sklearn.datasets import load_iris, load_diabetes\nfrom sklearn.svm import LinearSVC, LinearSVR\nfrom sklearn.datasets import make_regression\nfrom sklearn.decomposition import PCA\nfrom sklearn.... | [
[
"sklearn.ensemble.RandomForestRegressor",
"numpy.split",
"sklearn.datasets.load_diabetes",
"pandas.DataFrame",
"sklearn.svm.LinearSVC",
"sklearn.svm.LinearSVR",
"numpy.random.randint",
"sklearn.compose.ColumnTransformer",
"sklearn.preprocessing.MinMaxScaler",
"pandas.read_c... |
BumagniyPacket/ocr | [
"f2651f3a23cf835a689b35a658ef3443086fd72a"
] | [
"ocr/paint.py"
] | [
"# -*- coding: utf-8 -*-\nimport matplotlib.pyplot as plt\n\n\ndef show_image(image):\n plt.imshow(-image, cmap='Greys')\n plt.show()\n\n\ndef show_two(image1, image2):\n plt.subplot(121)\n plt.imshow(-image1, cmap='Greys')\n\n plt.subplot(122)\n plt.imshow(-image2, cmap='Greys')\n\n plt.show()... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplot"
]
] |
RoyalTS/stochatreat | [
"6e638e748b8638b64a185229f78967cf864cd45e"
] | [
"tests/test_stochatreat_assignment.py"
] | [
"import pytest\n\nfrom math import gcd\n\nimport numpy as np\nimport pandas as pd\n\nfrom stochatreat import stochatreat\nfrom stochatreat import get_lcm_prob_denominators\n\n\n################################################################################\n# fixtures\n#############################################... | [
[
"pandas.merge",
"pandas.testing.assert_series_equal",
"numpy.arange",
"numpy.array",
"numpy.random.randint"
]
] |
mutazag/misc | [
"dfef362cdd835ef4efd1f2d02e13ff5297ccfc0f"
] | [
"py_merge/mergeexample.py"
] | [
"#%% \n\nimport pandas as pd\n\n#%%\n\ndf1 = pd.read_csv('df1.csv', index_col=0)\n# %%\ndf2 = pd.read_csv('df2.csv', index_col=0)\n# %%\ndf3 = pd.read_csv('df3.csv', index_col=0)\n# %%\ndf1.merge(df2, on='proj_id').merge(df3, on='doc_id')\n# %%\ndf1.merge(df2, on='proj_id', how='left').merge(df3, on='doc_id', how='... | [
[
"pandas.read_csv"
]
] |
mohammadrezabk/eo-learn | [
"8de3cfd64e74c1e4832e585954cdbf0ee9676eb3",
"8de3cfd64e74c1e4832e585954cdbf0ee9676eb3",
"8de3cfd64e74c1e4832e585954cdbf0ee9676eb3",
"8de3cfd64e74c1e4832e585954cdbf0ee9676eb3"
] | [
"features/eolearn/features/radiometric_normalization.py",
"core/eolearn/tests/test_eodata_io.py",
"io/eolearn/tests/test_local_io.py",
"ml_tools/eolearn/ml_tools/classifier.py"
] | [
"\"\"\"\nModule for radiometric normalization\n\nCredits:\nCopyright (c) 2018-2019 Johannes Schmid (GeoVille)\nCopyright (c) 2017-2019 Matej Aleksandrov, Matic Lubej, Devis Peresutti (Sinergise)\n\nThis source code is licensed under the MIT license found in the LICENSE\nfile in the root directory of this source tre... | [
[
"numpy.nanmax",
"numpy.nanpercentile",
"numpy.nanmedian",
"numpy.isfinite",
"numpy.isnan",
"numpy.dstack",
"numpy.nanargmin",
"numpy.zeros_like",
"numpy.nanmean",
"numpy.floor",
"numpy.argsort",
"numpy.nanstd",
"numpy.array",
"numpy.where",
"numpy.empty"... |
MohamedAli1995/Cifar-100-Classifier | [
"924704a81ce13062825a88b90b80e8ac2ba45d63"
] | [
"src/base/base_train.py"
] | [
"import tensorflow as tf\n\n\nclass BaseTrain:\n \"\"\"Standard base_train-class for easy multiple-inheritance.\n It is responsible for defining the functions to be implemented with any child.\n\n Attributes:\n sess: Tensorflow session to use.\n model: Model to be trained.\n data: ... | [
[
"tensorflow.global_variables_initializer",
"tensorflow.local_variables_initializer"
]
] |
sparkma/arrow | [
"62fd703a4ef0abbecb02397a06a630a9dee382d9"
] | [
"python/pyarrow/tests/test_parquet.py"
] | [
"# -*- coding: utf-8 -*-\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.... | [
[
"pandas.Categorical.from_codes",
"pandas.concat",
"pandas.to_datetime",
"numpy.random.seed",
"pandas.Timestamp",
"numpy.arange",
"pandas.Categorical",
"pandas.DataFrame",
"pandas.MultiIndex.from_arrays",
"pandas.util.testing.assert_frame_equal",
"numpy.ones",
"panda... |
drvinceknight/amwoss | [
"8b0bf80f0a06dc5cf9bfeef4b9f9e174ccadf06d"
] | [
"src/assets/sd_vaccine_plots/main.py"
] | [
"from scipy.integrate import solve_ivp\nimport matplotlib.pyplot as plt\nplt.style.use('seaborn-whitegrid')\n\ndef derivatives(t, y, vaccine_rate, birth_rate=0.01):\n \"\"\"Defines the system of differential equations that\n describe the epidemiology model.\n\n Args:\n t: a positive float\n y... | [
[
"matplotlib.pyplot.subplots",
"scipy.integrate.solve_ivp",
"matplotlib.pyplot.style.use"
]
] |
agstub/sglake-detectability | [
"5556250a59d7f500bcee86899dd9a497a368faca"
] | [
"source/boundaryconds.py"
] | [
"#-------------------------------------------------------------------------------\n# This file contains functions that:\n# (1) define the boundaries (ice-air,ice-water,ice-bed) of the mesh, AND...\n# (2) mark the boundaries of the mesh\n#------------------------------------------------------------------------------... | [
[
"numpy.abs"
]
] |
caogao/param | [
"9de2602c894df264a004c352ee16abc14f93da76",
"9de2602c894df264a004c352ee16abc14f93da76",
"9de2602c894df264a004c352ee16abc14f93da76",
"9de2602c894df264a004c352ee16abc14f93da76"
] | [
"train/comms/pt/comms.py",
"train/compute/python/workloads/pytorch/split_table_batched_embeddings_ops.py",
"train/comms/pt/commsTraceReplay.py",
"train/comms/pt/pytorch_dist_backend.py"
] | [
"#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport argparse\nimp... | [
[
"numpy.amax",
"torch.LongTensor",
"torch.ones",
"numpy.amin",
"numpy.cumsum",
"numpy.percentile",
"numpy.ones",
"numpy.mean",
"numpy.random.rand",
"torch.FloatTensor",
"numpy.array",
"numpy.sum",
"numpy.random.randint"
],
[
"torch.randint",
"torch.lo... |
rjgpinel/mime-release | [
"26a850c4ba5b702b86d068995614163338fb01df"
] | [
"mime/agent/script_agent_augmented.py"
] | [
"import itertools\nimport types\nimport numpy as np\n\nimport torch\nimport click\nimport gym\nimport time\nimport yaml\n\nfrom robos2r.model import build_model\nfrom .agent import Agent\nfrom .script_agent import ScriptAgent, make_noised\nfrom .utils import Rate\nfrom PIL import Image\nfrom pathlib import Path\nfr... | [
[
"torch.tensor"
]
] |
zhengxiawu/Transformer | [
"8cad013913254ea4e06c4a8d460d9f2cf42df086",
"8cad013913254ea4e06c4a8d460d9f2cf42df086"
] | [
"Embed.py",
"Sublayers.py"
] | [
"import torch\nimport torch.nn as nn\nimport math\nfrom torch.autograd import Variable\n\n\nclass Embedder(nn.Module):\n def __init__(self, vocab_size, d_model):\n super().__init__()\n self.d_model = d_model\n self.embed = nn.Embedding(vocab_size, d_model)\n\n def forward(self, x):\n ... | [
[
"torch.autograd.Variable",
"torch.nn.Dropout",
"torch.nn.Embedding",
"torch.zeros"
],
[
"torch.nn.functional.softmax",
"torch.nn.Dropout",
"torch.ones",
"torch.zeros",
"torch.nn.Linear",
"torch.matmul"
]
] |
ds4dm/GraphRL | [
"b5b1519f6dd92b401625d51add9ae5829004a30b"
] | [
"rl/train_a2c_mc.py"
] | [
"import torch\nimport torch.optim as optm\nimport torch.nn.functional as F\n\nimport numpy as np\nfrom torch.autograd import Variable\nfrom torch.utils.data import Dataset, DataLoader\nfrom data.graph import Graph\nfrom collections import namedtuple\n\nSavedAction = namedtuple('SavedAction', ['log_prob', 'value_cur... | [
[
"numpy.sum",
"numpy.min",
"torch.zeros",
"torch.utils.data.DataLoader",
"numpy.finfo",
"torch.tensor",
"numpy.max",
"torch.stack",
"numpy.array",
"torch.nn.MSELoss",
"numpy.random.randint"
]
] |
JeremieMelo/ADEPT | [
"f79f518197798735cb684b373e11cdcc8a80d872"
] | [
"unitest/test_supermesh.py"
] | [
"'''\nDescription:\nAuthor: Jiaqi Gu (jqgu@utexas.edu)\nDate: 2021-09-27 23:48:01\nLastEditors: Jiaqi Gu (jqgu@utexas.edu)\nLastEditTime: 2022-02-26 02:22:52\n'''\nimport torch\nfrom core.models.layers.super_mesh import super_layer_name_dict\n\ndef test():\n device=torch.device(\"cuda:0\")\n p, q, k = 2, 2, 4... | [
[
"torch.device",
"torch.eye",
"torch.ones"
]
] |
nbortolotti/tflite-tpu-experiences | [
"8f613e059335d1d90886282f005261917fd9cfd3"
] | [
"inference_exploration/cpu/main.py"
] | [
"import os\nimport numpy as np\nimport PIL.Image as Image\nimport matplotlib.pylab as plt\nimport time\n\nimport tensorflow as tf\nimport tensorflow_hub as hub\nfrom tensorflow.keras import layers\n\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'\n\n\ndef image_analysis(classifier, image_shape, img_array):\n result = ... | [
[
"numpy.array",
"numpy.argmax",
"tensorflow.keras.utils.get_file"
]
] |
FaceThePirate/pyspeckit | [
"734b9f81d440ca3a6db9bf68e9409dbddb52d08b"
] | [
"pyspeckit/spectrum/readers/read_class.py"
] | [
"\"\"\"\n------------------------\nGILDAS CLASS file reader\n------------------------\n\nRead a CLASS file into an :class:`pyspeckit.spectrum.ObsBlock`\n\"\"\"\nfrom __future__ import print_function\nfrom six.moves import xrange\nfrom six import iteritems\nimport six\nimport astropy.io.fits as pyfits\nimport numpy\... | [
[
"numpy.fromfile",
"numpy.arange",
"numpy.memmap",
"numpy.median",
"numpy.ones",
"numpy.arctan2",
"numpy.floor",
"numpy.array",
"numpy.sum"
]
] |
Tarpelite/BERT_self_training | [
"f50ff015f0d3669b5d927a6d28d8a08201c101b6"
] | [
"examples/ner/run_ner_strain.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may... | [
[
"torch.utils.data.DataLoader",
"torch.no_grad",
"torch.cuda.manual_seed_all",
"torch.cuda.is_available",
"torch.device",
"torch.distributed.get_rank",
"torch.nn.CrossEntropyLoss",
"torch.distributed.init_process_group",
"torch.utils.data.distributed.DistributedSampler",
"to... |
chipmuenk/acoustics | [
"c85ac95a10c09d7fa15d63b2bdb24acab89fec60",
"c85ac95a10c09d7fa15d63b2bdb24acab89fec60"
] | [
"code/LTI/Demos/Tex_matplotlib.py",
"python-acoustics/tests/test_imaging.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon May 14 14:15:52 2012\n\nPlot mit TeX-Formatierung der Labels\n(LaTeX muss auf dem Rechner installiert sein)\n\"\"\"\n\nimport numpy as np\nfrom matplotlib import rc\nimport matplotlib.pyplot as plt\n\nrc('text', usetex=True)\nplt.figure(1)\nax = plt.axes([0.1, 0.1, 0... | [
[
"matplotlib.pyplot.title",
"numpy.arange",
"numpy.cos",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.axes",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.rc",
"mat... |
kuldeepaman/tf-pose | [
"8050912c52a7b4f3c8a2656f267d47ba21d093f6",
"8050912c52a7b4f3c8a2656f267d47ba21d093f6"
] | [
"scripts/pyqtgraph-develop/examples/MultiPlotWidget.py",
"scripts/pyqtgraph-develop/examples/ScaleBar.py"
] | [
"#!/usr/bin/python\r\n# -*- coding: utf-8 -*-\r\n## Add path to library (just for examples; you do not need this)\r\nimport initExample\r\n\r\n\r\nfrom scipy import random\r\nfrom numpy import linspace\r\nfrom pyqtgraph.Qt import QtGui, QtCore\r\nimport pyqtgraph as pg\r\nfrom pyqtgraph import MultiPlotWidget\r\ntr... | [
[
"scipy.random.normal",
"numpy.linspace"
],
[
"numpy.random.normal"
]
] |
lilies/Cirq | [
"519b8b70ba4d2d92d1c034c398161ebdbd23e2e7",
"519b8b70ba4d2d92d1c034c398161ebdbd23e2e7",
"519b8b70ba4d2d92d1c034c398161ebdbd23e2e7",
"519b8b70ba4d2d92d1c034c398161ebdbd23e2e7"
] | [
"cirq/contrib/svg/svg_test.py",
"cirq/optimizers/two_qubit_decompositions_test.py",
"cirq/experiments/qubit_characterizations_test.py",
"cirq/protocols/has_stabilizer_effect_protocol_test.py"
] | [
"import pytest\nimport numpy as np\n\nimport cirq\nfrom cirq.contrib.svg import circuit_to_svg\n\n\ndef test_svg():\n a, b, c = cirq.LineQubit.range(3)\n\n svg_text = circuit_to_svg(\n cirq.Circuit(\n cirq.CNOT(a, b),\n cirq.CZ(b, c),\n cirq.SWAP(a, c),\n cir... | [
[
"numpy.eye"
],
[
"numpy.eye",
"numpy.array",
"numpy.sqrt"
],
[
"numpy.diag",
"numpy.asarray",
"numpy.eye",
"matplotlib.pyplot.subplots",
"numpy.cos",
"numpy.testing.assert_almost_equal",
"matplotlib.pyplot.subplot",
"numpy.mean",
"numpy.outer",
"nump... |
playerkk/HoiTransformer | [
"b710216d6b338863ebe9d40a96765ab52780cefa"
] | [
"models/backbone.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\"\"\"\nBackbone modules.\n\"\"\"\nimport torch\nimport torch.nn.functional as F\nimport torchvision\nfrom torch import nn\nfrom torchvision.models._utils import IntermediateLayerGetter\nfrom typing import Dict, List\n\nfrom util.misc import N... | [
[
"torch.ones",
"torch.zeros"
]
] |
DonCammne/OpenSeesPyAssistant | [
"f380f0f2a2f3d1336320bd8d26fa5efe00a12134"
] | [
"DataManagement.py"
] | [
"\"\"\"\nModule with the parent abstract class DataManagement. \\n\nCarmine Schipani, 2021\n\"\"\"\n\nfrom abc import ABC, abstractmethod\nfrom OpenSeesPyAssistant.ErrorHandling import *\nimport numpy as np\n\n\nclass DataManagement(ABC):\n \"\"\"\n Abstract parent class for data management.\n Using the as... | [
[
"numpy.array_str"
]
] |
lonelu/Metalprot_learning | [
"8edb2c3e4f6ba129a409d75fd4d15ceb3a9e307b"
] | [
"src/extractor/make_bb_info_mats.py"
] | [
"from numpy.core.numeric import full\nfrom numpy.lib.function_base import append\nimport prody as pr\nimport os\nimport numpy\nimport matplotlib as mpl\nimport pylab\nfrom itertools import combinations, combinations_with_replacement\nfrom docopt import docopt\nimport itertools\nimport pickle\nimport sys\nfrom scipy... | [
[
"numpy.set_printoptions",
"numpy.zeros",
"scipy.spatial.distance.cdist",
"numpy.cross"
]
] |
s123600g/openfaceInstallscript | [
"962b4b89c5626318b5701d7297d49df3423b0fe4"
] | [
"InstallOpenface/fix_sklearn/label.py"
] | [
"# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>\n# Mathieu Blondel <mathieu@mblondel.org>\n# Olivier Grisel <olivier.grisel@ensta.org>\n# Andreas Mueller <amueller@ais.uni-bonn.de>\n# Joel Nothman <joel.nothman@gmail.com>\n# Hamzeh Alsalhi <ha258@cornell.edu... | [
[
"numpy.asarray",
"numpy.in1d",
"numpy.cumsum",
"numpy.any",
"numpy.searchsorted",
"numpy.where",
"scipy.sparse.issparse",
"numpy.unique",
"numpy.empty_like",
"numpy.arange",
"numpy.flatnonzero",
"numpy.intersect1d",
"numpy.diff",
"numpy.repeat",
"scipy.s... |
yangfengKAUST/cnn-text-classification-tf | [
"5f552df9887e57a4bc5638b3d36d7393254d2644"
] | [
"generate_embeddings.py"
] | [
"import numpy as np\nimport pickle\nimport argparse\nimport re\n\n\"\"\"\nConvert pre-trained Glove embeddings into npy file\nRun using:\npython3 generate_embeddings.py -d data/glove.6B.300d.txt --npy_output data/embeddings.npy --dict_output data/vocab.pckl --dict_whitelist data/polaritydata.vocab\n\"\"\"\n\ndef pa... | [
[
"numpy.array",
"numpy.zeros"
]
] |
renmengye/inc-few-shot-attractor-public | [
"c560d5a81480cb22d903fa746ab0cfc2eb964e4c",
"c560d5a81480cb22d903fa746ab0cfc2eb964e4c",
"c560d5a81480cb22d903fa746ab0cfc2eb964e4c"
] | [
"fewshot/data/compress_tiered_imagenet.py",
"fewshot/models/multi_task_model.py",
"fewshot/models/resnet_base.py"
] | [
"import cv2\nimport numpy as np\nimport six\nimport sys\nimport pickle as pkl\n\nfrom tqdm import tqdm\n\n\ndef compress(path, output):\n with np.load(path, mmap_mode=\"r\", encoding='latin1') as data:\n images = data[\"images\"]\n array = []\n for ii in tqdm(six.moves.xrange(images.shape[0]), desc='compr... | [
[
"numpy.load",
"numpy.savez"
],
[
"tensorflow.cond",
"tensorflow.concat",
"tensorflow.control_dependencies",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.equal",
"tensorflow.train.AdamOptimizer",
"tensorflow.add_n",
"tensorflow.get_collection",
"tensor... |
bupt-ipcr/RL4Net | [
"b1b694361c688f5e0055148a0cdcb4c6253cd7bd"
] | [
"rl4net/envs/power_allocation/test_pa_rb_env.py"
] | [
"from .pa_rb_env import (\n PAEnv,\n Node\n)\nimport numpy as np\nfrom pathlib import Path\n\nlog2 = np.log2\n\ncues = {\n 0: Node(0.1, 0, 'cue'),\n 1: Node(-0.1, 0, 'cue'),\n}\ndevices = {\n 0: {\n 't_device': Node(0, 0.5, 't_device'),\n 'r_devices': {\n 0: Node(0, 0.6, 'r_d... | [
[
"numpy.expand_dims",
"numpy.ones_like",
"numpy.sqrt",
"numpy.random.seed",
"numpy.abs",
"numpy.random.random",
"numpy.cos",
"numpy.ones",
"numpy.concatenate",
"numpy.sin",
"numpy.random.uniform",
"numpy.array",
"numpy.random.randint"
]
] |
Chicco94/crypto-bot | [
"edbc22477544a25d8eb0c90cdd5f03345f11db68"
] | [
"src/trainer.py"
] | [
"from sklearn.linear_model import LinearRegression\nfrom sklearn.model_selection import train_test_split\nimport pandas as pd\nimport sqlalchemy\nfrom config.config import symbol,backward_steps\nimport joblib\nfrom df_functions import *\n\ndef prepare_single_dataset(df,remove_from_heads:int,remove_from_tails:int,la... | [
[
"sklearn.model_selection.train_test_split",
"sklearn.linear_model.LinearRegression",
"pandas.read_sql"
]
] |
robinzixuan/Dialog_Act_Bert_Classification | [
"014cc8df0545e5bf85a22127e63e8490f3aa9012"
] | [
"data & result/history.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Jun 30 20:49:32 2019\n\n@author: rluo\n\"\"\"\n\nimport keras\nimport matplotlib.pyplot as plt\nfrom keras.models import load_model\nimport pickle\n\nhistory = pickle.load(open('history.p','rb'))\nplt.plot(history['loss'])\n#plt.plot(history['... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.ylabel"
]
] |
kareem1925/qiskit-aqua | [
"7056f9bdd9ece32c41e162faecdcd24cf483da6f",
"7056f9bdd9ece32c41e162faecdcd24cf483da6f",
"7056f9bdd9ece32c41e162faecdcd24cf483da6f"
] | [
"test/optimization/test_vertex_cover.py",
"qiskit/aqua/operators/evolutions/pauli_trotter_evolution.py",
"qiskit/aqua/operators/primitive_ops/pauli_op.py"
] | [
"# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2018, 2020.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE... | [
[
"numpy.testing.assert_array_equal",
"numpy.binary_repr",
"numpy.array",
"numpy.count_nonzero"
],
[
"numpy.logical_or",
"numpy.arange"
],
[
"numpy.logical_xor",
"numpy.conj",
"numpy.logical_or",
"numpy.logical_and",
"numpy.sum"
]
] |
oliverfaustino/NRPG-DataManager | [
"71064cb79be304f712aabcceebd6647121d2cb6c"
] | [
"modulos/utils.py"
] | [
"import pyperclip\nimport pandas as pd\n\nfrom modulos.conecao import *\n\n\n\ndef copiar(objeto): # função para copiar os objetos para área de transferência\n global copiar # para resolver o porblema UnboundLocalError: local variable 'copiar' referenced before assignment:\n opcao = int(input('Deseja copiar p... | [
[
"pandas.read_sql_query"
]
] |
ljch2018/allennlp | [
"63ba3fb28897578d4798039d1713e2b7995eb753"
] | [
"allennlp/models/semantic_parsing/atis/atis_semantic_parser.py"
] | [
"import logging\nfrom typing import Any, Dict, List, Tuple\n\nimport difflib\nimport sqlparse\nfrom overrides import overrides\nimport torch\n\nfrom allennlp.common.util import pad_sequence_to_length\nfrom allennlp.data import Vocabulary\nfrom allennlp.data.fields.production_rule_field import ProductionRuleArray\nf... | [
[
"torch.FloatTensor",
"torch.nn.Dropout",
"torch.nn.init.normal_",
"torch.cat"
]
] |
jdammers/mne-python | [
"1dc1502215a53385cda15c6c336fcc4341dc4d3b",
"1dc1502215a53385cda15c6c336fcc4341dc4d3b",
"1dc1502215a53385cda15c6c336fcc4341dc4d3b",
"1dc1502215a53385cda15c6c336fcc4341dc4d3b",
"1dc1502215a53385cda15c6c336fcc4341dc4d3b"
] | [
"mne/bem.py",
"mne/decoding/tests/test_time_frequency.py",
"mne/inverse_sparse/tests/test_gamma_map.py",
"mne/preprocessing/tests/test_eeglab_infomax.py",
"mne/time_frequency/tests/test_multitaper.py"
] | [
"# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Matti Hamalainen <msh@nmr.mgh.harvard.edu>\n# Eric Larson <larson.eric.d@gmail.com>\n# Lorenzo De Santis <lorenzo.de-santis@u-psud.fr>\n#\n# License: BSD (3-clause)\n\nfrom functools import partial\nimport glob\ni... | [
[
"numpy.dot",
"scipy.linalg.svd",
"numpy.sqrt",
"numpy.arctan2",
"numpy.concatenate",
"numpy.max",
"numpy.where",
"numpy.arange",
"numpy.eye",
"scipy.linalg.inv",
"numpy.zeros",
"numpy.log",
"numpy.power",
"numpy.min",
"numpy.median",
"scipy.optimize.... |
TencentYoutuResearch/SelfSupervisedLearning-DSM | [
"655a0a23a47bf2559f3d435384ae59a8871a5ff5"
] | [
"src/augment/basic_augmentation/noise.py"
] | [
"import torch\nimport torch.nn as nn\n\n\n\"\"\"\nusage\n z_rand = generate_noise([1,nzx,nzy], device=opt.device)\n z_rand = z_rand.expand(1,3,Z_opt.shape[2],Z_opt.shape[3])\n z_prev1 = 0.95*Z_opt +0.05*z_rand\n\"\"\"\n\n\ndef upsampling(im, sx, sy):\n m = nn.Upsample(size=[round... | [
[
"torch.randn"
]
] |
NoeSamaille/medical-detection-toolkit | [
"232d3d1444ccaac04e15a00d8030390560236871",
"232d3d1444ccaac04e15a00d8030390560236871"
] | [
"utils/exp_utils.py",
"experiments/lidc_exp/data_loader.py"
] | [
"#!/usr/bin/env python\n# Copyright 2018 Division of Medical Image Computing, German Cancer Research Center (DKFZ).\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://... | [
[
"numpy.isnan",
"pandas.DataFrame",
"numpy.argwhere",
"numpy.any",
"numpy.argsort"
],
[
"numpy.pad",
"numpy.random.seed",
"numpy.unique",
"numpy.random.choice",
"numpy.arange",
"numpy.min",
"numpy.random.shuffle",
"numpy.concatenate",
"numpy.intersect1d",... |
theBraindonor/chicago-crime-arrests | [
"64cdb82fbe828d1316cf945b67ddc205ef190293"
] | [
"model/experiment/gaussian_naive_bayes_model.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n Experiment with a gaussian naive bayes model with a variety of balancing techniques on the cleaned data set\n\"\"\"\n\n__author__ = \"John Hoff\"\n__email__ = \"john.hoff@braindonor.net\"\n__copyright__ = \"Copyright 2019, John Hoff\"\n__license__ = \"C... | [
[
"sklearn.naive_bayes.GaussianNB"
]
] |
tejas-9er/SVM-vs-LSSVM | [
"e44f63458680c39df370ddfcdf22e8c450d23128"
] | [
"data/LSSVM.py"
] | [
"import numpy as np\nimport scipy\nfrom scipy.sparse import linalg\nfrom sklearn.metrics import accuracy_score\n\nclass LSSVM:\n def __init__(self, kernel = 'linear', C = 1.0,gamma = 1.0, d = 2.0):\n kernels = {\n 'rbf':self.rbf,\n 'poly':self.polynomial,\n 'linear':self.l... | [
[
"numpy.dot",
"scipy.sparse.linalg.cg",
"numpy.linalg.norm",
"numpy.ones",
"numpy.sign",
"numpy.identity",
"numpy.array",
"numpy.zeros"
]
] |
gcruchon/test-opencv | [
"fdf7cb7a86f5606ca6df6170107a0264fbc43e9c"
] | [
"chapter1-cam.py"
] | [
"import cv2\nimport numpy as np\ncap = cv2.VideoCapture(0)\nkernel = np.ones((5, 5), np.uint8)\n\nwhile True:\n success, img = cap.read()\n cv2.imshow(\"Cam\", cv2.Canny(img, 100, 100))\n if cv2.waitKey(1) & 0xFF == ord('q'):\n break\n"
] | [
[
"numpy.ones"
]
] |
diable201/ComputerVision | [
"5ee153363fa6757d3cd8b1add3e5d48b01a499e2"
] | [
"Lectures/lec_05/genSymbolImg.py"
] | [
"import cv2\nimport numpy as np\nfrom random import randint, uniform\nimport string, random\n\n\ndef addNoise(image): \n row,col = image.shape\n s_vs_p = 0.4\n amount = 0.01\n out = np.copy(image)\n # Salt mode\n num_salt = np.ceil(amount * image.size * s_vs_p)\n coords = [np.random.randint(... | [
[
"numpy.ceil",
"numpy.copy",
"numpy.full"
]
] |
cradesto/pystella | [
"f6f44ed12d9648585a52a09e15d494daa4c70c59"
] | [
"tau.py"
] | [
"#!/usr/bin/env python3\n\nimport argparse\nimport logging\n\nimport numpy as np\nimport pystella as ps\nfrom pystella.model.sn_tau import StellaTauDetail\n\nmpl_logger = logging.getLogger('matplotlib')\nmpl_logger.setLevel(logging.WARNING)\n\n__author__ = 'bakl'\n\n# todo Show filters\n# todo show valuse for filte... | [
[
"numpy.abs",
"numpy.log",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] |
ares201005/qiskit-aer | [
"fb3bab00ab810e73ad333b0f538fa6c3c53f054e"
] | [
"test/terra/backends/qasm_simulator/qasm_snapshot.py"
] | [
"# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2018, 2019.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any modificatio... | [
[
"numpy.allclose",
"numpy.random.default_rng",
"numpy.isclose"
]
] |
oshiooshi/cirneco | [
"f71f1cd583bf6e290d7b8e74f148f06cadd39d63"
] | [
"samoyed_ts/nmt.py"
] | [
"import torch\n# import torchtext\nimport torch.nn as nn\n# from torchtext.vocab import Vocab, build_vocab_from_iterator\n# from torchtext.utils import unicode_csv_reader\n# from torchtext.data.datasets_utils import _RawTextIterableDataset\nfrom torch import Tensor\nfrom typing import Iterable, List\n# import sente... | [
[
"torch.sin",
"torch.zeros",
"torch.load",
"torch.nn.Embedding",
"torch.cuda.is_available",
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"torch.nn.TransformerDecoderLayer",
"torch.nn.TransformerDecoder",
"torch.tensor",
"torch.nn.TransformerEncoder"... |
lkoelman/python-neo | [
"58a207976fb33a50ea8e42b70d7da73b03474f42",
"58a207976fb33a50ea8e42b70d7da73b03474f42",
"58a207976fb33a50ea8e42b70d7da73b03474f42"
] | [
"neo/io/pynnio.py",
"neo/io/nestio.py",
"neo/test/iotest/test_pynnio.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nModule for reading/writing data from/to legacy PyNN formats.\n\nPyNN is available at http://neuralensemble.org/PyNN\n\nClasses:\n PyNNNumpyIO\n PyNNTextIO\n\nSupported: Read/Write\n\nAuthors: Andrew Davison, Pierre Yger\n\"\"\"\n\nfrom itertools import chain\nimport numpy\nim... | [
[
"numpy.savez",
"numpy.empty",
"numpy.ones",
"numpy.savetxt",
"numpy.load",
"numpy.where",
"numpy.loadtxt"
],
[
"numpy.unique",
"numpy.vectorize",
"numpy.searchsorted",
"numpy.array",
"numpy.loadtxt"
],
[
"numpy.savez",
"numpy.arange",
"numpy.ones... |
ilyasdc/pycro-manager | [
"5f0153e8a90104eb8715348c6eb22c4d8fdee477"
] | [
"pycromanager/zmq.py"
] | [
"import json\nimport re\nimport time\nimport typing\nimport warnings\nimport inspect\nimport numpy as np\nimport zmq\nfrom weakref import WeakSet\nimport threading\nimport copy\nimport sys\nfrom threading import Lock\n\n\nclass DataSocket:\n \"\"\"\n Wrapper for ZMQ socket that sends and recieves dictionaries... | [
[
"numpy.frombuffer",
"numpy.random.randint"
]
] |
GFDRR/mobility_app | [
"27285a0691fabcc2cede6772a04bb98d29e636da"
] | [
"app2.py"
] | [
"import streamlit as st\nimport pandas as pd\nimport seaborn as sns\nimport pylab as plt\nimport datetime as dt\n#import geopandas as gpd\n\ndf = pd.read_csv('/Users/nicholasjones/Desktop/code/wbg-location-data/notebooks/nick/df_india_may9.csv')\ndf.ds = pd.to_datetime(df.ds)\ndf = df.set_index('ds')\ndf['datetime'... | [
[
"pandas.read_csv",
"pandas.to_datetime"
]
] |
ozacas/asxtrade | [
"a3645ae526bfc7a546fdf2a39520feda99e3390a"
] | [
"src/ingest_financials.py"
] | [
"#!/usr/bin/python3\n\"\"\"\nResponsible for ingesting data related to the business performance over time. Data is placed into the asx_company_financial_metric\ncollection, ready for the core viewer app to use. Stocks whose financial details have been retrieved in the past month are skipped.\n\"\"\"\nimport pymongo... | [
[
"numpy.isnan",
"pandas.to_datetime",
"pandas.melt"
]
] |
f0k/scipy | [
"3145a226339b14bbc22f2e984848e05def7659c5",
"3145a226339b14bbc22f2e984848e05def7659c5",
"3145a226339b14bbc22f2e984848e05def7659c5",
"3145a226339b14bbc22f2e984848e05def7659c5"
] | [
"scipy/interpolate/polyint.py",
"scipy/io/idl.py",
"scipy/sparse/linalg/isolve/tests/test_iterative.py",
"scipy/interpolate/tests/test_polyint.py"
] | [
"from __future__ import division, print_function, absolute_import\n\nimport numpy as np\nfrom scipy.misc import factorial\n\nfrom scipy.lib.six.moves import xrange\n\n__all__ = [\"KroghInterpolator\", \"krogh_interpolate\", \"BarycentricInterpolator\", \"barycentric_interpolate\", \"PiecewisePolynomial\", \"piecewi... | [
[
"numpy.dot",
"numpy.amax",
"numpy.linspace",
"numpy.asarray",
"numpy.concatenate",
"numpy.zeros_like",
"numpy.searchsorted",
"numpy.where",
"scipy.lib.six.moves.xrange",
"numpy.arange",
"numpy.multiply.outer",
"numpy.atleast_1d",
"numpy.zeros",
"numpy.nonzer... |
hendriksanta/probability | [
"6eedc0f01a539b3bee7be28ccd2a9cce15d92f7f",
"6eedc0f01a539b3bee7be28ccd2a9cce15d92f7f",
"6eedc0f01a539b3bee7be28ccd2a9cce15d92f7f",
"6eedc0f01a539b3bee7be28ccd2a9cce15d92f7f"
] | [
"tensorflow_probability/python/distributions/student_t_process.py",
"tensorflow_probability/python/distributions/joint_distribution_vmap_mixin.py",
"tensorflow_probability/python/distributions/exponentially_modified_gaussian.py",
"tensorflow_probability/python/distributions/mvn_linear_operator.py"
] | [
"# Copyright 2018 The TensorFlow Probability Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by a... | [
[
"tensorflow.compat.v2.linalg.diag_part",
"tensorflow.compat.v2.constant",
"tensorflow.compat.v2.sqrt",
"tensorflow.compat.v2.name_scope",
"tensorflow.compat.v2.broadcast_to",
"tensorflow.python.util.deprecation.deprecated_args",
"tensorflow.compat.v2.shape",
"tensorflow.compat.v2.c... |
eberharf/cfl | [
"077b99a05824f1371ac47d76dfed6bb160222668",
"077b99a05824f1371ac47d76dfed6bb160222668"
] | [
"testing/test_cde_io.py",
"visual_bars/generate_visual_bars_data.py"
] | [
"import os\nimport shutil\nfrom shutil import Error\nimport unittest\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom cdes_for_testing import all_cdes \nfrom cfl.dataset import Dataset\n\n''' The following code runs all tests in CondExpInputTests on all implemented\n CondExpXxxx classes.\n'''\n\n\ndef make... | [
[
"numpy.array",
"numpy.zeros",
"numpy.ones"
],
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.axis",
"numpy.zeros",
"numpy.where",
"numpy.random.default_rng",
"matplotlib.pyplot.figure"
]
] |
shengxinhu/tvm | [
"06c443e9959452c6da3a911fe0c11e08c5554477",
"06c443e9959452c6da3a911fe0c11e08c5554477",
"06c443e9959452c6da3a911fe0c11e08c5554477",
"06c443e9959452c6da3a911fe0c11e08c5554477",
"06c443e9959452c6da3a911fe0c11e08c5554477",
"06c443e9959452c6da3a911fe0c11e08c5554477"
] | [
"tests/python/unittest/test_tir_ptx_ldmatrix.py",
"tests/python/contrib/test_cudnn.py",
"tests/python/contrib/test_hexagon/test_cache_read_write.py",
"tests/python/unittest/test_tir_structural_equal_hash.py",
"python/tvm/relay/frontend/oneflow.py",
"tests/python/relay/test_op_grad_level10.py"
] | [
"# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y... | [
[
"numpy.zeros_like",
"numpy.random.rand",
"numpy.zeros"
],
[
"numpy.random.uniform",
"numpy.zeros",
"numpy.random.seed",
"numpy.transpose"
],
[
"numpy.dtype",
"numpy.random.randint"
],
[
"numpy.arange"
],
[
"numpy.zeros",
"numpy.isclose"
],
[
... |
brandontrabucco/playground | [
"069be961aaecb45d75f12f4a71cfa65d7152ea8a",
"069be961aaecb45d75f12f4a71cfa65d7152ea8a"
] | [
"playground/algorithms/ddpg.py",
"playground/algorithms/policy_gradient.py"
] | [
"\"\"\"Author: Brandon Trabucco, Copyright 2019, MIT License\"\"\"\n\n\nfrom playground.algorithms.algorithm import Algorithm\nimport tensorflow as tf\n\n\nclass DDPG(Algorithm):\n\n def __init__(\n self,\n policy,\n target_policy,\n qf,\n target_qf,\n ... | [
[
"tensorflow.concat",
"tensorflow.reduce_mean",
"tensorflow.keras.losses.logcosh",
"tensorflow.stop_gradient",
"tensorflow.GradientTape"
],
[
"tensorflow.reduce_mean",
"tensorflow.GradientTape"
]
] |
folk85/gen_turb | [
"4390938c4cefae334e95414f83b9c484991bff67"
] | [
"tests/plot_time_space.py"
] | [
"# -*- coding: utf-8 -*-\nimport os\nimport numpy as np\nimport matplotlib as m\nimport matplotlib.pyplot as plt\nfrom scipy.fftpack import *\n\nfrom plot_spectr import *\n\ndef main_routine():\n print(os.getcwd())\n nfile = './store.dat'\n #Read the file by blocks to reduce required memory\n with open(nfile,'r... | [
[
"matplotlib.pyplot.legend",
"numpy.sqrt",
"numpy.linspace",
"numpy.mean",
"numpy.exp",
"numpy.where",
"numpy.roll",
"matplotlib.pyplot.tight_layout",
"numpy.arange",
"numpy.size",
"numpy.real",
"numpy.std",
"numpy.zeros",
"numpy.log",
"numpy.genfromtxt",... |
sagnik1511/U-Net-Lowered-with-keras | [
"364336b244ece288a52cf76df451501a665e745a"
] | [
"code/UNET_lowered.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nUNET LOwered Model :\r\n \r\n This customized UNet Model has been generated lowering the filters to their 25% .\r\n \r\n\"\"\"\r\n\r\nimport tensorflow as tf\r\nfrom tensorflow import keras\r\nfrom tensorflow.keras import layers \r\nfrom tensorflow.keras.layers import ... | [
[
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.UpSampling2D",
"tensorflow.keras.layers.concatenate",
"tensorflow.keras.Model",
"tensorflow.keras.backend.clear_session",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.layers.I... |
Rippling/modin | [
"b2cf1d5fc704803a1ce6699e9a373dc7abeb409e",
"d0c84590798f33358dc896eef9d7cd9c519b6289",
"b2cf1d5fc704803a1ce6699e9a373dc7abeb409e"
] | [
"modin/experimental/engines/omnisci_on_ray/frame/calcite_builder.py",
"modin/pandas/test/dataframe/test_window.py",
"modin/pandas/utils.py"
] | [
"# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the \"License\"); you... | [
[
"pandas.core.dtypes.common._get_dtype"
],
[
"matplotlib.use",
"pandas.Timestamp",
"pandas.DataFrame",
"numpy.testing.assert_equal"
],
[
"pandas.api.types.is_scalar"
]
] |
lucadiliello/metrics | [
"e98fbafd2af5d217596958f9cfe6152543a00b7f",
"e98fbafd2af5d217596958f9cfe6152543a00b7f"
] | [
"torchmetrics/regression/pearson.py",
"torchmetrics/functional/text/wip.py"
] | [
"# Copyright The PyTorch Lightning team.\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... | [
[
"torch.tensor"
],
[
"torch.tensor"
]
] |
Lizhi-sjtu/DRL-code-pytorch | [
"2ca05f4ed64d2d032e161fc3a2d2a68c818c4337"
] | [
"8.SAC/SAC-continuous.py"
] | [
"import gym\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport numpy as np\r\nimport copy\r\nfrom torch.utils.tensorboard import SummaryWriter\r\nfrom torch.distributions import Normal\r\n\r\n\r\nclass Actor(nn.Module):\r\n def __init__(self, state_dim, action_dim, hidden_width... | [
[
"torch.cat",
"torch.zeros",
"torch.tanh",
"torch.no_grad",
"torch.tensor",
"numpy.zeros",
"torch.nn.functional.softplus",
"torch.optim.Adam",
"numpy.log",
"numpy.random.choice",
"torch.min",
"torch.exp",
"torch.nn.Linear",
"torch.nn.functional.mse_loss",
... |
tliu68/graspologic | [
"d1cf7678bc63ab9769828a82a90f66bf1dfa0eff"
] | [
"graspologic/layouts/render.py"
] | [
"# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport networkx as nx\nfrom typing import Any, Dict, List, Optional, Tuple\nfrom graspologic.layouts.classes import NodePosition\nimport matplotlib.pyplot as plt\n\n\ndef _calculate_x_y_domain(\n positions: List[NodePosition],\n) -> Tu... | [
[
"matplotlib.pyplot.gca",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.close",
"matplotlib.pyplot.show"
]
] |
playma/stockAI-trading_calendars | [
"97aa9451961b000ef38e791c394c450015f4724d"
] | [
"trading_calendars/exchange_calendar_twse.py"
] | [
"from datetime import time\nimport pandas as pd\nfrom pytz import timezone\nfrom .precomputed_trading_calendar import PrecomputedTradingCalendar\n\nprecomputed_taiwan_holidays = pd.to_datetime([\n \"1999-01-01\",\n \"1999-02-10\",\n \"1999-02-11\",\n \"1999-02-12\",\n \"1999-02-15\",\n \"1999-02-1... | [
[
"pandas.to_datetime"
]
] |
lucgiffon/psm-nets | [
"dec43c26281febf6e5c8b8f42bfb78098ae7101d",
"dec43c26281febf6e5c8b8f42bfb78098ae7101d",
"dec43c26281febf6e5c8b8f42bfb78098ae7101d",
"dec43c26281febf6e5c8b8f42bfb78098ae7101d",
"dec43c26281febf6e5c8b8f42bfb78098ae7101d"
] | [
"code/scripts/2020/04/11_12_fine_tune_palminized.py",
"code/visualization/2020/04/0_0_compression_tucker_sparse_facto_select_lr.py",
"code/palmnet/layers/tt_layer_dense.py",
"code/scripts/sandbox/test_bug_faust2.py",
"code/scripts/2020/02/0_1_random_sparse_facto.py"
] | [
"\"\"\"\nThis script finds a palminized model with given arguments then finetune it.\n\nUsage:\n script.py --input-dir path [-h] [-v|-vv] [--seed int] [--train-val-split float] [--keep-last-layer] [--lr float] [--use-clr policy] [--min-lr float --max-lr float] [--epoch-step-size int] [--nb-epoch int] [--only-mas... | [
[
"pandas.read_csv",
"numpy.reshape",
"numpy.linalg.multi_dot",
"sklearn.model_selection.train_test_split",
"numpy.linalg.norm",
"numpy.prod",
"numpy.array",
"numpy.sum"
],
[
"numpy.hstack",
"pandas.concat",
"pandas.read_csv",
"pandas.Series",
"numpy.isnan",
... |
dgwakeman/mne-python | [
"3cc7a3f8456d78c828355f1860dd7e0297e59c73",
"3cc7a3f8456d78c828355f1860dd7e0297e59c73",
"3cc7a3f8456d78c828355f1860dd7e0297e59c73",
"3cc7a3f8456d78c828355f1860dd7e0297e59c73"
] | [
"mne/forward/tests/test_forward.py",
"mne/viz/tests/test_decoding.py",
"mne/inverse_sparse/mxne_inverse.py",
"examples/visualization/plot_topography.py"
] | [
"import os\nimport os.path as op\nimport warnings\nimport gc\n\nfrom nose.tools import assert_true, assert_raises\nimport numpy as np\nfrom numpy.testing import (assert_array_almost_equal, assert_equal,\n assert_array_equal, assert_allclose)\n\nfrom mne.datasets import testing\nfrom mne.io... | [
[
"numpy.testing.assert_equal",
"numpy.testing.assert_array_equal",
"numpy.intersect1d",
"numpy.searchsorted",
"numpy.testing.assert_allclose",
"numpy.sum",
"numpy.testing.assert_array_almost_equal"
],
[
"matplotlib.use",
"numpy.ceil"
],
[
"numpy.dot",
"scipy.lina... |
christophbrgr/ood_detection_framework | [
"c3b7e3064ed8ee4aeb112cd2ab946ee41636f79f"
] | [
"models/wide_resnet.py"
] | [
"import sys\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.nn.init as init\nfrom torch.autograd import Variable\n\n\ndef conv3x3(in_planes, out_planes, stride=1):\n return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=Tru... | [
[
"torch.nn.Sequential",
"torch.nn.Dropout",
"numpy.sqrt",
"torch.nn.init.constant_",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.BatchNorm2d",
"torch.nn.functional.max_pool2d"
]
] |
esoha-nvidia/cudf | [
"663457b186bbf27ea2926e08438b8c01b5c7633e",
"663457b186bbf27ea2926e08438b8c01b5c7633e"
] | [
"python/cudf/cudf/tests/test_binops.py",
"python/cudf/cudf/core/indexing.py"
] | [
"# Copyright (c) 2018-2021, NVIDIA CORPORATION.\n\nfrom __future__ import division\n\nimport decimal\nimport operator\nimport random\nfrom itertools import product\n\nimport numpy as np\nimport pandas as pd\nimport pytest\n\nimport cudf\nfrom cudf.core import Series\nfrom cudf.core.index import as_index\nfrom cudf.... | [
[
"numpy.true_divide",
"numpy.datetime_data",
"numpy.random.random",
"pandas.Series",
"numpy.random.seed",
"pandas.DateOffset",
"numpy.random.choice",
"numpy.isnan",
"numpy.float16",
"pandas.Index",
"pandas.DataFrame",
"numpy.dtype",
"numpy.testing.assert_array_eq... |
pedbrgs/anomaly-detection-tool | [
"1b5d89eb1287eb13849d87851a8c3c4cc708a93e"
] | [
"utils.py"
] | [
"import cv2\nimport numpy as np\nfrom PIL import Image\nfrom matplotlib import pyplot as plt\n\nimport torch\nimport torchvision.models as models\nfrom torch.autograd import Variable\nimport torchvision.transforms as transforms\n\ndef plot_image(image, figsize):\n\n \"\"\" Display an image \"\"\"\n\n fig = pl... | [
[
"numpy.array",
"numpy.dot",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"numpy.linalg.norm",
"numpy.ones",
"numpy.max",
"torch.nn.AdaptiveAvgPool2d",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.sh... |
leonavery/KSFD | [
"090e388df13a2674676cbaa53171f2a87291ba9b"
] | [
"KSFD/ksfdtimeseries.py"
] | [
"\"\"\"\nMPI-aware read and write PETSc Vec to HDF5\n\nThe goal of this module is to save snapshots of a PETSc Vec to HDF5\nfiles, and obviously to read them again later. The obvious way to do\nthis is parallel HDF5. Unfortunately, distributions of HDF5 and h5py\nmay be built without support for parallel operation.... | [
[
"numpy.append",
"numpy.array",
"numpy.isscalar"
]
] |
didichuxing/delta | [
"31dfebc8f20b7cb282b62f291ff25a87e403cc86"
] | [
"utils/avg_checkpoints.py"
] | [
"#!/usr/bin/env python3\n# Copyright 2019 The Tensor2Tensor 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# Unles... | [
[
"numpy.zeros"
]
] |
TemsyChen/Spotifinder | [
"b069ffcd63bd7654e1afd51cde3288c9678d121a"
] | [
"app/app_3rdtry.py"
] | [
"import dash\nimport dash_core_components as dcc\nimport dash_html_components as html\nimport plotly.express as px\nfrom dash.dependencies import Input, Output\nimport pandas as pd\nimport pickle\n# from os.path import dirname\n\n# DIR = dirname(__file__)\n# MODELS_DIR = DIR + '/../models/'\n# DATA_DIR = DIR + '/..... | [
[
"pandas.read_csv"
]
] |
alifianmahardhika/galaxy_simpy | [
"799d11b00a3b14991d89ddac0aabf0bcd447b800",
"799d11b00a3b14991d89ddac0aabf0bcd447b800"
] | [
"two-body-mond.py",
"new-code/simple-code-program.py"
] | [
"import matplotlib.pyplot as plt\nfrom numpy import sin,cos,pi,sqrt,exp,floor,zeros,copy,array\nfrom numpy.random import normal\nfrom numpy.linalg import norm\nfrom random import uniform\nfrom time import time\n\nstart = time()\ndef euler(x,v):\n for i in range(n_particles):\n sigmaF = zeros(2)\n f... | [
[
"numpy.sqrt",
"numpy.cos",
"numpy.linalg.norm",
"numpy.sin",
"matplotlib.pyplot.plot",
"numpy.copy",
"numpy.floor",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.show"
],
[
"numpy.sqrt",
"matplotlib.pyplot.scatter",
"numpy.str",
"numpy.abs",
"matp... |
sagartomar/aesara | [
"477f4e5dd757b1ccd3deaf59bf75fc27d7ab9cf6",
"477f4e5dd757b1ccd3deaf59bf75fc27d7ab9cf6",
"17594a05d4dee2574f07771b8f176e7dd60d134a"
] | [
"aesara/scan/op.py",
"aesara/tensor/math.py",
"tests/tensor/test_math.py"
] | [
"\"\"\"This module provides the `Scan` `Op`.\n\nMemory reuse in scan\n--------------------\n\nTo reduce the number of memory allocations and copies associated with calling\nthe inner function and recovering the outputs at every iteration, Scan uses a\nmemory pre-allocation mechanism for some of its outputs. Instead... | [
[
"numpy.asarray",
"numpy.max",
"numpy.zeros",
"numpy.min"
],
[
"numpy.dot",
"numpy.maximum",
"numpy.allclose",
"numpy.asarray",
"numpy.concatenate",
"numpy.max",
"numpy.int64",
"numpy.argmax",
"numpy.mean",
"numpy.iinfo",
"numpy.isscalar",
"numpy.... |
APS-XSD-OPT-Group/wavepytools | [
"25397c099e86a8939cc4ee3a2d266e4f809a1d18",
"25397c099e86a8939cc4ee3a2d266e4f809a1d18",
"25397c099e86a8939cc4ee3a2d266e4f809a1d18",
"25397c099e86a8939cc4ee3a2d266e4f809a1d18",
"25397c099e86a8939cc4ee3a2d266e4f809a1d18"
] | [
"wavepytools/optics/fourierOptics/exampleCircularLens2Steps.py",
"wavepytools/NRA/nra_analyses.py",
"wavepytools/wgTools/fastplot_with_pyqtgraph.py",
"wavepytools/imaging/single_grating/diff_image.py",
"wavepytools/imaging/single_grating/wavefront_response_func.py"
] | [
"# -*- coding: utf-8 -*- #\n\"\"\"\nCreated on Tue Mar 3 11:18:30 2015\n\n@author: wcgrizolli\n\"\"\"\n\nimport sys\n\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom myFourierLib import *\n\n\nsys.path.append('/home/wcgrizolli/pythonWorkspace/wgTools')\nimport wgTools as wgt\n\nsys.path.append('/ho... | [
[
"numpy.abs",
"numpy.linspace",
"numpy.cos",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.close",
"numpy.exp",
"matplotlib.pyplot.show"
],
[
"numpy.nanmax",
"matplotlib.pyplot.contourf",
"numpy.sqrt",
"numpy.rad2deg",
"matplotlib.pyplot.plot",
"numpy.max",... |
George-Jiao/pytorch-toolbelt | [
"920e03876805351ed5645e439a64074cb4f37589"
] | [
"pytorch_toolbelt/modules/encoders/timm/common.py"
] | [
"import math\nimport warnings\nimport torch\n\nfrom typing import List, Union\nfrom torch import Tensor, nn\n\nfrom ..common import EncoderModule, _take\n\n__all__ = [\"GenericTimmEncoder\", \"make_n_channel_input_std_conv\"]\n\n\nclass GenericTimmEncoder(EncoderModule):\n def __init__(self, timm_encoder: Union[... | [
[
"torch.nn.Parameter",
"torch.cat"
]
] |
goldtime1987/pyQTGraph | [
"97193758d9f8f57f304f95959403f1db84c3c0b0"
] | [
"go.py"
] | [
"from PyQt4 import QtGui,QtCore\r\nimport sys\r\nimport ui_main\r\nimport numpy as np\r\nimport pylab\r\nimport time\r\nimport pyqtgraph\r\n\r\nclass ExampleApp(QtGui.QMainWindow, ui_main.Ui_MainWindow):\r\n def __init__(self, parent=None):\r\n pyqtgraph.setConfigOption('background', 'w') #before loading ... | [
[
"numpy.arange"
]
] |
ImmortalSdm/Speech-Emotion-Recognition-1 | [
"c5f766a0f66c77df30c6d75e86d97c27c2bbb240"
] | [
"extract_feats/opensmile.py"
] | [
"import os\nimport csv\nimport sys\nimport time\nimport pandas as pd\nfrom sklearn.preprocessing import StandardScaler\nfrom typing import Tuple\nfrom sklearn.externals import joblib\nfrom sklearn.model_selection import train_test_split\n\n# 每个特征集的特征数量\nFEATURE_NUM = {\n 'IS09_emotion': 384,\n 'IS10_paraling'... | [
[
"sklearn.externals.joblib.dump",
"pandas.read_csv",
"sklearn.model_selection.train_test_split",
"sklearn.preprocessing.StandardScaler",
"sklearn.externals.joblib.load"
]
] |
kpflugshaupt/pandas | [
"a1fee9199eba7ebf423880243936b9f1501d3d3a",
"a1fee9199eba7ebf423880243936b9f1501d3d3a",
"a1fee9199eba7ebf423880243936b9f1501d3d3a",
"a1fee9199eba7ebf423880243936b9f1501d3d3a",
"a1fee9199eba7ebf423880243936b9f1501d3d3a",
"a1fee9199eba7ebf423880243936b9f1501d3d3a"
] | [
"pandas/tests/series/test_replace.py",
"pandas/tests/indexes/period/test_setops.py",
"pandas/core/indexing.py",
"pandas/tests/resample/test_resample_api.py",
"pandas/core/reshape/concat.py",
"pandas/tests/io/formats/test_printing.py"
] | [
"# coding=utf-8\n# pylint: disable-msg=E1101,W0612\n\nimport numpy as np\nimport pytest\n\nimport pandas as pd\nimport pandas.util.testing as tm\n\nfrom .common import TestData\n\n\nclass TestSeriesReplace(TestData):\n def test_replace(self):\n N = 100\n ser = pd.Series(np.random.randn(N))\n ... | [
[
"pandas.Series",
"numpy.arange",
"pandas.Categorical",
"pandas.util.testing.assert_series_equal",
"pandas.util.testing.makeDateIndex",
"numpy.random.randn",
"pandas.date_range",
"pandas.isna",
"pandas.Timestamp"
],
[
"pandas.PeriodIndex",
"pandas.period_range",
... |
Shashi456/transformers | [
"0f43e742d908772733870730dbddd8e00e0253ef"
] | [
"src/transformers/models/pegasus/modeling_tf_pegasus.py"
] | [
"# coding=utf-8\n# Copyright 2021, Google Inc. and The HuggingFace Inc. team. 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/li... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.keras.layers.LayerNormalization",
"tensorflow.concat",
"tensorflow.control_dependencies",
"tensorflow.zeros",
"tensorflow.cast",
"tensorflow.math.not_equal",
"tensorflow.tuple",
"numpy.sin",
"tensorflow.stop_gradient",
"tensor... |
mrksbrg/adas-pro-sivic | [
"fb4bbd4f39b58e42c3d47494fb4116a3e7fced0d"
] | [
"scripts/compile_prosivic_results.py"
] | [
"import os\nimport statistics\nimport csv\nfrom collections import Counter\nimport pandas as pd\nimport numpy as np\n\nclass ExpSetup:\n\n def __init__(self, ped_x, ped_y, ped_orient, ped_speed, car_speed, min_dist, min_ttc, min_dist_awa, det, col):\n self.ped_x = ped_x\n self.ped_y = ped_y\n ... | [
[
"pandas.read_csv"
]
] |
PeruBhardwaj/AttributionAttack | [
"0d5ca334c611c5e067029a3f8907f2d91255ddde"
] | [
"KGEAttack/ConvE/l2_del.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In this notebook, I delete a triple from the neighbourhood of the target triple based on the **L2 metric = euclidean distance** between the candidate triple's embedding and the target triple's embedding\n# \n# - 'triple' embedding is computed by applying the model's scor... | [
[
"numpy.isin",
"torch.norm",
"numpy.random.seed",
"torch.manual_seed",
"torch.from_numpy",
"pandas.DataFrame",
"numpy.concatenate",
"torch.sort",
"torch.cuda.is_available",
"numpy.array",
"numpy.where",
"numpy.random.default_rng"
]
] |
ydiller/NoMoreNMS | [
"1c1557357e5312c287f0971c840060deb1bcd039"
] | [
"tools/my_runner.py"
] | [
"# Copyright (c) OpenMMLab. All rights reserved.\nimport os.path as osp\nimport platform\nimport shutil\nimport time\nimport warnings\nimport torch\nimport mmcv\nimport wandb\nfrom mmcv.runner.hooks import HOOKS, Hook\nfrom mmcv.runner.base_runner import BaseRunner\nfrom mmcv.runner.builder import RUNNERS\nfrom mmc... | [
[
"torch.distributed.get_rank",
"torch.distributed.is_initialized",
"torch.no_grad"
]
] |
MortonWang/geo_IF | [
"4e27aeb9e005cdfb151777bc730de6d8372d1b7f"
] | [
"data_process/kdtree.py"
] | [
"# -*- coding:utf-8 -*-\nimport copy\nimport numpy as np\n\nfrom scipy._lib.six import xrange\n\n\nclass KDTree:\n def __init__(self, bucket_size, dimensions, parent=None):\n self.bucket_size = bucket_size\n self.parent = None\n self.left = None\n self.right = None\n self.split... | [
[
"scipy._lib.six.xrange",
"numpy.zeros",
"numpy.argmax"
]
] |
PIN-devel/inside-kids | [
"554e4a0a5654c9a0f5237b904bb2ca6db88a55cb",
"554e4a0a5654c9a0f5237b904bb2ca6db88a55cb"
] | [
"contents/tts/content/TensorflowTTS/tensorflow_tts/utils/group_conv.py",
"contents/tts/content/TensorflowTTS/tensorflow_tts/models/fastspeech.py"
] | [
"# -*- coding: utf-8 -*-\n# This code is copy from https://github.com/tensorflow/tensorflow/pull/36773.\n\"\"\"Group Convolution Modules.\"\"\"\n\nfrom tensorflow.python.framework import tensor_shape\nfrom tensorflow.python.keras import activations\nfrom tensorflow.python.keras import constraints\nfrom tensorflow.p... | [
[
"tensorflow.python.framework.tensor_shape.TensorShape",
"tensorflow.python.keras.utils.conv_utils.convert_data_format",
"tensorflow.python.keras.regularizers.get",
"tensorflow.python.keras.utils.conv_utils.conv_output_length",
"tensorflow.python.ops.nn_ops._get_strides_and_dilation_rate",
... |
FredericSauv/z-quantum-core | [
"f285b292159fe272d7401ba05baac7bab28475d7",
"f285b292159fe272d7401ba05baac7bab28475d7"
] | [
"src/python/zquantum/core/utils.py",
"src/python/zquantum/core/testing/_initialize.py"
] | [
"\"\"\"General-purpose utilities.\"\"\"\n\nimport numpy as np\nfrom scipy.linalg import expm\nimport random\nimport math\nimport operator\nimport sys\nimport json\nimport openfermion\nfrom openfermion import hermitian_conjugated\nfrom openfermion.ops import SymbolicOperator\nfrom networkx.readwrite import json_grap... | [
[
"numpy.eye",
"numpy.array",
"numpy.zeros",
"numpy.iscomplexobj"
],
[
"numpy.absolute",
"numpy.linalg.norm",
"numpy.random.rand",
"numpy.random.seed"
]
] |
yuishihara/chainerrl | [
"74901712a8ed8207b9d526d3f45b04bf22996b8d",
"74901712a8ed8207b9d526d3f45b04bf22996b8d",
"74901712a8ed8207b9d526d3f45b04bf22996b8d",
"74901712a8ed8207b9d526d3f45b04bf22996b8d"
] | [
"examples/ale/train_nsq_ale.py",
"chainerrl/misc/init_like_torch.py",
"tests/misc_tests/test_draw_computational_graph.py",
"tests/functions_tests/test_lower_triangular_matrix.py"
] | [
"from __future__ import print_function\nfrom __future__ import division\nfrom __future__ import unicode_literals\nfrom __future__ import absolute_import\nfrom builtins import * # NOQA\nfrom future import standard_library\nstandard_library.install_aliases() # NOQA\n\nimport argparse\nimport os\nimport random\n\n# ... | [
[
"numpy.asarray",
"numpy.arange"
],
[
"numpy.random.uniform",
"numpy.sqrt"
],
[
"numpy.zeros",
"numpy.ones"
],
[
"numpy.tril_indices",
"numpy.random.uniform",
"numpy.diag_indices",
"numpy.zeros"
]
] |
mdand2000/keras-team-keras | [
"5eecd55a6f1d6d149b42f9b76aa53d4c5ab8d3eb",
"5eecd55a6f1d6d149b42f9b76aa53d4c5ab8d3eb",
"5eecd55a6f1d6d149b42f9b76aa53d4c5ab8d3eb"
] | [
"tests/keras/test_callbacks.py",
"tests/test_loss_masking.py",
"examples/imdb_bidirectional_lstm.py"
] | [
"import os\nimport multiprocessing\n\nimport numpy as np\nimport pytest\nfrom csv import reader\nfrom csv import Sniffer\nimport shutil\nfrom keras import optimizers\nfrom keras import initializers\nfrom keras import callbacks\nfrom keras.models import Sequential, Model\nfrom keras.layers import Input, Dense, Dropo... | [
[
"numpy.random.random",
"numpy.random.seed",
"numpy.isnan",
"numpy.ones",
"numpy.where",
"numpy.random.randint"
],
[
"numpy.arange",
"numpy.array",
"numpy.random.seed",
"numpy.ones"
],
[
"numpy.array"
]
] |
Gruschwick/ECG_PLATFORM | [
"4a1ee568e8593938a3b51c595d4834f861a6db6e"
] | [
"Framework/Sketch/Helpers/Metrices.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Mar 11 16:56:51 2019\n\n@author: x\n\"\"\"\n\nimport numpy as np\nfrom collections import Counter\n\nclass MetricesConstants(object):\n #qrs_cutoff_distance = 0.2\n qrs_cutoff_distance = 0.120 #https://www.sciencedirect.com/science/article/abs/pii/S174680941730... | [
[
"numpy.pad",
"numpy.abs",
"numpy.all",
"numpy.max",
"numpy.std",
"numpy.mean",
"scipy.optimize.linear_sum_assignment"
]
] |
Kiiwi/Syssel | [
"83705e3fd0edf40f09df950d5ce91c95586573f5"
] | [
"venv/Lib/site-packages/IPython/lib/latextools.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"Tools for handling LaTeX.\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nfrom io import BytesIO, open\nfrom base64 import encodestring\nimport os\nimport tempfile\nimport shutil\nimport subprocess\n\nfrom IPython.util... | [
[
"matplotlib.mathtext.MathTextParser"
]
] |
tropp/ACQ4 | [
"792e05e99cedfc175593d200aeabecd6fa6304ce"
] | [
"acq4/devices/PatchStar/patchstar.py"
] | [
"# -*- coding: utf-8 -*-\nimport time\nimport numpy as np\nfrom PyQt4 import QtGui, QtCore\nfrom ..Stage import Stage, MoveFuture, StageInterface\nfrom acq4.drivers.PatchStar import PatchStar as PatchStarDriver\nfrom acq4.util.Mutex import Mutex\nfrom acq4.util.Thread import Thread\nfrom acq4.pyqtgraph import debug... | [
[
"numpy.array"
]
] |
JiaXingBinggan/MSRL | [
"fcc8b06eb1938a78549868b27f2962cb47b3d866"
] | [
"agent/DQN_agent.py"
] | [
"import numpy as np\nimport mindspore\nfrom mindspore import context, ops, Tensor, nn\nfrom mindspore.common.parameter import Parameter, ParameterTuple\nimport copy\n\n\ncontext.set_context(mode=context.PYNATIVE_MODE, device_target=\"CPU\")\n\n\n_update_op = ops.MultitypeFuncGraph(\"update_op\")\n\n\n@_update_op.re... | [
[
"numpy.random.choice",
"numpy.random.uniform",
"numpy.argmax",
"numpy.random.randint",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"numpy.zeros",
"matplotlib.pyplot.ylabel"
]
] |
AndersDHenriksen/Tensorflow-Project-Template | [
"32dfeaaf1243587af4ceb7b378c135092ddb9258"
] | [
"base/base_train.py"
] | [
"import tensorflow as tf\n\n\nclass BaseTrain:\n def __init__(self, sess, model, data, config, logger):\n self.model = model\n self.logger = logger\n self.config = config\n self.sess = sess\n self.data = data\n self.init = tf.group(tf.global_variables_initializer(), tf.l... | [
[
"tensorflow.global_variables_initializer",
"tensorflow.local_variables_initializer"
]
] |
tjuwlz/MachineTranslation | [
"7335c7e95d2ca23ca7e26c45d4b8b13e2ce96704"
] | [
"modules/nmt.py"
] | [
"from datautil.dataloader import batch_iter\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport torch.nn.utils as nn_utils\nimport time\nimport torch\nimport numpy as np\nfrom config.Const import *\n\n\nclass NMT(object):\n def __init__(self, encoder, decoder):\n super(NMT, self).__init_... | [
[
"numpy.random.uniform",
"numpy.log",
"torch.nn.functional.nll_loss",
"torch.zeros"
]
] |
formalabstracts/CNL-CIC | [
"c857ee0d52b4ba91dd06a51c8f9f3ec2749ca0eb"
] | [
"2parser/sample.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Feb 16 05:48:26 2021\n\n@author: thales\n\nGenerate random samples from parsers\n\n\"\"\"\n\nfrom numpy.random import (poisson , binomial, randint)\n\nfrom tokenlib import (Item , Etok, mk_stream)\n\nimport lib\n\nimport state\n\ndef bernoulli... | [
[
"numpy.random.binomial",
"numpy.random.poisson"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.