Python modules and functions for activity recognition