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

symbolic representations

parent 563c25c1
This diff is collapsed.
...@@ -2,58 +2,13 @@ ...@@ -2,58 +2,13 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": 1,
"metadata": { "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": {}, "outputs": [],
"output_type": "display_data"
}
],
"source": [ "source": [
"import IPython.display as ipd\n", "import IPython.display as ipd"
"\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)"
] ]
}, },
{ {
...@@ -90,15 +45,15 @@ ...@@ -90,15 +45,15 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "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", "cell_type": "code",
"execution_count": 6, "execution_count": 4,
"metadata": { "metadata": {},
"collapsed": false
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
...@@ -108,14 +63,14 @@ ...@@ -108,14 +63,14 @@
" <iframe\n", " <iframe\n",
" width=\"400\"\n", " width=\"400\"\n",
" height=\"300\"\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", " frameborder=\"0\"\n",
" allowfullscreen\n", " allowfullscreen\n",
" ></iframe>\n", " ></iframe>\n",
" " " "
], ],
"text/plain": [ "text/plain": [
"<IPython.lib.display.YouTubeVideo at 0x112e86650>" "<IPython.lib.display.YouTubeVideo at 0x107107310>"
] ]
}, },
"metadata": {}, "metadata": {},
...@@ -123,7 +78,7 @@ ...@@ -123,7 +78,7 @@
} }
], ],
"source": [ "source": [
"ipd.display( ipd.YouTubeVideo(\"2A6ZXZwl3nA\") )" "ipd.display( ipd.YouTubeVideo(\"2A6ZXZwl3nA\", start=106) )"
] ]
}, },
{ {
...@@ -135,10 +90,8 @@ ...@@ -135,10 +90,8 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7, "execution_count": 6,
"metadata": { "metadata": {},
"collapsed": false
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
...@@ -148,14 +101,14 @@ ...@@ -148,14 +101,14 @@
" <iframe\n", " <iframe\n",
" width=\"400\"\n", " width=\"400\"\n",
" height=\"300\"\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", " frameborder=\"0\"\n",
" allowfullscreen\n", " allowfullscreen\n",
" ></iframe>\n", " ></iframe>\n",
" " " "
], ],
"text/plain": [ "text/plain": [
"<IPython.lib.display.YouTubeVideo at 0x112e19dd0>" "<IPython.lib.display.YouTubeVideo at 0x1071078d0>"
] ]
}, },
"metadata": {}, "metadata": {},
...@@ -163,15 +116,13 @@ ...@@ -163,15 +116,13 @@
} }
], ],
"source": [ "source": [
"ipd.display( ipd.YouTubeVideo(\"LlvUepMa31o\") )" "ipd.display( ipd.YouTubeVideo(\"LlvUepMa31o\", start=15) )"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": 7,
"metadata": { "metadata": {},
"collapsed": false
},
"outputs": [ "outputs": [
{ {
"data": { "data": {
...@@ -181,14 +132,14 @@ ...@@ -181,14 +132,14 @@
" <iframe\n", " <iframe\n",
" width=\"400\"\n", " width=\"400\"\n",
" height=\"300\"\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", " frameborder=\"0\"\n",
" allowfullscreen\n", " allowfullscreen\n",
" ></iframe>\n", " ></iframe>\n",
" " " "
], ],
"text/plain": [ "text/plain": [
"<IPython.lib.display.YouTubeVideo at 0x112e19ed0>" "<IPython.lib.display.YouTubeVideo at 0x107107990>"
] ]
}, },
"metadata": {}, "metadata": {},
...@@ -196,7 +147,7 @@ ...@@ -196,7 +147,7 @@
} }
], ],
"source": [ "source": [
"ipd.display( ipd.YouTubeVideo(\"Kri2jWr08S4\") )" "ipd.display( ipd.YouTubeVideo(\"Kri2jWr08S4\", start=11) )"
] ]
}, },
{ {
...@@ -334,9 +285,9 @@ ...@@ -334,9 +285,9 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython2", "pygments_lexer": "ipython2",
"version": "2.7.10" "version": "2.7.13"
} }
}, },
"nbformat": 4, "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