This website contains class resources, homeworks, and other useful information.

To find out more about the course, read the class flyer or course syllabus.

Visit the canvas website for the course to turn in your homework assignments and discuss with classmates.

A quick summary of each lecture's contents.

- Class goals and introduction. Getting an HPC account.
- Basic python types, loops, functions python_basics_examples.py
- Basics of scipy, array operations, and matplotlib scipy_matplotlib_basics.py
- Matplotlib figures, axes, patches arrow_graph.py. Go over HW1.
- Pandas dataframes and geographic plotting pandas_geoplotter_examples.py
- Python debugger, python profiler, overview of sampling from convex sets.
- Go over HW 2. Introduce HW 3. Generating uniform random points and vectorizing. in_class_example.py
- Finding the boundary of a convex region. Generating uniformly random points in a ball, transformation.
- Projecting onto an affice space. Vectorizing. affine_space.py
- Testing uniformity, chi-square test in many dimensions.
- Exam 1
- Go over Exam 1
- Parallel computing in Python. parallel.py data_store.py
- More parallel computing, aggregating histograms.
- Networkx, introduction to optimization packages. networks.py
- Go over HW 4. Solving shortest path with pycpx.
- Solving shortest path with cplex. Introduction to HW 5. sp.py
- Make up Exam 1
- Elementary Shortest Path with Resource Constraints
- Solving facility location with cplex. facility.py distances.csv openCosts.csv
- Extra lectures on Python:

- HW 1: Basic matrix operations in scipy and plotting with matplotlib.
- HW 2: Basic data set operations (pandas) and geographic plotting.
- geoplotter.py
- Example result:

- HW 3: Sampling from convex sets.
- convex_regions.zip
- Example walks:

- HW 4: Parallel computing, testing distribution convergence.
- Helpful code: hw4_code.zip

- HW 5: Routing Basics
- Street data: hw05_files.zip

- HW 6: Elementary Shortest Path with Resource Constraints
- Problem data: hw06_files.zip

Project Handouts:

- Project 1: Picking a team and a topic.
- Project Deliverables : Guidance on what to turn in and when.
- A guide on preparing presentations.
- A guide on preparing mathematical and scientific documents.

- Getting Started
- Accounts, connecting, basic Unix commands
- Copying files, text editors, starting a python interpreter, screen

- Python Basics
- Basic python data types
- Organizing code: functions, objects, and modules
- Searching for a module in the standard library

- Scipy and Matplotlib Basics
- Pandas and Matplotlib.basemap

- Request an HPC account: Request Form, you can also read the wiki documentation
- Connect: Use ssh. (Linux/Mac) search for an ssh tutorial (Windows) use putty
- Basic unix commands: search for a command line tutorial or a quick cheat sheet
- Copy files to/from: Use scp. (Linux/Mac) search for an scp example (Windows) use winscp
- Text editors: Pick one that works for you. SublimeText, gedit, Emacs, Vim
- Start python interpreter:
- Ssh into hpc21.me.utexas.edu. Create a directory
`/scratch/your_user_name`and move to it. - type
`ipython --ipython-dir=.`

- Ssh into hpc21.me.utexas.edu. Create a directory
- Screen:
- new:
`screen -S <sessionname> -h <num_lines>` - re-attach:
`screen -r -d <sessionname>` - list:
`screen -ls` - detach:
`CTRL a d` - Search for screen tutorial online

- new:

- Use the Python 2.7 documentation
- The python tutorial is a great place to look up basic and advanced syntax. Use it to learn about functions, classes, and modules. It should help you map other programming knowledge to Python, and learn the basic data types.
- Use library reference to find standard library modules to help get your work done quickly.

- Read numpy for MATLAB users if you are familiar with MATLAB.
- There are many more functions in scipy and numpy than you can remember. For a given task, seach online and look at the scipy reference or numpy reference to find the tool you are looking for.
- Matplotlib has many built-in plotting capabilities. We can also use the building blocks there to create complex custom visualizations. Usually, I use the matplotlib gallery to find something similar to what I want, and edit the code provided there.

- Read the Pandas documentation to learn about selecting rows, merging data sets, etc.
- Read the Matplotlib.basemap documentation for basics of geographic plotting.