Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and explanatory text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, machine learning and much more.
The lecture notes will be stored as Jupyter notebooks, this is a mix of formatted text, python code and code output. It requires the Jupyter notebook server to run it though, and therefore isn't a stand-alone but there is no difference between the Python code that goes into a programme file or a Jupyter notebook.
Growing user base in academia and industry.
Check out the number of SEPnet summer placement students who were using Python (also recent Alumni talks where they had an edge over others because of their python skills)
"Python has been an important part of Google since the beginning, and remains so as the system grows and evolves. Today dozens of Google engineers use Python, and we're looking for more people with skills in this language." said Peter Norvig, director of search quality at Google, Inc.
"Python is fast enough for our site and allows us to produce maintainable features in record times, with a minimum of developers," said Cuong Do, Software Architect, YouTube.com.
"Python plays a key role in our production pipeline. Without it a project the size of Star Wars: Episode II would have been very difficult to pull off. From crowd rendering to batch processing to compositing, Python binds all things together," said Tommy Burnette, Senior Technical Director, Industrial Light & Magic.
"Python is everywhere at ILM. It's used to extend the capabilities of our applications, as well as providing the glue between them. Every CG image we create has involved Python somewhere in the process," said Philip Peterson, Principal Engineer, Research & Development, Industrial Light & Magic.
"NASA is using Python to implement a CAD/CAE/PDM repository and model management, integration, and transformation system which will be the core infrastructure for its next generation collaborative engineering environment. We chose Python because it provides maximum productivity, code that's clear and easy to maintain, strong and extensive (and growing!) libraries, and excellent capabilities for integration with other applications on any platform. All of these characteristics are essential for building efficient, flexible, scalable, and well-integrated systems, which is exactly what we need. Python has met or exceeded every requirement we've had," said Steve Waterbury, Software Group Leader, NASA STEP Testbed.
We are now going to take a look at canopy, but which ever environment you choose to run python in it requires two elements:
A development Environment, where you edit code. This could be a basic text editor (not word processor), but it usual to use a text editor optimised for coding (this then will have useful features like recognising elements of the code and distinguishing them by colour, auto-completing commands, error checking, trace-back etc)
The Interpreter, the Python shell, where the computer runs the code.
These can be combined to form an integrated development environment (IDE) such as in Canopy, or Spyder within the Anaconda distribution.
During the course we will select one to guarantee compatibilty with all of the problem sheets.
# An example of an interpreter
#Here the hash symbol signifies a comment and the interpreter skips the line after the #
from math import sqrt
x=7.2 # Here I am assigning the value 7.2 to the variable x
y=sqrt(x)
print('The square root of 7.2=',y)
Until the moodle rollover will be stored on the departmental twiki:
https://twiki.ph.rhul.ac.uk/twiki/bin/view/Students/UnderGraduates/PostExamPython
Problem sheets 1-3 with accompanying material
Uploaded Jupyter Notebooks contained code examples
During the course this material will be moved to moodle
This course is for solving physics problems, we get onto Numpy, SCipy very quickly, in some general programming books these are advanced topics (chapters 90+) or not covered at all. There are many good python books for the basic syntax, for the more physics relate problems I recommend: