Skip to content

Instantly share code, notes, and snippets.

@aubreyrjones
aubreyrjones / resample.hpp
Last active February 4, 2024 14:38
C++17 realtime, embedded windowed sinc interpolation resampling
// This code calls CMSIS-DSP for fast math on embedded ARM chips.
// You can replace the CMSIS functions easily with your own
// sinf, cosf, and bilinear interpolator.
#include <array>
#include <arm_math.h>
namespace resample {
/// @brief Fastest available sinf() function.
@aubreyrjones
aubreyrjones / dare.js
Created January 2, 2022 19:14
Websocket event client
function createEnum(values) {
const enumObject = {};
for (const val of values) {
enumObject[val] = val;
}
return Object.freeze(enumObject);
}
const ChannelState = createEnum(['Created', 'Connecting', 'Authorizing', 'Subscribed', 'Error', 'Closed']);
@aubreyrjones
aubreyrjones / mirror_plot.py
Created March 9, 2021 06:26
A script that y-mirrors the output from CLO3D.
#!/usr/bin/env python
import argparse
def parse_list(body):
return map(float, body.split(','))
def list_max(lst, curMax):
return reduce(max, lst, curMax)
sqlite> select * from layer_groups_annotation_layers;
1|layer_group_01|anno_layer_01
2|layer_group_01|anno_layer_02
3|layer_group_02|anno_layer_03
4|layer_group_03|anno_layer_04
5|layer_group_01|anno_layer_04
sqlite> select layerName, 'imageLayer', groupName from layer_groups_annotation_layers group by layerName;
anno_layer_01|imageLayer|layer_group_01