Learning by doing!
http://docs.python-guide.org/en/latest/
Hard way is easier http://learnpythonthehardway.org
Google python class
https://developers.google.com/edu/python/
https://docs.python.org/2/tutorial/
Course assignments will be distributed through: http://nbviewer.ipython.org/github/oseledets/nla2015/blob/master/table_of_contents.ipynb
Our course repository - NLA 2015: https://github.com/oseledets/nla2015 (clone it to stay updated on new materials)
https://www.sourcetreeapp.com/
"IPython 3 was the last major monolithic release of IPython"
More details at:
Key components:
"IPython is the reference Jupyter kernel, providing a powerful environment for interactive computing in Python"
https://store.continuum.io/cshop/anaconda/
conda update ipython
conda update ipython-notebook
conda update ipython-qtconsole
CTRL+/
or Command+/
for commentingCTRL+[]
or Command+[]
for indentationCTRL+SHIFT+"-"
for splitting, SHIFT+M
for merging cellsMarkdown text with formulas inline : $a_{ij} = g_{i+j}$
Centered formula: $$ a_{ij} = \frac{g_{i+j}}{L^2} $$
Assignments must be submitted to Stellar http://stellar.mit.edu/.
Our course page: https://stellar.mit.edu/S/project/numericallinalg/
code should be readable first!
style guides
Usually code in python is slef-explanatory. However, if you don't understand something it might be helpful to vizualize it with Python Tutor:
from IPython.display import HTML
HTML("<iframe src=http://pythontutor.com/visualize.html#code=%23assigning+numbers%0Aa+%3D+b+%3D+c+%3D+3%0Ab+%3D+4%0A%0A%23list+(un-hashable+type%29%0Amy_own_list+%3D+%5B1,+3,+5,+6%5D%0Anew_list+%3D+my_own_list%0Anew_list%5B1%5D+%3D+10%0A%0A%23tuple%0Amy_own_tuple+%3D+(1,+2,+4,+5%29%0Anew_tuple+%3D+my_own_tuple%0A%0Anew_tuple%5B1%5D+%3D+3&mode=display&origin=opt-frontend.js&cumulative=false&heapPrimitives=false&textReferences=false&py=2&rawInputLstJSON=%5B%5D&curInstr=0 width=990 height=600></iframe>")
how not to code
looping through dictionaries http://docs.quantifiedcode.com/python-anti-patterns/performance/index.html
using wildcard imports (from ... import *) http://docs.quantifiedcode.com/python-anti-patterns/maintainability/from_module_import_all_used.html
Using single letter to name your variables http://docs.quantifiedcode.com/python-anti-patterns/maintainability/using_single_letter_as_variable_name.html
Comparing things to None the wrong way http://docs.quantifiedcode.com/python-anti-patterns/readability/comparison_to_none.html
Comparing things to True the wrong way http://docs.quantifiedcode.com/python-anti-patterns/readability/comparison_to_true.html
Using type() to compare types http://docs.quantifiedcode.com/python-anti-patterns/readability/do_not_compare_types_use_isinstance.html
Using an unpythonic loop http://docs.quantifiedcode.com/python-anti-patterns/readability/using_an_unpythonic_loop.html
Using CamelCase in function names http://docs.quantifiedcode.com/python-anti-patterns/readability/using_camelcase_in_function_names.html
...and many more, be sure to explore python-anti-patterns web site.