Add some algorithms in python