Stochastic optimization algorithms on Python