Python Induction
Python is a general-purpose programming language which is crucial to several of the PMSC core and optional core modules. Many of the workshops in these modules involve interactive notebooks written in this language, and while these do not involve in-depth programming, they are much more approachable for students with more familiarity with the language. We find a lot of our students are already familiar with it to some degree, but several will not be, and it is important that incoming students make use of the summer vacation before they start the taught course to improve their knowledge of the language.
Links to online tutorials for self-guided learning of the Python programming language.
This material is designed to be completed at your own pace.
- The website of the Python project contains a simple introduction to getting python set up on your own computer and a basic python tutorial. Parts 1-4 (up to 4.6) are enough to get you up-and-running workshop code. It is quite long-winded but assumes no prior knowledge and is ideal for beginners:
https://docs.python.org/3/tutorial/ - The website of the SciPy (Scientific Python) project then takes you further in the direction of using Python for scientific applications. Parts 1.1-1.3 largely repeat what is covered above - the most relevant parts are 1.4 and 1.5: https://scipy-lectures.org/intro/index.html
- NumPy is a Python package used by nearly everyone doing any kind of scientific computing in Python. It allows you to manipulate arrays of floating-point data with a level of computational efficiency close to that of compiled code. Two pieces of introductory material can be found on their website: a "quickstart" guide (which despite its name is quite long!) at https://numpy.org/devdocs/user/quickstart.html and an "absolute beginners" guide at https://numpy.org/devdocs/user/absolute_beginners.html
- The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. They can be used in particular for Python-based interactive notebooks, and indeed that is the format for a number of assessed workshops within our training programme. The Project Jupyter homepage has extensive introductory material. There is also a Jupyter/NumPy tutorial here: https://github.com/kuleshov/cs228-material/blob/master/tutorials/python/cs228-python-tutorial.ipynb
An initial version of this information was collated by Nick Hine.