Code machine learning implemented in Python