Programming with Python

Registration: Please visit the OIT website

Place: The Edge Workshop Room, Bostock Library, Duke University

Time: 9:00 AM - 12.00 PM (part 1) and 1.30 PM - 4.30 PM (part2), Oct 28th 2015

This Duke-OSG event is being run by the open science grid (OSG), in collaboration with⋅ Software Carpentry⋅ and Duke Research Computing. The⋅ Open Science Grid (OSG) is a national scale distributed infrastructure for⋅ scientific computing. Software Carpentry's mission is to help scientists and engineers⋅ become more productive by teaching them basic lab skills for computing like program design, version control, data management, and task automation. Duke Research Computing offers⋅ services that are useful to research computing “as it is practiced” across Duke and⋅ often in collaboration with researchers at other institutions.

The best way to learn how to program is to do something useful, so this introduction to Python is built around a common scientific task: data analysis.

Our real goal isn't to teach you Python, but to teach you the basic concepts that all programming depends on. We use Python in our lessons because:

  1. we have to use something for examples;
  2. it's free, well-documented, and runs almost everywhere;
  3. it has a large (and growing) user base among scientists; and
  4. experience shows that it's easier for novices to pick up than most other languages.

But the two most important things are to use whatever language your colleagues are using, so that you can share your work with them easily, and to use that language well.

Setup Instructions

  • We will do all the exercises on login.duke.ci-connect.net.
  • If you do not have an account on Duke CI Connect, please sign up.
  • If you have an account on Duke CI Connect but forgot the password, click here.
  • You also need SSH installed on your laptop. For details, follow this link

Prerequisites

Learners need to understand the concepts of files and directories (including the working directory) and how to start a Python interpreter before tackling this lesson. This lesson references the IPython Notebook although it can be taught through any Python interpreter. The commands in this this lesson pertain to Python 2.7.

Getting ready

If you are following these lessons on your own computer, you will eed to download some files:

$ git clone https://github.com/SWC-OSG-Workshop/ExampleData.git

We host the IPython server for training here: https://ipython.osgconnect.net/swc-duke . You will need to log in with your Duke CI Connect account.