python_code stringlengths 0 679k | repo_name stringlengths 9 41 | file_path stringlengths 6 149 |
|---|---|---|
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/model/anchors.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/model/activation_builder.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/exporter/image_batcher.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/exporter/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/exporter/onnx_exporter.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/exporter/trt_builder.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/exporter/onnx_utils.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/inferencer/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/inferencer/inference_trt.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/inferencer/inference.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/experiment_specs/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/callback/eff_ema_checkpoint.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/callback/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/callback/logging_callback.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/callback/eval_callback.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/callback/moving_average_callback.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/callback/lr_tensorboard.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/callback/average_model_checkpoint.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/callback/eff_checkpoint.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/trainer/efficientdet_trainer.py |
"""Train module."""
| tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/trainer/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/dataloader/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/dataloader/datasource.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/dataloader/data_visualizer.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/cv/efficientdet/dataloader/dataloader.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/model_optimization/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
import math
import numpy as np
import pytest
from tensorflow import keras
from nvidia_tao_tf2.common.utils import set_random_seed
# from nvidia_tao_tf2.backbones.efficientnet_tf import EfficientNetB0, EfficientNetB1, EfficientNetB5
from nvidia_tao_tf2.b... | tao_tensorflow2_backend-main | nvidia_tao_tf2/model_optimization/tests/test_pruning.py |
"""Unit tests for model optimization."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
| tao_tensorflow2_backend-main | nvidia_tao_tf2/model_optimization/tests/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/model_optimization/pruning/pruning.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/model_optimization/pruning/__init__.py |
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | tao_tensorflow2_backend-main | nvidia_tao_tf2/model_optimization/pruning/app.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
from setuptools import Command, find_packages, setup
import os
from os import ... | Dataset_Utilities-master | setup.py |
Dataset_Utilities-master | nvdu/__init__.py | |
Dataset_Utilities-master | nvdu/tools/__init__.py | |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
import future
import os
from os import path
import numpy as np
import pyrr
fro... | Dataset_Utilities-master | nvdu/tools/nvdu_ycb.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
#!/usr/bin/env python
try:
import pyglet
except Exception as ex:
print... | Dataset_Utilities-master | nvdu/tools/test_nvdu_visualizer.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode)
from .scene_object import *
class Box2d(SceneObject):
# Create a box fro... | Dataset_Utilities-master | nvdu/core/box.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
from pyrr import Quaternion, Matrix44, Vector3, euler
import numpy as np
from... | Dataset_Utilities-master | nvdu/core/scene_object.py |
from .utils3d import *
from .transform3d import *
from .scene_object import *
from .cuboid import *
from .camera import *
from .box import *
from .nvdu_data import * | Dataset_Utilities-master | nvdu/core/__init__.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
from .scene_object import *
# ========================= Cuboid2d ============... | Dataset_Utilities-master | nvdu/core/mesh.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
import numpy as np
import json
from os import path
from .transform3d import *
... | Dataset_Utilities-master | nvdu/core/camera.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
from pyrr import Quaternion, Matrix44, Vector3, euler
import numpy as np
# ==... | Dataset_Utilities-master | nvdu/core/utils3d.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
# import future
# from enum import IntEnum, unique
import numpy as np
import c... | Dataset_Utilities-master | nvdu/core/cuboid.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
from .scene_object import *
# ========================= Cuboid2d ============... | Dataset_Utilities-master | nvdu/core/pivot_axis.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
import future
from os import listdir, path
from ctypes import *
import json
# ... | Dataset_Utilities-master | nvdu/core/nvdu_data.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
from pyrr import Quaternion, Matrix44, Vector3, euler
import numpy as np
from... | Dataset_Utilities-master | nvdu/core/transform3d.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
import math
import sys
import cv2
from nvdu.core.cuboid import *
def is_poin... | Dataset_Utilities-master | nvdu/viz/image_draw.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
from pyrr import Quaternion, Matrix44, Vector3, euler
import numpy as np
from... | Dataset_Utilities-master | nvdu/viz/scene_object.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
import future
import pyrr
import pywavefront
import numpy as np
from ctypes im... | Dataset_Utilities-master | nvdu/viz/nvdu_visualizer.py |
Dataset_Utilities-master | nvdu/viz/__init__.py | |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
from pyrr import Quaternion, Matrix44, Vector3, euler
import numpy as np
from... | Dataset_Utilities-master | nvdu/viz/scene.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
import os
from os import path
# import asyncio
from pyrr import Quaternion, Ma... | Dataset_Utilities-master | nvdu/viz/mesh.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
from .utils3d import *
from .scene import *
class Viewport(object):
def _... | Dataset_Utilities-master | nvdu/viz/viewport.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
from pyrr import Quaternion, Matrix44, Vector3, euler
from pyglet.gl import *
... | Dataset_Utilities-master | nvdu/viz/camera.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
from pyrr import Quaternion, Matrix44, Vector3, euler
import numpy as np
from ... | Dataset_Utilities-master | nvdu/viz/pointcloud.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
from pyrr import Quaternion, Matrix44, Vector3, euler
import numpy as np
from ... | Dataset_Utilities-master | nvdu/viz/utils3d.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
from pyrr import Quaternion, Matrix44, Vector3, euler
import numpy as np
from ... | Dataset_Utilities-master | nvdu/viz/cuboid.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
import numpy as np
from pyrr import Quaternion, Matrix44, Vector3, euler
from ... | Dataset_Utilities-master | nvdu/viz/pivot_axis.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
import cv2
import numpy as np
from pyglet.gl import *
class BackgroundImage(o... | Dataset_Utilities-master | nvdu/viz/background_image.py |
# Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
# This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
# License. (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
import future
import os
from os import path
import pyglet
from pyglet.window i... | Dataset_Utilities-master | nvdu/viz/nvdu_viz_window.py |
# Import SparkSession
from pyspark.sql import SparkSession
import time
# Create SparkSession
spark = SparkSession.builder.appName("s3-read-test").getOrCreate()
# this is a public bucket containing some sample data for testing
data_path = "s3a://tpcds-share-emr/sf10-parquet/useDecimal=true,useDate=true,filterNull=fals... | spark-rapids-container-dev | k8s/read-s3-test.py |
# NVIDIA GPU metric module using the Python bindings for NVML
# Copyright (c) 2022, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | spark-rapids-container-dev | Databricks/ganglia/python_modules/nvidia.py |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Richard Hughes <richard@hughsie.com>
# Licensed under the GNU General Public License Version or later
from __future__ import print_function
import sys
import json
def main():
if len(sys.argv) != 2:
print("usage: %s supported-gpus.json" % sy... | yum-packaging-nvidia-driver-main | parse-supported-gpus.py |
#!/usr/bin/env python3
##
# Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# # Redistributions of source code must retain the above copyright
# not... | nvcomp-main | benchmarks/text_to_binary.py |
#! /usr/bin/env python
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import argparse
import os
def main():
parser = argparse.ArgumentParser()
parser.add_argument("input_file", type=str, help="the file to read the data from")
parser.add_argument("plot_directory", ty... | nvcomp-main | benchmarks/generate_bar_charts.py |
#!/user/bin/python
##
# Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# # Redistributions of source code must retain the above copyright
# notice,... | nvcomp-main | benchmarks/allgather_runall.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2020 Carlo Caione <ccaione@baylibre.com>
#
# Derived from plat-stm32mp1/scripts/stm32image.py
#
import argparse
import struct
import mmap
header_size = 0x200
ext_magic_number = 0x12348765
version = 0x00002710
def get_size(file):
fi... | optee_os-nvidia-rel-35 | core/arch/arm/plat-amlogic/scripts/aml_bin2img.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2017-2018, STMicroelectronics
#
import argparse
import struct
import mmap
header_size = 256
hdr_magic_number = 0x324D5453 # magic ='S' 'T' 'M' 0x32
hdr_header_ver_variant = 0
hdr_header_ver_minor = 0
hdr_header_ver_major = 1
hdr_version_... | optee_os-nvidia-rel-35 | core/arch/arm/plat-stm32mp1/scripts/stm32image.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2015, 2017, 2019, Linaro Limited
#
import sys
import math
algo = {'TEE_ALG_RSASSA_PKCS1_PSS_MGF1_SHA256': 0x70414930,
'TEE_ALG_RSASSA_PKCS1_V1_5_SHA256': 0x70004830}
enc_key_type = {'SHDR_ENC_KEY_DEV_SPECIFIC': 0x0,
... | optee_os-nvidia-rel-35 | scripts/sign_encrypt.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2019, Linaro Limited
#
import argparse
import sys
import zlib
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('--input',
required=True, type=argparse.FileType('rb'),
... | optee_os-nvidia-rel-35 | scripts/gen_stmm_hex.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2017, 2020, Linaro Limited
# Copyright (c) 2020-2022, Arm Limited.
#
import argparse
import array
from elftools.elf.elffile import ELFFile
import os
import re
import struct
import uuid
import zlib
def get_args():
parser = argparse.A... | optee_os-nvidia-rel-35 | scripts/ts_bin_to_c.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (C) 2021 Huawei Technologies Co., Ltd
def dump(msg, buf):
import codecs
print(msg, end='')
print(codecs.encode(buf, 'hex').decode('utf-8'))
def main():
import struct
import sys
img_type_name = {1: 'SHDR_BOOTSTRAP_... | optee_os-nvidia-rel-35 | scripts/dump_ta_header.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2021, Huawei Technologies Co., Ltd
#
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from elftools.elf.elffile import ELFFile
from elftools.elf.sections import SymbolTableSection
... | optee_os-nvidia-rel-35 | scripts/print_tee_hash.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2016, Linaro Limited
import struct
import argparse
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument('--input', required=False, dest='inf',
default='../out/arm/core/tee.bin',
... | optee_os-nvidia-rel-35 | scripts/tee_bin_parser.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2018, Linaro Limited
#
import argparse
import array
import os
import re
import sys
def get_args():
parser = argparse.ArgumentParser(description='Converts a binary file '
'into C source file defi... | optee_os-nvidia-rel-35 | scripts/bin_to_c.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2019, Linaro Limited
#
from __future__ import print_function
from __future__ import division
import argparse
import sys
try:
from elftools.elf.elffile import ELFFile
from elftools.elf.sections import SymbolTableSection
from e... | optee_os-nvidia-rel-35 | scripts/gen_ldelf_hex.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2015, Linaro Limited
def get_args():
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
'--prefix', required=True,
help='Prefix for the public key exponent and modulus in c file')
par... | optee_os-nvidia-rel-35 | scripts/pem_to_pub_c.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2019, Linaro Limited
#
from subprocess import Popen, PIPE
import argparse
def get_args():
parser = argparse.ArgumentParser(description='Helper script that updates '
'the CHANGELOG.md file.\n'
... | optee_os-nvidia-rel-35 | scripts/update_changelog.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2019, Linaro Limited
#
from __future__ import print_function
from __future__ import division
import argparse
import sys
import struct
import re
import hashlib
try:
from elftools.elf.elffile import ELFFile
from elftools.elf.consta... | optee_os-nvidia-rel-35 | scripts/gen_tee_bin.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2017, Linaro Limited
#
import sys
import re
def usage():
print("Usage: {0} <section reg exp match> [<skip section>...]".format(
sys.argv[0]))
sys.exit(1)
def main():
if len(sys.argv) < 2:
usage()
in_sh... | optee_os-nvidia-rel-35 | scripts/gen_ld_sects.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2017, Linaro Limited
#
import argparse
import errno
import glob
import os
import re
import subprocess
import sys
import termios
CALL_STACK_RE = re.compile('Call stack:')
TEE_LOAD_ADDR_RE = re.compile(r'TEE load address @ (?P<load_addr>0... | optee_os-nvidia-rel-35 | scripts/symbolize.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright Amazon.com Inc. or its affiliates
#
import typing
import boto3
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import (
AsymmetricSignatureContext,
utils as asym_utils,
... | optee_os-nvidia-rel-35 | scripts/sign_helper_kms.py |
#!/usr/bin/env python3
#
# Copyright (c) 2014-2017, Linaro Limited
#
# SPDX-License-Identifier: BSD-3-Clause
import argparse
import os
import subprocess
import sys
def get_args():
parser = argparse.ArgumentParser(description='Shows the memory usage '
'of an OP-TEE based on EL... | optee_os-nvidia-rel-35 | scripts/mem_usage.py |
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2018, Linaro Limited
#
import argparse
import sys
import re
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
def my_err(line_number, msg):
eprint('Error: line:' + repr(line_number) + ' ' + msg)
sys.exi... | optee_os-nvidia-rel-35 | scripts/arm32_sysreg.py |
#!/usr/bin/env python3
#
# Copyright (c) 2019, Linaro Limited
#
# SPDX-License-Identifier: BSD-2-Clause
from pathlib import PurePath
from urllib.request import urlopen
import argparse
import glob
import os
import re
import tempfile
DIFF_GIT_RE = re.compile(r'^diff --git a/(?P<path>.*) ')
REVIEWED_RE = re.compile(r'... | optee_os-nvidia-rel-35 | scripts/get_maintainer.py |
# Copyright (c) 2022, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | clara-ia-main | examples/algorithms/ct_bone_segmentation/python/ct_bone_seg_operator.py |
#!/usr/bin/env python3
# Copyright 2021, NVIDIA Corporation
# SPDX-License-Identifier: MIT
"""
Sample parser for redistrib JSON manifests
1. Downloads each archive
2. Validates SHA256 checksums
3. Extracts archives
4. Flattens into a collapsed directory structure
"""
import argparse
import os.path
import hashlib
import... | build-system-archive-import-examples-main | parse_redist.py |
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: MIT
""" Expose air_sdk package """
from .air_sdk import *
| air_sdk-main | __init__.py |
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: MIT
"""
Simulation module
"""
from . import util
from .air_model import AirModel
class Simulation(AirModel):
"""
Manage a Simulation
### json
Returns a JSON string repre... | air_sdk-main | air_sdk/simulation.py |
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: MIT
"""
Link module
"""
from . import util
from .air_model import AirModel
class Link(AirModel):
"""
Manage a Link
### delete
Delete the link. Once successful, the objec... | air_sdk-main | air_sdk/link.py |
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: MIT
"""
SSH Key module
"""
from . import util
from .air_model import AirModel
class SSHKey(AirModel):
"""
Manage a SSH Key
### delete
Delete the key. Once successful, th... | air_sdk-main | air_sdk/ssh_key.py |
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: MIT
"""
Worker module
"""
from . import util
from .air_model import AirModel
class Worker(AirModel):
"""
Manage a Worker
### json
Returns a JSON string representation of... | air_sdk-main | air_sdk/worker.py |
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: MIT
"""
NVIDIA Air API module
"""
#pylint: disable=too-many-public-methods
from datetime import date, datetime
import logging
from json import JSONDecodeError
import requests
from reques... | air_sdk-main | air_sdk/air_api.py |
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: MIT
"""
Service module
"""
from . import util
from .air_model import AirModel
class Service(AirModel):
"""
Manage a Service
### delete
Delete the service. Once successfu... | air_sdk-main | air_sdk/service.py |
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: MIT
"""
Capacity module
"""
from . import util
from .air_model import AirModel
class Capacity(AirModel):
"""
View platform capacity
### json
Returns a JSON string repres... | air_sdk-main | air_sdk/capacity.py |
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: MIT
"""
Token module
"""
from . import util
from .air_model import AirModel
class Token(AirModel):
"""
View an API Token
### json
Returns a JSON string representation of... | air_sdk-main | air_sdk/token.py |
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: MIT
"""
Permission module
"""
from . import util
from .air_model import AirModel
class Permission(AirModel):
"""
Manage a Permission
### delete
Delete the permission. On... | air_sdk-main | air_sdk/permission.py |
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: MIT
"""
Helper utils
"""
import datetime
import logging
from json import JSONDecodeError
from dateutil import parser as dateparser
from .exceptions import AirUnexpectedResponse
def rai... | air_sdk-main | air_sdk/util.py |
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: MIT
"""
Organization module
"""
from . import util
from .air_model import AirModel
class Organization(AirModel):
"""
Manage an Organization
### delete
Delete the organiz... | air_sdk-main | air_sdk/organization.py |
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: MIT
"""
Base classes for AIR object models
"""
from datetime import date, datetime
import json
from . import util
from .exceptions import AirObjectDeleted
class AirModel:
""" Base cl... | air_sdk-main | air_sdk/air_model.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.