This file contains hidden or 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
| // This Source Code Form is subject to the terms of the Mozilla Public | |
| // License, v2.0. If a copy of the MPL was not distributed with this | |
| // file, You can obtain one at http://mozilla.org/MPL/2.0/ | |
| import { produce } from "immer"; | |
| import { | |
| SettingsTreeAction, | |
| SettingsTreeNode, | |
| SettingsTreeRoots, |
This file contains hidden or 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 ubuntu:focal | |
| ARG USER=jhurliman | |
| ARG BASE_DIR=/home/$USER/Documents/Code/ros2/ros2_galactic | |
| SHELL ["/bin/bash", "-c"] | |
| ENV DEBIAN_FRONTEND noninteractive | |
| RUN apt-get update && apt-get install -y locales | |
| RUN locale-gen en_US en_US.UTF-8 |
This file contains hidden or 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
| class LruCache<T> { | |
| private values = new Map<string, T>(); | |
| constructor(private maxEntries = 10) {} | |
| public get(key: string): T | undefined { | |
| const entry = this.values.get(key); | |
| if (entry != undefined) { | |
| this.values.delete(key); | |
| this.values.set(key, entry); |
This file contains hidden or 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++}:`) |
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 hidden or 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 |
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 hidden or 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 |
This file contains hidden or 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' |
This file contains hidden or 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 hidden or 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 hidden or 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 |