diff --git a/README.md b/README.md index 40aa557..b279b43 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ value = .pop(key) # Removes item or raises KeyErro ### Counter ```python >>> from collections import Counter ->>> colors = ['blue', 'red', 'blue', 'red', 'blue'] +>>> colors = ['blue', 'blue', 'blue', 'red', 'red'] >>> counter = Counter(colors) >>> counter['yellow'] += 1 Counter({'blue': 3, 'red': 2, 'yellow': 1}) diff --git a/index.html b/index.html index ec7f732..224129b 100644 --- a/index.html +++ b/index.html @@ -279,7 +279,7 @@ value = <dict>.pop(key) for k, v in <dict>.items() if k in keys} # Returns a dictionary, filtered by keys.

Counter

>>> from collections import Counter
->>> colors = ['blue', 'red', 'blue', 'red', 'blue']
+>>> colors = ['blue', 'blue', 'blue', 'red', 'red']
 >>> counter = Counter(colors)
 >>> counter['yellow'] += 1
 Counter({'blue': 3, 'red': 2, 'yellow': 1})
diff --git a/pdf/how_to_create_pdf.md b/pdf/how_to_create_pdf.md
index 64f2d7d..c0d0be9 100644
--- a/pdf/how_to_create_pdf.md
+++ b/pdf/how_to_create_pdf.md
@@ -21,7 +21,7 @@ Printing to PDF
 * Run `./parse.js` again.
 * Open `index.html` in text editor and first remove element `


` before the `

Libraries

`. * Then replace the footer and last three `
` elements with contents of `pdf/index_for_pdf_print.html` file and save. -* Change all links in text to normal text. They can be found with this regex: `.*a href.*`. +* Change all links in text to normal text and optionally add a page number after '(p. )'. Links can be found with this regex: `.*a href.*`. * Open `index.html` in Chrome. * 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. * Change lightness (L) percentage to: @@ -43,7 +43,7 @@ Adding headers and footers to PDF (the same for both files) * In 'Change page size' section select 'A4' for 'Page Sizes' set 'XOffset' to '0.1 in' and select page range All. * 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. * 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. -* Set title and author by selecting 'File/Propertiess...'. +* Set title and author by selecting 'File/Properties...'. * Save. Printing the PDF