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) \ |
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' |
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 9 columns, instead of 5. in line 7.
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
messages,batch_size,plugin_config,name,avg_byte_throughput,max_arena_size,max_in_use_size,max_mmap_size,close_time | |
large,small,mcap_default,messages=large;batch_size=small;plugin_config=mcap_default,360230333.3234964,999424,1677968,1007616,0.000673866 | |
large,small,mcap_nocrc,messages=large;batch_size=small;plugin_config=mcap_nocrc,360378541.6077541,1003520,1677456,1007616,0.000643136 | |
large,small,mcap_zstd,messages=large;batch_size=small;plugin_config=mcap_zstd,359844528.64106107,999424,1677280,1007616,0.000597093 | |
large,small,mcap_nochunking,messages=large;batch_size=small;plugin_config=mcap_nochunking,360667650.147003,999424,1677280,1007616,0.00059126 | |
large,small,sqlite_default,messages=large;batch_size=small;plugin_config=sqlite_default,335139326.56812894,1134592,2165904,0,0.000458133 | |
large,small,sqlite_resilient,messages=large;batch_size=small;plugin_config=sqlite_resilient,223319138.0299207,1134592,2161408,0,0.00205389 | |
large,medium,mcap_default,messages=large;batch_size=medium;plugin_config=mcap_default,359 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 9 columns, instead of 4. in line 7.
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
messages,batch_size,plugin_config,name,avg_byte_throughput,max_arena_size,max_in_use_size,max_mmap_size,close_time | |
large,small,mcap_default,messages=large;batch_size=small;plugin_config=mcap_default,198406545.84777477,999424,1896784,1007616,0.001389235 | |
large,small,mcap_nocrc,messages=large;batch_size=small;plugin_config=mcap_nocrc,198753701.76083803,999424,1895968,1007616,0.00135346 | |
large,small,mcap_zstd,messages=large;batch_size=small;plugin_config=mcap_zstd,196985836.29268298,999424,1896112,1007616,0.001433238 | |
large,small,mcap_nochunking,messages=large;batch_size=small;plugin_config=mcap_nochunking,195853825.78654373,999424,1896112,1007616,0.001555497 | |
large,small,sqlite_default,messages=large;batch_size=small;plugin_config=sqlite_default,232529684.43262097,1409024,2166544,0,0.000428092 | |
large,small,sqlite_resilient,messages=large;batch_size=small;plugin_config=sqlite_resilient,169399347.25798884,1404928,2161056,0,0.004874539 | |
large,medium,mcap_default,messages=large;batch_size=medium;plugin_config=mcap_defaul |
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
/** | |
* Matches against GLSL shader outputs. | |
*/ | |
const VARYING_REGEX = /[^\w](?:varying|out)\s+\w+\s+(\w+)\s*;/g | |
/** | |
* Adds line numbers to a string with an optional starting offset. | |
*/ | |
const lineNumbers = (source: string, offset = 0): string => source.replace(/^/gm, () => `${offset++}:`) |
NewerOlder