Skip to content

Commit 7ff2df9

Browse files
authored
Merge pull request gto76#1 from gto76/master
get caught up....
2 parents 92695eb + d860858 commit 7ff2df9

32 files changed

+18980
-589
lines changed

README.md

Lines changed: 480 additions & 73 deletions
Large diffs are not rendered by default.

index.html

Lines changed: 544 additions & 204 deletions
Large diffs are not rendered by default.

parse.js

Lines changed: 365 additions & 11 deletions
Large diffs are not rendered by default.

pdf/Acrobat/chapter_7.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?xml version = "1.0" encoding = "UTF-8" ?><HeaderFooterSettings version = "8.0"><Font name="Menlo" type="TrueType" size="8.0"/><Color r="0.0" b="0.0" g="0.0"/><Margin left="57.6002" right="72.0" top="36.0" bottom="19.4403"/><Appearance fixedprint="0" shrink="0"/><PageRange odd="0" even="1" start="33" end="41"/><Page offset = "0"><PageIndex format="1"/></Page><Date><Month format="1"/>/<Day format="1"/><Year format="0"/></Date><Header><Left></Left><Center></Center><Right></Right></Header><Footer><Left>| Chapter 7: Libraries</Left><Center></Center><Right></Right></Footer></HeaderFooterSettings>
1+
<?xml version = "1.0" encoding = "UTF-8" ?><HeaderFooterSettings version = "8.0"><Font name="Menlo" type="TrueType" size="8.0"/><Color r="0.0" b="0.0" g="0.0"/><Margin left="57.6002" right="72.0" top="36.0" bottom="19.4403"/><Appearance fixedprint="0" shrink="0"/><PageRange odd="0" even="1" start="33" end="47"/><Page offset = "0"><PageIndex format="1"/></Page><Date><Month format="1"/>/<Day format="1"/><Year format="0"/></Date><Header><Left></Left><Center></Center><Right></Right></Header><Footer><Left>| Chapter 7: Libraries</Left><Center></Center><Right></Right></Footer></HeaderFooterSettings>

pdf/HOW_TO_CREATE_PDF.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PDF file can also be purchased here: https://transactions.sendowl.com/products/7
55
Setup
66
-----
77
* Install Adobe Acrobat Pro DC.
8-
* Copy headers and footers from `pdf/adobe/` folder to `/Users/<username>/Library/Preferences/Adobe/Acrobat/DC/HeaderFooter/`.
8+
* Copy headers and footers from `pdf/acrobat/` folder to `/Users/<username>/Library/Preferences/Adobe/Acrobat/DC/HeaderFooter/`.
99
* Change date in header and footer element of `web/template.html`.
1010
* Run `./parse.js` and commit changes.
1111

@@ -21,7 +21,7 @@ Printing to PDF
2121
* Run `./parse.js` again.
2222
* Open `index.html` in text editor and first remove element `<p><br></p>` before the `<h1>Libraries</h1>`.
2323
* Then replace the footer and last three `<br>` elements with contents of `pdf/index_for_pdf_print.html` file.
24-
* Change all links in text to normal text and optionally add a page number after '(p. <num>)'. Links can be found with this regex: `<strong>.*a href.*</strong>`.
24+
* Change all links in text to normal text and optionally add a page number in brackets like that: '(p. <num>)'. Links can be found with this regex: `<strong>.*a href.*</strong>`.
2525
* Save and open `index.html` in Chrome.
2626
* Change brightness of elements by right clicking on them and selecting inspect. Then click on the rectangle that represents color and toggle the color space to HSLA by clicking on the button with two vertical arrows.
2727
* Change lightness (L) percentage to:
@@ -44,7 +44,7 @@ Adding headers and footers to PDF (the same for both files)
4444
* Select 'Edit PDF' tab and add headers and footers by clicking 'Header & Footer' button, selecting a preset from 'Saved Settings' dropdown menu and clicking ok. Repeat the process for each preset.
4545
* If presets get lost, the font and the margins are as follow: Borders: left-line: 0.6, left-text: 0.8, top-line: 11.4, bottom-text: 0.27, right-text-odd: 0.57, font-name: menlo, font-size: 8.
4646
* Set title and author by selecting 'File/Properties...'.
47-
* Save.
47+
* Save in Adobe, Optimized format.
4848

4949
Printing the PDF
5050
----------------

pdf/index_for_pdf.html

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11

2-
<div class="pagebreak"></div>
3-
<br>
42
<div class="pagebreak"></div>
53
<h2 id="index"><a href="#index" name="index">#</a>Index</h2>
64

@@ -15,8 +13,7 @@ <h3 id="a">A</h3>
1513
<strong>arrays, <a href="#array">29</a></strong><br>
1614
<strong>audio, <a href="#audio">40</a>-<a href="#writefloatsamplestowavfile">41</a></strong> </p>
1715
<h3 id="b">B</h3>
18-
<p><strong>basic script template, <a href="#basicscripttemplate">44</a></strong><br>
19-
<strong>beautifulsoup library, <a href="#scraping">35</a></strong><br>
16+
<p><strong>beautifulsoup library, <a href="#scraping">35</a></strong><br>
2017
<strong>binary representation, <a href="#binhex">8</a></strong><br>
2118
<strong>bitwise operators, <a href="#bitwiseoperators">8</a></strong><br>
2219
<strong>bottle library, <a href="#web">36</a></strong><br>
@@ -31,15 +28,16 @@ <h3 id="c">C</h3>
3128
<strong>combinatorics, <a href="#combinatorics">8</a></strong><br>
3229
<strong>command line arguments, <a href="#commandlinearguments">22</a></strong><br>
3330
<strong>comparable, <a href="#comparable">16</a></strong><br>
34-
<strong>comprehension, <a href="#comprehension">11</a></strong><br>
31+
<strong>comprehensions, <a href="#comprehensions">11</a></strong><br>
3532
<strong>context manager, <a href="#contextmanager">17</a></strong><br>
3633
<strong>copy function, <a href="#copy">15</a></strong><br>
3734
<strong>coroutine, <a href="#coroutines">33</a></strong><br>
3835
<strong>counter, <a href="#counter">2</a>, <a href="#generator">4</a>, <a href="#nonlocal">12</a>, <a href="#iterator-1">17</a></strong><br>
39-
<strong>csv module, <a href="#csv">26</a>, <a href="#printsacsvfileasanasciitable">34</a></strong><br>
40-
<strong>curses module, <a href="#curses">34</a></strong> </p>
36+
<strong>csv module, <a href="#csv">26</a>, <a href="#printsacsvfileasanasciitable">34</a>, <a href="#encodedecode">46</a></strong><br>
37+
<strong>curses module, <a href="#curses">34</a></strong><br>
38+
<strong>cython, <a href="#cython">49</a></strong> </p>
4139
<h3 id="d">D</h3>
42-
<p><strong>dataclasses module, <a href="#namedtupleenumdataclass">12</a></strong>, <a href="#dataclass">15</a></strong><br>
40+
<p><strong>dataclasses module, <a href="#namedtupleenumdataclass">12</a>, <a href="#dataclass">15</a></strong><br>
4341
<strong>datetime module, <a href="#datetime">8</a>-<a href="#constructors">9</a></strong><br>
4442
<strong>decorator, <a href="#decorator">13</a></strong><br>
4543
<strong>deques, <a href="#deque">29</a></strong><br>
@@ -58,7 +56,7 @@ <h3 id="f">F</h3>
5856
<strong>functools module, <a href="#mapfilterreduce">11</a>, <a href="#partial">12</a>, <a href="#decorator">13</a>, <a href="#sortable">16</a></strong><br>
5957
<strong>futures, <a href="#threadpool">30</a></strong> </p>
6058
<h3 id="g">G</h3>
61-
<p><strong>generators, <a href="#generator">4</a>, <a href="#comprehension">11</a></strong><br>
59+
<p><strong>generators, <a href="#generator">4</a>, <a href="#comprehensions">11</a></strong><br>
6260
<strong>global keyword, <a href="#nonlocal">12</a></strong></p>
6361
<h3 id="h">H</h3>
6462
<p><strong>hashable, <a href="#hashable">16</a></strong><br>
@@ -74,10 +72,10 @@ <h3 id="i">I</h3>
7472
<strong>iterator, <a href="#iterator">3</a>, <a href="#iterator-1">17</a></strong><br>
7573
<strong>itertools module, <a href="#itertools">3</a>, <a href="#combinatorics">8</a></strong> </p>
7674
<h3 id="j">J</h3>
77-
<p><strong>json module, <a href="#json">25</a></strong> </p>
75+
<p><strong>json module, <a href="#json">25</a>, <a href="#encodedecode">46</a></strong> </p>
7876
<h3 id="l">L</h3>
7977
<p><strong>lambda, <a href="#lambda">11</a></strong><br>
80-
<strong>list comprehension, <a href="#comprehension">11</a></strong><br>
78+
<strong>list comprehension, <a href="#comprehensions">11</a></strong><br>
8179
<strong>lists, <a href="#list">1</a>-<a href="#list">2</a>, <a href="#otheruses">11</a></strong><br>
8280
<strong>locks, <a href="#lock">29</a></strong><br>
8381
<strong>logging, <a href="#logging">35</a></strong> </p>
@@ -88,28 +86,28 @@ <h3 id="m">M</h3>
8886
<strong>memoryviews, <a href="#memoryview">29</a></strong><br>
8987
<strong>metaclass attribute, <a href="#metaclassattribute">32</a></strong><br>
9088
<strong>metaprograming, <a href="#metaprograming">31</a>-<a href="#metaclass">32</a></strong><br>
91-
<strong>mysql library, <a href="#mysql">26</a></strong> </p>
89+
<strong>mysql library, <a href="#mysql">26</a>, <a href="#encodedecode">46</a></strong> </p>
9290
<h3 id="n">N</h3>
9391
<p><strong>namedtuples, <a href="#namedtuple">3</a></strong><br>
9492
<strong>nonlocal keyword, <a href="#nonlocal">12</a></strong><br>
95-
<strong>numpy module, <a href="#numpy">37</a>-<a href="#indexing">38</a></strong> </p>
93+
<strong>numpy library, <a href="#numpy">37</a>-<a href="#indexing">38</a></strong> </p>
9694
<h3 id="o">O</h3>
9795
<p><strong>open function, <a href="#open">22</a>-<a href="#file">23</a></strong><br>
9896
<strong>operator module, <a href="#operator">31</a></strong><br>
9997
<strong>os commands, <a href="#oscommands">24</a>-<a href="#shellcommands">25</a></strong><br>
10098
<strong>os module, <a href="#path">23</a>, <a href="#oscommands">24</a>-<a href="#shellcommands">25</a></strong> </p>
10199
<h3 id="p">P</h3>
102-
<p><strong>partial function, <a href="#partial">12</a>, <a href="#functionscannotbevaluessotheymustbewrapped">20</a></strong><br>
103-
<strong>pass keyword, <a href="#multipleinheritance">14</a>, <a href="#curses">34</a>, <a href="#basicscripttemplate">42</a></strong><br>
100+
<p><strong>pandas library, <a href="#pandas">44</a></strong><br>
101+
<strong>partial function, <a href="#partial">12</a>, <a href="#functionscannotbevaluessotheymustbewrapped">20</a></strong><br>
104102
<strong>path, <a href="#path">23</a>-<a href="#pathlib">24</a></strong><br>
105103
<strong>pickle module, <a href="#pickle">25</a></strong><br>
106104
<strong>pillow library, <a href="#image">39</a></strong><br>
107-
<strong>plotting, <a href="#plot">34</a></strong><br>
105+
<strong>plotting, <a href="#plot">34</a>, <a href="#plotly">47</a></strong><br>
108106
<strong>print function, <a href="#print">22</a></strong><br>
109107
<strong>profiling, <a href="#profiling">36</a>-<a href="#timingasnippet">37</a></strong><br>
110108
<strong>progress bar, <a href="#progressbar">34</a></strong><br>
111109
<strong>property decorator, <a href="#property">15</a></strong><br>
112-
<strong>pygame module, <a href="#pygame">42</a></strong> </p>
110+
<strong>pygame library, <a href="#pygame">42</a></strong> </p>
113111
<h3 id="q">Q</h3>
114112
<p><strong>queues, <a href="#queue">30</a></strong> </p>
115113
<h3 id="r">R</h3>
@@ -120,7 +118,7 @@ <h3 id="r">R</h3>
120118
<strong>regular expressions, <a href="#regex">5</a>-<a href="#specialsequences">6</a></strong><br>
121119
<strong>requests library, <a href="#scraping">35</a>, <a href="#test">36</a></strong> </p>
122120
<h3 id="s">S</h3>
123-
<p><strong>scraping, <a href="#scraping">35</a>, <a href="#basicmariobrothersexample">43</a></strong><br>
121+
<p><strong>scraping, <a href="#scraping">35</a>, <a href="#basicmariobrothersexample">43</a>, <a href="#encodedecode">46</a>, <a href="#plotly">47</a>, <a href="#confirmedcovidcasesdowjonesgoldandbitcoinprice">48</a></strong><br>
124122
<strong>sequence, <a href="#type">4</a>, <a href="#sequence">18</a>, <a href="#abcsequence">19</a></strong><br>
125123
<strong>sets, <a href="#set">2</a>, <a href="#otheruses">11</a></strong><br>
126124
<strong>shell commands, <a href="#shellcommands">25</a></strong><br>

pdf/index_for_pdf_print.html

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11

2-
<div class="pagebreak"></div>
3-
<br>
42
<div class="pagebreak"></div>
53
<h2 id="index"><a href="#index" name="index">#</a>Index</h2>
64

@@ -15,8 +13,7 @@ <h3 id="a">A</h3>
1513
<strong>arrays, 29</strong><br>
1614
<strong>audio, 40-41</strong> </p>
1715
<h3 id="b">B</h3>
18-
<p><strong>basic script template, 44</strong><br>
19-
<strong>beautifulsoup library, 35</strong><br>
16+
<p><strong>beautifulsoup library, 35</strong><br>
2017
<strong>binary representation, 8</strong><br>
2118
<strong>bitwise operators, 8</strong><br>
2219
<strong>bottle library, 36</strong><br>
@@ -31,13 +28,14 @@ <h3 id="c">C</h3>
3128
<strong>combinatorics, 8</strong><br>
3229
<strong>command line arguments, 22</strong><br>
3330
<strong>comparable, 16</strong><br>
34-
<strong>comprehension, 11</strong><br>
31+
<strong>comprehensions, 11</strong><br>
3532
<strong>context manager, 17</strong><br>
3633
<strong>copy function, 15</strong><br>
3734
<strong>coroutine, 33</strong><br>
3835
<strong>counter, 2, 4, 12, 17</strong><br>
39-
<strong>csv module, 26, 34</strong><br>
40-
<strong>curses module, 34</strong> </p>
36+
<strong>csv module, 26, 34, 46</strong><br>
37+
<strong>curses module, 34</strong><br>
38+
<strong>cython, 49</strong> </p>
4139
<h3 id="d">D</h3>
4240
<p><strong>dataclasses module, 12, 15</strong><br>
4341
<strong>datetime module, 8-9</strong><br>
@@ -74,7 +72,7 @@ <h3 id="i">I</h3>
7472
<strong>iterator, 3, 17</strong><br>
7573
<strong>itertools module, 3, 8</strong> </p>
7674
<h3 id="j">J</h3>
77-
<p><strong>json module, 25</strong> </p>
75+
<p><strong>json module, 25, 46</strong> </p>
7876
<h3 id="l">L</h3>
7977
<p><strong>lambda, 11</strong><br>
8078
<strong>list comprehension, 11</strong><br>
@@ -92,24 +90,24 @@ <h3 id="m">M</h3>
9290
<h3 id="n">N</h3>
9391
<p><strong>namedtuples, 3</strong><br>
9492
<strong>nonlocal keyword, 12</strong><br>
95-
<strong>numpy module, 37-38</strong> </p>
93+
<strong>numpy library, 37-38</strong> </p>
9694
<h3 id="o">O</h3>
9795
<p><strong>open function, 22-23</strong><br>
9896
<strong>operator module, 31</strong><br>
9997
<strong>os commands, 24-25</strong><br>
10098
<strong>os module, 23, 24-25</strong> </p>
10199
<h3 id="p">P</h3>
102-
<p><strong>partial function, 12, 20</strong><br>
103-
<strong>pass keyword, 14, 34, 42</strong><br>
100+
<p><strong>pandas library, 44</strong><br>
101+
<strong>partial function, 12, 20</strong><br>
104102
<strong>path, 23-24</strong><br>
105103
<strong>pickle module, 25</strong><br>
106104
<strong>pillow library, 39</strong><br>
107-
<strong>plotting, 34</strong><br>
105+
<strong>plotting, 34, 47</strong><br>
108106
<strong>print function, 22</strong><br>
109107
<strong>profiling, 36-37</strong><br>
110108
<strong>progress bar, 34</strong><br>
111109
<strong>property decorator, 15</strong><br>
112-
<strong>pygame module, 42</strong> </p>
110+
<strong>pygame library, 42</strong> </p>
113111
<h3 id="q">Q</h3>
114112
<p><strong>queues, 30</strong> </p>
115113
<h3 id="r">R</h3>
@@ -120,15 +118,15 @@ <h3 id="r">R</h3>
120118
<strong>regular expressions, 5-6</strong><br>
121119
<strong>requests library, 35, 36</strong> </p>
122120
<h3 id="s">S</h3>
123-
<p><strong>scraping, 35, 43</strong><br>
121+
<p><strong>scraping, 35, 43, 46, 47, 48</strong><br>
124122
<strong>sequence, 4, 18, 19</strong><br>
125123
<strong>sets, 2, 11</strong><br>
126124
<strong>shell commands, 25</strong><br>
127125
<strong>sleep function, 34</strong><br>
128126
<strong>slots attribute, 15</strong><br>
129127
<strong>sortable, 1, 16</strong><br>
130128
<strong>splat operator, 10-11</strong><br>
131-
<strong>sqlite module, 27</strong><br>
129+
<strong>sqlite module, 27, 46</strong><br>
132130
<strong>statistics module, 7</strong><br>
133131
<strong>strings, 5</strong><br>
134132
<strong>struct module, 28-29</strong><br>

0 commit comments

Comments
 (0)