repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
ADThomas-astro/NebulaBayes | [
"bda65809f43bc336914ce39ae59123e8be1abcbc"
] | [
"src/NebulaBayes/dereddening.py"
] | [
"from __future__ import print_function, division\nimport numpy as np\nimport unittest\n\n\"\"\"\nDo reddening and de-reddening of optical emission-line fluxes using the\nequations in the appendix of Vogt 2013\nhttp://adsabs.harvard.edu/abs/2013ApJ...768..151V\n\nThere are 3 public functions; these are to redden and... | [
[
"numpy.array",
"numpy.isclose",
"numpy.asarray",
"numpy.round",
"numpy.sum",
"numpy.allclose",
"numpy.hypot",
"numpy.abs",
"numpy.all",
"numpy.log10"
]
] |
P1nzhuo/Consistent-MetaReg | [
"0ac4fded841d863decb4d2e012aa51cd68ebefcd"
] | [
"protoNet/test_imagenet.py"
] | [
"# -*- coding: utf-8 -*-\r\nimport argparse\r\n\r\nimport torch\r\n\r\nfrom tqdm import tqdm\r\n\r\nfrom models.embedding import ProtoNetEmbedding\r\nfrom protoNet.prototy_head import ClassificationHead\r\n\r\nfrom utilities import set_gpu, count_accuracy, log, setup_seed\r\nimport numpy as np\r\nimport os\r\nfrom ... | [
[
"numpy.array",
"numpy.sqrt",
"torch.load"
]
] |
francomanca93/machine-learning-profesional-con-scikit-learn | [
"44edb5dd0879c62205a9f6174ad85f7c2f2aaf29"
] | [
"randomized.py"
] | [
"import pandas as pd\n\nfrom sklearn.model_selection import RandomizedSearchCV\nfrom sklearn.ensemble import RandomForestRegressor\n\nimport warnings\nwarnings.filterwarnings(\"ignore\")\n\n\nif __name__ == \"__main__\":\n \n dataset = pd.read_csv(\"./datasets/felicidad.csv\")\n \n # La razón de elimina... | [
[
"pandas.read_csv",
"sklearn.ensemble.RandomForestRegressor",
"sklearn.model_selection.RandomizedSearchCV"
]
] |
jshuhnow/OddEyeCam | [
"ed76cd1c29701b7b49f20bcd61e7e72d3140fda8",
"ed76cd1c29701b7b49f20bcd61e7e72d3140fda8"
] | [
"util/visualize_3d_frame_by_frame.py",
"core/img_tool/align_image.py"
] | [
"\"\"\"\nWritten by DaehwaKim\n>> daehwa.github.io\n\"\"\"\nimport numpy as np\nimport cv2\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\nfrom load_param import cap, cap2, frame_from, frame_to, rs_offset, opti_offset\n\nplt.ion()\nfig = plt.figure(figsize=(8, 8))\nax = fig.add_subplot(11... | [
[
"numpy.array",
"matplotlib.pyplot.ion",
"matplotlib.pyplot.figure"
],
[
"numpy.float32",
"numpy.ones",
"numpy.dot"
]
] |
asafmaman101/pet | [
"c6b78a898c2a5cef0f6b942a3a61632b4c1a7f4e"
] | [
"pet/utils.py"
] | [
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distri... | [
[
"numpy.max",
"torch.cuda.manual_seed_all",
"numpy.random.seed",
"numpy.sum",
"numpy.exp",
"torch.nn.functional.log_softmax",
"torch.manual_seed",
"torch.nn.functional.kl_div",
"torch.cuda.is_available",
"torch.tensor",
"torch.nn.functional.softmax",
"numpy.atleast_2... |
arifmudi/Mastering-Machine-Learning-Algorithms | [
"8655e8e3f1e94f4d65bb92465033ebf54c193409",
"8655e8e3f1e94f4d65bb92465033ebf54c193409"
] | [
"Chapter10/recurrent.py",
"Chapter07/spectral_clustering.py"
] | [
"import matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\nfrom keras.models import Sequential\r\nfrom keras.layers import LSTM, Dense, Activation\r\nfrom keras.optimizers import Adam\r\n\r\nfrom sklearn.preprocessing import MinMaxScaler\r\n\r\n\r\n# Set random seed for reproducibility\r\nnp.random.seed(1000)\r\... | [
[
"numpy.zeros",
"numpy.random.seed",
"matplotlib.pyplot.subplots",
"sklearn.preprocessing.MinMaxScaler",
"matplotlib.pyplot.show"
],
[
"sklearn.cluster.SpectralClustering",
"numpy.zeros",
"sklearn.preprocessing.StandardScaler",
"numpy.random.seed",
"sklearn.cluster.KMean... |
pedroduranhermosilla/deflex | [
"48449c0acc5b1660bce53e21bdbcda3db93b7a61"
] | [
"tests/test_scenario_creator.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"\nTest the main module\n\nSPDX-FileCopyrightText: 2016-2021 Uwe Krien <krien@uni-bremen.de>\n\nSPDX-License-Identifier: MIT\n\"\"\"\n__copyright__ = \"Uwe Krien <krien@uni-bremen.de>\"\n__license__ = \"MIT\"\n\nimport os\nimport shutil\nfrom unittest.mock import MagicMock\n\nimport... | [
[
"pandas.testing.assert_frame_equal",
"pandas.read_csv",
"pandas.to_numeric",
"pandas.testing.assert_series_equal"
]
] |
Ganariya/acopy | [
"339a35313a5c871d98d8f4444df7661600c6ff00"
] | [
"fix_pheromone.py"
] | [
"import warnings\nimport matplotlib\n\nwarnings.filterwarnings('ignore', category=matplotlib.MatplotlibDeprecationWarning)\nwarnings.filterwarnings('ignore', category=UserWarning)\n\nimport os\nimport acopy\nimport samepy\nimport tsplib95\nimport networkx as nx\nimport matplotlib.pyplot as plt\nimport copy\n\nfrom ... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.figure"
]
] |
wenming2014/CINN-1 | [
"7241a4544c3b9abda44ea8fc190a631aa25d4e1f"
] | [
"python/tests/ops/test_elementwise_add_op.py"
] | [
"#!/usr/bin/env python3\n\n# Copyright (c) 2021 CINN 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... | [
[
"numpy.random.random",
"numpy.arange"
]
] |
claudio-unipv/pvml | [
"9f583c2658218003bba2efa70cdbb7499b22d843"
] | [
"pvml/multiclass_ksvm.py"
] | [
"import numpy as np\nfrom .ksvm import ksvm_train, kernel\nfrom .checks import _check_size, _check_labels\n\n\ndef one_vs_one_ksvm_inference(X, Xtrain, alpha, b, kfun, kparam):\n \"\"\"Multiclass kernel SVM prediction of the class labels.\n\n Parameters\n ----------\n X : ndarray, shape (m, n)\n ... | [
[
"numpy.logical_or",
"numpy.sqrt",
"numpy.argmax",
"numpy.zeros"
]
] |
hsinyic/tusp-archive | [
"21ce50038bb7b9a4c099a3926a9eae108323304e"
] | [
"train_algo_relocation/dqn_kbh_colfax_relocation_v2-1-expensive-reloc.py"
] | [
"\"\"\"\nDQNAgent based on work by RLCode team - Copyright (c) 2017 RLCode (MIT Licence)\nhttps://github.com/rlcode/reinforcement-learning\n\nTailored to the TUSP by Evertjan Peer\nKBH example\n\n30000_instances: we generated 30000 instances of a specific size for the Binckhorst. \n\n\nChanges to V2: \n - traini... | [
[
"matplotlib.colors.LinearSegmentedColormap.from_list",
"numpy.random.rand",
"numpy.zeros",
"tensorflow.summary.scalar",
"numpy.reshape",
"tensorflow.Variable",
"numpy.random.uniform",
"numpy.argmax",
"tensorflow.placeholder",
"numpy.amax",
"tensorflow.summary.merge_all"... |
davidglavas/sgan-experiments | [
"7cd6eb51fdd01fa75ed9245039a4f145ba342de2"
] | [
"venv/lib/python3.7/site-packages/caffe2/python/layers_test.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport hypothesis.strategies as st\nimport numpy as np\nimport numpy.testing as npt\nimport unittest\nfrom hypothesis import given\n\nimport caffe2.python.hypot... | [
[
"numpy.concatenate",
"numpy.testing.assert_allclose",
"numpy.array",
"numpy.random.normal",
"numpy.log",
"numpy.random.seed",
"numpy.sum",
"numpy.testing.assert_array_equal",
"numpy.piecewise",
"numpy.exp",
"numpy.multiply",
"numpy.float32",
"numpy.random.randin... |
njbernstein/scvi-tools | [
"8c3ca358418d7dd1da5244dd9c3652a4a8cbe3c2"
] | [
"tests/dataset/test_anndata.py"
] | [
"import os\nimport random\n\nimport anndata\nimport numpy as np\nimport pandas as pd\nimport pytest\nimport scipy.sparse as sparse\nfrom scipy.sparse.csr import csr_matrix\n\nimport scvi\nfrom scvi import _CONSTANTS\nfrom scvi.data import (\n register_tensor_from_anndata,\n setup_anndata,\n synthetic_iid,\... | [
[
"numpy.random.normal",
"numpy.zeros_like",
"numpy.ones_like",
"numpy.array_equal",
"pandas.testing.assert_frame_equal",
"numpy.zeros",
"numpy.array",
"pandas.DataFrame",
"numpy.testing.assert_array_equal",
"scipy.sparse.csr.csr_matrix",
"numpy.asfortranarray",
"nump... |
Prithiviksit/adcentofcode2021 | [
"40f17dade63196f80407703131a8d1f0b924ad3a"
] | [
"d4.py"
] | [
"from pipe import select, where\nimport numpy as np\nimport functools as ft\n\nwith open(\"input4.txt\") as f:\n lines = f.read() \n move = list(map(int,lines.split('\\n\\n')[0].split(\",\")))\n board = lines.split('\\n\\n')[1:]\n\ndef string_to_matrix(m):\n\tif m[-1]==\"\\n\":\n\t\tm=m[0:-1]\n\tm=np.asmat... | [
[
"numpy.asarray",
"numpy.zeros",
"numpy.where",
"numpy.diag",
"numpy.fliplr"
]
] |
StatML-dAI/dnn-inference | [
"fef1cbe9382141dfe5c81e84a6bd39f7a17cd736"
] | [
"app/DnnT.py"
] | [
"import numpy as np\nfrom scipy.stats import norm\nfrom sklearn.model_selection import train_test_split\nfrom keras.callbacks import EarlyStopping\nimport warnings\nimport keras.backend as K\nfrom keras.initializers import glorot_uniform\nimport tensorflow as tf\nfrom sklearn.model_selection import KFold\nfrom scip... | [
[
"numpy.argmin",
"numpy.minimum",
"numpy.median",
"numpy.tan",
"numpy.min",
"numpy.mean",
"numpy.sort",
"scipy.stats.gmean",
"numpy.log",
"scipy.stats.hmean",
"numpy.argmax",
"numpy.arange",
"numpy.partition",
"scipy.stats.norm.cdf",
"numpy.array",
"n... |
brentyi/jaxlie | [
"4dbe16f3c1d1cfda30e0418ef5d1e1772cf9f537"
] | [
"jaxlie/_so3.py"
] | [
"import jax\nimport jax_dataclasses\nimport numpy as onp\nfrom jax import numpy as jnp\nfrom overrides import overrides\n\nfrom . import _base, hints\nfrom .utils import get_epsilon, register_lie_group\n\n\n@register_lie_group(\n matrix_dim=3,\n parameters_dim=4,\n tangent_dim=3,\n space_dim=3,\n)\n@jax... | [
[
"numpy.array"
]
] |
shivamshinde123/flight-fare-prediction | [
"630c8f41419c751c54ac8f1637748a548a426482"
] | [
"modeltraining.py"
] | [
"import warnings\n\nfrom sklearn.model_selection import train_test_split\n\nfrom Logging.logging import Logger\nfrom Training_Clustering.clustering import Cluster\nfrom Training_Preprocessing.preprocessor import Preprocessor\nfrom Training_data_ingestion.data_loading_train import DataGetter\nfrom model_methods.mode... | [
[
"sklearn.model_selection.train_test_split"
]
] |
hellovertex/hanabi_pool_of_states | [
"7c70eab276e7e85c8db6b8e8de2951bdbd794dd2"
] | [
"game_example.py"
] | [
"# Copyright 2018 Google LLC\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# https://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable... | [
[
"numpy.random.choice"
]
] |
leakec/tfc | [
"f814be4643270498a68bb0859720191ff7216012",
"f814be4643270498a68bb0859720191ff7216012"
] | [
"examples/Hunter_Johnston_Dissertation/Chapter_6/Example_6_2/generateIC.py",
"examples/Carl_Leake_Dissertation/Chapter_3/Navier_Stokes_DeepTFC.py"
] | [
"import os,sys\nsourcePath = os.path.join(\"..\",\"..\",\"..\",\"src\",\"build\",\"bin\")\nsys.path.append(sourcePath)\n\nimport numpy as np\nimport tqdm\n\n## TEST PARAMETERS: ***************************************************\nNtest = 10000\na = 1000\nb = 500\n\ndata = {'R0': np.zeros((Ntest,3)), 'V0': np.zeros(... | [
[
"numpy.sin",
"numpy.random.rand",
"numpy.zeros",
"numpy.cos"
],
[
"numpy.max",
"numpy.array",
"numpy.zeros_like",
"numpy.random.rand",
"numpy.reshape",
"numpy.zeros",
"numpy.round",
"numpy.block",
"numpy.ones",
"numpy.min",
"numpy.mean",
"numpy.w... |
half-potato/playground | [
"a7eecdbdd5edc780a5105209df0df6a02b3f62e4"
] | [
"kuramoto/KuramotoCuda.py"
] | [
"import numpy as np\nimport cupy as cp\nimport cv2, time\nimport matplotlib.pyplot as plt\nimport scipy.stats as st\n\nclass Kuramoto:\n def __init__(self, size, mean, std, coupling):\n \"\"\"\n mean: float\n The mean frequency of oscillators in hertz\n \"\"\"\n self.internal... | [
[
"numpy.sin",
"numpy.complex",
"numpy.repeat",
"numpy.linspace",
"scipy.stats.norm.cdf",
"numpy.vstack"
]
] |
davidkleiven/WangLandau | [
"0b253dd98033c53560fe95c76f5e38257834bdf6"
] | [
"cemc/tools/peak_extractor.py"
] | [
"import numpy as np\n\n\nclass PeakExtractor(object):\n \"\"\"Extract peaks from xy-datasets.\n\n :param x: x-values\n :param y: y-values\n \"\"\"\n\n def __init__(self, x, y):\n self.x = x\n self.y = y\n\n def _locate_peak(self, xfit, yfit):\n \"\"\"Locate peak by fitting a p... | [
[
"numpy.polyfit"
]
] |
shartoo/merlin-tf-slim | [
"4c7d48d5f634273dd51d2e29562d3ed1195d9151"
] | [
"src/layers/gating.py"
] | [
"### refer Zhizheng and Simon's ICASSP'16 paper for more details\n### http://www.zhizheng.org/papers/icassp2016_lstm.pdf\n\nimport numpy as np\nimport theano\nimport theano.tensor as T\nfrom theano import config\nfrom theano.tensor.shared_randomstreams import RandomStreams\n\n\nclass VanillaRNN(object):\n \"\"\"... | [
[
"numpy.sqrt",
"numpy.zeros"
]
] |
davethecipo/pymolecular-ribbon-builder | [
"dd9093df4c963cc7c101be4a37cb3e914f893fb1"
] | [
"tests/test_translate.py"
] | [
"#!/usr/bin/python\n# -*- coding: utf-8 -*-\nimport numpy as np\nimport openbabel\n\nfrom ribbonbuilder import translate as t\n\nimport pytest\n\n\n@pytest.fixture()\ndef mol_and_params():\n mol = openbabel.OBMol()\n distance = 3.0\n border_distance = 1.0\n carbon = 6\n hydrogen = 1\n # Add the 4 ... | [
[
"numpy.array"
]
] |
mwalton/em-machineLearning | [
"efd76961fa3b78e042ca481733152a683074d15c"
] | [
"CNN/gen-testData.py"
] | [
"import os\nimport h5py\nimport shutil\nimport sklearn\nimport tempfile\nimport numpy as np\nimport pandas as pd\nimport sklearn.datasets\nimport sklearn.linear_model\nimport matplotlib.pyplot as plt\n\nX, y = sklearn.datasets.make_classification(\n n_samples=10000, n_features=4, n_redundant=0, n_informative=2, ... | [
[
"sklearn.cross_validation.train_test_split",
"sklearn.datasets.make_classification"
]
] |
joungh93/PyRAF_GMOS_IFU | [
"1750caaf846c426cf1fc761ad539f740c8ae64d9"
] | [
"standard/g3_mk_wvsol.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Oct 31 16:29:33 2019\n\n@author: jlee\n\"\"\"\n\n\nimport time\nstart_time = time.time()\n\nimport numpy as np\nimport glob, os\nimport g0_init_cfg as ic\n\n\n# ----- Importing IRAF from the root directory ----- #\ncurrent_dir = os.getcwd()\no... | [
[
"numpy.loadtxt"
]
] |
michael-aloys/knodle | [
"393e7ba0558036828fb228875511977c40000ed5"
] | [
"knodle/trainer/config.py"
] | [
"import pathlib\nfrom typing import Callable, Dict\nimport os\nimport logging\n\nfrom snorkel.classification import cross_entropy_with_probs\n\nimport torch\nfrom torch import Tensor\nfrom torch.optim import SGD\nfrom torch.optim.optimizer import Optimizer\n\nfrom knodle.trainer.utils.utils import check_and_return_... | [
[
"torch.device",
"torch.tensor"
]
] |
Senyaaa/detection-experiments | [
"5e80dd458e886ca27db5420d25ade8f9d74ae5a8",
"5e80dd458e886ca27db5420d25ade8f9d74ae5a8"
] | [
"test/fcos/level_map_fixtures.py",
"fpn/bifpn.py"
] | [
"import pytest\n\nimport os\nimport math\n\nimport torch\n\n\n@pytest.fixture\ndef image_size():\n\treturn 256\n\n\n@pytest.fixture\ndef strides():\n\treturn [8, 16, 32, 64]\n\n\n@pytest.fixture\ndef sample(image_size):\n\treturn (\n\t\ttorch.tensor([\n\t\t\t[5, 11, 200, 210],\n\t\t\t[149, 40, 227, 121],\n\t\t\t[38... | [
[
"torch.zeros",
"torch.cat",
"torch.tensor"
],
[
"torch.nn.Identity",
"torch.stack",
"torch.nn.ModuleList",
"torch.softmax",
"torch.ones",
"torch.nn.Upsample",
"torch.sum"
]
] |
tblume1992/ThymeBoost | [
"100e9bdeaaa8920e6db4ddba64e64a6194afd28e"
] | [
"ThymeBoost/trend_models/ewm_trend.py"
] | [
"# -*- coding: utf-8 -*-\nfrom ThymeBoost.trend_models.trend_base_class import TrendBaseModel\nimport numpy as np\nimport pandas as pd\n\nclass EwmModel(TrendBaseModel):\n model = 'ewm'\n \n def __init__(self):\n self.model_params = None\n self.fitted = None\n\n def __str__(self):\n ... | [
[
"numpy.tile",
"pandas.Series"
]
] |
monsieurgustav/pyrender | [
"10ada1d4f895a4e9272299347def675ec4ba4407"
] | [
"pyrender/renderer.py"
] | [
"\"\"\"PBR renderer for Python.\n\nAuthor: Matthew Matl\n\"\"\"\nimport sys\n\nimport numpy as np\nimport PIL\n\nfrom .constants import (RenderFlags, TextAlign, GLTF, BufFlags, TexFlags,\n ProgramFlags, DEFAULT_Z_FAR, DEFAULT_Z_NEAR,\n SHADOW_TEX_SZ, MAX_N_LIGHTS)\nfrom... | [
[
"numpy.logical_not",
"numpy.array",
"numpy.eye",
"numpy.cos",
"numpy.frombuffer",
"numpy.repeat",
"numpy.linalg.inv",
"numpy.asanyarray",
"numpy.flip"
]
] |
SKA-ScienceDataProcessor/rascil | [
"bd3b47f779e18e184781e2928ad1539d1fdc1c9b"
] | [
"tests/workflows/test_rcal_serial.py"
] | [
"\"\"\" Unit tests for pipelines\n\n\n\"\"\"\n\nimport logging\nimport sys\nimport unittest\n\nimport numpy\nfrom astropy import units as u\nfrom astropy.coordinates import SkyCoord\nfrom astropy.wcs.utils import pixel_to_skycoord\n\nfrom rascil.data_models.polarisation import PolarisationFrame\n\nfrom rascil.proce... | [
[
"numpy.max",
"numpy.array",
"numpy.random.seed",
"numpy.sign",
"numpy.linspace"
]
] |
GregoryMorse/thewalrus | [
"4452c64c60ed2075f1c11884ba4b8e3e291d1dff"
] | [
"thewalrus/_hafnian.py"
] | [
"# Copyright 2021 Xanadu Quantum Technologies Inc.\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 applica... | [
[
"numpy.where",
"numpy.concatenate",
"numpy.iscomplex",
"numpy.random.normal",
"numpy.nonzero",
"numpy.prod",
"numpy.sqrt",
"numpy.empty_like",
"numpy.linalg.eigvals",
"numpy.mod",
"numpy.array",
"numpy.pad",
"numpy.zeros",
"numpy.complex128",
"numpy.lina... |
AmeyaWagh/SwarmRobotics | [
"8fc2d832bba9d80d03017733c07ea5ab3dd7c2b1"
] | [
"CoupledOscillator/CoupledOscillator.py"
] | [
"from __future__ import print_function\nimport numpy as np\nimport time\n\n\"\"\"\ninit:\n state = 0\n c = random(0,T)\nstep:\n if(a neighbor flashed)\n c = c + k * c\n else\n c = c + 1\n if(c >= T)\n state = 1\n c = 0\n else\n state = 0\n\"\"\"\n\nclass Oscillat... | [
[
"numpy.random.randint",
"numpy.zeros"
]
] |
HotMaps/dh_economic_assessment | [
"28393250b8f7a68552b90f7d8612fef216cc69e0"
] | [
"cm/app/api_v1/my_calculation_module_directory/CM/CM_TUW23/f6_optimization.py"
] | [
"import os\nimport sys\nimport numpy as np\nimport networkx as nx\nimport pyomo.environ as en\nfrom pyomo.opt import SolverFactory\nfrom pyomo.opt import TerminationCondition, SolverStatus\n\n\npath = os.path.dirname(os.path.dirname(os.path.dirname(os.path.\n ab... | [
[
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.argmax",
"numpy.argsort"
]
] |
TheAdamEvans/climate-classification | [
"ac49429922c943f634fac96f32f4407e66dc0f01"
] | [
"parsing.py"
] | [
"import re, os, sys, shutil\nfrom pathlib import Path\nimport pandas as pd\nimport numpy as np\n\ndef split_wnd(df):\n \n unsplit = df['wnd'].str.split(',')\n wnd_metrics = pd.DataFrame.from_dict(\n dict(zip(df.index, unsplit)),\n orient='index',\n columns=[\n 'wnd_direction... | [
[
"numpy.deg2rad",
"pandas.to_numeric"
]
] |
DBusAI/catalyst | [
"4fbdf477ea93b4d3781bf4eb10ae8da1747e4566"
] | [
"catalyst/rl/core/trainer.py"
] | [
"from typing import List, Dict\n\nimport os\nimport gc\nimport time\nimport shutil\nfrom pathlib import Path\nfrom datetime import datetime\nimport numpy as np\nimport logging\n\nfrom torch.utils.data import DataLoader\nfrom tensorboardX import SummaryWriter\n\nfrom catalyst.utils.seed import set_global_seed, Seede... | [
[
"numpy.iinfo"
]
] |
coder-freestyle/mlflow | [
"a975bf13306cbf54fa921beb89df180e5633daab"
] | [
"tests/prophet/test_prophet_model_export.py"
] | [
"import os\nimport pytest\nimport yaml\nimport numpy as np\nimport pandas as pd\nfrom collections import namedtuple\nfrom datetime import datetime, timedelta, date\nfrom unittest import mock\n\nfrom prophet import Prophet\n\nimport mlflow\nimport mlflow.prophet\nimport mlflow.utils\nimport mlflow.pyfunc.scoring_ser... | [
[
"numpy.concatenate",
"pandas.to_datetime",
"numpy.random.lognormal",
"pandas.DataFrame.from_records",
"numpy.ceil",
"numpy.random.seed",
"numpy.testing.assert_array_equal",
"numpy.polyval",
"pandas.read_json",
"pandas.testing.assert_series_equal",
"numpy.arange",
"n... |
liuxinren456852/PWCLONet | [
"849b44c46aa751c4e4b47ba2b3c44c7beb08ce51"
] | [
"utils/PWCLO_util.py"
] | [
"import os\nimport sys\nBASE_DIR = os.path.dirname(os.path.abspath(__file__))\nROOT_DIR = os.path.dirname(BASE_DIR)\nsys.path.append(os.path.join(ROOT_DIR, 'utils'))\nsys.path.append(os.path.join(ROOT_DIR, 'tf_ops/sampling'))\nsys.path.append(os.path.join(ROOT_DIR, 'tf_ops/grouping'))\nsys.path.append(os.path.join(... | [
[
"tensorflow.multiply",
"tensorflow.concat",
"tensorflow.expand_dims",
"tensorflow.reshape",
"tensorflow.transpose",
"tensorflow.variable_scope",
"tensorflow.reduce_max",
"tensorflow.squeeze",
"tensorflow.reduce_sum",
"tensorflow.nn.top_k",
"tensorflow.nn.softmax",
"... |
cms-ttbarAC/CyMiniAna | [
"d0d3a4c3f79c7ae46711e661842c5af19ce99e32"
] | [
"python/unfolding.py"
] | [
"\"\"\"\nCreated: 26 April 2018\nLast Updated: 26 April 2018\n\nDan Marley\ndaniel.edison.marley@cernSPAMNOT.ch\nTexas A&M University\n-----\n\nBase class for performing unfolding\n\"\"\"\nimport json\nimport datetime\n\nimport uproot\nimport numpy as np\nimport pandas as pd\n\nimport util\nfrom unfoldingP... | [
[
"numpy.random.seed"
]
] |
j-jiafei/ReAgent | [
"3f377276ca9cb843bfa12cdb325fbec747ade772"
] | [
"reagent/evaluation/reward_net_evaluator.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\nimport copy\nimport logging\n\nimport numpy as np\nimport torch\nfrom reagent.core import types as rlt\nfrom reagent.core.types import PreprocessedRankingInput\nfrom reagent.training.reward_network_trainer import Rewar... | [
[
"torch.no_grad",
"torch.cat",
"numpy.mean"
]
] |
gatoatigrado/justice | [
"03d7def1af0bfd1bd51f36a2e1929ede9cf29f07"
] | [
"test/mock_data_test.py"
] | [
"import numpy as np\n\nimport justice.simulate as sim\n\n\ndef test_make_gauss():\n gauss_fcn = sim.make_gauss([1.0, ])\n xs = sim.make_cadence([np.arange(0.0, 1.0, 0.1), ], [0.])\n ys = gauss_fcn(xs)\n expected = [1.,\n 0.99501248,\n 0.98019867,\n 0.95599748... | [
[
"numpy.testing.assert_allclose",
"numpy.array",
"numpy.arange",
"numpy.abs"
]
] |
pyvandenbussche/bert-text-classificaiton-arxiv | [
"32942ed2deb468d8d8c0395e727c4a5c1b007d86"
] | [
"feature_extraction.py"
] | [
"'''\nData preparation and feature extraction of arXiv dataset available at\nhttps://www.kaggle.com/neelshah18/arxivdataset\n'''\n\nimport argparse\nimport beautifultable as bt\nfrom bert_serving.client import BertClient\nimport collections\nfrom gensim.models import Word2Vec\nimport pandas as pd\nimport networkx a... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.savetxt",
"pandas.read_json",
"numpy.loadtxt",
"sklearn.model_selection.train_test_split",
"numpy.average"
]
] |
liviurotiul/Deep-SVDD-PyTorch | [
"bce4692e675493e37b20aa09f9e1573d99425c8f"
] | [
"src/datasets/creditFraud.py"
] | [
"import csv\nfrom torch.utils.data import Dataset, DataLoader\nimport numpy as np\nfrom base.torchvision_dataset import TorchvisionDataset\nimport torchvision.transforms as transforms\nfrom .preprocessing import get_target_label_idx\nimport torch\nfrom torch.utils.data import Subset\n\nclass CreditFraud_Dataset(Tor... | [
[
"torch.utils.data.Subset",
"numpy.max",
"numpy.asarray",
"torch.from_numpy"
]
] |
amankedia/Deep-Learning | [
"a3afddb0db9e4167228fa5540918d7c74aff17b1"
] | [
"Supervised Deep Learning/Artificial Neural Networks (ANN)/ann_cross_validation.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Jul 31 15:41:28 2017\n\n@author: Aman Kedia\n\"\"\"\n\n# Importing the libraries\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\n# Importing the dataset\ndataset = pd.read_csv('Churn_Modelling.csv')\nX = dataset.iloc[:, 3: 13].values\ny =... | [
[
"sklearn.preprocessing.LabelEncoder",
"sklearn.preprocessing.StandardScaler",
"sklearn.model_selection.train_test_split",
"pandas.read_csv",
"sklearn.preprocessing.OneHotEncoder",
"sklearn.model_selection.cross_val_score"
]
] |
jmedinah09/MetPy | [
"6529608d956039d4791a17a7bdb1a2c0bf97cd75"
] | [
"metpy/plots/tests/test_skewt.py"
] | [
"# Copyright (c) 2015,2016,2017 MetPy Developers.\n# Distributed under the terms of the BSD 3-Clause License.\n# SPDX-License-Identifier: BSD-3-Clause\n\"\"\"Tests for the `skewt` module.\"\"\"\n\nimport matplotlib\nfrom matplotlib.gridspec import GridSpec\nimport matplotlib.pyplot as plt\nimport numpy as np\nimpor... | [
[
"numpy.array",
"matplotlib.rc_context",
"numpy.zeros",
"matplotlib.pyplot.rc_context",
"matplotlib.pyplot.figure",
"numpy.arange",
"numpy.hypot",
"numpy.sqrt",
"numpy.linspace",
"matplotlib.gridspec.GridSpec"
]
] |
MMU-VisionLab/VGG-16-PyTorch1.5 | [
"c8bed219a647d47489cc6344eb2c00c360cd7cb4"
] | [
"evaluation.py"
] | [
"'''\nModel Evaluation script. The evaluation strategy here is to show the prediction class of an image as an input image path is provided. Therefore, there is no need to use the DataLoader class to load the data. However, if you wish you evaluate in batches, use the LoadDataset class from load_data.py and DataLoad... | [
[
"torch.load"
]
] |
devvrit/DAEGC | [
"1085675cffc2da81ad5ebc7b51978a22341fdec8"
] | [
"DAEGC/pretrain.py"
] | [
"import argparse\nimport numpy as np\n\nfrom sklearn.cluster import KMeans\nfrom sklearn.preprocessing import normalize\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.parameter import Parameter\nfrom torch.optim import Adam\n\nimport utils\nfrom model import GAT\nfrom evaluat... | [
[
"torch.device",
"sklearn.cluster.KMeans",
"torch.no_grad",
"torch.cuda.is_available",
"torch.Tensor"
]
] |
tuero/PyTorch-BayesianCNN | [
"ddc4c10c9e5cb33df2e0eaa97bb3ea6991b0081e"
] | [
"layers/BBB_MCMF_LRT/BBBLinear.py"
] | [
"import sys\nsys.path.append(\"..\")\n\nimport math\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn import Parameter\n\nimport utils\nfrom metrics import calculate_kl as KL_DIV\nimport config_bayesian as cfg\nfrom ..misc import ModuleWrapper\n\n\nclass BBBLinear(ModuleWrapper):\... | [
[
"torch.sqrt",
"torch.nn.functional.linear",
"torch.cuda.is_available",
"torch.Tensor",
"torch.exp"
]
] |
Jinaz/Py_datascraping | [
"e3f1f8819fe98b257cba356b7378cb6cf90b5d62"
] | [
"key_bot/imageFunctions/AmbrosioTortorelliMinimizer.py"
] | [
"# Jacob Gildenblat, 2015\n# Implementation of edge preserving smoothing by minimizing with the Ambrosio-Tortorelli appoach\n# AM scheme, using conjugate gradients\nimport cv2, scipy\nimport numpy as np\nimport sys\nimport scipy\nfrom scipy.sparse.linalg import LinearOperator\n\n\nclass AmbrosioTortorelliMinimizer(... | [
[
"numpy.max",
"numpy.uint8",
"numpy.array",
"numpy.zeros",
"numpy.ones",
"scipy.sparse.linalg.LinearOperator",
"scipy.sparse.linalg.cg",
"numpy.float64",
"numpy.multiply",
"numpy.power",
"numpy.maximum"
]
] |
talesa/botorch | [
"ab04dd39a2d4c7734e41c5f26eb2dbba5b0e1771"
] | [
"botorch/utils/multi_objective/box_decompositions/box_decomposition.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Meta Platforms, Inc. and 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\nr\"\"\"Box decomposition algorithms.\n\nReferences\n\n.. [Lacour17]\n R. Lacour, K. Klamroth, C. Fonsec... | [
[
"torch.zeros",
"torch.cat",
"torch.argsort",
"torch.tensor",
"torch.equal"
]
] |
dbl007/learning_internal_representations | [
"679b05313670e83a5a9e97e5d58b15ba079b84f5"
] | [
"nb_utils.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\n\n\ndef load_planar_dataset():\n np.random.seed(2)\n m = 400 # number of examples\n N = int(m/2) # number of points per class\n D = 2 # dimensionality\n X = np.zeros((m,D)) # data matrix where each row is a single example\n Y = np.zeros((m,1), ... | [
[
"numpy.sin",
"matplotlib.pyplot.contourf",
"numpy.zeros",
"numpy.random.seed",
"matplotlib.pyplot.xlabel",
"numpy.random.randn",
"numpy.arange",
"matplotlib.pyplot.ylabel",
"numpy.cos",
"matplotlib.pyplot.scatter",
"numpy.linspace"
]
] |
t-web/bert_seq2seq | [
"01a0ad8f255b4b9343b4727cdd437629225d206f"
] | [
"examples/math_ques_train.py"
] | [
"## seq2seq 做数学题\nimport torch \nfrom tqdm import tqdm\nimport torch.nn as nn \nfrom torch.optim import Adam\nimport numpy as np\nimport os\nimport json\nimport time\nimport glob\nimport bert_seq2seq\nfrom torch.utils.data import Dataset, DataLoader\nfrom bert_seq2seq.tokenizer import Tokenizer, load_chinese_base_v... | [
[
"torch.cuda.is_available",
"torch.optim.Adam",
"torch.tensor",
"torch.utils.data.DataLoader"
]
] |
CrazyVertigo/imgaug | [
"bc8c9e430738e7ae17054d6e10f29a7f5404cef4"
] | [
"imgaug/augmentables/lines.py"
] | [
"\"\"\"Classes representing lines.\"\"\"\nfrom __future__ import print_function, division, absolute_import\n\nimport copy as copylib\n\nimport numpy as np\nimport skimage.draw\nimport skimage.measure\nimport cv2\n\nfrom .. import imgaug as ia\nfrom .base import IAugmentable\nfrom .utils import (normalize_shape, pro... | [
[
"numpy.max",
"numpy.concatenate",
"numpy.array",
"numpy.dstack",
"numpy.zeros",
"numpy.round",
"numpy.sum",
"numpy.copy",
"numpy.ones",
"numpy.tile",
"numpy.min",
"numpy.logical_and",
"numpy.any",
"numpy.float32",
"numpy.atleast_3d",
"numpy.all"
]
... |
saulshanabrook/tutorials | [
"030a8e8faf417725d7b81371e923d5723fba6bea",
"030a8e8faf417725d7b81371e923d5723fba6bea"
] | [
"intermediate_source/memory_format_tutorial.py",
"beginner_source/basics/tensorqs_tutorial.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n(beta) Channels Last Memory Format in PyTorch\n*******************************************************\n**Author**: `Vitaly Fedyunin <https://github.com/VitalyFedyunin>`_\n\nWhat is Channels Last\n---------------------\n\nChannels last memory format is an alternative way of orderin... | [
[
"torch.backends.cudnn.version",
"torch.randint",
"torch.cuda.is_available",
"torch.nn.Conv2d",
"torch.empty",
"torch.empty_like"
],
[
"torch.zeros",
"torch.rand",
"numpy.array",
"torch.cat",
"torch.mul",
"torch.rand_like",
"numpy.add",
"numpy.ones",
... |
soumickmj/torchio | [
"5ec12c7ea9bf9cfd70e17e90fcc03621272cef9c"
] | [
"torchio/transforms/augmentation/intensity/random_swap.py"
] | [
"from typing import Optional, Tuple, Union, List\nimport torch\nimport numpy as np\nfrom ....data.subject import Subject\nfrom ....utils import to_tuple\nfrom ....torchio import DATA, TypeTuple, TypeData, TypeTripletInt\nfrom ... import IntensityTransform\nfrom .. import RandomTransform\n\n\nclass RandomSwap(Random... | [
[
"numpy.all",
"numpy.array",
"torch.randint"
]
] |
negreskul/Ichimoku_indicator | [
"7dec0346717058346e7bfcdfd6c431d351abde3e"
] | [
"random_forest.py"
] | [
"import numpy as np\nimport pandas as pd\nimport math\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.ensemble import RandomForestRegressor\nfrom sklearn.metrics import mean_absolute_error, r2_score\n\ndf = pd.read_csv('CryptoCoinClose.csv')\n\n#df.drop( ['BNB'], axis = 1)\n\nfeatures = ['BTC', ... | [
[
"sklearn.model_selection.train_test_split",
"pandas.read_csv",
"sklearn.ensemble.RandomForestRegressor",
"sklearn.metrics.mean_absolute_error"
]
] |
zyq5945/dopamine | [
"98e9946e73328b40d2133db16f66bffcfe720197"
] | [
"examples/cifar100_dopamine.py"
] | [
"import tensorflow as tf\nfrom tensorflow.keras import datasets, layers, optimizers, Sequential, metrics\nfrom tensorflow import keras\nimport os\nimport numpy as np\n\nimport sys\n\nsys.path.append(\"../src\")\nfrom dopamine import Dopamine, dopamine\n\nassert tf.__version__.startswith('2.')\n\ntf.random.set_seed(... | [
[
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.random.set_seed",
"numpy.random.seed",
"tensorflow.keras.layers.Flatten",
"tensorflow.keras.layers.MaxPool2D",
"tensorflow.__version__.startswith",
"tensorflow.keras.datasets.cifar100.load_data",
"tensorflow.keras.layers.Con... |
hongkai-dai/neural-network-lyapunov-1 | [
"9e5db1c7f91b42df729026c9aa8575bc126f66b6",
"9e5db1c7f91b42df729026c9aa8575bc126f66b6"
] | [
"neural_network_lyapunov/examples/quadrotor2d/test/test_quadrotor_2d.py",
"neural_network_lyapunov/examples/tinydiffsim/learn_ca_dyn.py"
] | [
"import neural_network_lyapunov.examples.quadrotor2d.quadrotor_2d as\\\n quadrotor_2d\n\nimport unittest\nimport numpy as np\nimport torch\nimport scipy.integrate\n\n\nclass TestQuadrotor2D(unittest.TestCase):\n def test_dynamics_equilibrium(self):\n plant = quadrotor_2d.Quadrotor2D(torch.float64)\n ... | [
[
"numpy.testing.assert_allclose",
"numpy.array",
"numpy.zeros",
"torch.tensor",
"numpy.diag"
],
[
"torch.cat",
"torch.save",
"torch.tensor",
"torch.load",
"torch.utils.data.TensorDataset"
]
] |
mahirchowatriis/ObjectDetectionTest | [
"0e006859b60c7d6aec320c4ba420ae6d3a53b858"
] | [
"detect_video.py"
] | [
"import time\r\nimport tensorflow as tf\r\nphysical_devices = tf.config.experimental.list_physical_devices('GPU')\r\nif len(physical_devices) > 0:\r\n tf.config.experimental.set_memory_growth(physical_devices[0], True)\r\nfrom absl import app, flags, logging\r\nfrom absl.flags import FLAGS\r\nimport core.utils a... | [
[
"tensorflow.shape",
"numpy.asarray",
"tensorflow.compat.v1.ConfigProto",
"tensorflow.compat.v1.InteractiveSession",
"tensorflow.config.experimental.set_memory_growth",
"tensorflow.lite.Interpreter",
"tensorflow.constant",
"tensorflow.config.experimental.list_physical_devices",
... |
zhengwsh/text-matching | [
"7c3ec2cfd2fd2d7a7439f175c914c0c4d84559f5"
] | [
"src/SentenceMatchModelGraph.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport tensorflow as tf\nimport layer_utils\nimport match_utils\n\n\nclass SentenceMatchModelGraph(object):\n \"\"\"\n Create Natural Language Sentence Matching Models.\n -- sentence-sentence pairs\n -- question-answer pairs\n -- premise-hypothesis pairs\n \... | [
[
"tensorflow.nn.in_top_k",
"tensorflow.group",
"tensorflow.matmul",
"tensorflow.reshape",
"tensorflow.nn.embedding_lookup",
"tensorflow.nn.softmax",
"tensorflow.one_hot",
"tensorflow.cast",
"tensorflow.nn.softmax_cross_entropy_with_logits_v2",
"tensorflow.trainable_variables... |
Raghibshams456/whatlies | [
"07c04dbc5b7e7e6ebff24183b286a2dc8dfba11b"
] | [
"whatlies/language/gensim_lang.py"
] | [
"import warnings\n\nimport numpy as np\nfrom typing import Union, List\nfrom sklearn.metrics import pairwise_distances\nfrom gensim.models import KeyedVectors\n\n\nfrom whatlies.embedding import Embedding\nfrom whatlies.embeddingset import EmbeddingSet\nfrom whatlies.language.common import SklearnTransformerMixin\n... | [
[
"numpy.array",
"numpy.isnan",
"numpy.zeros"
]
] |
mahalakshmi90594/KPIECE | [
"e1d2af3a6bb0e4fef8ce28ce5b17cf14474b7d2f"
] | [
"collision.py"
] | [
"from abc import ABC, abstractmethod\n\nimport numpy as np\n\n\nclass CollisionObject(ABC):\n @abstractmethod\n def isCollision(self, target):\n pass\n\n\nclass CollisionBox(CollisionObject):\n def __init__(self, location, lengths):\n self.location = np.asarray(location)\n self.lengths... | [
[
"numpy.all",
"numpy.asarray"
]
] |
CharelBIT/mmsegmentation-3D-v2.0 | [
"f794df0ca8452805ff4072ad3ec3b109dd2d842e"
] | [
"mmseg/models/backbones/ResNetMedic3D.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nimport math\nfrom mmcv.runner import load_checkpoint\nfrom mmseg.utils import get_root_logger\nfrom functools import partial\nfrom ..builder import BACKBONES\n__all__ = [\n 'resnet103D', 'resnet183D', 'res... | [
[
"torch.nn.functional.avg_pool3d",
"torch.cat",
"torch.nn.Sequential",
"torch.nn.MaxPool3d",
"torch.nn.init.kaiming_normal",
"torch.nn.ReLU",
"torch.nn.Conv3d",
"torch.nn.BatchNorm3d"
]
] |
morganb-phys/galpy | [
"83caa79c0135ee40cc13faefa7c4e50a139eb61c"
] | [
"tests/test_coords.py"
] | [
"from __future__ import print_function, division\nimport numpy\nfrom galpy.util import coords\nimport pytest\nimport astropy\n_APY3= astropy.__version__ > '3'\n\ndef test_radec_to_lb_ngp():\n _turn_off_apy()\n # Test that the NGP is at b=90\n ra, dec= 192.25, 27.4\n lb= coords.radec_to_lb(ra,dec,degree=... | [
[
"numpy.array",
"numpy.arccos",
"numpy.empty",
"numpy.trace",
"numpy.sin",
"numpy.arcsin",
"numpy.ones",
"numpy.tan",
"numpy.linalg.det",
"numpy.arccosh",
"numpy.fabs",
"numpy.arctan",
"numpy.arange",
"numpy.sqrt",
"numpy.cos",
"numpy.hstack"
]
] |
yihangHKU/mpc.pytorch | [
"3e01204cedd7a383ef10857399847f7f97cd5f57"
] | [
"mpc/env_dx/Gemini_flight_dynamics.py"
] | [
"import torch\nimport numpy as np\n# import bagread\n# import matplotlib.pyplot as plt\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport time\nfrom ..util import get_data_maybe\n\n\nNUM_HISTORY = 2\nNUM_INPUTS = (NUM_HISTORY + 1) * 13\nNUM_OUTPUTS = 18\nNUM_HIDDEN_UNITS = 200\nNUM_HIDDEN_LAYERS = 2\n#... | [
[
"torch.nn.Linear",
"numpy.concatenate",
"numpy.array",
"torch.nn.ModuleList",
"numpy.zeros",
"numpy.ones",
"torch.from_numpy",
"numpy.eye",
"torch.nn.BatchNorm1d",
"torch.load",
"torch.chunk",
"torch.nn.functional.relu",
"numpy.expand_dims"
]
] |
DiscreteProbability/DiscreteProbability | [
"58711a7c2f448fd8a20ef386ef66f1f8bde3dd1b"
] | [
"discrete_probability/distribution/_probability_distribution.py"
] | [
"from fractions import Fraction\n\nimport operator\nimport pandas as pd\nimport numpy as np\n\nfrom abc import ABCMeta, abstractmethod\nfrom probability.concept.random_variable import RandomVariable, SetOfRandomVariable\n\n\ndef joint_distribution(series_or_dataframe):\n from probability.probability_distribution... | [
[
"numpy.isclose"
]
] |
weiwang2330/deepchem | [
"facf18b32587140962f874be3a652c04f4cf8f58"
] | [
"deepchem/trans/transformers.py"
] | [
"# coding=utf-8\n\"\"\"\nContains an abstract base class that supports data transformations.\n\"\"\"\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport os\n\nimport numpy as np\nimport scipy\nimport scipy.ndimage\nimport time\nimport deepchem a... | [
[
"numpy.ones_like",
"numpy.exp",
"scipy.misc.imresize",
"numpy.sign",
"tensorflow.stack",
"tensorflow.nn.embedding_lookup",
"scipy.ndimage.imread",
"tensorflow.gather",
"tensorflow.cast",
"numpy.concatenate",
"tensorflow.square",
"numpy.zeros_like",
"numpy.count_... |
pirtleshell/algorithms | [
"75a78618d0de089ce2864da7442fd25453c3abb9"
] | [
"peak_finding/one_dimensional.py"
] | [
"# find a peak (any peak) if it exists.\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nNUM_POINTS = 51\n\n\n# make random data the same for all instances\nnp.random.seed(0)\n\ndef build_peak_in_middle_data():\n peak = np.floor(NUM_POINTS/2)\n right = 2*peak - NUM_POINTS\n uphill = np.arange(0, p... | [
[
"numpy.concatenate",
"numpy.random.seed",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.figtext",
"numpy.arange",
"numpy.random.randint",
"numpy.ndarray.flatten",
"matplotlib.pyplot.show",
"numpy.floor"
]
] |
crhaithcock/RushHour | [
"9c1854dd117e43ec38a6eacf74a8365a6e01f25c"
] | [
"RHGraph/generators/experiments001.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Sep 23 19:45:18 2019\n\n@author: CHaithcock\n\"\"\"\n\nimport sys\nsys.path.insert(1, 'C:/Users/chaithcock/Documents/repos/RushHour/RHGraph')\n\nimport itertools\nimport numpy as np\n\nimport RHGeneratorConstants as gen\nimport RHState\n\nc = 5\nt = 2\n\nc1 = np.aran... | [
[
"numpy.all",
"numpy.array",
"numpy.dot",
"numpy.arange"
]
] |
olivercoad/cookies-n-code | [
"d6aeb6ab779ff22a576c665b3aa4529a44babc95"
] | [
"code-review_archive/2017--2018/2018_05_25/all_examples.py"
] | [
"#!/usr/bin/env python\n\nfrom __future__ import print_function\n\nimport os\nimport random\nimport numpy as np\n\nfrom mpi4py import MPI\n\ncomm = MPI.COMM_WORLD # Communicator for the processes.\nrank = comm.Get_rank() # What number process is this one?\nsize = comm.Get_size() # How many processes in total are... | [
[
"numpy.zeros_like",
"numpy.empty",
"numpy.savetxt",
"numpy.mean",
"numpy.loadtxt",
"numpy.arange"
]
] |
shintaro-iwasaki/pytorch | [
"d35fc409ad84c1a837e7e07ffe3f4e4942538e50"
] | [
"test/test_datapipe.py"
] | [
"# Owner(s): [\"module: dataloader\"]\n\nimport copy\nimport http.server\nimport itertools\nimport os\nimport os.path\nimport pickle\nimport random\nimport socketserver\nimport sys\nimport tarfile\nimport tempfile\nimport threading\nimport time\nimport unittest\nimport warnings\nimport zipfile\nfrom functools impor... | [
[
"numpy.load",
"torch.utils.data.datapipes.iter.Mapper",
"torch.utils.data.datapipes.map.Shuffler",
"torch.utils.data.datapipes.iter.Concater",
"torch.utils.data.graph.traverse",
"torch.utils.data.datapipes.iter.StreamReader",
"torch.utils.data.datapipes.map.Concater",
"torch.utils.... |
th-nuernberg/fe-relation-extraction-natl21 | [
"e74e29020190bdcf7badff73ccdcb642d7f9d7a3"
] | [
"bert-pair/code/fewshot_re_kit/framework.py"
] | [
"import os\nimport sklearn.metrics\nimport numpy as np\nimport sys\nimport time\nfrom . import sentence_encoder\nfrom . import data_loader\nimport torch\nfrom torch import autograd, optim, nn\nfrom torch.autograd import Variable\nfrom torch.nn import functional as F\n# from pytorch_pretrained_bert import BertAdam\n... | [
[
"torch.zeros",
"torch.cat",
"torch.__version__.split",
"torch.optim.lr_scheduler.StepLR",
"torch.no_grad",
"torch.nn.Module.__init__",
"torch.ones",
"torch.cuda.is_available",
"torch.load",
"torch.nn.CrossEntropyLoss",
"torch.nn.DataParallel"
]
] |
sazas/football | [
"a762fdedf7367ef08cb3a4c6b44713b93aa69d37"
] | [
"agents/ppo2.py"
] | [
"import os\nimport collections\nimport gym\nimport numpy as np\nimport joblib\nimport tensorflow.compat.v1 as tf\nimport sonnet as snt\nfrom baselines.common.input import observation_placeholder, encode_observation\nfrom baselines.common.policies import PolicyWithValue\nfrom gfootball.env import football_action_set... | [
[
"numpy.concatenate",
"tensorflow.compat.v1.train.Saver",
"tensorflow.compat.v1.ConfigProto",
"tensorflow.compat.v1.nn.pool",
"tensorflow.compat.v1.variable_scope",
"tensorflow.compat.v1.Session",
"tensorflow.compat.v1.to_float",
"tensorflow.compat.v1.nn.relu",
"tensorflow.compa... |
ahmedo42/tardis | [
"e86ade324d94000a206742b12bc8d04d6c200ba2"
] | [
"tardis/montecarlo/montecarlo_numba/tests/test_numba_interface.py"
] | [
"import pytest\nimport tardis.montecarlo.montecarlo_numba.numba_interface as numba_interface\nimport numpy.testing as npt\nimport numpy as np\n\n\n@pytest.mark.parametrize(\n [\"current_shell_id\", \"nu\"],\n [(0, 0.6), (1, 0.4)]\n ) \ndef test_coninuum_opacities(\n verysimple_continuum, curren... | [
[
"numpy.testing.assert_allclose",
"numpy.array",
"numpy.zeros",
"numpy.testing.assert_array_equal"
]
] |
bchampp/scylla | [
"6ec27877cc03c200a874cd0eb25a36c866471250"
] | [
"src/qcar_perception/src/utils/augmentations.py"
] | [
"# YOLOv5 🚀 by Ultralytics, GPL-3.0 license\n\"\"\"\nImage augmentation functions\n\"\"\"\n\nimport math\nimport random\n\nimport cv2\nimport numpy as np\n\nfrom utils.general import LOGGER, check_version, colorstr, resample_segments, segment2box\nfrom utils.metrics import bbox_ioa\n\n\nclass Albumentations:\n ... | [
[
"numpy.concatenate",
"numpy.clip",
"numpy.array",
"numpy.zeros",
"numpy.ones",
"numpy.eye",
"numpy.random.beta",
"numpy.random.uniform",
"numpy.arange",
"numpy.append",
"numpy.mod",
"numpy.maximum"
]
] |
TUM-E21-ThinFilms/skipi | [
"5c45cb66b1eaba9ee4609ef794150ef3ba6e96a3"
] | [
"skipi/fourier.py"
] | [
"import numpy\n\nfrom scipy.integrate import trapz\n\nfrom skipi.function import Function, evaluate\nfrom skipi.domain import Domain\n\nclass FourierTransform(Function):\n @classmethod\n def to_function(cls, domain, feval, frequency_domain):\n #TODO: frequency_domain as Domain?\n\n #domain = Dom... | [
[
"numpy.array",
"numpy.dot",
"numpy.exp"
]
] |
mgrover1/so-co2-airborne-obs | [
"254945a4fcad7817cc0874e5ff53fb692daabadf"
] | [
"so-co2-airborne-obs/obs_surface.py"
] | [
"import os\nimport sys\nimport yaml\nimport warnings\n\nimport cftime\nimport calendar \n\nimport numpy as np\nimport pandas as pd\nimport xarray as xr\n\nimport matplotlib.pyplot as plt\n\nimport util\n\nstart_date = '1998-12-01'\nend_date = '2020-03-01'\n\nsouthern_ocean_stn_list = ['CRZ', 'MQA', 'DRP', 'PSA', 'S... | [
[
"pandas.to_datetime",
"numpy.append",
"numpy.array",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.suptitle",
"matplotlib.pyplot.figure",
"numpy.where",
"numpy.sqrt",
"numpy.argsort",
"matplotlib.pyplot.show",
"pandas.read_csv",
"numpy.da... |
DLPerf/neurite | [
"e335babea066cd3b0262542c1478f0112aecfb6b"
] | [
"neurite/py/dataproc.py"
] | [
"''' data processing for neuron project '''\n\n# built-in\nimport sys\nimport os\nimport shutil\nimport six\n\n# third party\nimport nibabel as nib\nimport numpy as np\nimport scipy.ndimage.interpolation\nfrom tqdm import tqdm_notebook as tqdm # for verbosity for forloops\nimport matplotlib.pyplot as plt\n\n# note... | [
[
"numpy.set_printoptions",
"numpy.load",
"numpy.min",
"numpy.multiply",
"numpy.where",
"numpy.cumsum",
"numpy.divide",
"numpy.max",
"numpy.log",
"matplotlib.pyplot.subplots",
"numpy.savez_compressed",
"numpy.ndim",
"numpy.expand_dims",
"numpy.array",
"num... |
calculusrobotics/RNNs-for-Bayesian-State-Estimation | [
"63a9045eba7746d28828323f95526234951a5df9"
] | [
"Blender 2.91/2.91/scripts/addons/io_scene_gltf2/blender/imp/gltf2_blender_mesh.py"
] | [
"# Copyright 2018-2019 The glTF-Blender-IO authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app... | [
[
"numpy.divide",
"numpy.full",
"numpy.array",
"numpy.linalg.norm",
"numpy.empty",
"numpy.concatenate",
"numpy.zeros",
"numpy.logical_or",
"numpy.sum",
"numpy.trunc",
"numpy.where",
"numpy.arange",
"numpy.power",
"numpy.repeat",
"numpy.dtype",
"numpy.u... |
victorromeo/tensorflow | [
"a1e5d73663152b0d7f0d9661e5d602b442acddba"
] | [
"tensorflow/compiler/mlir/tfr/python/tfr_gen.py"
] | [
"# Copyright 2020 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.autograph.pyct.qual_names.QN",
"tensorflow.compiler.mlir.tfr.tfr_wrapper.verify",
"tensorflow.python.autograph.pyct.qual_names.resolve",
"tensorflow.python.autograph.converters.control_flow.transform",
"tensorflow.python.autograph.pyct.anno.Basic.ORIGIN.of",
"tensorflow.... |
altaris/noisy-moo | [
"86fd5972c8bf9216357cca3abaa0268ff04b1cc0",
"86fd5972c8bf9216357cca3abaa0268ff04b1cc0"
] | [
"nmoo/delayer.py",
"nmoo/benchmark.py"
] | [
"\"\"\"\nA problem that incurs a constant delay at each `_evaluate` call.\n\"\"\"\n__docformat__ = \"google\"\n\nfrom time import sleep\n\nfrom pymoo.core.problem import Problem\nimport numpy as np\n\nfrom .wrapped_problem import WrappedProblem\n\n\nclass Delayer(WrappedProblem):\n \"\"\"\n A problem that sle... | [
[
"numpy.full"
],
[
"numpy.concatenate",
"pandas.DataFrame",
"pandas.to_timedelta",
"numpy.load",
"pandas.concat",
"pandas.read_csv"
]
] |
JasonTam/tophat | [
"ab0fc93f9caa319698db00de1586012f4049d7c1"
] | [
"tophat/tasks/d2v.py"
] | [
"# TODO: needs to be standardized with BaseTask\n\nimport pandas as pd\nimport numpy as np\nimport os\nfrom tophat.constants import SEED\nfrom config.common import *\n\nfrom gensim.models.doc2vec import TaggedDocument, FAST_VERSION\nfrom gensim.models import Doc2Vec\n\nimport fastavro as avro\nimport itertools as i... | [
[
"pandas.Index"
]
] |
jmrichardson/pyts | [
"b48cf2d6f50ee91b75c7340544eb906783132e1b",
"b48cf2d6f50ee91b75c7340544eb906783132e1b"
] | [
"pyts/metrics/tests/test_lower_bounds.py",
"pyts/approximation/paa.py"
] | [
"\"\"\"Testing for Lower Bounds of Dynamic Time Warping.\"\"\"\n\nimport numpy as np\nimport pytest\nimport re\nfrom math import sqrt\n\nfrom pyts.metrics.lower_bounds import (\n _lower_bound_yi_x_y, _lower_bound_yi_X_Y, _warping_envelope, _clip\n)\nfrom pyts.metrics import (lower_bound_improved, lower_bound_keo... | [
[
"numpy.testing.assert_allclose",
"numpy.empty",
"numpy.asarray",
"numpy.random.RandomState",
"numpy.sum",
"numpy.testing.assert_array_equal",
"sklearn.metrics.pairwise_distances",
"numpy.testing.assert_array_less",
"numpy.sqrt"
],
[
"sklearn.utils.validation.check_array... |
SWARTHYPEARL/labelImg_DICOM | [
"6aebe9b659d917df32ee68340fd5c2a7da1f85a5"
] | [
"libs/utils.py"
] | [
"from math import sqrt\nfrom libs.ustr import ustr\nimport hashlib\nimport re\nimport sys\n\nimport numpy as np\nimport pydicom\n\ntry:\n from PyQt5.QtGui import *\n from PyQt5.QtCore import *\n from PyQt5.QtWidgets import *\nexcept ImportError:\n from PyQt4.QtGui import *\n from PyQt4.QtCore import ... | [
[
"numpy.max",
"numpy.array",
"numpy.min",
"numpy.expand_dims"
]
] |
linwangolo/ERNIE | [
"9b870cd82ec7a7916d8a94d073a758095debeb15"
] | [
"ERNIE/finetune/classifier.py"
] | [
"# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | [
[
"numpy.sum",
"numpy.dot",
"numpy.argmax",
"numpy.mean"
]
] |
elipugh/nocaps-meta | [
"c8bd3c32c8d223e0ea5457159fb0637d2cdc8116"
] | [
"updown/data/datasets.py"
] | [
"from typing import Dict, List\n\nimport numpy as np\nimport torch\nfrom torch.utils.data import Dataset\nfrom allennlp.data import Vocabulary\n\nfrom updown.config import Config\nfrom updown.data.readers import CocoCaptionsReader, ConstraintBoxesReader, ImageFeaturesReader\nfrom updown.types import (\n Training... | [
[
"torch.stack",
"torch.tensor"
]
] |
longfeili1997/DQN | [
"2e02220f554cccc116163db6223814c0dae87e85"
] | [
"core/util.py"
] | [
"import os\nimport pickle\nimport time\n\nimport matplotlib.pyplot as plt\nplt.rcParams.update({'font.size': 13})\nplt.rcParams['figure.figsize'] = 10, 8\n\ndef prRed(prt): print(\"\\033[91m {}\\033[00m\" .format(prt))\ndef prGreen(prt): print(\"\\033[92m {}\\033[00m\" .format(prt))\ndef prYellow(prt): print(\"\\03... | [
[
"matplotlib.pyplot.rcParams.update",
"matplotlib.pyplot.show",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.subplots"
]
] |
scottwedge/instacart-market-basket-analysis | [
"ca360b67d53474ea92376e7956f035ad201d33c8"
] | [
"lda/lda_search.py"
] | [
"from constants import LDA_DIR, FEAT_DATA_DIR\nfrom utils import series_to_str\n\nimport pickle\nimport pandas as pd\nfrom time import time\n\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.decomposition import LatentDirichletAllocation\n\n#n_topics = [20, 50, 100]\n#n_topics = [10, 30, 5... | [
[
"sklearn.decomposition.LatentDirichletAllocation"
]
] |
ideaflow/mmskeleton | [
"b719b0e40cda11245bcd7cb10fcb0f1fa9f60b56"
] | [
"tools/data_processing/ntu_gendata.py"
] | [
"import os\nimport sys\nimport pickle\n\nimport argparse\nimport numpy as np\nfrom numpy.lib.format import open_memmap\n\ntraining_subjects = [\n 1, 2, 4, 5, 8, 9, 13, 14, 15, 16, 17, 18, 19, 25, 27, 28, 31, 34, 35, 38\n]\ntraining_cameras = [2, 3]\nmax_body = 2\nnum_joint = 25\nmax_frame = 300\ntoolbar_width = ... | [
[
"numpy.zeros"
]
] |
MAE-M/PotentiallyInactiveCpeAnalysisTool | [
"58f897fb45437ff72a6db4d490f364061d779c50"
] | [
"src/cpePaser/extract_data.py"
] | [
"# Copyright (c) 2020 Huawei Technologies Co., Ltd.\n# foss@huawei.com\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#\... | [
[
"pandas.to_datetime",
"pandas.DataFrame",
"pandas.read_csv"
]
] |
bencebecsy/libstempo | [
"f68f3a82a6cd8c087cf7e87d4e672373c434d900"
] | [
"libstempo/plot.py"
] | [
"import math\nimport types\n\nimport matplotlib.pyplot as P\nimport numpy as N\n\n\ndef plotres(psr, deleted=False, group=None, **kwargs):\n \"\"\"Plot residuals, compute unweighted rms residual.\"\"\"\n\n res, t, errs = psr.residuals(), psr.toas(), psr.toaerrs\n\n if (not deleted) and N.any(psr.deleted !=... | [
[
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.errorbar",
"scipy.ndimage.filters.gaussian_filter",
"numpy.min",
"numpy.mean",
"matplotlib.pyplot.ishold",
"numpy.cumsum",
"matplotlib.pyplot.minorticks_on",
"matplotlib.pyplot.hold",
"numpy.max",
"numpy.vectorize",
"matp... |
vinny1575/yolo3-wound | [
"e267e680420e29cba847190f166d6937e1a2f1fd"
] | [
"train.py"
] | [
"\"\"\"\nRetrain the YOLO model for your own dataset.\n\"\"\"\n\nimport numpy as np\nimport keras.backend as K\nfrom keras.layers import Input, Lambda\nfrom keras.models import Model\nfrom keras.optimizers import Adam\nfrom keras.callbacks import TensorBoard, ModelCheckpoint, ReduceLROnPlateau, EarlyStopping\n\nfro... | [
[
"numpy.random.seed",
"numpy.array",
"numpy.zeros",
"numpy.random.shuffle"
]
] |
grei-ufc/MyGrid | [
"c42fe9d4e0838f253dd5b0716cbf0c892136d931"
] | [
"mygrid/short_circuit/phase_components.py"
] | [
"import numpy as np\nimport copy\nfrom mygrid.grid import Section,TransformerModel, Auto_TransformerModel\nimport pandas as pd\n\"\"\"\nThis scripts allows the user to calculate the unbalanced short-circuits on radial distribution\nsystems modeled on mygrid.\n\n\"\"\"\n\n\ndef biphasic(distgrid, node_name, fs='High... | [
[
"numpy.array",
"numpy.zeros",
"pandas.DataFrame",
"numpy.sum",
"numpy.all",
"numpy.linalg.inv"
]
] |
zebrabug/tensortrade | [
"fe61d591cf7c76af7e1257a832ead9d68c6e590f"
] | [
"tensortrade/env/default/renderers.py"
] | [
"# Copyright 2020 The TensorTrade 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 applicable l... | [
[
"numpy.array",
"matplotlib.style.use",
"pandas.DataFrame.from_dict",
"pandas.DataFrame",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.pause",
"matplotlib.pyplot.subplot2grid",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots_adjust",
"pandas.plotting.register_matplot... |
sai-krishna-msk/xai | [
"1d2e9272e1feeac9bd08e7033b53e42f9f69eae0"
] | [
"xai/__init__.py"
] | [
"import pandas as pd\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom scipy.stats import spearmanr as sr\nfrom scipy.cluster import hierarchy as hc\nfrom typing import List, Any, Union, Tuple, Optional, Dict\nimport random, math\n# TODO: Remove Dependencies, starting with Sklearn\nfrom sklearn.metrics imp... | [
[
"sklearn.metrics.confusion_matrix",
"matplotlib.pyplot.text",
"matplotlib.pyplot.xlim",
"matplotlib.pyplot.cm.get_cmap",
"matplotlib.pyplot.xticks",
"numpy.full",
"matplotlib.pyplot.colorbar",
"pandas.DataFrame",
"matplotlib.pyplot.get_cmap",
"numpy.arange",
"matplotlib... |
humandotlearning/line_segment_angle_detector | [
"33cd8949d9c34a7b83a64923d844db8e336e5b58"
] | [
"main.py"
] | [
"import cv2\nimport argparse\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport time\n\n# all function for detecting line segment and angle\nfrom angleDetector import angleDetector\n\ndef main(img_path ):\n start_time = time.time()\n try: \n img = cv2.imread(img_path, 0 )\n h,w = img.s... | [
[
"numpy.concatenate",
"numpy.ones"
]
] |
mathemusician/sparseml | [
"fa8f69180963ea4e49fabc1033ba9f91421493fa"
] | [
"src/sparseml/pytorch/utils/exporter.py"
] | [
"# Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Un... | [
[
"torch.save",
"torch.no_grad",
"torch.onnx.export",
"torch.load",
"numpy.all"
]
] |
kuny1240/Thesis_Project | [
"cf0fb392f673c60fa1d229cc7e09936bb29c51af"
] | [
"Simulator.py"
] | [
"import tensorflow as tf\nimport numpy as np\nimport pandas as pd\nimport pickle\nimport random\nimport os\n\nclass Simulator(object):\n def __init__(self):\n # Model Load\n self.cur_path = os.path.abspath(os.path.curdir)\n self.kpi_model = tf.keras.models.load_model(self.cur_path + '/Models... | [
[
"tensorflow.keras.models.load_model",
"numpy.array",
"numpy.zeros",
"pandas.read_csv"
]
] |
tum-pbs/Global-Flow-Transport | [
"bae04d4deb8636417f1d1ed6caa41d27be7060cb"
] | [
"phitest/render/transform.py"
] | [
"import copy\r\nimport numpy as np\r\nfrom scipy.spatial.transform import Rotation\r\nfrom .serialization import to_dict, from_dict\r\n\r\nfrom .vector import *\r\n\r\nclass MatrixTransform(object):\r\n\tdef __init__(self, transform_matrix=None, parent=None, grid_size=None, static=False):\r\n\t\tif transform_matrix... | [
[
"numpy.max",
"numpy.pad",
"numpy.linalg.norm",
"numpy.asarray",
"numpy.min",
"scipy.spatial.transform.Rotation.from_euler"
]
] |
tcvrick/COMP551-IMDB-Competition | [
"64f83142c86e895db3a0ca037c31efb404910723"
] | [
"project_src/deep_learning/pytorch_openai_transformer/datasets.py"
] | [
"import re\nimport html\nimport pandas as pd\nre1 = re.compile(r' +')\n\n\ndef imdb(fold_id: int, split_size: int):\n df = pd.read_pickle('df_train.pkl')\n df = df.reindex(columns=['sentiment', 'text'])\n df['text'] = df['text'].apply(fixup)\n\n # Split the data into k-folds.\n df_val = df[split_siz... | [
[
"pandas.read_pickle",
"pandas.concat"
]
] |
jihyunbak/ORnetwork | [
"99d98fbb904bcbb92f411706bfb511a31b6d7bb4"
] | [
"Code_Py/aux.py"
] | [
"# aux.py\n# auxiliary functions\n\n# Copyright 2019 Ji Hyun Bak\n\nimport numpy as np\nimport pandas as pd\n\n# for stat\nfrom scipy.sparse import coo_matrix\nfrom scipy import stats\n\n# for io\nimport csv\n\n# for plot\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\n# === ds: custom data structure ... | [
[
"scipy.sparse.coo_matrix",
"numpy.array",
"numpy.matrix",
"numpy.sum",
"numpy.true_divide",
"pandas.DataFrame",
"matplotlib.pyplot.savefig",
"numpy.mean",
"matplotlib.pyplot.subplots",
"numpy.size",
"matplotlib.pyplot.show",
"scipy.stats.chi2.cdf",
"numpy.unique... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.