Commit 49ff1c91 authored by Steve Tjoa's avatar Steve Tjoa

symbolic representations

parent 563c25c1
This diff is collapsed.
......@@ -2,58 +2,13 @@
"cells": [
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 1,
"metadata": {
"collapsed": false
"collapsed": true
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"<script>\n",
"$(function() {\n",
" if ($(\"body.notebook_app\").length == 0) {\n",
" $(\".input\").hide(); \n",
" }\n",
"});\n",
"</script>\n"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
"<button onclick=\"$('.input').show();\">Show input</button>\n",
"<button onclick=\"$('.input').hide();\">Hide input</button>\n"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"import IPython.display as ipd\n",
"\n",
"# Hide code by default when the notebook is exported as HTML.\n",
"ipd.display_html('''\n",
"<script>\n",
"$(function() {\n",
" if ($(\"body.notebook_app\").length == 0) {\n",
" $(\".input\").hide(); \n",
" }\n",
"});\n",
"</script>\n",
"''', raw=True)\n",
"\n",
"# Create HTML buttons to show or hide IPython input cells.\n",
"ipd.display_html('''\n",
"<button onclick=\"$('.input').show();\">Show input</button>\n",
"<button onclick=\"$('.input').hide();\">Hide input</button>\n",
"''', raw=True)"
"import IPython.display as ipd"
]
},
{
......@@ -90,15 +45,15 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Around the late 19th and early 20th centuries, self-playing pianos called **player pianos** became popular. The input for these pianos is a continuous roll of paper with holes punched into it. This paper roll is called a **piano roll**. Performances by famous musicians such as Gustav Mahler, Edvard Grieg, Scott Joplin and George Gershwin have been recorded onto piano rolls. Here is a player piano in action:"
"Around the late 19th and early 20th centuries, self-playing pianos called **player pianos** became popular. The input for these pianos is a continuous roll of paper with holes punched into it. This paper roll is called a **piano roll**. Performances by famous musicians such as Gustav Mahler, Edvard Grieg, Scott Joplin and George Gershwin have been recorded onto piano rolls. \n",
"\n",
"Similar to the player piano, the pianola is not a player piano but it sits in front of a piano. Here is a pianola in action:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
......@@ -108,14 +63,14 @@
" <iframe\n",
" width=\"400\"\n",
" height=\"300\"\n",
" src=\"https://www.youtube.com/embed/2A6ZXZwl3nA\"\n",
" src=\"https://www.youtube.com/embed/2A6ZXZwl3nA?start=106\"\n",
" frameborder=\"0\"\n",
" allowfullscreen\n",
" ></iframe>\n",
" "
],
"text/plain": [
"<IPython.lib.display.YouTubeVideo at 0x112e86650>"
"<IPython.lib.display.YouTubeVideo at 0x107107310>"
]
},
"metadata": {},
......@@ -123,7 +78,7 @@
}
],
"source": [
"ipd.display( ipd.YouTubeVideo(\"2A6ZXZwl3nA\") )"
"ipd.display( ipd.YouTubeVideo(\"2A6ZXZwl3nA\", start=106) )"
]
},
{
......@@ -135,10 +90,8 @@
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
......@@ -148,14 +101,14 @@
" <iframe\n",
" width=\"400\"\n",
" height=\"300\"\n",
" src=\"https://www.youtube.com/embed/LlvUepMa31o\"\n",
" src=\"https://www.youtube.com/embed/LlvUepMa31o?start=15\"\n",
" frameborder=\"0\"\n",
" allowfullscreen\n",
" ></iframe>\n",
" "
],
"text/plain": [
"<IPython.lib.display.YouTubeVideo at 0x112e19dd0>"
"<IPython.lib.display.YouTubeVideo at 0x1071078d0>"
]
},
"metadata": {},
......@@ -163,15 +116,13 @@
}
],
"source": [
"ipd.display( ipd.YouTubeVideo(\"LlvUepMa31o\") )"
"ipd.display( ipd.YouTubeVideo(\"LlvUepMa31o\", start=15) )"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
......@@ -181,14 +132,14 @@
" <iframe\n",
" width=\"400\"\n",
" height=\"300\"\n",
" src=\"https://www.youtube.com/embed/Kri2jWr08S4\"\n",
" src=\"https://www.youtube.com/embed/Kri2jWr08S4?start=11\"\n",
" frameborder=\"0\"\n",
" allowfullscreen\n",
" ></iframe>\n",
" "
],
"text/plain": [
"<IPython.lib.display.YouTubeVideo at 0x112e19ed0>"
"<IPython.lib.display.YouTubeVideo at 0x107107990>"
]
},
"metadata": {},
......@@ -196,7 +147,7 @@
}
],
"source": [
"ipd.display( ipd.YouTubeVideo(\"Kri2jWr08S4\") )"
"ipd.display( ipd.YouTubeVideo(\"Kri2jWr08S4\", start=11) )"
]
},
{
......@@ -334,9 +285,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