UW AMath High Performance Scientific Computing
AMath 483/583 Class Notes
Spring Quarter, 2013

Table Of Contents

Previous topic

Notes to accompany lab sessions

Next topic

Lab 8: Thursday April 24, 2014

This Page

Lab 1: Tuesday April 1, 2014

Brief overview of the class structure


Things to try in groups:

Please work together in groups of 2 or 3.

  • Log on to SageMathCloud. See Using SageMathCloud.

  • Create a new project and share it with your group members.

  • Open a terminal window. If people in your group aren’t comfortable with Unix, try out commands like ls, pwd, mkdir, mv, cp, etc. See Unix, Linux, and OS X.

  • Create and edit a new file named hello.py by typing:

    $ open hello.py

    at the terminal prompt $.

  • Add one line to this file and then click Save:

    print "Hello World!"
  • In the terminal window, type:

    $ python hello.py

    In should print out Hello World!

  • Edit the file to add the lines:

    import matplotlib        # python plotting package
    matplotlib.use("Agg")    # so plot commands work in this script
    from pylab import *      # imports lots of things like linspace, sin, plot
    x = linspace(0,1,1001)
    y = sin(10 * pi * x**2)
    fname = "myplot.png"
    print "Saved ",fname
  • Save the file and rerun it at the terminal prompt, then view the file:

    $ python hello.py
    $ open myplot.png
  • Open an IPython Notebook from the New menu.

  • Follow the instructions for “making a plot in IPython” from the page Using SageMathCloud.