Skip to content

Instantly share code, notes, and snippets.

@willprice
willprice / .travis.yml
Last active June 10, 2025 17:13
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
@willprice
willprice / README.md
Last active April 28, 2025 16:42
Install OpenCV 4.1.2 for Raspberry Pi 3 or 4 (Raspbian Buster)

Install OpenCV 4.1.2 on Raspbian Buster

$ chmod +x *.sh
$ ./download-opencv.sh
$ ./install-deps.sh
$ ./build-opencv.sh
$ cd ~/opencv/opencv-4.1.2/build
$ sudo make install
@willprice
willprice / INSTALL_NOTES.md
Last active April 3, 2025 18:07
Arch installation instructions

Arch install notes

Boot loader

  • Create a separate boot partition, arch manual suggests using ESP as boot partition but this leads to headaches.
  • Skip the autodetect functionality of refind and use a manual stanza
  • Ensure you change the volume entry in refind's boot stanza to the label of your boot device.
@willprice
willprice / README-opencv-3.1-raspberry-pi-installation.md
Last active March 29, 2025 23:13
How to install OpenCV 3.1 on Raspbian Jessie (Lite)

Installing OpenCV 3.1 on Raspbian Jessie

Prerequisites

  • Keep your system up to date:
    • $ sudo apt-get update
    • $ sudo apt-get upgrade
    • $ sudo reboot
  • Make sure you've got an internet connection.
  • Make sure you've got
  • wget
@willprice
willprice / KINETICS_LABELS.md
Last active December 31, 2024 00:27
Kinetics Dataset Labels (name to ID)

Kinetics Numeric/String labels

These are mapping files that go between class IDs to class names. These are generated from the training CSV files from each dataset by collecting the unique classes, sorting them, and then numbering them from 0 upwards.

@willprice
willprice / mp4_tools.py
Last active August 13, 2024 14:49
Convert video array to mp4 blob
from io import BytesIO
import av
import numpy as np
def video_array_to_mp4_blob(video: np.ndarray, fps: float = 24) -> bytes:
"""
Args:
video: Video array of shape :math:`(T, H, W, 3)` and range :math:`[0, 255]` with type ``np.uint8``.
@willprice
willprice / relative_symlink.py
Created August 5, 2020 13:47
Create relative symlinks in python
@willprice
willprice / PBS_PRO_CHEAT_SHEET.md
Last active May 22, 2024 04:53
PBS pro cheat sheet

PBS Pro command cheat sheet

List nodes and their features

$ pbsnodes

@willprice
willprice / pillow-simd-libjpeg-turbo.md
Created February 28, 2021 09:52
Pillow-SIMD with libjpeg/turbo
# The following steps are based on
# https://docs.fast.ai/performance.html#installation

$ conda install -y -c conda-forge gxx_linux-64 
$ conda uninstall -y --force jpeg libtiff
$ conda install -y -c conda-forge libjpeg-turbo --no-deps
$ pip uninstall -y pillow
$ export CXX=x86_64-conda-linux-gnu-g++
$ export CC=x86_64-conda-linux-gnu-gcc