Skip to content

Commit 8b530f1

Browse files
adding a style hack
1 parent 9225384 commit 8b530f1

File tree

5 files changed

+281
-256
lines changed

5 files changed

+281
-256
lines changed

Chapter1_Introduction/Chapter1_Introduction.ipynb

Lines changed: 62 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -19,56 +19,6 @@
1919
"outputs": [],
2020
"prompt_number": 8
2121
},
22-
{
23-
"cell_type": "markdown",
24-
"metadata": {},
25-
"source": [
26-
"<style>\n",
27-
" @font-face {\n",
28-
" font-family: \"Computer Modern\";\n",
29-
" src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');\n",
30-
" }\n",
31-
" div.cell{\n",
32-
" width:800px;\n",
33-
" margin-left:auto;\n",
34-
" margin-right:auto;\n",
35-
" }\n",
36-
" h1 {\n",
37-
" text-align:center;\n",
38-
" font-family:\"Charis SIL\", serif;\n",
39-
" }\n",
40-
" div.text_cell_render{\n",
41-
" font-family: Computer Modern, \"Helvetica Neue\", Arial, Helvetica, Geneva, sans-serif;\n",
42-
" line-height: 145%;\n",
43-
" font-size: 120%;\n",
44-
" width:800px;\n",
45-
" margin-left:auto;\n",
46-
" margin-right:auto;\n",
47-
" }\n",
48-
" .CodeMirror{\n",
49-
" font-family: Consolas, monospace;\n",
50-
" }\n",
51-
" .prompt{\n",
52-
" display: None;\n",
53-
" }\n",
54-
"</style>\n",
55-
"<script>\n",
56-
" MathJax.Hub.Config({\n",
57-
" TeX: {\n",
58-
" extensions: [\"AMSmath.js\"]\n",
59-
" },\n",
60-
" tex2jax: {\n",
61-
" inlineMath: [ ['$','$'], [\"\\\\(\",\"\\\\)\"] ],\n",
62-
" displayMath: [ ['$$','$$'], [\"\\\\[\",\"\\\\]\"] ]\n",
63-
" },\n",
64-
" displayAlign: 'center', // Change this to 'center' to center equations.\n",
65-
" \"HTML-CSS\": {\n",
66-
" styles: {'.MathJax_Display': {\"margin\": 4}}\n",
67-
" }\n",
68-
" });\n",
69-
"</script>"
70-
]
71-
},
7222
{
7323
"cell_type": "markdown",
7424
"metadata": {},
@@ -891,6 +841,68 @@
891841
"- [1] Gelman, Andrew. N.p.. Web. 22 Jan 2013. <http://andrewgelman.com/2005/07/n_is_never_larg/>.\n",
892842
"- [2] Norvig, Peter. 2009. [*The Unreasonable Effectivness of Data*](http://www.csee.wvu.edu/~gidoretto/courses/2011-fall-cp/reading/TheUnreasonable EffectivenessofData_IEEE_IS2009.pdf)."
893843
]
844+
},
845+
{
846+
"cell_type": "code",
847+
"collapsed": false,
848+
"input": [
849+
"from IPython.core.display import HTML\n",
850+
"def css_styling():\n",
851+
" styles = open(\"../styles/custom.css\", \"r\").read()\n",
852+
" return HTML(styles)\n",
853+
"css_styling()"
854+
],
855+
"language": "python",
856+
"metadata": {},
857+
"outputs": [
858+
{
859+
"html": [
860+
"<style>\n",
861+
" @font-face {\n",
862+
" font-family: \"Computer Modern\";\n",
863+
" src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');\n",
864+
" }\n",
865+
" div.cell{\n",
866+
" width:800px;\n",
867+
" margin-left:auto;\n",
868+
" margin-right:auto;\n",
869+
" }\n",
870+
" h1 {\n",
871+
" text-align:center;\n",
872+
" font-family:\"Charis SIL\", serif;\n",
873+
" }\n",
874+
" div.text_cell_render{\n",
875+
" font-family: Computer Modern, \"Helvetica Neue\", Arial, Helvetica, Geneva, sans-serif;\n",
876+
" line-height: 145%;\n",
877+
" font-size: 120%;\n",
878+
" width:800px;\n",
879+
" margin-left:auto;\n",
880+
" margin-right:auto;\n",
881+
" }\n",
882+
" .CodeMirror{\n",
883+
" font-family: Consolas, monospace;\n",
884+
" }\n",
885+
" .prompt{\n",
886+
" display: None;\n",
887+
" }\n",
888+
"</style>"
889+
],
890+
"output_type": "pyout",
891+
"prompt_number": 1,
892+
"text": [
893+
"<IPython.core.display.HTML at 0x5863050>"
894+
]
895+
}
896+
],
897+
"prompt_number": 1
898+
},
899+
{
900+
"cell_type": "code",
901+
"collapsed": false,
902+
"input": [],
903+
"language": "python",
904+
"metadata": {},
905+
"outputs": []
894906
}
895907
],
896908
"metadata": {}

Chapter2_MorePyMC/MorePyMC.ipynb

Lines changed: 54 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,6 @@
77
"worksheets": [
88
{
99
"cells": [
10-
{
11-
"cell_type": "markdown",
12-
"metadata": {},
13-
"source": [
14-
"<style>\n",
15-
" @font-face {\n",
16-
" font-family: \"Computer Modern\";\n",
17-
" src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');\n",
18-
" }\n",
19-
" div.cell{\n",
20-
" width:800px;\n",
21-
" margin-left:auto;\n",
22-
" margin-right:auto;\n",
23-
" }\n",
24-
" h1 {\n",
25-
" text-align:center;\n",
26-
" font-family:\"Charis SIL\", serif;\n",
27-
" }\n",
28-
" div.text_cell_render{\n",
29-
" font-family: Computer Modern, \"Helvetica Neue\", Arial, Helvetica, Geneva, sans-serif;\n",
30-
" line-height: 145%;\n",
31-
" font-size: 120%;\n",
32-
" width:800px;\n",
33-
" margin-left:auto;\n",
34-
" margin-right:auto;\n",
35-
" }\n",
36-
" .CodeMirror{\n",
37-
" font-family: Consolas, monospace;\n",
38-
" }\n",
39-
" .prompt{\n",
40-
" display: None;\n",
41-
" }\n",
42-
"</style>\n",
43-
"<script>\n",
44-
" MathJax.Hub.Config({\n",
45-
" TeX: {\n",
46-
" extensions: [\"AMSmath.js\"]\n",
47-
" },\n",
48-
" tex2jax: {\n",
49-
" inlineMath: [ ['$','$'], [\"\\\\(\",\"\\\\)\"] ],\n",
50-
" displayMath: [ ['$$','$$'], [\"\\\\[\",\"\\\\]\"] ]\n",
51-
" },\n",
52-
" displayAlign: 'center', // Change this to 'center' to center equations.\n",
53-
" \"HTML-CSS\": {\n",
54-
" styles: {'.MathJax_Display': {\"margin\": 4}}\n",
55-
" }\n",
56-
" });\n",
57-
"</script>"
58-
]
59-
},
6010
{
6111
"cell_type": "code",
6212
"collapsed": false,
@@ -1734,6 +1684,60 @@
17341684
"- [4] Newport, Frank, Jeffery M. Jones, and Lydia Saad . \"Final Presidential Estimate.\" Gallup.com. N.p., 02 Nov 2008. Web. 17 Feb 2013. [http://www.gallup.com/poll/111703/Final-Presidential-Estimate-Obama-55-McCain-44.asp&xgt](http://www.gallup.com/poll/111703/Final-Presidential-Estimate-Obama-55-McCain-44.asp&xgt);. "
17351685
]
17361686
},
1687+
{
1688+
"cell_type": "code",
1689+
"collapsed": false,
1690+
"input": [
1691+
"from IPython.core.display import HTML\n",
1692+
"def css_styling():\n",
1693+
" styles = open(\"../styles/custom.css\", \"r\").read()\n",
1694+
" return HTML(styles)\n",
1695+
"css_styling()"
1696+
],
1697+
"language": "python",
1698+
"metadata": {},
1699+
"outputs": [
1700+
{
1701+
"html": [
1702+
"<style>\n",
1703+
" @font-face {\n",
1704+
" font-family: \"Computer Modern\";\n",
1705+
" src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');\n",
1706+
" }\n",
1707+
" div.cell{\n",
1708+
" width:800px;\n",
1709+
" margin-left:auto;\n",
1710+
" margin-right:auto;\n",
1711+
" }\n",
1712+
" h1 {\n",
1713+
" text-align:center;\n",
1714+
" font-family:\"Charis SIL\", serif;\n",
1715+
" }\n",
1716+
" div.text_cell_render{\n",
1717+
" font-family: Computer Modern, \"Helvetica Neue\", Arial, Helvetica, Geneva, sans-serif;\n",
1718+
" line-height: 145%;\n",
1719+
" font-size: 120%;\n",
1720+
" width:800px;\n",
1721+
" margin-left:auto;\n",
1722+
" margin-right:auto;\n",
1723+
" }\n",
1724+
" .CodeMirror{\n",
1725+
" font-family: Consolas, monospace;\n",
1726+
" }\n",
1727+
" .prompt{\n",
1728+
" display: None;\n",
1729+
" }\n",
1730+
"</style>"
1731+
],
1732+
"output_type": "pyout",
1733+
"prompt_number": 1,
1734+
"text": [
1735+
"<IPython.core.display.HTML at 0x57d2050>"
1736+
]
1737+
}
1738+
],
1739+
"prompt_number": 1
1740+
},
17371741
{
17381742
"cell_type": "code",
17391743
"collapsed": false,

Chapter3_MCMC/IntroMCMC.ipynb

Lines changed: 57 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -7,67 +7,17 @@
77
"worksheets": [
88
{
99
"cells": [
10-
{
11-
"cell_type": "markdown",
12-
"metadata": {},
13-
"source": [
14-
"<style>\n",
15-
" @font-face {\n",
16-
" font-family: \"Computer Modern\";\n",
17-
" src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');\n",
18-
" }\n",
19-
" div.cell{\n",
20-
" width:800px;\n",
21-
" margin-left:auto;\n",
22-
" margin-right:auto;\n",
23-
" }\n",
24-
" h1 {\n",
25-
" text-align:center;\n",
26-
" font-family:\"Charis SIL\", serif;\n",
27-
" }\n",
28-
" div.text_cell_render{\n",
29-
" font-family: Computer Modern, \"Helvetica Neue\", Arial, Helvetica, Geneva, sans-serif;\n",
30-
" line-height: 145%;\n",
31-
" font-size: 120%;\n",
32-
" width:800px;\n",
33-
" margin-left:auto;\n",
34-
" margin-right:auto;\n",
35-
" }\n",
36-
" .CodeMirror{\n",
37-
" font-family: Consolas, monospace;\n",
38-
" }\n",
39-
" .prompt{\n",
40-
" display: None;\n",
41-
" }\n",
42-
"</style>\n",
43-
"<script>\n",
44-
" MathJax.Hub.Config({\n",
45-
" TeX: {\n",
46-
" extensions: [\"AMSmath.js\"]\n",
47-
" },\n",
48-
" tex2jax: {\n",
49-
" inlineMath: [ ['$','$'], [\"\\\\(\",\"\\\\)\"] ],\n",
50-
" displayMath: [ ['$$','$$'], [\"\\\\[\",\"\\\\]\"] ]\n",
51-
" },\n",
52-
" displayAlign: 'center', // Change this to 'center' to center equations.\n",
53-
" \"HTML-CSS\": {\n",
54-
" styles: {'.MathJax_Display': {\"margin\": 4}}\n",
55-
" }\n",
56-
" });\n",
57-
"</script>"
58-
]
59-
},
6010
{
6111
"cell_type": "code",
6212
"collapsed": false,
6313
"input": [
64-
"figsize( 12.5, 4 )\n",
65-
"import scipy.stats as stats"
14+
"import scipy.stats as stats\n",
15+
"figsize(12.5,4)"
6616
],
6717
"language": "python",
6818
"metadata": {},
6919
"outputs": [],
70-
"prompt_number": 1
20+
"prompt_number": 13
7121
},
7222
{
7323
"cell_type": "markdown",
@@ -1059,6 +1009,60 @@
10591009
"\n"
10601010
]
10611011
},
1012+
{
1013+
"cell_type": "code",
1014+
"collapsed": false,
1015+
"input": [
1016+
"from IPython.core.display import HTML\n",
1017+
"def css_styling():\n",
1018+
" styles = open(\"../styles/custom.css\", \"r\").read()\n",
1019+
" return HTML(styles)\n",
1020+
"css_styling()"
1021+
],
1022+
"language": "python",
1023+
"metadata": {},
1024+
"outputs": [
1025+
{
1026+
"html": [
1027+
"<style>\n",
1028+
" @font-face {\n",
1029+
" font-family: \"Computer Modern\";\n",
1030+
" src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');\n",
1031+
" }\n",
1032+
" div.cell{\n",
1033+
" width:800px;\n",
1034+
" margin-left:auto;\n",
1035+
" margin-right:auto;\n",
1036+
" }\n",
1037+
" h1 {\n",
1038+
" text-align:center;\n",
1039+
" font-family:\"Charis SIL\", serif;\n",
1040+
" }\n",
1041+
" div.text_cell_render{\n",
1042+
" font-family: Computer Modern, \"Helvetica Neue\", Arial, Helvetica, Geneva, sans-serif;\n",
1043+
" line-height: 145%;\n",
1044+
" font-size: 120%;\n",
1045+
" width:800px;\n",
1046+
" margin-left:auto;\n",
1047+
" margin-right:auto;\n",
1048+
" }\n",
1049+
" .CodeMirror{\n",
1050+
" font-family: Consolas, monospace;\n",
1051+
" }\n",
1052+
" .prompt{\n",
1053+
" display: None;\n",
1054+
" }\n",
1055+
"</style>"
1056+
],
1057+
"output_type": "pyout",
1058+
"prompt_number": 15,
1059+
"text": [
1060+
"<IPython.core.display.HTML at 0x5e01370>"
1061+
]
1062+
}
1063+
],
1064+
"prompt_number": 15
1065+
},
10621066
{
10631067
"cell_type": "code",
10641068
"collapsed": false,

0 commit comments

Comments
 (0)