Python-Fa14

CSE Training Workshops in Python, Fall 2014 • DCL L440, 9–11 am


Project maintained by uiuc-cse Hosted on GitHub Pages — Theme by mattgraham

All workshops will be held in L440 Digital Computer Laboratory, an EWS computer laboratory in the basement. There is no sign-up for this series—walk-ins are welcome and encouraged!

Setup (Canopy Python and I-Python Notebook)

For most of the lessons, we will require outside modules. While several methods for managing your own library of modules exists, we will use Enthought Canopy, which is installed on your EWS machines already. However, it works best when you are logged in with a Canopy user account, and free academic accounts are available and recommended.

To load Canopy, please input the following at a terminal window:

module load canopy

In many cases, we will also use I-Python notebooks, which are interactive workbooks for code. To open these, please navigate on the command line to your home directory (or wherever your downloaded ipynb files are located), and open the I-Python notebook interface:

cd
module load canopy
ipython notebook &

Introduction to Python

Sep. 3, 9:00–11:00 • DCL L440

This workshop targets students with little programming experience (in general) or with no prior exposure to Python. We will conduct a hands-on walkthrough of what Python has to offer as a foundation for later tutorials throughout the semester.

We will cover the following topics:

(If you don't know what any or all of these are, don't worry! We will explain them.)

Link to Lesson

Numerical Programming with Python

Sep. 10, 9:00–11:00 • DCL L440

This tutorial focuses on three key packages for scientific and numerical computing with Python: NumPy, SciPy, and MatPlotLib.

Lesson Notebooks

Right-click and Save As... these ipynb files to your desktop.

Support Files

Pandas (Python Data Analysis) Library

Sep. 17, 9:00–11:00 • DCL L440

The Pandas module provides an R-like interface for manipulating and analyzing data sets and their statistics.

Lesson Notebook

Right-click and Save As... this ipynb file to your desktop.

To open it, please open a command line window and enter the following:

cd ~/Desktop
module load canopy
ipython notebook pandas.ipynb

Demonstration File

Object-Oriented & Advanced Programming in Python

Sep. 24, 9:00–11:00 • DCL L440

We will introduce modules, classes, and other advanced capabilities of Python, including list comprehension and lambda headless functions.

Lesson Notebooks

Right-click and Save As... these ipynb files to your desktop.

The IPython Environment & Notebooks

Oct. 1, 9:00–11:00 • DCL L440

The IPython shell offers a number of useful and convenient enhancements to vanilla Python. The IPython notebook environment gives teachers, learners, and researchers an incredibly flexible and powerful means of interacting with code and data even across several languages and programming conventions.

Lesson Notebook

Right-click and Save As... this ipynb file to your desktop.

To open it, please open a command line window and enter the following:

cd ~/Desktop
module load canopy
ipython notebook pandas.ipynb

Demonstration Notebook

MPI4Py

Oct. 8, 9:00–11:00 • DCL L440

Parallel programming with MPI has typically been limited to systems languages like C, Fortran, and C++. However, the exciting new MPI4Py module expands MPI functionality to Python without much of the headache of writing with it in C. Come learn MPI4Py through applied short numerical examples and exercises.

We will work today on a shared remote server using IPython.

PyOpenCL

Oct. 15, 9:00–11:00 • DCL L440

Taught by Professor Andreas Kloeckner of Computer Science.

Machine Learning in Python

Oct. 22, 9:00–11:00 • DCL L440

Find out about basic principles of machine learning and the concomitant power of scikit-learn, a leading machine learning library.

Lesson Notebooks

Right-click and Save As... these ipynb files to your desktop.

Debugging in Python (PDB)

Oct. 29, 9:00–11:00 • DCL L440

We will cover exceptions, tracebacks, pdb, and other elements of using errors and error handling to your advantage in Python.

Lesson Notebooks

Right-click and Save As... this ipynb file to your desktop.

C & Fortran Interfaces

Nov. 5, 9:00–11:00 • DCL L440

Right-click and Save As... this ipynb file to your desktop.

To open it, please open a command line window and enter the following:

cd ~/Desktop
module load canopy gcc python
ipython notebook api.ipynb

Numba & Optimization in Python

Nov. 12, 9:00–11:00 • DCL L440

Right-click and Save As... this ipynb file to your desktop.

To open it, please open a command line window and enter the following:

cd ~/Desktop
module load canopy
ipython notebook numba.ipynb

Symbolic Manipulation with SymPy

Nov. 19, 9:00–11:00 • DCL L440

For our last workshop of the semester, we will review SymPy, a symbolic manipulation package comparable to other computer algebra systems such as Maple or Mathematica.

Right-click and Save As... this ipynb file to your desktop.

To open it, please open a command line window and enter the following:

cd ~/Desktop
module load canopy
ipython notebook sympy.ipynb

Solving Problems on Graphs and Meshes with PyDEC

Canceled • DCL L440

Taught by Professor Anil Hirani of Mathematics.

Feedback

Please let us know what you think about these workshops. This is the first time many of them have been taught and we are anxious to refine them and make them more useful to you. Link to short survey

About These Workshops

Contributors

Neal Davis and Lakshmi Rao developed these materials. This content is available under a Creative Commons Attribution 3.0 Unported License.

CC-BY-4.0

Contact

If you have any questions about course availability, concepts, or content, please contact Neal Davis, Training Coördinator for Computational Science & Engineering, at training at cse dot illinois dot edu.