This page contains all the prescribed and recommended study material for Scientific Computing 272.

For material that is off-site—for example, videos—Inetkey may need to be open. Just remember that you may not have Inetkey open for any assessment.

Notes and Slides

Scientific Computing 272 has no prescribed textbook. The documents and slides in this section are your main resources for studying.

Lecture Slides

# Title Size (bytes) Last Updated
0. Introduction to Linux 282 120 2016-02-04
1. Introduction to Programming with Python 1 855 318 2020-01-08
2. Strings in Python 1 820 233 2020-01-08
3. Modules in Python 1 833 655 2020-01-09
4. Lists in Python 1 846 412 2020-01-09
5. Making Choices in Python 1 831 237 2020-01-10
6. Repetition in Python 1 834 968 2020-01-13

Notes and Documentation

Title Comments
Advanced Python (WB372) Chapter 2 for list comprehensions and data types; Chapter 3 for exceptions.
M. Scott Shell’s Introduction to Numpy and Scipy (local copy)
Nicolas P. Rougier’s From Python to Numpy A tutorial introduction by way of Conway’s game of life.
Nicolas P. Rougier’s Matplotlib tutorial
Numpy and Scipy Documentation
Matplotlib Examples The examples we considered in the lectures (and more!).

Linux

Web Resources for the Linux Shell

Resource Description
The Unix Shell by Software Carpentry Sections 1 to 4, and 7 are highly recommended reading. They contain lots of examples, and some exercises to boot.
LinuxCommand.org A website dedicated to learning the Linux command line. Here you may also download a free PDF copy of William Shotts’s book The Linux Command Line. Chapters 1 to 4, and 6 are recommended reading; Chapter 5 should be interesting to students taking computer science as a subject.
explainshell.com Allows you to type in a command, and then explains what each argument means.

Linux Shell Commands

The information available at the links in the table below can also be accessed as local Linux manual (man) pages. Simply type man ⟨command⟩ Enter, where you substitute ⟨command⟩ by the name of the command about which you require more information.

A Very Important Safety Announcement

By default, if you have sufficient permissions to perform a certain action, commands that can overwrite existing data, such as cp, mv, and rm, perform their intended tasks without asking for confirmation from the user, even if it means destroying an existing file. So, before hitting Enter after typing any command, be sure that you know its effects. Also, use the -i option, where appropriate, to protect yourself.

Command Description Notes
bzip2 (and bunzip2) a block-sorting file compressor By default, bunzip2 will only work if the files have a .bz2 extension. Also, bzip2 deletes the original file after compression, and bunzip2 deletes the .bz2 it uncompressed.
cat concatenate files and print on the standard output If you use cat on its own, with only one filename as argument, it will simply display the contents of that file on the screen.
cd change directory
cp copy files and directories Look at the -p and -r options.
chmod change file mode bits Make sure that you understand to which type of user is referred to by u, g, o, and a, respectively. Also, make sure you understand what is meant by each of r, w, and t, as they apply to both files and directories.
cut remove sections from each line of files Look at the -c, -d, and -f options.
file determine file type This command is pretty useful if you have downloaded something, and you want to be sure of what Linux thinks about its contents instead of just trusting the file extension.
grep print lines matching a pattern Look at the -v option. You should know what the ^ and $ anchors do. (Hey, this is my area of research, so expect to hear more about regular expressions.)
head output the first part of files Look at the -n option. It has a companion command in tail.
ls list directory contents Look at the -a and -l options.
less file filter for scrolling on screen The original command more is also available, but can only scroll forwards, whereas less can also scroll backwards. So, indeed, less is more.
mkdir make directories Look at the -p option.
mv move (rename) files If you are a shell novice, I suggest you always use the -i option.
pwd print name of current/working directory
rm remove files or directories You must know the effects of the -f, -i, and -r options. If you are a shell novice, I suggest you always use the -i option. And do not—especially when “helped” by another student—use rm -rf unless you are sure of what you are doing. Caveat emptor! You have been officially warned (in Latin).
rmdir remove empty directories You can only remove empty directories; otherwise, use rm -r, but be very careful!
sort sort lines of text files Look at all the options. Pay particular attention to what happens when you use the -n option.
tail output the last part of files Look at the -n option. The -f option is quite interesting; can you think for what it would be useful?
tar archive utility It can save many files together into a single archive (file), and also extract files from an archive. Look at the -c, -f, -j, -t, -x, -v, and -z options.
uniq report or omit repeated lines This command does not detect repeated lines unless they are adjacent, and therefore, you might find it necessary to use sort first.
wc print newline, word, and byte counts for each file Look the -l, -m, and -w options.

Videos: The Linux Shell

More excellent resources for learning about the Linux shell is available on the Software Carpentry Unix Shell website.

Introduction to the Shell

© Software Carpentry

The Shell: Files & Directories

© Software Carpentry

The Shell: Creating & Deleting

© Software Carpentry

The Shell: Pipes & Filters

© Software Carpentry

The Shell: Permissions

© Software Carpentry

The Shell: Finding Things

© Software Carpentry

Linear Algebra

Videos: Linear Algebra

The following videos are especially for those who have not studied linear algebra as part of Mathematics 114/144. Linear algebra is an important part of doing scientific calculations on a computer. If you do not have this background, you will have to do a little self study. Fortunately, it is not difficult to teach yourself the basic principles.

Introduction to the Matrix

© Kahn Academy

Representing Data with Matrices

© Kahn Academy

Scalar Multiplication

© Kahn Academy

Matrix Addition and Subtraction

© Kahn Academy

Transpose of a Matrix

© Kahn Academy

Matrix Multiplication Introduction

© Kahn Academy

Multiplying a Matrix by a Matrix

© Kahn Academy

Defined and Undefined Matrix Operations

© Kahn Academy