Skip to content

Instantly share code, notes, and snippets.

View jabooth's full-sized avatar

James Booth jabooth

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jabooth
jabooth / shiyang_load_mat.ipynb
Created July 27, 2016 18:12
Example of loading 3D data from .mat file into Menpo and converting to our types for landmarking
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jabooth
jabooth / Pickling menpofit pertained models.ipynb
Created June 12, 2016 16:53
Pickling menpofit pertained models
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jabooth
jabooth / Quick Guide to Barycentric Coords.ipynb
Last active September 27, 2018 23:00
Quick Guide to Barycentric Coords
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jabooth
jabooth / .gitconfig
Created June 3, 2016 07:44
.gitconfig
[user]
name = YOUR NAME
email = YOUREMAIL@PROVIDER.TLD
[credential]
helper = cache --timeout=3600
[core]
editor = vim
excludesfile = ~/.gitignore
[color]
ui = true
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jabooth
jabooth / ibug68.yml
Created December 3, 2015 11:29
iBUG 68 landmarkerio template
groups:
- connectivity:
- 0 1
- 1 2
- 2 3
- 3 4
- 4 5
- 5 6
- 6 7
- 7 8
@jabooth
jabooth / mirror.py
Last active September 7, 2015 09:34
Mirror incremental files for ffmpeg
from pathlib import Path
from shutil import copy
# find all the jpg images in this dir (000.jpg, 001.jpg, ...)
paths = list(Path('./').glob('*.jpg'))
pathnames = sorted([p.stem for p in paths])
maxcount = int(pathnames[-1]) * 2 + 1 # get the new max cont
for path in paths:
i = int(path.stem)
copy(str(path), str(Path('./') / '{:03d}.jpg'.format(maxcount - i)))
@jabooth
jabooth / ffmpeg_solutions.sh
Created September 7, 2015 09:31
ffmpeg recipes
# convert folder of 000.jpg, 001.jpg, ..., 443.jpg to video 60fps
ffmpeg -framerate 60 -i ./%03d.jpg -pix_fmt yuv420p -s hd1080 -c:v libx264 -preset veryslow -crf 28 -r 60 ~/output.mp4