Python scripts. Motion detector