Commit 563c25c1 authored by Steve Tjoa's avatar Steve Tjoa

peak picking; python basics

parent 1d7c8fe2
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>python_basics</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<title>python_basics</title><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<style type="text/css">
......@@ -13,8 +11,8 @@
*
*/
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
......@@ -1109,7 +1107,6 @@ a:focus {
text-decoration: underline;
}
a:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
......@@ -2538,7 +2535,6 @@ select[size] {
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
......@@ -3029,7 +3025,6 @@ select[multiple].input-lg {
.btn.focus,
.btn:active.focus,
.btn.active.focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
......@@ -8760,6 +8755,9 @@ body > #header .header-bar {
margin-left: 10px;
}
}
[dir="rtl"] #ipython_notebook {
float: right !important;
}
#noscript {
width: auto;
padding-top: 16px;
......@@ -8962,9 +8960,15 @@ span#login_widget > .button .badge,
*
* Author: Jupyter Development Team
*/
[dir="rtl"] #tabs li {
float: right;
}
ul#tabs {
margin-bottom: 4px;
}
[dir="rtl"] ul#tabs {
margin-right: 0px;
}
ul#tabs a {
padding-top: 6px;
padding-bottom: 4px;
......@@ -8987,6 +8991,16 @@ ul.breadcrumb span {
.list_toolbar .tree-buttons {
padding-top: 1px;
}
[dir="rtl"] .list_toolbar .tree-buttons {
float: left !important;
}
[dir="rtl"] .list_toolbar .pull-right {
padding-top: 1px;
float: left !important;
}
[dir="rtl"] .list_toolbar .pull-left {
float: right !important;
}
.dynamic-buttons {
padding-top: 3px;
display: inline-block;
......@@ -9122,6 +9136,9 @@ ul.breadcrumb span {
#tree-selector {
padding-right: 0px;
}
[dir="rtl"] #tree-selector a {
float: right;
}
#button-select-all {
min-width: 50px;
}
......@@ -9211,6 +9228,9 @@ ul#new-menu {
left: auto;
right: 0;
}
[dir="rtl"] #new-menu {
text-align: right;
}
.kernel-menu-icon {
padding-right: 12px;
width: 24px;
......@@ -9256,6 +9276,9 @@ ul#new-menu {
#running .panel-group .panel .panel-body .list_container .list_item:last-child {
border-bottom: 0px;
}
[dir="rtl"] #running .col-sm-8 {
float: right !important;
}
.delete-button {
display: none;
}
......@@ -9551,6 +9574,7 @@ div.cell.selected.jupyter-soft-selected {
}
}
div.inner_cell {
min-width: 0;
/* Old browsers */
display: -webkit-box;
-webkit-box-orient: vertical;
......@@ -9572,11 +9596,6 @@ div.inner_cell {
/* Modern browsers */
flex: 1;
}
@-moz-document url-prefix() {
div.inner_cell {
overflow-x: hidden;
}
}
/* input_area and input_prompt must match in top border and margin for alignment */
div.input_area {
border: 1px solid #cfcfcf;
......@@ -11246,7 +11265,7 @@ div#pager .ui-resizable-handle::after {
}
.shortcut_key {
display: inline-block;
width: 20ex;
width: 21ex;
text-align: right;
font-family: monospace;
}
......@@ -11558,6 +11577,7 @@ ul.typeahead-list > li > a {
box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
}
.terminal-app .terminal {
width: 100%;
float: left;
font-family: monospace;
color: white;
......@@ -11572,6 +11592,9 @@ ul.typeahead-list > li > a {
line-height: 1em;
font-size: 14px;
}
.terminal-app .terminal .xterm-rows {
padding: 10px;
}
.terminal-app .terminal-cursor {
color: black;
background: white;
......@@ -11631,8 +11654,10 @@ ul.typeahead-list > li > a {
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
......@@ -11643,9 +11668,11 @@ ul.typeahead-list > li > a {
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0000FF } /* Name.Function.Magic */
.highlight .vc { color: #19177C } /* Name.Variable.Class */
.highlight .vg { color: #19177C } /* Name.Variable.Global */
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
.highlight .vm { color: #19177C } /* Name.Variable.Magic */
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
</style>
<style type="text/css">
......@@ -11699,9 +11726,7 @@ body {
div#notebook {
overflow: visible;
border-top: none;
}
@media print {
}@media print {
div.cell {
display: block;
page-break-inside: avoid;
......@@ -11722,7 +11747,7 @@ div#notebook {
<!-- Loading mathjax macro -->
<!-- Load mathjax -->
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML"></script>
<!-- MathJax configuration -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
......@@ -11746,8 +11771,7 @@ div#notebook {
<div tabindex="-1" id="notebook" class="border-box-sizing">
<div class="container" id="notebook-container">
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
......@@ -11756,26 +11780,23 @@ div#notebook {
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Python-Basics">Python Basics<a class="anchor-link" href="#Python-Basics">&#182;</a></h1>
<h1 id="Python-Basics">Python Basics<a class="anchor-link" href="#Python-Basics">&#194;&#182;</a></h1>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Why-Python?">Why Python?<a class="anchor-link" href="#Why-Python?">&#182;</a></h2>
<h2 id="Why-Python?">Why Python?<a class="anchor-link" href="#Why-Python?">&#194;&#182;</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
......@@ -11786,74 +11807,89 @@ div#notebook {
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Tutorial">Tutorial<a class="anchor-link" href="#Tutorial">&#182;</a></h2>
<h2 id="Tutorial">Tutorial<a class="anchor-link" href="#Tutorial">&#194;&#182;</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>If you are new to Python, please follow <a href="https://docs.python.org/2/tutorial/index.html">The Python Tutorial</a>.</p>
<p>For the purposes of this workshop, be sure you understand the following sections:</p>
<ul>
<li>Section 3: An Informal Introduction to Python</li>
<li>Section 4: More Control Flow Tools</li>
<li>Section 5: Data Structures</li>
<li>Section 3: An Informal Introduction to Python<ul>
<li>numbers: <code>int</code>, <code>float</code></li>
<li>strings</li>
<li>lists</li>
</ul>
</li>
<li>Section 4: More Control Flow Tools<ul>
<li><code>if</code> statements</li>
<li><code>for</code> statements</li>
<li><code>range</code></li>
<li>functions</li>
</ul>
</li>
<li>Section 5: Data Structures<ul>
<li>list comprehensions</li>
<li>tuples</li>
<li>dictionaries</li>
<li>looping techniques</li>
</ul>
</li>
</ul>
<p>While the other sections are useful, you can learn them along the way.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Package-Installation">Package Installation<a class="anchor-link" href="#Package-Installation">&#182;</a></h2>
<h2 id="Package-Installation">Package Installation<a class="anchor-link" href="#Package-Installation">&#194;&#182;</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>First, <a href="https://pip.pypa.io/en/stable/installing/">make sure you have pip installed</a>. pip is the recommended tool for installing Python packages.</p>
<p>To follow the material on this site, you will need to install additional Python packages.</p>
<p>Follow the instructions on the <a href="https://github.com/stevetjoa/stanford-mir#how-to-use-this-repo">GitHub repository <code>README</code></a>.</p>
<ol>
<li><p>If you’re totally new, the simplest solution is to download and install <a href="https://www.continuum.io/downloads">Anaconda for Python 2 (2.7)</a>, not Python 3.</p>
</li>
<li><p>Install <a href="https://librosa.github.io/librosa/install.html">librosa</a> and <a href="https://librosa.github.io/librosa/install.html#ffmpeg">ffmpeg</a>.</p>
</li>
</ol>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>To use the notebooks, you will need to install a few Python packages:</p>
<pre><code>$ pip install --upgrade numpy scipy matplotlib ipython pandas sklearn librosa seaborn mir_eval ipywidgets</code></pre>
<p>You will also probably want to <a href="https://pip.pypa.io/en/stable/installing/">install pip</a>. pip is the recommended tool for installing most other Python packages.</p>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="More-Learning-Resources">More Learning Resources<a class="anchor-link" href="#More-Learning-Resources">&#182;</a></h2>
<h2 id="More-Learning-Resources">More Learning Resources<a class="anchor-link" href="#More-Learning-Resources">&#194;&#182;</a></h2>
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
......@@ -11867,8 +11903,7 @@ div#notebook {
</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered">
<div class="prompt input_prompt">
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
......@@ -11880,4 +11915,8 @@ div#notebook {
</div>
</div>
</body>
</html>
......@@ -48,8 +48,19 @@
"For the purposes of this workshop, be sure you understand the following sections:\n",
"\n",
"- Section 3: An Informal Introduction to Python\n",
" - numbers: `int`, `float`\n",
" - strings\n",
" - lists\n",
"- Section 4: More Control Flow Tools\n",
" - `if` statements\n",
" - `for` statements\n",
" - `range`\n",
" - functions\n",
"- Section 5: Data Structures\n",
" - list comprehensions\n",
" - tuples\n",
" - dictionaries\n",
" - looping techniques\n",
"\n",
"While the other sections are useful, you can learn them along the way."
]
......@@ -65,16 +76,20 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"First, [make sure you have pip installed](https://pip.pypa.io/en/stable/installing/). pip is the recommended tool for installing Python packages."
"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",
"1. If you’re totally new, the simplest solution is to download and install [Anaconda for Python 2 (2.7)](https://www.continuum.io/downloads), not Python 3. \n",
" \n",
"2. Install [librosa](https://librosa.github.io/librosa/install.html) and [ffmpeg](https://librosa.github.io/librosa/install.html#ffmpeg)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To use the notebooks, you will need to install a few Python packages:\n",
"\n",
" $ pip install --upgrade numpy scipy matplotlib ipython pandas sklearn librosa seaborn mir_eval ipywidgets"
"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."
]
},
{
......@@ -118,9 +133,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
"version": "2.7.13"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment