Skip to content

Instantly share code, notes, and snippets.

@tonyfast
Last active December 11, 2019 04:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonyfast/3b66729ac43e6e47ea38e882091b7b71 to your computer and use it in GitHub Desktop.
Save tonyfast/3b66729ac43e6e47ea38e882091b7b71 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/markdown": [
" %reload_ext tonyfast.literacy\n",
" import graphviz"
],
"text/plain": [
" %reload_ext tonyfast.literacy\n",
" import graphviz"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
" %reload_ext tonyfast.literacy\n",
" import graphviz"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"<>:11: DeprecationWarning: invalid escape sequence \\L\n"
]
},
{
"data": {
"text/markdown": [
"[Literate programs][literate] employ multiple language forms to communicate computational thought.\n",
"They target human readable documents and computational source code.\n",
"Donald Knuth's original literate programming implementation WEB combines $\\LaTeX$ for document formatting and Pascal computation.\n",
"This approach to composition allows a program to express a narrative in human & computer logic.\n",
"\n",
"![](https://user-images.githubusercontent.com/4236275/66661243-313d4980-ec36-11e9-93bc-159498cde227.png)\n",
"\n",
"[meta]: https://en.wikipedia.org/wiki/Metalanguage\n",
"[literate]: https://en.wikipedia.org/wiki/Literate_programming\n",
"[ousterhout]: https://en.wikipedia.org/wiki/Ousterhout%27s_dichotomy\n",
"[pdf]: http://www.literateprogramming.com/knuthweb.pdf"
],
"text/plain": [
"[Literate programs][literate] employ multiple language forms to communicate computational thought.\n",
"They target human readable documents and computational source code.\n",
"Donald Knuth's original literate programming implementation WEB combines $\\LaTeX$ for document formatting and Pascal computation.\n",
"This approach to composition allows a program to express a narrative in human & computer logic.\n",
"\n",
"![](https://user-images.githubusercontent.com/4236275/66661243-313d4980-ec36-11e9-93bc-159498cde227.png)\n",
"\n",
"[meta]: https://en.wikipedia.org/wiki/Metalanguage\n",
"[literate]: https://en.wikipedia.org/wiki/Literate_programming\n",
"[ousterhout]: https://en.wikipedia.org/wiki/Ousterhout%27s_dichotomy\n",
"[pdf]: http://www.literateprogramming.com/knuthweb.pdf"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"[Literate programs][literate] employ multiple language forms to communicate computational thought.\n",
"They target human readable documents and computational source code.\n",
"Donald Knuth's original literate programming implementation WEB combines $\\LaTeX$ for document formatting and Pascal computation.\n",
"This approach to composition allows a program to express a narrative in human & computer logic.\n",
"\n",
"![](https://user-images.githubusercontent.com/4236275/66661243-313d4980-ec36-11e9-93bc-159498cde227.png)\n",
"\n",
"[meta]: https://en.wikipedia.org/wiki/Metalanguage\n",
"[literate]: https://en.wikipedia.org/wiki/Literate_programming\n",
"[ousterhout]: https://en.wikipedia.org/wiki/Ousterhout%27s_dichotomy\n",
"[pdf]: http://www.literateprogramming.com/knuthweb.pdf"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
" \n",
" document = graphviz.Source(\"\"\"digraph {\n",
" layout=dot\n",
" node[penwidth=0 fontsize=20]\n",
" edge[style=tapered penwidth=5]\n",
" narrative->program -> {application scripting}\n",
" subgraph cluster_ousterhout {scripting application label=\"ousterhout's\\ndichotomy\"}\n",
" subgraph cluster_narrative {narrative program label=document}\n",
" subgraph cluster_types {static dynamic label=types}\n",
" scripting->dynamic\n",
" application->static\n",
" narrative-> human -> dynamic\n",
" program -> computer -> static\n",
" subgraph cluster_literate {human computer label=\"language\"}\n",
" }\"\"\")"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: %3 Pages: 1 -->\n",
"<svg width=\"600pt\" height=\"362pt\"\n",
" viewBox=\"0.00 0.00 600.00 362.39\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 358.3919)\">\n",
"<title>%3</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-358.3919 596,-358.3919 596,4 -4,4\"/>\n",
"<g id=\"clust2\" class=\"cluster\">\n",
"<title>cluster_ousterhout</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"8,-93.598 8,-185.196 312,-185.196 312,-93.598 8,-93.598\"/>\n",
"<text text-anchor=\"middle\" x=\"160\" y=\"-169.996\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">ousterhout&#39;s</text>\n",
"<text text-anchor=\"middle\" x=\"160\" y=\"-155.996\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">dichotomy</text>\n",
"</g>\n",
"<g id=\"clust3\" class=\"cluster\">\n",
"<title>cluster_narrative</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"224,-193.196 224,-346.3919 364,-346.3919 364,-193.196 224,-193.196\"/>\n",
"<text text-anchor=\"middle\" x=\"294\" y=\"-331.1919\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">document</text>\n",
"</g>\n",
"<g id=\"clust4\" class=\"cluster\">\n",
"<title>cluster_types</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"209,-8 209,-85.598 445,-85.598 445,-8 209,-8\"/>\n",
"<text text-anchor=\"middle\" x=\"327\" y=\"-70.398\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">types</text>\n",
"</g>\n",
"<g id=\"clust5\" class=\"cluster\">\n",
"<title>cluster_literate</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"320,-93.598 320,-171.196 584,-171.196 584,-93.598 320,-93.598\"/>\n",
"<text text-anchor=\"middle\" x=\"452\" y=\"-155.996\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">language</text>\n",
"</g>\n",
"<!-- narrative -->\n",
"<g id=\"node1\" class=\"node\">\n",
"<title>narrative</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"294\" cy=\"-296.5929\" rx=\"61.6278\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"294\" y=\"-290.5929\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">narrative</text>\n",
"</g>\n",
"<!-- program -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>program</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"292\" cy=\"-220.9949\" rx=\"59.4468\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"292\" y=\"-214.9949\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">program</text>\n",
"</g>\n",
"<!-- narrative&#45;&gt;program -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>narrative&#45;&gt;program</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"295.9736,-276.6643 295.8267,-275.482 295.6775,-274.281 295.5261,-273.0628 295.3727,-271.8288 295.2176,-270.5804 295.0609,-269.3192 294.9027,-268.0463 294.7433,-266.7634 294.5828,-265.4718 294.4213,-264.173 294.2592,-262.8683 294.0965,-261.5591 293.9335,-260.247 293.7702,-258.9332 293.6069,-257.6193 293.4438,-256.3066 293.281,-254.9966 293.1187,-253.6907 292.9571,-252.3903 292.7964,-251.0968 292.7964,-251.0968 292.7042,-252.397 292.6116,-253.7041 292.5186,-255.0168 292.4253,-256.3336 292.3318,-257.653 292.2382,-258.9737 292.1447,-260.2943 292.0512,-261.6132 291.958,-262.9291 291.8651,-264.2406 291.7725,-265.5462 291.6806,-266.8445 291.5892,-268.134 291.4985,-269.4134 291.4087,-270.6812 291.3198,-271.936 291.2319,-273.1764 291.1451,-274.4009 291.0596,-275.6081 290.9754,-276.7966 295.9736,-276.6643\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"297.1669,-250.868 292.5289,-240.9872 288.42,-251.0995 297.1669,-250.868\"/>\n",
"</g>\n",
"<!-- human -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>human</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"526\" cy=\"-121.397\" rx=\"49.6089\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"526\" y=\"-115.397\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">human</text>\n",
"</g>\n",
"<!-- narrative&#45;&gt;human -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>narrative&#45;&gt;human</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"326.8505,-281.6464 332.3914,-278.436 338.2625,-274.9958 344.4305,-271.3386 350.8671,-267.4744 357.5443,-263.4132 364.4337,-259.165 371.5073,-254.7397 378.7367,-250.1473 386.0939,-245.3979 393.5505,-240.5014 401.0785,-235.4678 408.6495,-230.3071 416.2353,-225.0293 423.8077,-219.6445 431.3385,-214.1625 438.7994,-208.5935 446.1623,-202.9475 453.3987,-197.2344 460.4805,-191.4645 467.3786,-185.6483 469.3556,-183.9293 471.3285,-182.1722 473.296,-180.3801 475.2561,-178.5565 477.2071,-176.7051 479.147,-174.8294 481.0739,-172.9331 482.9859,-171.0197 484.8812,-169.0928 486.7577,-167.156 488.6136,-165.213 490.447,-163.2672 492.2559,-161.3224 494.0385,-159.3822 495.7927,-157.45 497.5168,-155.5297 499.2087,-153.6246 500.8665,-151.7385 502.4883,-149.875 504.0722,-148.0376 504.0722,-148.0376 502.4475,-149.8389 500.7846,-151.6652 499.0853,-153.5131 497.3518,-155.3789 495.586,-157.2591 493.79,-159.1501 491.9659,-161.0482 490.1157,-162.95 488.2413,-164.8518 486.345,-166.7499 484.4286,-168.641 482.4943,-170.5212 480.5441,-172.3871 478.5801,-174.2351 476.6042,-176.0614 474.6187,-177.8627 472.6255,-179.6352 470.6268,-181.3753 468.6245,-183.0795 466.6214,-184.7437 459.6105,-190.3906 452.4198,-195.9855 445.0768,-201.5197 437.6098,-206.9839 430.0471,-212.3688 422.417,-217.6651 414.7478,-222.8635 407.068,-227.9547 399.4058,-232.9294 391.7896,-237.7781 384.2478,-242.4917 376.8086,-247.0608 369.5006,-251.476 362.352,-255.728 355.3912,-259.8074 348.6466,-263.705 342.1466,-267.4113 335.9195,-270.917 329.9937,-274.2128 324.3926,-277.2922 326.8505,-281.6464\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"507.3883,-150.8914 510.6013,-140.4597 500.7594,-145.1799 507.3883,-150.8914\"/>\n",
"</g>\n",
"<!-- application -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>application</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"90\" cy=\"-121.397\" rx=\"74.2911\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"90\" y=\"-115.397\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">application</text>\n",
"</g>\n",
"<!-- program&#45;&gt;application -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>program&#45;&gt;application</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"242.749,-207.8833 239.4281,-207.0594 236.0649,-206.2012 232.6576,-205.3063 229.2118,-204.3743 225.7332,-203.4048 222.2278,-202.3976 218.7012,-201.3522 215.1591,-200.2683 211.6074,-199.1457 208.0518,-197.9838 204.498,-196.7824 200.9517,-195.5412 197.4188,-194.2598 193.905,-192.9378 190.416,-191.5749 186.9575,-190.1708 183.5354,-188.7252 180.1552,-187.2376 176.8229,-185.7078 173.5442,-184.1355 170.5607,-182.6371 167.5771,-181.0699 164.5964,-179.4389 161.6225,-177.7493 158.6591,-176.0063 155.71,-174.2152 152.7788,-172.3812 149.8692,-170.5096 146.9849,-168.6056 144.1296,-166.6745 141.3068,-164.7215 138.5202,-162.7519 135.7734,-160.7709 133.07,-158.7837 130.4137,-156.7955 127.808,-154.8117 125.2565,-152.8375 122.7628,-150.878 120.3305,-148.9385 117.9631,-147.0243 117.9631,-147.0243 120.2613,-149.0216 122.6241,-151.047 125.0482,-153.0951 127.5303,-155.1606 130.067,-157.2382 132.6552,-159.3227 135.2914,-161.4087 137.9724,-163.4909 140.695,-165.5641 143.4558,-167.6229 146.2516,-169.662 149.0791,-171.6762 151.9351,-173.6602 154.8164,-175.6086 157.7197,-177.5162 160.6419,-179.3777 163.5798,-181.1878 166.5303,-182.9412 169.4902,-184.6326 172.4558,-186.2564 175.7145,-187.964 179.0279,-189.6301 182.3905,-191.2548 185.7964,-192.8384 189.2399,-194.381 192.7152,-195.8828 196.2164,-197.3439 199.7378,-198.7646 203.2736,-200.145 206.8181,-201.4852 210.3654,-202.7855 213.9098,-204.046 217.4455,-205.2668 220.9667,-206.4481 224.4677,-207.5901 227.9426,-208.693 231.3858,-209.7568 234.7914,-210.7819 238.1536,-211.7682 241.459,-212.714 242.749,-207.8833\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"120.8164,-143.7078 110.3864,-140.4898 115.1017,-150.3339 120.8164,-143.7078\"/>\n",
"</g>\n",
"<!-- scripting -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>scripting</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"243\" cy=\"-121.397\" rx=\"60.6092\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"243\" y=\"-115.397\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">scripting</text>\n",
"</g>\n",
"<!-- program&#45;&gt;scripting -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>program&#45;&gt;scripting</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"284.5624,-200.214 283.3676,-198.0324 282.132,-195.7764 280.8595,-193.4528 279.5536,-191.0684 278.2182,-188.6301 276.8569,-186.1445 275.4734,-183.6185 274.0716,-181.0589 272.655,-178.4724 271.2275,-175.8659 269.7927,-173.2461 268.3544,-170.6198 266.9162,-167.9939 265.4819,-165.375 264.0553,-162.7701 262.6399,-160.1858 261.2396,-157.6291 259.8581,-155.1065 258.4991,-152.6251 257.1663,-150.1915 257.1663,-150.1915 258.2808,-152.7325 259.4173,-155.3234 260.5726,-157.9572 261.7436,-160.6268 262.9271,-163.3251 264.1201,-166.045 265.3195,-168.7794 266.5222,-171.5212 267.725,-174.2633 268.9248,-176.9987 270.1186,-179.7203 271.3031,-182.4209 272.4754,-185.0934 273.6323,-187.7309 274.7707,-190.3262 275.8874,-192.8721 276.9794,-195.3617 278.0436,-197.7878 279.0768,-200.1433 280.076,-202.4212 284.5624,-200.214\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"261.0009,-148.075 252.6607,-141.0334 253.1496,-151.9377 261.0009,-148.075\"/>\n",
"</g>\n",
"<!-- computer -->\n",
"<g id=\"node8\" class=\"node\">\n",
"<title>computer</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"393\" cy=\"-121.397\" rx=\"64.94\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"393\" y=\"-115.397\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">computer</text>\n",
"</g>\n",
"<!-- program&#45;&gt;computer -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>program&#45;&gt;computer</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"313.2292,-203.5715 315.5257,-201.1542 317.9068,-198.648 320.3643,-196.0613 322.8903,-193.4025 325.4766,-190.6801 328.1154,-187.9026 330.7985,-185.0785 333.5178,-182.2161 336.2655,-179.324 339.0334,-176.4105 341.8135,-173.4843 344.5977,-170.5536 347.3781,-167.627 350.1466,-164.713 352.8952,-161.8199 355.6158,-158.9563 358.3003,-156.1305 360.9409,-153.3511 363.5294,-150.6266 366.0577,-147.9652 366.0577,-147.9652 363.3613,-150.4562 360.6008,-153.0063 357.7848,-155.6077 354.9218,-158.2526 352.0205,-160.9329 349.0892,-163.6407 346.1368,-166.3682 343.1716,-169.1074 340.2023,-171.8504 337.2375,-174.5893 334.2856,-177.3162 331.3554,-180.0232 328.4553,-182.7023 325.5939,-185.3457 322.7798,-187.9453 320.0216,-190.4934 317.3277,-192.9819 314.7069,-195.4031 312.1676,-197.7489 309.7184,-200.0114 313.2292,-203.5715\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"369.5375,-150.6782 373.586,-140.5415 363.3937,-144.4479 369.5375,-150.6782\"/>\n",
"</g>\n",
"<!-- static -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>static</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"258\" cy=\"-35.799\" rx=\"41.3178\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"258\" y=\"-29.799\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">static</text>\n",
"</g>\n",
"<!-- application&#45;&gt;static -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>application&#45;&gt;static</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"125.9447,-105.8885 130.1587,-103.6162 134.5223,-101.2633 139.0194,-98.8383 143.634,-96.35 148.35,-93.807 153.1516,-91.2179 158.0225,-88.5913 162.9469,-85.936 167.9086,-83.2605 172.8917,-80.5735 177.8801,-77.8836 182.8579,-75.1995 187.8089,-72.5298 192.7171,-69.8831 197.5666,-67.2681 202.3413,-64.6935 207.0252,-62.1678 211.6022,-59.6998 216.0564,-57.298 220.3717,-54.9711 220.3717,-54.9711 215.9526,-57.0944 211.3914,-59.286 206.7044,-61.5381 201.9079,-63.8428 197.0184,-66.1922 192.0523,-68.5784 187.0261,-70.9935 181.9561,-73.4296 176.8587,-75.8788 171.7504,-78.3334 166.6475,-80.7853 161.5665,-83.2267 156.5237,-85.6497 151.5357,-88.0464 146.6187,-90.409 141.7893,-92.7295 137.0638,-95.0001 132.4585,-97.2129 127.9901,-99.36 123.6748,-101.4335 125.9447,-105.8885\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"222.7182,-58.6857 229.6421,-50.2477 218.7458,-50.8893 222.7182,-58.6857\"/>\n",
"</g>\n",
"<!-- dynamic -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>dynamic</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"377\" cy=\"-35.799\" rx=\"60.0203\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"377\" y=\"-29.799\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">dynamic</text>\n",
"</g>\n",
"<!-- scripting&#45;&gt;dynamic -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>scripting&#45;&gt;dynamic</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"276.7177,-106.6894 278.28,-105.7733 279.8589,-104.8429 281.4503,-103.9002 283.0526,-102.9461 284.6639,-101.9813 286.2825,-101.0065 287.9067,-100.0225 289.5347,-99.0302 291.1647,-98.0302 292.795,-97.0233 294.4238,-96.0104 296.0494,-94.9921 297.6699,-93.9692 299.2838,-92.9426 300.8891,-91.9129 302.4842,-90.881 304.0672,-89.8476 305.6365,-88.8134 307.1903,-87.7793 308.7267,-86.746 310.5521,-85.5049 312.3859,-84.2445 314.2264,-82.9666 316.0718,-81.6731 317.9204,-80.3655 319.7706,-79.0456 321.6205,-77.7151 323.4684,-76.3758 325.3126,-75.0293 327.1513,-73.6773 328.9829,-72.3216 330.8055,-70.9639 332.6175,-69.606 334.417,-68.2495 336.2023,-66.8961 337.9718,-65.5477 339.7235,-64.2059 341.4558,-62.8724 343.1669,-61.549 344.8551,-60.2374 344.8551,-60.2374 343.0906,-61.4441 341.3027,-62.661 339.4933,-63.8864 337.6643,-65.1189 335.8176,-66.3567 333.955,-67.5981 332.0784,-68.8416 330.1898,-70.0856 328.291,-71.3283 326.3839,-72.5682 324.4704,-73.8035 322.5524,-75.0328 320.6317,-76.2543 318.7103,-77.4665 316.7901,-78.6675 314.8729,-79.856 312.9608,-81.03 311.0555,-82.1881 309.1591,-83.3286 307.2733,-84.4499 305.6888,-85.3811 304.0868,-86.3123 302.4692,-87.2427 300.8378,-88.1716 299.1943,-89.0985 297.5406,-90.0226 295.8785,-90.9434 294.2098,-91.86 292.5362,-92.7719 290.8596,-93.6784 289.1817,-94.5789 287.5044,-95.4726 285.8295,-96.3589 284.1588,-97.2371 282.494,-98.1067 280.837,-98.9668 279.1895,-99.817 277.5535,-100.6564 275.9306,-101.4844 274.3203,-102.3016 276.7177,-106.6894\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"347.7857,-63.5118 353.2293,-54.051 342.5865,-56.474 347.7857,-63.5118\"/>\n",
"</g>\n",
"<!-- human&#45;&gt;dynamic -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>human&#45;&gt;dynamic</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"498.8689,-102.9274 495.2651,-100.9822 491.5248,-98.9633 487.6611,-96.8777 483.687,-94.7325 479.6156,-92.5349 475.4602,-90.2919 471.2337,-88.0105 466.9493,-85.6979 462.6201,-83.3611 458.2592,-81.0072 453.8797,-78.6432 449.4947,-76.2763 445.1173,-73.9135 440.7607,-71.5618 436.4379,-69.2285 432.162,-66.9204 427.9461,-64.6448 423.8035,-62.4087 419.7471,-60.2191 415.79,-58.0832 415.79,-58.0832 419.6284,-60.4256 423.5632,-62.8269 427.5817,-65.2792 431.6712,-67.7748 435.8188,-70.306 440.0121,-72.8649 444.2381,-75.4439 448.4842,-78.0352 452.7378,-80.6309 456.986,-83.2234 461.2161,-85.8049 465.4156,-88.3677 469.5715,-90.9039 473.6713,-93.4058 477.7022,-95.8657 481.6514,-98.2758 485.5064,-100.6283 489.2543,-102.9155 492.8825,-105.1296 496.3782,-107.2629 498.8689,-102.9274\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"417.911,-54.2561 407.0606,-53.0683 413.5523,-61.8433 417.911,-54.2561\"/>\n",
"</g>\n",
"<!-- computer&#45;&gt;static -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>computer&#45;&gt;static</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"349.9291,-104.2959 347.8482,-103.5151 345.7606,-102.7159 343.6613,-101.8951 341.5529,-101.0528 339.4377,-100.1891 337.3183,-99.3039 335.1973,-98.3974 333.0771,-97.4696 330.9603,-96.5204 328.8493,-95.55 326.7467,-94.5584 324.655,-93.5457 322.5766,-92.5118 320.5142,-91.4568 318.4701,-90.3807 316.4468,-89.2836 314.447,-88.1655 312.473,-87.0264 310.5273,-85.8664 308.6124,-84.6854 307.126,-83.7362 305.6427,-82.7564 304.1633,-81.7479 302.689,-80.7125 301.2208,-79.6522 299.7597,-78.5688 298.3067,-77.4642 296.863,-76.3404 295.4295,-75.1991 294.0071,-74.0424 292.597,-72.8722 291.2,-71.6902 289.8173,-70.4984 288.4497,-69.2988 287.0982,-68.0931 285.7639,-66.8833 284.4476,-65.6713 283.1504,-64.459 281.8733,-63.2482 280.6171,-62.0408 280.6171,-62.0408 281.7979,-63.3225 283,-64.6094 284.2226,-65.8996 285.4648,-67.1913 286.7259,-68.4826 288.0052,-69.7715 289.3017,-71.0561 290.6148,-72.3347 291.9437,-73.6052 293.2876,-74.8658 294.6457,-76.1146 296.0173,-77.3497 297.4017,-78.5692 298.7981,-79.7713 300.2057,-80.9539 301.6239,-82.1153 303.0518,-83.2536 304.4889,-84.3668 305.9345,-85.4532 307.3876,-86.5105 309.2557,-87.8255 311.1564,-89.1213 313.0871,-90.3976 315.0453,-91.6542 317.0284,-92.8909 319.0339,-94.1075 321.0592,-95.3038 323.1018,-96.4797 325.1592,-97.6349 327.2287,-98.7693 329.3079,-99.8826 331.3943,-100.9747 333.4852,-102.0454 335.5783,-103.0945 337.6708,-104.1218 339.7604,-105.1271 341.8445,-106.1102 343.9205,-107.0709 345.986,-108.0091 348.0308,-108.9215 349.9291,-104.2959\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"283.6998,-58.9323 273.6692,-54.6279 277.3156,-64.916 283.6998,-58.9323\"/>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.files.Source at 0x1083940b8>"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/markdown": [
"The literate program has two components: the document langauge and programming language. \n",
"Programming languages have another dichotomy of an statically typed application and a dynamically typed scripting language.\n",
"\n",
" document"
],
"text/plain": [
"The literate program has two components: the document langauge and programming language. \n",
"Programming languages have another dichotomy of an statically typed application and a dynamically typed scripting language.\n",
"\n",
" document"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"The literate program has two components: the document langauge and programming language. \n",
"Programming languages have another dichotomy of an statically typed application and a dynamically typed scripting language.\n",
"\n",
" document"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
" \n",
" implementation = graphviz.Source(\"\"\"digraph {\n",
" layout=dot\n",
" node[penwidth=0 fontsize=20]\n",
" edge[style=tapered penwidth=5]\n",
" markdown->narrative->program -> {application scripting}\n",
" markdown->python -> scripting\n",
" markdown->bash-> application\n",
" subgraph cluster_xonsh {python bash label=xonsh}\n",
" subgraph cluster_ousterhout {scripting application label=\"ousterhout's\\ndichotomy\"}\n",
" subgraph cluster_narrative {narrative program label=document}\n",
" subgraph cluster_types {static dynamic label=types}\n",
" scripting->dynamic\n",
" application->static\n",
" narrative-> human -> dynamic\n",
" program -> computer -> static\n",
" subgraph cluster_literate {human computer label=\"language\"}\n",
" }\"\"\")"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
"<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
" -->\n",
"<!-- Title: %3 Pages: 1 -->\n",
"<svg width=\"600pt\" height=\"402pt\"\n",
" viewBox=\"0.00 0.00 600.00 401.99\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
"<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 397.9899)\">\n",
"<title>%3</title>\n",
"<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-397.9899 596,-397.9899 596,4 -4,4\"/>\n",
"<g id=\"clust2\" class=\"cluster\">\n",
"<title>cluster_xonsh</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"319,-268.7939 319,-346.3919 529,-346.3919 529,-268.7939 319,-268.7939\"/>\n",
"<text text-anchor=\"middle\" x=\"424\" y=\"-331.1919\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">xonsh</text>\n",
"</g>\n",
"<g id=\"clust3\" class=\"cluster\">\n",
"<title>cluster_ousterhout</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"280,-93.598 280,-185.196 584,-185.196 584,-93.598 280,-93.598\"/>\n",
"<text text-anchor=\"middle\" x=\"432\" y=\"-169.996\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">ousterhout&#39;s</text>\n",
"<text text-anchor=\"middle\" x=\"432\" y=\"-155.996\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">dichotomy</text>\n",
"</g>\n",
"<g id=\"clust4\" class=\"cluster\">\n",
"<title>cluster_narrative</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"171,-193.196 171,-346.3919 311,-346.3919 311,-193.196 171,-193.196\"/>\n",
"<text text-anchor=\"middle\" x=\"241\" y=\"-331.1919\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">document</text>\n",
"</g>\n",
"<g id=\"clust5\" class=\"cluster\">\n",
"<title>cluster_types</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"146,-8 146,-85.598 382,-85.598 382,-8 146,-8\"/>\n",
"<text text-anchor=\"middle\" x=\"264\" y=\"-70.398\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">types</text>\n",
"</g>\n",
"<g id=\"clust6\" class=\"cluster\">\n",
"<title>cluster_literate</title>\n",
"<polygon fill=\"none\" stroke=\"#000000\" points=\"8,-93.598 8,-171.196 272,-171.196 272,-93.598 8,-93.598\"/>\n",
"<text text-anchor=\"middle\" x=\"140\" y=\"-155.996\" font-family=\"Times,serif\" font-size=\"14.00\" fill=\"#000000\">language</text>\n",
"</g>\n",
"<!-- markdown -->\n",
"<g id=\"node1\" class=\"node\">\n",
"<title>markdown</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"378\" cy=\"-374.1909\" rx=\"71.5957\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"378\" y=\"-368.1909\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">markdown</text>\n",
"</g>\n",
"<!-- narrative -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>narrative</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"241\" cy=\"-296.5929\" rx=\"61.6278\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"241\" y=\"-290.5929\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">narrative</text>\n",
"</g>\n",
"<!-- markdown&#45;&gt;narrative -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>markdown&#45;&gt;narrative</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"338.8659,-355.4646 337.6953,-354.9765 336.5251,-354.4848 335.353,-353.9883 334.1798,-353.4872 333.0059,-352.9815 331.8322,-352.4716 330.6593,-351.9574 329.4878,-351.4392 328.3185,-350.9171 327.152,-350.3912 325.989,-349.8617 324.8302,-349.3287 323.6762,-348.7924 322.5278,-348.2529 321.3856,-347.7104 320.2502,-347.1649 319.1225,-346.6168 318.0029,-346.066 316.8923,-345.5127 315.7921,-344.9577 313.6751,-343.8719 311.5483,-342.7608 309.4128,-341.6258 307.2711,-340.469 305.1252,-339.2923 302.9775,-338.0977 300.8302,-336.8872 298.6856,-335.6627 296.5459,-334.4263 294.4133,-333.1798 292.29,-331.9254 290.1783,-330.6649 288.0803,-329.4003 285.9983,-328.1336 283.9344,-326.8667 281.8909,-325.6017 279.87,-324.3405 277.8738,-323.085 275.9046,-321.8373 273.9646,-320.5992 273.9646,-320.5992 275.8168,-321.9656 277.6979,-323.3439 279.6059,-324.732 281.5387,-326.1279 283.4942,-327.5296 285.4706,-328.9348 287.4658,-330.3416 289.4778,-331.7478 291.5046,-333.1515 293.5443,-334.5504 295.5947,-335.9426 297.6539,-337.3259 299.72,-338.6984 301.7909,-340.0579 303.8648,-341.4023 305.9395,-342.7296 308.0133,-344.0378 310.084,-345.3248 312.1499,-346.5884 314.2079,-347.8262 315.2848,-348.4641 316.3703,-349.0998 317.4648,-349.7333 318.5675,-350.3647 319.6777,-350.9937 320.7949,-351.62 321.9183,-352.2436 323.0473,-352.8642 324.1812,-353.4817 325.3194,-354.0958 326.4612,-354.7065 327.6059,-355.3134 328.7528,-355.9164 329.9014,-356.5154 331.0509,-357.11 332.2007,-357.7003 333.3501,-358.2859 334.4984,-358.8667 335.6451,-359.4425 336.7862,-360.0116 338.8659,-355.4646\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"276.3518,-316.93 265.6491,-314.7869 271.3389,-324.1018 276.3518,-316.93\"/>\n",
"</g>\n",
"<!-- python -->\n",
"<g id=\"node6\" class=\"node\">\n",
"<title>python</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"378\" cy=\"-296.5929\" rx=\"50.6966\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"378\" y=\"-290.5929\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">python</text>\n",
"</g>\n",
"<!-- markdown&#45;&gt;python -->\n",
"<g id=\"edge5\" class=\"edge\">\n",
"<title>markdown&#45;&gt;python</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"380.5,-354.2075 380.3848,-352.9334 380.2677,-351.6377 380.1488,-350.322 380.0282,-348.9879 379.9062,-347.6374 379.7828,-346.2719 379.6582,-344.8933 379.5325,-343.5032 379.406,-342.1033 379.2787,-340.6954 379.1509,-339.2811 379.0227,-337.8621 378.8942,-336.4402 378.7655,-335.017 378.6369,-333.5943 378.5086,-332.1738 378.3805,-330.7571 378.253,-329.3459 378.1261,-327.942 378,-326.5471 378,-326.5471 377.8739,-327.942 377.747,-329.3459 377.6195,-330.7571 377.4914,-332.1738 377.3631,-333.5943 377.2345,-335.017 377.1058,-336.4402 376.9773,-337.8621 376.8491,-339.2811 376.7213,-340.6954 376.594,-342.1033 376.4675,-343.5032 376.3418,-344.8933 376.2172,-346.2719 376.0938,-347.6374 375.9718,-348.9879 375.8512,-350.322 375.7323,-351.6377 375.6152,-352.9334 375.5,-354.2075 380.5,-354.2075\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"382.3751,-326.5086 378,-316.5086 373.6251,-326.5087 382.3751,-326.5086\"/>\n",
"</g>\n",
"<!-- bash -->\n",
"<g id=\"node7\" class=\"node\">\n",
"<title>bash</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"484\" cy=\"-296.5929\" rx=\"37.4742\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"484\" y=\"-290.5929\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">bash</text>\n",
"</g>\n",
"<!-- markdown&#45;&gt;bash -->\n",
"<g id=\"edge7\" class=\"edge\">\n",
"<title>markdown&#45;&gt;bash</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"420.0595,-360.0985 421.0381,-359.541 422.0218,-358.9732 423.0037,-358.3985 423.9834,-357.8167 424.9601,-357.2282 425.9334,-356.6328 426.9028,-356.0307 427.8676,-355.4219 428.8273,-354.8064 429.7815,-354.1845 430.7295,-353.556 431.6707,-352.9212 432.6048,-352.2799 433.531,-351.6324 434.4488,-350.9786 435.3577,-350.3186 436.2572,-349.6526 437.1467,-348.9805 438.0255,-348.3024 438.8949,-347.6172 440.2273,-346.5376 441.5519,-345.4299 442.8662,-344.2973 444.17,-343.1417 445.4626,-341.9647 446.7435,-340.7682 448.0122,-339.554 449.2683,-338.3239 450.511,-337.0796 451.7399,-335.823 452.9544,-334.5558 454.154,-333.2799 455.3379,-331.997 456.5057,-330.7089 457.6567,-329.4174 458.7903,-328.1245 459.906,-326.8317 461.0031,-325.541 462.081,-324.2542 463.139,-322.973 463.139,-322.973 461.9727,-324.1557 460.7869,-325.3416 459.5824,-326.5289 458.3602,-327.7157 457.121,-328.9002 455.8658,-330.0807 454.5953,-331.2553 453.3106,-332.4222 452.0125,-333.5796 450.7018,-334.7257 449.3795,-335.8587 448.0464,-336.9768 446.7035,-338.0781 445.3517,-339.1608 443.9919,-340.2232 442.6251,-341.2633 441.2522,-342.2794 439.8742,-343.2696 438.4921,-344.2322 437.1051,-345.1666 436.2094,-345.7526 435.3015,-346.3333 434.3838,-346.9073 433.4566,-347.4749 432.5206,-348.0358 431.5762,-348.5901 430.6241,-349.1378 429.6647,-349.6789 428.6986,-350.2133 427.7263,-350.7411 426.7484,-351.2621 425.7654,-351.7764 424.7779,-352.284 423.7864,-352.7848 422.7914,-353.2788 421.7935,-353.7661 420.7932,-354.2465 419.791,-354.72 418.7876,-355.1868 417.777,-355.6499 420.0595,-360.0985\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"466.519,-325.7527 469.7349,-315.322 459.8917,-320.0394 466.519,-325.7527\"/>\n",
"</g>\n",
"<!-- program -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>program</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"242\" cy=\"-220.9949\" rx=\"59.4468\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"242\" y=\"-214.9949\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">program</text>\n",
"</g>\n",
"<!-- narrative&#45;&gt;program -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>narrative&#45;&gt;program</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"243.7625,-276.7635 243.6626,-275.5766 243.5611,-274.3709 243.4582,-273.148 243.3539,-271.9092 243.2484,-270.656 243.1418,-269.3898 243.0342,-268.1121 242.9258,-266.8242 242.8166,-265.5276 242.7069,-264.2237 242.5966,-262.9139 242.486,-261.5997 242.3751,-260.2825 242.2641,-258.9636 242.153,-257.6446 242.0421,-256.3268 241.9314,-255.0118 241.821,-253.7008 241.7111,-252.3953 241.6018,-251.0968 241.6018,-251.0968 241.4582,-252.392 241.3138,-253.6941 241.1688,-255.0017 241.0234,-256.3134 240.8776,-257.6277 240.7317,-258.9433 240.5858,-260.2588 240.4401,-261.5726 240.2948,-262.8835 240.1499,-264.1899 240.0057,-265.4904 239.8623,-266.7837 239.7198,-268.0683 239.5785,-269.3427 239.4385,-270.6056 239.2999,-271.8556 239.1629,-273.0912 239.0276,-274.3109 238.8942,-275.5135 238.763,-276.6974 243.7625,-276.7635\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"245.9778,-251.0443 241.7355,-240.9872 237.2286,-250.9285 245.9778,-251.0443\"/>\n",
"</g>\n",
"<!-- human -->\n",
"<g id=\"node10\" class=\"node\">\n",
"<title>human</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"66\" cy=\"-121.397\" rx=\"49.6089\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"66\" y=\"-115.397\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">human</text>\n",
"</g>\n",
"<!-- narrative&#45;&gt;human -->\n",
"<g id=\"edge11\" class=\"edge\">\n",
"<title>narrative&#45;&gt;human</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"218.9248,-276.3084 216.9085,-274.7344 214.8493,-273.1181 212.7492,-271.4602 210.6129,-269.7634 208.4448,-268.0304 206.2494,-266.264 204.0313,-264.4669 201.795,-262.6417 199.545,-260.7914 197.2859,-258.9185 195.0222,-257.0259 192.7585,-255.1162 190.4992,-253.1922 188.2489,-251.2566 186.0121,-249.3122 183.7934,-247.3617 181.5974,-245.4079 179.4285,-243.4535 177.2913,-241.5014 175.1908,-239.5545 170.4264,-235.0625 165.6437,-230.473 160.8528,-225.8004 156.0643,-221.0599 151.2889,-216.2665 146.5371,-211.4354 141.8194,-206.5817 137.1466,-201.7204 132.5291,-196.8666 127.9774,-192.0353 123.5021,-187.2416 119.1138,-182.5006 114.8229,-177.8272 110.6399,-173.2365 106.5754,-168.7435 102.6398,-164.3633 98.8437,-160.1109 95.1976,-156.0012 91.7119,-152.0493 88.3971,-148.2703 88.3971,-148.2703 91.6077,-152.1384 94.9848,-156.1843 98.5183,-160.3926 102.1982,-164.7482 106.0143,-169.2357 109.9567,-173.84 114.0154,-178.5457 118.1804,-183.3378 122.4416,-188.2009 126.789,-193.1198 131.2126,-198.0793 135.7024,-203.0642 140.2485,-208.0592 144.8408,-213.0492 149.4695,-218.019 154.1245,-222.9535 158.7959,-227.8373 163.4739,-232.6554 168.1485,-237.3927 172.8092,-242.0333 174.8755,-244.0558 176.9766,-246.0829 179.1087,-248.112 181.2673,-250.1406 183.448,-252.1656 185.6463,-254.1844 187.8579,-256.1942 190.0783,-258.192 192.3031,-260.1751 194.5279,-262.1406 196.7482,-264.0858 198.9595,-266.0078 201.1575,-267.9038 203.3378,-269.771 205.4958,-271.6064 207.6271,-273.4074 209.7274,-275.171 211.7921,-276.8944 213.8169,-278.5748 215.7947,-280.2074 218.9248,-276.3084\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"91.4953,-145.1587 81.696,-140.351 84.8157,-150.8108 91.4953,-145.1587\"/>\n",
"</g>\n",
"<!-- application -->\n",
"<g id=\"node4\" class=\"node\">\n",
"<title>application</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"502\" cy=\"-121.397\" rx=\"74.2911\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"502\" y=\"-115.397\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">application</text>\n",
"</g>\n",
"<!-- program&#45;&gt;application -->\n",
"<g id=\"edge3\" class=\"edge\">\n",
"<title>program&#45;&gt;application</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"299.7754,-218.5399 305.2023,-217.7357 310.781,-216.8603 316.4874,-215.9123 322.3072,-214.8888 328.2266,-213.7872 334.2313,-212.6046 340.3074,-211.3384 346.4407,-209.9857 352.617,-208.5437 358.8224,-207.0097 365.0428,-205.381 371.2639,-203.6547 377.4718,-201.8281 383.6522,-199.8984 389.7911,-197.8629 395.8743,-195.7187 401.8877,-193.4633 407.817,-191.0937 413.6483,-188.6073 419.3666,-186.0016 422.4475,-184.5038 425.5155,-182.9237 428.5679,-181.267 431.6016,-179.5399 434.6134,-177.7484 437.6004,-175.8986 440.5593,-173.9963 443.4871,-172.0477 446.3806,-170.0588 449.2366,-168.0354 452.052,-165.9838 454.8236,-163.9098 457.5482,-161.8194 460.2226,-159.7188 462.8436,-157.6138 465.4079,-155.5105 467.9125,-153.4149 470.3539,-151.333 472.7291,-149.2708 475.0347,-147.2343 475.0347,-147.2343 472.6771,-149.2098 470.2498,-151.2087 467.7563,-153.2251 465.2002,-155.253 462.5849,-157.2864 459.9138,-159.3194 457.1905,-161.346 454.4184,-163.3603 451.601,-165.3561 448.7419,-167.3276 445.8445,-169.2689 442.9124,-171.1738 439.9491,-173.0365 436.9581,-174.8509 433.9431,-176.6111 430.9077,-178.3112 427.8553,-179.9451 424.7897,-181.5069 421.7145,-182.9906 418.6334,-184.3904 412.8912,-186.8283 407.0415,-189.1443 401.0975,-191.3418 395.0732,-193.424 388.9824,-195.3939 382.839,-197.2547 376.6569,-199.0094 370.4501,-200.6612 364.2325,-202.2132 358.0181,-203.6684 351.8207,-205.03 345.6544,-206.3012 339.5331,-207.4849 333.4708,-208.5842 327.4813,-209.6024 321.5788,-210.5424 315.7771,-211.4074 310.0903,-212.2006 304.5323,-212.9249 299.1069,-213.5848 299.7754,-218.5399\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"478.0157,-150.4381 482.5715,-140.5191 472.1947,-143.9051 478.0157,-150.4381\"/>\n",
"</g>\n",
"<!-- scripting -->\n",
"<g id=\"node5\" class=\"node\">\n",
"<title>scripting</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"349\" cy=\"-121.397\" rx=\"60.6092\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"349\" y=\"-115.397\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">scripting</text>\n",
"</g>\n",
"<!-- program&#45;&gt;scripting -->\n",
"<g id=\"edge4\" class=\"edge\">\n",
"<title>program&#45;&gt;scripting</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"263.8292,-204.0913 266.3027,-201.6413 268.8714,-199.0969 271.5263,-196.4671 274.2584,-193.761 277.0584,-190.9875 279.9174,-188.1556 282.8262,-185.2743 285.7758,-182.3527 288.7571,-179.3997 291.7609,-176.4244 294.7781,-173.4357 297.7998,-170.4427 300.8168,-167.4543 303.82,-164.4796 306.8003,-161.5275 309.7487,-158.6071 312.656,-155.7273 315.5132,-152.8973 318.3111,-150.1259 321.0407,-147.4221 321.0407,-147.4221 318.1485,-149.9512 315.184,-152.5437 312.1567,-155.191 309.0763,-157.8847 305.9524,-160.6165 302.7946,-163.3779 299.6126,-166.1606 296.4159,-168.9559 293.2143,-171.7557 290.0174,-174.5513 286.8347,-177.3345 283.676,-180.0968 280.5507,-182.8297 277.4687,-185.5249 274.4395,-188.1739 271.4727,-190.7683 268.578,-193.2996 265.765,-195.7596 263.0433,-198.1396 260.4225,-200.4314 263.8292,-204.0913\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"324.2617,-150.401 328.6006,-140.3852 318.3,-143.9962 324.2617,-150.401\"/>\n",
"</g>\n",
"<!-- computer -->\n",
"<g id=\"node11\" class=\"node\">\n",
"<title>computer</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"199\" cy=\"-121.397\" rx=\"64.94\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"199\" y=\"-115.397\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">computer</text>\n",
"</g>\n",
"<!-- program&#45;&gt;computer -->\n",
"<g id=\"edge13\" class=\"edge\">\n",
"<title>program&#45;&gt;computer</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"235.7998,-200.3267 234.7462,-198.1613 233.6571,-195.9228 232.5355,-193.6176 231.3847,-191.2525 230.208,-188.834 229.0086,-186.3688 227.7896,-183.8635 226.5543,-181.3246 225.3059,-178.7589 224.0477,-176.1729 222.7828,-173.5732 221.5145,-170.9664 220.2459,-168.3592 218.9804,-165.7582 217.7211,-163.17 216.4712,-160.6012 215.234,-158.0584 214.0127,-155.5483 212.8105,-153.0774 211.6306,-150.6524 211.6306,-150.6524 212.5864,-153.1741 213.5603,-155.7436 214.5496,-158.3539 215.5519,-160.9981 216.5643,-163.6694 217.5845,-166.3609 218.6096,-169.0657 219.6372,-171.7769 220.6647,-174.4876 221.6893,-177.191 222.7086,-179.8802 223.7198,-182.5484 224.7205,-185.1885 225.708,-187.7938 226.6796,-190.3574 227.6328,-192.8723 228.565,-195.3318 229.4736,-197.7289 230.3559,-200.0568 231.2094,-202.3085 235.7998,-200.3267\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"215.4582,-148.4802 207.4778,-141.0334 207.4249,-151.9485 215.4582,-148.4802\"/>\n",
"</g>\n",
"<!-- static -->\n",
"<g id=\"node8\" class=\"node\">\n",
"<title>static</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"333\" cy=\"-35.799\" rx=\"41.3178\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"333\" y=\"-29.799\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">static</text>\n",
"</g>\n",
"<!-- application&#45;&gt;static -->\n",
"<g id=\"edge10\" class=\"edge\">\n",
"<title>application&#45;&gt;static</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"468.5221,-101.6381 464.1529,-99.5499 459.625,-97.3859 454.9555,-95.1541 450.1613,-92.8628 445.2595,-90.52 440.2671,-88.134 435.2011,-85.7127 430.0786,-83.2645 424.9165,-80.7973 419.7319,-78.3194 414.5418,-75.8388 409.3631,-73.3637 404.213,-70.9023 399.1084,-68.4626 394.0664,-66.0528 389.1039,-63.681 384.238,-61.3554 379.4857,-59.0841 374.864,-56.8752 370.3899,-54.7369 370.3899,-54.7369 374.761,-57.0786 379.2763,-59.4975 383.9192,-61.9849 388.6731,-64.5316 393.5213,-67.129 398.4473,-69.768 403.4343,-72.4397 408.4659,-75.1352 413.5253,-77.8457 418.596,-80.5621 423.6612,-83.2757 428.7044,-85.9775 433.7091,-88.6586 438.6584,-91.3101 443.5358,-93.9231 448.3248,-96.4887 453.0086,-98.9979 457.5706,-101.4419 461.9943,-103.8118 466.2629,-106.0986 468.5221,-101.6381\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"372.2948,-50.7975 361.397,-50.182 368.3411,-58.6034 372.2948,-50.7975\"/>\n",
"</g>\n",
"<!-- dynamic -->\n",
"<g id=\"node9\" class=\"node\">\n",
"<title>dynamic</title>\n",
"<ellipse fill=\"none\" stroke=\"#000000\" stroke-width=\"0\" cx=\"214\" cy=\"-35.799\" rx=\"60.0203\" ry=\"19.6\"/>\n",
"<text text-anchor=\"middle\" x=\"214\" y=\"-29.799\" font-family=\"Times,serif\" font-size=\"20.00\" fill=\"#000000\">dynamic</text>\n",
"</g>\n",
"<!-- scripting&#45;&gt;dynamic -->\n",
"<g id=\"edge9\" class=\"edge\">\n",
"<title>scripting&#45;&gt;dynamic</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"317.1464,-102.3457 315.5119,-101.5293 313.8647,-100.702 312.2043,-99.8631 310.5324,-99.0132 308.8509,-98.153 307.1615,-97.2831 305.4663,-96.4042 303.7669,-95.517 302.0652,-94.622 300.363,-93.72 298.6623,-92.8115 296.9647,-91.8973 295.2721,-90.978 293.5865,-90.0541 291.9095,-89.1265 290.243,-88.1957 288.5889,-87.2624 286.949,-86.3272 285.3252,-85.3908 283.7192,-84.4538 281.8304,-83.3382 279.9312,-82.2029 278.0235,-81.0495 276.1091,-79.8798 274.1899,-78.6953 272.2678,-77.4977 270.3448,-76.2886 268.4228,-75.0698 266.5035,-73.8429 264.589,-72.6095 262.6811,-71.3712 260.7816,-70.1298 258.8925,-68.8869 257.0157,-67.6441 255.1529,-66.4031 253.3062,-65.1655 251.4773,-63.933 249.6682,-62.7071 247.8806,-61.4897 246.1166,-60.2822 246.1166,-60.2822 247.8047,-61.594 249.5158,-62.9174 251.2483,-64.2507 253.0004,-65.5921 254.7703,-66.9398 256.5564,-68.2922 258.3568,-69.6475 260.1699,-71.004 261.9938,-72.3599 263.8269,-73.7135 265.6674,-75.063 267.5136,-76.4068 269.3637,-77.7431 271.2161,-79.0702 273.069,-80.3863 274.9206,-81.6898 276.7694,-82.9788 278.6135,-84.2517 280.4512,-85.5068 282.2808,-86.7422 283.8393,-87.7823 285.4155,-88.8229 287.0077,-89.863 288.614,-90.9019 290.2327,-91.9389 291.862,-92.9733 293.5,-94.0042 295.1451,-95.0309 296.7953,-96.0527 298.449,-97.0688 300.1043,-98.0785 301.7595,-99.0809 303.4127,-100.0754 305.0622,-101.0612 306.7061,-102.0375 308.3428,-103.0036 309.9703,-103.9587 311.587,-104.902 313.1909,-105.8329 314.778,-106.7492 317.1464,-102.3457\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"248.3871,-56.5199 237.7456,-54.0907 243.1838,-63.5547 248.3871,-56.5199\"/>\n",
"</g>\n",
"<!-- python&#45;&gt;scripting -->\n",
"<g id=\"edge6\" class=\"edge\">\n",
"<title>python&#45;&gt;scripting</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"377.1398,-276.0875 376.251,-271.306 375.2917,-266.1449 374.2688,-260.6421 373.1895,-254.8354 372.0607,-248.7629 370.8896,-242.4624 369.6831,-235.9719 368.4484,-229.3293 367.1925,-222.5726 365.9224,-215.7397 364.6452,-208.8686 363.3679,-201.9971 362.0977,-195.1631 360.8414,-188.4048 359.6063,-181.7598 358.3993,-175.2663 357.2274,-168.9621 356.0979,-162.8852 355.0176,-157.0734 353.9937,-151.5648 353.9937,-151.5648 354.7994,-157.1096 355.6494,-162.9594 356.5383,-169.0762 357.4603,-175.4217 358.4101,-181.9578 359.382,-188.6463 360.3705,-195.449 361.3701,-202.3278 362.3752,-209.2443 363.3802,-216.1606 364.3796,-223.0383 365.3678,-229.8393 366.3394,-236.5254 367.2887,-243.0584 368.2103,-249.4002 369.0985,-255.5126 369.9478,-261.3573 370.7527,-266.8962 371.5075,-272.0912 372.2069,-276.904 377.1398,-276.0875\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"358.2373,-150.411 352.2879,-141.2598 349.6048,-151.84 358.2373,-150.411\"/>\n",
"</g>\n",
"<!-- bash&#45;&gt;application -->\n",
"<g id=\"edge8\" class=\"edge\">\n",
"<title>bash&#45;&gt;application</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"488.5517,-276.7512 488.9491,-271.9443 489.378,-266.7557 489.8354,-261.2235 490.3179,-255.3859 490.8226,-249.281 491.3462,-242.9469 491.8856,-236.4218 492.4377,-229.7439 492.9992,-222.9512 493.5671,-216.0818 494.1381,-209.174 494.7092,-202.2659 495.2771,-195.3955 495.8388,-188.6011 496.3911,-181.9208 496.9307,-175.3927 497.4546,-169.0549 497.9597,-162.9455 498.4427,-157.1028 498.9005,-151.5648 498.9005,-151.5648 498.2227,-157.0802 497.5075,-162.8991 496.7597,-168.9835 495.984,-175.2954 495.185,-181.7969 494.3673,-188.45 493.5357,-195.2166 492.6948,-202.0589 491.8492,-208.9389 491.0037,-215.8185 490.1629,-222.6598 489.3315,-229.4247 488.5142,-236.0754 487.7155,-242.5739 486.9402,-248.8821 486.193,-254.9621 485.4785,-260.7759 484.8014,-266.2855 484.1663,-271.4529 483.5779,-276.2402 488.5517,-276.7512\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"503.2892,-151.6546 499.9593,-141.2598 494.585,-150.7602 503.2892,-151.6546\"/>\n",
"</g>\n",
"<!-- human&#45;&gt;dynamic -->\n",
"<g id=\"edge12\" class=\"edge\">\n",
"<title>human&#45;&gt;dynamic</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"95.7875,-107.0569 99.2359,-104.9369 102.812,-102.7383 106.5036,-100.4688 110.2984,-98.1358 114.1842,-95.7468 118.1488,-93.3094 122.1799,-90.8311 126.2652,-88.3195 130.3927,-85.782 134.5499,-83.2261 138.7247,-80.6595 142.9048,-78.0896 147.078,-75.5239 151.2321,-72.9701 155.3548,-70.4355 159.4338,-67.9277 163.457,-65.4543 167.4121,-63.0227 171.2868,-60.6405 175.069,-58.3153 175.069,-58.3153 171.1674,-60.4341 167.1703,-62.6047 163.0904,-64.8203 158.9401,-67.0741 154.7323,-69.3592 150.4794,-71.6687 146.1942,-73.9958 141.8892,-76.3337 137.5771,-78.6754 133.2705,-81.0141 128.982,-83.3429 124.7243,-85.6551 120.5099,-87.9437 116.3515,-90.202 112.2618,-92.4229 108.2533,-94.5997 104.3387,-96.7256 100.5305,-98.7936 96.8415,-100.7969 93.2842,-102.7287 95.7875,-107.0569\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"177.5617,-61.9277 184.0277,-53.1339 173.1808,-54.3533 177.5617,-61.9277\"/>\n",
"</g>\n",
"<!-- computer&#45;&gt;static -->\n",
"<g id=\"edge14\" class=\"edge\">\n",
"<title>computer&#45;&gt;static</title>\n",
"<polygon fill=\"#000000\" stroke=\"transparent\" stroke-width=\"5\" points=\"243.4559,-108.8483 245.4761,-107.936 247.5168,-106.998 249.5679,-106.0379 251.6271,-105.0557 253.6917,-104.0518 255.7593,-103.0262 257.8273,-101.9792 259.8934,-100.911 261.9549,-99.8218 264.0095,-98.7118 266.0545,-97.5812 268.0875,-96.4303 270.106,-95.2592 272.1075,-94.0681 274.0894,-92.8573 276.0493,-91.6269 277.9845,-90.3772 279.8928,-89.1084 281.7714,-87.8207 283.6178,-86.5143 285.0685,-85.4538 286.5119,-84.3645 287.9469,-83.2486 289.373,-82.1078 290.7894,-80.9441 292.1954,-79.7593 293.5903,-78.5553 294.9734,-77.3341 296.3438,-76.0975 297.7009,-74.8473 299.0438,-73.5855 300.3719,-72.3139 301.6842,-71.0344 302.9802,-69.749 304.2589,-68.4595 305.5196,-67.1677 306.7615,-65.8757 307.9839,-64.5852 309.1858,-63.2982 310.3666,-62.0165 310.3666,-62.0165 309.1101,-63.2235 307.8326,-64.434 306.5352,-65.6461 305.2189,-66.8581 303.8845,-68.0679 302.5331,-69.2738 301.1656,-70.4738 299.7831,-71.6661 298.3864,-72.8487 296.9767,-74.0198 295.5549,-75.1775 294.122,-76.3199 292.679,-77.4451 291.227,-78.5512 289.7669,-79.6364 288.2998,-80.6987 286.8267,-81.7362 285.3487,-82.7471 283.8669,-83.7295 282.3822,-84.6816 280.4888,-85.8546 278.5651,-87.0073 276.6134,-88.1397 274.6362,-89.2517 272.6359,-90.3432 270.615,-91.4143 268.5759,-92.4648 266.5213,-93.4948 264.4534,-94.5041 262.3748,-95.4927 260.288,-96.4606 258.1954,-97.4076 256.0995,-98.3338 254.0029,-99.2391 251.9079,-100.1233 249.8171,-100.9866 247.7329,-101.8287 245.6578,-102.6497 243.5943,-103.4494 241.5375,-104.231 243.4559,-108.8483\"/>\n",
"<polygon fill=\"#000000\" stroke=\"#000000\" stroke-width=\"5\" points=\"313.6664,-64.8936 317.3166,-54.6068 307.2844,-58.9075 313.6664,-64.8936\"/>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.files.Source at 0x108525f28>"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/markdown": [
" import xonsh\n",
"A modern implementation of literate programming could use Markdown as a document language. \n",
"Markdown is a flexible markup language that permits any programming language as a subset.\n",
"A holistic literate programming language should have access to scripting and application languages.\n",
"In this tool, we choose `xonsh` which allows scripting in python and application programming in bash.\n",
"\n",
" implementation"
],
"text/plain": [
" import xonsh\n",
"A modern implementation of literate programming could use Markdown as a document language. \n",
"Markdown is a flexible markup language that permits any programming language as a subset.\n",
"A holistic literate programming language should have access to scripting and application languages.\n",
"In this tool, we choose `xonsh` which allows scripting in python and application programming in bash.\n",
"\n",
" implementation"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
" import xonsh\n",
"A modern implementation of literate programming could use Markdown as a document language. \n",
"Markdown is a flexible markup language that permits any programming language as a subset.\n",
"A holistic literate programming language should have access to scripting and application languages.\n",
"In this tool, we choose `xonsh` which allows scripting in python and application programming in bash.\n",
"\n",
" implementation"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"----\n",
"298\n"
]
},
{
"data": {
"text/markdown": [
"Now using markdown we can run bash code inline `git status` and python `print(F\"{__name__} woo\")`.\n",
"And of course indented code is run as expected.\n",
"\n",
" x = $(ls)\n",
" print('----')\n",
" print(len(x))"
],
"text/plain": [
"Now using markdown we can run bash code inline `git status` and python `print(F\"{__name__} woo\")`.\n",
"And of course indented code is run as expected.\n",
"\n",
" x = $(ls)\n",
" print('----')\n",
" print(len(x))"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"Now using markdown we can run bash code inline `git status` and python `print(F\"{__name__} woo\")`.\n",
"And of course indented code is run as expected.\n",
"\n",
" x = $(ls)\n",
" print('----')\n",
" print(len(x))"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/markdown": [
" import doctest\n",
"We can `doctest` stuff too!\n",
"\n",
" >>> echo hello\n",
" hello\n",
" <BLANKLINE>\n",
" >>> 11\n",
" 1..."
],
"text/plain": [
" import doctest\n",
"We can `doctest` stuff too!\n",
"\n",
" >>> echo hello\n",
" hello\n",
" <BLANKLINE>\n",
" >>> 11\n",
" 1..."
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
" import doctest\n",
"We can `doctest` stuff too!\n",
"\n",
" >>> echo hello\n",
" hello\n",
" <BLANKLINE>\n",
" >>> 11\n",
" 1..."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
with __import__('importnb').Notebook():
try: from . import __doctest_post_run_cell, __interactive_markdown_cells, __string_expression_transformer, __interactive_jinja_templates, __xonsh_compiler, __emojis__, __return_yield_display, __pidgin_loader, __functional_programming_toolz, __default_markdown_display_for_strings
except: import __doctest_post_run_cell, __interactive_markdown_cells, __string_expression_transformer, __interactive_jinja_templates, __xonsh_compiler, __emojis__, __return_yield_display, __pidgin_loader, __functional_programming_toolz, __default_markdown_display_for_strings
PidginLoader = __pidgin_loader.PidginLoader
def unload_ipython_extension(shell): [x.unload_ipython_extension(shell) for x in (__doctest_post_run_cell, __interactive_markdown_cells, __string_expression_transformer, __interactive_jinja_templates, __xonsh_compiler, __emojis__, __return_yield_display, __default_markdown_display_for_strings)]
def load_ipython_extension(shell): [x.load_ipython_extension(shell) for x in (__doctest_post_run_cell, __interactive_markdown_cells, __string_expression_transformer, __interactive_jinja_templates, __xonsh_compiler, __emojis__, __return_yield_display, __default_markdown_display_for_strings)]
import schematypes
from tonyfast.poser import *
shell = get_ipython()
shell.run_cell("\n %reload_ext tonyfast.literacy")
shell.enable_html_pager = True
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
toolz
notebook
importnb
htmlmin
nbconvert
IPython
xonsh
graphviz
emoji
stringcase
@tonyfast
Copy link
Author

Screen Shot 2019-10-11 at 9 47 55 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment