Published using Google Docs
Homework 0: Software Preparation, Python
Updated automatically every 5 minutes

Practical Data Science

Fall 2013

Homework 0

The intent of this homework is to ensure you’re setup to use the tools that we’ll be using throughout this course: the unix shell and the python programming language, and to give you some initial exposure into these tools.

1. Setting up a Unix Shell- Depending on what operating system you’re using, setup will vary.

Windows: Install Cygwin, official install documentation

Mac: Terminal or Iterm2

Linux users or users of other operating systems: Ask for help if they are unfamiliar with using a terminal.

Once you have your unix terminal is up and running, try issuing the command:

echo ‘hello world!’

Perhaps your first, albeit very modest unix program! While you have your terminal open, it is worthwhile spending a moment to set up the colors and fonts to something you’re comfortable with. Many users prefer green text on a black background. It looks like the matrix and is easy on the eyes. If you want to look ahead, you can go over Basic Unix Commands for the Data Scientist.

2. Installing Python- We will be using the Anaconda python distribution.

Windows: Install Anaconda, configure with Cygwin. Official documentation

Mac: Official Install Documentation

Linux: Official Install Documentation

One of the primary criticisms of python are related to difficulties installing all the libraries that make python such a powerful tool. Anaconda encapsulates many libraries in a single install.

If you want to start programming python in an interactive environment, type ipython in your terminal to bring up a special, very powerful python terminal. Try this command:

print ‘hello world!’

A very simple python program! If you’re eager to learn more, check out learnpython.org.

Suggested:

3. Read Python: A Tool for the Practical Data Scientist

4. Skim through Learn Python the Hard Way. We’ll cover this material in greater depth in week two. Note that we’re using the using a slightly different setup than described in LPtHW, namely a terminal and Anaconda python. However, the suggested notepad applications (notepad++ and textwrangler) are both applicable and can be installed unless you prefer an alternate text editor (emacs, vim, sublime, nano, etc) or a more complex development environment like eclipse or visual studio. Note that in the latter case, we may not be able to help you with any weird issues.