User Tools

Site Tools


python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
python [2013/04/23 13:44]
mantis [Cookbooks]
python [2018/08/09 10:12]
mantis [Spyder]
Line 1: Line 1:
 +====== Cookbooks ======
 +  * [[Python Cookbook]]
 +  * [[PylabRecipes]]
 +  * [[Pandas]]
  
 +====== IDEs ======
 +
 +
 +
 +[[https://​orf.at/​stories/​2450240/​2450242/​|PyCharm]] is our current favourite.  ​
 +
 +[[http://​code.google.com/​p/​spyderlib/​|Spyder]] is a nice platform-agnostic editor.
 +
 +
 +====== Shells ======
 +
 +===== IPython =====
 +
 +Nice interactive python shell.
 +
 +Benchmarking runtime can be done just like in bash, by prefixing a command with%time
 +<code python>
 +%time (numpy.array(b)==8).sum()
 +</​code>​
 +
 +====== Profiling ======
 +
 +A very simple and fast way to profile a single-threaded execution is:
 +
 +<code bash>
 +# sort profiling result by time
 +python -m cProfile -s time  my_script.py > profiling
 +</​code>​
 +
 +
 +For further info see e.g. [[http://​stackoverflow.com/​questions/​582336/​how-can-you-profile-a-python-script|this Stackoverflow thread]]
python.txt ยท Last modified: 2018/08/09 10:12 by mantis