Category Archives: programming

Python Note

0.02 multiplier 0.02 * 35 = 0.7000000000000001 2*35/100 = 0.7 round: Python 3 used bankers rounding round(2.5) = 2 round(2.5 + 1e-10) = 3 round(1.5) = 2 Advertisements

Posted in programming | Leave a comment

freeze

Create a record of the installed libraries in a text file (requirements.txt). Dude I should have known it before… $ pip freeze > requirements.txt     Better method: use pipreqs http://www.idiotinside.com/2015/05/10/python-auto-generate-requirements-txt/   $ pipreqs /path/  

Posted in Linux, programming | Tagged , | Leave a comment