python_basics.ipynb 4.36 KB
Newer Older
1 2
{
 "cells": [
Steve Tjoa's avatar
Steve Tjoa committed
3 4 5 6 7 8 9
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "[← Back to Index](index.html)"
   ]
  },
10 11 12 13
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
14
    "# Python Basics and Dependencies"
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Why Python?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "[Python](https://python.org) 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.\n",
    "\n",
    "For a summary of reasons to move from Matlab to Python, please read [this post](https://stevetjoa.com/305).\n",
    "\n",
    "This page on [Udacity](https://www.udacity.com/programming-languages/python) provides some more great reasons to use Python, along with resources for getting started."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Tutorial"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If you are new to Python, please follow [The Python Tutorial](https://docs.python.org/2/tutorial/index.html).\n",
    "\n",
    "For the purposes of this workshop, be sure you understand the following sections:\n",
    "\n",
    "- Section 3: An Informal Introduction to Python\n",
51 52 53
    "    - numbers: `int`, `float`\n",
    "    - strings\n",
    "    - lists\n",
54
    "- Section 4: More Control Flow Tools\n",
55 56 57 58
    "    - `if` statements\n",
    "    - `for` statements\n",
    "    - `range`\n",
    "    - functions\n",
59
    "- Section 5: Data Structures\n",
60 61 62 63
    "    - list comprehensions\n",
    "    - tuples\n",
    "    - dictionaries\n",
    "    - looping techniques\n",
64 65 66 67
    "\n",
    "While the other sections are useful, you can learn them along the way."
   ]
  },
68 69 70 71 72 73 74 75 76 77 78
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Package Installation"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
79 80 81 82
    "To follow the material on this site, you will need to install additional Python packages.\n",
    "\n",
    "Follow the instructions on the [GitHub repository `README`](https://github.com/stevetjoa/stanford-mir#how-to-use-this-repo).\n",
    "\n",
Sumeyra's avatar
Sumeyra committed
83
    "1.  If you’re totally new, the simplest solution is to download and install [Anaconda for Python 3.x](https://www.continuum.io/downloads). \n",
84 85
    "    \n",
    "2.  Install [librosa](https://librosa.github.io/librosa/install.html) and [ffmpeg](https://librosa.github.io/librosa/install.html#ffmpeg)."
86 87 88 89 90 91
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
92
    "You will also probably want to [install pip](https://pip.pypa.io/en/stable/installing/). pip is the recommended tool for installing most other Python packages."
93 94
   ]
  },
Steve Tjoa's avatar
Steve Tjoa committed
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Library Dependencies"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "[2018 March 12] These notebooks reflect the following package versions:\n",
    "\n",
    "-   numpy 1.14.2\n",
    "-   scipy 1.0.0\n",
    "-   matplotlib 2.2.0\n",
    "-   ipython 6.2.1\n",
    "-   jupyter 1.0.0\n",
    "-   librosa 0.6.0\n",
    "-   scikit-learn 0.19.1\n",
    "-   pandas 0.22.0\n",
    "\n"
   ]
  },
119 120 121 122 123 124 125 126 127 128 129
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## More Learning Resources"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
130 131
    "-   [The Hitchhiker's Guide to Python](http://docs.python-guide.org/en/latest/)\n",
    "-   [SciPy Lecture Notes](http://www.scipy-lectures.org/)\n",
132
    "-   [Codecademy](http://www.codecademy.com/en/tracks/python)\n",
133
    "-   [learnpython.org](http://www.learnpython.org/)"
134
   ]
Steve Tjoa's avatar
Steve Tjoa committed
135 136 137 138 139 140 141
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "[← Back to Index](index.html)"
   ]
142 143 144 145
  }
 ],
 "metadata": {
  "kernelspec": {
Steve Tjoa's avatar
Steve Tjoa committed
146
   "display_name": "Python 3",
147
   "language": "python",
Steve Tjoa's avatar
Steve Tjoa committed
148
   "name": "python3"
149 150 151 152
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
Steve Tjoa's avatar
Steve Tjoa committed
153
    "version": 3
154 155 156 157 158
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
Steve Tjoa's avatar
Steve Tjoa committed
159 160
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
161 162 163
  }
 },
 "nbformat": 4,
164
 "nbformat_minor": 1
165
}