Machine learning exercises in python