Skip to content

Instantly share code, notes, and snippets.

View talmo's full-sized avatar

Talmo Pereira talmo

View GitHub Profile
@talmo
talmo / seq_reader.py
Created March 6, 2026 20:06
Pure Python reader and converter for Norpix .seq video files (Piotr Dollar SeqIo format). Supports compressed (JPEG/PNG) and uncompressed formats with seek index caching, MP4 re-encoding via sleap-io, and CLI interface. Self-contained with PEP 723 inline dependencies — just uv run it.
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "numpy",
# "Pillow",
# "imageio-ffmpeg",
# "sleap-io",
# ]
# ///
"""Pure Python reader and converter for Norpix .seq video files.
@talmo
talmo / opensimroot-parameters.md
Created February 17, 2026 17:48
OpenSimRoot XML Input Parameters Reference

OpenSimRoot XML Input Parameters

A comprehensive listing of all input parameters that can be specified in OpenSimRoot XML configuration files, organized by functional category.

Parameters are specified in .xml files under InputFiles/plantParameters/[Species]/[Variety]/ for plant traits, InputFiles/environments/ for soil/atmosphere, and InputFiles/templates/ for reusable module templates. All are defined using <SimulaBase>, <SimulaTable>, and <SimulaConstant> XML elements.

Total: ~196 unique parameter names across ~20 functional modules.


@talmo
talmo / install_btop_gpu.sh
Created February 11, 2026 04:43
Install btop from source with NVIDIA GPU support (Ubuntu 24.04)
#!/usr/bin/env bash
set -euo pipefail
# Remove existing btop installs
if [ -f /usr/local/bin/btop ]; then
echo "Removing old btop at /usr/local/bin/btop..."
rm /usr/local/bin/btop
fi
if snap list btop &>/dev/null; then
echo "Removing snap btop..."
@talmo
talmo / tf2.6.3_without_avx.md
Last active June 26, 2025 21:51
Building TensorFlow 2.6.3 without AVX/AVX2 instructions

Building TensorFlow without AVX/AVX2 instructions

Overview

This describes steps to build a CPU-only TensorFlow wheel (.whl) without AVX/AVX2 instructions so it can be installed on machines with older CPUs that do not support AVX/AVX2 instructions (e.g., Intel Celeron N2830).

This solves errors that you might get when installing or importing TensorFlow that might say:

Illegal instruction (core dumped)

or

% Clean start!
clear all, clc
%% Parameters
% Path to input file
dataPath = '../data/examples/072212_163153.clip.h5';
% Dataset name
dset = '/box';
@talmo
talmo / vid2hdf5.m
Created June 14, 2018 13:32
An example of converting video (MP4/AVI/MOV/etc) to HDF5
% Clean start!
clear all, clc
%% Parameters
% Path to input file
videoPath = '..\..\leap\data\examples\072212_163153.clip.mp4';
% Path to output file
% savePath = '..\..\leap\data\examples\072212_163153.clip.h5';
savePath = 'C:\tmp\072212_163153.clip.h5';
@talmo
talmo / Output-Build.txt
Created February 25, 2016 00:24
Build errors when building SimpleElastix under Windows 8.1 x64
1>------ Build started: Project: ITK, Configuration: Release x64 ------
2>------ Build started: Project: Swig, Configuration: Release x64 ------
3>------ Build started: Project: elastix, Configuration: Release x64 ------
4>------ Build started: Project: SimpleITK, Configuration: Release x64 ------
4> Building Custom Rule C:/Toolbox/SimpleElastix/SuperBuild/CMakeLists.txt
4> CMake does not need to re-run because C:\se\CMakeFiles\generate.stamp is up-to-date.
4> Creating directories for 'SimpleITK'
4> No download step for 'SimpleITK'
4> No update step for 'SimpleITK'
4> No patch step for 'SimpleITK'
@talmo
talmo / error.log
Created February 24, 2016 23:57
Log from attempting to make SimpleElastix on Ubuntu 14.04
This file has been truncated, but you can view the full file.
[ 16%] Built target ITK
[ 32%] Built target PCRE
[ 48%] Built target Swig
[ 65%] Built target elastix
[ 67%] Performing forcebuild step for 'SimpleITK'
[ 69%] Performing build step for 'SimpleITK'
[ 9%] Built target SimpleITKData
[ 10%] Built target lua5
[ 10%] Built target lua
[ 10%] Built target SimpleITKExplicit