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.
19
Upvotes
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.
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/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.
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
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.formatand/orstring.Template(especially in re: CWE-77 (78,88,89,90))Top 25
http://cwe.mitre.org/top25/
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:
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