a poor man's motion detector in 50 lines of python