python code for some  ML algorithm