This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_L4T_major_version_only { | |
# Will return the L4T <release>.<major> version (ex: "32.6" or "32.4") | |
local RELEASE=$(cat /etc/nv_tegra_release | grep -oP "R\d{2}" | grep -oP "\d{2}") | |
local MAJOR_VERSION=$(cat /etc/nv_tegra_release | grep -oP "REVISION: \d{1}\.\d{1}" | grep -oP "\d{1}.\d{1}" | grep -oP "\d{1}". | grep -oP "\d{1}") | |
echo "${RELEASE}.${MAJOR_VERSION}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* base64.js: An extremely simple implementation of base64 encoding / decoding using node.js Buffers | |
* | |
* (C) 2010, Nodejitsu Inc. | |
* (C) 2011, Cull TV, Inc. | |
* | |
*/ | |
var base64 = exports; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cxxabi.h> | |
#include <typeinfo> | |
CATCH_TRANSLATE_EXCEPTION(const std::exception& e) { | |
std::string s; | |
int status; | |
const char* name = typeid(e).name(); | |
char* realname = abi::__cxa_demangle(name, 0, 0, &status); | |
if (realname) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -it --rm --privileged -v /:/host ubuntu chroot /host bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <algorithm> | |
#include <array> | |
template <class T, size_t N> | |
class CircularArray { | |
public: | |
CircularArray() {} | |
CircularArray(const T initValue) { std::fill_n(data_.begin(), data_.size(), initValue); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""Publish ground truth or inference COCO JSON labels to Aquarium.""" | |
import argparse | |
import os | |
import typing as tp | |
from pathlib import Path | |
import aquariumlearning as al |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Convert a tab-separated text file list of timestamped body marker positions | |
from <https://accad.osu.edu/research/motion-lab/mocap-system-and-data> into an | |
MCAP file. | |
""" | |
import argparse | |
import csv | |
import json | |
import typing as tp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.ndimage import center_of_mass | |
from typing import List | |
Vec2 = Tuple[float, float] | |
def sample_near_center_of_mass( | |
mask: NDArray[np.uint8], num_samples: int = 10, distance: float = 5 | |
) -> List[Vec2]: | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
docker run --init \ | |
-d \ | |
--restart unless-stopped \ | |
--hostname jupiter.martian.ag \ | |
--log-opt max-size=50m \ | |
-p 6006:6006 \ | |
-e DOCKER_USER=$(id -un) \ | |
-e DOCKER_USER_ID=$(id -u) \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias killgpu='nvidia-smi --query-compute-apps=pid --format=csv,noheader | xargs --no-run-if-empty sudo kill' |
NewerOlder