r/IPython • u/Orphion • Jul 03 '13
Crash Course in Python for Scientists
Edit: Here's the link
I've pulled together some notes from a course I taught 15 years ago to a group of scientists, and have updated them as an IPython notebook. I'd welcome any feedback you have on what is effective or not effective in these notes.
2
u/gash789 Jul 03 '13
You begin with "Python as a calculator" while this is useful it is far from the most powerful application. Perhaps try to sell Python for it's great features for a scientist (maybe solve an ODE and plot the results) first, then the rest can be skimmed for things on interest.
1
u/Orphion Jul 05 '13
To be totally honest, I'm not really trying to sell python, as much as I'm trying to provide a relatively terse overview of the fundamentals that I think my coworkers need. I had 3 or four people ask me how to learn python in the same week, including one person who signed up for a week long course. I don't really think you need a whole week to learn python, particularly if you already know a language, you just need enough that you can actually start using it to get work done.
1
u/NomadNella Jul 04 '13
Here is a version that runs with the Python3.2 version of IPython. It took me a while because the file was so long and I had problems with Firefox remaining stable. I kept getting an unresponsive script warning when I hit "Run all Cells".
I didn't document my changes so you might want to explain the modifications in the final version. Also, the final version would be better to have it as a collection of smaller files for stability reasons.
Thanks for all the work you put into it.
1
u/Orphion Jul 04 '13
Thanks very much!
1
u/NomadNella Jul 04 '13
These are a four part split:
I tried to embed links at the top and bottom of each for navigation but when I went back to edit the gist it was only partially loading. I'm guessing you can only have so much in memory with a gist but I don't know. I'm sure this would not be a problem if it was hosted on git directly.
Please post again if you update them further.
3
u/Orphion Jul 04 '13
That's nice. I'm planning an update after some more feedback rolls in, and I think I'll move it over to the normal github and split it into 4 pieces, as you suggest. I'll let you know when I do.
1
2
u/NomadNella Jul 03 '13 edited Jul 04 '13
This is great! The one thing I would like to add it write it for Python3 or have an IPython3 version of it.
1
1
u/westurner Jul 04 '13 edited Jul 04 '13
Strings
Input: External modules tablib and/or pandas (pandas.read_table()) help to abstract and formalize string processing / data munging logic.
Output: str.format and/or string.Template (especially in re: CWE-77 (78,88,89,90))
Top 25
1
u/westurner Jul 04 '13
I wish I could #link to your excellent References section. Many of these links would be great for the sidebar.
http://www.reddit.com/r/learnpython/wiki/index is a great place to start.
Additional references:
http://scipy-lectures.github.io is another set of great scientific python tutorials.
http://scikit-learn.org/dev/developers/index.html#coding-guidelines
https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
1
u/pietrod21 Dec 28 '13 edited Dec 30 '13
You do a very good and useful work!!!
(Also if I will follow this one instead because I'm studying Python 3.3.2)
+/u/bitcointip 1 coffee
Enjoy a coffee!! :D
2
u/Patorogo Jul 03 '13
Nice! I'm always on the lookout for this kind of tutorials as I'm a scientist who uses Python and likes to proselytize it.
I've only given it a quick look, but I would like to suggest 2 things. First, I think it's worth mentioning optional arguments in the Overview (as they are widely use). Second, when parsing files, I think it's better to use (and teach) the functions and modules already developed, like the csv module or the loadtxt function from numpy; easier and faster.
One last thing, is it possible to add an index to an IPython notebook? That would be great.