Python Basics and Dependencies

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
    • numbers: int, float
    • strings
    • lists
  • Section 4: More Control Flow Tools
    • if statements
    • for statements
    • range
    • functions
  • Section 5: Data Structures
    • list comprehensions
    • tuples
    • dictionaries
    • looping techniques

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

Package Installation

To follow the material on this site, you will need to install additional Python packages.

Follow the instructions on the GitHub repository README.

  1. If you’re totally new, the simplest solution is to download and install Anaconda for Python 3.x.

  2. Install librosa and ffmpeg.

You will also probably want to install pip. pip is the recommended tool for installing most other Python packages.

Library Dependencies

[2018 March 12] These notebooks reflect the following package versions:

  • numpy 1.14.2
  • scipy 1.0.0
  • matplotlib 2.2.0
  • ipython 6.2.1
  • jupyter 1.0.0
  • librosa 0.6.0
  • scikit-learn 0.19.1
  • pandas 0.22.0

More Learning Resources