repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
Iuiu1234/pipelines | [
"1e032f550ce23cd40bfb6827b995248537b07d08",
"1e032f550ce23cd40bfb6827b995248537b07d08"
] | [
"components/contrib/_converters/KerasModelHdf5/to_TensorflowSavedModel/component.py",
"samples/contrib/pytorch-samples/cifar10/cifar10_pre_process.py"
] | [
"from kfp.components import create_component_from_func, InputPath, OutputPath\n\ndef keras_convert_hdf5_model_to_tf_saved_model(\n model_path: InputPath('KerasModelHdf5'),\n converted_model_path: OutputPath('TensorflowSavedModel'),\n):\n '''Converts Keras HDF5 model to Tensorflow SavedModel format.\n\n ... | [
[
"tensorflow.keras.models.load_model",
"tensorflow.keras.models.save_model"
],
[
"numpy.array",
"sklearn.model_selection.train_test_split",
"numpy.unique"
]
] |
PayneLab/cptac | [
"531ec27a618270a2405bf876443fa58d0362b3c2"
] | [
"cptac/pancan/file_download.py"
] | [
"# Copyright 2018 Samuel Payne sam_payne@byu.edu\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by app... | [
[
"pandas.DataFrame"
]
] |
DhenryD/CrowdCount-mcnn | [
"a44bcbfd25ca681f7b57e2f92f10b06f602dd93f"
] | [
"src/models.py"
] | [
"import torch\nimport torch.nn as nn\nfrom src.network import Conv2d\n\n\nclass MCNN(nn.Module):\n\n def __init__(self, bn=False):\n super(MCNN, self).__init__()\n\n self.branch1 = nn.Sequential(Conv2d(1, 16, 9, same_padding=True, bn=bn),\n nn.MaxPool2d(2),\n ... | [
[
"torch.nn.MaxPool2d",
"torch.cat"
]
] |
kymotsujason/crossybot | [
"68f585ee21b68394e1b09a63f39f8d2b54ac5f0c"
] | [
"main.py"
] | [
"import cv2\nfrom PIL import ImageGrab\nimport numpy as np\n\n\ndef main():\n while True:\n # bbox specifies specific region (bbox= x,y,width,height)\n img = ImageGrab.grab(bbox=(0, 40, 1075, 640))\n vanilla = img_np = np.array(img)\n img_np = np.array(img)\n gray = cv2.cvtColo... | [
[
"numpy.array"
]
] |
kimhyuns91/bird_call | [
"eea20c6e305a2ac322a94f90075d489742e7295c"
] | [
"import_and_model.py"
] | [
"import pandas as pd\nimport numpy as np\nimport wave\nfrom scipy.io import wavfile\nimport os\nimport librosa\nimport pydub\nimport ffmpeg\nfrom librosa.feature import melspectrogram\nimport warnings\nfrom sklearn.utils import shuffle\nfrom sklearn.utils import class_weight\nfrom PIL import Image\nimport sklearn\n... | [
[
"tensorflow.keras.callbacks.ModelCheckpoint",
"pandas.read_csv",
"tensorflow.keras.preprocessing.image.ImageDataGenerator",
"numpy.asarray",
"tensorflow.keras.callbacks.ReduceLROnPlateau",
"pandas.DataFrame",
"numpy.argmax",
"numpy.array",
"tensorflow.keras.callbacks.EarlyStopp... |
maximumSHOT-HSE/CurriculumLearning | [
"bf5291812a9ec3feb083d3d84b579329781c8a6a"
] | [
"src/cluster/sort_dataset_by_column/test.py"
] | [
"import argparse\r\nimport datasets\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\n\r\ndef parse_args():\r\n parser = argparse.ArgumentParser()\r\n parser.add_argument('--input', type=str, required=True, help='Path to the directory with input dataset')\r\n return parser.parse_args()\r\n\r\... | [
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.cla",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.clf",
"numpy.array"
]
] |
xiaolao/PaddleOCR | [
"21b9bd63646fdca95f63062d94fd62f35cfa61cc"
] | [
"tools/infer/utility.py"
] | [
"# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"numpy.ones",
"numpy.concatenate",
"numpy.max",
"numpy.fromstring",
"numpy.array"
]
] |
HamidSajjadi/slr_query_formulation | [
"5164d7ecd1a798089df284459a451e1e3d1e20e5"
] | [
"analyze_results.py"
] | [
"import pandas as pd\nimport plotly.express as px\n\ndf = pd.read_csv('data/query_result.csv')\nmax_df = df.groupby(by='topic_id').max().reset_index()\ndf = df[df['topic_id'].isin(max_df[max_df['recall'] > 0]['topic_id'].to_list())]\nfor t in df['topic_id'].unique().tolist():\n temp_df = df[df['topic_id'] == t]\... | [
[
"pandas.read_csv"
]
] |
videetparekh/latentai-sdk-examples | [
"2104c097045105957ef7403b09b5a2c114677147"
] | [
"inference/tf_inference.py"
] | [
"# Copyright (c) 2019 by LatentAI Inc.\n# All rights reserved.\n# This file is part of the LEIP(tm) SDK,\n# and is released under the \"LatentAI Commercial Software License\".\n# Please see the LICENSE file that should have been included as part of\n# this package.\n#\n# @file tf_inference.py\n#\n# @author... | [
[
"numpy.argmax"
]
] |
cldf/cldfviz | [
"c222a735a161b61b755584f62eb1ba1c64f797c0"
] | [
"src/cldfviz/colormap.py"
] | [
"import json\nimport typing\nimport collections\n\nfrom matplotlib import cm\nfrom matplotlib.colors import Normalize, to_hex, CSS4_COLORS, BASE_COLORS\nimport matplotlib.pyplot as plt\nfrom clldutils.color import qualitative_colors, sequential_colors, rgb_as_hex\n\nfrom cldfviz.multiparameter import CONTINUOUS, CA... | [
[
"matplotlib.cm.endswith",
"matplotlib.cm.ScalarMappable",
"matplotlib.pyplot.colormaps",
"matplotlib.colors.Normalize"
]
] |
danibene/NeuroKit | [
"df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a",
"df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a",
"df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a",
"df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a",
"df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a",
"df0ab6696e7418cf8b8dcd3ed82dbf879fa61b3a"
] | [
"neurokit2/complexity/entropy_distribution.py",
"neurokit2/markov/markov_test_homogeneity.py",
"neurokit2/signal/signal_synchrony.py",
"neurokit2/misc/intervals_to_peaks.py",
"neurokit2/eda/eda_sympathetic.py",
"neurokit2/markov/markov_simulate.py"
] | [
"import numpy as np\nimport pandas as pd\nimport scipy.stats\n\nfrom .utils_complexity_embedding import complexity_embedding\nfrom .entropy_shannon import entropy_shannon\n\n\ndef entropy_distribution(signal=None, delay=1, dimension=3, bins=\"Sturges\", base=2):\n \"\"\"**Distribution Entropy (DistrEn)**\n\n ... | [
[
"numpy.log",
"numpy.log2",
"numpy.sqrt",
"numpy.tile",
"numpy.ceil"
],
[
"numpy.log",
"numpy.unique",
"numpy.floor",
"numpy.ndindex",
"numpy.zeros"
],
[
"numpy.abs",
"numpy.isnan",
"pandas.DataFrame",
"numpy.nanmean",
"numpy.angle"
],
[
"... |
shivgahlout/DenseNet-pytorch | [
"8fd286d9f718d164a4583eebd100dff127263891"
] | [
"data_utils.py"
] | [
"import matplotlib.pyplot as plt\nimport matplotlib\nimport numpy as np\nfrom PIL import Image\nfrom scipy.misc import imsave, imread\n\n\ndef plots(epochs, train_acc, test_acc, train_loss, test_loss, train_error, test_error,filename):\n plt.style.use('bmh')\n\n fig=plt.figure(figsize=(8,6))\n plt.plot(epo... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.close",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.style.use",
"matplotlib.pyplot.ylabel"
]
] |
nsdumont/SemanticMapping | [
"af97a452b3de30a9670536c7fa92c28a70fae44d"
] | [
"semanticmapping/sspspace.py"
] | [
"import numpy as np\nimport scipy\nfrom scipy.stats import qmc\nfrom scipy.stats import special_ortho_group\nimport matplotlib.pyplot as plt\nfrom scipy.optimize import minimize\n\nimport warnings\nfrom .ssp import SSP\n\nclass SSPSpace:\n def __init__(self, domain_dim: int, ssp_dim: int, axis_matrix=None, phase... | [
[
"numpy.diag",
"numpy.sqrt",
"numpy.linspace",
"numpy.max",
"scipy.stats.special_ortho_group.rvs",
"numpy.exp",
"numpy.random.default_rng",
"numpy.random.randint",
"numpy.hstack",
"numpy.arange",
"numpy.eye",
"numpy.sin",
"numpy.fft.ifftshift",
"numpy.argmax"... |
ChaseMonsterAway/mmclassification | [
"85d26b8eb2fc799599c42ca33831c40707311bd7",
"85d26b8eb2fc799599c42ca33831c40707311bd7"
] | [
"mmcls/models/backbones/mobilenet_v2.py",
"mmcls/models/losses/cross_entropy_loss.py"
] | [
"# Copyright (c) OpenMMLab. All rights reserved.\nimport torch.nn as nn\nimport torch.utils.checkpoint as cp\nfrom mmcv.cnn import ConvModule\nfrom mmcv.runner import BaseModule\nfrom torch.nn.modules.batchnorm import _BatchNorm\n\nfrom mmcls.models.utils import make_divisible\nfrom ..builder import BACKBONES\nfrom... | [
[
"torch.nn.Sequential",
"torch.utils.checkpoint.checkpoint"
],
[
"torch.nn.functional.binary_cross_entropy_with_logits",
"torch.nn.functional.cross_entropy",
"torch.nn.functional.log_softmax"
]
] |
chemfiles/Chemharp.py | [
"45b8a02b7a0f07d6dcafa52db39df6a39f6f496c"
] | [
"chemfiles/selection.py"
] | [
"# -*- coding=utf-8 -*-\nfrom __future__ import absolute_import, print_function, unicode_literals\n\nfrom ctypes import c_uint64\nimport numpy as np\n\nfrom .utils import CxxPointer, _call_with_growing_buffer\nfrom .ffi import chfl_match\n\n\nclass Selection(CxxPointer):\n \"\"\"\n Select atoms in a :py:class... | [
[
"numpy.zeros"
]
] |
Scartography/mapchete | [
"f7d1a74acb4021adfd3053501416d2b974c40af9"
] | [
"test/test_formats_geotiff.py"
] | [
"\"\"\"Test GeoTIFF as process output.\"\"\"\n\nimport numpy as np\nimport numpy.ma as ma\nimport os\nimport pytest\nimport rasterio\nfrom rasterio.io import MemoryFile\nfrom rio_cogeo.cogeo import cog_validate\nimport shutil\nfrom tilematrix import Bounds\nimport warnings\n\nimport mapchete\nfrom mapchete.errors i... | [
[
"numpy.ones"
]
] |
researchuser7/QWAugmenter | [
"eb70fa27ddb4b90d72c2eae6db2ff65086c3fb69",
"eb70fa27ddb4b90d72c2eae6db2ff65086c3fb69"
] | [
"generator_labeler/paper_results/custom_plots.py",
"generator_labeler/ActiveModel/ActiveQuantileForest.py"
] | [
"import numpy as np\nfrom sklearn.metrics import r2_score\n\nnp.random.seed(42)\n\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport pandas as pd\n\nfigsize = (8, 4)\n\n\ndef show_r2(results):\n data_size = results[\"data_size\"]\n test_scores = results[\"test_scores\"]\n test_scores_exp = res... | [
[
"numpy.hstack",
"sklearn.metrics.r2_score",
"numpy.abs",
"numpy.random.seed",
"numpy.arange",
"numpy.quantile",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"numpy.std",
"numpy.argsort",
"numpy.array",
"numpy.exp"
],
[
"sklearn.model_selection.GridSearc... |
DiegoCao/analytics-zoo | [
"31a7c8acee38053b6bb20ccb4dc02f06d1d58900"
] | [
"pyzoo/test/zoo/chronos/model/forecast/test_lstm_forecaster.py"
] | [
"#\n# Copyright 2018 Analytics Zoo 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 ... | [
[
"numpy.testing.assert_almost_equal",
"numpy.random.rand"
]
] |
LemonNoel/PGL | [
"c12357b66a105b10dd5a1f034fa21008f053d0f0"
] | [
"apps/Graph4KG/utils.py"
] | [
"# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"numpy.random.seed",
"numpy.linalg.norm",
"numpy.stack",
"numpy.concatenate",
"numpy.mean",
"numpy.random.default_rng"
]
] |
EmilienDupont/neural-function-distributions | [
"c034bf79640c6d8922f1c276174b3cb1800d22b4"
] | [
"main.py"
] | [
"import json\nimport os\nimport sys\nimport time\nimport torch\nfrom training.training import Trainer\nfrom data.conversion import GridDataConverter, PointCloudDataConverter, ERA5Converter\nfrom data.dataloaders import mnist, celebahq\nfrom data.dataloaders_era5 import era5\nfrom data.dataloaders3d import shapenet_... | [
[
"torch.zeros",
"torch.nn.Tanh",
"torch.nn.Identity",
"torch.nn.LeakyReLU",
"torch.cuda.is_available"
]
] |
shineyjg/cnn_captcha | [
"1048494895ab6c1e4d5940025c02026386c32912"
] | [
"train_model.py"
] | [
"# -*- coding: utf-8 -*-\nimport tensorflow as tf\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport time\nfrom PIL import Image\nimport random\nimport os\nfrom sample import sample_conf\nfrom tensorflow.python.framework.errors_impl import NotFoundError\n\n# 设置以下环境变量可开启CPU识别\n# os.environ[\"CUDA_DEVICE_OR... | [
[
"matplotlib.pyplot.imshow",
"tensorflow.nn.max_pool",
"tensorflow.equal",
"tensorflow.cast",
"tensorflow.nn.sigmoid_cross_entropy_with_logits",
"tensorflow.train.AdamOptimizer",
"tensorflow.nn.conv2d",
"tensorflow.contrib.layers.xavier_initializer",
"tensorflow.Session",
"t... |
steveazzolin/noiseprint | [
"f42335c3ae641b620583c7dcd89063ca24a6437b"
] | [
"noiseprint/utility/gaussianMixture.py"
] | [
"# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n#\n# Copyright (c) 2017 Image Processing Research Group of University Federico II of Naples ('GRIP-UNINA').\n# This software is delivered with Government Purpose Rights (GPR) under agreement number FA8750-16-2-0204.\n#\n# By downloading a... | [
[
"numpy.diag",
"numpy.sqrt",
"numpy.max",
"numpy.mean",
"numpy.var",
"numpy.exp",
"numpy.eye",
"numpy.real",
"numpy.tensordot",
"numpy.count_nonzero",
"numpy.zeros",
"numpy.log",
"numpy.spacing",
"scipy.linalg.eigvalsh",
"numpy.transpose",
"numpy.lina... |
nasa/airfoil-learning | [
"a76dabc0474485d1e573471e70ec4826aeae0517",
"a76dabc0474485d1e573471e70ec4826aeae0517"
] | [
"generate_xfoil/Step4_CreateDataset.py",
"pytorch/train_gnn.py"
] | [
"import pickle\nfrom typing import Dict, List, Tuple\nfrom tqdm import trange\nimport numpy as np\nimport random, json\nimport torch, glob, os\nimport os.path as osp\nfrom torch.utils.data import random_split\nimport torch_geometric.transforms as T\nfrom libs.utils import create_edge_adjacency\nfrom torch_geometric... | [
[
"numpy.hstack",
"torch.ones",
"torch.zeros",
"torch.cat",
"torch.tensor",
"numpy.concatenate",
"torch.utils.data.random_split",
"numpy.array",
"numpy.flip",
"torch.as_tensor"
],
[
"torch.optim.lr_scheduler.StepLR",
"torch.load",
"torch.nn.functional.mse_loss... |
btlk/facenet | [
"fd531331b962ec4fd4aac534debf9a5bbf7e8c4a"
] | [
"facenet/align/align_dataset_mtcnn.py"
] | [
"\"\"\"Performs face alignment and stores face thumbnails in the output directory.\"\"\"\n# MIT License\n# \n# Copyright (c) 2016 David Sandberg\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# i... | [
[
"tensorflow.Graph",
"scipy.misc.imresize",
"numpy.maximum",
"numpy.minimum",
"numpy.power",
"numpy.asarray",
"scipy.misc.imsave",
"numpy.squeeze",
"tensorflow.ConfigProto",
"numpy.argmax",
"tensorflow.GPUOptions",
"scipy.misc.imread",
"numpy.zeros",
"numpy.v... |
hsfzxjy/ESSNet | [
"6dc2f53b074a0800c17109a1f38a010e3944d96b",
"6dc2f53b074a0800c17109a1f38a010e3944d96b"
] | [
"datasets/ade.py",
"network/_deeplab.py"
] | [
"from __future__ import print_function, division\nimport json\nimport torch\nfrom torch.utils.data import Dataset\nimport numpy as np\nimport os\nimport sys\nimport collections\nimport torch.utils.data as data\nimport shutil\nfrom PIL import Image\nfrom torchvision.datasets.utils import download_url, check_integrit... | [
[
"numpy.zeros"
],
[
"torch.nn.init.uniform_",
"torch.nn.Dropout",
"torch.cat",
"torch.nn.init.constant_",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.arange",
"torch.nn.Embedding",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.functional.interpolate",
"torch.nn.Ba... |
PurdueMINDS/MCLV-RBM | [
"46b1f90b52447687983113f37a5ce2c66b8f0465"
] | [
"py/util/config.py"
] | [
"# Copyright 2017 Bruno Ribeiro, Mayank Kakodkar, Pedro Savarese\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 requir... | [
[
"torch.cuda.is_available"
]
] |
paper2code/rasa | [
"302825e10305a995184b5c0b92fea4813cd3416e"
] | [
"rasa/utils/common.py"
] | [
"import asyncio\nimport logging\nimport os\nimport shutil\nimport warnings\nfrom types import TracebackType\nfrom typing import Any, Coroutine, Dict, List, Optional, Text, Type, TypeVar\n\nimport rasa.core.utils\nimport rasa.utils.io\nfrom rasa.constants import (\n DEFAULT_LOG_LEVEL_LIBRARIES,\n ENV_LOG_LEVEL... | [
[
"tensorflow.compat.v1.logging.set_verbosity"
]
] |
brungcm/health-hack-2019 | [
"3f537ea40ceefdcf5f3044b6931bfa3951c351f7"
] | [
"ml/train_net.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport tensorflow as tf\n\nimport logging\nlogging.basicConfig()\nlogger = logging.getLogger(__name__)\nlogger.setLevel(logging.INFO)\n\nimport argparse\nfrom aquaman_net import AquamanNet\n\nfrom utils import IMAGE_SIZE\n\nEPOCHS = 1000\nBATCH_SIZE = 4\n\n\ndef preproc(image_bytes):\n ... | [
[
"tensorflow.metrics.accuracy",
"tensorflow.concat",
"tensorflow.FixedLenFeature",
"tensorflow.control_dependencies",
"tensorflow.estimator.export.build_raw_serving_input_receiver_fn",
"tensorflow.map_fn",
"tensorflow.train.AdamOptimizer",
"tensorflow.estimator.RunConfig",
"tens... |
mukul54/Flipkart-Grid-Challenge | [
"ae193490304c60cfc074e2f31f4db1a0b8e0e0f4"
] | [
"codes/write_csv.py"
] | [
"import numpy as np\nimport pandas as pd\nX = np.load('preds.npy')\nimg = pd.read_csv('test.csv')\nimg['x1'] = X[:,0]*640\nimg['x2'] = X[:,1]*640\nimg['y1'] = X[:,2]*480\nimg['y2'] = X[:,3]*480\n\"\"\" img['x1'] = 0.05*640\nimg['x2'] = 0.95*640\nimg['y1'] = 0.05*480\nimg['y2'] = 0.95*480 \"\"\"\nimg.to_csv('subbigl... | [
[
"numpy.load",
"pandas.read_csv"
]
] |
jzuhone/glue-vispy-viewers | [
"6993accf0cb85e23013bf7ae6b04145724a6dbd2",
"6993accf0cb85e23013bf7ae6b04145724a6dbd2",
"6993accf0cb85e23013bf7ae6b04145724a6dbd2"
] | [
"glue_vispy_viewers/extern/vispy/gloo/buffer.py",
"glue_vispy_viewers/extern/vispy/geometry/triangulation.py",
"glue_vispy_viewers/extern/vispy/scene/widgets/console.py"
] | [
"# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n# ----------------------------------------------------------------... | [
[
"numpy.array",
"numpy.resize"
],
[
"numpy.geterr",
"numpy.asarray",
"numpy.arange",
"numpy.isnan",
"numpy.ones",
"numpy.all",
"numpy.seterr",
"numpy.append",
"numpy.argmax",
"numpy.argwhere",
"numpy.any",
"numpy.isscalar",
"numpy.cross",
"numpy.a... |
gifuni/nistats | [
"8f0b606f6da6dc7f55e25cc0fa903fdfcc007145",
"8f0b606f6da6dc7f55e25cc0fa903fdfcc007145"
] | [
"nistats/tests/test_check_events_file_uses_tab_separators.py",
"nistats/tests/test_regression.py"
] | [
"import pandas as pd\n\nfrom nibabel.tmpdirs import InTemporaryDirectory\nfrom nose.tools import (assert_raises,\n assert_true,\n )\n\nfrom nistats.utils import _check_events_file_uses_tab_separators\n\n\ndef make_data_for_test_runs():\n data_for_temp_datafile = [\n ... | [
[
"pandas.DataFrame"
],
[
"numpy.random.RandomState"
]
] |
Bob-Yeah/kaolin | [
"7ad34f8158000499a30b8dfa14fb3ed86d2e57a6",
"7ad34f8158000499a30b8dfa14fb3ed86d2e57a6",
"7ad34f8158000499a30b8dfa14fb3ed86d2e57a6",
"7ad34f8158000499a30b8dfa14fb3ed86d2e57a6",
"7ad34f8158000499a30b8dfa14fb3ed86d2e57a6",
"7ad34f8158000499a30b8dfa14fb3ed86d2e57a6",
"7ad34f8158000499a30b8dfa14fb3ed86d2e57a... | [
"examples/ImageRecon/OccNet/architectures.py",
"tests/rep/test_mesh_representation.py",
"examples/ImageRecon/Image_Mesh_Recon_Direct/eval.py",
"kaolin/engine/classification.py",
"examples/GANs/3D-IWGAN/eval.py",
"kaolin/graphics/dib_renderer/renderer/texrender.py",
"examples/SuperResolution/voxel-ShapeN... | [
"# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless requir... | [
[
"torch.nn.Sequential",
"torch.Size",
"torch.nn.BatchNorm1d",
"torch.ones",
"torch.empty",
"torch.zeros",
"torch.nn.InstanceNorm1d",
"torch.distributions.Bernoulli",
"torch.nn.GroupNorm1d",
"torch.exp",
"torch.nn.init.ones_",
"torch.nn.Conv1d",
"torch.nn.Linear",... |
DFKI-NLP/RelEx | [
"0826c02f793b78bf8b7b7001c2e3fdfdb25c1ad2",
"0826c02f793b78bf8b7b7001c2e3fdfdb25c1ad2"
] | [
"relex/modules/offset_embedders/sine_offset_embedder.py",
"relex/modules/offset_embedders/relative_offset_embedder.py"
] | [
"import torch\nimport numpy as np\nfrom allennlp.nn import util\nfrom relex.modules.offset_embedders import OffsetEmbedder\n\n\ndef position_encoding_init(n_position: int, embedding_dim: int):\n position_enc = np.array([[pos / np.power(10000, 2 * (j // 2) / embedding_dim)\n for j in ... | [
[
"numpy.power",
"torch.from_numpy",
"numpy.cos",
"torch.nn.Embedding",
"numpy.sin",
"numpy.zeros"
],
[
"torch.ge",
"torch.lt",
"torch.nn.Embedding",
"torch.le",
"torch.nn.init.xavier_uniform_",
"torch.gt"
]
] |
johnarban/arban | [
"dcd2d0838f72c39bf3a52aabfa74d6ea28933d02"
] | [
"schmidt_funcs.py"
] | [
"import numpy as np\nfrom PIL import Image, ImageDraw\nfrom scipy import interpolate, ndimage, stats, signal, integrate, misc\nfrom astropy.io import ascii, fits\nfrom astropy.wcs import WCS\nfrom astropy.coordinates import SkyCoord\nimport astropy.units as u\nimport astropy.constants as c\nimport corner as triangl... | [
[
"numpy.matrix",
"matplotlib.pyplot.legend",
"numpy.polyfit",
"numpy.nanmax",
"numpy.sqrt",
"numpy.asarray",
"numpy.nanmin",
"matplotlib.pyplot.loglog",
"numpy.cumsum",
"numpy.concatenate",
"numpy.exp",
"numpy.histogram",
"matplotlib.pyplot.gca",
"matplotlib.... |
noboevbo/PedRec | [
"891d19bd6a2c7a7d71c2e41d37e7b4c4bfc7762e",
"891d19bd6a2c7a7d71c2e41d37e7b4c4bfc7762e"
] | [
"pedrec/visualizers/skeleton_3d_visualizer.py",
"pedrec/utils/numpy_helper.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\nfrom mpl_toolkits.mplot3d import Axes3D\n\nfrom pedrec.models.constants.skeleton_pedrec import SKELETON_PEDREC, SKELETON_PEDREC_JOINT_COLORS, SKELETON_PEDREC_LIMB_COLORS\nfrom pedrec.visualizers.visualization_helper_3d import draw_origin_3d, draw_grid_3d\n\n\nde... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
],
[
"numpy.expand_dims",
"numpy.linspace",
"numpy.concatenate",
"numpy.meshgrid",
"numpy.vstack"
]
] |
vishalbelsare/Passage | [
"af6e100804dfe332c88bd2cd192e93a807377887"
] | [
"passage/theano_utils.py"
] | [
"import numpy as np\nimport theano\n\ndef intX(X):\n return np.asarray(X, dtype=np.int32)\n\ndef floatX(X):\n return np.asarray(X, dtype=theano.config.floatX)\n\ndef sharedX(X, dtype=theano.config.floatX, name=None):\n return theano.shared(np.asarray(X, dtype=dtype), name=name)\n\ndef shared0s(shape, dtype... | [
[
"numpy.asarray",
"numpy.zeros",
"numpy.ones"
]
] |
leomauro/history-of-interpretation | [
"6235f4b875505ac7a6efb10f3c4e5a6d3c7b25ec"
] | [
"saliency/guided_backprop.py"
] | [
"# Copyright 2017 Google 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# Unless required by appli... | [
[
"tensorflow.compat.v1.import_graph_def",
"tensorflow.compat.v1.Session",
"tensorflow.compat.v1.gradients",
"tensorflow.compat.v1.Graph",
"tensorflow.compat.v1.RegisterGradient",
"tensorflow.compat.v1.cast",
"tensorflow.compat.v1.train.Saver"
]
] |
NoellePatterson/func-flow-plot | [
"196d58ac87c137b42063ac718ea296faaf148307"
] | [
"utils/calc_fall_flush.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport scipy.interpolate as ip\nfrom scipy.ndimage import gaussian_filter1d\nfrom utils.helpers import find_index, peakdet, replace_nan\nfrom params import fall_params\n\ndef calc_fall_flush_timings_durations(flow_matrix, summer_timings):\n max_zero_allowed_p... | [
[
"scipy.interpolate.UnivariateSpline",
"matplotlib.pyplot.axvline",
"matplotlib.pyplot.axhline",
"numpy.nanpercentile",
"numpy.isnan",
"scipy.ndimage.gaussian_filter1d",
"matplotlib.pyplot.plot",
"numpy.mean",
"numpy.nanmean",
"numpy.count_nonzero",
"matplotlib.pyplot.fi... |
yhpengtu/CenterIMask | [
"7e046964db11df78c93cb88f50b9c4b6ddf0c9bc"
] | [
"tools/convet_voc2coco/voc2coco.py"
] | [
"import os\nimport sys\nimport json\nimport datetime\nimport numpy as np\nimport skimage.draw\nfrom bs4 import BeautifulSoup as bs\nimport cv2\nimport imgaug\nfrom utils import *\n# Root directory of the project\nROOT_DIR = os.path.abspath(\"../../\")\n# Inference result directory\nRESULTS_DIR = os.path.abspath(\".... | [
[
"matplotlib.pyplot.imshow",
"numpy.multiply",
"numpy.asarray",
"matplotlib.use",
"numpy.dstack",
"numpy.max",
"numpy.any",
"matplotlib.pyplot.close",
"numpy.zeros"
]
] |
HongyangGao/PixelDeconv | [
"71964b6b2594d1a888435d3fb42572ffb4096165"
] | [
"network.py"
] | [
"import os\nimport numpy as np\nimport tensorflow as tf\nfrom utils.data_reader import H5DataLoader, H53DDataLoader\nfrom utils.img_utils import imsave\nfrom utils import ops\n\n\n\"\"\"\nThis module builds a standard U-NET for semantic segmentation.\nIf want VAE using pixelDCL, please visit this code:\nhttps://git... | [
[
"tensorflow.concat",
"tensorflow.equal",
"tensorflow.cast",
"numpy.mean",
"tensorflow.train.AdamOptimizer",
"tensorflow.summary.scalar",
"tensorflow.summary.image",
"tensorflow.losses.softmax_cross_entropy",
"tensorflow.trainable_variables",
"tensorflow.train.Saver",
"t... |
archmagethanos/raven | [
"d727cc3da3dff5254b418fb3691a2e45deb20136"
] | [
"framework/TSA/PolynomialRegression.py"
] | [
"\n# Copyright 2017 Battelle Energy Alliance, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
[
"sklearn.preprocessing.PolynomialFeatures"
]
] |
esyyes/featuretools | [
"7d96bd221bad71c70b5d79ce7f7a8885c298f6df"
] | [
"featuretools/entityset/entityset.py"
] | [
"import copy\nimport logging\nfrom collections import defaultdict\n\nimport dask.dataframe as dd\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import is_dtype_equal, is_numeric_dtype\n\nimport featuretools.variable_types.variable as vtypes\nfrom featuretools.entityset import deserialize, serialize... | [
[
"pandas.concat",
"pandas.to_datetime",
"pandas.Series",
"pandas.DataFrame",
"pandas.api.types.is_numeric_dtype",
"pandas.api.types.is_dtype_equal"
]
] |
zmldndx/horovod | [
"e9b1e228ff92eb7f65d9aea2d36f23b327df28bd",
"e9b1e228ff92eb7f65d9aea2d36f23b327df28bd",
"89175b7381e44f5eb3023d7bc22ba768b31fee53"
] | [
"horovod/spark/keras/tensorflow.py",
"examples/pytorch_synthetic_benchmark.py",
"test/test_adasum_pytorch.py"
] | [
"# Copyright 2019 Uber Technologies, 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# Unless requ... | [
[
"tensorflow.python.platform.tf_logging.warning",
"tensorflow.python.keras.backend.batch_get_value",
"tensorflow.python.keras.optimizers.deserialize"
],
[
"numpy.std",
"torch.nn.functional.cross_entropy",
"numpy.mean"
],
[
"numpy.dot",
"numpy.random.seed",
"torch.manual_... |
noaa-ocs-modeling/OCSMesh | [
"d7f97196a0174f3818bfa036a18088acbeff4c78"
] | [
"ocsmesh/mesh/mesh.py"
] | [
"\"\"\"This module defines classes that handle mesh and mesh operations.\n\nThis module defines a factory class for mesh, similar to geometry and\nsize function factory class. It also defines concrete mesh types.\nCurrently two concrete mesh types are defined for generic Eucledian\nmesh and specific 2D Eucledian me... | [
[
"matplotlib.transforms.Bbox",
"numpy.asarray",
"numpy.flipud",
"numpy.max",
"numpy.any",
"numpy.negative",
"matplotlib.tri.Triangulation",
"numpy.where",
"numpy.hstack",
"numpy.ones_like",
"numpy.full",
"matplotlib.pyplot.close",
"numpy.min",
"numpy.isnan",
... |
AliengirlLiv/babyai | [
"51421ee11538bf110c5b2d0c84a15f783d854e7d",
"51421ee11538bf110c5b2d0c84a15f783d854e7d"
] | [
"envs/babyai/oracle/landmark_correction.py",
"envs/d4rl/scripts/reference_scores/generate_ref_min_score.py"
] | [
"import numpy as np\nfrom envs.babyai.oracle.teacher import Teacher\n\nclass LandmarkCorrection(Teacher):\n\n def empty_feedback(self):\n \"\"\"\n Return a tensor corresponding to no feedback.\n \"\"\"\n return np.array([-1, -1])\n\n def random_feedback(self):\n \"\"\"\n ... | [
[
"numpy.array",
"numpy.where",
"numpy.abs"
],
[
"numpy.mean"
]
] |
Yonder-OSS/D3M-Primitives | [
"b5f2c14d2afdadc6e97316aae5dd33fe4b874b09"
] | [
"primitives/image_classification/utils/imagenet.py"
] | [
"''' \n Bootstrapped from https://github.com/NewKnowledge/imagenet and refined for D3M purposes\n Original implementation from Craig Corcoran\n'''\n\nimport os\nimport math\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras.applications import inception_v3, mobilenet_v2, xception\nfrom tensor... | [
[
"tensorflow.constant",
"tensorflow.keras.layers.GlobalAveragePooling2D",
"tensorflow.keras.applications.xception.Xception",
"tensorflow.keras.models.Model",
"tensorflow.keras.layers.Dense",
"numpy.prod",
"tensorflow.keras.applications.inception_v3.InceptionV3"
]
] |
alexklwong/calibrated-backprojection-network | [
"57dbec03c6da94ee0cd020b6de5f02e7e8ee726e"
] | [
"src/kbnet.py"
] | [
"'''\nAuthor: Alex Wong <alexw@cs.ucla.edu>\n\nIf you use this code, please cite the following paper:\n\nA. Wong, and S. Soatto. Unsupervised Depth Completion with Calibrated Backprojection Layers.\nhttps://arxiv.org/pdf/2108.10531.pdf\n\n@inproceedings{wong2021unsupervised,\n title={Unsupervised Depth Completion ... | [
[
"torch.optim.Adam",
"numpy.expand_dims",
"torch.ones_like",
"torch.cat",
"numpy.squeeze",
"torch.from_numpy",
"numpy.stack",
"numpy.round",
"numpy.ceil",
"numpy.std",
"numpy.mean",
"torch.utils.tensorboard.SummaryWriter",
"torch.no_grad",
"numpy.transpose",
... |
crodriguez1a/cen | [
"f03397a0bf4ac24162e270907d623f8658179e88",
"f03397a0bf4ac24162e270907d623f8658179e88"
] | [
"cen/regularizers/entropy.py",
"cen/data/support2.py"
] | [
"# Copyright 2020 Maruan Al-Shedivat. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re... | [
[
"tensorflow.nn.softmax",
"tensorflow.constant",
"tensorflow.shape",
"tensorflow.reduce_mean",
"tensorflow.reduce_sum",
"tensorflow.expand_dims",
"tensorflow.math.log",
"tensorflow.einsum",
"tensorflow.add",
"tensorflow.random.normal"
],
[
"numpy.pad",
"pandas.re... |
keshavd/scenic | [
"2f819916c316e7de73cd539c3a9a83c683ddb0ac",
"2f819916c316e7de73cd539c3a9a83c683ddb0ac"
] | [
"scenic/projects/baselines/bert/trainer.py",
"scenic/projects/baselines/vit.py"
] | [
"\"\"\"BERT Training Script.\"\"\"\n\nimport functools\nfrom typing import Any, Callable, Dict, Tuple, Optional, Type\n\nfrom absl import logging\nfrom clu import metric_writers\nfrom clu import periodic_actions\nfrom flax import jax_utils\nimport flax.linen as nn\nimport jax\nfrom jax.experimental import optimizer... | [
[
"numpy.ceil"
],
[
"numpy.concatenate",
"tensorflow.io.gfile.GFile",
"scipy.ndimage.zoom",
"numpy.sqrt"
]
] |
kyleaj/ProxImaL | [
"2986b1ed40b58057822922522145bfbbdd2cf9de",
"2986b1ed40b58057822922522145bfbbdd2cf9de"
] | [
"proximal/examples/test_conv.py",
"proximal/lin_ops/edge.py"
] | [
"# Proximal\nimport sys\nsys.path.append('../../')\n\nfrom proximal.utils.utils import *\nfrom proximal.halide.halide import *\nfrom proximal.lin_ops import *\n\nimport numpy as np\nfrom scipy import signal\nfrom scipy import ndimage\nimport matplotlib.pyplot as plt\n\n\n############################################... | [
[
"matplotlib.pyplot.imshow",
"numpy.abs",
"matplotlib.pyplot.title",
"scipy.ndimage.correlate",
"scipy.signal.convolve2d",
"numpy.zeros_like",
"matplotlib.pyplot.show",
"numpy.zeros",
"matplotlib.pyplot.figure"
],
[
"numpy.zeros",
"numpy.prod"
]
] |
aksh4y/Papers | [
"f7d89c22cafdb952d57467ab9254c17e8f5d2d4b"
] | [
"Project/algorithm.old.py"
] | [
"#Import Library\nimport warnings\nimport numpy as np\nimport datetime\nfrom extract_data import *\nfrom word_encoder import *\nfrom sklearn import svm\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.naive_bayes import GaussianNB\nfrom sklearn import tree\n\n# send the extracted data availble fro... | [
[
"sklearn.tree.DecisionTreeClassifier",
"sklearn.naive_bayes.GaussianNB",
"sklearn.svm.SVC",
"sklearn.ensemble.RandomForestClassifier"
]
] |
thiago9864/introducao_modelagem | [
"7ec90d266e1bbae7f942f2c600c4ea1d88d17614"
] | [
"aulas/05-06/variaveis_aleatorias.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Jun 5 08:32:13 2019\n\n@author: Thiago\n\"\"\"\n\nimport numpy as np\nimport pylab as pl\n\n#%%\n\n#Simulação de uma va\ndef va_estoque():\n p=np.array([0.1, 0.2, 0.6, 0.1])\n x=np.random.rand()\n\n if 0 < x <= p[0]:\n return 1\n elif p[0] < x <= ... | [
[
"numpy.random.seed",
"numpy.random.choice",
"numpy.logspace",
"numpy.random.rand",
"numpy.array"
]
] |
vzyrianov/hpvm-autograd | [
"521cc3b684531548aea75f9fe3cc673aaa4a2e90"
] | [
"hpvm/projects/hpvm-profiler/hpvm_profiler/__init__.py"
] | [
"from pathlib import Path\nfrom subprocess import PIPE, CalledProcessError\nfrom typing import Iterable, List, Tuple, Union\n\nimport matplotlib.pyplot as plt\n\nPathLike = Union[Path, str]\nconf_opening, conf_closing = \"+++++\", \"-----\"\n\n\ndef profile_config_file(\n binary_path: PathLike,\n config_path:... | [
[
"matplotlib.pyplot.subplots"
]
] |
Wastoon/XinTong_CenterNet | [
"e4436d61b01a74fbc54bd33c4948ec932940661a"
] | [
"src/lib/detectors/ctdet.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport cv2\nimport numpy as np\nfrom progress.bar import Bar\nimport time\nimport torch\nimport os\n\ntry:\n from external.nms import soft_nms\nexcept:\n print('NMS not imported! If you need it,'\n ... | [
[
"numpy.partition",
"torch.cuda.synchronize",
"numpy.concatenate",
"torch.no_grad",
"numpy.array"
]
] |
johnfischbeck/hdbscan | [
"7499b53f9edca09c6a674a93e3d32bbbaf655b5a"
] | [
"hdbscan/prediction.py"
] | [
"# Support various prediction methods for predicting cluster membership\n# of new or unseen points. There are several ways to interpret how\n# to do this correctly, so we provide several methods for\n# the different use cases that may arise.\n\nimport numpy as np\n\nfrom sklearn.neighbors import KDTree, BallTree\nf... | [
[
"numpy.hstack",
"numpy.asarray",
"numpy.vstack",
"numpy.in1d",
"numpy.ones",
"numpy.finfo",
"numpy.append",
"numpy.array",
"numpy.zeros",
"numpy.empty"
]
] |
rangaswamymr/incubator-bluemarlin | [
"6cb60b2a41edc6509377f9eacb7660d199a9485b",
"6cb60b2a41edc6509377f9eacb7660d199a9485b"
] | [
"Model/lookalike-model/lookalike_model/trainer/lookalike_trainer_tfrecords.py",
"Processes/optimizer/tests/tests_overall/test_hwm_allocations_natural_2.py"
] | [
"import numpy as np\nimport os, time\nimport random\nimport tensorflow as tf\nfrom lookalike_model.trainer.model_new import Model\nimport argparse\n\n\nrandom.seed(1234)\n# adding arguments for tfrecord directory and the checkpoint directory\nparser = argparse.ArgumentParser()\nparser.add_argument(\"--data_dir\", t... | [
[
"tensorflow.local_variables_initializer",
"tensorflow.FixedLenFeature",
"tensorflow.data.TFRecordDataset",
"tensorflow.cast",
"tensorflow.ConfigProto",
"tensorflow.global_variables_initializer",
"tensorflow.FixedLenSequenceFeature",
"tensorflow.GPUOptions"
],
[
"pandas.test... |
SpinQTech/SpinQKit | [
"2e24826688b2b26cf7efa66fd47f0e7ef883a96c"
] | [
"qiskit/circuit/library/grover_operator.py"
] | [
"# This code is part of Qiskit.\r\n#\r\n# (C) Copyright IBM 2017, 2020.\r\n#\r\n# This code is licensed under the Apache License, Version 2.0. You may\r\n# obtain a copy of this license in the LICENSE.txt file in the root directory\r\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\r\n#\r\n#... | [
[
"numpy.max"
]
] |
XiaoquinNUDT/Three-SNN-learning-algorithms-in-Brian2 | [
"b7a5b0aba03172cdc04e738f02a949c373c1aac2"
] | [
"Spike generation/spike_recorder_focal.py"
] | [
"\"\"\"\nload the dataset example and return the maximum image size, which is used to definite the spike generation network;\nimages with different size are focused onto the center of the spike generation network;\nthe generated poisson spikes are recorded and saved for further use.\n\"\"\"\n\"\"\"\non 12th Novembe... | [
[
"numpy.asarray",
"numpy.set_printoptions",
"numpy.zeros"
]
] |
BG4WCE/keras-yolo3 | [
"be5afc9a8ac7c353941072960e1c099009946895"
] | [
"yolo3_video.py"
] | [
"import argparse\nimport os\nimport numpy as np\nfrom keras.layers import Conv2D, Input, BatchNormalization, LeakyReLU, ZeroPadding2D, UpSampling2D\nfrom keras.layers.merge import add, concatenate\nfrom keras.models import Model\nimport struct\nimport cv2\nimport time\nfrom pathlib import Path\n\n#np.set_printoptio... | [
[
"numpy.expand_dims",
"numpy.set_printoptions",
"numpy.ones",
"numpy.frombuffer",
"numpy.argmax",
"numpy.argsort",
"numpy.exp"
]
] |
acwooding/docmap_playground | [
"388c0f357cadb9b6e4b4b6e25fb131713111dc48"
] | [
"src/data/process_functions.py"
] | [
"\"\"\"\nCustom dataset processing/generation functions should be added to this file\n\"\"\"\n\nimport pathlib\nfrom sklearn.datasets import fetch_20newsgroups\nfrom functools import partial\n\nfrom src import workflow, paths\nfrom src.log import logger\nimport src.log.debug\n\nfrom tqdm.auto import tqdm\n\nfrom ..... | [
[
"sklearn.datasets.fetch_20newsgroups"
]
] |
sunkisser/manim | [
"39673a80d7bbbea258c35ce5a1d37a0911aae4f1"
] | [
"manimlib/utils/rate_functions.py"
] | [
"from typing import Callable\n\nimport numpy as np\n\nfrom manimlib.utils.bezier import bezier\n\n\ndef linear(t: float) -> float:\n return t\n\n\ndef smooth(t: float) -> float:\n # Zero first and second derivatives at t=0 and t=1.\n # Equivalent to bezier([0, 0, 0, 1, 1, 1])\n s = 1 - t\n return (t*... | [
[
"numpy.exp",
"numpy.sqrt",
"numpy.sin"
]
] |
TECHENGINESSRL/audio-super-res | [
"2f90a288e86ddca50c98c17b0513e73ab49087d3"
] | [
"src/models/layers/subpixel.py"
] | [
"import numpy as np\nimport tensorflow as tf\n\n# ----------------------------------------------------------------------------\n\ndef SubPixel1D_v2(I, r):\n \"\"\"One-dimensional subpixel upsampling layer\n\n Based on https://github.com/Tetrachrome/subpixel/blob/master/subpixel.py\n \"\"\"\n with tf.compat.v1.n... | [
[
"tensorflow.transpose",
"tensorflow.shape",
"numpy.arange",
"tensorflow.reshape",
"tensorflow.squeeze",
"tensorflow.compat.v1.Session",
"tensorflow.compat.v1.placeholder",
"tensorflow.batch_to_space",
"tensorflow.split",
"tensorflow.compat.v1.name_scope"
]
] |
SkyRd1/Statistical_Functions | [
"3c7a4bba91e43110567f0d2fd1089699d9038206"
] | [
"Mean_Std_Calculation.py"
] | [
"#Author: Sepehr Roudini.\r\n#Date: 02/05/2018.\r\n#University of Iowa.\r\n#Department of Chemical Engineering.\r\n#Purpose: Calculating mean and Std\r\n\r\n\r\n#--------------------------------------------------------------------------------------------#\r\n#Defining function and importing necessary libraries.\r\n... | [
[
"numpy.sum"
]
] |
CvlabAssignment/WRcan | [
"e77571472f5a3928b1e9cee5440d52f702e59a41"
] | [
"src/trainer.py"
] | [
"import os\nimport math\nfrom decimal import Decimal\n\nimport utility\n\nimport torch\nimport torch.nn.utils as utils\nfrom tqdm import tqdm\n\nclass Trainer():\n def __init__(self, args, loader, my_model, my_loss, ckp):\n self.args = args\n self.scale = args.scale\n\n self.ckp = ckp\n ... | [
[
"torch.device",
"torch.cuda.amp.GradScaler",
"torch.set_grad_enabled",
"torch.cuda.amp.autocast"
]
] |
marcovalenti/mmdetection | [
"215ea4174c1234ac4c3e23bf29020fc1cefc36ad"
] | [
"mmdet/models/roi_heads/bbox_heads/convfc_bbox_head.py"
] | [
"import torch.nn as nn\nimport torch.nn.functional as F\nimport torch\nfrom mmcv.cnn import ConvModule\nfrom mmcv.runner import force_fp32\n\nfrom mmdet.models.builder import HEADS, build_loss\nfrom mmdet.models.losses import accuracy\nfrom .bbox_head import BBoxHead\n\nfrom mmdet.core import multi_apply, multiclas... | [
[
"torch.nn.functional.softmax",
"torch.cat",
"torch.nn.init.constant_",
"torch.nn.ModuleList",
"torch.sum",
"torch.tensor",
"torch.nn.Linear",
"torch.nn.functional.sigmoid",
"torch.nn.init.xavier_uniform_",
"torch.nn.ReLU"
]
] |
smtnkc/gcn4epi | [
"2b9dd973b2d5120f618d3c36e8aa9d7d4a4e6b69"
] | [
"utils.py"
] | [
"import numpy as np\nimport pickle as pkl\nimport networkx as nx\nimport scipy.sparse as sp\nfrom scipy.sparse.linalg.eigen.arpack import eigsh\n\n\ndef sample_mask(idx, l):\n \"\"\"Create mask.\"\"\"\n mask = np.zeros(l)\n mask[idx] = 1\n return np.array(mask, dtype=np.bool)\n\n\ndef load_data(cell_lin... | [
[
"scipy.sparse.coo_matrix",
"scipy.sparse.isspmatrix_coo",
"numpy.power",
"scipy.sparse.eye",
"scipy.sparse.diags",
"scipy.sparse.linalg.eigen.arpack.eigsh",
"scipy.sparse.csr_matrix",
"numpy.array",
"numpy.zeros",
"numpy.isinf",
"numpy.vstack"
]
] |
wooseoklee4/AP-BSN | [
"210013cfe0657e678e4b940fd4d5719ac0ac87c6"
] | [
"src/util/summary_logging.py"
] | [
"\nimport time\n\nfrom torch.utils.tensorboard import SummaryWriter\nimport numpy as np\n\nclass LossWriter(SummaryWriter):\n def __init__(self, log_dir=None, comment=''):\n if log_dir == None:\n log_dir = './logs/tensorboard/' + time.strftime('%Y-%m-%d--%H-%M-%S', time.localtime(time.time()))\... | [
[
"numpy.random.random"
]
] |
timoklein/A0C | [
"2825193f424bd5b74b654c929ef73775b0914ee5"
] | [
"alphazero/network/policies.py"
] | [
"from typing import ClassVar, List, Optional, Tuple, Callable, Union, cast\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.distributions as D\nfrom alphazero.network.distributions import SquashedNormal, GeneralizedBeta\nfrom alphazero.network.utils import (\n ... | [
[
"torch.nn.Sequential",
"torch.nn.functional.softmax",
"torch.distributions.Beta",
"torch.nn.LayerNorm",
"torch.nn.Linear",
"torch.distributions.MixtureSameFamily",
"torch.distributions.Categorical",
"torch.no_grad",
"torch.distributions.Normal",
"torch.clamp",
"numpy.ar... |
ajkxyz/cuda4py | [
"3f04dd5d72d64e5bd68dee91de1193a7bb6e8033"
] | [
"tests/test_cufft.py"
] | [
"\"\"\"\nCopyright (c) 2014, Samsung Electronics Co.,Ltd.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\nlist o... | [
[
"numpy.fft.fft2",
"numpy.ones_like",
"numpy.sqrt",
"numpy.ones",
"numpy.fft.rfft2",
"numpy.random.rand",
"numpy.zeros",
"numpy.fabs"
]
] |
exitudio/neural-network-pytorch | [
"2831eb92d396187cc0e043234c2dfd17fc83ae3b",
"2831eb92d396187cc0e043234c2dfd17fc83ae3b"
] | [
"exit/losses.py",
"exit/initializers.py"
] | [
"from abc import ABC, abstractmethod\nimport numpy as np\nfrom .constants import EPSILON\nimport torch\n\n\nclass Loss(ABC):\n def __init__(self, expected_output, predict_output):\n self._expected_output = expected_output\n self._predict_output = predict_output\n\n @abstractmethod\n def get_l... | [
[
"torch.log"
],
[
"torch.randn",
"torch.rand",
"torch.Tensor"
]
] |
essential2189/Cell-Based-Model | [
"f01c3fcb45e69baa4dc8216b8b5a092f56cfa38e"
] | [
"preprocess/watershed.py"
] | [
"#-*-coding:utf-8-*-\n\nimport numpy as np\nimport cv2\nimport gc\nfrom tqdm import tqdm\n\ndef watershed(opencv_image):\n top_n_label = 2\n\n gray = cv2.cvtColor(opencv_image, cv2.COLOR_BGR2GRAY)\n print('convert gray end')\n\n gray[gray == 0] = 255\n\n _, cvt_img = cv2.threshold(gray, 225, 255, cv2... | [
[
"numpy.zeros"
]
] |
nicksacco17/Quantum_Information | [
"c1ee8369f34a9b78a7360cd68b6f2da082266d4a"
] | [
"main.py"
] | [
"\nfrom PauliInteraction import PauliInteraction\nfrom Ising import Ising\nfrom CoefficientGenerator import CoefficientGenerator\nfrom Evaluator import Evaluator\n\n#from DataVisualizer import DataVisualizer\n#from DataLogger import DataLogger\n\nimport Driver as Driver_H\n\nfrom MasterEquation import MasterEquatio... | [
[
"numpy.arange",
"numpy.zeros",
"numpy.empty"
]
] |
gajeraj/MLSA-workshops-2020-student | [
"cafbf5ac8750dd2b962174ad71dabf35ac90e2f4"
] | [
"Unsupervised-Learning/rbm.py"
] | [
"import tensorflow as tf \nimport numpy as np \nimport os \nimport matplotlib.pyplot as plt \nfrom tqdm import tqdm \n\nclass RBM(object):\n \n def __init__(self,num_visible,num_hidden,visible_unit_type='bin',main_dir='/Users/chamalgomes/Documents/Python/GitLab/DeepLearning/KAI PROJECT/rbm/models',\n ... | [
[
"tensorflow.sign",
"tensorflow.zeros",
"tensorflow.reduce_sum",
"matplotlib.pyplot.plot",
"tensorflow.reset_default_graph",
"tensorflow.Session",
"tensorflow.square",
"tensorflow.train.Saver",
"tensorflow.matmul",
"tensorflow.nn.sigmoid",
"tensorflow.truncated_normal",
... |
GueroudjiAmal/dask-ml | [
"54a8913bfb22775c72ffd781bf29d6e53b5dd363"
] | [
"tests/metrics/test_metrics.py"
] | [
"import dask\nimport dask.array as da\nimport numpy as np\nimport numpy.testing as npt\nimport pytest\nimport sklearn\nimport sklearn.linear_model\nimport sklearn.metrics\nfrom dask.array.utils import assert_eq\n\nimport dask_ml.metrics\nimport dask_ml.wrappers\n\n\ndef test_pairwise_distances(X_blobs):\n center... | [
[
"sklearn.linear_model.LogisticRegression",
"numpy.random.choice",
"sklearn.config_context",
"numpy.unique",
"sklearn.metrics.euclidean_distances",
"numpy.testing.assert_array_equal",
"sklearn.metrics.log_loss",
"sklearn.metrics.make_scorer",
"numpy.random.uniform",
"numpy.a... |
python-hydro/hydro_examples | [
"55b7750a7644f3e2187f7fe338b6bc1d6fb9c139",
"55b7750a7644f3e2187f7fe338b6bc1d6fb9c139"
] | [
"multigrid/patch1d.py",
"burgers/burgers.py"
] | [
"\"\"\"\nThe patch module allows for a grid to be created and for data to be\ndefined on that grid.\n\nTypical usage:\n\n -- create the grid\n\n grid = Grid1d(nx)\n\n\n -- create the data that lives on that grid\n\n data = CellCenterData1d(grid)\n\n bcObj = bcObject(xlb=\"reflect\", xrb=\"reflect\"_\n... | [
[
"numpy.min",
"numpy.arange",
"numpy.max",
"numpy.exp",
"numpy.zeros",
"numpy.where"
],
[
"numpy.sum",
"numpy.arange",
"matplotlib.pyplot.savefig",
"numpy.sin",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.xlabel",
"numpy.logical_... |
hyperdo/python2-baselines | [
"ef2319bb18fa694ff8db34b667fb3702acebe608"
] | [
"baselines/deepq/simple.py"
] | [
"from backports import tempfile\nimport numpy as np\nimport os\nimport dill\nimport tensorflow as tf\nimport zipfile\n\nimport baselines.common.tf_util as U\n\nfrom build_graph import build_act, build_train\nfrom baselines import logger\nfrom baselines.common.schedules import LinearSchedule\nfrom baselines.deepq.re... | [
[
"numpy.ones_like",
"numpy.abs",
"numpy.mean",
"tensorflow.train.AdamOptimizer",
"numpy.array"
]
] |
ViduraPrasangana/faster-rcnn-caffe | [
"af6f5ee89c6e82d295bddd192d9dfcebd60d7c52",
"af6f5ee89c6e82d295bddd192d9dfcebd60d7c52"
] | [
".env/lib/python2.7/site-packages/skimage/segmentation/boundaries.py",
".env/lib/python2.7/site-packages/skimage/feature/tests/test_orb.py"
] | [
"from __future__ import division\n\nimport numpy as np\nfrom scipy import ndimage as ndi\nfrom ..morphology import dilation, erosion, square\nfrom ..util import img_as_float, view_as_windows\nfrom ..color import gray2rgb\n\n\ndef _find_boundaries_subpixel(label_img):\n \"\"\"See ``find_boundaries(..., mode='subp... | [
[
"numpy.pad",
"scipy.ndimage.generate_binary_structure",
"scipy.ndimage.zoom",
"numpy.ones",
"numpy.zeros_like",
"numpy.iinfo",
"numpy.ndindex",
"numpy.array",
"numpy.zeros"
],
[
"numpy.array",
"numpy.rad2deg",
"numpy.ones"
]
] |
nitsaick/pytorch-kit | [
"ebbbc228e2dbae37a055de0d40580140d5a51613",
"ebbbc228e2dbae37a055de0d40580140d5a51613"
] | [
"network/r2unet.py",
"network/idanet.py"
] | [
"import torch\nimport torch.nn as nn\n\nfrom .subnet import DoubleConv, UpConv, RRCU\n\n\nclass R2UNet(nn.Module):\n def __init__(self, in_ch, out_ch, base_ch=64):\n super(R2UNet, self).__init__()\n self.inc = DoubleConv(in_ch, base_ch)\n self.down = nn.MaxPool2d(kernel_size=2, stride=2)\n ... | [
[
"torch.nn.MaxPool2d",
"torch.nn.Conv2d",
"torch.cat"
],
[
"torch.nn.MaxPool2d",
"torch.nn.Conv2d"
]
] |
Daupler/CA-MTL | [
"d417b039dee973e32f42ba5c1c346738cd29ab3c"
] | [
"src/mtl_trainer.py"
] | [
"import os\nimport json\nimport logging\nfrom dataclasses import dataclass, field\nfrom typing import Dict, Optional, Callable\n\nimport torch\nimport wandb\nimport numpy as np\nfrom tqdm.auto import tqdm\nfrom torch.utils.data.dataloader import DataLoader\nfrom torch.utils.data.dataset import Dataset\nfrom torch.u... | [
[
"torch.nn.Softmax",
"torch.utils.data.distributed.DistributedSampler",
"torch.cat",
"torch.Tensor",
"torch.nn.DataParallel",
"numpy.argmax",
"numpy.mean",
"torch.no_grad",
"torch.topk",
"torch.utils.data.dataloader.DataLoader",
"torch.utils.data.sampler.RandomSampler",
... |
Graveheart/ProteinSSPrediction | [
"21bada89a592ff77e0d12063b7225b4f3da4fb1f"
] | [
"cnn_phi_psi.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport numpy as np\nimport os\nimport os.path\nimport math\n\nimport tensorflow as tf\nfrom sklearn.model_selection import KFold\nimport matplotlib.pyplot as plt\nfrom sklearn.metrics import mean_absol... | [
[
"matplotlib.pyplot.legend",
"sklearn.model_selection.KFold",
"numpy.concatenate",
"matplotlib.pyplot.plot",
"tensorflow.nn.l2_loss",
"tensorflow.train.AdamOptimizer",
"tensorflow.nn.conv1d",
"tensorflow.summary.scalar",
"tensorflow.Variable",
"tensorflow.placeholder_with_de... |
cipher982/Wine-o-matic | [
"a8000bf5ec86554e9c3c746aae51ba509ab59162"
] | [
"extra_code/transformers-gpt2-finetune.py"
] | [
"import os\n\nos.environ[\"CUDA_VISIBLE_DEVICES\"] = \"1\"\n\n# import deepspeed\n# import mpi4py\n# import pandas\nimport torch\nimport transformers\nimport wandb\n\n#%env WANDB_PROJECT=wine_gpt2_Trainer_42\n\nMODEL_NAME = \"gpt2-medium\"\n\n# wandb.login(anonymous='never', key=\"222a37baaf0c1b0d1499ec003e5c2fe49f... | [
[
"torch.cuda.is_available",
"torch.tensor"
]
] |
IronOnet/tensor2robot | [
"351cecbf76b71d09b56a766b981e1a15f85d9528",
"351cecbf76b71d09b56a766b981e1a15f85d9528"
] | [
"utils/train_eval_test.py",
"research/vrgripper/vrgripper_env_models.py"
] | [
"# coding=utf-8\n# Copyright 2019 The Tensor2Robot 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 require... | [
[
"numpy.maximum",
"numpy.allclose",
"tensorflow.compat.v1.train.list_variables",
"tensorflow.compat.v1.test.main",
"tensorflow.compat.v1.estimator.Estimator",
"numpy.testing.assert_almost_equal",
"tensorflow.compat.v1.train.Example",
"tensorflow.compat.v1.io.gfile.glob",
"tensor... |
diceroll/metric_learning | [
"272c7ba13208e14b91d294456d1f7fe762fe80d5"
] | [
"train_cifar.py"
] | [
"import argparse\nimport multiprocessing\nimport random\nimport shutil\nfrom datetime import datetime\nfrom functools import partial\nfrom pathlib import Path\n\nimport chainer\nimport chainer.functions as F\nimport chainer.links as L\nimport cupy\nimport numpy as np\nfrom chainer import iterators, optimizers, seri... | [
[
"numpy.random.seed",
"numpy.std",
"numpy.mean",
"numpy.random.rand",
"numpy.random.randint"
]
] |
thanhkaist/garage | [
"1d840df357282a675b8fce839bb0e5f72a8abba9",
"1d840df357282a675b8fce839bb0e5f72a8abba9",
"1d840df357282a675b8fce839bb0e5f72a8abba9",
"1d840df357282a675b8fce839bb0e5f72a8abba9",
"1d840df357282a675b8fce839bb0e5f72a8abba9",
"1d840df357282a675b8fce839bb0e5f72a8abba9"
] | [
"tests/garage/tf/models/test_gru.py",
"src/garage/tf/_functions.py",
"tests/garage/tf/q_functions/test_continuous_mlp_q_function.py",
"src/garage/tf/misc/tensor_utils.py",
"tests/garage/tf/models/test_categorical_cnn_model.py",
"tests/garage/tf/models/test_cnn.py"
] | [
"import numpy as np\nimport pytest\nimport tensorflow as tf\n\nfrom garage.tf.models.gru import gru\nfrom tests.fixtures import TfGraphTestCase\nfrom tests.helpers import recurrent_step_gru\n\n\nclass TestGRU(TfGraphTestCase):\n\n def setup_method(self):\n super().setup_method()\n self.batch_size =... | [
[
"numpy.allclose",
"tensorflow.keras.layers.RNN",
"numpy.array_equal",
"tensorflow.compat.v1.get_variable",
"tensorflow.gradients",
"numpy.matmul",
"tensorflow.compat.v1.trainable_variables",
"numpy.full",
"tensorflow.compat.v1.global_variables_initializer",
"tensorflow.cons... |
KrisThielemans/parallelproj | [
"b9e1cb27aaec9a1605e1842b7b3be8b6f32765d3"
] | [
"examples/projector_order_test.py"
] | [
"# small demo for listmode TOF MLEM without subsets\n\nimport os\nimport matplotlib.pyplot as py\nimport pyparallelproj as ppp\nfrom pyparallelproj.wrapper import joseph3d_fwd, joseph3d_fwd_tof, joseph3d_back, joseph3d_back_tof\nimport numpy as np\nimport argparse\nimport ctypes\n\nfrom time import time\n\n#-------... | [
[
"numpy.random.seed",
"numpy.full",
"numpy.ones",
"numpy.array",
"numpy.zeros"
]
] |
vballoli/jax | [
"bbf7a432e86053024419ec8adb90aae3d06afb18"
] | [
"tests/lax_numpy_test.py"
] | [
"# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"numpy.diag",
"numpy.take_along_axis",
"numpy.split",
"numpy.expand_dims",
"numpy.dot",
"numpy.take",
"numpy.linspace",
"numpy.asarray",
"numpy.squeeze",
"numpy.flipud",
"numpy.nan_to_num",
"numpy.dtype",
"numpy.round",
"numpy.concatenate",
"numpy.isnegi... |
wongwsvincent/pennylane-cirq | [
"14f421a31016949ec6f3172f90e7f06a6674e913"
] | [
"tests/test_expval.py"
] | [
"# Copyright 2018 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.sqrt",
"numpy.allclose",
"numpy.random.seed",
"numpy.cos",
"numpy.sin",
"numpy.array"
]
] |
Atul-Anand-Jha/reading_comprehension_tf | [
"9d45ff62aa4004c466e4fe6b6639cec754199b2b"
] | [
"reading_comprehension/reading_comprehension_run.py"
] | [
"import argparse\nimport os.path\nimport time\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom tensorflow.python import debug as tf_debug\n\nfrom util.default_util import *\nfrom util.param_util import *\nfrom util.model_util import *\nfrom util.eval_util import *\nfrom util.debug_logger import *\nfrom util.t... | [
[
"numpy.random.seed",
"tensorflow.gfile.Exists",
"tensorflow.gfile.MakeDirs",
"tensorflow.Session",
"tensorflow.python.debug.LocalCLIDebugWrapperSession"
]
] |
nilswagner/glue | [
"1e16776f557482cc8444d2b8ecbb813ce691a70d"
] | [
"glue/viewers/matplotlib/state.py"
] | [
"from echo import CallbackProperty, SelectionCallbackProperty, keep_in_sync, delay_callback\n\nfrom matplotlib.colors import to_rgba\n\nfrom glue.core.message import LayerArtistUpdatedMessage\n\nfrom glue.core.state_objects import State\nfrom glue.viewers.common.state import ViewerState, LayerState\n\nfrom glue.uti... | [
[
"matplotlib.colors.to_rgba"
]
] |
OsciiArt/Cookpad | [
"b2245f84db0650d6282c97c98600de825c6ed6e0",
"b2245f84db0650d6282c97c98600de825c6ed6e0"
] | [
"train_180131_2.py",
"train_180215_1_Dense_6th_training.py"
] | [
"import numpy as np # linear algebra\nnp.random.seed(42)\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nfrom sklearn.model_selection import train_test_split\nfrom matplotlib import pyplot\nimport time\nimport os, glob\nimport cv2\n\n# parameters\nformat = \"%H%M\"\nts = time.strftime(forma... | [
[
"numpy.dot",
"pandas.read_csv",
"numpy.random.random",
"numpy.random.beta",
"numpy.random.seed",
"numpy.math.cos",
"numpy.sqrt",
"numpy.arange",
"numpy.eye",
"numpy.save",
"numpy.ceil",
"numpy.argmax",
"numpy.random.permutation",
"numpy.random.rand",
"nu... |
fcr/featuremapper | [
"b999110dce9bbbdf4b6dbd2d13bfca1596064c6a",
"b999110dce9bbbdf4b6dbd2d13bfca1596064c6a"
] | [
"featuremapper/distribution.py",
"featuremapper/analysis/raster.py"
] | [
"\"\"\"\nDistribution class\n\"\"\"\n# To do:\n#\n# - wrap bins for cyclic histograms\n# - check use of float() in count_mag() etc\n# - clarify comment about negative selectivity\n#\n# - function to return value in a range (like a real histogram)\n# - cache values\n# - assumes cyclic axes start at 0: include a shif... | [
[
"numpy.log",
"numpy.inner",
"numpy.random.random_sample",
"numpy.cos",
"scipy.optimize.leastsq",
"numpy.argmax",
"numpy.array",
"numpy.exp"
],
[
"numpy.fft.fft2",
"numpy.array",
"numpy.linspace"
]
] |
KodeWorker/tensorflow | [
"a7f91fd5ce53253ab4bfd6448886028a085e0ddf",
"a7f91fd5ce53253ab4bfd6448886028a085e0ddf"
] | [
"tensorflow/python/training/checkpoint_utils.py",
"tensorflow/python/training/tracking/base.py"
] | [
"# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.framework.ops.device",
"tensorflow.python.ops.io_ops.restore_dit",
"tensorflow.python.platform.tf_logging.debug",
"tensorflow.python.ops.io_ops.restore_v2",
"tensorflow.python.distribute.distribution_strategy_context.get_cross_replica_context",
"tensorflow.python.trainin... |
IssamLaradji/SSR | [
"90623188abb4dd9f30566faa2f170a76db9e1846"
] | [
"src/datasets.py"
] | [
"import os\n\nimport soft_renderer.functional as srf\nimport torch, random\nimport numpy as np\nimport tqdm\nfrom haven import haven_utils as hu\nfrom PIL import Image, ImageOps, ImageFilter\nimport torchvision.transforms as transforms\n\nclass_ids_map = {\n '02691156': 'Airplane',\n '02828884': 'Bench',\n ... | [
[
"torch.ones",
"torch.cat",
"numpy.arange",
"torch.from_numpy",
"numpy.concatenate",
"numpy.random.randint",
"torch.arange",
"numpy.repeat",
"torch.as_tensor"
]
] |
tedunderwood/biographies | [
"b79dbd054fca10860d2c5a89d9c5ab1df8a93642",
"aba7b7180aea944bdc4fa163b0008eca34fe73cc"
] | [
"code/extract_balanced.py",
"topicmodel/dataprep/tabletomallet_biofic.py"
] | [
"#!/usr/bin/python3\n\nimport sys\nimport os\nimport shutil\nimport csv\nimport zipfile\nimport pandas as pd\nimport glob\n\ninfile = sys.argv[1]\noutfile = sys.argv[2]\n\n# remove holding_folder if it exists, and create new folder\n# use 'rm -r /holding_folder/* in shell script instead?'\nholding_path = '/media/se... | [
[
"pandas.read_table",
"pandas.read_csv",
"pandas.DataFrame"
],
[
"pandas.read_csv"
]
] |
KnightOfTheMoonlight/visdom4detectron2 | [
"2455e4790f470bba54299c049410fc0713ae7529"
] | [
"detectron2/modeling/mmdet_wrapper.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport itertools\nimport logging\nimport numpy as np\nfrom collections import OrderedDict\nfrom collections.abc import Mapping\nfrom typing import Dict, List, Optional, Tuple, Union\nimport torch\nfrom omegaconf import DictConfig, OmegaConf\nfrom torch import Tensor, nn\n\nfrom detectron... | [
[
"numpy.sqrt",
"torch.full",
"torch.cat",
"torch.from_numpy",
"torch.tensor",
"torch.stack",
"numpy.vstack"
]
] |
tomjur/TF2.0DQN | [
"4813d40ffaa455e4b70459a6db0a996d73b760d9"
] | [
"main.py"
] | [
"from config_utils import read_main_config\nfrom deep_q_network import DeepQNetwork\nfrom gym_wrapper import GymWrapper\n\n\nfrom tensorflow.python.framework.ops import disable_eager_execution\ndisable_eager_execution()\n\nconfig = read_main_config()\ngym_wrapper = GymWrapper(config['general']['scenario'])\ndeep_q_... | [
[
"tensorflow.python.framework.ops.disable_eager_execution"
]
] |
pyiron/pyiron_atomistic | [
"0cd4c910806f44dfc829ddd642e323efcf7e36d5",
"0cd4c910806f44dfc829ddd642e323efcf7e36d5"
] | [
"pyiron_atomistics/vasp/outcar.py",
"tests/atomistics/job/test_atomistic.py"
] | [
"# coding: utf-8\n# Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department\n# Distributed under the terms of \"New BSD License\", see the LICENSE file.\n\nfrom collections import OrderedDict\nimport numpy as np\nimport warnings\nimport scipy.constants\nimport re\n... | [
[
"numpy.abs",
"numpy.average",
"numpy.argsort",
"numpy.array",
"numpy.zeros"
],
[
"numpy.dot",
"numpy.array",
"numpy.ones_like",
"numpy.allclose"
]
] |
manhph2211/Pytorch-Fb-Classification | [
"cf5f9c0b356635020ff245c255d971e450d203fb"
] | [
"dataloader.py"
] | [
"import torch\nimport torchvision\nfrom torchvision import transforms, utils, datasets\nfrom torch.utils.data import Dataset, DataLoader, SubsetRandomSampler\nfrom sklearn.metrics import classification_report, confusion_matrix\n\n\ndef makeDataSet(IMAGE_SHAPE = 300,DATA_PATH = './data_after_splitting/'):\n\n\timage... | [
[
"torch.utils.data.DataLoader"
]
] |
LucaZancato/stric | [
"8daeeca48b8d0b2db8156e7f1c66c0956c133353"
] | [
"main.py"
] | [
"import hydra\nimport os\n\nimport logging\nimport json\n\nimport numpy as np\nimport torch\nimport matplotlib.pyplot as plt\nfrom collections import defaultdict\nimport json\n\nfrom IPython import embed\n# from AD_models import AD_Time_Series\n# from AD_utils import AD_report, AD_dataset, plot_AD_dataset, AD_prepr... | [
[
"numpy.logspace",
"torch.tensor",
"numpy.concatenate",
"numpy.ones",
"numpy.random.uniform"
]
] |
dave-cz/esp32_power_meter | [
"649c2020be587b2d57d40dd3c201feec3596c2a0"
] | [
"server/server.py"
] | [
"import logging\nimport pandas as pd\nfrom flask import Flask, request\nfrom gevent.pywsgi import WSGIServer\nfrom time import sleep\n\nfrom func import rms, meas_to_influx, rms_to_influx, config\n\nlogger = logging.getLogger(config['log_name'])\nlogger.setLevel(logging.INFO)\nh_stream = logging.StreamHandler()\nh_... | [
[
"pandas.Timestamp"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.