Skip to content

Instantly share code, notes, and snippets.

View dapperfu's full-sized avatar

dapperfu (+++ATH0) dapperfu

View GitHub Profile
@dapperfu
dapperfu / gist:2e40f774204a55e86993a6875517ed5d
Created August 18, 2020 04:30
Batch Convert .MFC to .MF4 (MDF) files from CSS Electronics CAN Edge 2 in Linux.
# CSS Electronics
# CAN Edge 2
# Convert all .MFC found MFC files using all cores of the computer.
# Replace -P8 with the number of cores/threads.
find . -name "*.MFC" | xargs -n1 -P8 mdf2finalized --name "" --verbose 5 -i
echo "set prefix C-a" >> ~/.tmux.conf
tmux source-file ~/.tmux.conf
@dapperfu
dapperfu / gist:426a60313f21fa57e69c55dcb6f14344
Last active October 2, 2020 18:11
Ubuntu 20.04 new install fails to boot if install disk was previously part of a ZFS pool.

Issue

Ubuntu 20.04 will fail to boot if you install to a disk that was previously part of a ZFS pool.

A fresh Ubuntu 20.04 install will drop to (initramfs) prompt without much indication of why it failed.

mount has an issue where it doesn't automatically detect the file system (ext4). wipefs shows left over ZFS settings.

Resolution

@dapperfu
dapperfu / Makefile
Created June 10, 2020 17:46
Notebook to Docs.
# Python Bits
VENV = /tmp/Kalman-and-Bayesian-Filters-in-Python
.PHONY: venv
venv: ${VENV}
${VENV}:
@python3.8 -mvenv ${@}
@${VENV}/bin/pip install --upgrade pip setuptools wheel
@${VENV}/bin/pip install --upgrade --requirement requirements.txt
@dapperfu
dapperfu / Ubuntu20.04 ZFS on Root.md
Last active May 12, 2020 18:12
Lessons learned from Ubuntu 20.04 [Focal Fossa] ZFS-on-Root.
screen -dmS screen_name bash -c 'ls; exec bash'
screen -S screen_name -x -X screen bash -c 'ls; exec bash'
screen -S screen_name -x -X screen bash -c 'ls; exec bash'
screen -S ${ -x -X screen bash -c 'ls; exec bash'
@dapperfu
dapperfu / algebra2.m
Created February 16, 2020 10:47
Learning Matlab through Algebra examples.
%% Multiplying a Matrix by Another Matrix
% https://www.mathsisfun.com/algebra/matrix-multiplying.html
% But to multiply a matrix by another matrix we need to
% do the "dot product" of rows and columns ...
% what does that mean? Let us see with an example:
% Method 1: Using MATLAB.
A = [1 2 3
4 5 6]
@dapperfu
dapperfu / install.sh
Created February 2, 2020 02:50
Install inkcut with pipx
pipx install inkcut
pipx runpip inkcut install pyside2 pyqt5
@dapperfu
dapperfu / Makefile
Created January 29, 2020 19:43
kitti database downloader.
ZIP+=data_object_image_2.zip
ZIP+=data_object_image_3.zip
ZIP+=data_object_prev_2.zip
ZIP+=data_object_prev_3.zip
ZIP+=data_object_velodyne.zip
ZIP+=data_object_calib.zip
ZIP+=data_object_label_2.zip
ZIP+=devkit_object.zip
ZIP+=models_lsvm.zip
ZIP+=data_object_det_2.zip
@dapperfu
dapperfu / gist:b00d91845ebd77f2a403842ab3d4c614
Created September 4, 2019 13:29
Passing a (const char *) in ctypes.
dll = canape.dll
hdl = canape.handle
directory = ctypes.create_string_buffer(b"", 256)
size = ctypes.c_ulong()
# Asap3GetProjectDirectory
dll.Asap3GetProjectDirectory.argtypes=(TAsap3Hdl, ctypes.POINTER(type(directory)), ctypes.POINTER(ctypes.c_ulong))
dll.Asap3GetProjectDirectory.restype=ctypes.c_bool
result = dll.Asap3GetProjectDirectory(
hdl,