Python implementation of fast-oopsi