Python Basics

Why Python?

Python is a general-purpose programming language that is popular and easy to use. For new programmers, it is a great choice as a first programming language. In fact, more and more university CS departments are centering their introductory courses around Python.

For a summary of reasons to move from Matlab to Python, please read this post.

This page on Udacity provides some more great reasons to use Python, along with resources for getting started.

Tutorial

If you are new to Python, please follow The Python Tutorial.

For the purposes of this workshop, be sure you understand the following sections:

  • Section 3: An Informal Introduction to Python
  • Section 4: More Control Flow Tools
  • Section 5: Data Structures

While the other sections are useful, you can learn them along the way.

Package Installation

First, make sure you have pip installed. pip is the recommended tool for installing Python packages.

To use the notebooks, you will need to install a few Python packages:

$ pip install --upgrade numpy scipy matplotlib ipython pandas sklearn librosa seaborn mir_eval ipywidgets

More Learning Resources