A useful reading list for basic and advanced Unix.
0.0 Introduction
Introductory notes
1.0 Unix
Unix notes
Unix exercises
2.0 Python 101
The aim of this Chapter is to introduce you to some of the fundamental concepts in Python. Mainly, this is based around fundamental data types in Python (int
, float
, str
, bool
etc.) and ways to group them (tuple
, list
and dict
). We then learn about how to loop over groups of things, which gives us control to iterate some process. We need to spend a little time on strings, as you will likely to quite a bit of string processing in Scientific Computing (e.g. reading/writing data to/from ASCII text files). Although some of the examples we use are very simple to explain a concept, the more developed ones should be directly applicable to the sort of programming you are likely to need to do. A set of exercises is developed throughout the chapter, with worked answers available to you once you have had a go yourself. In addition, a more advanced section of the chapter is available, that goes into some more detail and complkications. This too has a set of exercises with worked examples.
This course, GeogG122 Scientific Computing, is a term 1 MSc module worth 15 credits (25% of the term 1 credits) that aims to:
It is open to students from a number of MSc courses run by the Department of Geography UCL, but the material should be of wider value to others wishing to make use of scientific computing.
The module will cover:
At the end of the module, students should:
The course takes place over 10 weeks in term 1, on Wednesdays usually from 10:00 to 13:00 (09:00-13:00 in the first two sessions) in the Geography Department Unix Computing Lab (PB110) in the Pearson Building, UCL. Classes take place from the second week of term to the final week of term, other than Reading week. See UCL term dates for further information.
Assessment is through one piece of coursework that is submitted in both paper form and electronically via Moodle. See the Moodle page for more details.
Total scheduled hours: 32 hours
JGD: Dr. Gómez-Dans
Rooms: PB110 = Pearson Building Unix Lab, Room 110, 1st floor
There are several ways you can access this course material.
These notes are created in jupyter notebooks.
The course is all stored online in github, so you can just navigate to that site and download the files as you like.
All notes will have been downloaded for you to your DATA
area, so you can directly access them from there.
If you want to access these same notes from outside UCL, see connection from outsiude UCL.
Provided you have a relatively up to date version of ipython
and a few other tools such as pandoc
you can convert your own notebooks to other formats using ipython
, e.g.:
berlin% jupyter nbconvert --to html f2_intro.ipynb
You can also convert the notebooks to other formats though you might need some other tools as well for this. If you have a working copy of LaTeX
on your system (e.g. MacTeX on OS X), you can convert the notebooks to pdf format:
berlin% jupyter nbconvert --to latex --post PDF f2_intro.ipynb
Alternatively, you can obtain the whole course from github.
To download the whole course, you can:
using git
use the command git
, if available:
Create a place on the system that you want to work in (N.B., don't type berlin%
: that represents the command line prompt), e.g.:
berlin% mkdir -p ~/Data/msc
berlin% cd ~/Data/msc
berlin% git clone https://github.com/profLewis/geogg122.git
berlin% cd ~/Data/msc/geogg122
This will create a directory ~/Data/msc/geogg122
which has the current versions of the notebooks for the course and associated files.
If the course notes change at all (e.g. are updated), you can update your copy with:
berlin% git pull
To find out more about using git
, type git --help
, get help online or download and use a gui tool.
If you set up an account on github, you can fork the course repository to make your own version of the course notes, and add in your own comments and examples, if that helps you learn or remember things.
using a zip file
Download the course as a zip file:
berlin% mkdir -p ~/Data/msc
berlin% cd ~/Data/msc
berlin% wget -O geogg122.zip https://github.com/profLewis/geogg122/archive/master.zip
berlin% unzip geogg122.zip
berlin% cd ~/Data/msc/geogg122-master
Once you have copied the course material as described above (and have changed directory to where you have put the course (e.g. ~/Data/msc/geogg122-master
or ~/Data/msc/geogg122
) then cd
to the chapter you want, e.g.:
berlin% cd ~/Data/msc/geogg122/Chapter0_Introduction
and you can start the notebooks with:
berlin% ipython notebook
This should launch a web browser with the address http://127.0.0.1:8888/
or similar with links to the notebooks you have available.
To load a specific notebook, you can type e.g.:
berlin% ipython notebook f1_index.ipynb
For most users wanting to install a working python environment, Anaconda appears to be far easier and overall quite nice to use: https://store.continuum.io/cshop/anaconda/. Comes with Python notebooks, spyder and a wealth of other things not in some other releases.
You should be able to install python on a windows operating system and so could run most of the class material from any windows computer that you have. As we have noted above, you can download all of the class notes as python notebooks or other formats (such as html).
For windows users, it's probably best if you just use http://mobaxterm.mobatek.net/ to connect to the UCL system (you don't need exceed, it's free, got SFTP, etc).
For linux and OS X machines, it's very straightforward as you already have a unix system. For OS X, you can find the terminal in the Utilities
folder under Applications
. For X windows
on OS X, you may need to install this if you have a recent version of the operating system.
See notes on connection from outsiude UCL for more details.