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
// Wraps an existing std::vector<uint8_t> as a flatbuffers::Allocator | |
class VectorAllocator : public flatbuffers::Allocator { | |
public: | |
explicit VectorAllocator(std::vector<uint8_t>& buffer) | |
: buffer_(buffer) { | |
buffer_.clear(); | |
} | |
uint8_t* allocate(size_t size) override { | |
buffer_.resize(size); |
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
# syntax=docker/dockerfile:1 | |
ARG PYTHON_VERSION=3.11 | |
FROM python:${PYTHON_VERSION}-slim | |
ARG PYTORCH_INSTALL_ARGS="" | |
ARG EXTRA_ARGS="" | |
ARG USERNAME=comfyui | |
ARG USER_UID=1000 |
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
{ | |
"last_node_id": 797, | |
"last_link_id": 1712, | |
"nodes": [ | |
{ | |
"id": 79, | |
"type": "ADE_ApplyAnimateDiffModelSimple", | |
"pos": [ | |
-0.0234637416563368, | |
-326.12276996452505 |
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
#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
#!/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) \ |
NewerOlder